@openmrs/esm-ward-app 9.2.1-pre.6725 → 9.2.1-pre.6726
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +17 -19
- package/dist/1058.js +1 -1
- package/dist/1058.js.LICENSE.txt +6 -0
- package/dist/1058.js.map +1 -1
- package/dist/3990.js +1 -0
- package/dist/3990.js.map +1 -0
- package/dist/4336.js +2 -0
- package/dist/{1369.js.LICENSE.txt → 4336.js.LICENSE.txt} +0 -15
- package/dist/4336.js.map +1 -0
- package/dist/5536.js +2 -0
- package/dist/5536.js.LICENSE.txt +14 -0
- package/dist/5536.js.map +1 -0
- package/dist/7512.js +1 -0
- package/dist/7512.js.map +1 -0
- package/dist/8501.js +2 -1
- package/dist/8501.js.map +1 -1
- package/dist/8610.js +1 -1
- package/dist/main.js +1 -2
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-ward-app.js +1 -1
- package/dist/openmrs-esm-ward-app.js.buildmanifest.json +150 -153
- package/dist/openmrs-esm-ward-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/createDashboardLink.tsx +9 -0
- package/src/dashboard.meta.ts +6 -0
- package/src/index.ts +4 -2
- package/dist/1369.js +0 -2
- package/dist/1369.js.map +0 -1
- package/dist/3373.js +0 -2
- package/dist/3373.js.map +0 -1
- package/dist/6012.js +0 -2
- package/dist/6012.js.LICENSE.txt +0 -5
- package/dist/6012.js.map +0 -1
- package/dist/717.js +0 -1
- package/dist/717.js.map +0 -1
- package/dist/9294.js +0 -1
- package/dist/9294.js.map +0 -1
- package/dist/main.js.LICENSE.txt +0 -5
- package/src/createDashboardLink.component.tsx +0 -42
- /package/dist/{3373.js.LICENSE.txt → 8501.js.LICENSE.txt} +0 -0
package/dist/4336.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 4336.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([[4336],{422:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.subscribeToArray=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}}},521:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(39600),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=i&&i.exports===o?r.A.Buffer:void 0,a=s?s.allocUnsafe:void 0;const u=function(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}},1359:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=r,o.index=0,o}return o(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(77759).Subscriber);e.InnerSubscriber=i},1548:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=Function.prototype.toString;const o=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2474:(t,e,n)=>{"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{A:()=>r})},2475:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(64494),o=n(53721),i=n(7817);const s=function(t){return(0,r.A)(t,i.A,o.A)}},2519:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}();e.ArgumentOutOfRangeError=n},3069:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<o&&(t=n.shift()));if(this.active=!1,e){for(;++r<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(25646).AsyncScheduler);e.AsapScheduler=i},4349:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(21016);e.finalize=function(t){return function(e){return e.lift(new a(t))}};var a=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.callback))},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new s.Subscription(n)),r}return o(e,t),e}(i.Subscriber)},4942:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(34914),i=n(47986),s=n(11673);(r=e.NotificationKind||(e.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C";var a=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return s.throwError(this.error);case"C":return o.empty()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();e.Notification=a},5179:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.takeWhile=function(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new s(t,e))}};var s=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.inclusive))},t}(),a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.inclusive=r,o.index=0,o}return o(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(i.Subscriber)},5319:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=!1;e.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else n&&console.log("RxJS: Back to a better error behavior. Thank you. <3");n=t},get useDeprecatedSynchronousErrorHandling(){return n}}},5405:(t,e,n)=>{"use strict";function r(){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.d(e,{A:()=>r})},6047:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(62637),o=n(64629),i=n(96696),s=n(8347),a=n(90952),u=n(78522);e.last=function(t,e){var n=arguments.length>=2;return function(c){return c.pipe(t?o.filter(function(e,n){return t(e,n,c)}):u.identity,i.takeLast(1),n?a.defaultIfEmpty(e):s.throwIfEmpty(function(){return new r.EmptyError}))}}},6727:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=function(t){return null!==t&&"object"==typeof t}},7406:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(86735),a=n(15019);e.throttleTime=function(t,e,n){return void 0===e&&(e=s.async),void 0===n&&(n=a.defaultThrottleConfig),function(r){return r.lift(new u(t,e,n.leading,n.trailing))}};var u=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),c=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=o,s.trailing=i,s._hasTrailingValue=!1,s._trailingValue=null,s}return o(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(l,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(i.Subscriber);function l(t){t.subscriber.clearThrottle()}},7661:(t,e,n)=>{"use strict";n.d(e,{V:()=>dt,t:()=>ht});const r={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",actions:"Actions",address:"Address",age:"Age",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",edit:"Edit",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",female:"Female",loading:"Loading",male:"Male",other:"Other",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",seeMoreLists:"See {{count}} more lists",sex:"Sex",showLess:"Show less",showMore:"Show more",toggleDevTools:"Toggle dev tools",unknown:"Unknown"};var o=n(17545),i=n(55152),s=n(30414),a=n(2474),u=n(9688),c=n(95309),l=n(72715),f=n(24586),p=n(96488),h=n(74430),d=n(27985),y=n(5405);function b(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}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach(function(e){(0,f.A)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var g={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]&&console[t].apply(console,e)}},m=new(function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.A)(this,t),this.init(e,n)}return(0,s.A)(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||g,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,n,r){return r&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,v(v({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}},{key:"clone",value:function(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new t(this.logger,e)}}]),t}()),_=function(){function t(){(0,i.A)(this,t),this.observers={}}return(0,s.A)(t,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach(function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)}),this}},{key:"off",value:function(t,e){this.observers[t]&&(e?this.observers[t]=this.observers[t].filter(function(t){return t!==e}):delete this.observers[t])}},{key:"emit",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.observers[t]&&[].concat(this.observers[t]).forEach(function(t){t.apply(void 0,n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(e){e.apply(e,[t].concat(n))})}}]),t}();function w(){var t,e,n=new Promise(function(n,r){t=n,e=r});return n.resolve=t,n.reject=e,n}function O(t){return null==t?"":""+t}function x(t,e,n){function r(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var s=r(i.shift());!t[s]&&n&&(t[s]=new n),t=Object.prototype.hasOwnProperty.call(t,s)?t[s]:{}}return o()?{}:{obj:t,k:r(i.shift())}}function S(t,e,n){var r=x(t,e,Object);r.obj[r.k]=n}function E(t,e){var n=x(t,e),r=n.obj,o=n.k;if(r)return r[o]}function j(t,e,n){var r=E(t,n);return void 0!==r?r:E(e,n)}function P(t,e,n){for(var r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof e[r]||e[r]instanceof String?n&&(t[r]=e[r]):P(t[r],e[r],n):t[r]=e[r]);return t}function A(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var k={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function C(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return k[t]}):t}var T="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,N=[" ",",","?","!",";"];function I(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}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach(function(e){(0,f.A)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function M(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[e])return t[e];for(var r=e.split(n),o=t,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var s=2,a=r.slice(i,i+s).join(n),u=o[a];void 0===u&&r.length>i+s;)s++,u=o[a=r.slice(i,i+s).join(n)];if(void 0===u)return;if(null===u)return null;if(e.endsWith(a)){if("string"==typeof u)return u;if(a&&"string"==typeof u[a])return u[a]}var c=r.slice(i+s).join(n);return c?M(u,c,n):void 0}o=o[r[i]]}return o}}var R=function(t){(0,u.A)(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=(0,l.A)(e);if(n){var o=(0,l.A)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return(0,c.A)(this,t)});function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,i.A)(this,o),e=r.call(this),T&&_.call((0,a.A)(e)),e.data=t||{},e.options=n,void 0===e.options.keySeparator&&(e.options.keySeparator="."),void 0===e.options.ignoreJSONStructure&&(e.options.ignoreJSONStructure=!0),e}return(0,s.A)(o,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[t,e];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."));var a=E(this.data,s);return a||!i||"string"!=typeof n?a:M(this.data&&this.data[t]&&this.data[t][e],n,o)}},{key:"addResource",value:function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var s=[t,e];n&&(s=s.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(r=e,e=(s=t.split("."))[1]),this.addNamespaces(e),S(this.data,s,r),o.silent||this.emit("added",t,e,n,r)}},{key:"addResources",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(t,e,o,n[o],{silent:!0});r.silent||this.emit("added",t,e,n)}},{key:"addResourceBundle",value:function(t,e,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(r=n,n=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var a=E(this.data,s)||{};r?P(a,n,o):a=D(D({},a),n),S(this.data,s,a),i.silent||this.emit("added",t,e,n)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?D(D({},{}),this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function(t){var e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(function(t){return e[t]&&Object.keys(e[t]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),o}(_),L={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,o){var i=this;return t.forEach(function(t){i.processors[t]&&(e=i.processors[t].process(e,n,r,o))}),e}};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}function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach(function(e){(0,f.A)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var B={},V=function(t){(0,u.A)(f,t);var e,n,r=(e=f,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=(0,l.A)(e);if(n){var o=(0,l.A)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return(0,c.A)(this,t)});function f(t){var e,n,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.A)(this,f),e=r.call(this),T&&_.call((0,a.A)(e)),n=t,o=(0,a.A)(e),["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(function(t){n[t]&&(o[t]=n[t])}),e.options=s,void 0===e.options.keySeparator&&(e.options.keySeparator="."),e.logger=m.create("translator"),e}return(0,s.A)(f,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;var n=this.resolve(t,e);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(t,e){var n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,o=e.ns||this.options.defaultNS||[],i=n&&t.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||function(t,e,n){e=e||"",n=n||"";var r=N.filter(function(t){return e.indexOf(t)<0&&n.indexOf(t)<0});if(0===r.length)return!0;var o=new RegExp("(".concat(r.map(function(t){return"?"===t?"\\?":t}).join("|"),")")),i=!o.test(t);if(!i){var s=t.indexOf(n);s>0&&!o.test(t.substring(0,s))&&(i=!0)}return i}(t,n,r));if(i&&!s){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:o};var u=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(r)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function(t,e,n){var r=this;if("object"!==(0,o.A)(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var i=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,s=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,a=this.extractFromKey(t[t.length-1],e),u=a.key,c=a.namespaces,l=c[c.length-1],p=e.lng||this.language,h=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(h){var d=e.nsSeparator||this.options.nsSeparator;return i?(y.res="".concat(l).concat(d).concat(u),y):"".concat(l).concat(d).concat(u)}return i?(y.res=u,y):u}var y=this.resolve(t,e),b=y&&y.res,v=y&&y.usedKey||u,g=y&&y.exactUsedKey||u,m=Object.prototype.toString.apply(b),_=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&b&&"string"!=typeof b&&"boolean"!=typeof b&&"number"!=typeof b&&["[object Number]","[object Function]","[object RegExp]"].indexOf(m)<0&&("string"!=typeof _||"[object Array]"!==m)){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,b,U(U({},e),{},{ns:c})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return i?(y.res=O,y):O}if(s){var x="[object Array]"===m,S=x?[]:{},E=x?g:v;for(var j in b)if(Object.prototype.hasOwnProperty.call(b,j)){var P="".concat(E).concat(s).concat(j);S[j]=this.translate(P,U(U({},e),{joinArrays:!1,ns:c})),S[j]===P&&(S[j]=b[j])}b=S}}else if(w&&"string"==typeof _&&"[object Array]"===m)(b=b.join(_))&&(b=this.extendTranslation(b,t,e,n));else{var A=!1,k=!1,C=void 0!==e.count&&"string"!=typeof e.count,T=f.hasDefaultValue(e),N=C?this.pluralResolver.getSuffix(p,e.count,e):"",I=e["defaultValue".concat(N)]||e.defaultValue;!this.isValidLookup(b)&&T&&(A=!0,b=I),this.isValidLookup(b)||(k=!0,b=u);var D=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:b,M=T&&I!==b&&this.options.updateMissing;if(k||A||M){if(this.logger.log(M?"updateKey":"missingKey",p,l,u,M?I:b),s){var R=this.resolve(u,U(U({},e),{},{keySeparator:!1}));R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var L=[],$=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&$&&$[0])for(var B=0;B<$.length;B++)L.push($[B]);else"all"===this.options.saveMissingTo?L=this.languageUtils.toResolveHierarchy(e.lng||this.language):L.push(e.lng||this.language);var V=function(t,n,o){var i=T&&o!==b?o:D;r.options.missingKeyHandler?r.options.missingKeyHandler(t,l,n,i,M,e):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(t,l,n,i,M,e),r.emit("missingKey",t,l,n,b)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?L.forEach(function(t){r.pluralResolver.getSuffixes(t,e).forEach(function(n){V([t],u+n,e["defaultValue".concat(n)]||I)})}):V(L,u,I))}b=this.extendTranslation(b,t,e,y,n),k&&b===u&&this.options.appendNamespaceToMissingKey&&(b="".concat(l,":").concat(u)),(k||A)&&this.options.parseMissingKeyHandler&&(b="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l,":").concat(u):u,A?b:void 0):this.options.parseMissingKeyHandler(b))}return i?(y.res=b,y):b}},{key:"extendTranslation",value:function(t,e,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,U(U({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(U(U({},n),{interpolation:U(U({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof t&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var u=t.match(this.interpolator.nestingRegexp);s=u&&u.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=U(U({},this.options.interpolation.defaultVariables),c)),t=this.interpolator.interpolate(t,c,n.lng||this.language,n),a){var l=t.match(this.interpolator.nestingRegexp);s<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(t=this.interpolator.nest(t,function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(e[0])),null):i.translate.apply(i,r.concat([e]))},n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=t&&p&&p.length&&!1!==n.applyPostProcessor&&(t=L.handle(p,t,e,this.options&&this.options.postProcessPassResolved?U({i18nResolved:r},n):n,this)),t}},{key:"resolve",value:function(t){var e,n,r,o,i,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach(function(t){if(!s.isValidLookup(e)){var u=s.extractFromKey(t,a),c=u.key;n=c;var l=u.namespaces;s.options.fallbackNS&&(l=l.concat(s.options.fallbackNS));var f=void 0!==a.count&&"string"!=typeof a.count,p=f&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),h=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);l.forEach(function(t){s.isValidLookup(e)||(i=t,!B["".concat(d[0],"-").concat(t)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(i)&&(B["".concat(d[0],"-").concat(t)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach(function(n){if(!s.isValidLookup(e)){o=n;var i,u=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(u,c,n,t,a);else{var l;f&&(l=s.pluralResolver.getSuffix(n,a.count,a));var d="".concat(s.options.pluralSeparator,"zero");if(f&&(u.push(c+l),p&&u.push(c+d)),h){var y="".concat(c).concat(s.options.contextSeparator).concat(a.context);u.push(y),f&&(u.push(y+l),p&&u.push(y+d))}}for(;i=u.pop();)s.isValidLookup(e)||(r=i,e=s.getResource(n,t,i,a))}}))})}}),{res:e,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}}],[{key:"hasDefaultValue",value:function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&"defaultValue"===e.substring(0,12)&&void 0!==t[e])return!0;return!1}}]),f}(_);function F(t){return t.charAt(0).toUpperCase()+t.slice(1)}var K=function(){function t(e){(0,i.A)(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=m.create("languageUtils")}return(0,s.A)(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(t){return t.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=F(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=F(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=F(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var e,n=this;return t?(t.forEach(function(t){if(!e){var r=n.formatLanguageCode(t);n.options.supportedLngs&&!n.isSupportedCode(r)||(e=r)}}),!e&&this.options.supportedLngs&&t.forEach(function(t){if(!e){var r=n.getLanguagePartFromCode(t);if(n.isSupportedCode(r))return e=r;e=n.options.supportedLngs.find(function(t){if(0===t.indexOf(r))return t})}}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e):null}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,e){var n=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),o=[],i=function(t){t&&(n.isSupportedCode(t)?o.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),r.forEach(function(t){o.indexOf(t)<0&&i(n.formatLanguageCode(t))}),o}}]),t}(),W=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],z={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}},q=["v1","v2","v3"],H={zero:0,one:1,two:2,few:3,many:4,other:5},Y=function(){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.A)(this,t),this.languageUtils=e,this.options=r,this.logger=m.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},W.forEach(function(t){t.lngs.forEach(function(e){n[e]={numbers:t.nr,plurals:z[t.fc]}})}),n)}return(0,s.A)(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:e.ordinal?"ordinal":"cardinal"})}catch(t){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map(function(t){return"".concat(e).concat(t)})}},{key:"getSuffixes",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(function(t,e){return H[t]-H[e]}).map(function(t){return"".concat(e.options.prepend).concat(t)}):r.numbers.map(function(r){return e.getSuffix(t,r,n)}):[]}},{key:"getSuffix",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(e)):this.getSuffixRetroCompatible(r,e):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,e){var n=this,r=t.noAbs?t.plurals(e):t.plurals(Math.abs(e)),o=t.numbers[r];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!q.includes(this.options.compatibilityJSON)}}]),t}();function G(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}function J(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(Object(n),!0).forEach(function(e){(0,f.A)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var X=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.A)(this,t),this.logger=m.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return(0,s.A)(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:C,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?A(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?A(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?A(e.nestingPrefix):e.nestingPrefixEscaped||A("$t("),this.nestingSuffix=e.nestingSuffix?A(e.nestingSuffix):e.nestingSuffixEscaped||A(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,e,n,r){var o,i,s,a=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(t){return t.replace(/\$/g,"$$$$")}var l=function(t){if(t.indexOf(a.formatSeparator)<0){var o=j(e,u,t);return a.alwaysFormat?a.format(o,void 0,n,J(J(J({},r),e),{},{interpolationkey:t})):o}var i=t.split(a.formatSeparator),s=i.shift().trim(),c=i.join(a.formatSeparator).trim();return a.format(j(e,u,s),c,n,J(J(J({},r),e),{},{interpolationkey:s}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(t){return c(t)}},{regex:this.regexp,safeValue:function(t){return a.escapeValue?c(a.escape(t)):c(t)}}].forEach(function(e){for(s=0;o=e.regex.exec(t);){var n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof f){var u=f(t,o,r);i="string"==typeof u?u:""}else if(r&&r.hasOwnProperty(n))i="";else{if(p){i=o[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(t)),i=""}else"string"==typeof i||a.useRawValueToEscape||(i=O(i));var c=e.safeValue(i);if(t=t.replace(o[0],c),p?(e.regex.lastIndex+=i.length,e.regex.lastIndex-=o[0].length):e.regex.lastIndex=0,++s>=a.maxReplaces)break}}),t}},{key:"nest",value:function(t,e){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=J({},i);function a(t,e){var n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;var r=t.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);t=r[0];var i=(o=this.interpolate(o,s)).match(/'/g),a=o.match(/"/g);(i&&i.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{s=JSON.parse(o),e&&(s=J(J({},e),s))}catch(e){return this.logger.warn("failed parsing options string in nesting for key ".concat(t),e),"".concat(t).concat(n).concat(o)}return delete s.defaultValue,t}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(t);){var u=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map(function(t){return t.trim()});n[1]=l.shift(),u=l,c=!0}if((r=e(a.call(this,n[1].trim(),s),s))&&n[0]===t&&"string"!=typeof r)return r;"string"!=typeof r&&(r=O(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),r=""),c&&(r=u.reduce(function(t,e){return o.format(t,e,i.lng,J(J({},i),{},{interpolationkey:n[1].trim()}))},r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}]),t}();function Q(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}function Z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach(function(e){(0,f.A)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function tt(t){var e={};return function(n,r,o){var i=r+JSON.stringify(o),s=e[i];return s||(s=t(r,o),e[i]=s),s(n)}}var et=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.A)(this,t),this.logger=m.create("formatter"),this.options=e,this.formats={number:tt(function(t,e){var n=new Intl.NumberFormat(t,e);return function(t){return n.format(t)}}),currency:tt(function(t,e){var n=new Intl.NumberFormat(t,Z(Z({},e),{},{style:"currency"}));return function(t){return n.format(t)}}),datetime:tt(function(t,e){var n=new Intl.DateTimeFormat(t,Z({},e));return function(t){return n.format(t)}}),relativetime:tt(function(t,e){var n=new Intl.RelativeTimeFormat(t,Z({},e));return function(t){return n.format(t,e.range||"day")}}),list:tt(function(t,e){var n=new Intl.ListFormat(t,Z({},e));return function(t){return n.format(t)}})},this.init(e)}return(0,s.A)(t,[{key:"init",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||","}},{key:"add",value:function(t,e){this.formats[t.toLowerCase().trim()]=e}},{key:"addCached",value:function(t,e){this.formats[t.toLowerCase().trim()]=tt(e)}},{key:"format",value:function(t,e,n,r){var o=this;return e.split(this.formatSeparator).reduce(function(t,e){var i=function(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===e&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===e&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(function(t){if(t){var e,r=(e=t.split(":"),(0,p.A)(e)||(0,h.A)(e)||(0,d.A)(e)||(0,y.A)()),o=r[0],i=r.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[o.trim()]||(n[o.trim()]=i),"false"===i&&(n[o.trim()]=!1),"true"===i&&(n[o.trim()]=!0),isNaN(i)||(n[o.trim()]=parseInt(i,10))}})}return{formatName:e,formatOptions:n}}(e),s=i.formatName,a=i.formatOptions;if(o.formats[s]){var u=t;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=c.locale||c.lng||r.locale||r.lng||n;u=o.formats[s](t,l,Z(Z(Z({},a),r),c))}catch(t){o.logger.warn(t)}return u}return o.logger.warn("there was no format function for ".concat(s)),t},t)}}]),t}();function nt(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}function rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(n),!0).forEach(function(e){(0,f.A)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var ot=function(t){(0,u.A)(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=(0,l.A)(e);if(n){var o=(0,l.A)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return(0,c.A)(this,t)});function o(t,e,n){var s,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.A)(this,o),s=r.call(this),T&&_.call((0,a.A)(s)),s.backend=t,s.store=e,s.services=n,s.languageUtils=n.languageUtils,s.options=u,s.logger=m.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=u.maxParallelReads||10,s.readingCalls=0,s.maxRetries=u.maxRetries>=0?u.maxRetries:5,s.retryTimeout=u.retryTimeout>=1?u.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(n,u.backend,u),s}return(0,s.A)(o,[{key:"queueLoad",value:function(t,e,n,r){var o=this,i={},s={},a={},u={};return t.forEach(function(t){var r=!0;e.forEach(function(e){var a="".concat(t,"|").concat(e);!n.reload&&o.store.hasResourceBundle(t,e)?o.state[a]=2:o.state[a]<0||(1===o.state[a]?void 0===s[a]&&(s[a]=!0):(o.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===u[e]&&(u[e]=!0)))}),r||(a[t]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(t,e,n){var r=t.split("|"),o=r[0],i=r[1];e&&this.emit("failedLoading",o,i,e),n&&this.store.addResourceBundle(o,i,n),this.state[t]=e?-1:2;var s={};this.queue.forEach(function(n){var r,a,u,c,l;r=n.loaded,a=i,(c=(u=x(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(a),function(t,e){void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)}(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(t){s[t]||(s[t]={});var e=n.loaded[t];e.length&&e.forEach(function(e){void 0===s[t][e]&&(s[t][e]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(t){return!t.done})}},{key:"read",value:function(t,e,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return t.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:o,wait:i,callback:s}):(this.readingCalls++,this.backend[n](t,e,function(a,u){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&u&&o<r.maxRetries?setTimeout(function(){r.read.call(r,t,e,n,o+1,2*i,s)},i):s(a,u)})):s(null,{})}},{key:"prepareLoading",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(t){n.loadOne(t)})}},{key:"load",value:function(t,e,n){this.prepareLoading(t,e,{},n)}},{key:"reload",value:function(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}},{key:"loadOne",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,function(r,s){r&&e.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&s&&e.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),s),e.loaded(t,r,s)})}},{key:"saveMissing",value:function(t,e,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(e,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,e,n,r,null,rt(rt({},i),{},{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],e,n,r))}}]),o}(_);function it(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function st(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}function at(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?st(Object(n),!0).forEach(function(e){(0,f.A)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ut(){}var ct=function(t){(0,u.A)(f,t);var e,n,r=(e=f,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=(0,l.A)(e);if(n){var o=(0,l.A)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return(0,c.A)(this,t)});function f(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if((0,i.A)(this,f),t=r.call(this),T&&_.call((0,a.A)(t)),t.options=it(n),t.services={},t.logger=m,t.modules={external:[]},e=(0,a.A)(t),Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),o&&!t.isInitialized&&!n.isClone){if(!t.options.initImmediate)return t.init(n,o),(0,c.A)(t,(0,a.A)(t));setTimeout(function(){t.init(n,o)},0)}return t}return(0,s.A)(f,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));var r={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===(0,o.A)(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===(0,o.A)(t[2])||"object"===(0,o.A)(t[3])){var n=t[3]||t[2];Object.keys(n).forEach(function(t){e[t]=n[t]})}return e},interpolation:{escapeValue:!0,format:function(t,e,n,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function i(t){return t?"function"==typeof t?new t:t:null}if(this.options=at(at(at({},r),this.options),it(e)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=at(at({},r.interpolation),this.options.interpolation)),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),!this.options.isClone){var s;this.modules.logger?m.init(i(this.modules.logger),this.options):m.init(null,this.options),this.modules.formatter?s=this.modules.formatter:"undefined"!=typeof Intl&&(s=et);var a=new K(this.options);this.store=new R(this.options.resources,this.options);var u=this.services;u.logger=m,u.resourceStore=this.store,u.languageUtils=a,u.pluralResolver=new Y(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!s||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(u.formatter=i(s),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new X(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new ot(i(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))}),this.modules.languageDetector&&(u.languageDetector=i(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=i(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new V(this.services,this.options),this.translator.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))}),this.modules.external.forEach(function(e){e.init&&e.init(t)})}if(this.format=this.options.interpolation.format,n||(n=ut),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}});var l=w(),f=function(){var e=function(e,r){t.isInitialized&&!t.initializedStoreOnce&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(r),n(e,r)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ut,r="string"==typeof t?t:this.language;if("function"==typeof t&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach(function(t){o.indexOf(t)<0&&o.push(t)})};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(t){return i(t)}),this.options.preload&&this.options.preload.forEach(function(t){return i(t)}),this.services.backendConnector.load(o,this.options.ns,function(t){t||e.resolvedLanguage||!e.language||e.setResolvedLanguage(e.language),n(t)})}else n(null)}},{key:"reloadResources",value:function(t,e,n){var r=w();return t||(t=this.languages),e||(e=this.options.ns),n||(n=ut),this.services.backendConnector.reload(t,e,function(t){r.resolve(),n(t)}),r}},{key:"use",value:function(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&L.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"setResolvedLanguage",value:function(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(var e=0;e<this.languages.length;e++){var n=this.languages[e];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(t,e){var n=this;this.isLanguageChangingTo=t;var r=w();this.emit("languageChanging",t);var o=function(t){n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t),n.resolvedLanguage=void 0,n.setResolvedLanguage(t)},i=function(i){t||i||!n.services.languageDetector||(i=[]);var s="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);s&&(n.language||o(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,function(t){!function(t,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),e&&e(t,function(){return n.t.apply(n,arguments)})}(t,s)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(t):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(t,e,n){var r=this,i=function t(e,i){var s;if("object"!==(0,o.A)(i)){for(var a=arguments.length,u=new Array(a>2?a-2:0),c=2;c<a;c++)u[c-2]=arguments[c];s=r.options.overloadTranslationOptionHandler([e,i].concat(u))}else s=at({},i);s.lng=s.lng||t.lng,s.lngs=s.lngs||t.lngs,s.ns=s.ns||t.ns,s.keyPrefix=s.keyPrefix||n||t.keyPrefix;var l=r.options.keySeparator||".",f=s.keyPrefix?"".concat(s.keyPrefix).concat(l).concat(e):e;return r.t(f,s)};return"string"==typeof t?i.lng=t:i.lngs=t,i.ns=e,i.keyPrefix=n,i}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(t,n){var r=e.services.backendConnector.state["".concat(t,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!(!this.hasResourceBundle(r,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!s(r,t)||o&&!s(i,t)))}},{key:"loadNamespaces",value:function(t,e){var n=this,r=w();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach(function(t){n.options.ns.indexOf(t)<0&&n.options.ns.push(t)}),this.loadResources(function(t){r.resolve(),e&&e(t)}),r):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var n=w();"string"==typeof t&&(t=[t]);var r=this.options.preload||[],o=t.filter(function(t){return r.indexOf(t)<0});return o.length?(this.options.preload=r.concat(o),this.loadResources(function(t){n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){return t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ut,r=at(at(at({},this.options),e),{isClone:!0}),o=new f(r);return void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach(function(e){o[e]=t[e]}),o.services=at({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new V(o.services,o.options),o.translator.on("*",function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit.apply(o,[t].concat(n))}),o.init(r,n),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),f}(_);(0,f.A)(ct,"createInstance",function(){return new ct(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)});var lt=ct.createInstance();lt.createInstance=ct.createInstance,lt.createInstance,lt.init,lt.loadResources,lt.reloadResources,lt.use,lt.changeLanguage,lt.getFixedT,lt.t,lt.exists,lt.setDefaultNamespace,lt.hasLoadedNamespace,lt.loadNamespaces,lt.loadLanguages;const ft=lt,pt=ft.default||ft;function ht(t,e,n,r){return pt.t(e,{ns:t,defaultValue:n,...r})}function dt(t,e,n){return r[t]?ht("core",t,e??r[t],n):(console.error(`O3 Core Translations does not provide key '${t}'. The key itself is being rendered as text.`),t)}pt.on("initialized",function(){window.i18next.loadNamespaces(["core"])})},7817:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(9158),o=n(85632),i=n(31475);const s=function(t){return(0,i.A)(t)?(0,r.A)(t):(0,o.A)(t)}},8347:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(62637),s=n(77759);e.throwIfEmpty=function(t){return void 0===t&&(t=c),function(e){return e.lift(new a(t))}};var a=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.errorFactory))},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return o(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(s.Subscriber);function c(){return new i.EmptyError}},8674:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32376);e.findIndex=function(t,e){return function(n){return n.lift(new r.FindValueOperator(t,n,!0,e))}}},8791:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(18860),a=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return o(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new s.ObjectUnsubscribedError;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.Subject);e.BehaviorSubject=a},9158:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(61697),o=n(96956),i=n(15821),s=n(85378),a=n(17283),u=Object.prototype.hasOwnProperty;const c=function(t,e){var n=(0,o.A)(t),c=!n&&(0,r.A)(t),l=!n&&!c&&(0,i.A)(t),f=!n&&!c&&!l&&(0,a.A)(t),p=n||c||l||f,h=p?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],d=h.length;for(var y in t)!e&&!u.call(t,y)||p&&("length"==y||l&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||(0,s.A)(y,d))||h.push(y);return h}},9166:(t,e,n)=>{"use strict";n.d(e,{dx:()=>O,Cj:()=>x,Zu:()=>o,cD:()=>a,Rb:()=>S,SY:()=>u,hG:()=>l,KU:()=>i,Bv:()=>s,Vs:()=>d,DK:()=>T,BX:()=>j,Pu:()=>b,BR:()=>C,Ds:()=>A,NH:()=>P,E$:()=>h,Qx:()=>y,xL:()=>k});var r=n(20367);const o=`${r.Jj}/attachment`;function i(t,e){return(0,r.lo)(`${o}/${t}`,{signal:e.signal})}function s(t,e,n){return(0,r.lo)(`${o}?patient=${t}&includeEncounterless=${e}`,{signal:n.signal})}async function a(t,e){const n=new FormData;return n.append("fileCaption",e.fileDescription),n.append("patient",t),e.file?n.append("file",e.file,e.fileName):(n.append("file",new File([""],e.fileName),e.fileName),n.append("base64Content",e.base64Content)),(0,r.lo)(`${o}`,{method:"POST",body:n})}function u(t,e){return(0,r.lo)(`${o}/${t}`,{method:"DELETE",signal:e.signal})}var c=n(39644);async function l(t,e,n=!0){if(t){let o=null;const[i,s]=await Promise.all([(0,r.lo)(`${r.IU}/Patient/${t}`,e).catch(t=>o=t),n?f(t):Promise.resolve(null)]);if(i.ok)return i.data;if(s)return s;if(o)throw o}return null}async function f(t){const e=(await(0,c.pb)("patient-registration")).find(e=>e.fhirPatient.id===t);return e?.fhirPatient??null}var p=n(99549);function h(t){return{uuid:t.uuid,display:t.display}}function d(t=null,e=null){const n=new URLSearchParams;t&&n.set("tag",t),e&&n.set("q",e);const o=n.toString(),i=`${r.Jj}/location${o?"?"+o:""}`;return(0,r.ut)(i).pipe((0,p.Tj)(t=>t.data.results.map(h))).pipe((0,p.s)(1))}function y(t){return{uuid:t.uuid,display:t.display,name:t.name}}function b(){return(0,r.ut)(`${r.Jj}/visittype`).pipe((0,p.Tj)(t=>t.data.results.map(y))).pipe((0,p.s)(1))}var v=n(22337),g=n(32505),m=n(75772),_=n(20320),w=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return g.C6(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new _.P;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(m.B7),O=function(t){return t.NEWVISIT="startVisit",t.EDITVISIT="editVisit",t.LOADING="loadingVisit",t}({}),x=function(t){return t.NOTSTARTED="notStarted",t.ONGOING="ongoing",t}({});const S="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",E=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(t){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};function j(){return(0,v.jf)("visit",E)}function P(t,e){j().setState({patientUuid:t,manuallySetVisitUuid:e})}function A(t,e){return(0,r.lo)(`${r.Jj}/visit`,{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function k(t,e,n){return(0,r.lo)(`${r.Jj}/visit/${t}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function C(t,e,n){const o=n??S;return(0,r.lo)(`${r.Jj}/visit?patient=${t}&v=${o}`,{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}})}j().subscribe(t=>{var e;e=t,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(e))});const T=new w(null)},9688:(t,e,n)=>{"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function o(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}n.d(e,{A:()=>o})},10248:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(36713),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=i&&i.exports===o&&r.A.process;const a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}()},11276:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(){return[]}},11305:(t,e,n)=>{"use strict";function r(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function o(t){return t&&t.sensitive?"":"i"}function i(t,e,n){return function(t,e,n){void 0===n&&(n={});for(var i=n.strict,s=void 0!==i&&i,a=n.start,u=void 0===a||a,c=n.end,l=void 0===c||c,f=n.encode,p=void 0===f?function(t){return t}:f,h="["+r(n.endsWith||"")+"]|$",d="["+r(n.delimiter||"/#?")+"]",y=u?"^":"",b=0,v=t;b<v.length;b++){var g=v[b];if("string"==typeof g)y+=r(p(g));else{var m=r(p(g.prefix)),_=r(p(g.suffix));if(g.pattern)if(e&&e.push(g),m||_)if("+"===g.modifier||"*"===g.modifier){var w="*"===g.modifier?"?":"";y+="(?:"+m+"((?:"+g.pattern+")(?:"+_+m+"(?:"+g.pattern+"))*)"+_+")"+w}else y+="(?:"+m+"("+g.pattern+")"+_+")"+g.modifier;else y+="("+g.pattern+")"+g.modifier;else y+="(?:"+m+_+")"+g.modifier}}if(l)s||(y+=d+"?"),y+=n.endsWith?"(?="+h+")":"$";else{var O=t[t.length-1],x="string"==typeof O?d.indexOf(O[O.length-1])>-1:void 0===O;s||(y+="(?:"+d+"(?="+h+"))?"),x||(y+="(?="+d+"|"+h+")")}return new RegExp(y,o(n))}(function(t,e){void 0===e&&(e={});for(var n=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 s="",a=n+1;a<t.length;){var u=t.charCodeAt(a);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;s+=t[a++]}if(!s)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:s}),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=e.prefixes,i=void 0===o?"./":o,s="[^"+r(e.delimiter||"/#?")+"]+?",a=[],u=0,c=0,l="",f=function(t){if(c<n.length&&n[c].type===t)return n[c++].value},p=function(t){var e=f(t);if(void 0!==e)return e;var r=n[c],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},h=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};c<n.length;){var d=f("CHAR"),y=f("NAME"),b=f("PATTERN");if(y||b){var v=d||"";-1===i.indexOf(v)&&(l+=v,v=""),l&&(a.push(l),l=""),a.push({name:y||u++,prefix:v,suffix:"",pattern:b||s,modifier:f("MODIFIER")||""})}else{var g=d||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(a.push(l),l=""),f("OPEN")){v=h();var m=f("NAME")||"",_=f("PATTERN")||"",w=h();p("CLOSE"),a.push({name:m||(_?u++:""),pattern:m&&!_?s:_,prefix:v,suffix:w,modifier:f("MODIFIER")||""})}else p("END")}}return a}(t,n),e,n)}function s(t,e,n){return t instanceof 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}(t,e):Array.isArray(t)?function(t,e,n){var r=t.map(function(t){return s(t,e,n).source});return new RegExp("(?:"+r.join("|")+")",o(n))}(t,e,n):i(t,e,n)}n.d(e,{g4:()=>S,D_:()=>h,lz:()=>f,qh:()=>d,JK:()=>O,tA:()=>x,zl:()=>v,JG:()=>b,oo:()=>g,vf:()=>c,MY:()=>l,Wh:()=>w});const a=(0,n(22337).Zd)("breadcrumbs",[]);function u(t){return t.matcher instanceof RegExp?t.matcher:"string"==typeof t.matcher?s(t.matcher):s(t.path)}function c(t){return l([t])}function l(t){const e=[...f(),...t.map(t=>({matcher:u(t),settings:t}))];a.setState(e,!0)}function f(){return a.getState()}function p(t,e){if(e)return function(t,e){const[n]=t.filter(t=>t.matcher.test(e));return n}(t,e)||function(t,e){const n=e.split("/");for(;n.length>1;){n.pop();const e=p(t,n.join("/"));if(e)return e}}(t,e)}function h(t,e){if(t.length>0){const n=p(t,e);if(n){const e=[n];let r=p(t,n.settings.parent);for(;void 0!==r;)e.push(r),r=p(t,r.settings.parent);return e.reverse()}}return[]}function d(t){return h(f(),t)}var y=n(22244);function b(t,e){const n=window.getOpenmrsSpaBase().replace(/\/$/,"");return v(t,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...e}).replace(/^\/\//,"/")}function v(t,e){return Object.keys(e).reduce((t,n)=>t.split("${"+n+"}").join(e[n]),t)}function g({to:t,templateParams:e}){const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=b(t,e).replace(window.location.origin,"");r.startsWith(n)?(0,y.EH)(r):window.location.assign(r)}const m="openmrs:history";function _(t){let e=JSON.parse(sessionStorage.getItem(m)??"[]")||[];e.push(t),e.length>50&&(e=e.slice(-50)),sessionStorage.setItem(m,JSON.stringify(e))}function w(){0===JSON.parse(sessionStorage.getItem(m)??"[]").length&&document.referrer&&_(document.referrer),window.addEventListener("single-spa:routing-event",t=>{const e=O();"replaceState"==t.detail.originalEvent?.singleSpaTrigger?(e[e.length-1]=window.location.href,sessionStorage.setItem(m,JSON.stringify(e))):!t.detail.originalEvent?.singleSpa&&e.includes(window.location.href)?x({toUrl:window.location.href}):e[e.length-1]!==window.location.href&&_(window.location.href)})}function O(){return JSON.parse(sessionStorage.getItem(m)??"[]")}function x({toUrl:t}){const e=O(),n=e.lastIndexOf(t);if(-1==n)throw new Error(`URL ${t} not found in history; cannot go back to it.`);{const t=e.slice(0,n+1);g({to:e[n]}),sessionStorage.setItem(m,JSON.stringify(t))}}function S(){sessionStorage.removeItem(m)}},11673:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092);function o(t){var e=t.error;t.subscriber.error(e)}e.throwError=function(t,e){return e?new r.Observable(function(n){return e.schedule(o,0,{error:t,subscriber:n})}):new r.Observable(function(e){return e.error(t)})}},11806:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(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}return t.prototype=Object.create(Error.prototype),t}();e.UnsubscriptionError=n},11853:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.buffer=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.closingNotifier))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(r))),r}return o(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.SimpleOuterSubscriber)},12873:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(21016),i=n(46713);e.scheduleObservable=function(t,e){return new r.Observable(function(n){var r=new o.Subscription;return r.add(e.schedule(function(){var o=t[i.observable]();r.add(o.subscribe({next:function(t){r.add(e.schedule(function(){return n.next(t)}))},error:function(t){r.add(e.schedule(function(){return n.error(t)}))},complete:function(){r.add(e.schedule(function(){return n.complete()}))}}))})),r})}},13394:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(46713);e.subscribeToObservable=function(t){return function(e){var n=t[r.observable]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}}},13441:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(86735),o=n(18780),i=n(27954);e.auditTime=function(t,e){return void 0===e&&(e=r.async),o.audit(function(){return i.timer(t,e)})}},14151:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t){return t}},14779:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(33395);e.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(r.merge.apply(void 0,[e].concat(t)))}}},15019:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.defaultThrottleConfig={leading:!0,trailing:!1},e.throttle=function(t,n){return void 0===n&&(n=e.defaultThrottleConfig),function(e){return e.lift(new s(t,!!n.leading,!!n.trailing))}};var s=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector,this.leading,this.trailing))},t}(),a=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.destination=e,i.durationSelector=n,i._leading=r,i._trailing=o,i._hasValue=!1,i}return o(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(i.SimpleOuterSubscriber)},15150:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(9158),o=n(97942),i=n(71140);var s=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,o.A)(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=(0,i.A)(t),n=[];for(var r in t)("constructor"!=r||!e&&s.call(t,r))&&n.push(r);return n};var u=n(31475);const c=function(t){return(0,u.A)(t)?(0,r.A)(t,!0):a(t)}},15821:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(39600);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=i&&i.exports===o?r.A.Buffer:void 0;const a=(s?s.isBuffer:void 0)||function(){return!1}},17283:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var r=n(62135),o=n(47893),i=n(47313),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var a=n(58126),u=n(10248),c=u.A&&u.A.isTypedArray;const l=c?(0,a.A)(c):function(t){return(0,i.A)(t)&&(0,o.A)(t.length)&&!!s[(0,r.A)(t)]}},17436:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(86735),s=n(66740),a=n(77759),u=n(4942);e.delay=function(t,e){void 0===e&&(e=i.async);var n=s.isDate(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new c(n,e))}};var c=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.delay,this.scheduler))},t}(),l=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.delay=n,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return o(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,o=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var i=Math.max(0,n[0].time-r.now());this.schedule(t,i)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new f(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(u.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(u.Notification.createComplete()),this.unsubscribe()},e}(a.Subscriber),f=function(t,e){this.time=t,this.notification=e}},17545:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{A:()=>r})},17563:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(95092),s=n(73766),a=n(19673),u=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=s.asap);var o=t.call(this)||this;return o.source=e,o.delayTime=n,o.scheduler=r,(!a.isNumeric(n)||n<0)&&(o.delayTime=0),r&&"function"==typeof r.schedule||(o.scheduler=s.asap),o}return o(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=s.asap),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(i.Observable);e.SubscribeOnObservable=u},18364:(t,e,n)=>{"use strict";function r(t){return"function"==typeof t}n.d(e,{T:()=>r})},18780:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.audit=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=i.innerSubscribe(e,new i.SimpleInnerSubscriber(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this,e=t.value,n=t.hasValue,r=t.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.SimpleOuterSubscriber)},18860:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}();e.ObjectUnsubscribedError=n},18904:(t,e,n)=>{"use strict";n.d(e,{D:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},19109:(t,e,n)=>{"use strict";var r=n(89710),o=n(51812),i=n(32742),s=n(83153),a={baseColor:"#933c3c"},u=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],c="#000",l=.02;function f(t,e,n){return parseInt(t.substr(e,n||1),16)}function p(t,e,n,r,o){return(parseFloat(t)-e)*(o-r)/(n-e)+r}function h(t){return t%2==0?"#ddd":"#222"}function d(t){return p(t,0,15,.02,.15)}var y=t.exports=function(t,e){return this.opts=r({},a,e),this.hash=e.hash||i(t),this.svg=new s,this.generateBackground(),this.generatePattern(),this};function b(t){return[[t,0,t,3*t],[0,t,3*t,t]]}function v(t){return[0,0,t,t,0,t,0,0].join(",")}function g(t,e,n,r,o){var i=v(r),s=d(o[0]),a=h(o[0]),u={stroke:c,"stroke-opacity":l,"fill-opacity":s,fill:a};t.polyline(i,u).transform({translate:[e+r,n],scale:[-1,1]}),t.polyline(i,u).transform({translate:[e+r,n+2*r],scale:[1,-1]}),s=d(o[1]),a=h(o[1]),u={stroke:c,"stroke-opacity":l,"fill-opacity":s,fill:a},t.polyline(i,u).transform({translate:[e+r,n+2*r],scale:[-1,-1]}),t.polyline(i,u).transform({translate:[e+r,n],scale:[1,1]})}function m(t,e,n,r,o){var i=d(o),s=h(o),a=v(r),u={stroke:c,"stroke-opacity":l,"fill-opacity":i,fill:s};t.polyline(a,u).transform({translate:[e,n+r],scale:[1,-1]}),t.polyline(a,u).transform({translate:[e+2*r,n+r],scale:[-1,-1]}),t.polyline(a,u).transform({translate:[e,n+r],scale:[1,1]}),t.polyline(a,u).transform({translate:[e+2*r,n+r],scale:[-1,1]})}y.prototype.toSvg=function(){return this.svg.toString()},y.prototype.toString=function(){return this.toSvg()},y.prototype.toBase64=function(){var t=this.toSvg();return"undefined"!=typeof window&&"function"==typeof window.btoa?window.btoa(t):new Buffer(t).toString("base64")},y.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},y.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},y.prototype.generateBackground=function(){var t,e,n,r;this.opts.color?n=o.hex2rgb(this.opts.color):(e=p(f(this.hash,14,3),0,4095,0,359),r=f(this.hash,17),(t=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*t.h-e+360)%360/360,t.s=r%2==0?Math.min(1,(100*t.s+r)/100):Math.max(0,(100*t.s-r)/100),n=o.hsl2rgb(t)),this.color=o.rgb2hex(n),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(n)})},y.prototype.generatePattern=function(){var t=this.opts.generator;if(t){if(u.indexOf(t)<0)throw new Error("The generator "+t+" does not exist.")}else t=u[f(this.hash,20)];return this["geo"+t.slice(0,1).toUpperCase()+t.slice(1)]()},y.prototype.geoHexagons=function(){var t,e,n,r,o,i,s,a=p(f(this.hash,0),0,15,8,60),u=a*Math.sqrt(3),y=2*a,b=function(t){var e=t,n=e/2,r=Math.sin(60*Math.PI/180)*e;return[0,r,n,0,n+e,0,2*e,r,n+e,2*r,n,2*r,0,r].join(",")}(a);for(this.svg.setWidth(3*y+3*a),this.svg.setHeight(6*u),e=0,s=0;s<6;s++)for(i=0;i<6;i++)t=i%2==0?s*u:s*u+u/2,n=d(o=f(this.hash,e)),r={fill:h(o),"fill-opacity":n,stroke:c,"stroke-opacity":l},this.svg.polyline(b,r).transform({translate:[i*a*1.5-y/2,t-u/2]}),0===i&&this.svg.polyline(b,r).transform({translate:[6*a*1.5-y/2,t-u/2]}),0===s&&(t=i%2==0?6*u:6*u+u/2,this.svg.polyline(b,r).transform({translate:[i*a*1.5-y/2,t-u/2]})),0===i&&0===s&&this.svg.polyline(b,r).transform({translate:[6*a*1.5-y/2,5*u+u/2]}),e++},y.prototype.geoSineWaves=function(){var t,e,n,r,o,i,s=Math.floor(p(f(this.hash,0),0,15,100,400)),a=Math.floor(p(f(this.hash,1),0,15,30,100)),u=Math.floor(p(f(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)e=d(o=f(this.hash,t)),r={fill:"none",stroke:h(o),opacity:e,"stroke-width":u+"px"},n="M0 "+a+" C "+(i=s/4*.7)+" 0, "+(s/2-i)+" 0, "+s/2+" "+a+" S "+(s-i)+" "+2*a+", "+s+" "+a+" S "+(1.5*s-i)+" 0, "+1.5*s+", "+a,this.svg.path(n,r).transform({translate:[-s/4,u*t-1.5*a]}),this.svg.path(n,r).transform({translate:[-s/4,u*t-1.5*a+36*u]})},y.prototype.geoChevrons=function(){var t,e,n,r,o,i,s,a,u,y,b=p(f(this.hash,0),0,15,30,80),v=p(f(this.hash,0),0,15,30,80),g=[[0,0,(t=b)/2,(e=v)-(n=.66*e),t/2,e,0,n,0,0],[t/2,e-n,t,0,t,n,t/2,e,t/2,e-n]].map(function(t){return t.join(",")});for(this.svg.setWidth(6*b),this.svg.setHeight(6*v*.66),o=0,y=0;y<6;y++)for(u=0;u<6;u++)i=d(a=f(this.hash,o)),r=h(a),s={stroke:c,"stroke-opacity":l,fill:r,"fill-opacity":i,"stroke-width":1},this.svg.group(s).transform({translate:[u*b,y*v*.66-v/2]}).polyline(g).end(),0===y&&this.svg.group(s).transform({translate:[u*b,6*v*.66-v/2]}).polyline(g).end(),o+=1},y.prototype.geoPlusSigns=function(){var t,e,n,r,o,i,s,a=p(f(this.hash,0),0,15,10,25),u=3*a,y=b(a);for(this.svg.setWidth(12*a),this.svg.setHeight(12*a),e=0,s=0;s<6;s++)for(i=0;i<6;i++)n=d(o=f(this.hash,e)),t=s%2==0?0:1,r={fill:h(o),stroke:c,"stroke-opacity":l,"fill-opacity":n},this.svg.group(r).transform({translate:[i*u-i*a+t*a-a,s*u-s*a-u/2]}).rect(y).end(),0===i&&this.svg.group(r).transform({translate:[4*u-i*a+t*a-a,s*u-s*a-u/2]}).rect(y).end(),0===s&&this.svg.group(r).transform({translate:[i*u-i*a+t*a-a,4*u-s*a-u/2]}).rect(y).end(),0===i&&0===s&&this.svg.group(r).transform({translate:[4*u-i*a+t*a-a,4*u-s*a-u/2]}).rect(y).end(),e++},y.prototype.geoXes=function(){var t,e,n,r,o,i,s,a=p(f(this.hash,0),0,15,10,25),u=b(a),c=3*a*.943;for(this.svg.setWidth(3*c),this.svg.setHeight(3*c),e=0,s=0;s<6;s++)for(i=0;i<6;i++)n=d(o=f(this.hash,e)),t=i%2==0?s*c-.5*c:s*c-.5*c+c/4,r={fill:h(o),opacity:n},this.svg.group(r).transform({translate:[i*c/2-c/2,t-s*c/2],rotate:[45,c/2,c/2]}).rect(u).end(),0===i&&this.svg.group(r).transform({translate:[6*c/2-c/2,t-s*c/2],rotate:[45,c/2,c/2]}).rect(u).end(),0===s&&(t=i%2==0?6*c-c/2:6*c-c/2+c/4,this.svg.group(r).transform({translate:[i*c/2-c/2,t-6*c/2],rotate:[45,c/2,c/2]}).rect(u).end()),5===s&&this.svg.group(r).transform({translate:[i*c/2-c/2,t-11*c/2],rotate:[45,c/2,c/2]}).rect(u).end(),0===i&&0===s&&this.svg.group(r).transform({translate:[6*c/2-c/2,t-6*c/2],rotate:[45,c/2,c/2]}).rect(u).end(),e++},y.prototype.geoOverlappingCircles=function(){var t,e,n,r,o,i,s=p(f(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),t=0,i=0;i<6;i++)for(o=0;o<6;o++)e=d(r=f(this.hash,t)),n={fill:h(r),opacity:e},this.svg.circle(o*s,i*s,s,n),0===o&&this.svg.circle(6*s,i*s,s,n),0===i&&this.svg.circle(o*s,6*s,s,n),0===o&&0===i&&this.svg.circle(6*s,6*s,s,n),t++},y.prototype.geoOctogons=function(){var t,e,n,r,o,i,s=p(f(this.hash,0),0,15,10,60),a=function(t){var e=.33*t;return[e,0,t-e,0,t,e,t,t-e,t-e,t,e,t,0,t-e,0,e,e,0].join(",")}(s);for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),e=0,i=0;i<6;i++)for(o=0;o<6;o++)n=d(r=f(this.hash,e)),t=h(r),this.svg.polyline(a,{fill:t,"fill-opacity":n,stroke:c,"stroke-opacity":l}).transform({translate:[o*s,i*s]}),e+=1},y.prototype.geoSquares=function(){var t,e,n,r,o,i,s=p(f(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),e=0,i=0;i<6;i++)for(o=0;o<6;o++)n=d(r=f(this.hash,e)),t=h(r),this.svg.rect(o*s,i*s,s,s,{fill:t,"fill-opacity":n,stroke:c,"stroke-opacity":l}),e+=1},y.prototype.geoConcentricCircles=function(){var t,e,n,r,o,i,s=p(f(this.hash,0),0,15,10,60),a=s/5;for(this.svg.setWidth(6*(s+a)),this.svg.setHeight(6*(s+a)),e=0,i=0;i<6;i++)for(o=0;o<6;o++)n=d(r=f(this.hash,e)),t=h(r),this.svg.circle(o*s+o*a+(s+a)/2,i*s+i*a+(s+a)/2,s/2,{fill:"none",stroke:t,opacity:n,"stroke-width":a+"px"}),n=d(r=f(this.hash,39-e)),t=h(r),this.svg.circle(o*s+o*a+(s+a)/2,i*s+i*a+(s+a)/2,s/4,{fill:t,"fill-opacity":n}),e+=1},y.prototype.geoOverlappingRings=function(){var t,e,n,r,o,i,s=p(f(this.hash,0),0,15,10,60),a=s/4;for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),t=0,i=0;i<6;i++)for(o=0;o<6;o++)e=d(r=f(this.hash,t)),n={fill:"none",stroke:h(r),opacity:e,"stroke-width":a+"px"},this.svg.circle(o*s,i*s,s-a/2,n),0===o&&this.svg.circle(6*s,i*s,s-a/2,n),0===i&&this.svg.circle(o*s,6*s,s-a/2,n),0===o&&0===i&&this.svg.circle(6*s,6*s,s-a/2,n),t+=1},y.prototype.geoTriangles=function(){var t,e,n,r,o,i,s,a=p(f(this.hash,0),0,15,15,80),u=a/2*Math.sqrt(3),y=function(t,e){var n=t/2;return[n,0,t,e,0,e,n,0].join(",")}(a,u);for(this.svg.setWidth(3*a),this.svg.setHeight(6*u),t=0,s=0;s<6;s++)for(i=0;i<6;i++)e=d(o=f(this.hash,t)),r={fill:h(o),"fill-opacity":e,stroke:c,"stroke-opacity":l},n=s%2==0?i%2==0?180:0:i%2!=0?180:0,this.svg.polyline(y,r).transform({translate:[i*a*.5-a/2,u*s],rotate:[n,a/2,u/2]}),0===i&&this.svg.polyline(y,r).transform({translate:[6*a*.5-a/2,u*s],rotate:[n,a/2,u/2]}),t+=1},y.prototype.geoDiamonds=function(){var t,e,n,r,o,i,s,a,u,y=p(f(this.hash,0),0,15,10,50),b=p(f(this.hash,1),0,15,10,50),v=[(t=y)/2,0,t,(e=b)/2,t/2,e,0,e/2].join(",");for(this.svg.setWidth(6*y),this.svg.setHeight(3*b),r=0,u=0;u<6;u++)for(a=0;a<6;a++)o=d(s=f(this.hash,r)),i={fill:h(s),"fill-opacity":o,stroke:c,"stroke-opacity":l},n=u%2==0?0:y/2,this.svg.polyline(v,i).transform({translate:[a*y-y/2+n,b/2*u-b/2]}),0===a&&this.svg.polyline(v,i).transform({translate:[6*y-y/2+n,b/2*u-b/2]}),0===u&&this.svg.polyline(v,i).transform({translate:[a*y-y/2+n,b/2*6-b/2]}),0===a&&0===u&&this.svg.polyline(v,i).transform({translate:[6*y-y/2+n,b/2*6-b/2]}),r+=1},y.prototype.geoNestedSquares=function(){var t,e,n,r,o,i,s=p(f(this.hash,0),0,15,4,12),a=7*s;for(this.svg.setWidth(6*(a+s)+6*s),this.svg.setHeight(6*(a+s)+6*s),t=0,i=0;i<6;i++)for(o=0;o<6;o++)e=d(r=f(this.hash,t)),n={fill:"none",stroke:h(r),opacity:e,"stroke-width":s+"px"},this.svg.rect(o*a+o*s*2+s/2,i*a+i*s*2+s/2,a,a,n),e=d(r=f(this.hash,39-t)),n={fill:"none",stroke:h(r),opacity:e,"stroke-width":s+"px"},this.svg.rect(o*a+o*s*2+s/2+2*s,i*a+i*s*2+s/2+2*s,3*s,3*s,n),t+=1},y.prototype.geoMosaicSquares=function(){var t,e,n,r=p(f(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*r),this.svg.setHeight(8*r),t=0,n=0;n<4;n++)for(e=0;e<4;e++)e%2==0?n%2==0?m(this.svg,e*r*2,n*r*2,r,f(this.hash,t)):g(this.svg,e*r*2,n*r*2,r,[f(this.hash,t),f(this.hash,t+1)]):n%2==0?g(this.svg,e*r*2,n*r*2,r,[f(this.hash,t),f(this.hash,t+1)]):m(this.svg,e*r*2,n*r*2,r,f(this.hash,t)),t+=1},y.prototype.geoPlaid=function(){var t,e,n,r,o,i,s=0,a=0;for(e=0;e<36;)s+=f(this.hash,e)+5,n=d(i=f(this.hash,e+1)),t=h(i),r=i+5,this.svg.rect(0,s,"100%",r,{opacity:n,fill:t}),s+=r,e+=2;for(e=0;e<36;)a+=f(this.hash,e)+5,n=d(i=f(this.hash,e+1)),t=h(i),o=i+5,this.svg.rect(a,0,o,"100%",{opacity:n,fill:t}),a+=o,e+=2;this.svg.setWidth(a),this.svg.setHeight(s)},y.prototype.geoTessellation=function(){var t,e,n,r,o,i=p(f(this.hash,0),0,15,5,40),s=i*Math.sqrt(3),a=2*i,u=i/2*Math.sqrt(3),y=function(t,e){return[0,0,e,t/2,0,t,0,0].join(",")}(i,u),b=3*i+2*u,v=2*s+2*i;for(this.svg.setWidth(b),this.svg.setHeight(v),e=0;e<20;e++)switch(n=d(o=f(this.hash,e)),t=h(o),r={stroke:c,"stroke-opacity":l,fill:t,"fill-opacity":n,"stroke-width":1},e){case 0:this.svg.rect(-i/2,-i/2,i,i,r),this.svg.rect(b-i/2,-i/2,i,i,r),this.svg.rect(-i/2,v-i/2,i,i,r),this.svg.rect(b-i/2,v-i/2,i,i,r);break;case 1:this.svg.rect(a/2+u,s/2,i,i,r);break;case 2:this.svg.rect(-i/2,v/2-i/2,i,i,r),this.svg.rect(b-i/2,v/2-i/2,i,i,r);break;case 3:this.svg.rect(a/2+u,1.5*s+i,i,i,r);break;case 4:this.svg.polyline(y,r).transform({translate:[i/2,-i/2],rotate:[0,i/2,u/2]}),this.svg.polyline(y,r).transform({translate:[i/2,v- -i/2],rotate:[0,i/2,u/2],scale:[1,-1]});break;case 5:this.svg.polyline(y,r).transform({translate:[b-i/2,-i/2],rotate:[0,i/2,u/2],scale:[-1,1]}),this.svg.polyline(y,r).transform({translate:[b-i/2,v+i/2],rotate:[0,i/2,u/2],scale:[-1,-1]});break;case 6:this.svg.polyline(y,r).transform({translate:[b/2+i/2,s/2]});break;case 7:this.svg.polyline(y,r).transform({translate:[b-b/2-i/2,s/2],scale:[-1,1]});break;case 8:this.svg.polyline(y,r).transform({translate:[b/2+i/2,v-s/2],scale:[1,-1]});break;case 9:this.svg.polyline(y,r).transform({translate:[b-b/2-i/2,v-s/2],scale:[-1,-1]});break;case 10:this.svg.polyline(y,r).transform({translate:[i/2,v/2-i/2]});break;case 11:this.svg.polyline(y,r).transform({translate:[b-i/2,v/2-i/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,i,i,r).transform({translate:[i/2,i/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,i,i,r).transform({scale:[-1,1],translate:[i/2-b,i/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,i,i,r).transform({translate:[i/2,v/2-i/2-i],rotate:[30,0,i]});break;case 15:this.svg.rect(0,0,i,i,r).transform({scale:[-1,1],translate:[i/2-b,v/2-i/2-i],rotate:[30,0,i]});break;case 16:this.svg.rect(0,0,i,i,r).transform({scale:[1,-1],translate:[i/2,v/2-v-i/2-i],rotate:[30,0,i]});break;case 17:this.svg.rect(0,0,i,i,r).transform({scale:[-1,-1],translate:[i/2-b,v/2-v-i/2-i],rotate:[30,0,i]});break;case 18:this.svg.rect(0,0,i,i,r).transform({scale:[1,-1],translate:[i/2,i/2-v],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,i,i,r).transform({scale:[-1,-1],translate:[i/2-b,i/2-v],rotate:[-30,0,0]})}}},19673:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(80743);e.isNumeric=function(t){return!r.isArray(t)&&t-parseFloat(t)+1>=0}},19758:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});class r{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+r.version}static addUnaryOp(t){return r.max_unop_len=Math.max(t.length,r.max_unop_len),r.unary_ops[t]=1,r}static addBinaryOp(t,e,n){return r.max_binop_len=Math.max(t.length,r.max_binop_len),r.binary_ops[t]=e,n?r.right_associative.add(t):r.right_associative.delete(t),r}static addIdentifierChar(t){return r.additional_identifier_chars.add(t),r}static addLiteral(t,e){return r.literals[t]=e,r}static removeUnaryOp(t){return delete r.unary_ops[t],t.length===r.max_unop_len&&(r.max_unop_len=r.getMaxKeyLen(r.unary_ops)),r}static removeAllUnaryOps(){return r.unary_ops={},r.max_unop_len=0,r}static removeIdentifierChar(t){return r.additional_identifier_chars.delete(t),r}static removeBinaryOp(t){return delete r.binary_ops[t],t.length===r.max_binop_len&&(r.max_binop_len=r.getMaxKeyLen(r.binary_ops)),r.right_associative.delete(t),r}static removeAllBinaryOps(){return r.binary_ops={},r.max_binop_len=0,r}static removeLiteral(t){return delete r.literals[t],r}static removeAllLiterals(){return r.literals={},r}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new r(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(t=>t.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return r.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!r.binary_ops[String.fromCharCode(t)]||r.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return r.isIdentifierStart(t)||r.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(r.hooks[t]){const n={context:this,node:e};return r.hooks.run(t,n),n.node}return e}searchHook(t){if(r.hooks[t]){const e={context:this};return r.hooks[t].find(function(t){return t.call(e.context,e),e.node}),e.node}}gobbleSpaces(){let t=this.code;for(;t===r.SPACE_CODE||t===r.TAB_CODE||t===r.LF_CODE||t===r.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:r.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,n,o=[];for(;this.index<this.expr.length;)if(e=this.code,e===r.SEMCOL_CODE||e===r.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())o.push(n);else if(this.index<this.expr.length){if(e===t)break;this.throwError('Unexpected "'+this.char+'"')}return o}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,r.max_binop_len),e=t.length;for(;e>0;){if(r.binary_ops.hasOwnProperty(t)&&(!r.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!r.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=e,t;t=t.substr(0,--e)}return!1}gobbleBinaryExpression(){let t,e,n,o,i,s,a,u,c;if(s=this.gobbleToken(),!s)return s;if(e=this.gobbleBinaryOp(),!e)return s;for(i={value:e,prec:r.binaryPrecedence(e),right_a:r.right_associative.has(e)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+e),o=[s,i,a];e=this.gobbleBinaryOp();){if(n=r.binaryPrecedence(e),0===n){this.index-=e.length;break}i={value:e,prec:n,right_a:r.right_associative.has(e)},c=e;const u=t=>i.right_a&&t.right_a?n>t.prec:n<=t.prec;for(;o.length>2&&u(o[o.length-2]);)a=o.pop(),e=o.pop().value,s=o.pop(),t={type:r.BINARY_EXP,operator:e,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+c),o.push(i,t)}for(u=o.length-1,t=o[u];u>1;)t={type:r.BINARY_EXP,operator:o[u-1].value,left:o[u-2],right:t},u-=2;return t}gobbleToken(){let t,e,n,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(t=this.code,r.isDecimalDigit(t)||t===r.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===r.SQUOTE_CODE||t===r.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===r.OBRACK_CODE)o=this.gobbleArray();else{for(e=this.expr.substr(this.index,r.max_unop_len),n=e.length;n>0;){if(r.unary_ops.hasOwnProperty(e)&&(!r.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!r.isIdentifierPart(this.expr.charCodeAt(this.index+e.length)))){this.index+=n;const t=this.gobbleToken();return t||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:r.UNARY_EXP,operator:e,argument:t,prefix:!0})}e=e.substr(0,--n)}r.isIdentifierStart(t)?(o=this.gobbleIdentifier(),r.literals.hasOwnProperty(o.name)?o={type:r.LITERAL,value:r.literals[o.name],raw:o.name}:o.name===r.this_str&&(o={type:r.THIS_EXP})):t===r.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let e=this.code;for(;e===r.PERIOD_CODE||e===r.OBRACK_CODE||e===r.OPAREN_CODE||e===r.QUMARK_CODE;){let n;if(e===r.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==r.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),e=this.code}this.index++,e===r.OBRACK_CODE?((t={type:r.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),e=this.code,e!==r.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):e===r.OPAREN_CODE?t={type:r.CALL_EXP,arguments:this.gobbleArguments(r.CPAREN_CODE),callee:t}:(e===r.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:r.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),e=this.code}return t}gobbleNumericLiteral(){let t,e,n="";for(;r.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(this.code===r.PERIOD_CODE)for(n+=this.expr.charAt(this.index++);r.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(t=this.char,"e"===t||"E"===t){for(n+=this.expr.charAt(this.index++),t=this.char,"+"!==t&&"-"!==t||(n+=this.expr.charAt(this.index++));r.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);r.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")")}return e=this.code,r.isIdentifierStart(e)?this.throwError("Variable names cannot start with a number ("+n+this.char+")"):(e===r.PERIOD_CODE||1===n.length&&n.charCodeAt(0)===r.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:r.LITERAL,value:parseFloat(n),raw:n}}gobbleStringLiteral(){let t="";const e=this.index,n=this.expr.charAt(this.index++);let o=!1;for(;this.index<this.expr.length;){let e=this.expr.charAt(this.index++);if(e===n){o=!0;break}if("\\"===e)switch(e=this.expr.charAt(this.index++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=e}else t+=e}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:r.LITERAL,value:t,raw:this.expr.substring(e,this.index)}}gobbleIdentifier(){let t=this.code,e=this.index;for(r.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,r.isIdentifierPart(t));)this.index++;return{type:r.IDENTIFIER,name:this.expr.slice(e,this.index)}}gobbleArguments(t){const e=[];let n=!1,o=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let i=this.code;if(i===t){n=!0,this.index++,t===r.CPAREN_CODE&&o&&o>=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===r.COMMA_CODE){if(this.index++,o++,o!==e.length)if(t===r.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===r.CBRACK_CODE)for(let t=e.length;t<o;t++)e.push(null)}else if(e.length!==o&&0!==o)this.throwError("Expected comma");else{const t=this.gobbleExpression();t&&t.type!==r.COMPOUND||this.throwError("Expected comma"),e.push(t)}}return n||this.throwError("Expected "+String.fromCharCode(t)),e}gobbleGroup(){this.index++;let t=this.gobbleExpressions(r.CPAREN_CODE);if(this.code===r.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:r.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:r.ARRAY_EXP,elements:this.gobbleArguments(r.CBRACK_CODE)}}}const o=new class{add(t,e,n){if("string"!=typeof arguments[0])for(let t in arguments[0])this.add(t,arguments[0][t],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(t){this[t]=this[t]||[],e&&this[t][n?"unshift":"push"](e)},this)}run(t,e){this[t]=this[t]||[],this[t].forEach(function(t){t.call(e&&e.context?e.context:e,e)})}};Object.assign(r,{hooks:o,plugins:new class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(t=>{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)})}}(r),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),r.max_unop_len=r.getMaxKeyLen(r.unary_ops),r.max_binop_len=r.getMaxKeyLen(r.binary_ops);const i=t=>new r(t).parse(),s=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(r).filter(t=>!s.includes(t)&&void 0===i[t]).forEach(t=>{i[t]=r[t]}),i.Jsep=r;var a={name:"ternary",init(t){t.hooks.add("after-expression",function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const n=e.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&t.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&t.binary_ops[r.right.operator]<=.9;)r=r.right;e.node.test=r.right,r.right=e.node,e.node=n}}else this.throwError("Expected :")}})}};i.plugins.register(a)},20206:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(61758),o=n(14151);const i=r.A?function(t,e){return(0,r.A)(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:o.A;var s=Date.now;const a=(u=i,c=0,l=0,function(){var t=s(),e=16-(t-l);if(l=t,e>0){if(++c>=800)return arguments[0]}else c=0;return u.apply(void 0,arguments)});var u,c,l},20232:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(38513),o=n(49529);e.publishLast=function(){return function(t){return o.multicast(new r.AsyncSubject)(t)}}},20320:(t,e,n)=>{"use strict";n.d(e,{P:()=>r});var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},20328:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(63792),a=n(21016),u=n(24654),c=n(18860),l=n(43716),f=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=t.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=e<1?1:e,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new p(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new c.ObjectUnsubscribedError;if(this.isStopped||this.hasError?e=a.Subscription.EMPTY:(this.observers.push(t),e=new l.SubjectSubscription(this,t)),o&&t.add(t=new u.ObserveOnSubscriber(t,o)),n)for(var s=0;s<i&&!t.closed;s++)t.next(r[s]);else for(s=0;s<i&&!t.closed;s++)t.next(r[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||s.queue).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(t-r[i].time<n);)i++;return o>e&&(i=Math.max(i,o-e)),i>0&&r.splice(0,i),r},e}(i.Subject);e.ReplaySubject=f;var p=function(t,e){this.time=t,this.value=e}},20367:(t,e,n)=>{"use strict";n.d(e,{$f:()=>m,QE:()=>D,g$:()=>j,IU:()=>d,HW:()=>O,xC:()=>A,Kx:()=>k,EW:()=>x,L7:()=>I,Gm:()=>b,lo:()=>v,ut:()=>g,yH:()=>E,Jj:()=>h,Ct:()=>y,eA:()=>_,Gp:()=>C,E4:()=>S,Fi:()=>T,Y0:()=>M,st:()=>P});var r=n(60937),o=n(22337);const i=function(t){return void 0===t};var s=n(87635),a=n(78938),u=n(95819),c=n(11305);const l="${openmrsSpaBase}/login",f={redirectAuthFailure:{enabled:{_type:u.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:u.ZU.String,_default:l,_validators:[u.y$.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:u.ZU.Array,_default:[401],_elements:{_type:u.ZU.Number,_validators:[u.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:u.ZU.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."}},followRedirects:{_type:u.ZU.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const h="/ws/rest/v1",d="/ws/fhir2/R4",y=`${h}/session`;function b(t){return t&&t.startsWith("http")?t:("/"!==t[0]&&(t="/"+t),window.openmrsBase+t)}function v(t,e={}){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.");let n=b(t);if(e.headers||(e.headers={}),(0,a.A)(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,t.startsWith(h)&&void 0===e.headers["Disable-WWW-Authenticate"]&&(e.headers["Disable-WWW-Authenticate"]="true"),t.startsWith(d)){const t=new URL(n,window.location.toString());t.searchParams.has("_summary")||(t.searchParams.set("_summary","data"),n=t.toString())}const r=Error();return window.fetch(n,e).then(async t=>{const e=t,{redirectAuthFailure:o,followRedirects:i}=await(0,u.zj)("@openmrs/esm-api");if(e.ok){if(204===e.status){if(i&&e.headers.has("location")){const t=e.headers.get("location");t&&(0,c.oo)({to:t})}return e.data=null,e}return e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(t){}return e})}if(n===b(y)&&403===e.status||o.enabled&&o.errors.includes(e.status)){(0,c.g4)();const t=o.url||e.headers.get("location")||l;return(0,c.oo)({to:t}),o.resolvePromise?Promise.resolve():new Promise(()=>{})}return e.clone().text().then(t=>{let o=t;try{o=JSON.parse(t)}catch(t){}throw new m(n,e,o,r)},t=>{throw new m(n,e,null,r)})})}function g(t,e={}){if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return e.signal=n.signal,new s.c(r=>{let o=!1;return v(t,e).then(t=>{o=!0,r.next(t),r.complete()},t=>{o=!0,r.error(t)}),()=>{o||n.abort()}})}class m extends Error{constructor(t,e,n,r){super(),p(this,"response",void 0),p(this,"responseBody",void 0),this.message=`Server responded with ${e.status} (${e.statusText}) for url ${t}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=e,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const _=(0,o.Zd)("session",{loaded:!1,session:null});let w=0;function O(t={includeAuthStatus:!0}){return(w<Date.now()-6e4||!_.getState().loaded)&&E(),new s.c(e=>{const n=n=>{n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(n.session?.user))};return n(_.getState()),_.subscribe(n)})}function x(){return(w<Date.now()-6e4||!_.getState().loaded)&&E(),_}function S(t){let e=t.user?.userProperties?.defaultLocale??t.locale;e&&e.includes("_")&&(e=e.replaceAll("_","-")),function(t){if(void 0===t||"string"!=typeof t)return!1;try{new Intl.Locale(t)}catch(t){return!1}return!0}(e)&&e!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",e)}function E(t,e){w=Date.now();let n={};return t&&e&&(n.Authorization=`Basic ${window.btoa(`${t}:${e}`)}`),N(v(y,{headers:n}))}function j(){_.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function P(t,e){return void 0===e?Boolean(t):!Boolean(t)||function(t,e){return"string"==typeof t?!i(e.privileges.find(e=>t===e.display)):Array.isArray(t)?t.every(t=>!i(e.privileges.find(e=>t===e.display))):(i(t)||console.error(`Could not understand privileges "${t}"`),!0)}(t,e)||function(t){return!i(t.roles.find(t=>"System Developer"===t.display))}(e)}function A(){let t,e;return new Promise(n=>{const r=r=>{r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};r(_.getState()),t||(e=_.subscribe(r))})}function k(){return new Promise((t,e)=>{O().subscribe(e=>{t(e.sessionLocation)},e).unsubscribe()})}async function C(t,e){return N(v(y,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:e.signal}))}async function T(t,e,n){return n||(n=new AbortController),await v(`${h}/user/${t}`,{method:"POST",body:{userProperties:e},headers:{"Content-Type":"application/json"},signal:n.signal}),E()}function N(t){return new Promise((e,n)=>{t.then(t=>{let r;"object"==typeof t?.data?(r={loaded:!0,session:t.data},_.setState(r),e(r)):(r={loaded:!1,session:null},_.setState(r),n(r))}).catch(t=>{(0,r.N)(`Failed to fetch new session information: ${t}`);const e={loaded:!1,session:null};_.setState(e),n(e)})})}function I(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}_.subscribe(t=>{t.loaded&&t.session&&S(t.session)});const D={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function M(){(0,u.T0)("@openmrs/esm-api",f),E()}},20917:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(89233),s=n(85295),a=n(75901);e.switchMap=function t(e,n){return"function"==typeof n?function(r){return r.pipe(t(function(t,r){return s.from(e(t,r)).pipe(i.map(function(e,o){return n(t,e,r,o)}))}))}:function(t){return t.lift(new u(e))}};var u=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return o(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e)},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new a.SimpleInnerSubscriber(this),r=this.destination;r.add(n),this.innerSubscription=a.innerSubscribe(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t){this.destination.next(t)},e}(a.SimpleOuterSubscriber)},21016:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(80743),o=n(6727),i=n(84864),s=n(11806),a=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this,a=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,f=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof t)a.remove(this);else if(null!==a)for(var p=0;p<a.length;++p)a[p].remove(this);if(i.isFunction(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(t){e=t instanceof s.UnsubscriptionError?u(t.errors):[t]}}if(r.isArray(f)){p=-1;for(var h=f.length;++p<h;){var d=f[p];if(o.isObject(d))try{d.unsubscribe()}catch(t){e=e||[],t instanceof s.UnsubscriptionError?e=e.concat(u(t.errors)):e.push(t)}}}if(e)throw new s.UnsubscriptionError(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function u(t){return t.reduce(function(t,e){return t.concat(e instanceof s.UnsubscriptionError?e.errors:e)},[])}e.Subscription=a},21226:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(77759);e.canReportError=function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&o instanceof r.Subscriber?o:null}return!0}},21324:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20917),o=n(78522);e.switchAll=function(){return r.switchMap(o.identity)}},21547:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(71929);e.min=function(t){var e="function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e};return r.reduce(e)}},22244:(t,e,n)=>{"use strict";n.d(e,{AG:()=>Et,EH:()=>rt,fz:()=>Tt,xL:()=>F});var r=Object.freeze({__proto__:null,get start(){return Ut},get ensureJQuerySupport(){return ht},get setBootstrapMaxTime(){return H},get setMountMaxTime(){return Y},get setUnmountMaxTime(){return G},get setUnloadMaxTime(){return J},get registerApplication(){return Et},get unregisterApplication(){return Pt},get getMountedApps(){return wt},get getAppStatus(){return xt},get unloadApplication(){return At},get checkActivityFunctions(){return jt},get getAppNames(){return Ot},get pathToActiveWhen(){return Tt},get navigateToUrl(){return rt},get patchHistoryApi(){return lt},get triggerAppChange(){return Mt},get addErrorHandler(){return u},get removeErrorHandler(){return c},get mountRootParcel(){return F},get NOT_LOADED(){return p},get LOADING_SOURCE_CODE(){return h},get NOT_BOOTSTRAPPED(){return d},get BOOTSTRAPPING(){return y},get NOT_MOUNTED(){return b},get MOUNTING(){return v},get UPDATING(){return m},get LOAD_ERROR(){return O},get MOUNTED(){return g},get UNLOADING(){return w},get UNMOUNTING(){return _},get SKIP_BECAUSE_BROKEN(){return x}}),o=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,i=function(){try{var t=new o("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?o:"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};let s=[];function a(t,e,n){const r=f(t,e,n);s.length?s.forEach(t=>t(r)):setTimeout(()=>{throw r})}function u(t){if("function"!=typeof t)throw Error(l(28,!1));s.push(t)}function c(t){if("function"!=typeof t)throw Error(l(29,!1));let e=!1;return s=s.filter(n=>{const r=n===t;return e=e||r,!r}),e}function l(t,e,...n){return`single-spa minified message #${t}: ${e?e+" ":""}See https://single-spa.js.org/error/?code=${t}${n.length?`&arg=${n.join("&arg=")}`:""}`}function f(t,e,n){const r=`${A(e)} '${j(e)}' died in status ${e.status}: `;let o;if(t instanceof Error){try{t.message=r+t.message}catch(t){}o=t}else{console.warn(l(30,!1,e.status,j(e)));try{o=Error(r+JSON.stringify(t))}catch(e){o=t}}return o.appOrParcelName=j(e),e.status=n,o}const p="NOT_LOADED",h="LOADING_SOURCE_CODE",d="NOT_BOOTSTRAPPED",y="BOOTSTRAPPING",b="NOT_MOUNTED",v="MOUNTING",g="MOUNTED",m="UPDATING",_="UNMOUNTING",w="UNLOADING",O="LOAD_ERROR",x="SKIP_BECAUSE_BROKEN";function S(t){return t.status===g}function E(t){try{return t.activeWhen(window.location)}catch(e){return a(e,t,x),!1}}function j(t){return t.name}function P(t){return Boolean(t.unmountThisParcel)}function A(t){return P(t)?"parcel":"application"}function k(){for(let t=arguments.length-1;t>0;t--)for(let e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]}function C(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return t[n];return null}function T(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!C(e,t=>"function"!=typeof t)));var e}function N(t,e){let n=t[e]||[];n=Array.isArray(n)?n:[n],0===n.length&&(n=[()=>Promise.resolve()]);const r=A(t),o=j(t);return function(t){return n.reduce((n,i,s)=>n.then(()=>{const n=i(t);return I(n)?n:Promise.reject(l(15,!1,r,o,e,s))}),Promise.resolve())}}function I(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}let D=[];function M(t,e){return Promise.resolve().then(()=>t.status!==d?t:(t.status=y,t.bootstrap?X(t,"bootstrap").then(n).catch(n=>{if(e)throw f(n,t,x);return a(n,t,x),t}):Promise.resolve().then(n)));function n(){return t.status=b,t}}function R(t,e){return Promise.resolve().then(()=>{if(t.status!==g)return t;t.status=_;const n=Object.keys(t.parcels).map(e=>t.parcels[e].unmountThisParcel());return Promise.all(n).then(r,n=>r().then(()=>{const r=Error(n.message);if(e)throw f(r,t,x);a(r,t,x)})).then(()=>t);function r(){return X(t,"unmount").then(()=>{t.status=b},n=>{if(e)throw f(n,t,x);a(n,t,x)})}})}let L=!1,$=!1;function U(t,e){return Promise.resolve().then(()=>t.status!==b?t:(L||(window.dispatchEvent(new i("single-spa:before-first-mount")),L=!0),t.status=v,X(t,"mount").then(()=>(t.status=g,$||(window.dispatchEvent(new i("single-spa:first-mount")),$=!0),t)).catch(n=>{return t.status=g,R(t,!0).then(r,r);function r(){if(e)throw f(n,t,x);return a(n,t,x),t}})))}let B=0;const V={parcels:{}};function F(){return K.apply(V,arguments)}function K(t,e){const n=this;if(!t||"object"!=typeof t&&"function"!=typeof t)throw Error(l(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(l(3,!1,typeof t.name));const r=B++;let o=t.name||`parcel-${r}`;if("object"!=typeof e)throw Error(l(4,!1,o,typeof e));if(!e.domElement)throw Error(l(5,!1,o));const i="function"==typeof t,s=i?t:()=>Promise.resolve(t),a={id:r,parcels:{},status:i?h:d,customProps:e,parentName:j(n),unmountThisParcel:()=>y.then(()=>{if(a.status!==g)throw Error(l(6,!1,o,a.status));return R(a,!0)}).then(t=>(a.parentName&&delete n.parcels[a.id],t)).then(t=>(v(t),t)).catch(t=>{throw a.status=x,_(t),t})};let u;n.parcels[r]=a;let c=s();if(!c||"function"!=typeof c.then)throw Error(l(7,!1));c=c.then(t=>{if(!t)throw Error(l(8,!1));if(o=t.name||`parcel-${r}`,Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!T(t.bootstrap))throw Error(l(9,!1,o));if(!T(t.mount))throw Error(l(10,!1,o));if(!T(t.unmount))throw Error(l(11,!1,o));if(t.update&&!T(t.update))throw Error(l(12,!1,o));const e=N(t,"bootstrap"),n=N(t,"mount"),i=N(t,"unmount");a.status=d,a.name=o,a.bootstrap=e,a.mount=n,a.unmount=i,a.timeouts=Q(t.timeouts),t.update&&(a.update=N(t,"update"),u.update=function(t){return a.customProps=t,W((e=a,Promise.resolve().then(()=>{if(e.status!==g)throw Error(l(32,!1,j(e)));return e.status=m,X(e,"update").then(()=>(e.status=g,e)).catch(t=>{throw f(t,e,x)})})));var e})});const p=c.then(()=>M(a,!0)),y=p.then(()=>U(a,!0));let v,_;const w=new Promise((t,e)=>{v=t,_=e});return u={mount:()=>W(Promise.resolve().then(()=>{if(a.status!==b)throw Error(l(13,!1,o,a.status));return n.parcels[r]=a,U(a)})),unmount:()=>W(a.unmountThisParcel()),getStatus:()=>a.status,loadPromise:W(c),bootstrapPromise:W(p),mountPromise:W(y),unmountPromise:W(w)},u}function W(t){return t.then(()=>null)}function z(t){const e=j(t);let n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(l(40,!1),e,n));const o=k({},n,{name:e,mountParcel:K.bind(t),singleSpa:r});return P(t)&&(o.unmountSelf=t.unmountThisParcel),o}const q={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}};function H(t,e,n){if("number"!=typeof t||t<=0)throw Error(l(16,!1));q.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function Y(t,e,n){if("number"!=typeof t||t<=0)throw Error(l(17,!1));q.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function G(t,e,n){if("number"!=typeof t||t<=0)throw Error(l(18,!1));q.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function J(t,e,n){if("number"!=typeof t||t<=0)throw Error(l(19,!1));q.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function X(t,e){const n=t.timeouts[e],r=n.warningMillis,o=A(t);return new Promise((i,s)=>{let a=!1,u=!1;t[e](z(t)).then(t=>{a=!0,i(t)}).catch(t=>{a=!0,s(t)}),setTimeout(()=>f(1),r),setTimeout(()=>f(!0),n.millis);const c=l(31,!1,e,o,j(t),n.millis);function f(t){if(!a)if(!0===t)u=!0,n.dieOnTimeout?s(Error(c)):console.error(c);else if(!u){const e=t,o=e*r;console.warn(c),o+r<n.millis&&setTimeout(()=>f(e+1),r)}}})}function Q(t){const e={};for(let n in q)e[n]=k({},q[n],t&&t[n]||{});return e}function Z(t){return Promise.resolve().then(()=>{if(t.loadPromise)return t.loadPromise;if(t.status!==p&&t.status!==O)return t;let e,n;return t.status=h,t.loadPromise=Promise.resolve().then(()=>{const r=t.loadApp(z(t));if(!I(r))throw n=!0,Error(l(33,!1,j(t)));return r.then(n=>{let r;t.loadErrorTime=null,e=n,"object"!=typeof e&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!T(e.bootstrap)&&(r=35),T(e.mount)||(r=36),T(e.unmount)||(r=37);const o=A(e);if(r){let n;try{n=JSON.stringify(e)}catch(t){}return console.error(l(r,!1,o,j(t),n),e),a(void 0,t,x),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=k({},t.devtools.overlays,e.devtools.overlays)),t.status=d,t.bootstrap=N(e,"bootstrap"),t.mount=N(e,"mount"),t.unmount=N(e,"unmount"),t.unload=N(e,"unload"),t.timeouts=Q(e.timeouts),delete t.loadPromise,t})}).catch(e=>{let r;return delete t.loadPromise,n?r=x:(r=O,t.loadErrorTime=(new Date).getTime()),a(e,t,r),t})})}const tt="undefined"!=typeof window,et={hashchange:[],popstate:[]},nt=["hashchange","popstate"];function rt(t){let 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(l(14,!1));e=t.currentTarget.href,t.preventDefault()}const n=ft(window.location.href),r=ft(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)}function ot(t){if(t){const e=t[0].type;nt.indexOf(e)>=0&&et[e].forEach(e=>{try{e.apply(this,t)}catch(t){setTimeout(()=>{throw t})}})}}let it;function st(){Rt([],arguments)}function at(t,e){return function(){const n=window.location.href,r=t.apply(this,arguments),o=window.location.href;return it&&n===o||window.dispatchEvent(function(t,e){let n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){n=document.createEvent("PopStateEvent"),n.initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n}(window.history.state,e)),r}}let ut=null,ct=!1;function lt(t){if(ct)throw Error(l(43,!1));it=!t||!t.hasOwnProperty("urlRerouteOnly")||t.urlRerouteOnly,ct=!0,ut=window.history.replaceState,window.addEventListener("hashchange",st),window.addEventListener("popstate",st);const e=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&nt.indexOf(t)>=0)||C(et[t],t=>t===n))return e.apply(this,arguments);et[t].push(n)},window.removeEventListener=function(t,e){return"function"==typeof e&&nt.indexOf(t)>=0&&(et[t]=et[t].filter(t=>t!==e)),n.apply(this,arguments)},window.history.pushState=at(window.history.pushState,"pushState"),window.history.replaceState=at(ut,"replaceState")}function ft(t){const e=document.createElement("a");return e.href=t,e}tt&&(window.singleSpaNavigate?console.warn(l(41,!1)):window.singleSpaNavigate=rt);let pt=!1;function ht(t=window.jQuery){if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!pt){const e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return dt.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return dt.call(this,n,window.removeEventListener,t,e,arguments)},pt=!0}}function dt(t,e,n,r,o){return"string"!=typeof n?t.apply(this,o):(n.split(/\s+/).forEach(t=>{nt.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))}),""===n.trim()?this:t.apply(this,o))}const yt={};function bt(t){return Promise.resolve().then(()=>{const e=yt[j(t)];if(!e)return t;if(t.status===p)return vt(t,e),t;if(t.status===w)return e.promise.then(()=>t);if(t.status!==b&&t.status!==O)return t;const n=t.status===O?Promise.resolve():X(t,"unload");return t.status=w,n.then(()=>(vt(t,e),t)).catch(n=>(function(t,e,n){delete yt[j(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,a(n,t,x),e.reject(n)}(t,e,n),t))})}function vt(t,e){delete yt[j(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=p,e.resolve()}function gt(t,e,n,r){yt[j(t)]={app:t,resolve:n,reject:r},Object.defineProperty(yt[j(t)],"promise",{get:e})}function mt(t){return yt[t]}const _t=[];function wt(){return _t.filter(S).map(j)}function Ot(){return _t.map(j)}function xt(t){const e=C(_t,e=>j(e)===t);return e?e.status:null}let St=!1;function Et(t,e,n,r){const o=function(t,e,n,r){const o={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof t?(function(t){if(Array.isArray(t)||null===t)throw Error(l(39,!1));const e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((t,n)=>e.indexOf(n)>=0?t:t.concat(n),[]);if(0!==n.length)throw Error(l(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(l(20,!1));if("object"!=typeof t.app&&"function"!=typeof t.app)throw Error(l(20,!1));const r=t=>"string"==typeof t||"function"==typeof t;if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(l(24,!1));if(!Ct(t.customProps))throw Error(l(22,!1))}(t),o.name=t.name,o.loadApp=t.app,o.activeWhen=t.activeWhen,o.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(l(20,!1));if(!e)throw Error(l(23,!1));if("function"!=typeof n)throw Error(l(24,!1));if(!Ct(r))throw Error(l(22,!1))}(t,e,n,r),o.name=t,o.loadApp=e,o.activeWhen=n,o.customProps=r),o.loadApp="function"!=typeof(i=o.loadApp)?()=>Promise.resolve(i):i,o.customProps=function(t){return t||{}}(o.customProps),o.activeWhen=function(t){let e=Array.isArray(t)?t:[t];return e=e.map(t=>"function"==typeof t?t:Tt(t)),t=>e.some(e=>e(t))}(o.activeWhen),o;var i}(t,e,n,r);if(Bt()||St||(St=!0,setTimeout(()=>{Bt()||console.warn(l(1,!1))},5e3)),-1!==Ot().indexOf(o.name))throw Error(l(21,!1,o.name));_t.push(k({loadErrorTime:null,status:p,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),tt&&(ht(),Rt())}function jt(t=window.location){return _t.filter(e=>e.activeWhen(t)).map(j)}function Pt(t){if(0===_t.filter(e=>j(e)===t).length)throw Error(l(25,!1,t));return(tt?At(t,{waitForUnmount:!1}):Promise.resolve()).then(()=>{const e=_t.map(j).indexOf(t);_t.splice(e,1)})}function At(t,e={waitForUnmount:!1}){if("string"!=typeof t)throw Error(l(26,!1));const n=C(_t,e=>j(e)===t);if(!n)throw Error(l(27,!1,t));const r=mt(j(n));if(e&&e.waitForUnmount){if(r)return r.promise;{const t=new Promise((e,r)=>{gt(n,()=>t,e,r)});return t}}{let t;return r?(t=r.promise,kt(n,r.resolve,r.reject)):t=new Promise((e,r)=>{gt(n,()=>t,e,r),kt(n,e,r)}),t}}function kt(t,e,n){Promise.resolve().then(()=>{if(C(jt(),e=>e===j(t)))return Mt()}).then(()=>R(t).then(bt).then(()=>{e(),setTimeout(()=>{Rt()})})).catch(n)}function Ct(t){return!t||"function"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)}function Tt(t,e){const n=function(t,e){let n=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(let e=0;e<t.length;e++){const n=t[e];(!r&&":"===n||r&&"/"===n)&&i(e)}return i(t.length),new RegExp(o,"i");function i(i){const s=t.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":s,i===t.length)if(r)e&&(o+="$");else{const t=e?"":".*";o="/"===o.charAt(o.length-1)?`${o}${t}$`:`${o}(/${t})?(#.*)?$`}r=!r,n=i}}(t,e);return t=>{let e=t.origin;e||(e=`${t.protocol}//${t.host}`);const r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}}let Nt=!1,It=[],Dt=tt&&window.location.href;function Mt(){return Rt()}function Rt(t=[],e,n=!1){if(Nt)return new Promise((t,n)=>{It.push({resolve:t,reject:n,eventArguments:e})});const{appsToUnload:r,appsToUnmount:o,appsToLoad:s,appsToMount:a}=function(){const t=[],e=[],n=[],r=[],o=(new Date).getTime();return _t.forEach(i=>{const s=i.status!==x&&E(i);switch(i.status){case O:s&&o-i.loadErrorTime>=200&&n.push(i);break;case p:case h:s&&n.push(i);break;case d:case b:!s&&mt(j(i))?t.push(i):s&&r.push(i);break;case g:s||e.push(i)}}),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}}();let u,c=[],f=Dt,y=Dt=window.location.href;return Bt()?(Nt=!0,u=r.concat(s,o,a),Promise.resolve().then(()=>(S(0===u.length?"before-no-app-change":"before-app-change",w(!0)),S("before-routing-event",w(!0,{cancelNavigation:v})),Promise.all(c).then(n=>{if(n.some(t=>t))return ut.call(window.history,history.state,"",f.substring(location.origin.length)),Dt=location.href,Nt=!1,Rt(t,e,!0);const i=r.map(bt),u=o.map(R).map(t=>t.then(bt)).concat(i),c=Promise.all(u);c.then(()=>{S("before-mount-routing-event",w(!0))},t=>{throw t});const l=s.map(t=>Z(t).then(t=>Lt(t,c))),p=a.filter(t=>s.indexOf(t)<0).map(t=>Lt(t,c));return c.catch(t=>{throw _(),t}).then(()=>(_(),Promise.all(l.concat(p)).catch(e=>{throw t.forEach(t=>t.reject(e)),e}).then(m).then(()=>{},t=>{throw t})))})))):(u=s,Promise.resolve().then(()=>{const t=s.map(Z);return Promise.all(t).then(_).then(()=>[]).catch(t=>{throw _(),t}).finally(()=>{})}));function v(t=!0){const e="function"==typeof(null==t?void 0:t.then)?t:Promise.resolve(t);c.push(e.catch(t=>(console.warn(Error(l(42,!1))),console.warn(t),!1)))}function m(){const e=wt();t.forEach(t=>t.resolve(e));try{S(0===u.length?"no-app-change":"app-change",w()),S("routing-event",w())}catch(t){setTimeout(()=>{throw t})}if(Nt=!1,It.length>0){const t=It;It=[],Rt(t)}return e}function _(){n||(t.forEach(t=>{ot(t.eventArguments)}),ot(e))}function w(t=!1,n){const i={},c={[g]:[],[b]:[],[p]:[],[x]:[]};t?(s.concat(a).forEach((t,e)=>{h(t,g)}),r.forEach(t=>{h(t,p)}),o.forEach(t=>{h(t,b)})):u.forEach(t=>{h(t)});const l={detail:{newAppStatuses:i,appsByNewStatus:c,totalAppChanges:u.length,originalEvent:null==e?void 0:e[0],oldUrl:f,newUrl:y}};return n&&k(l.detail,n),l;function h(t,e){const n=j(t);e=e||xt(n),i[n]=e,(c[e]=c[e]||[]).push(n)}}function S(t,e){n||window.dispatchEvent(new i(`single-spa:${t}`,e))}}function Lt(t,e){return E(t)?M(t).then(t=>e.then(()=>E(t)?U(t):t)):e.then(()=>t)}let $t=!1;function Ut(t){$t=!0,tt&&(lt(t),Rt())}function Bt(){return $t}var Vt={getRawAppData:function(){return[..._t]},reroute:Rt,NOT_LOADED:p,toLoadPromise:Z,toBootstrapPromise:M,unregisterApplication:Pt,getProfilerData:function(){return D}};tt&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Vt)},22337:(t,e,n)=>{"use strict";n.d(e,{Zd:()=>s,jf:()=>u,CE:()=>a,i7:()=>c});var r=n(27388),o=n(43132);const i={};function s(t,e){const n=i[t];if(n)return n.active?console.error(`Attempted to override the existing store ${t}. Make sure that stores are only created once.`):n.value.setState(e,!0),n.active=!0,n.value;{const n=(0,o.y)()(()=>e);return i[t]={value:n,active:!0},n}}function a(t,e){const n=i[t];return n?(n.active?console.error(`Attempted to override the existing store ${t}. Make sure that stores are only created once.`):n.value=e,n.active=!0,n.value):(i[t]={value:e,active:!0},e)}function u(t,e){const n=i[t];if(!n){const n=(0,o.y)()(()=>e??{});return i[t]={value:n,active:!1},n}return n.value}function c(...t){const[e,n,o]=t,i=void 0===o?n:o,s=void 0===o?t=>t:n;return i(s(e.getState())),e.subscribe((t,e)=>{const n=s(t);(0,r.b)(e,n)||i(n)})}setTimeout(()=>{window&&"development"===window.spaEnv&&(window.stores=i)},1e3)},22363:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(75901);e.window=function(t){return function(e){return e.lift(new a(t))}};var a=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new u(t),r=e.subscribe(n);return r.closed||n.add(s.innerSubscribe(this.windowBoundaries,new s.SimpleInnerSubscriber(n))),r},t}(),u=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new i.Subject,e.next(n.window),n}return o(e,t),e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new i.Subject;e.next(n)},e}(s.SimpleOuterSubscriber)},23184:(t,e,n)=>{"use strict";n.d(e,{$3:()=>b,FI:()=>d,LQ:()=>y,Vt:()=>v,Yt:()=>o,bJ:()=>g,bK:()=>m,dX:()=>_,ff:()=>c,gj:()=>i,ls:()=>w,pc:()=>u,sT:()=>s});const r="openmrs:connectivity-changed";function o(t){window.dispatchEvent(new CustomEvent(r,{detail:{online:t}}))}function i(t){if(!window.offlineEnabled)return()=>{};const e=e=>t(e.detail);return window.addEventListener(r,e),()=>window.removeEventListener(r,e)}function s(t){return t({online:!window.offlineEnabled||navigator.onLine}),i(t)}const a="openmrs:precache-static-dependencies";function u(t={}){window.dispatchEvent(new CustomEvent(a,{detail:t}))}function c(t){const e=e=>t(e.detail);return window.addEventListener(a,e),()=>window.removeEventListener(a,e)}const l="openmrs:notification-shown",f="openmrs:actionable-notification-shown",p="openmrs:toast-shown",h="openmrs:snack-bar-shown";function d(t){window.dispatchEvent(new CustomEvent(l,{detail:t}))}function y(t){window.dispatchEvent(new CustomEvent(f,{detail:t}))}function b(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))}function v(t){window.dispatchEvent(new CustomEvent(p,{detail:t}))}function g(t){const e=e=>t(e.detail);return window.addEventListener(l,e),()=>window.removeEventListener(l,e)}function m(t){const e=e=>t(e.detail);return window.addEventListener(f,e),()=>window.removeEventListener(f,e)}function _(t){const e=e=>t(e.detail);return window.addEventListener(p,e),()=>window.removeEventListener(p,e)}function w(t){const e=e=>t(e.detail);return window.addEventListener(h,e),()=>window.removeEventListener(h,e)}},23464:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",o="minute",i="hour",s="day",a="week",u="month",c="quarter",l="year",f="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},b=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:b,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+b(r,2,"0")+":"+b(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,u),i=n-o<0,s=e.clone().add(r+(i?-1:1),u);return+(-(r+(n-o)/(i?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:l,w:a,d:s,D:f,h:i,m:o,s:r,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",m={};m[g]=y;var _="$isDayjsObject",w=function(t){return t instanceof E||!(!t||!t[_])},O=function t(e,n,r){var o;if(!e)return g;if("string"==typeof e){var i=e.toLowerCase();m[i]&&(o=i),n&&(m[i]=n,o=i);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var a=e.name;m[a]=e,o=a}return!r&&o&&(g=o),o||!r&&g},x=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new E(n)},S=v;S.l=O,S.i=w,S.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E=function(){function y(t){this.$L=O(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var b=y.prototype;return b.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.init()},b.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()},b.$utils=function(){return S},b.isValid=function(){return!(this.$d.toString()===p)},b.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},b.isAfter=function(t,e){return x(t)<this.startOf(e)},b.isBefore=function(t,e){return this.endOf(e)<x(t)},b.$g=function(t,e,n){return S.u(t)?this[e]:this.set(n,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,e){var n=this,c=!!S.u(e)||e,p=S.p(t),h=function(t,e){var r=S.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?r:r.endOf(s)},d=function(t,e){return S.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,b=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(p){case l:return c?h(1,0):h(31,11);case u:return c?h(1,b):h(0,b+1);case a:var m=this.$locale().weekStart||0,_=(y<m?y+7:y)-m;return h(c?v-_:v+(6-_),b);case s:case f:return d(g+"Hours",0);case i:return d(g+"Minutes",1);case o:return d(g+"Seconds",2);case r:return d(g+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var a,c=S.p(t),p="set"+(this.$u?"UTC":""),h=(a={},a[s]=p+"Date",a[f]=p+"Date",a[u]=p+"Month",a[l]=p+"FullYear",a[i]=p+"Hours",a[o]=p+"Minutes",a[r]=p+"Seconds",a[n]=p+"Milliseconds",a)[c],d=c===s?this.$D+(e-this.$W):e;if(c===u||c===l){var y=this.clone().set(f,1);y.$d[h](d),y.init(),this.$d=y.set(f,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](d);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[S.p(t)]()},b.add=function(n,c){var f,p=this;n=Number(n);var h=S.p(c),d=function(t){var e=x(p);return S.w(e.date(e.date()+Math.round(t*n)),p)};if(h===u)return this.set(u,this.$M+n);if(h===l)return this.set(l,this.$y+n);if(h===s)return d(1);if(h===a)return d(7);var y=(f={},f[o]=t,f[i]=e,f[r]=1e3,f)[h]||1,b=this.$d.getTime()+n*y;return S.w(b,this)},b.subtract=function(t,e){return this.add(-1*t,e)},b.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=S.z(this),i=this.$H,s=this.$m,a=this.$M,u=n.weekdays,c=n.months,l=n.meridiem,f=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].slice(0,i)},h=function(t){return S.s(i%12||12,t,"0")},y=l||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(d,function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return S.s(e.$y,4,"0");case"M":return a+1;case"MM":return S.s(a+1,2,"0");case"MMM":return f(n.monthsShort,a,c,3);case"MMMM":return f(c,a);case"D":return e.$D;case"DD":return S.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(n.weekdaysMin,e.$W,u,2);case"ddd":return f(n.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(i);case"HH":return S.s(i,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return y(i,s,!0);case"A":return y(i,s,!1);case"m":return String(s);case"mm":return S.s(s,2,"0");case"s":return String(e.$s);case"ss":return S.s(e.$s,2,"0");case"SSS":return S.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(n,f,p){var h,d=this,y=S.p(f),b=x(n),v=(b.utcOffset()-this.utcOffset())*t,g=this-b,m=function(){return S.m(d,b)};switch(y){case l:h=m()/12;break;case u:h=m();break;case c:h=m()/3;break;case a:h=(g-v)/6048e5;break;case s:h=(g-v)/864e5;break;case i:h=g/e;break;case o:h=g/t;break;case r:h=g/1e3;break;default:h=g}return p?h:S.a(h)},b.daysInMonth=function(){return this.endOf(u).$D},b.$locale=function(){return m[this.$L]},b.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=O(t,e,!0);return r&&(n.$L=r),n},b.clone=function(){return S.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},y}(),j=E.prototype;return x.prototype=j,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",s],["$M",u],["$y",l],["$D",f]].forEach(function(t){j[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),x.extend=function(t,e){return t.$i||(t(e,E,x),t.$i=!0),x},x.locale=O,x.isDayjs=w,x.unix=function(t){return x(1e3*t)},x.en=m[g],x.Ls=m,x.p={},x}()},23517:(t,e,n)=>{"use strict";n.d(e,{A:()=>k});var r=n(39791),o=n(29240);function i(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new o.A;++e<n;)this.add(t[e])}i.prototype.add=i.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},i.prototype.has=function(t){return this.__data__.has(t)};const s=i,a=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},u=function(t,e,n,r,o,i){var u=1&n,c=t.length,l=e.length;if(c!=l&&!(u&&l>c))return!1;var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var h=-1,d=!0,y=2&n?new s:void 0;for(i.set(t,e),i.set(e,t);++h<c;){var b=t[h],v=e[h];if(r)var g=u?r(v,b,h,e,t,i):r(b,v,h,t,e,i);if(void 0!==g){if(g)continue;d=!1;break}if(y){if(!a(e,function(t,e){if(s=e,!y.has(s)&&(b===t||o(b,t,n,r,i)))return y.push(e);var s})){d=!1;break}}else if(b!==v&&!o(b,v,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d};var c=n(83516),l=n(97913),f=n(26979);const p=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n},h=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n};var d=c.A?c.A.prototype:void 0,y=d?d.valueOf:void 0;var b=n(2475),v=Object.prototype.hasOwnProperty;var g=n(26781),m=n(96956),_=n(15821),w=n(17283),O="[object Arguments]",x="[object Array]",S="[object Object]",E=Object.prototype.hasOwnProperty;const j=function(t,e,n,o,i,s){var a=(0,m.A)(t),c=(0,m.A)(e),d=a?x:(0,g.A)(t),j=c?x:(0,g.A)(e),P=(d=d==O?S:d)==S,A=(j=j==O?S:j)==S,k=d==j;if(k&&(0,_.A)(t)){if(!(0,_.A)(e))return!1;a=!0,P=!1}if(k&&!P)return s||(s=new r.A),a||(0,w.A)(t)?u(t,e,n,o,i,s):function(t,e,n,r,o,i,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new l.A(t),new l.A(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.A)(+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=p;case"[object Set]":var c=1&r;if(a||(a=h),t.size!=e.size&&!c)return!1;var d=s.get(t);if(d)return d==e;r|=2,s.set(t,e);var b=u(a(t),a(e),r,o,i,s);return s.delete(t),b;case"[object Symbol]":if(y)return y.call(t)==y.call(e)}return!1}(t,e,d,n,o,i,s);if(!(1&n)){var C=P&&E.call(t,"__wrapped__"),T=A&&E.call(e,"__wrapped__");if(C||T){var N=C?t.value():t,I=T?e.value():e;return s||(s=new r.A),i(N,I,n,o,s)}}return!!k&&(s||(s=new r.A),function(t,e,n,r,o,i){var s=1&n,a=(0,b.A)(t),u=a.length;if(u!=(0,b.A)(e).length&&!s)return!1;for(var c=u;c--;){var l=a[c];if(!(s?l in e:v.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var h=!0;i.set(t,e),i.set(e,t);for(var d=s;++c<u;){var y=t[l=a[c]],g=e[l];if(r)var m=s?r(g,y,l,e,t,i):r(y,g,l,t,e,i);if(!(void 0===m?y===g||o(y,g,n,r,i):m)){h=!1;break}d||(d="constructor"==l)}if(h&&!d){var _=t.constructor,w=e.constructor;_==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(h=!1)}return i.delete(t),i.delete(e),h}(t,e,n,o,i,s))};var P=n(47313);const A=function t(e,n,r,o,i){return e===n||(null==e||null==n||!(0,P.A)(e)&&!(0,P.A)(n)?e!=e&&n!=n:j(e,n,r,o,t,i))},k=function(t,e){return A(t,e)}},23935:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isScheduler=function(t){return t&&"function"==typeof t.schedule}},24355:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20328),o=n(49529);e.publishReplay=function(t,e,n,i){n&&"function"!=typeof n&&(i=n);var s="function"==typeof n?n:void 0,a=new r.ReplaySubject(t,e,i);return function(t){return o.multicast(function(){return a},s)(t)}}},24586:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(68515);function o(t,e,n){return(e=(0,r.A)(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},24654:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(4942);e.observeOn=function(t,e){return void 0===e&&(e=0),function(n){return n.lift(new a(t,e))}};var a=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=a;var u=function(t){function e(e,n,r){void 0===r&&(r=0);var o=t.call(this,e)||this;return o.scheduler=n,o.delay=r,o}return o(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(s.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(s.Notification.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete()),this.unsubscribe()},e}(i.Subscriber);e.ObserveOnSubscriber=u;var c=function(t,e){this.notification=t,this.destination=e};e.ObserveOnMessage=c},25436:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(91465),o=n(39600);const i=(0,r.A)(o.A,"Map")},25646:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(94688),s=function(t){function e(n,r){void 0===r&&(r=i.Scheduler.now);var o=t.call(this,n,function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(e,t),e.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,o):t.prototype.schedule.call(this,n,r,o)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.Scheduler);e.AsyncScheduler=s},25873:(t,e,n)=>{"use strict";var r=n(43144);e.createRoot=r.createRoot,e.hydrateRoot=r.hydrateRoot},26691:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(85295),i=n(34914);e.defer=function(t){return new r.Observable(function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?o.from(n):i.empty()).subscribe(e)})}},26781:(t,e,n)=>{"use strict";n.d(e,{A:()=>x});var r=n(91465),o=n(39600);const i=(0,r.A)(o.A,"DataView");var s=n(25436);const a=(0,r.A)(o.A,"Promise"),u=(0,r.A)(o.A,"Set"),c=(0,r.A)(o.A,"WeakMap");var l=n(62135),f=n(1548),p="[object Map]",h="[object Promise]",d="[object Set]",y="[object WeakMap]",b="[object DataView]",v=(0,f.A)(i),g=(0,f.A)(s.A),m=(0,f.A)(a),_=(0,f.A)(u),w=(0,f.A)(c),O=l.A;(i&&O(new i(new ArrayBuffer(1)))!=b||s.A&&O(new s.A)!=p||a&&O(a.resolve())!=h||u&&O(new u)!=d||c&&O(new c)!=y)&&(O=function(t){var e=(0,l.A)(t),n="[object Object]"==e?t.constructor:void 0,r=n?(0,f.A)(n):"";if(r)switch(r){case v:return b;case g:return p;case m:return h;case _:return d;case w:return y}return e});const x=O},26979:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},27296:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.mapTo=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.value))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return o(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(i.Subscriber)},27337:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(64103),o=n(64629);e.partition=function(t,e){return function(n){return[o.filter(t,e)(n),o.filter(r.not(t,e))(n)]}}},27388:(t,e,n)=>{"use strict";function r(t,e){if(t===e||Object.is(t,e))return!0;if(Array.isArray(t)){if(!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}if(Array.isArray(e))return!1;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const n=Object.getOwnPropertyNames(t),r=Object.getOwnPropertyNames(e);return n.length===r.length&&n.every(n=>t[n]===e[n])}n.d(e,{b:()=>r})},27432:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(71077),a=n(95092),u=n(77759),c=n(21016),l=n(85203),f=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return o(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new c.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),t.closed&&(this._connection=null,t=c.Subscription.EMPTY)),t},e.prototype.refCount=function(){return l.refCount()(this)},e}(a.Observable);e.ConnectableObservable=f,e.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(i=f.prototype)._subscribe},_isComplete:{value:i._isComplete,writable:!0},getSubject:{value:i.getSubject},connect:{value:i.connect},refCount:{value:i.refCount}};var p=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return o(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(s.SubjectSubscriber);!function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}o(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}(u.Subscriber)},27539:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(89152),a=n(87778);e.windowWhen=function(t){return function(e){return e.lift(new u(t))}};var u=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.closingSelector))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return o(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.openWindow(o)},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new i.Subject;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=a.subscribeToResult(this,n))},e}(s.OuterSubscriber)},27677:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.sample=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new a(t),r=e.subscribe(n);return r.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n))),r},t}(),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return o(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.SimpleOuterSubscriber)},27928:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(78522);function o(t){return 0===t.length?r.identity:1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}}e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)},e.pipeFromArray=o},27954:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(86735),i=n(19673),s=n(23935);function a(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}e.timer=function(t,e,n){void 0===t&&(t=0);var u=-1;return i.isNumeric(e)?u=Number(e)<1?1:Number(e):s.isScheduler(e)&&(n=e),s.isScheduler(n)||(n=o.async),new r.Observable(function(e){var r=i.isNumeric(t)?t:+t-n.now();return n.schedule(a,r,{index:0,period:u,subscriber:e})})}},27985:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(86284);function o(t,e){if(t){if("string"==typeof t)return(0,r.A)(t,e);var n={}.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)?(0,r.A)(t,e):void 0}}},28078:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(76124),o=n(99271);const i=function(t,e,n,i){var s=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var c=e[a],l=i?i(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),s?(0,o.A)(n,c,l):(0,r.A)(n,c,l)}return n}},29075:(t,e,n)=>{"use strict";n.d(e,{y:()=>a});var r=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}();function o(t){return null!==t&&"object"==typeof t}var i=n(18364),s=function(){function t(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}return t.prototype=Object.create(Error.prototype),t}(),a=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this,a=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,f=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof t)a.remove(this);else if(null!==a)for(var p=0;p<a.length;++p)a[p].remove(this);if((0,i.T)(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(t){e=t instanceof s?u(t.errors):[t]}}if(r(f)){p=-1;for(var h=f.length;++p<h;){var d=f[p];if(o(d))try{d.unsubscribe()}catch(t){e=e||[],t instanceof s?e=e.concat(u(t.errors)):e.push(t)}}}if(e)throw new s(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function u(t){return t.reduce(function(t,e){return t.concat(e instanceof s?e.errors:e)},[])}},29219:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(89233),s=n(85295),a=n(75901);e.exhaustMap=function t(e,n){return n?function(r){return r.pipe(t(function(t,r){return s.from(e(t,r)).pipe(i.map(function(e,o){return n(t,e,r,o)}))}))}:function(t){return t.lift(new u(e))}};var u=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return o(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new a.SimpleInnerSubscriber(this),n=this.destination;n.add(e);var r=a.innerSubscribe(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(a.SimpleOuterSubscriber)},29240:(t,e,n)=>{"use strict";n.d(e,{A:()=>p});const r=(0,n(91465).A)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function s(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])}}s.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},s.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},s.prototype.get=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0},s.prototype.has=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)},s.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};const a=s;var u=n(32086),c=n(25436);const l=function(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map};function f(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new a,map:new(c.A||u.A),string:new a}},f.prototype.delete=function(t){var e=l(this,t).delete(t);return this.size-=e?1:0,e},f.prototype.get=function(t){return l(this,t).get(t)},f.prototype.has=function(t){return l(this,t).has(t)},f.prototype.set=function(t,e){var n=l(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const p=f},30068:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(34914);e.repeat=function(t){return void 0===t&&(t=-1),function(e){return 0===t?s.empty():t<0?e.lift(new a(-1,e)):e.lift(new a(t-1,e))}};var a=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.count,this.source))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.count=n,o.source=r,o}return o(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(i.Subscriber)},30162:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17563);e.subscribeOn=function(t,e){return void 0===e&&(e=0),function(n){return n.lift(new o(t,e))}};var o=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new r.SubscribeOnObservable(e,this.delay,this.scheduler).subscribe(t)},t}()},30414:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(68515);function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(0,r.A)(o.key),o)}}function i(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}},31027:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}();e.TimeoutError=n},31444:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(2519);e.skipLast=function(t){return function(e){return e.lift(new a(t))}};var a=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new s.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new i.Subscriber(t)):e.subscribe(new u(t,this._skipCount))},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return o(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,o=this._ring,i=o[r];o[r]=t,this.destination.next(i)}},e}(i.Subscriber)},31475:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(50405),o=n(47893);const i=function(t){return null!=t&&(0,o.A)(t.length)&&!(0,r.A)(t)}},32086:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(26979);const o=function(t,e){for(var n=t.length;n--;)if((0,r.A)(t[n][0],e))return n;return-1};var i=Array.prototype.splice;function s(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])}}s.prototype.clear=function(){this.__data__=[],this.size=0},s.prototype.delete=function(t){var e=this.__data__,n=o(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))},s.prototype.get=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]},s.prototype.has=function(t){return o(this.__data__,t)>-1},s.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const a=s},32216:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(71077);e.windowCount=function(t,e){return void 0===e&&(e=0),function(n){return n.lift(new a(t,e))}};var a=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.windowSize,this.startWindowEvery))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.destination=e,o.windowSize=n,o.startWindowEvery=r,o.windows=[new s.Subject],o.count=0,e.next(o.windows[0]),o}return o(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,o=this.windows,i=o.length,a=0;a<i&&!this.closed;a++)o[a].next(t);var u=this.count-r+1;if(u>=0&&u%e===0&&!this.closed&&o.shift().complete(),++this.count%e===0&&!this.closed){var c=new s.Subject;o.push(c),n.next(c)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(i.Subscriber)},32376:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.find=function(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new s(t,n,!1,e))}};var s=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}();e.FindValueOperator=s;var a=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=o,s.thisArg=i,s.index=0,s}return o(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(i.Subscriber);e.FindValueSubscriber=a},32505:(t,e,n)=>{"use strict";n.d(e,{C6:()=>o});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},32742:t=>{"use strict";function e(){var t=1732584193,e=4023233417,n=2562383102,r=271733878,o=3285377520,i=new Uint32Array(80),s=0,a=24,u=0;function c(){for(var a=16;a<80;a++){var u=i[a-3]^i[a-8]^i[a-14]^i[a-16];i[a]=u<<1|u>>>31}var c,l,f=t,p=e,h=n,d=r,y=o;for(a=0;a<80;a++){a<20?(c=d^p&(h^d),l=1518500249):a<40?(c=p^h^d,l=1859775393):a<60?(c=p&h|d&(p|h),l=2400959708):(c=p^h^d,l=3395469782);var b=(f<<5|f>>>27)+c+y+l+(0|i[a]);y=d,d=h,h=p<<30|p>>>2,p=f,f=b}for(t=t+f|0,e=e+p|0,n=n+h|0,r=r+d|0,o=o+y|0,s=0,a=0;a<16;a++)i[a]=0}function l(t){i[s]|=(255&t)<<a,a?a-=8:(s++,a=24),16===s&&c()}function f(t){for(var e="",n=28;n>=0;n-=4)e+=(t>>n&15).toString(16);return e}return{update:function(t){if("string"==typeof t)return function(t){var e=t.length;u+=8*e;for(var n=0;n<e;n++)l(t.charCodeAt(n))}(t);var e=t.length;u+=8*e;for(var n=0;n<e;n++)l(t[n])},digest:function(){l(128),(s>14||14===s&&a<24)&&c(),s=14,a=24,l(0),l(0),l(u>0xffffffffff?u/1099511627776:0),l(u>4294967295?u/4294967296:0);for(var i=24;i>=0;i-=8)l(u>>i);return f(t)+f(e)+f(n)+f(r)+f(o)}}}t.exports=function(t){if(void 0===t)return e();var n=e();return n.update(t),n.digest()}},33339:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(97942),o=Object.create;const i=function(){function t(){}return function(e){if(!(0,r.A)(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var s=n(34878),a=n(71140);const u=function(t){return"function"!=typeof t.constructor||(0,a.A)(t)?{}:i((0,s.A)(t))}},33395:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(23935),i=n(80980),s=n(67446);e.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,a=null,u=t[t.length-1];return o.isScheduler(u)?(a=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===a&&1===t.length&&t[0]instanceof r.Observable?t[0]:i.mergeAll(n)(s.fromArray(t,a))}},34178:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(21016),i=n(78258);e.scheduleIterable=function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.Observable(function(n){var r,s=new o.Subscription;return s.add(function(){r&&"function"==typeof r.return&&r.return()}),s.add(e.schedule(function(){r=t[i.iterator](),s.add(e.schedule(function(){if(!n.closed){var t,e;try{var o=r.next();t=o.value,e=o.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}}))})),s})}},34878:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=(0,n(67244).A)(Object.getPrototypeOf,Object)},34914:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092);e.EMPTY=new r.Observable(function(t){return t.complete()}),e.empty=function(t){return t?function(t){return new r.Observable(function(e){return t.schedule(function(){return e.complete()})})}(t):e.EMPTY}},35428:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20917);e.switchMapTo=function(t,e){return e?r.switchMap(function(){return t},e):r.switchMap(function(){return t})}},35570:(t,e,n)=>{!function(e){"use strict";var r=n(19109);function o(t){return function(e,n){return"object"==typeof e&&(n=e,e=null),null==e&&(e=(new Date).toString()),n||(n={}),t.call(this,e,n)}}var i=t.exports={generate:o(function(t,e){return new r(t,e)})};e&&(e.fn.geopattern=o(function(t,n){return this.each(function(){var r=e(this).attr("data-title-sha");r&&(n=e.extend({hash:r},n));var o=i.generate(t,n);e(this).css("background-image",o.toDataUrl())})}))}("undefined"!=typeof jQuery?jQuery:null)},35816:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(86735),s=n(66740),a=n(75901);e.timeoutWith=function(t,e,n){return void 0===n&&(n=i.async),function(r){var o=s.isDate(t),i=o?+t-n.now():Math.abs(t);return r.lift(new u(i,o,e,n))}};var u=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),c=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=o,s.scheduler=i,s.scheduleTimeout(),s}return o(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(t)))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(a.SimpleOuterSubscriber)},36217:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(21016),a=n(95092),u=n(71077);e.groupBy=function(t,e,n,r){return function(o){return o.lift(new c(t,e,n,r))}};var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=o,s.subjectSelector=i,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return o(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,o=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!o){o=this.subjectSelector?this.subjectSelector():new u.Subject,n.set(e,o);var i=new p(e,o,this);if(this.destination.next(i),this.durationSelector){var s=void 0;try{s=this.durationSelector(new p(e,o))}catch(t){return void this.error(t)}this.add(s.subscribe(new f(e,o,this)))}}o.closed||o.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach(function(e,n){e.error(t)}),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(t,e){t.complete()}),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.Subscriber),f=function(t){function e(e,n,r){var o=t.call(this,n)||this;return o.key=e,o.group=n,o.parent=r,o}return o(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.Subscriber),p=function(t){function e(e,n,r){var o=t.call(this)||this;return o.key=e,o.groupSubject=n,o.refCountSubscription=r,o}return o(e,t),e.prototype._subscribe=function(t){var e=new s.Subscription,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new h(n)),e.add(r.subscribe(t)),e},e}(a.Observable);e.GroupedObservable=p;var h=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return o(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(s.Subscription)},36713:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},38513:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(21016),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return o(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),s.Subscription.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.Subject);e.AsyncSubject=a},39600:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(36713),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.A||o||Function("return this")()},39644:(t,e,n)=>{"use strict";n.d(e,{nr:()=>j,FO:()=>Hr,xN:()=>qr,lY:()=>Yr,sA:()=>ro,wJ:()=>S,FE:()=>uo,WA:()=>co,qb:()=>so,C$:()=>Wr,xc:()=>Fr,e:()=>Tr,WK:()=>mo,LM:()=>Mr,Rs:()=>b,Gp:()=>zr,pb:()=>Kr,Io:()=>Vr,bO:()=>oo,ms:()=>w,jU:()=>no,JC:()=>m,UH:()=>v,Gj:()=>g,yD:()=>lo,ff:()=>fo,Zr:()=>Br,Iq:()=>Ur,KG:()=>_o,sZ:()=>y,NU:()=>po,wn:()=>ho,AO:()=>Rr,Og:()=>E,iD:()=>ao,cy:()=>Gr,Td:()=>yo,u1:()=>bo,sK:()=>wo});try{self["workbox:window:6.5.4"]&&_()}catch(r){}function r(t,e){return new Promise(function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])})}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,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 o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){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)}try{self["workbox:core:6.5.4"]&&_()}catch(r){}var s=function(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})};function a(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href}var u=function(t,e){this.type=t,Object.assign(this,e)};function c(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function l(){}var f={type:"SKIP_WAITING"};function p(t,e){if(!e)return t&&t.then?t.then(l):Promise.resolve()}var h=function(t){var e,n;function o(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new s,r.en=new s,r.on=new s,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!a(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,s={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(s.isUpdate=!0),r.dispatchEvent(new u(o,s)),"installed"===o?r.wn=self.setTimeout(function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new u("waiting",s))},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 u("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 c(r.getSW(),function(){r.an.has(o)&&r.dispatchEvent(new u("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=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i,l=o.prototype;return l.register=function(t){var e=(void 0===t?{}:t).immediate,n=void 0!==e&&e;try{var r=this;return function(t,e){var n=t();return n&&n.then?n.then(e):e()}(function(){if(!n&&"complete"!==document.readyState)return p(new Promise(function(t){return window.addEventListener("load",t)}))},function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),c(r.bn(),function(t){r.fn=t,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var e=r.fn.waiting;return e&&a(e.scriptURL,r.sn.toString())&&(r.hn=e,Promise.resolve().then(function(){r.dispatchEvent(new u("waiting",{sw:e,wasWaitingBeforeRegister:!0}))}).then(function(){})),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn})})}catch(t){return Promise.reject(t)}},l.update=function(){try{return this.fn?p(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},l.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(t){try{return c(this.getSW(),function(e){return r(e,t)})}catch(t){return Promise.reject(t)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&r(this.fn.waiting,f)},l.pn=function(){var t=navigator.serviceWorker.controller;return t&&a(t.scriptURL,this.sn.toString())?t:void 0},l.bn=function(){try{var t=this;return function(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}(function(){return c(navigator.serviceWorker.register(t.sn,t.nn),function(e){return t.un=performance.now(),e})},function(t){throw t})}catch(t){return Promise.reject(t)}},(i=[{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,i),o}(function(){function t(){this.Pn=new Map}var 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=i(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}());let d;function y(t,e){if(void 0!==d)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${t} will not be registered.`),d;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");const n=new h(t,e);return d=n.register().then(()=>n.controlling.then(()=>n)),d}function b(){return d??Promise.resolve(void 0)}const v="x-omrs-offline-response-body",g="x-omrs-offline-response-status",m="x-omrs-offline-caching-strategy";async function w(t){const e=await b();return e?await e.messageSW(t):{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."}}const O="openmrs3:offline-mode";let x="unavailable";function S(){return{current:x,notAvailable:"unavailable"===x,active:"on"===x}}function E(t){"unavailable"!==x&&"unavailable"!==t&&(localStorage.setItem(O,"on"===t?"active":"disabled"),x=t)}async function j(){await async function(){return await async function(){return new Promise(t=>{const e=indexedDB.open("test");e.onerror=()=>t(!0),e.onsuccess=()=>t(!1)})}()||await async function(){return!window.indexedDB}()||await async function(){const t=window.sessionStorage;try{t.setItem("someKeyHere","test"),t.removeItem("someKeyHere")}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===t.length)return!0}return!1}()}()||(x="active"===localStorage.getItem(O)?"on":"off"),navigator.onLine}const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=Object.keys,k=Array.isArray;function C(t,e){return"object"!=typeof e||A(e).forEach(function(n){t[n]=e[n]}),t}"undefined"==typeof Promise||P.Promise||(P.Promise=Promise);const T=Object.getPrototypeOf,N={}.hasOwnProperty;function I(t,e){return N.call(t,e)}function D(t,e){"function"==typeof e&&(e=e(T(t))),("undefined"==typeof Reflect?A:Reflect.ownKeys)(e).forEach(n=>{R(t,n,e[n])})}const M=Object.defineProperty;function R(t,e,n,r){M(t,e,C(n&&I(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function L(t){return{from:function(e){return t.prototype=Object.create(e.prototype),R(t.prototype,"constructor",t),{extend:D.bind(null,t.prototype)}}}}const $=Object.getOwnPropertyDescriptor;function U(t,e){let n;return $(t,e)||(n=T(t))&&U(n,e)}const B=[].slice;function V(t,e,n){return B.call(t,e,n)}function F(t,e){return e(t)}function K(t){if(!t)throw new Error("Assertion Failed")}function W(t){P.setImmediate?setImmediate(t):setTimeout(t,0)}function z(t,e){return t.reduce((t,n,r)=>{var o=e(n,r);return o&&(t[o[0]]=o[1]),t},{})}function q(t,e){if("string"==typeof e&&I(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=q(t,e[r]);n.push(i)}return n}var s=e.indexOf(".");if(-1!==s){var a=t[e.substr(0,s)];return null==a?void 0:q(a,e.substr(s+1))}}function H(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){K("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)H(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var s=e.substr(0,i),a=e.substr(i+1);if(""===a)void 0===n?k(t)&&!isNaN(parseInt(s))?t.splice(s,1):delete t[s]:t[s]=n;else{var u=t[s];u&&I(t,s)||(u=t[s]={}),H(u,a,n)}}else void 0===n?k(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}function Y(t){var e={};for(var n in t)I(t,n)&&(e[n]=t[n]);return e}const G=[].concat;function J(t){return G.apply([],t)}const X="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(J([8,16,32,64].map(t=>["Int","Uint","Float"].map(e=>e+t+"Array")))).filter(t=>P[t]),Q=X.map(t=>P[t]);z(X,t=>[t,!0]);let Z=null;function tt(t){Z="undefined"!=typeof WeakMap&&new WeakMap;const e=et(t);return Z=null,e}function et(t){if(!t||"object"!=typeof t)return t;let e=Z&&Z.get(t);if(e)return e;if(k(t)){e=[],Z&&Z.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(et(t[n]))}else if(Q.indexOf(t.constructor)>=0)e=t;else{const n=T(t);for(var o in e=n===Object.prototype?{}:Object.create(n),Z&&Z.set(t,e),t)I(t,o)&&(e[o]=et(t[o]))}return e}const{toString:nt}={};function rt(t){return nt.call(t).slice(8,-1)}const ot="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",it="symbol"==typeof ot?function(t){var e;return null!=t&&(e=t[ot])&&e.apply(t)}:function(){return null},st={};function at(t){var e,n,r,o;if(1===arguments.length){if(k(t))return t.slice();if(this===st&&"string"==typeof t)return[t];if(o=it(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}const ut="undefined"!=typeof Symbol?t=>"AsyncFunction"===t[Symbol.toStringTag]:()=>!1;var ct="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function lt(t,e){ct=t,ft=e}var ft=()=>!0;const pt=!new Error("").stack;function ht(){if(pt)try{throw ht.arguments,new Error}catch(t){return t}return new Error}function dt(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(ft).map(t=>"\n"+t).join("")):""}var yt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],bt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(yt),vt={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function gt(t,e){this._e=ht(),this.name=t,this.message=e}function mt(t,e){return t+". Errors: "+Object.keys(e).map(t=>e[t].toString()).filter((t,e,n)=>n.indexOf(t)===e).join("\n")}function _t(t,e,n,r){this._e=ht(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=mt(t,e)}function wt(t,e){this._e=ht(),this.name="BulkError",this.failures=Object.keys(e).map(t=>e[t]),this.failuresByPos=e,this.message=mt(t,e)}L(gt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+dt(this._e,2))}},toString:function(){return this.name+": "+this.message}}),L(_t).from(gt),L(wt).from(gt);var Ot=bt.reduce((t,e)=>(t[e]=e+"Error",t),{});const xt=gt;var St=bt.reduce((t,e)=>{var n=e+"Error";function r(t,r){this._e=ht(),this.name=n,t?"string"==typeof t?(this.message=`${t}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof t&&(this.message=`${t.name} ${t.message}`,this.inner=t):(this.message=vt[e]||n,this.inner=null)}return L(r).from(xt),t[e]=r,t},{});St.Syntax=SyntaxError,St.Type=TypeError,St.Range=RangeError;var Et=yt.reduce((t,e)=>(t[e+"Error"]=St[e],t),{}),jt=bt.reduce((t,e)=>(-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=St[e]),t),{});function Pt(){}function At(t){return t}function kt(t,e){return null==t||t===At?e:function(n){return e(t(n))}}function Ct(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function Tt(t,e){return t===Pt?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?Ct(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Ct(o,this.onerror):o),void 0!==i?i:n}}function Nt(t,e){return t===Pt?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?Ct(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Ct(r,this.onerror):r)}}function It(t,e){return t===Pt?e:function(n){var r=t.apply(this,arguments);C(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var s=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Ct(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Ct(i,this.onerror):i),void 0===r?void 0===s?void 0:s:C(r,s)}}function Dt(t,e){return t===Pt?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}}function Mt(t,e){return t===Pt?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)}}jt.ModifyError=_t,jt.DexieError=gt,jt.BulkError=wt;var Rt={};const[Lt,$t,Ut]="undefined"==typeof Promise?[]:(()=>{let t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,T(t),t];const e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,T(e),t]})(),Bt=$t&&$t.then,Vt=Lt&&Lt.constructor,Ft=!!Ut;var Kt=!1,Wt=Ut?()=>{Ut.then(he)}:P.setImmediate?setImmediate.bind(null,he):P.MutationObserver?()=>{var t=document.createElement("div");new MutationObserver(()=>{he(),t=null}).observe(t,{attributes:!0}),t.setAttribute("i","1")}:()=>{setTimeout(he,0)},zt=function(t,e){te.push([t,e]),Ht&&(Wt(),Ht=!1)},qt=!0,Ht=!0,Yt=[],Gt=[],Jt=null,Xt=At,Qt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:$e,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(t=>{try{$e(t[0],t[1])}catch(t){}})}},Zt=Qt,te=[],ee=0,ne=[];function re(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Pt,this._lib=!1;var e=this._PSD=Zt;if(ct&&(this._stackHolder=ht(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Rt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ae(this,this._value))}this._state=null,this._value=null,++e.ref,se(this,t)}const oe={get:function(){var t=Zt,e=xe;function n(n,r){var o=!t.global&&(t!==Zt||e!==xe);const i=o&&!Pe();var s=new re((e,s)=>{ce(this,new ie(Me(n,t,o,i),Me(r,t,o,i),e,s,t))});return ct&&pe(s,this),s}return n.prototype=Rt,n},set:function(t){R(this,"then",t&&t.prototype===Rt?oe:{get:function(){return t},set:oe.set})}};function ie(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}function se(t,e){try{e(e=>{if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&de();e&&"function"==typeof e.then?se(t,(t,n)=>{e instanceof re?e._then(t,n):e.then(t,n)}):(t._state=!0,t._value=e,ue(t)),n&&ye()}},ae.bind(null,t))}catch(e){ae(t,e)}}function ae(t,e){if(Gt.push(e),null===t._state){var n=t._lib&&de();e=Xt(e),t._state=!1,t._value=e,ct&&null!==e&&"object"==typeof e&&!e._promise&&function(t){try{t.apply(null,void 0)}catch(t){}}(()=>{var n=U(e,"stack");e._promise=t,R(e,"stack",{get:()=>Kt?n&&(n.get?n.get.apply(e):n.value):t.stack})}),function(t){Yt.some(e=>e._value===t._value)||Yt.push(t)}(t),ue(t),n&&ye()}}function ue(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)ce(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===ee&&(++ee,zt(()=>{0==--ee&&be()},[]))}function ce(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,++ee,zt(le,[n,t,e])}else t._listeners.push(e)}function le(t,e,n){try{Jt=e;var r,o=e._value;e._state?r=t(o):(Gt.length&&(Gt=[]),r=t(o),-1===Gt.indexOf(o)&&function(t){for(var e=Yt.length;e;)if(Yt[--e]._value===t._value)return void Yt.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Jt=null,0==--ee&&be(),--n.psd.ref||n.psd.finalize()}}function fe(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,s=t._value;null!=s?(o=s.name||"Error",i=s.message||s,r=dt(s,0)):(o=s,i=""),e.push(o+(i?": "+i:"")+r)}return ct&&((r=dt(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&fe(t._prev,e,n)),e}function pe(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)}function he(){de()&&ye()}function de(){var t=qt;return qt=!1,Ht=!1,t}function ye(){var t,e,n;do{for(;te.length>0;)for(t=te,te=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(te.length>0);qt=!0,Ht=!0}function be(){var t=Yt;Yt=[],t.forEach(t=>{t._PSD.onunhandled.call(null,t._value,t)});for(var e=ne.slice(0),n=e.length;n;)e[--n]()}function ve(t){return new re(Rt,!1,t)}function ge(t,e){var n=Zt;return function(){var r=de(),o=Zt;try{return Te(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{Te(o,!1),r&&ye()}}}D(re.prototype,{then:oe,_then:function(t,e){ce(this,new ie(null,null,t,e,Zt))},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,t=>t instanceof e?n(t):ve(t)):this.then(null,t=>t&&t.name===e?n(t):ve(t))},finally:function(t){return this.then(e=>(t(),e),e=>(t(),ve(e)))},stack:{get:function(){if(this._stack)return this._stack;try{Kt=!0;var t=fe(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Kt=!1}}},timeout:function(t,e){return t<1/0?new re((n,r)=>{var o=setTimeout(()=>r(new St.Timeout(e)),t);this.then(n,r).finally(clearTimeout.bind(null,o))}):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&R(re.prototype,Symbol.toStringTag,"Dexie.Promise"),Qt.env=Ne(),D(re,{all:function(){var t=at.apply(null,arguments).map(Ae);return new re(function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((o,i)=>re.resolve(o).then(n=>{t[i]=n,--r||e(t)},n))})},resolve:t=>{if(t instanceof re)return t;if(t&&"function"==typeof t.then)return new re((e,n)=>{t.then(e,n)});var e=new re(Rt,!0,t);return pe(e,Jt),e},reject:ve,race:function(){var t=at.apply(null,arguments).map(Ae);return new re((e,n)=>{t.map(t=>re.resolve(t).then(e,n))})},PSD:{get:()=>Zt,set:t=>Zt=t},totalEchoes:{get:()=>xe},newPSD:Ee,usePSD:Ie,scheduler:{get:()=>zt,set:t=>{zt=t}},rejectionMapper:{get:()=>Xt,set:t=>{Xt=t}},follow:(t,e)=>new re((n,r)=>Ee((e,n)=>{var r=Zt;r.unhandleds=[],r.onunhandled=n,r.finalize=Ct(function(){!function(t){ne.push(function e(){t(),ne.splice(ne.indexOf(e),1)}),++ee,zt(()=>{0==--ee&&be()},[])}(()=>{0===this.unhandleds.length?e():n(this.unhandleds[0])})},r.finalize),t()},e,n,r))}),Vt&&(Vt.allSettled&&R(re,"allSettled",function(){const t=at.apply(null,arguments).map(Ae);return new re(e=>{0===t.length&&e([]);let n=t.length;const r=new Array(n);t.forEach((t,o)=>re.resolve(t).then(t=>r[o]={status:"fulfilled",value:t},t=>r[o]={status:"rejected",reason:t}).then(()=>--n||e(r)))})}),Vt.any&&"undefined"!=typeof AggregateError&&R(re,"any",function(){const t=at.apply(null,arguments).map(Ae);return new re((e,n)=>{0===t.length&&n(new AggregateError([]));let r=t.length;const o=new Array(r);t.forEach((t,i)=>re.resolve(t).then(t=>e(t),t=>{o[i]=t,--r||n(new AggregateError(o))}))})}));const me={awaits:0,echoes:0,id:0};var _e=0,we=[],Oe=0,xe=0,Se=0;function Ee(t,e,n,r){var o=Zt,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Se;var s=Qt.env;i.env=Ft?{Promise:re,PromiseProp:{value:re,configurable:!0,writable:!0},all:re.all,race:re.race,allSettled:re.allSettled,any:re.any,resolve:re.resolve,reject:re.reject,nthen:Re(s.nthen,i),gthen:Re(s.gthen,i)}:{},e&&C(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=Ie(i,t,n,r);return 0===i.ref&&i.finalize(),a}function je(){return me.id||(me.id=++_e),++me.awaits,me.echoes+=100,me.id}function Pe(){return!!me.awaits&&(0==--me.awaits&&(me.id=0),me.echoes=100*me.awaits,!0)}function Ae(t){return me.echoes&&t&&t.constructor===Vt?(je(),t.then(t=>(Pe(),t),t=>(Pe(),Ue(t)))):t}function ke(t){++xe,me.echoes&&0!=--me.echoes||(me.echoes=me.id=0),we.push(Zt),Te(t,!0)}function Ce(){var t=we[we.length-1];we.pop(),Te(t,!1)}function Te(t,e){var n=Zt;if((e?!me.echoes||Oe++&&t===Zt:!Oe||--Oe&&t===Zt)||De(e?ke.bind(null,t):Ce),t!==Zt&&(Zt=t,n===Qt&&(Qt.env=Ne()),Ft)){var r=Qt.env.Promise,o=t.env;$t.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(P,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Ne(){var t=P.Promise;return Ft?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(P,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:$t.then,gthen:t.prototype.then}:{}}function Ie(t,e,n,r,o){var i=Zt;try{return Te(t,!0),e(n,r,o)}finally{Te(i,!1)}}function De(t){Bt.call(Lt,t)}function Me(t,e,n,r){return"function"!=typeof t?t:function(){var o=Zt;n&&je(),Te(e,!0);try{return t.apply(this,arguments)}finally{Te(o,!1),r&&De(Pe)}}}function Re(t,e){return function(n,r){return t.call(this,Me(n,e),Me(r,e))}}-1===(""+Bt).indexOf("[native code]")&&(je=Pe=Pt);const Le="unhandledrejection";function $e(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(P.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(Le,!0,!0),C(r,o)):P.CustomEvent&&C(r=new CustomEvent(Le,{detail:o}),o),r&&P.dispatchEvent&&(dispatchEvent(r),!P.PromiseRejectionEvent&&P.onunhandledrejection))try{P.onunhandledrejection(r)}catch(t){}ct&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${t.stack||t}`)}catch(t){}}var Ue=re.reject;function Be(t,e,n,r){if(t.idbdb&&(t._state.openComplete||Zt.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===Ot.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>Be(t,e,n,r))):Ue(o)}return o._promise(e,(t,e)=>Ee(()=>(Zt.trans=o,r(t,e,o)))).then(t=>o._completion.then(()=>t))}if(t._state.openComplete)return Ue(new St.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return Ue(new St.DatabaseClosed);t.open().catch(Pt)}return t._state.dbReadyPromise.then(()=>Be(t,e,n,r))}const Ve="3.2.7",Fe=String.fromCharCode(65535),Ke=-1/0,We="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ze="String expected.",qe=[],He="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Ye=He,Ge=He,Je=t=>!/(dexie\.js|dexie\.min\.js)/.test(t),Xe="__dbnames",Qe="readonly",Ze="readwrite";function tn(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e}const en={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function nn(t){return"string"!=typeof t||/\./.test(t)?t=>t:e=>(void 0===e[t]&&t in e&&delete(e=tt(e))[t],e)}class rn{_trans(t,e,n){const r=this._tx||Zt.trans,o=this.name;function i(t,n,r){if(!r.schema[o])throw new St.NotFound("Table "+o+" not part of transaction");return e(r.idbtrans,r)}const s=de();try{return r&&r.db===this.db?r===Zt.trans?r._promise(t,i,n):Ee(()=>r._promise(t,i,n),{trans:r,transless:Zt.transless||Zt}):Be(this.db,t,[this.name],i)}finally{s&&ye()}}get(t,e){return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",e=>this.core.get({trans:e,key:t}).then(t=>this.hook.reading.fire(t))).then(e)}where(t){if("string"==typeof t)return new this.db.WhereClause(this,t);if(k(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const e=A(t);if(1===e.length)return this.where(e[0]).equals(t[e[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter(t=>{if(t.compound&&e.every(e=>t.keyPath.indexOf(e)>=0)){for(let n=0;n<e.length;++n)if(-1===e.indexOf(t.keyPath[n]))return!1;return!0}return!1}).sort((t,e)=>t.keyPath.length-e.keyPath.length)[0];if(n&&this.db._maxKey!==Fe){const r=n.keyPath.slice(0,e.length);return this.where(r).equals(r.map(e=>t[e]))}!n&&ct&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${e.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(t,e){try{return 0===o.cmp(t,e)}catch(t){return!1}}const[s,a]=e.reduce(([e,n],o)=>{const s=r[o],a=t[o];return[e||s,e||!s?tn(n,s&&s.multi?t=>{const e=q(t,o);return k(e)&&e.some(t=>i(a,t))}:t=>i(a,q(t,o))):n]},[null,null]);return s?this.where(s.name).equals(t[s.keyPath]).filter(a):n?this.filter(a):this.where(e).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,k(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const e=e=>{if(!e)return e;const n=Object.create(t.prototype);for(var r in e)if(I(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}defineClass(){return this.mapToClass(function(t){C(this,t)})}add(t,e){const{auto:n,keyPath:r}=this.schema.primKey;let o=t;return r&&n&&(o=nn(r)(t)),this._trans("readwrite",t=>this.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[o]})).then(t=>t.numFailures?re.reject(t.failures[0]):t.lastResult).then(e=>{if(r)try{H(t,r,e)}catch(t){}return e})}update(t,e){if("object"!=typeof t||k(t))return this.where(":id").equals(t).modify(e);{const n=q(t,this.schema.primKey.keyPath);if(void 0===n)return Ue(new St.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?A(e).forEach(n=>{H(t,n,e[n])}):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}}put(t,e){const{auto:n,keyPath:r}=this.schema.primKey;let o=t;return r&&n&&(o=nn(r)(t)),this._trans("readwrite",t=>this.core.mutate({trans:t,type:"put",values:[o],keys:null!=e?[e]:null})).then(t=>t.numFailures?re.reject(t.failures[0]):t.lastResult).then(e=>{if(r)try{H(t,r,e)}catch(t){}return e})}delete(t){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"delete",keys:[t]})).then(t=>t.numFailures?re.reject(t.failures[0]):void 0)}clear(){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"deleteRange",range:en})).then(t=>t.numFailures?re.reject(t.failures[0]):void 0)}bulkGet(t){return this._trans("readonly",e=>this.core.getMany({keys:t,trans:e}).then(t=>t.map(t=>this.hook.reading.fire(t))))}bulkAdd(t,e,n){const r=Array.isArray(e)?e:void 0,o=(n=n||(r?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",e=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new St.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==t.length)throw new St.InvalidArgument("Arguments objects and keys must have the same length");const s=t.length;let a=i&&n?t.map(nn(i)):t;return this.core.mutate({trans:e,type:"add",keys:r,values:a,wantResults:o}).then(({numFailures:t,results:e,lastResult:n,failures:r})=>{if(0===t)return o?e:n;throw new wt(`${this.name}.bulkAdd(): ${t} of ${s} operations failed`,r)})})}bulkPut(t,e,n){const r=Array.isArray(e)?e:void 0,o=(n=n||(r?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",e=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new St.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==t.length)throw new St.InvalidArgument("Arguments objects and keys must have the same length");const s=t.length;let a=i&&n?t.map(nn(i)):t;return this.core.mutate({trans:e,type:"put",keys:r,values:a,wantResults:o}).then(({numFailures:t,results:e,lastResult:n,failures:r})=>{if(0===t)return o?e:n;throw new wt(`${this.name}.bulkPut(): ${t} of ${s} operations failed`,r)})})}bulkDelete(t){const e=t.length;return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"delete",keys:t})).then(({numFailures:t,lastResult:n,failures:r})=>{if(0===t)return n;throw new wt(`${this.name}.bulkDelete(): ${t} of ${e} operations failed`,r)})}}function on(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){var s;r||(r=Dt),o||(o=Pt);var a={subscribers:[],fire:o,subscribe:function(t){-1===a.subscribers.indexOf(t)&&(a.subscribers.push(t),a.fire=r(a.fire,t))},unsubscribe:function(t){a.subscribers=a.subscribers.filter(function(e){return e!==t}),a.fire=a.subscribers.reduce(r,o)}};return e[t]=n[t]=a,a}A(s=t).forEach(function(t){var e=s[t];if(k(e))i(t,s[t][0],s[t][1]);else{if("asap"!==e)throw new St.InvalidArgument("Invalid event config");var n=i(t,At,function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];n.subscribers.forEach(function(t){W(function(){t.apply(null,e)})})})}})}}function sn(t,e){return L(e).from({prototype:t}),e}function an(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)}function un(t,e){t.filter=tn(t.filter,e)}function cn(t,e,n){var r=t.replayFilter;t.replayFilter=r?()=>tn(r(),e()):e,t.justLimit=n&&!r}function ln(t,e){if(t.isPrimKey)return e.primaryKey;const n=e.getIndexByKeyPath(t.index);if(!n)throw new St.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n}function fn(t,e,n){const r=ln(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})}function pn(t,e,n,r){const o=t.replayFilter?tn(t.filter,t.replayFilter()):t.filter;if(t.or){const i={},s=(t,n,r)=>{if(!o||o(n,r,t=>n.stop(t),t=>n.fail(t))){var s=n.primaryKey,a=""+s;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(s)),I(i,a)||(i[a]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(s,n),hn(fn(t,r,n),t.algorithm,s,!t.keysOnly&&t.valueMapper)])}return hn(fn(t,r,n),tn(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)}function hn(t,e,n,r){var o=ge(r?(t,e,o)=>n(r(t),e,o):n);return t.then(t=>{if(t)return t.start(()=>{var n=()=>t.continue();e&&!e(t,t=>n=t,e=>{t.stop(e),n=Pt},e=>{t.fail(e),n=Pt})||o(t.value,t,t=>n=t),n()})})}function dn(t,e){try{const n=yn(t),r=yn(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){const n=t.length,r=e.length,o=n<r?n:r;for(let n=0;n<o;++n)if(t[n]!==e[n])return t[n]<e[n]?-1:1;return n===r?0:n<r?-1:1}(bn(t),bn(e));case"Array":return function(t,e){const n=t.length,r=e.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=dn(t[n],e[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}function yn(t){const e=typeof t;if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";const n=rt(t);return"ArrayBuffer"===n?"binary":n}function bn(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)}class vn{_read(t,e){var n=this._ctx;return n.error?n.table._trans(null,Ue.bind(null,n.error)):n.table._trans("readonly",t).then(e)}_write(t){var e=this._ctx;return e.error?e.table._trans(null,Ue.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}_addAlgorithm(t){var e=this._ctx;e.algorithm=tn(e.algorithm,t)}_iterate(t,e){return pn(this._ctx,t,e,this._ctx.table.core)}clone(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&C(n,t),e._ctx=n,e}raw(){return this._ctx.valueMapper=null,this}each(t){var e=this._ctx;return this._read(n=>pn(e,t,n,e.table.core))}count(t){return this._read(t=>{const e=this._ctx,n=e.table.core;if(an(e,!0))return n.count({trans:t,query:{index:ln(e,n.schema),range:e.range}}).then(t=>Math.min(t,e.limit));var r=0;return pn(e,()=>(++r,!1),t,n).then(()=>r)}).then(t)}sortBy(t,e){const n=t.split(".").reverse(),r=n[0],o=n.length-1;function i(t,e){return e?i(t[n[e]],e-1):t[r]}var s="next"===this._ctx.dir?1:-1;function a(t,e){var n=i(t,o),r=i(e,o);return n<r?-s:n>r?s:0}return this.toArray(function(t){return t.sort(a)}).then(e)}toArray(t){return this._read(t=>{var e=this._ctx;if("next"===e.dir&&an(e,!0)&&e.limit>0){const{valueMapper:n}=e,r=ln(e,e.table.core.schema);return e.table.core.query({trans:t,limit:e.limit,values:!0,query:{index:r,range:e.range}}).then(({result:t})=>n?t.map(n):t)}{const n=[];return pn(e,t=>n.push(t),t,e.table.core).then(()=>n)}},t)}offset(t){var e=this._ctx;return t<=0||(e.offset+=t,an(e)?cn(e,()=>{var e=t;return(t,n)=>0===e||(1===e?(--e,!1):(n(()=>{t.advance(e),e=0}),!1))}):cn(e,()=>{var e=t;return()=>--e<0})),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),cn(this._ctx,()=>{var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}},!0),this}until(t,e){return un(this._ctx,function(n,r,o){return!t(n.value)||(r(o),e)}),this}first(t){return this.limit(1).toArray(function(t){return t[0]}).then(t)}last(t){return this.reverse().first(t)}filter(t){var e,n;return un(this._ctx,function(e){return t(e.value)}),e=this._ctx,n=t,e.isMatch=tn(e.isMatch,n),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each(function(e,n){t(n.key,n)})}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each(function(e,n){t(n.primaryKey,n)})}keys(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)}primaryKeys(t){var e=this._ctx;if("next"===e.dir&&an(e,!0)&&e.limit>0)return this._read(t=>{var n=ln(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})}).then(({result:t})=>t).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each(function(t,e){n.push(e.primaryKey)}).then(function(){return n}).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys(function(t){return t[0]}).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return un(this._ctx,function(t){var e=t.primaryKey.toString(),r=I(n,e);return n[e]=!0,!r}),this}modify(t){var e=this._ctx;return this._write(n=>{var r;if("function"==typeof t)r=t;else{var o=A(t),i=o.length;r=function(e){for(var n=!1,r=0;r<i;++r){var s=o[r],a=t[s];q(e,s)!==a&&(H(e,s,a),n=!0)}return n}}const s=e.table.core,{outbound:a,extractKey:u}=s.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const p=[],h=(t,e)=>{const{failures:n,numFailures:r}=e;f+=t-r;for(let t of A(n))l.push(n[t])};return this.clone().primaryKeys().then(o=>{const i=l=>{const f=Math.min(c,o.length-l);return s.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then(p=>{const d=[],y=[],b=a?[]:null,v=[];for(let t=0;t<f;++t){const e=p[t],n={value:tt(e),primKey:o[l+t]};!1!==r.call(n,n.value,n)&&(null==n.value?v.push(o[l+t]):a||0===dn(u(e),u(n.value))?(y.push(n.value),a&&b.push(o[l+t])):(v.push(o[l+t]),d.push(n.value)))}const g=an(e)&&e.limit===1/0&&("function"!=typeof t||t===gn)&&{index:e.index,range:e.range};return Promise.resolve(d.length>0&&s.mutate({trans:n,type:"add",values:d}).then(t=>{for(let e in t.failures)v.splice(parseInt(e),1);h(d.length,t)})).then(()=>(y.length>0||g&&"object"==typeof t)&&s.mutate({trans:n,type:"put",keys:b,values:y,criteria:g,changeSpec:"function"!=typeof t&&t}).then(t=>h(y.length,t))).then(()=>(v.length>0||g&&t===gn)&&s.mutate({trans:n,type:"delete",keys:v,criteria:g}).then(t=>h(v.length,t))).then(()=>o.length>l+f&&i(l+c))})};return i(0).then(()=>{if(l.length>0)throw new _t("Error modifying one or more objects",l,f,p);return o.length})})})}delete(){var t=this._ctx,e=t.range;return an(t)&&(t.isPrimKey&&!Ge||3===e.type)?this._write(n=>{const{primaryKey:r}=t.table.core.schema,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then(e=>t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then(({failures:t,lastResult:n,results:r,numFailures:o})=>{if(o)throw new _t("Could not delete some values",Object.keys(t).map(e=>t[e]),e-o);return e-o}))}):this.modify(gn)}}const gn=(t,e)=>e.value=null;function mn(t,e){return t<e?-1:t===e?0:1}function _n(t,e){return t>e?-1:t===e?0:1}function wn(t,e,n){var r=t instanceof Pn?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r}function On(t){return new t.Collection(t,()=>jn("")).limit(0)}function xn(t,e,n,r,o,i){for(var s=Math.min(t.length,r.length),a=-1,u=0;u<s;++u){var c=e[u];if(c!==r[u])return o(t[u],n[u])<0?t.substr(0,u)+n[u]+n.substr(u+1):o(t[u],r[u])<0?t.substr(0,u)+r[u]+n.substr(u+1):a>=0?t.substr(0,a)+e[a]+n.substr(a+1):null;o(t[u],c)<0&&(a=u)}return s<r.length&&"next"===i?t+n.substr(t.length):s<t.length&&"prev"===i?t.substr(0,n.length):a<0?null:t.substr(0,a)+r[a]+n.substr(a+1)}function Sn(t,e,n,r){var o,i,s,a,u,c,l,f=n.length;if(!n.every(t=>"string"==typeof t))return wn(t,ze);function p(t){o=function(t){return"next"===t?t=>t.toUpperCase():t=>t.toLowerCase()}(t),i=function(t){return"next"===t?t=>t.toLowerCase():t=>t.toUpperCase()}(t),s="next"===t?mn:_n;var e=n.map(function(t){return{lower:i(t),upper:o(t)}}).sort(function(t,e){return s(t.lower,e.lower)});a=e.map(function(t){return t.upper}),u=e.map(function(t){return t.lower}),c=t,l="next"===t?"":r}p("next");var h=new t.Collection(t,()=>En(a[0],u[f-1]+r));h._ondirectionchange=function(t){p(t)};var d=0;return h._addAlgorithm(function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var p=i(o);if(e(p,u,d))return!0;for(var h=null,y=d;y<f;++y){var b=xn(o,p,a[y],u[y],s,c);null===b&&null===h?d=y+1:(null===h||s(h,b)>0)&&(h=b)}return n(null!==h?function(){t.continue(h+l)}:r),!1}),h}function En(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}}function jn(t){return{type:1,lower:t,upper:t}}class Pn{get Collection(){return this._ctx.table.db.Collection}between(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)?On(this):new this.Collection(this,()=>En(t,e,!n,!r))}catch(t){return wn(this,We)}}equals(t){return null==t?wn(this,We):new this.Collection(this,()=>jn(t))}above(t){return null==t?wn(this,We):new this.Collection(this,()=>En(t,void 0,!0))}aboveOrEqual(t){return null==t?wn(this,We):new this.Collection(this,()=>En(t,void 0,!1))}below(t){return null==t?wn(this,We):new this.Collection(this,()=>En(void 0,t,!1,!0))}belowOrEqual(t){return null==t?wn(this,We):new this.Collection(this,()=>En(void 0,t))}startsWith(t){return"string"!=typeof t?wn(this,ze):this.between(t,t+Fe,!0,!0)}startsWithIgnoreCase(t){return""===t?this.startsWith(t):Sn(this,(t,e)=>0===t.indexOf(e[0]),[t],Fe)}equalsIgnoreCase(t){return Sn(this,(t,e)=>t===e[0],[t],"")}anyOfIgnoreCase(){var t=at.apply(st,arguments);return 0===t.length?On(this):Sn(this,(t,e)=>-1!==e.indexOf(t),t,"")}startsWithAnyOfIgnoreCase(){var t=at.apply(st,arguments);return 0===t.length?On(this):Sn(this,(t,e)=>e.some(e=>0===t.indexOf(e)),t,Fe)}anyOf(){const t=at.apply(st,arguments);let e=this._cmp;try{t.sort(e)}catch(t){return wn(this,We)}if(0===t.length)return On(this);const n=new this.Collection(this,()=>En(t[0],t[t.length-1]));n._ondirectionchange=n=>{e="next"===n?this._ascending:this._descending,t.sort(e)};let r=0;return n._addAlgorithm((n,o,i)=>{const s=n.key;for(;e(s,t[r])>0;)if(++r,r===t.length)return o(i),!1;return 0===e(s,t[r])||(o(()=>{n.continue(t[r])}),!1)}),n}notEqual(t){return this.inAnyRange([[Ke,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=at.apply(st,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return wn(this,We)}const e=t.reduce((t,e)=>t?t.concat([[t[t.length-1][1],e]]):[[Ke,e]],null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,e){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,s=this._max;if(0===t.length)return On(this);if(!t.every(t=>void 0!==t[0]&&void 0!==t[1]&&r(t[0],t[1])<=0))return wn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",St.InvalidArgument);const a=!e||!1!==e.includeLowers,u=e&&!0===e.includeUppers;let c,l=r;function f(t,e){return l(t[0],e[0])}try{c=t.reduce(function(t,e){let r=0,o=t.length;for(;r<o;++r){const o=t[r];if(n(e[0],o[1])<0&&n(e[1],o[0])>0){o[0]=i(o[0],e[0]),o[1]=s(o[1],e[1]);break}}return r===o&&t.push(e),t},[]),c.sort(f)}catch(t){return wn(this,We)}let p=0;const h=u?t=>r(t,c[p][1])>0:t=>r(t,c[p][1])>=0,d=a?t=>o(t,c[p][0])>0:t=>o(t,c[p][0])>=0;let y=h;const b=new this.Collection(this,()=>En(c[0][0],c[c.length-1][1],!a,!u));return b._ondirectionchange=t=>{"next"===t?(y=h,l=r):(y=d,l=o),c.sort(f)},b._addAlgorithm((t,e,n)=>{for(var o=t.key;y(o);)if(++p,p===c.length)return e(n),!1;return!!function(t){return!h(t)&&!d(t)}(o)||(0===this._cmp(o,c[p][1])||0===this._cmp(o,c[p][0])||e(()=>{l===r?t.continue(c[p][0]):t.continue(c[p][1])}),!1)}),b}startsWithAnyOf(){const t=at.apply(st,arguments);return t.every(t=>"string"==typeof t)?0===t.length?On(this):this.inAnyRange(t.map(t=>[t,t+Fe])):wn(this,"startsWithAnyOf() only works with strings")}}function An(t){return ge(function(e){return kn(e),t(e.target.error),!1})}function kn(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()}const Cn="storagemutated",Tn="x-storagemutated-1",Nn=on(null,Cn);class In{_lock(){return K(!Zt.global),++this._reculock,1!==this._reculock||Zt.global||(Zt.lockOwnerFor=this),this}_unlock(){if(K(!Zt.global),0==--this._reculock)for(Zt.global||(Zt.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Ie(t[1],t[0])}catch(t){}}return this}_locked(){return this._reculock&&Zt.lockOwnerFor!==this}create(t){if(!this.mode)return this;const e=this.db.idbdb,n=this.db._state.dbOpenError;if(K(!this.idbtrans),!t&&!e)switch(n&&n.name){case"DatabaseClosedError":throw new St.DatabaseClosed(n);case"MissingAPIError":throw new St.MissingAPI(n.message,n);default:throw new St.OpenFailed(n)}if(!this.active)throw new St.TransactionInactive;return K(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):e.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=ge(e=>{kn(e),this._reject(t.error)}),t.onabort=ge(e=>{kn(e),this.active&&this._reject(new St.Abort(t.error)),this.active=!1,this.on("abort").fire(e)}),t.oncomplete=ge(()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&Nn.storagemutated.fire(t.mutatedParts)}),this}_promise(t,e,n){if("readwrite"===t&&"readwrite"!==this.mode)return Ue(new St.ReadOnly("Transaction is readonly"));if(!this.active)return Ue(new St.TransactionInactive);if(this._locked())return new re((r,o)=>{this._blockedFuncs.push([()=>{this._promise(t,e,n).then(r,o)},Zt])});if(n)return Ee(()=>{var t=new re((t,n)=>{this._lock();const r=e(t,n,this);r&&r.then&&r.then(t,n)});return t.finally(()=>this._unlock()),t._lib=!0,t});var r=new re((t,n)=>{var r=e(t,n,this);r&&r.then&&r.then(t,n)});return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(t){var e=this._root();const n=re.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then(()=>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 re((t,r)=>{n.then(n=>e._waitingQueue.push(ge(t.bind(null,n))),t=>e._waitingQueue.push(ge(r.bind(null,t)))).finally(()=>{e._waitingFor===o&&(e._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new St.Abort))}table(t){const e=this._memoizedTables||(this._memoizedTables={});if(I(e,t))return e[t];const n=this.schema[t];if(!n)throw new St.NotFound("Table "+t+" not part of transaction");const r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}function Dn(t,e,n,r,o,i,s){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!s?"&":"")+(r?"*":"")+(o?"++":"")+Mn(e)}}function Mn(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""}function Rn(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:z(n,t=>[t.name,t])}}let Ln=t=>{try{return t.only([[]]),Ln=()=>[[]],[[]]}catch(t){return Ln=()=>Fe,Fe}};function $n(t){return null==t?()=>{}:"string"==typeof t?function(t){return 1===t.split(".").length?e=>e[t]:e=>q(e,t)}(t):e=>q(e,t)}function Un(t){return[].slice.call(t)}let Bn=0;function Vn(t){return null==t?":id":"string"==typeof t?t:`[${t.join("+")}]`}function Fn({_novip:t},e){const n=e.db,r=function(t,e,{IDBKeyRange:n,indexedDB:r},o){const i=function(t,e){return e.reduce((t,{create:e})=>({...t,...e(t)}),t)}(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");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=t;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)}const{schema:o,hasGetAll:i}=function(t,e){const n=Un(t.objectStoreNames);return{schema:{name:t.name,tables:n.map(t=>e.objectStore(t)).map(t=>{const{keyPath:e,autoIncrement:n}=t,r=k(e),o=null==e,i={},s={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:$n(e)},indexes:Un(t.indexNames).map(e=>t.index(e)).map(t=>{const{name:e,unique:n,multiEntry:r,keyPath:o}=t,s={name:e,compound:k(o),keyPath:o,unique:n,multiEntry:r,extractKey:$n(o)};return i[Vn(o)]=s,s}),getIndexByKeyPath:t=>i[Vn(t)]};return i[":id"]=s.primaryKey,null!=e&&(i[Vn(e)]=s.primaryKey),s})},hasGetAll:n.length>0&&"getAll"in e.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(t,n),s=o.tables.map(t=>function(t){const e=t.name;return{name:e,schema:t,mutate:function({trans:t,type:n,keys:o,values:i,range:s}){return new Promise((a,u)=>{a=ge(a);const c=t.objectStore(e),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:p}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return a({numFailures:0,failures:{},results:[],lastResult:void 0});let h;const d=[],y=[];let b=0;const v=t=>{++b,kn(t)};if("deleteRange"===n){if(4===s.type)return a({numFailures:b,failures:y,results:[],lastResult:void 0});3===s.type?d.push(h=c.clear()):d.push(h=c.delete(r(s)))}else{const[t,e]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<p;++r)d.push(h=e&&void 0!==e[r]?c[n](t[r],e[r]):c[n](t[r])),h.onerror=v;else for(let e=0;e<p;++e)d.push(h=c[n](t[e])),h.onerror=v}const g=t=>{const e=t.target.result;d.forEach((t,e)=>null!=t.error&&(y[e]=t.error)),a({numFailures:b,failures:y,results:"delete"===n?o:d.map(t=>t.result),lastResult:e})};h.onerror=t=>{v(t),g(t)},h.onsuccess=g})},getMany:({trans:t,keys:n})=>new Promise((r,o)=>{r=ge(r);const i=t.objectStore(e),s=n.length,a=new Array(s);let u,c=0,l=0;const f=t=>{const e=t.target;a[e._pos]=e.result,++l===c&&r(a)},p=An(o);for(let t=0;t<s;++t)null!=n[t]&&(u=i.get(n[t]),u._pos=t,u.onsuccess=f,u.onerror=p,++c);0===c&&r(a)}),get:({trans:t,key:n})=>new Promise((r,o)=>{r=ge(r);const i=t.objectStore(e).get(n);i.onsuccess=t=>r(t.target.result),i.onerror=An(o)}),query:function(t){return n=>new Promise((o,i)=>{o=ge(o);const{trans:s,values:a,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:p}=c,h=s.objectStore(e),d=f.isPrimaryKey?h:h.index(f.name),y=r(p);if(0===u)return o({result:[]});if(t){const t=a?d.getAll(y,l):d.getAllKeys(y,l);t.onsuccess=t=>o({result:t.target.result}),t.onerror=An(i)}else{let t=0;const e=a||!("openKeyCursor"in d)?d.openCursor(y):d.openKeyCursor(y),n=[];e.onsuccess=r=>{const i=e.result;return i?(n.push(a?i.value:i.primaryKey),++t===u?o({result:n}):void i.continue()):o({result:n})},e.onerror=An(i)}})}(i),openCursor:function({trans:t,values:n,query:o,reverse:i,unique:s}){return new Promise((a,u)=>{a=ge(a);const{index:c,range:l}=o,f=t.objectStore(e),p=c.isPrimaryKey?f:f.index(c.name),h=i?s?"prevunique":"prev":s?"nextunique":"next",d=n||!("openKeyCursor"in p)?p.openCursor(r(l),h):p.openKeyCursor(r(l),h);d.onerror=An(u),d.onsuccess=ge(e=>{const n=d.result;if(!n)return void a(null);n.___id=++Bn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),s=()=>{throw new Error("Cursor not stopped")};n.trans=t,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=ge(u),n.next=function(){let t=1;return this.start(()=>t--?this.continue():this.stop()).then(()=>this)},n.start=t=>{const e=new Promise((t,e)=>{t=ge(t),d.onerror=An(e),n.fail=e,n.stop=e=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=s,t(e)}}),a=()=>{if(d.result)try{t()}catch(t){n.fail(t)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=ge(t=>{d.onsuccess=a,a()}),n.continue=r,n.continuePrimaryKey=o,n.advance=i,a(),e},a(n)},u)})},count({query:t,trans:n}){const{index:o,range:i}=t;return new Promise((t,s)=>{const a=n.objectStore(e),u=o.isPrimaryKey?a:a.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=ge(e=>t(e.target.result)),l.onerror=An(s)})}}}(t)),a={};return s.forEach(t=>a[t.name]=t),{stack:"dbcore",transaction:t.transaction.bind(t),table(t){if(!a[t])throw new Error(`Table '${t}' not found`);return a[t]},MIN_KEY:-1/0,MAX_KEY:Ln(e),schema:o}}(e,n,o),t.dbcore);return{dbcore:i}}(t._middlewares,n,t._deps,e);t.core=r.dbcore,t.tables.forEach(e=>{const n=e.name;t.core.schema.tables.some(t=>t.name===n)&&(e.core=t.core.table(n),t[n]instanceof t.Table&&(t[n].core=e.core))})}function Kn({_novip:t},e,n,r){n.forEach(n=>{const o=r[n];e.forEach(e=>{const r=U(e,n);(!r||"value"in r&&void 0===r.value)&&(e===t.Transaction.prototype||e instanceof t.Transaction?R(e,n,{get(){return this.table(n)},set(t){M(this,n,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):e[n]=new t.Table(n,o))})})}function Wn({_novip:t},e){e.forEach(e=>{for(let n in e)e[n]instanceof t.Table&&delete e[n]})}function zn(t,e){return t._cfg.version-e._cfg.version}function qn(t,e){const n={del:[],add:[],change:[]};let r;for(r in t)e[r]||n.del.push(r);for(r in e){const o=t[r],i=e[r];if(o){const t={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!He)t.recreate=!0,n.change.push(t);else{const e=o.idxByName,r=i.idxByName;let s;for(s in e)r[s]||t.del.push(s);for(s in r){const n=e[s],o=r[s];n?n.src!==o.src&&t.change.push(o):t.add.push(o)}(t.del.length>0||t.add.length>0||t.change.length>0)&&n.change.push(t)}}else n.add.push([r,i])}return n}function Hn(t,e,n,r){const o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(t=>Yn(o,t)),o}function Yn(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function Gn(t,e,n){const r={};return V(e.objectStoreNames,0).forEach(t=>{const e=n.objectStore(t);let o=e.keyPath;const i=Dn(Mn(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),s=[];for(let t=0;t<e.indexNames.length;++t){const n=e.index(e.indexNames[t]);o=n.keyPath;var a=Dn(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);s.push(a)}r[t]=Rn(t,i,s)}),r}function Jn({_novip:t},e,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],s=n.objectStore(i);t._hasGetAll="getAll"in s;for(let t=0;t<s.indexNames.length;++t){const n=s.indexNames[t],r=s.index(n).keyPath,o="string"==typeof r?r:"["+V(r).join("+")+"]";if(e[i]){const t=e[i].idxByName[o];t&&(t.name=n,delete e[i].idxByName[o],e[i].idxByName[n]=t)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&P.WorkerGlobalScope&&P instanceof P.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(t._hasGetAll=!1)}class Xn{_parseStoresSpec(t,e){A(t).forEach(n=>{if(null!==t[n]){var r=t[n].split(",").map((t,e)=>{const n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Dn(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),k(r),0===e)}),o=r.shift();if(o.multi)throw new St.Schema("Primary key cannot be multi-valued");r.forEach(t=>{if(t.auto)throw new St.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new St.Schema("Index must have a name and cannot be an empty string")}),e[n]=Rn(n,o,r)}})}stores(t){const e=this.db;this._cfg.storesSource=this._cfg.storesSource?C(this._cfg.storesSource,t):t;const n=e._versions,r={};let o={};return n.forEach(t=>{C(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)}),e._dbSchema=o,Wn(e,[e._allTables,e,e.Transaction.prototype]),Kn(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],A(o),o),e._storeNames=A(o),this}upgrade(t){return this._cfg.contentUpgrade=Mt(this._cfg.contentUpgrade||Pt,t),this}}function Qn(t,e){let n=t._dbNamesDB;return n||(n=t._dbNamesDB=new mr(Xe,{addons:[],indexedDB:t,IDBKeyRange:e}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Zn(t){return t&&"function"==typeof t.databases}function tr(t){return Ee(function(){return Zt.letThrough=!0,t()})}function er(){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()}function nr(t){var e=e=>t.next(e),n=o(e),r=o(e=>t.throw(e));function o(t){return e=>{var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):k(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()}function rr(t,e,n){var r=arguments.length;if(r<2)throw new St.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[t,J(o),n]}function or(t,e,n,r,o){return re.resolve().then(()=>{const i=Zt.transless||Zt,s=t._createTransaction(e,n,t._dbSchema,r),a={trans:s,transless:i};if(r)s.idbtrans=r.idbtrans;else try{s.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===Ot.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>or(t,e,n,null,o))):Ue(r)}const u=ut(o);let c;u&&je();const l=re.follow(()=>{if(c=o.call(s,s),c)if(u){var t=Pe.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=nr(c))},a);return(c&&"function"==typeof c.then?re.resolve(c).then(t=>s.active?t:Ue(new St.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):l.then(()=>c)).then(t=>(r&&s._resolve(),s._completion.then(()=>t))).catch(t=>(s._reject(t),Ue(t)))})}function ir(t,e,n){const r=k(t)?t.slice():[t];for(let t=0;t<n;++t)r.push(e);return r}const sr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return{...t,table(e){const n=t.table(e),{schema:r}=n,o={},i=[];function s(t,e,n){const r=Vn(t),a=o[r]=o[r]||[],u=null==t?0:"string"==typeof t?1:t.length,c=e>0,l={...n,isVirtual:c,keyTail:e,keyLength:u,extractKey:$n(t),unique:!c&&n.unique};return a.push(l),l.isPrimaryKey||i.push(l),u>1&&s(2===u?t[0]:t.slice(0,u-1),e+1,n),a.sort((t,e)=>t.keyTail-e.keyTail),l}const a=s(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[a];for(const t of r.indexes)s(t.keyPath,0,t);function u(e){const n=e.query.index;return n.isVirtual?{...e,query:{index:n,range:(r=e.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:ir(r.lower,r.lowerOpen?t.MAX_KEY:t.MIN_KEY,o),lowerOpen:!0,upper:ir(r.upper,r.upperOpen?t.MIN_KEY:t.MAX_KEY,o),upperOpen:!0})}}:e;var r,o}const c={...n,schema:{...r,primaryKey:a,indexes:i,getIndexByKeyPath:function(t){const e=o[Vn(t)];return e&&e[0]}},count:t=>n.count(u(t)),query:t=>n.query(u(t)),openCursor(e){const{keyTail:r,isVirtual:o,keyLength:i}=e.query.index;return o?n.openCursor(u(e)).then(n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(ir(o,e.reverse?t.MAX_KEY:t.MIN_KEY,r)):e.unique?n.continue(n.key.slice(0,i).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(e,o){n.continuePrimaryKey(ir(e,t.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const t=n.key;return 1===i?t[0]:t.slice(0,i)}},value:{get:()=>n.value}});return o}(n)):n.openCursor(e)}};return c}}}};function ar(t,e,n,r){return n=n||{},r=r||"",A(t).forEach(o=>{if(I(e,o)){var i=t[o],s=e[o];if("object"==typeof i&&"object"==typeof s&&i&&s){const t=rt(i);t!==rt(s)?n[r+o]=e[o]:"Object"===t?ar(i,s,n,r+o+"."):i!==s&&(n[r+o]=e[o])}else i!==s&&(n[r+o]=e[o])}else n[r+o]=void 0}),A(e).forEach(o=>{I(t,o)||(n[r+o]=e[o])}),n}const ur={stack:"dbcore",name:"HooksMiddleware",level:2,create:t=>({...t,table(e){const n=t.table(e),{primaryKey:r}=n.schema,o={...n,mutate(t){const o=Zt.trans,{deleting:i,creating:s,updating:a}=o.table(e).hook;switch(t.type){case"add":if(s.fire===Pt)break;return o._promise("readwrite",()=>u(t),!0);case"put":if(s.fire===Pt&&a.fire===Pt)break;return o._promise("readwrite",()=>u(t),!0);case"delete":if(i.fire===Pt)break;return o._promise("readwrite",()=>u(t),!0);case"deleteRange":if(i.fire===Pt)break;return o._promise("readwrite",()=>function(t){return c(t.trans,t.range,1e4)}(t),!0)}return n.mutate(t);function u(t){const e=Zt.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?{...t,keys:o}:{...t}).type&&(t.values=[...t.values]),t.keys&&(t.keys=[...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(u=>{const c=o.map((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===t.type)i.fire.call(l,n,c,e);else if("add"===t.type||void 0===c){const i=s.fire.call(l,n,t.values[o],e);null==n&&null!=i&&(n=i,t.keys[o]=n,r.outbound||H(t.values[o],r.keyPath,n))}else{const r=ar(c,t.values[o]),i=a.fire.call(l,r,n,c,e);if(i){const e=t.values[o];Object.keys(i).forEach(t=>{I(e,t)?e[t]=i[t]:H(e,t,i[t])})}}return l});return n.mutate(t).then(({failures:e,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],s=c[r];null==i?s.onerror&&s.onerror(e[r]):s.onsuccess&&s.onsuccess("put"===t.type&&u[r]?t.values[r]:i)}return{failures:e,results:n,numFailures:r,lastResult:i}}).catch(t=>(c.forEach(e=>e.onerror&&e.onerror(t)),Promise.reject(t)))})}function c(t,e,o){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:o}).then(({result:n})=>u({type:"delete",keys:n,trans:t}).then(r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(t,{...e,lower:n[n.length-1],lowerOpen:!0},o)))}}};return o}})};function cr(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;const r=[];for(let o=0,i=0;o<e.keys.length&&i<t.length;++o)0===dn(e.keys[o],t[i])&&(r.push(n?tt(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}}const lr={stack:"dbcore",level:-1,create:t=>({table:e=>{const n=t.table(e);return{...n,getMany:t=>{if(!t.cache)return n.getMany(t);const e=cr(t.keys,t.trans._cache,"clone"===t.cache);return e?re.resolve(e):n.getMany(t).then(e=>(t.trans._cache={keys:t.keys,values:"clone"===t.cache?tt(e):e},e))},mutate:t=>("add"!==t.type&&(t.trans._cache=null),n.mutate(t))}}})};function fr(t){return!("from"in t)}const pr=function(t,e){if(!this){const e=new pr;return t&&"d"in t&&C(e,t),e}C(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function hr(t,e,n){const r=dn(e,n);if(isNaN(r))return;if(r>0)throw RangeError();if(fr(t))return C(t,{from:e,to:n,d:1});const o=t.l,i=t.r;if(dn(n,t.from)<0)return o?hr(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},br(t);if(dn(e,t.to)>0)return i?hr(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},br(t);dn(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),dn(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);const s=!t.r;o&&!t.l&&dr(t,o),i&&s&&dr(t,i)}function dr(t,e){fr(e)||function t(e,{from:n,to:r,l:o,r:i}){hr(e,n,r),o&&t(e,o),i&&t(e,i)}(t,e)}function yr(t){let e=fr(t)?null:{s:0,n:t};return{next(t){const n=arguments.length>0;for(;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&dn(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||dn(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}}}}function br(t){var e,n;const 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){const e="r"===o?"l":"r",n={...t},r=t[o];t.from=r.from,t.to=r.to,t[o]=r[o],n[o]=r[e],t[e]=n,n.d=vr(n)}t.d=vr(t)}function vr({r:t,l:e}){return(t?e?Math.max(t.d,e.d):t.d:e?e.d:0)+1}D(pr.prototype,{add(t){return dr(this,t),this},addKey(t){return hr(this,t,t),this},addKeys(t){return t.forEach(t=>hr(this,t,t)),this},[ot](){return yr(this)}});const gr={stack:"dbcore",level:0,create:t=>{const e=t.schema.name,n=new pr(t.MIN_KEY,t.MAX_KEY);return{...t,table:r=>{const o=t.table(r),{schema:i}=o,{primaryKey:s}=i,{extractKey:a,outbound:u}=s,c={...o,mutate:t=>{const s=t.trans,a=s.mutatedParts||(s.mutatedParts={}),u=t=>{const n=`idb://${e}/${r}/${t}`;return a[n]||(a[n]=new pr)},c=u(""),l=u(":dels"),{type:f}=t;let[p,h]="deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[];const d=t.trans._cache;return o.mutate(t).then(t=>{if(k(p)){"delete"!==f&&(p=t.results),c.addKeys(p);const e=cr(p,d);e||"add"===f||l.addKeys(p),(e||h)&&function(t,e,n,r){e.indexes.forEach(function(e){const o=t(e.name||"");function i(t){return null!=t?e.extractKey(t):null}const s=t=>e.multiEntry&&k(t)?t.forEach(t=>o.addKey(t)):o.addKey(t);(n||r).forEach((t,e)=>{const o=n&&i(n[e]),a=r&&i(r[e]);0!==dn(o,a)&&(null!=o&&s(o),null!=a&&s(a))})})}(u,i,e,h)}else if(p){const t={from:p.lower,to:p.upper};l.add(t),c.add(t)}else c.add(n),l.add(n),i.indexes.forEach(t=>u(t.name).add(n));return t})}},l=({query:{index:e,range:n}})=>{var r,o;return[e,new pr(null!==(r=n.lower)&&void 0!==r?r:t.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:t.MAX_KEY)]},f={get:t=>[s,new pr(t.key)],getMany:t=>[s,(new pr).addKeys(t.keys)],count:l,query:l,openCursor:l};return A(f).forEach(t=>{c[t]=function(i){const{subscr:s}=Zt;if(s){const c=t=>{const n=`idb://${e}/${r}/${t}`;return s[n]||(s[n]=new pr)},l=c(""),p=c(":dels"),[h,d]=f[t](i);if(c(h.name||"").add(d),!h.isPrimaryKey){if("count"!==t){const e="query"===t&&u&&i.values&&o.query({...i,values:!1});return o[t].apply(this,arguments).then(n=>{if("query"===t){if(u&&i.values)return e.then(({result:t})=>(l.addKeys(t),n));const t=i.values?n.result.map(a):n.result;i.values?l.addKeys(t):p.addKeys(t)}else if("openCursor"===t){const t=n,e=i.values;return t&&Object.create(t,{key:{get:()=>(p.addKey(t.primaryKey),t.key)},primaryKey:{get(){const e=t.primaryKey;return p.addKey(e),e}},value:{get:()=>(e&&l.addKey(t.primaryKey),t.value)}})}return n})}p.add(n)}}return o[t].apply(this,arguments)}}),c}}}};class mr{constructor(t,e){this._middlewares={},this.verno=0;const n=mr.dependencies;this._options=e={addons:mr.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...e},this._deps={indexedDB:e.indexedDB,IDBKeyRange:e.IDBKeyRange};const{addons:r}=e;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Pt,dbReadyPromise:null,cancelOpen:Pt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new re(t=>{o.dbReadyResolve=t}),o.openCanceller=new re((t,e)=>{o.cancelOpen=e}),this._state=o,this.name=t,this.on=on(this,"populate","blocked","versionchange","close",{ready:[Mt,Pt]}),this.on.ready.subscribe=F(this.on.ready.subscribe,t=>(e,n)=>{mr.vip(()=>{const r=this._state;if(r.openComplete)r.dbOpenError||re.resolve().then(e),n&&t(e);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(e),n&&t(e);else{t(e);const r=this;n||t(function t(){r.on.ready.unsubscribe(e),r.on.ready.unsubscribe(t)})}})}),this.Collection=(i=this,sn(vn.prototype,function(t,e){this.db=i;let n=en,r=null;if(e)try{n=e()}catch(t){r=t}const o=t._ctx,s=o.table,a=s.hook.reading.fire;this._ctx={table:s,index:o.index,isPrimKey:!o.index||s.schema.primKey.keyPath&&o.index===s.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==At?a:null}})),this.Table=function(t){return sn(rn.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:on(null,{creating:[Tt,Pt],reading:[kt,At],updating:[It,Pt],deleting:[Nt,Pt]})})}(this),this.Transaction=function(t){return sn(In.prototype,function(e,n,r,o,i){this.db=t,this.mode=e,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=on(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new re((t,e)=>{this._resolve=t,this._reject=e}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},t=>{var e=this.active;return this.active=!1,this.on.error.fire(t),this.parent?this.parent._reject(t):e&&this.idbtrans&&this.idbtrans.abort(),Ue(t)})})}(this),this.Version=function(t){return sn(Xn.prototype,function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(t){return sn(Pn.prototype,function(e,n,r){this.db=t,this._ctx={table:e,index:":id"===n?null:n,or:r};const o=t._deps.indexedDB;if(!o)throw new St.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(t,e)=>o.cmp(e,t),this._max=(t,e)=>o.cmp(t,e)>0?t:e,this._min=(t,e)=>o.cmp(t,e)<0?t:e,this._IDBKeyRange=t._deps.IDBKeyRange})}(this),this.on("versionchange",t=>{t.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",t=>{!t.newVersion||t.newVersion<t.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${t.oldVersion/10}`)}),this._maxKey=Ln(e.IDBKeyRange),this._createTransaction=(t,e,n,r)=>new this.Transaction(t,e,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=t=>{this.on("blocked").fire(t),qe.filter(t=>t.name===this.name&&t!==this&&!t._state.vcFired).map(e=>e.on("versionchange").fire(t))},this.use(sr),this.use(ur),this.use(gr),this.use(lr),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach(t=>t(this))}version(t){if(isNaN(t)||t<.1)throw new St.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new St.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const e=this._versions;var n=e.filter(e=>e._cfg.version===t)[0];return n||(n=new this.Version(t),e.push(n),e.sort(zn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(t){return this.idbdb&&(this._state.openComplete||Zt.letThrough||this._vip)?t():new re((t,e)=>{if(this._state.openComplete)return e(new St.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void e(new St.DatabaseClosed);this.open().catch(Pt)}this._state.dbReadyPromise.then(t,e)}).then(t)}use({stack:t,create:e,level:n,name:r}){r&&this.unuse({stack:t,name:r});const o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:e,level:null==n?10:n,name:r}),o.sort((t,e)=>t.level-e.level),this}unuse({stack:t,name:e,create:n}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(t=>n?t.create!==n:!!e&&t.name!==e)),this}open(){return function(t){const e=t._state,{indexedDB:n}=t._deps;if(e.isBeingOpened||t.idbdb)return e.dbReadyPromise.then(()=>e.dbOpenError?Ue(e.dbOpenError):t);ct&&(e.openCanceller._stackHolder=ht()),e.isBeingOpened=!0,e.dbOpenError=null,e.openComplete=!1;const r=e.openCanceller;function o(){if(e.openCanceller!==r)throw new St.DatabaseClosed("db.open() was cancelled")}let i=e.dbReadyResolve,s=null,a=!1;const u=()=>new re((r,i)=>{if(o(),!n)throw new St.MissingAPI;const u=t.name,c=e.autoSchema?n.open(u):n.open(u,Math.round(10*t.verno));if(!c)throw new St.MissingAPI;c.onerror=An(i),c.onblocked=ge(t._fireOnBlocked),c.onupgradeneeded=ge(r=>{if(s=c.transaction,e.autoSchema&&!t._options.allowEmptyDB){c.onerror=kn,s.abort(),c.result.close();const t=n.deleteDatabase(u);t.onsuccess=t.onerror=ge(()=>{i(new St.NoSuchDatabase(`Database ${u} doesnt exist`))})}else{s.onerror=An(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;a=o<1,t._novip.idbdb=c.result,function(t,e,n,r){const o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);const s=i._reject.bind(i),a=Zt.transless||Zt;Ee(()=>{Zt.trans=i,Zt.transless=a,0===e?(A(o).forEach(t=>{Hn(n,t,o[t].primKey,o[t].indexes)}),Fn(t,n),re.follow(()=>t.on.populate.fire(i)).catch(s)):function({_novip:t},e,n,r){const o=[],i=t._versions;let s=t._dbSchema=Gn(0,t.idbdb,r),a=!1;const u=i.filter(t=>t._cfg.version>=e);return u.forEach(i=>{o.push(()=>{const o=s,u=i._cfg.dbschema;Jn(t,o,r),Jn(t,u,r),s=t._dbSchema=u;const c=qn(o,u);c.add.forEach(t=>{Hn(r,t[0],t[1].primKey,t[1].indexes)}),c.change.forEach(t=>{if(t.recreate)throw new St.Upgrade("Not yet support for changing primary key");{const e=r.objectStore(t.name);t.add.forEach(t=>Yn(e,t)),t.change.forEach(t=>{e.deleteIndex(t.name),Yn(e,t)}),t.del.forEach(t=>e.deleteIndex(t))}});const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>e){Fn(t,r),n._memoizedTables={},a=!0;let e=Y(u);c.del.forEach(t=>{e[t]=o[t]}),Wn(t,[t.Transaction.prototype]),Kn(t,[t.Transaction.prototype],A(e),e),n.schema=e;const i=ut(l);let s;i&&je();const f=re.follow(()=>{if(s=l(n),s&&i){var t=Pe.bind(null,null);s.then(t,t)}});return s&&"function"==typeof s.then?re.resolve(s):f.then(()=>s)}}),o.push(e=>{a&&Ye||function(t,e){[].slice.call(e.db.objectStoreNames).forEach(n=>null==t[n]&&e.db.deleteObjectStore(n))}(i._cfg.dbschema,e),Wn(t,[t.Transaction.prototype]),Kn(t,[t.Transaction.prototype],t._storeNames,t._dbSchema),n.schema=t._dbSchema})}),function t(){return o.length?re.resolve(o.shift()(n.idbtrans)).then(t):re.resolve()}().then(()=>{var t,e;e=r,A(t=s).forEach(n=>{e.db.objectStoreNames.contains(n)||Hn(e,n,t[n].primKey,t[n].indexes)})})}(t,e,i,n).catch(s)})}(t,o/10,s,i)}},i),c.onsuccess=ge(()=>{s=null;const n=t._novip.idbdb=c.result,o=V(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");e.autoSchema?function({_novip:t},e,n){t.verno=e.version/10;const r=t._dbSchema=Gn(0,e,n);t._storeNames=V(e.objectStoreNames,0),Kn(t,[t._allTables],A(r),r)}(t,n,r):(Jn(t,t._dbSchema,r),function(t,e){const n=qn(Gn(0,t.idbdb,e),t._dbSchema);return!(n.add.length||n.change.some(t=>t.add.length||t.change.length))}(t,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Fn(t,r)}catch(t){}var i;qe.push(t),n.onversionchange=ge(n=>{e.vcFired=!0,t.on("versionchange").fire(n)}),n.onclose=ge(e=>{t.on("close").fire(e)}),a&&function({indexedDB:t,IDBKeyRange:e},n){!Zn(t)&&n!==Xe&&Qn(t,e).put({name:n}).catch(Pt)}(t._deps,u),r()},i)}).catch(t=>t&&"UnknownError"===t.name&&e.PR1398_maxLoop>0?(e.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),u()):re.reject(t));return re.race([r,("undefined"==typeof navigator?re.resolve():er()).then(u)]).then(()=>(o(),e.onReadyBeingFired=[],re.resolve(tr(()=>t.on.ready.fire(t.vip))).then(function n(){if(e.onReadyBeingFired.length>0){let r=e.onReadyBeingFired.reduce(Mt,Pt);return e.onReadyBeingFired=[],re.resolve(tr(()=>r(t.vip))).then(n)}}))).finally(()=>{e.onReadyBeingFired=null,e.isBeingOpened=!1}).then(()=>t).catch(n=>{e.dbOpenError=n;try{s&&s.abort()}catch(t){}return r===e.openCanceller&&t._close(),Ue(n)}).finally(()=>{e.openComplete=!0,i()})}(this)}_close(){const t=this._state,e=qe.indexOf(this);if(e>=0&&qe.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new re(e=>{t.dbReadyResolve=e}),t.openCanceller=new re((e,n)=>{t.cancelOpen=n})}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new St.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,e=this._state;return new re((n,r)=>{const o=()=>{this.close();var t=this._deps.indexedDB.deleteDatabase(this.name);t.onsuccess=ge(()=>{!function({indexedDB:t,IDBKeyRange:e},n){!Zn(t)&&n!==Xe&&Qn(t,e).delete(n).catch(Pt)}(this._deps,this.name),n()}),t.onerror=An(r),t.onblocked=this._fireOnBlocked};if(t)throw new St.InvalidArgument("Arguments not allowed in db.delete()");e.isBeingOpened?e.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return A(this._allTables).map(t=>this._allTables[t])}transaction(){const t=rr.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,e,n){let r=Zt.trans;r&&r.db===this&&-1===t.indexOf("!")||(r=null);const o=-1!==t.indexOf("?");let i,s;t=t.replace("!","").replace("?","");try{if(s=e.map(t=>{var e=t instanceof this.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||t===Qe)i=Qe;else{if("rw"!=t&&t!=Ze)throw new St.InvalidArgument("Invalid transaction mode: "+t);i=Ze}if(r){if(r.mode===Qe&&i===Ze){if(!o)throw new St.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&s.forEach(t=>{if(r&&-1===r.storeNames.indexOf(t)){if(!o)throw new St.SubTransaction("Table "+t+" not included in parent transaction.");r=null}}),o&&r&&!r.active&&(r=null)}}catch(t){return r?r._promise(null,(e,n)=>{n(t)}):Ue(t)}const a=or.bind(null,this,i,s,r,n);return r?r._promise(i,a,"lock"):Zt.trans?Ie(Zt.transless,()=>this._whenReady(a)):this._whenReady(a)}table(t){if(!I(this._allTables,t))throw new St.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const _r="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class wr{constructor(t){this._subscribe=t}subscribe(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}[_r](){return this}}function Or(t,e){return A(e).forEach(n=>{dr(t[n]||(t[n]=new pr),e[n])}),t}let xr;try{xr={indexedDB:P.indexedDB||P.mozIndexedDB||P.webkitIndexedDB||P.msIndexedDB,IDBKeyRange:P.IDBKeyRange||P.webkitIDBKeyRange}}catch(i){xr={indexedDB:null,IDBKeyRange:null}}const Sr=mr;function Er(t){let e=jr;try{jr=!0,Nn.storagemutated.fire(t)}finally{jr=e}}D(Sr,{...jt,delete:t=>new Sr(t,{addons:[]}).delete(),exists:t=>new Sr(t,{addons:[]}).open().then(t=>(t.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(t){try{return function({indexedDB:t,IDBKeyRange:e}){return Zn(t)?Promise.resolve(t.databases()).then(t=>t.map(t=>t.name).filter(t=>t!==Xe)):Qn(t,e).toCollection().primaryKeys()}(Sr.dependencies).then(t)}catch(t){return Ue(new St.MissingAPI)}},defineClass:()=>function(t){C(this,t)},ignoreTransaction:t=>Zt.trans?Ie(Zt.transless,t):t(),vip:tr,async:function(t){return function(){try{var e=nr(t.apply(this,arguments));return e&&"function"==typeof e.then?e:re.resolve(e)}catch(t){return Ue(t)}}},spawn:function(t,e,n){try{var r=nr(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:re.resolve(r)}catch(t){return Ue(t)}},currentTransaction:{get:()=>Zt.trans||null},waitFor:function(t,e){const n=re.resolve("function"==typeof t?Sr.ignoreTransaction(t):t).timeout(e||6e4);return Zt.trans?Zt.trans.waitFor(n):n},Promise:re,debug:{get:()=>ct,set:t=>{lt(t,"dexie"===t?()=>!0:Je)}},derive:L,extend:C,props:D,override:F,Events:on,on:Nn,liveQuery:function(t){let e,n=!1;const r=new wr(r=>{const o=ut(t);let i=!1,s={},a={};const u={get closed(){return i},unsubscribe:()=>{i=!0,Nn.storagemutated.unsubscribe(p)}};r.start&&r.start(u);let c=!1,l=!1;function f(){return A(a).some(t=>s[t]&&function(t,e){const n=yr(e);let r=n.next();if(r.done)return!1;let o=r.value;const i=yr(t);let s=i.next(o.from),a=s.value;for(;!r.done&&!s.done;){if(dn(a.from,o.to)<=0&&dn(a.to,o.from)>=0)return!0;dn(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(s=i.next(o.from)).value}return!1}(s[t],a[t]))}const p=t=>{Or(s,t),f()&&h()},h=()=>{if(c||i)return;s={};const d={},y=function(e){o&&je();const n=()=>Ee(t,{subscr:e,trans:null}),r=Zt.trans?Ie(Zt.transless,n):n();return o&&r.then(Pe,Pe),r}(d);l||(Nn(Cn,p),l=!0),c=!0,Promise.resolve(y).then(t=>{n=!0,e=t,c=!1,i||(f()?h():(s={},a=d,r.next&&r.next(t)))},t=>{c=!1,n=!1,r.error&&r.error(t),u.unsubscribe()})};return h(),u});return r.hasValue=()=>n,r.getValue=()=>e,r},extendObservabilitySet:Or,getByKeyPath:q,setByKeyPath:H,delByKeyPath:function(t,e){"string"==typeof e?H(t,e,void 0):"length"in e&&[].map.call(e,function(e){H(t,e,void 0)})},shallowClone:Y,deepClone:tt,getObjectDiff:ar,cmp:dn,asap:W,minKey:Ke,addons:[],connections:qe,errnames:Ot,dependencies:xr,semVer:Ve,version:Ve.split(".").map(t=>parseInt(t)).reduce((t,e,n)=>t+e/Math.pow(10,2*n))}),Sr.maxKey=Ln(Sr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Nn(Cn,t=>{if(!jr){let e;He?(e=document.createEvent("CustomEvent"),e.initCustomEvent(Tn,!0,!0,t)):e=new CustomEvent(Tn,{detail:t}),jr=!0,dispatchEvent(e),jr=!1}}),addEventListener(Tn,({detail:t})=>{jr||Er(t)}));let jr=!1;if("undefined"!=typeof BroadcastChannel){const t=new BroadcastChannel(Tn);"function"==typeof t.unref&&t.unref(),Nn(Cn,e=>{jr||t.postMessage(e)}),t.onmessage=t=>{t.data&&Er(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Nn(Cn,t=>{try{jr||("undefined"!=typeof localStorage&&localStorage.setItem(Tn,JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(e=>e.postMessage({type:Tn,changedParts:t})))}catch(t){}}),"undefined"!=typeof addEventListener&&addEventListener("storage",t=>{if(t.key===Tn){const e=JSON.parse(t.newValue);e&&Er(e.changedParts)}});const t=self.document&&navigator.serviceWorker;t&&t.addEventListener("message",function({data:t}){t&&t.type===Tn&&Er(t.changedParts)})}re.rejectionMapper=function(t,e){if(!t||t instanceof gt||t instanceof TypeError||t instanceof SyntaxError||!t.name||!Et[t.name])return t;var n=new Et[t.name](e||t.message,t);return"stack"in t&&R(n,"stack",{get:function(){return this.inner.stack}}),n},lt(ct,Je);var Pr=n(20367),Ar=n(22337);function kr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Cr extends mr{constructor(){super("EsmOffline"),kr(this,"syncQueue",void 0),kr(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function Tr(){return new Cr}const Nr=new Cr,Ir={},Dr=(0,Ar.Zd)("offline-synchronization",{});function Mr(){return Dr}async function Rr(){if(Dr.getState().synchronization)return;const t=await Nr.syncQueue.count(),e={},n=Object.entries(Ir),r=n.length,o={},i=new AbortController,s=()=>{const t=Dr.getState().synchronization;Dr.setState({synchronization:{...t,pendingCount:t.pendingCount-1}})};try{Dr.setState({synchronization:{totalCount:t,pendingCount:t,abortController:i}});for(let t=0;t<r&&n.length>0;t++)for(let t=n.length;t--;){const[r,a]=n[t],u=a.dependsOn.map(t=>e[t]);u.every(Boolean)&&(o[r]={},await Promise.all(u),e[r]=Lr(a,o,i,s),n.splice(t,1))}await Promise.allSettled(Object.values(e))}finally{Dr.setState({synchronization:void 0})}}async function Lr({type:t,dependsOn:e,process:n},r,o,i){const s=[],a=[],u=await $r();await Nr.syncQueue.where({type:t,userId:u}).each((t,e)=>{s.push([e.primaryKey,t.content,t.descriptor]),a.push(t.content)});for(let c=0;c<s.length;c++){const[l,f,{id:p,dependencies:h=[]}]=s[c];try{const i=await n(f,{abort:o,index:c,items:a,userId:u,dependencies:h.map(({id:t,type:n})=>e.includes(n)?r[n][t]:void 0)});void 0!==p&&(r[t][p]=i),await Nr.syncQueue.delete(l)}catch(t){await Nr.syncQueue.update(l,{lastError:{name:t?.name,message:t?.message??t?.toString()}})}finally{i()}}}async function $r(){const t=await(0,Pr.xC)();return t?.uuid||"*"}async function Ur(t,e,n,r){const o=r&&r.id;return void 0!==o&&await Nr.syncQueue.where({type:e,userId:t}).filter(t=>t?.descriptor.id===o).delete().catch(mr.errnames.DatabaseClosed),await Nr.syncQueue.add({type:e,content:n,userId:t,descriptor:r||{},createdOn:new Date}).catch(mr.errnames.DatabaseClosed,()=>-1)}async function Br(t,e,n){const r=await $r();return await Ur(r,t,e,n)}async function Vr(t,e){return(await Fr(t,e)).map(t=>t.content)}async function Fr(t,e){const n=e?{type:e,userId:t}:{userId:t};return await Nr.syncQueue.where(n).toArray().catch(mr.errnames.DatabaseClosed,()=>[])}async function Kr(t){const e=await $r();return await Vr(e,t)}async function Wr(t){const e=await $r();return await Fr(e,t)}async function zr(t){return await Nr.syncQueue.get(t).catch(mr.errnames.DatabaseClosed,()=>{})}function qr(t){return!!Ir[t]?.options.onBeginEditSyncItem}async function Hr(t){const e=await zr(t);if(!e)throw new Error(`No sync item with the ID ${t} exists.`);const n=Ir[e.type]?.options.onBeginEditSyncItem;if(!n)throw new Error(`A sync item with the ID ${t} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${e.type}" supports editing items.`);n(e)}async function Yr(t){await Nr.syncQueue.delete(t).catch(mr.errnames.DatabaseClosed)}function Gr(t,e,n,r={}){Ir[t]={type:t,dependsOn:e,process:n,options:r}}const Jr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xr;const Qr=new Uint8Array(16);function Zr(){if(!Xr&&(Xr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xr(Qr)}const to=[];for(let t=0;t<256;++t)to.push((t+256).toString(16).slice(1));const eo=function(t,e,n){if(Jr.randomUUID&&!e&&!t)return Jr.randomUUID();const r=(t=t||{}).random||(t.rng||Zr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return function(t,e=0){return to[t[e+0]]+to[t[e+1]]+to[t[e+2]]+to[t[e+3]]+"-"+to[t[e+4]]+to[t[e+5]]+"-"+to[t[e+6]]+to[t[e+7]]+"-"+to[t[e+8]]+to[t[e+9]]+"-"+to[t[e+10]]+to[t[e+11]]+to[t[e+12]]+to[t[e+13]]+to[t[e+14]]+to[t[e+15]]}(r)},no="OFFLINE+";function ro(){return no+eo()}function oo(t){return t.startsWith(no)}const io={};function so(){return Object.values(io)}function ao(t){io[t.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${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.`),io[t.id]=t}async function uo(t){const e=await vo();return await co(e,t)}async function co(t,e){const n=e?{type:e,users:t}:{users:t},r=new Cr;return await r.dynamicOfflineData.where(n).toArray().catch(mr.errnames.DatabaseClosed,()=>[])}async function lo(t,e){const n=await vo();return await fo(n,t,e)}async function fo(t,e,n){const r=new Cr,o=await r.dynamicOfflineData.get({type:e,identifier:n}).catch(mr.errnames.DatabaseClosed,()=>{});o?o.users.includes(t)||await r.dynamicOfflineData.update(o.id,{users:[...o.users,t]}).catch(mr.errnames.DatabaseClosed):await r.dynamicOfflineData.add({users:[t],type:e,identifier:n}).catch(mr.errnames.DatabaseClosed)}async function po(t,e){const n=await vo();return await ho(n,t,e)}async function ho(t,e,n){const r=new Cr,o=await r.dynamicOfflineData.get({type:e,identifier:n,users:t}).catch(mr.errnames.DatabaseClosed,()=>{});o&&(o.users.length>1?await r.dynamicOfflineData.update(o.id,{users:o.users.filter(e=>e!==t)}).catch(mr.errnames.DatabaseClosed):await r.dynamicOfflineData.delete(o.id).catch(mr.errnames.DatabaseClosed))}async function yo(t,e){const n=await uo(t);await Promise.all(n.map(async t=>bo(t.type,t.identifier,e)))}async function bo(t,e,n){await lo(t,e);const r=new Cr,o=await vo(),i=await r.dynamicOfflineData.get({type:t,identifier:e}).catch(mr.errnames.DatabaseClosed,()=>{}),s=so().filter(e=>e.type===t);if(!i)return;const a=await Promise.all(s.map(async t=>{try{return t.sync(e,n),{id:t.id,error:void 0}}catch(e){const n=e.message?.toString()??e.toString();return{id:t.id,error:n}}})),u=a.filter(t=>!t.error).map(t=>t.id),c=a.filter(t=>t.error).map(t=>t.id),l=a.filter(t=>t.error).map(t=>({handlerId:t.id,message:t.error})),f={syncedOn:new Date,syncedBy:o,succeededHandlers:u,erroredHandlers:c,errors:l};i.id&&await r.dynamicOfflineData.update(i.id,{syncState:f}).catch(mr.errnames.DatabaseClosed)}async function vo(){const t=(await(0,Pr.xC)()).uuid;if(!t)throw new Error("Using the dynamic offline data API requires a logged in user.");return t}const go=(0,Ar.Zd)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function mo(){return Oo(),go}function _o(t,e){Oo(),ao({type:"patient",displayName:e.displayName,id:t,isSynced:()=>Promise.resolve(!0),sync:(t,n)=>e.onOfflinePatientAdded({patientUuid:t,signal:n??(new AbortController).signal})})}async function wo(t){Oo(),await bo("patient",t)}function Oo(){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.")}},39791:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(32086);var o=n(25436),i=n(29240);function s(t){var e=this.__data__=new r.A(t);this.size=e.size}s.prototype.clear=function(){this.__data__=new r.A,this.size=0},s.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},s.prototype.get=function(t){return this.__data__.get(t)},s.prototype.has=function(t){return this.__data__.has(t)},s.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.A){var s=n.__data__;if(!o.A||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new i.A(s)}return n.set(t,e),this.size=n.size,this};const a=s},39933:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.retry=function(t){return void 0===t&&(t=-1),function(e){return e.lift(new s(t,e))}};var s=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.count,this.source))},t}(),a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.count=n,o.source=r,o}return o(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(i.Subscriber)},41136:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(95092),a=n(89152),u=n(87778);e.delayWhen=function(t,e){return e?function(n){return new f(n,e).lift(new c(t))}:function(e){return e.lift(new c(t))}};var c=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.delayDurationSelector))},t}(),l=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return o(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=u.subscribeToResult(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(a.OuterSubscriber),f=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return o(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new p(t,this.source))},e}(s.Observable),p=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return o(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(i.Subscriber)},41534:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.takeUntil=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new a(t),r=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return o(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(i.SimpleOuterSubscriber)},41727:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(422),o=n(63266),i=n(47429),s=n(13394),a=n(90624),u=n(94215),c=n(6727),l=n(78258),f=n(46713);e.subscribeTo=function(t){if(t&&"function"==typeof t[f.observable])return s.subscribeToObservable(t);if(a.isArrayLike(t))return r.subscribeToArray(t);if(u.isPromise(t))return o.subscribeToPromise(t);if(t&&"function"==typeof t[l.iterator])return i.subscribeToIterable(t);var e=c.isObject(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},42748:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(86735),o=n(89233);e.timestamp=function(t){return void 0===t&&(t=r.async),o.map(function(e){return new i(e,t.now())})};var i=function(t,e){this.value=t,this.timestamp=e};e.Timestamp=i},42839:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=1,r=Promise.resolve(),o={};function i(t){return t in o&&(delete o[t],!0)}e.Immediate={setImmediate:function(t){var e=n++;return o[e]=!0,r.then(function(){return i(e)&&t()}),e},clearImmediate:function(t){i(t)}},e.TestTools={pending:function(){return Object.keys(o).length}}},43132:(t,e,n)=>{"use strict";n.d(e,{y:()=>o});const r=t=>{let e;const n=new Set,r=(t,r)=>{const o="function"==typeof t?t(e):t;if(!Object.is(o,e)){const t=e;e=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},e,o),n.forEach(n=>n(e,t))}},o=()=>e,i={setState:r,getState:o,getInitialState:()=>s,subscribe:t=>(n.add(t),()=>n.delete(t)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=e=t(r,o,i);return i},o=t=>t?r(t):r},43381:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(21016),s=n(87778),a=n(89152);e.bufferToggle=function(t,e){return function(n){return n.lift(new u(t,e))}};var u=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.openings,this.closingSelector))},t}(),c=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.closingSelector=r,o.contexts=[],o.add(s.subscribeToResult(o,n)),o}return o(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new i.Subscription,r={buffer:[],subscription:n};e.push(r);var o=s.subscribeToResult(this,t,r);!o||o.closed?this.closeBuffer(r):(o.context=r,this.add(o),n.add(o))},e}(a.OuterSubscriber)},43670:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(88179);e.distinctUntilKeyChanged=function(t,e){return r.distinctUntilChanged(function(n,r){return e?e(n[t],r[t]):n[t]===r[t]})}},43716:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return o(e,t),e.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)}}},e}(n(21016).Subscription);e.SubjectSubscription=i},44310:(t,e,n)=>{"use strict";n.d(e,{K0:()=>st,dO:()=>V,Ef:()=>F,Yo:()=>at,No:()=>ut,zx:()=>ft,a9:()=>z,ES:()=>nt,Tj:()=>ot,xg:()=>rt,zF:()=>H,Fg:()=>mt,Q_:()=>Pt,Xb:()=>jt,Gp:()=>dt,VK:()=>it,FY:()=>pt,Ju:()=>gt,pm:()=>xt,io:()=>St,wG:()=>Tt,cL:()=>ht,Vx:()=>yt,sr:()=>bt,DQ:()=>q});var r=n(20367),o=n(95819),i=n(87440),s=n(76110),a=n(23184),u=n(52834),c=n(23517),l=n(39791),f=n(99271),p=n(26979);const h=function(t,e,n){(void 0!==n&&!(0,p.A)(t[e],n)||void 0===n&&!(e in t))&&(0,f.A)(t,e,n)},d=function(t,e,n){for(var r=-1,o=Object(t),i=n(t),s=i.length;s--;){var a=i[++r];if(!1===e(o[a],a,o))break}return t};var y=n(521),b=n(65246),v=n(80084),g=n(33339),m=n(61697),_=n(96956),w=n(31475),O=n(47313);var x=n(15821),S=n(50405),E=n(97942),j=n(78938),P=n(17283);const A=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var k=n(28078),C=n(15150);const T=function(t,e,n,r,o,i,s){var a,u=A(t,n),c=A(e,n),l=s.get(c);if(l)h(t,n,l);else{var f=i?i(u,c,n+"",t,e,s):void 0,p=void 0===f;if(p){var d=(0,_.A)(c),T=!d&&(0,x.A)(c),N=!d&&!T&&(0,P.A)(c);f=c,d||T||N?(0,_.A)(u)?f=u:(a=u,(0,O.A)(a)&&(0,w.A)(a)?f=(0,v.A)(u):T?(p=!1,f=(0,y.A)(c,!0)):N?(p=!1,f=(0,b.A)(c,!0)):f=[]):(0,j.A)(c)||(0,m.A)(c)?(f=u,(0,m.A)(u)?f=function(t){return(0,k.A)(t,(0,C.A)(t))}(u):(0,E.A)(u)&&!(0,S.A)(u)||(f=(0,g.A)(c))):p=!1}p&&(s.set(c,f),o(f,c,r,i,s),s.delete(c)),h(t,n,f)}},N=function t(e,n,r,o,i){e!==n&&d(n,function(s,a){if(i||(i=new l.A),(0,E.A)(s))T(e,n,a,r,t,o,i);else{var u=o?o(A(e,a),s,a+"",e,n,i):void 0;void 0===u&&(u=s),h(e,a,u)}},C.A)};var I=n(14151),D=n(63220),M=n(20206);var R=n(85378);const L=($=function(t,e,n){N(t,e,n)},U=function(t,e){var n=-1,r=e.length,o=r>1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=$.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!(0,E.A)(n))return!1;var r=typeof e;return!!("number"==r?(0,w.A)(n)&&(0,R.A)(e,n.length):"string"==r&&e in n)&&(0,p.A)(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var s=e[n];s&&$(t,s,n)}return t},(0,M.A)((0,D.A)(U,B,I.A),U+""));var $,U,B;function V(t=!0,e=!1){return F((0,u.s)(),t,e)}function F(t,e=!0,n=!1){return Boolean(t?e:n)}var K=n(22337);const W=(0,K.Zd)("extensionsInternal",{slots:{},extensions:{}}),z=()=>(0,K.jf)("extensionsInternal",{slots:{},extensions:{}});function q(t){const e=W.getState(),n=t(e);n!==e&&W.setState(n)}const H=()=>(0,K.jf)("extensions",{slots:{}});function Y(t){const e=[];for(let n of Object.values(t.extensions))for(let t of n.instances)e.push({slotModuleName:t.slotModuleName,extensionModuleName:n.moduleName,slotName:t.slotName,extensionId:t.id});(0,c.A)(o.hs.getState().mountedExtensions,e)||o.hs.setState({mountedExtensions:e})}Y(W.getState()),W.subscribe(Y);const G=z(),J=H(),X=(0,o.YP)(),Q=(0,o.GI)();function Z(t,e,n,r,i){const s={},a=(0,u.s)(),l=Object.entries(r.flags).filter(([,{enabled:t}])=>t).map(([t])=>t);for(let[r,u]of Object.entries(t.slots)){const{config:c}=(0,o.vu)(e,u.name),f=lt(r,t,c,n,l,a,i.session);s[r]={moduleName:u.moduleName,assignedExtensions:f}}(0,c.A)(J.getState().slots,s)||J.setState({slots:s})}function tt(){Z(G.getState(),X.getState(),Q.getState(),s.jX.getState(),r.eA.getState())}function et(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}}function nt(t){const[e]=t.split("#");return e}function rt(t,e){const n=nt(e);return t.extensions[n]}function ot(t){return rt(G.getState(),t)}G.subscribe(t=>{Z(t,X.getState(),Q.getState(),s.jX.getState(),r.eA.getState())}),X.subscribe(t=>{Z(G.getState(),t,Q.getState(),s.jX.getState(),r.eA.getState())}),Q.subscribe(t=>{Z(G.getState(),X.getState(),t,s.jX.getState(),r.eA.getState())}),s.jX.subscribe(t=>{Z(G.getState(),X.getState(),Q.getState(),t,r.eA.getState())}),r.eA.subscribe(t=>{Z(G.getState(),X.getState(),Q.getState(),s.jX.getState(),t)}),tt(),(0,a.gj)(tt);const it=t=>G.setState(e=>(e.extensions[t.name]={...t,instances:[]},e));function st(t,e){q(n=>{const r=n.slots[t];return r?{...n,slots:{...n.slots,[t]:{...r,attachedIds:[...r.attachedIds,e]}}}:{...n,slots:{...n.slots,[t]:{...et(t),attachedIds:[e]}}}})}function at(t,e){q(n=>{const r=n.slots[t];return r&&r.attachedIds.includes(e)?{...n,slots:{...n.slots,[t]:{...r,attachedIds:r.attachedIds.filter(t=>t!==e)}}}:n})}function ut(t){q(e=>{const n=e.slots[t];return n?{...e,slots:{...e.slots,[t]:{...n,attachedIds:[]}}}:e})}function ct(t,e,n,r){const o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const e=r.indexOf(t);return-1!==e?2e3+e:-1}}function lt(t,e,n,s,a,u,c){const l=function(t,e){const n=t.add||[],r=t.remove||[],o=t.order||[],{extensions:i}=G.getState();return[...e,...n].filter(t=>!r.includes(t)).sort((t,n)=>{const r=ct(t,o,i[nt(t)]?.order,e),s=ct(n,o,i[nt(n)]?.order,e);return-1===s?-1:-1===r?1:r-s})}(n,e.slots[t].attachedIds),f=[];for(let p of l){const{config:l}=(0,o.P0)(s,t,p),h=(0,o.g$)(n,t,p),d=L(l,h),y=nt(p),b=e.extensions[y];if(b){const t=d?.["Display conditions"]?.privileges??b.privileges??[];if(t&&("string"==typeof t||Array.isArray(t)&&t.length>0)){if(!c?.user)continue;if(!(0,r.st)(t,c.user))continue}const e=d?.["Display conditions"]?.expression??null;if(null!==e)try{if(!(0,i.eb)(e,{session:c}))continue}catch(t){console.error(`Error while evaluating expression ${e}`,t);continue}if(b.featureFlag&&!a.includes(b.featureFlag))continue;if(window.offlineEnabled&&!F(u,b.online,b.offline))continue;f.push({id:p,name:y,moduleName:b.moduleName,config:d,featureFlag:b.featureFlag,meta:b.meta,online:d?.["Display conditions"]?.online??b.online??!0,offline:d?.["Display conditions"]?.offline??b.offline??!1})}}return f}function ft(t){const e=G.getState(),{config:n}=(0,o.G9)(t),i=Q.getState(),a=s.jX.getState(),c=r.eA.getState(),l=(0,u.s)();return lt(t,e,n,i,Object.entries(a.flags).filter(([,{enabled:t}])=>t).map(([t])=>t),l,c.session)}const pt=(t,e)=>G.setState(n=>{const r=n.slots[e]?.moduleName;if(r&&r!=t)return console.warn(`An extension slot with the name '${e}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),n;if(r&&r==t)return n;if(n.slots[e])return{...n,slots:{...n.slots,[e]:{...n.slots[e],moduleName:t}}};const o=et(e,t);return{...n,slots:{...n.slots,[e]:o}}}),ht=()=>J.setState(()=>({slots:{},extensions:{}})),dt=(0,K.Zd)("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function yt({name:t,basePath:e,mode:n,componentContext:r}){dt.setState({slotName:t,basePath:e,mode:n??"normal",componentContext:r})}function bt(t){dt.getState().slotName===t&&dt.setState(dt.getInitialState(),!0)}const vt=(0,K.Zd)("modalRegistry",{modals:{}});function gt(t){vt.setState(e=>(e.modals[t.name]=t,e))}function mt(t){let e=vt.getState().modals[t];if(!e){const n=ot(t);n&&(e={name:t,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${t} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),gt(e))}return e}var _t=n(7661);const wt=(0,K.Zd)("workspaceRegistrations",{workspaces:{}}),Ot=(0,K.Zd)("workspaceGroups",{workspaceGroups:{}});function xt(t){wt.setState(e=>({workspaces:{...e.workspaces,[t.name]:{...t,load:t.load,preferredWindowSize:t.preferredWindowSize??"normal",type:t.type??"form",canHide:t.canHide??!1,canMaximize:t.canMaximize??!1,width:t.width??"narrow",groups:t.groups??[]}}}))}function St(t){Ot.setState(e=>{const n=e.workspaceGroups[t.name];return n?{workspaceGroups:{...e.workspaceGroups,[t.name]:{...n,members:Array.from(new Set([...n.members,...t.members]))}}}:{workspaceGroups:{...e.workspaceGroups,[t.name]:{name:t.name,members:t.members}}}})}const Et=new Set;function jt(t){const e=wt.getState().workspaces;if(e[t])return e[t];{const e=ot(t);if(e)return Et.has(t)||(console.warn(`The workspace '${t}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),Et.add(t)),{name:e.name,title:At(e),moduleName:e.moduleName,preferredWindowSize:e.meta?.screenSize??"normal",load:e.load,type:e.meta?.type??"form",canHide:e.meta?.canHide??!1,canMaximize:e.meta?.canMaximize??!1,width:e.meta?.width??"narrow",groups:e.meta?.groups??[]};throw new Error(`No workspace named '${t}' has been registered.`)}}function Pt(t){const e=Ot.getState().workspaceGroups;if(e[t])return e[t];throw new Error(`No workspace group named '${t}' has been registered.`)}function At(t){const e=t?.meta?.title;return"string"==typeof e?e:e&&"object"==typeof e?(0,_t.t)(t.moduleName,e.key,e.default):t.name}var kt=n(22244);let Ct=0;async function Tt(t,e,n,r,o=t=>t,i={}){const s=nt(r),a=ot(r);let u=null;if(t){if(!a)throw Error(`Couldn't find extension '${s}' to attach to '${e}'`);const{meta:c,moduleName:l,online:f,offline:p,load:h}=a;if(V(f,p)){q(o=>{const i={domElement:t,id:r,slotName:e,slotModuleName:n};return{...o,extensions:{...o.extensions,[s]:{...o.extensions[s],instances:[...o.extensions[s].instances,i]}}}});const a=await h(),f=Ct++;u=(0,kt.xL)(o({...a,name:`${e}/${s}-${f}`}),{...i,_meta:c,_extensionContext:{extensionId:r,extensionSlotName:e,extensionSlotModuleName:n,extensionModuleName:l},domElement:t})}}else console.warn(`Tried to render ${r} into ${e} but no DOM element was available.`);return u}},44856:(t,e,n)=>{"use strict";function r(t){setTimeout(function(){throw t},0)}n.d(e,{T:()=>r})},45276:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(85295),s=n(80743),a=n(75901);e.onErrorResumeNext=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&s.isArray(t[0])&&(t=t[0]),function(e){return e.lift(new u(t))}},e.onErrorResumeNextStatic=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n;return 1===t.length&&s.isArray(t[0])&&(t=t[0]),n=t.shift(),i.from(n).lift(new u(t))};var u=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.nextSources))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return o(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new a.SimpleInnerSubscriber(this),n=this.destination;n.add(e);var r=a.innerSubscribe(t,e);r!==e&&n.add(r)}else this.destination.complete()},e}(a.SimpleOuterSubscriber)},46713:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},47313:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},47429:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(78258);e.subscribeToIterable=function(t){return function(e){for(var n=t[r.iterator]();;){var o=void 0;try{o=n.next()}catch(t){return e.error(t),e}if(o.done){e.complete();break}if(e.next(o.value),e.closed)break}return"function"==typeof n.return&&e.add(function(){n.return&&n.return()}),e}}},47893:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},47986:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(23935),o=n(67446),i=n(85791);e.of=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return r.isScheduler(n)?(t.pop(),i.scheduleArray(t,n)):o.fromArray(t)}},49184:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(49529),o=n(85203),i=n(71077);function s(){return new i.Subject}e.share=function(){return function(t){return o.refCount()(r.multicast(s)(t))}}},49529:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(27432);e.multicast=function(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new o(i,e));var s=Object.create(n,r.connectableObservableDescriptor);return s.source=n,s.subjectFactory=i,s}};var o=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),o=n(r).subscribe(t);return o.add(e.subscribe(r)),o},t}();e.MulticastOperator=o},50405:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(62135),o=n(97942);const i=function(t){if(!(0,o.A)(t))return!1;var e=(0,r.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},51026:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.skipUntil=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.notifier))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new i.SimpleInnerSubscriber(r);r.add(o),r.innerSubscription=o;var s=i.innerSubscribe(n,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return o(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(i.SimpleOuterSubscriber)},51069:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(21016),s=n(75901);e.bufferWhen=function(t){return function(e){return e.lift(new a(t))}};var a=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.closingSelector))},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return o(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(s.innerSubscribe(e,new s.SimpleInnerSubscriber(this))),this.subscribing=!1},e}(s.SimpleOuterSubscriber)},51812:t=>{"use strict";t.exports={hex2rgb:function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,n,r){return e+e+n+n+r+r});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},rgb2hex:function(t){return"#"+["r","g","b"].map(function(e){return("0"+t[e].toString(16)).slice(-2)}).join("")},rgb2hsl:function(t){var e=t.r,n=t.g,r=t.b;e/=255,n/=255,r/=255;var o,i,s=Math.max(e,n,r),a=Math.min(e,n,r),u=(s+a)/2;if(s===a)o=i=0;else{var c=s-a;switch(i=u>.5?c/(2-s-a):c/(s+a),s){case e:o=(n-r)/c+(n<r?6:0);break;case n:o=(r-e)/c+2;break;case r:o=(e-n)/c+4}o/=6}return{h:o,s:i,l:u}},hsl2rgb:function(t){function e(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var n,r,o,i=t.h,s=t.s,a=t.l;if(0===s)n=r=o=a;else{var u=a<.5?a*(1+s):a+s-a*s,c=2*a-u;n=e(c,u,i+1/3),r=e(c,u,i),o=e(c,u,i-1/3)}return{r:Math.round(255*n),g:Math.round(255*r),b:Math.round(255*o)}},rgb2rgbString:function(t){return"rgb("+[t.r,t.g,t.b].join(",")+")"}}},52834:(t,e,n)=>{"use strict";function r(t){return!window.offlineEnabled||(t??navigator.onLine)}n.d(e,{s:()=>r})},53271:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},53325:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(75901);e.retryWhen=function(t){return function(e){return e.lift(new a(t,e))}};var a=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.notifier,this.source))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.notifier=n,o.source=r,o}return o(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new i.Subject;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=s.innerSubscribe(r,new s.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(s.SimpleOuterSubscriber)},53721:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(11276),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const s=i?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}(i(t),function(e){return o.call(t,e)}))}:r.A},53912:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noop=function(){}},54332:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.sequenceEqual=function(t,e){return function(n){return n.lift(new s(t,e))}};var s=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.compareTo,this.comparator))},t}();e.SequenceEqualOperator=s;var a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.compareTo=n,o.comparator=r,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(n.subscribe(new u(e,o))),o}return o(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this,e=t._a,n=t._b,r=t.comparator;e.length>0&&n.length>0;){var o=e.shift(),i=n.shift(),s=!1;try{s=r?r(o,i):o===i}catch(t){this.destination.error(t)}s||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(i.Subscriber);e.SequenceEqualSubscriber=a;var u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return o(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(i.Subscriber)},55152:(t,e,n)=>{"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{A:()=>r})},55169:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n){return t.call(this)||this}return o(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(21016).Subscription);e.Action=i},55985:(t,e,n)=>{"use strict";n.d(e,{A:()=>p});var r=n(61469),o=n(1343);function i(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}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return 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 u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){var e=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}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}(this,n)}}var p=function(){!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&&c(t,e)}(n,o.Component);var t,e=f(n);function n(t){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),a(l(r=e.call(this,t)),"handleRef",function(t){r.el=t}),a(l(r),"addThingToDo",function(t,e){r.state.hasError&&"unmount"!==t||(r.nextThingToDo=(r.nextThingToDo||Promise.resolve()).then(function(){if(!r.unmounted||"unmount"===t)return e.apply(void 0,arguments)}).catch(function(e){throw r.nextThingToDo=Promise.resolve(),r.setState({hasError:!0}),e&&e.message&&(e.message="During '".concat(t,"', parcel threw an error: ").concat(e.message)),r.props.handleError?r.props.handleError(e):setTimeout(function(){throw e}),e}))}),a(l(r),"getParcelProps",function(){var t=s(s({},r.props),{},{domElement:r.el});return delete t.mountParcel,delete t.config,delete t.wrapWith,delete t.wrapStyle,delete t.appendTo,delete t.handleError,delete t.parcelDidMount,t}),r.state={hasError:!1},!t.config)throw new Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return r}return(t=[{key:"componentDidMount",value:function(){var t=this;this.unmounted=!1,this.addThingToDo("mount",function(){var e,n=t.props.mountParcel||t.mountParcel;if(!n)throw new Error("\n\t\t\t\t <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n\t\t\t\t If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop\t\n\t\t\t\t");return t.el?e=t.el:(t.createdDomElement=e=document.createElement(t.props.wrapWith),Object.keys(t.props.wrapStyle).forEach(function(n){e.style[n]=t.props.wrapStyle[n]}),t.props.appendTo.appendChild(e)),t.parcel=n(t.props.config,s({domElement:e},t.getParcelProps())),t.parcel.mountPromise.then(t.props.parcelDidMount),t.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var t=this;this.addThingToDo("update",function(){if(t.parcel&&t.parcel.update)return t.parcel.update(t.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var t=this;this.addThingToDo("unmount",function(){if(t.parcel&&"MOUNTED"===t.parcel.getStatus())return t.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var t=this;if(this.props.appendTo)return r.i&&r.i.Consumer?o.createElement(r.i.Consumer,null,function(e){return t.mountParcel=e?e.mountParcel:null,null}):null;var e=r.i&&r.i.Consumer?o.createElement(r.i.Consumer,null,function(e){return t.mountParcel=e?e.mountParcel:null,null}):void 0;return o.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},e)}}])&&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)}}(n.prototype,t),n}();a(p,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}})},56051:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.dematerialize=function(){return function(t){return t.lift(new s)}};var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}(),a=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(i.Subscriber)},57001:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(71929);e.max=function(t){var e="function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e};return r.reduce(e)}},57338:t=>{"use strict";var e=t.exports=function(t){return this instanceof e?(this.tagName=t,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new e(t)};e.prototype.appendChild=function(t){return this.children.push(t),this.lastChild=t,this},e.prototype.setAttribute=function(t,e){return this.attributes[t]=e,this},e.prototype.toString=function(){var t=this;return["<",t.tagName,Object.keys(t.attributes).map(function(e){return[" ",e,'="',t.attributes[e],'"'].join("")}).join(""),">",t.children.map(function(t){return t.toString()}).join(""),"</",t.tagName,">"].join("")}},57366:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2519),o=n(64629),i=n(8347),s=n(90952),a=n(85624);e.elementAt=function(t,e){if(t<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(u){return u.pipe(o.filter(function(e,n){return n===t}),a.take(1),n?s.defaultIfEmpty(e):i.throwIfEmpty(function(){return new r.ArgumentOutOfRangeError}))}}},57894:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(80743),s=n(67446),a=n(89152),u=n(87778);e.race=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!i.isArray(t[0]))return t[0];t=t[0]}return s.fromArray(t,void 0).lift(new c)};var c=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}();e.RaceOperator=c;var l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return o(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],o=u.subscribeToResult(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(t,e,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var o=this.subscriptions[r];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(e)},e}(a.OuterSubscriber);e.RaceSubscriber=l},58126:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t){return function(e){return t(e)}}},58139:(t,e,n)=>{"use strict";t.exports=n(93296)},58379:(t,e,n)=>{"use strict";n.d(e,{zq:()=>o,i_:()=>s,YY:()=>u,W3:()=>m,p6:()=>E,fS:()=>j,qw:()=>A,rr:()=>d,sc:()=>B,ns:()=>$,mw:()=>gt,JK:()=>L,g9:()=>U,xl:()=>At,F7:()=>R,Ie:()=>V,Us:()=>K,Tt:()=>z,CX:()=>b,_9:()=>H,yJ:()=>Y,UK:()=>Z,zD:()=>tt,Fx:()=>rt,d7:()=>ot,jn:()=>S,E4:()=>at,$B:()=>ut,br:()=>v,Wq:()=>ct,uL:()=>y,Gz:()=>lt,u:()=>pt,oq:()=>St,vL:()=>Et,to:()=>vt,CH:()=>ht,qv:()=>Pt,if:()=>kt,TA:()=>Ct,kH:()=>Tt,Wr:()=>Nt,Jm:()=>It,Bf:()=>Ot,iy:()=>_t,Ed:()=>dt,M3:()=>Dt,WQ:()=>Rt,tQ:()=>$t,wJ:()=>Ut,oU:()=>Bt,wV:()=>Yt,Pj:()=>p,mQ:()=>h,fq:()=>zt,xH:()=>Wt,wr:()=>qt});var r=n(1343);const o=(0,r.createContext)({moduleName:"",featureName:""});var i=n(11305);function s({to:t,templateParams:e,onBeforeNavigate:n,children:o,...s}){return(0,r.useEffect)(()=>{s.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${s.href}'`),s.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${t}`)},[]),r.createElement("a",{onClick:r=>function(t,e,n,r){0!==t.button||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey||(t.preventDefault(),r?.(t),(0,i.oo)({to:e,templateParams:n})),0===t.button&&(t.ctrlKey||t.metaKey)&&r?.(t),0===t.button&&t.shiftKey&&r?.(t),1===t.button&&r?.(t)}(r,t,e,n),href:(0,i.JG)(t,e),...s},o)}var a=n(44310);const u=({state:t,children:e,...n})=>{const{extension:i}=(0,r.useContext)(o),s=(0,r.useRef)(null),u=(0,r.useRef)(Promise.resolve()),c=(0,r.useCallback)(e=>{i?.extensionSlotName&&i.extensionSlotModuleName&&i.extensionSlotModuleName&&!s.current&&(0,a.wG)(e,i.extensionSlotName,i.extensionSlotModuleName,i.extensionId,void 0,t).then(t=>{s.current=t})},[]);return(0,r.useEffect)(()=>()=>{if(s&&s.current)switch(s.current.getStatus()){case"MOUNTING":s.current.mountPromise.then(()=>{"MOUNTED"===s.current?.getStatus()&&s.current.unmount()});break;case"MOUNTED":s.current.unmount();break;case"UPDATING":u.current&&u.current.then(()=>{"MOUNTED"===s.current?.getStatus()&&s.current.unmount()})}},[]),(0,r.useEffect)(()=>{s.current&&s.current.update&&"UNMOUNTING"!==s.current.getStatus()&&Promise.all([s.current.mountPromise,u.current]).then(()=>{"MOUNTED"===s?.current?.getStatus()&&s.current.update&&(u.current=s.current.update({...t}).catch(t=>{if(!(t instanceof Error&&t.message.includes("minified message #32")&&"MOUNTED"!==s.current?.getStatus()))throw t}))})},[t]),i?r.createElement("div",{ref:c,"data-extension-id":i?.extensionId,style:{position:"relative"},...n}):null};var c=n(22337);function l(t,e){"function"==typeof e&&(e=e(t));const n={};for(const[r,o]of Object.entries(e)){const e=function(...e){t.setState(t=>o(t,...e))};n[r]=e}return n}const f=()=>t=>t;function p(t,e=f(),n){const[o,i]=(0,r.useState)(()=>e(t.getState()));return(0,r.useEffect)(()=>(0,c.i7)(t,e,i),[t,e]),{...o,...(0,r.useMemo)(()=>n?l(t,n):{},[t,n])}}function h(t,e){return p(t,f(),e)}function d(t){return function(e){const[n,o]=(0,r.useState)(t.getState());return(0,r.useEffect)(()=>t.subscribe(t=>o(t)),[]),{...n,...(0,r.useMemo)(()=>e?l(t,e):{},[e])}}}const y=t=>p((0,a.zF)(),e=>e.slots?.[t]);function b(t){const e=y(t);return e?.assignedExtensions??[]}function v(t){const{moduleName:e}=(0,r.useContext)(o);if(!e)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,r.useEffect)(()=>{(0,a.FY)(e,t)},[]),{extensions:b(t),extensionSlotName:t,extensionSlotModuleName:e}}function g(t){return t}function m({name:t,extensionSlotName:e,select:n=g,children:i,state:s,style:a,...c}){if(i&&s)throw new Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");const l=t??e,f=(0,r.useRef)(null),{extensions:p,extensionSlotModuleName:h}=v(l),d=(0,r.useMemo)(()=>n(p),[n,p]),y=(0,r.useMemo)(()=>{if("function"==typeof i&&!r.isValidElement(i))return d.map(t=>i(t,s))},[i,d]);return r.createElement("div",{ref:f,"data-extension-slot-name":l,"data-extension-slot-module-name":h,style:{...a,position:"relative"},...c},l&&d?.map((t,e)=>r.createElement(o.Provider,{key:t.id,value:{moduleName:h,featureName:"",extension:{extensionId:t.id,extensionSlotName:l,extensionSlotModuleName:h}}},y?.[e]??("function"!=typeof i?i:null)??r.createElement(u,{state:s}))))}const _=(0,n(43132).y)()(()=>({}));(0,c.CE)("openmrs-app-context",_);const w=Object();function O(t,e){_.setState(n=>(t in n||(n[t]={}),n[t]=e(n[t]),Object.assign({},n)))}var x=n(27388);function S(t,e){const n=(0,r.useRef)(e??{}),o=(0,r.useRef)(e=>O(t,e));return(0,r.useEffect)(()=>(function(t,e=w){_.setState(n=>{if(t in n)throw new Error(`Attempted to re-register namespace ${t} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},n,{[t]:e===w?{}:e})})}(t,e??{}),()=>{!function(t){_.setState(e=>(t in e&&delete e[t],e))}(t)}),[t]),(0,r.useEffect)(()=>{let r=e??{};(0,x.b)(n.current,r)||(O(t,()=>r),n.current=r)},[e]),o.current}function E({namespace:t,value:e}){return S(t,e),null}const j=({children:t,value:e,fallback:n})=>Boolean(e)?r.createElement(r.Fragment,null,t):n?r.createElement(r.Fragment,null,n):null;var P=n(20367);const A=({privilege:t,fallback:e,children:n})=>{const[o,i]=(0,r.useState)(null);return(0,r.useEffect)(()=>{const t=(0,P.HW)({includeAuthStatus:!1}).subscribe(i);return()=>t.unsubscribe()},[]),o&&(0,P.st)(t,o)?r.createElement(r.Fragment,null,n):e?r.createElement(r.Fragment,null,e):null};var k=n(25873),C=n(61469),T=n(93150),N=n(71123);const I={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},D=new Map,M={errorRetryCount:3,fetcher:P.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,provider:()=>D};function R(t){if("object"!=typeof t||"string"!=typeof t.featureName||"string"!=typeof t.moduleName)throw new Error("Invalid options");const e=Object.assign({},I,t),n={...M,...e.swrConfig};return function(t){var i,s,a,u;return s=i=class extends r.Component{componentDidCatch(t,n){n&&n.componentStack&&(t.extra=Object.assign(t.extra||{},{componentStack:n.componentStack})),e.throwErrorsToConsole&&setTimeout(()=>{throw t}),this.setState({caughtError:t,caughtErrorInfo:n})}render(){if(this.state.caughtError)return r.createElement("div",null,"An error has occurred. Please try reloading the page.");{const i=r.createElement(r.Suspense,{fallback:null},r.createElement(N.BE,{value:n},r.createElement(o.Provider,{value:this.state.config},e.disableTranslations?r.createElement(t,this.props):r.createElement(T.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},r.createElement(t,this.props)))));return e.strictMode&&r.StrictMode?r.createElement(r.StrictMode,null,i):i}}constructor(t){super(t),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:e.moduleName,featureName:e.featureName,extension:t._extensionContext}}}},a="displayName",u=`OpenmrsReactComponent(${e.featureName})`,a in s?Object.defineProperty(s,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[a]=u,i}}function L(t,e){return(0,C.A)({React:r,ReactDOMClient:k,rootComponent:R(e)(t)})}function $(t,e){return()=>t().then(({default:t})=>L(t,e))}function U(t,e){return()=>Promise.resolve(L(t,e))}const B=$;function V(){const t=(0,r.useRef)();return t.current&&!t.current.signal.aborted||(t.current=new AbortController),(0,r.useEffect)(()=>{const e=t.current;return()=>e?.abort()},[]),t.current}const F=V;function K(t,e=t=>t??{}){const[n,o]=(0,r.useState)();return(0,r.useEffect)(()=>{if(null==t||""===t.replace(" ",""))throw new Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${t}".`)},[t]),(0,r.useEffect)(()=>function(t,e){let n=function(t,e=t=>t){const n=_.getState();return t in n?Object.freeze(Object.assign({},e?e(n[t]):n[t])):null}(t);return e(Object.freeze(Object.assign({},n))),_.subscribe(r=>{let o=t in r?r[t]:null;o!==n&&(n=o,e(Object.freeze(Object.assign({},o))))})}(t,t=>{if(void 0!==t){const r=e?e(t):t??{};(0,x.b)(n,r)||o(r)}}),[]),n}var W=n(23517);function z(t){const[e,n]=(0,r.useState)([]);return(0,r.useEffect)(()=>(0,a.zF)().subscribe(r=>{const o=r.slots[t]?.assignedExtensions.map(t=>t.id)??[];(0,W.A)(o,e)||n(o)}),[]),e}var q=n(9166);function H(t,e){const{data:n,error:o,mutate:i,isLoading:s,isValidating:a}=(0,N.Ay)(`${q.Zu}?patient=${t}&includeEncounterless=${e}`,P.lo);return(0,r.useMemo)(()=>({isLoading:s,data:n?.data.results??[],error:o,mutate:i,isValidating:a}),[n,o,s,a,i])}function Y(t){(0,r.useEffect)(()=>{if(t){const t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}}},[t])}var G=n(95819);const J={},X='No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".';function Q(t){const e=(0,r.useMemo)(G.GI,[]),n=function(t,e){const[n,o]=(0,r.useState)(function(t,e){return e?()=>{const n=t.getState(),r=(0,G.P0)(n,e.extensionSlotName,e.extensionId);if(r.loaded&&r.config)return r.config}:null}(t,e));return(0,r.useEffect)(()=>{if(e)return t.subscribe(t=>{const r=(0,G.P0)(t,e.extensionSlotName,e.extensionId);r.loaded&&r.config&&!(0,W.A)(r.config,n)&&o(r.config)})},[t,e,n]),n}(e,t);if(!n&&t){const n=`${t.extensionSlotName}-${t.extensionId}`;throw!J[n]&&e&&(J[n]=function(t,e){return new Promise(n=>{const r=t.subscribe(t=>{const o=(0,G.P0)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(n(o.config),r())})})}(e,t)),J[n]}return n||{}}function Z(t){const{moduleName:e,extension:n}=(0,r.useContext)(o),i=t?.externalModuleName??e;if(!i&&!n)throw Error(X);const s=function(t){const e=(0,r.useMemo)(()=>(0,G.IS)(t),[t]),n=t,o=function(t){const[e,n]=(0,r.useState)(function(t){return()=>{const e=t.getState();return e.loaded&&e.config?e.config:null}}(t));return(0,r.useEffect)(()=>t?.subscribe(t=>{t.loaded&&t.config&&n(t.config)}),[t]),e}(e);if(!o)throw J[n]||(J[n]=function(t){return new Promise(e=>{const n=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),n())})})}(e)),J[n];return o}(i),a=Q(n);return(0,r.useMemo)(()=>t?.externalModuleName&&i===t.externalModuleName?{...s}:{...s,...a},[i,t?.externalModuleName,s,a])}const tt=b;var et=n(23184),nt=n(52834);function rt(){let[t,e]=(0,r.useState)((0,nt.s)());return(0,r.useEffect)(()=>(0,et.gj)(({online:t})=>e(t)),[]),t}function ot(t,e=300){const[n,o]=(0,r.useState)(t);return(0,r.useEffect)(()=>{const n=setTimeout(()=>{o(t)},e);return()=>{clearTimeout(n)}},[t,e]),n}var it=n(88010);const st=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([t,e])=>`${t}:${e}`).join(",")}`;function at(){const t=`${P.Jj}/emrapi/configuration?v=${st}`,e=it(t,P.lo);return(0,r.useMemo)(()=>({emrConfiguration:e.data?.data,isLoadingEmrConfiguration:e.isLoading,mutateEmrConfiguration:e.mutate,errorFetchingEmrConfiguration:e.error}),[e])}const ut=d((0,a.a9)());function ct(t){const e=b(t);return(0,r.useMemo)(()=>Object.fromEntries(e.map(t=>[t.name,t.meta])),[e])}const lt=d((0,a.zF)());var ft=n(76110);function pt(t){const{flags:e}=p(ft.jX);return e[t]?.enabled??!1}function ht(){const[,t]=(0,r.useState)(0);return(0,r.useCallback)(()=>{t(t=>t+1)},[])}function dt(t,e,n={}){return bt(t,e,yt,n)}const yt={getPaginatedUrl:(t,e,n)=>{if(t){const r=new URL((0,P.Gm)(t.toString()),window.location.toString());return r.searchParams.set("limit",""+e),r.searchParams.set("startIndex",""+n),r.searchParams.set("totalCount","true"),r.toString()}return null},getNextUrl:t=>{const e=t?.links?.find(t=>"next"==t.rel)?.uri;if(e){const t=new URL(e);return t.host=window.location.host,t.protocol=window.location.protocol,t.toString()}return null},getTotalCount:t=>t?.totalCount??Number.NaN,getCurrentPageSize:t=>t?.results?.length??Number.NaN,getData:t=>t?.results};function bt(t,e,n,o={}){const{getPaginatedUrl:i,getTotalCount:s,getCurrentPageSize:a,getData:u}=n,{immutable:c,swrConfig:l}=o,f=o.fetcher??P.lo,[p,h]=(0,r.useState)(1),d=(0,r.useRef)(Number.NaN),y=(0,r.useRef)(Number.NaN),b=e,v=(p-1)*e,g=(0,r.useMemo)(()=>i(t,b,v),[t,b,v]),m=c?it:N.Ay,{data:_,...w}=m(g,f,l);_?.data&&(d.current=s(_?.data),y.current=a(_?.data));const O=Math.ceil(d.current/e),x=(0,r.useCallback)(t=>{0<t&&t<=O?h(t):console.warn("Invalid attempt to go to out of bounds page: "+t)},[t,p,O]),S=(0,r.useCallback)(()=>{x(p+1)},[t,p,O]),E=(0,r.useCallback)(()=>{x(p-1)},[t,p,O]);return{data:u(_?.data),totalPages:O,totalCount:d.current,currentPage:p,currentPageSize:y,paginated:O>1,showNextButton:p<O,showPreviousButton:p>1,goTo:x,goToNext:S,goToPrevious:E,...w}}function vt(t,e,n={}){return bt(t,e,gt(),n)}function gt(){return{getPaginatedUrl:(t,e,n)=>{if(t){const r=new URL((0,P.Gm)(t.toString()),window.location.toString());return r.searchParams.set("_count",""+e),r.searchParams.set("_getpagesoffset",""+n),r.toString()}return null},getNextUrl:t=>{const e=t?.link?.find(t=>"next"==t.relation)?.url;if(e){const t=new URL(e);return t.host=window.location.host,t.protocol=window.location.protocol,t.toString()}return null},getTotalCount:t=>t?.total??Number.NaN,getCurrentPageSize:t=>t?.entry?.length??Number.NaN,getData:t=>t?.entry?.map(t=>t.resource)}}var mt=n(98394);function _t(t,e={}){return wt(t,yt,e)}function wt(t,e,n={}){const{swrInfiniteConfig:o,immutable:i}=n,{getNextUrl:s,getTotalCount:a,getData:u}=e,c=n.fetcher??P.lo,l=(0,r.useCallback)((n,r)=>0==n?t?.toString()??null:e.getNextUrl(r.data),[t]),{data:f,size:p,setSize:h,...d}=mt(l,c,{...o,...i?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),y=s(f?.[f.length-1].data),b=null!=y,v=a(f?.[0]?.data);return{data:f?.flatMap(t=>u(t.data)),totalCount:v,hasMore:b,loadMore:()=>{h((f?.length??0)+1)},nextUri:y,...d}}function Ot(t,e={}){return xt(t,yt,e)}function xt(t,e,n={}){const o=wt(t,e,n),{hasMore:i,error:s,data:a,loadMore:u,isLoading:c,nextUri:l}=o;return(0,r.useEffect)(()=>{i&&!s&&u()},[i,l]),n.partialData?o:{...o,data:i||s?void 0:a,isLoading:c||i}}function St(t,e={}){return xt(t,gt(),e)}function Et(t,e={}){return wt(t,gt(),e)}function jt(){let t="tablet";return document.body.classList.forEach(e=>{switch(e){case"omrs-breakpoint-lt-tablet":t="phone";break;case"omrs-breakpoint-gt-small-desktop":t="large-desktop";break;case"omrs-breakpoint-gt-tablet":t="small-desktop"}}),t}function Pt(){const[t,e]=(0,r.useState)(jt);return(0,r.useEffect)(()=>{const t=()=>{e(jt())};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),t}const At=t=>"small-desktop"===t||"large-desktop"===t;function kt(t){const e=(0,r.useContext)(o);(0,r.useEffect)(()=>(e&&e.moduleName&&(t.componentContext=e),(0,a.Vx)(t),()=>{(0,a.sr)(t.name)}),[e,t])}function Ct(){return p(a.Gp)}function Tt(t=null,e=null){const[n,o]=(0,r.useState)([]);return(0,r.useEffect)(()=>{const n=(0,q.Vs)(t,e).subscribe(t=>{o(t)},t=>{console.error(t)});return()=>n.unsubscribe()},[t,e]),n}function Nt(t,e=!0){const n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{const r=r=>{e&&n.current&&!n.current.contains(r.target)&&t(r)};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),()=>{window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}},[t,e]),n}function It(t){const e=(0,r.useRef)();return(0,r.useEffect)(()=>{const n=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting)return void t()},{threshold:1});return e.current&&n.observe(e.current),()=>{e.current&&n.unobserve(e.current)}},[e.current,t]),e}function Dt(t,e={}){const{abortController:n,fetchInit:o,url:i,swrConfig:s}=e,a=F(),u=(0,r.useMemo)(()=>o?.signal??n?.signal??a.signal,[n?.signal,o?.signal,a.signal]),c=(0,r.useCallback)(t=>{const e=function(t,e){if(e)return"function"==typeof e?e(t):e;if("string"==typeof t)return t;throw new Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${t}.`)}(t,i);return(0,P.lo)(e,{...o,signal:u})},[u,o,i]);return(0,N.Ay)(t,c,s)}const Mt=10;function Rt(t=[],e=Mt){const[n,o]=(0,r.useState)(1),i=(0,r.useMemo)(()=>"number"==typeof e&&e>0?Math.max(1,Math.ceil(t.length/e)):1,[t.length,e]),s=(0,r.useMemo)(()=>{const r=(n-1)*e,o=(n+0)*e;return t.slice(r,o)},[t,n,e]),a=(0,r.useCallback)(t=>{o(Math.max(1,Math.min(i,t)))},[o,i]),u=(0,r.useCallback)(()=>{n<i&&o(n+1)},[n,i,o]),c=(0,r.useCallback)(()=>{n>1&&o(n-1)},[n,o]);return(0,r.useMemo)(()=>({results:s,totalPages:i,currentPage:n,paginated:t.length>e,showNextButton:n<i,showPreviousButton:n>1,goTo:a,goToNext:u,goToPrevious:c}),[s,i,t.length,e,n,a,u,c])}function Lt(){const t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]}function $t(t){const[e,n]=(0,r.useState)(t??Lt()),{data:o,error:i,isValidating:s}=(0,N.Ay)(e?["patient",e]:null,()=>(0,q.hG)(e,{}));return(0,r.useEffect)(()=>{const t=()=>{const t=Lt();t!==e&&n(t)};return window.addEventListener("single-spa:routing-event",t),()=>window.removeEventListener("single-spa:routing-event",t)},[e]),(0,r.useMemo)(()=>({isLoading:s&&!i&&!o,patient:o,patientUuid:e,error:i}),[s,i,o,e])}function Ut(){const t=`${P.Jj}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:e,error:n,isLoading:o}=(0,N.Ay)(t,P.lo);return(0,r.useMemo)(()=>({primaryIdentifierCode:e?.data?.results[0]?.metadataUuid,isLoading:o,error:n}),[e,n,o])}function Bt(t){const{extensions:e,extensionSlotModuleName:n}=v(t);return t?e.map(e=>({state:i})=>r.createElement(o.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:n}}},r.createElement(u,{state:i}))):[]}var Vt=n(23464),Ft=n(85602);const Kt={setVisitContext:(t,e)=>null==e?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:e.uuid,patientUuid:e.patient?.uuid},mutateVisit(t){for(const e of Object.values(t.mutateVisitCallbacks??{}))e();return{}}};function Wt(t){const e=(0,r.useId)();return(0,r.useEffect)(()=>{const n=(0,q.BX)();return t&&n.setState({mutateVisitCallbacks:{...n.getState().mutateVisitCallbacks,[e]:t}}),()=>{if(t){const t={...n.getState().mutateVisitCallbacks};delete t[e],n.setState({mutateVisitCallbacks:t})}}},[e,t]),h((0,q.BX)(),Kt)}function zt(t,e=q.Rb){const{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:i}=Wt(),s=t&&n==t?o:null,a=`?patient=${t}&v=${e}&includeInactive=false`,u=`/${s}?v=${e}`,{data:c,error:l,mutate:f,isValidating:p}=(0,N.Ay)(t?`${P.Jj}/visit${a}`:null,P.lo),{data:h,error:d,mutate:y,isValidating:b}=(0,N.Ay)(t&&s?`${P.Jj}/visit${u}`:null,P.lo),v=(0,r.useMemo)(()=>c?.data.results.find(t=>null===t.stopDatetime)??null,[c]),g=(0,r.useMemo)(()=>s&&h?h.data:null,[h,s]),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{!p&&v&&n===t&&null===o&&i(v),b||(m.current&&g&&m.current.uuid===g.uuid&&!m.current.stopDatetime&&g.stopDatetime&&i(null),m.current=g)},[g,o,v,p,b,n]);const _=(0,r.useCallback)(()=>{f(),y()},[f,y]);return Wt(_),{error:l||d,mutate:_,isValidating:p||b,activeVisit:v,currentVisit:g,currentVisitIsRetrospective:Boolean(s),isLoading:Boolean((!c||s&&!h)&&(!l||!d))}}function qt(){const[t,e]=(0,r.useState)([]);return(0,r.useEffect)(()=>{const t=(0,q.Pu)().subscribe(t=>{e(t)},t=>console.error(t));return()=>t.unsubscribe()},[]),t}let Ht;function Yt(){const t=(0,r.useRef)(),[e,n]=(0,r.useState)(null);let o=null;if(!e){if(Ht){const t=(0,P.EW)().getState();t.loaded&&(o=t.session)}else Ht=new Promise(e=>{const n=({loaded:n,session:r})=>{n&&(e(r),o=r,t.current&&(t.current(),t.current=void 0))};n((0,P.EW)().getState()),o||(t.current=(0,P.EW)().subscribe(n))});if(!o)throw Ht;n(o)}(0,r.useEffect)(()=>(t.current||(t.current=(0,P.EW)().subscribe(({loaded:t,session:e})=>{t&&(o=e,n(e))})),()=>{t.current&&(t.current(),t.current=void 0)}),[]);const i=e||o;if(!i)throw Ht?(console.warn("useSession is in an unexpected state. Attempting to recover."),Ht):Error("useSession is in an invalid state.");return i}Vt.extend(Ft)},58440:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(75901);e.repeatWhen=function(t){return function(e){return e.lift(new a(t))}};var a=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.notifier,e))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.notifier=n,o.source=r,o.sourceIsBeingSubscribedTo=!0,o}return o(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new i.Subject;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=s.innerSubscribe(e,new s.SimpleInnerSubscriber(this))},e}(s.SimpleOuterSubscriber)},58538:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return o(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(70469).AsyncAction);e.QueueAction=i},58636:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),e.$$rxSubscriber=e.rxSubscriber},59468:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hostReportError=function(t){setTimeout(function(){throw t},0)}},59768:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.debounce=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(i.SimpleOuterSubscriber)},60208:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(80980);e.concatAll=function(){return r.mergeAll(1)}},60315:(t,e,n)=>{"use strict";n.d(e,{$:()=>o});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},60781:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(89233),s=n(85295),a=n(75901);function u(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(u(function(n,r){return s.from(t(n,r)).pipe(i.map(function(t,o){return e(n,t,r,o)}))},n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new c(t,n))})}e.mergeMap=u;var c=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.project,this.concurrent))},t}();e.MergeMapOperator=c;var l=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new a.SimpleInnerSubscriber(this),n=this.destination;n.add(e);var r=a.innerSubscribe(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(a.SimpleOuterSubscriber);e.MergeMapSubscriber=l,e.flatMap=u},60937:(t,e,n)=>{"use strict";n.d(e,{J:()=>i,N:()=>o});var r=n(23184);function o(t){const e=s(t);setTimeout(()=>{throw e})}function i(){const t=Error();return e=>{s(e).stack+=`\nAsync stacktrace:\n${t.stack}`,o(e)}}function s(t){let e;if(t instanceof Error)return t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e=`Object thrown as error: ${JSON.stringify(t)}`}catch(n){e=`Object thrown as error with the following properties: ${Object.keys(t)}`}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())}window.onerror=function(t){return console.error("Unexpected error: ",t),(0,r.Vt)({description:t??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(t){console.error("Unhandled rejection: ",t.reason),(0,r.Vt)({description:t.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}},61115:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(86735),o=n(85002),i=n(26691),s=n(89233);e.timeInterval=function(t){return void 0===t&&(t=r.async),function(e){return i.defer(function(){return e.pipe(o.scan(function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}},{current:t.now(),value:void 0,last:void 0}),s.map(function(t){var e=t.current,n=t.last,r=t.value;return new a(r,e-n)}))})}};var a=function(t,e){this.value=t,this.interval=e};e.TimeInterval=a},61171:(t,e,n)=>{"use strict";n.d(e,{v:()=>l});var r=n(32505),o=n(18364),i=n(90979),s=n(29075),a=n(18904),u=n(60315),c=n(44856),l=function(t){function e(n,r,o){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=i.I;break;case 1:if(!n){s.destination=i.I;break}if("object"==typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new f(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new f(s,n,r,o)}return s}return r.C6(e,t),e.prototype[a.D]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(s.y),f=function(t){function e(e,n,r,s){var a,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return(0,o.T)(n)?a=n:n&&(a=n.next,r=n.error,s=n.complete,n!==i.I&&(c=Object.create(n),(0,o.T)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=r,u._complete=s,u}return r.C6(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.$.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=u.$.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):(0,c.T)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;(0,c.T)(t)}}},e.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)};u.$.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),u.$.useDeprecatedSynchronousErrorHandling)throw t;(0,c.T)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.$.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return u.$.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):((0,c.T)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},61469:(t,e,n)=>{"use strict";function r(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}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(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(a(n)));return function(){var t=n(e);if(!(t instanceof 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(a(t)));return t}}n.d(e,{A:()=>f,i:()=>c});var c=null;try{c=require("react").createContext()}catch(r){}var l={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function f(t){if("object"!==i(t))throw new Error("single-spa-react requires a configuration object");var e,n=o(o({},l),t);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!==(e=n.ReactDOMClient)&&void 0!==e&&e.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!c&&n.React.createContext&&(c=n.React.createContext()),n.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}(n);var r={bootstrap:p.bind(null,n),mount:h.bind(null,n),unmount:d.bind(null,n)};return n.parcelCanUpdate&&(r.update=y.bind(null,n)),r}function p(t,e){return t.rootComponent?Promise.resolve():t.loadRootComponent(e).then(function(e){t.rootComponent=e})}function h(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.errorBoundaryClass||(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=g(t,e,function(){n(this)}),i=u(t,e)(),s=function(t){var e=t.renderType,n=t.elementToRender,r=t.domElement,o=t.reactDom[e];if("function"!=typeof o)throw new Error('renderType "'.concat(e,'" did not return a function.'));switch(e){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:b(t),renderType:v(t)});t.domElements[e.name]=i,t.renderResults[e.name]=s})}function d(t,e){return new Promise(function(n){t.unmountResolves[e.name]=n;var r=t.renderResults[e.name];r&&r.unmount?r.unmount():b(t).unmountComponentAtNode(t.domElements[e.name]),delete t.domElements[e.name],delete t.renderResults[e.name]})}function y(t,e){return new Promise(function(n){t.updateResolves[e.name]||(t.updateResolves[e.name]=[]),t.updateResolves[e.name].push(n);var r=g(t,e,null),o=t.renderResults[e.name];if(o&&o.render)o.render(r);else{var i=u(t,e)();b(t).render(r,i)}})}function b(t){return t.ReactDOMClient||t.ReactDOM}function v(t){return"function"==typeof t.renderType?t.renderType():t.renderType}function g(t,e,n){var r=t.React.createElement(t.rootComponent,e),i=c?t.React.createElement(c.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),i=t.React.createElement(t.errorBoundaryClass,e,i)),t.React.createElement(t.SingleSpaRoot,o(o({},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(){t.unmountResolves[e.name]&&(t.unmountResolves[e.name](),delete t.unmountResolves[e.name])}}),i)}},61650:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(99623),o=n(47986);e.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return r.concat(e,o.of.apply(void 0,t))}}},61697:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(62135),o=n(47313);const i=function(t){return(0,o.A)(t)&&"[object Arguments]"==(0,r.A)(t)};var s=Object.prototype,a=s.hasOwnProperty,u=s.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(t){return(0,o.A)(t)&&a.call(t,"callee")&&!u.call(t,"callee")}},61758:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(91465);const o=function(){try{var t=(0,r.A)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},62135:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var r=n(83516),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r.A?r.A.toStringTag:void 0;var u=Object.prototype.toString;var c=r.A?r.A.toStringTag:void 0;const l=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?function(t){var e=i.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[a]=n:delete t[a]),o}(t):function(t){return u.call(t)}(t)}},62637:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}();e.EmptyError=n},62988:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(60781);e.mergeMapTo=function(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?r.mergeMap(function(){return t},e,n):("number"==typeof e&&(n=e),r.mergeMap(function(){return t},n))}},63220:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=Math.max;const o=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,s=r(o.length-e,0),a=Array(s);++i<s;)a[i]=o[e+i];i=-1;for(var u=Array(e+1);++i<e;)u[i]=o[i];return u[e]=n(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)}(t,this,u)}}},63266:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(59468);e.subscribeToPromise=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,r.hostReportError),e}}},63792:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(58538),o=n(78831);e.queueScheduler=new o.QueueScheduler(r.QueueAction),e.queue=e.queueScheduler},64103:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.not=function(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}},64494:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(53271),o=n(96956);const i=function(t,e,n){var i=e(t);return(0,o.A)(t)?i:(0,r.A)(i,n(t))}},64629:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.filter=function(t,e){return function(n){return n.lift(new s(t,e))}};var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return o(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.Subscriber)},64868:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(85356);e.zip=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(r.zip.apply(void 0,[e].concat(t)))}}},65246:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(88724);const o=function(t,e){var n=e?(0,r.A)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},65893:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.exhaust=function(){return function(t){return t.lift(new s)}};var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return o(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(t,new i.SimpleInnerSubscriber(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.SimpleOuterSubscriber)},66255:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(99623);e.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(r.concat.apply(void 0,[e].concat(t)))}}},66740:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDate=function(t){return t instanceof Date&&!isNaN(+t)}},67124:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.skip=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.total))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return o(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(i.Subscriber)},67244:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t,e){return function(n){return t(e(n))}}},67446:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(422),i=n(85791);e.fromArray=function(t,e){return e?i.scheduleArray(t,e):new r.Observable(o.subscribeToArray(t))}},67595:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(77759),o=n(58636),i=n(74143);e.toSubscriber=function(t,e,n){if(t){if(t instanceof r.Subscriber)return t;if(t[o.rxSubscriber])return t[o.rxSubscriber]()}return t||e||n?new r.Subscriber(t,e,n):new r.Subscriber(i.empty)}},67606:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(46713);e.isInteropObservable=function(t){return t&&"function"==typeof t[r.observable]}},67670:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12873),o=n(91039),i=n(85791),s=n(34178),a=n(67606),u=n(94215),c=n(90624),l=n(74442);e.scheduled=function(t,e){if(null!=t){if(a.isInteropObservable(t))return r.scheduleObservable(t,e);if(u.isPromise(t))return o.schedulePromise(t,e);if(c.isArrayLike(t))return i.scheduleArray(t,e);if(l.isIterable(t)||"string"==typeof t)return s.scheduleIterable(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},68022:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(53912),a=n(84864);e.tap=function(t,e,n){return function(r){return r.lift(new u(t,e,n))}};var u=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.nextOrObserver,this.error,this.complete))},t}(),c=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i._tapNext=s.noop,i._tapError=s.noop,i._tapComplete=s.noop,i._tapError=r||s.noop,i._tapComplete=o||s.noop,a.isFunction(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||s.noop,i._tapError=n.error||s.noop,i._tapComplete=n.complete||s.noop),i}return o(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(i.Subscriber)},68515:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(17545);function o(t){var e=function(t){if("object"!=(0,r.A)(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=(0,r.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==(0,r.A)(e)?e:e+""}},70469:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return o(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(n(55169).Action);e.AsyncAction=i},71077:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(95092),s=n(77759),a=n(21016),u=n(18860),c=n(43716),l=n(58636),f=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return o(e,t),e}(s.Subscriber);e.SubjectSubscriber=f;var p=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return o(e,t),e.prototype[l.rxSubscriber]=function(){return new f(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;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},e.prototype.complete=function(){if(this.closed)throw new u.ObjectUnsubscribedError;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},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.isStopped?(t.complete(),a.Subscription.EMPTY):(this.observers.push(t),new c.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new i.Observable;return t.source=this,t},e.create=function(t,e){return new h(t,e)},e}(i.Observable);e.Subject=p;var h=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return o(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):a.Subscription.EMPTY},e}(p);e.AnonymousSubject=h},71123:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>c,BE:()=>u});var r=n(1343),o=n(58139),i=n(55434);const s=r.use||(t=>{if("pending"===t.status)throw t;if("fulfilled"===t.status)return t.value;throw"rejected"===t.status?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)}),a={dedupe:!0},u=i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig}),c=(0,i.withArgs)((t,e,n)=>{const{cache:u,compare:c,suspense:l,fallbackData:f,revalidateOnMount:p,revalidateIfStale:h,refreshInterval:d,refreshWhenHidden:y,refreshWhenOffline:b,keepPreviousData:v}=n,[g,m,_,w]=i.SWRGlobalState.get(u),[O,x]=(0,i.serialize)(t),S=(0,r.useRef)(!1),E=(0,r.useRef)(!1),j=(0,r.useRef)(O),P=(0,r.useRef)(e),A=(0,r.useRef)(n),k=()=>A.current,C=()=>k().isVisible()&&k().isOnline(),[T,N,I,D]=(0,i.createCacheHelper)(u,O),M=(0,r.useRef)({}).current,R=(0,i.isUndefined)(f)?n.fallback[O]:f,L=(t,e)=>{for(const n in M){const r=n;if("data"===r){if(!c(t[r],e[r])){if(!(0,i.isUndefined)(t[r]))return!1;if(!c(q,e[r]))return!1}}else if(e[r]!==t[r])return!1}return!0},$=(0,r.useMemo)(()=>{const t=!!O&&!!e&&((0,i.isUndefined)(p)?!k().isPaused()&&!l&&(!!(0,i.isUndefined)(h)||h):p),n=e=>{const n=(0,i.mergeObjects)(e);return delete n._k,t?{isValidating:!0,isLoading:!0,...n}:n},r=T(),o=D(),s=n(r),a=r===o?s:n(o);let u=s;return[()=>{const t=n(T());return L(t,u)?(u.data=t.data,u.isLoading=t.isLoading,u.isValidating=t.isValidating,u.error=t.error,u):(u=t,t)},()=>a]},[u,O]),U=(0,o.useSyncExternalStore)((0,r.useCallback)(t=>I(O,(e,n)=>{L(n,e)||t()}),[u,O]),$[0],$[1]),B=!S.current,V=g[O]&&g[O].length>0,F=U.data,K=(0,i.isUndefined)(F)?R:F,W=U.error,z=(0,r.useRef)(K),q=v?(0,i.isUndefined)(F)?z.current:F:K,H=!(V&&!(0,i.isUndefined)(W))&&(B&&!(0,i.isUndefined)(p)?p:!k().isPaused()&&(l?!(0,i.isUndefined)(K)&&h:(0,i.isUndefined)(K)||h)),Y=!!(O&&e&&B&&H),G=(0,i.isUndefined)(U.isValidating)?Y:U.isValidating,J=(0,i.isUndefined)(U.isLoading)?Y:U.isLoading,X=(0,r.useCallback)(async t=>{const e=P.current;if(!O||!e||E.current||k().isPaused())return!1;let r,o,s=!0;const a=t||{},u=!_[O]||!a.dedupe,l=()=>i.IS_REACT_LEGACY?!E.current&&O===j.current&&S.current:O===j.current,f={isValidating:!1,isLoading:!1},p=()=>{N(f)},h=()=>{const t=_[O];t&&t[1]===o&&delete _[O]},d={isValidating:!0};(0,i.isUndefined)(T().data)&&(d.isLoading=!0);try{if(u&&(N(d),n.loadingTimeout&&(0,i.isUndefined)(T().data)&&setTimeout(()=>{s&&l()&&k().onLoadingSlow(O,n)},n.loadingTimeout),_[O]=[e(x),(0,i.getTimestamp)()]),[r,o]=_[O],r=await r,u&&setTimeout(h,n.dedupingInterval),!_[O]||_[O][1]!==o)return u&&l()&&k().onDiscarded(O),!1;f.error=i.UNDEFINED;const t=m[O];if(!(0,i.isUndefined)(t)&&(o<=t[0]||o<=t[1]||0===t[1]))return p(),u&&l()&&k().onDiscarded(O),!1;const a=T().data;f.data=c(a,r)?a:r,u&&l()&&k().onSuccess(r,O,n)}catch(t){h();const e=k(),{shouldRetryOnError:n}=e;e.isPaused()||(f.error=t,u&&l()&&(e.onError(t,O,e),(!0===n||(0,i.isFunction)(n)&&n(t))&&(k().revalidateOnFocus&&k().revalidateOnReconnect&&!C()||e.onErrorRetry(t,O,e,t=>{const e=g[O];e&&e[0]&&e[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,t)},{retryCount:(a.retryCount||0)+1,dedupe:!0}))))}return s=!1,p(),!0},[O,u]),Q=(0,r.useCallback)((...t)=>(0,i.internalMutate)(u,j.current,...t),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{P.current=e,A.current=n,(0,i.isUndefined)(F)||(z.current=F)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!O)return;const t=X.bind(i.UNDEFINED,a);let e=0;const n=(0,i.subscribeCallback)(O,g,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();k().revalidateOnFocus&&n>e&&C()&&(e=n+k().focusThrottleInterval,t())}else if(n==i.revalidateEvents.RECONNECT_EVENT)k().revalidateOnReconnect&&C()&&t();else{if(n==i.revalidateEvents.MUTATE_EVENT)return X();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return X(r)}});return E.current=!1,j.current=O,S.current=!0,N({_k:x}),H&&((0,i.isUndefined)(K)||i.IS_SERVER?t():(0,i.rAF)(t)),()=>{E.current=!0,n()}},[O]),(0,i.useIsomorphicLayoutEffect)(()=>{let t;function e(){const e=(0,i.isFunction)(d)?d(T().data):d;e&&-1!==t&&(t=setTimeout(n,e))}function n(){T().error||!y&&!k().isVisible()||!b&&!k().isOnline()?e():X(a).then(e)}return e(),()=>{t&&(clearTimeout(t),t=-1)}},[d,y,b,O]),(0,r.useDebugValue)(q),l&&(0,i.isUndefined)(K)&&O){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");P.current=e,A.current=n,E.current=!1;const t=w[O];if(!(0,i.isUndefined)(t)){const e=Q(t);s(e)}if(!(0,i.isUndefined)(W))throw W;{const t=X(a);(0,i.isUndefined)(q)||(t.status="fulfilled",t.value=!0),s(t)}}return{mutate:Q,get data(){return M.data=!0,q},get error(){return M.error=!0,W},get isValidating(){return M.isValidating=!0,G},get isLoading(){return M.isLoading=!0,J}}})},71140:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=Object.prototype;const o=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},71929:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(85002),o=n(96696),i=n(90952),s=n(27928);e.reduce=function(t,e){return arguments.length>=2?function(n){return s.pipe(r.scan(t,e),o.takeLast(1),i.defaultIfEmpty(e))(n)}:function(e){return s.pipe(r.scan(function(e,n,r){return t(e,n,r+1)}),o.takeLast(1))(e)}}},72715:(t,e,n)=>{"use strict";function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}n.d(e,{A:()=>r})},73766:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(82900),o=n(3069);e.asapScheduler=new o.AsapScheduler(r.AsapAction),e.asap=e.asapScheduler},74143:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5319),o=n(59468);e.empty={closed:!0,next:function(t){},error:function(t){if(r.config.useDeprecatedSynchronousErrorHandling)throw t;o.hostReportError(t)},complete:function(){}}},74430:(t,e,n)=>{"use strict";function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}n.d(e,{A:()=>r})},74442:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(78258);e.isIterable=function(t){return t&&"function"==typeof t[r.iterator]}},75434:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(4942);e.materialize=function(){return function(t){return t.lift(new a)}};var a=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new u(t))},t}(),u=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype._next=function(t){this.destination.next(s.Notification.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(s.Notification.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(s.Notification.createComplete()),t.complete()},e}(i.Subscriber)},75772:(t,e,n)=>{"use strict";n.d(e,{B7:()=>f});var r=n(32505),o=n(87635),i=n(61171),s=n(29075),a=n(20320),u=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.C6(e,t),e.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)}}},e}(s.y),c=n(18904),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.C6(e,t),e}(i.v),f=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.C6(e,t),e.prototype[c.D]=function(){return new l(this)},e.prototype.lift=function(t){var e=new p(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.P;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new a.P;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},e.prototype.complete=function(){if(this.closed)throw new a.P;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},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new a.P;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new a.P;return this.hasError?(t.error(this.thrownError),s.y.EMPTY):this.isStopped?(t.complete(),s.y.EMPTY):(this.observers.push(t),new u(this,t))},e.prototype.asObservable=function(){var t=new o.c;return t.source=this,t},e.create=function(t,e){return new p(t,e)},e}(o.c),p=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return r.C6(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):s.y.EMPTY},e}(f)},75901:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(95092),a=n(41727),u=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return o(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(i.Subscriber);e.SimpleInnerSubscriber=u;var c=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=r,o}return o(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(i.Subscriber);e.ComplexInnerSubscriber=c;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(i.Subscriber);e.SimpleOuterSubscriber=l;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.notifyNext=function(t,e,n,r){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(i.Subscriber);e.ComplexOuterSubscriber=f,e.innerSubscribe=function(t,e){if(!e.closed){if(t instanceof s.Observable)return t.subscribe(e);var n;try{n=a.subscribeTo(t)(e)}catch(t){e.error(t)}return n}}},76003:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(62637);e.single=function(t){return function(e){return e.lift(new a(t,e))}};var a=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.predicate,this.source))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.source=r,o.seenValue=!1,o.index=0,o}return o(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new s.EmptyError)},e}(i.Subscriber)},76024:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.ignoreElements=function(){return function(t){return t.lift(new s)}};var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}(),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype._next=function(t){},e}(i.Subscriber)},76110:(t,e,n)=>{"use strict";n.d(e,{D3:()=>a,jX:()=>i,jj:()=>u,uA:()=>s,B4:()=>l,sM:()=>c});var r=n(22337);const o={flags:function(){const t={};for(const e of Object.keys(localStorage))if(e.startsWith("openmrs:feature-flag:")){const n=e.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${n}`)||"{}");t[n]={enabled:"true"===localStorage.getItem(e),...r}}return t}()},i=(0,r.jf)("feature-flags",o);function s(t,e,n){i.setState(r=>({flags:{...r.flags,[t]:{enabled:r.flags[t]?.enabled??!1,label:e,description:n}}}))}function a(){const t=i.getState().flags;Object.keys(localStorage).filter(t=>t.startsWith("openmrs:feature-flag:")).forEach(e=>{const n=e.replace("openmrs:feature-flag:","");t[n]||(localStorage.removeItem(e),localStorage.removeItem(`openmrs:feature-flag-meta:${n}`))})}function u(t){return i.getState().flags[t].enabled}function c(t,e){i.subscribe(n=>{e(n.flags[t].enabled)})}function l(t,e){i.setState(n=>({flags:{...n.flags,[t]:{...n.flags[t],enabled:e}}}))}i.subscribe(t=>{for(const[e,n]of Object.entries(t.flags))localStorage.setItem(`openmrs:feature-flag:${e}`,n.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${e}`,JSON.stringify({label:n.label,description:n.description}))})},76124:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(99271),o=n(26979),i=Object.prototype.hasOwnProperty;const s=function(t,e,n){var s=t[e];i.call(t,e)&&(0,o.A)(s,n)&&(void 0!==n||e in t)||(0,r.A)(t,e,n)}},76527:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.expand=function(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new s(t,e,n))}};var s=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.concurrent,this.scheduler))},t}();e.ExpandOperator=s;var a=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(i.buffer=[]),i}return o(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,o=t.index;e.subscribeToProjection(n,r,o)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var o=(0,this.project)(t,r);if(this.scheduler){var i={subscriber:this,result:o,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,i))}else this.subscribeToProjection(o,t,r)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this._next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.SimpleOuterSubscriber);e.ExpandSubscriber=a},76788:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(89152),s=n(87778);e.withLatestFrom=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new a(r,n))}};var a=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.observables,this.project))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;o.observables=n,o.project=r,o.toRespond=[];var i=n.length;o.values=new Array(i);for(var a=0;a<i;a++)o.toRespond.push(a);for(a=0;a<i;a++){var u=n[a];o.add(s.subscribeToResult(o,u,void 0,a))}return o}return o(e,t),e.prototype.notifyNext=function(t,e,n){this.values[n]=e;var r=this.toRespond;if(r.length>0){var o=r.indexOf(n);-1!==o&&r.splice(o,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.OuterSubscriber)},77089:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(62637),o=n(64629),i=n(85624),s=n(90952),a=n(8347),u=n(78522);e.first=function(t,e){var n=arguments.length>=2;return function(c){return c.pipe(t?o.filter(function(e,n){return t(e,n,c)}):u.identity,i.take(1),n?s.defaultIfEmpty(e):a.throwIfEmpty(function(){return new r.EmptyError}))}}},77650:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.bufferCount=function(t,e){return void 0===e&&(e=null),function(n){return n.lift(new s(t,e))}};var s=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?u:a}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return o(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(i.Subscriber),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.bufferSize=n,o.startBufferEvery=r,o.buffers=[],o.count=0,o}return o(e,t),e.prototype._next=function(t){var e=this,n=e.bufferSize,r=e.startBufferEvery,o=e.buffers,i=e.count;this.count++,i%r===0&&o.push([]);for(var s=o.length;s--;){var a=o[s];a.push(t),a.length===n&&(o.splice(s,1),this.destination.next(a))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(i.Subscriber)},77759:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(84864),s=n(74143),a=n(21016),u=n(58636),c=n(5319),l=n(59468),f=function(t){function e(n,r,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=s.empty;break;case 1:if(!n){i.destination=s.empty;break}if("object"==typeof n){n instanceof e?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,n,r,o)}return i}return o(e,t),e.prototype[u.rxSubscriber]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(a.Subscription);e.Subscriber=f;var p=function(t){function e(e,n,r,o){var a,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return i.isFunction(n)?a=n:n&&(a=n.next,r=n.error,o=n.complete,n!==s.empty&&(c=Object.create(n),i.isFunction(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=r,u._complete=o,u}return o(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=c.config.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):l.hostReportError(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;l.hostReportError(t)}}},e.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)};c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),c.config.useDeprecatedSynchronousErrorHandling)throw t;l.hostReportError(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!c.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return c.config.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(l.hostReportError(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(f);e.SafeSubscriber=p},78258:(t,e)=>{"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(e,"__esModule",{value:!0}),e.getSymbolIterator=n,e.iterator=n(),e.$$iterator=e.iterator},78522:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.identity=function(t){return t}},78831:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(n(25646).AsyncScheduler);e.QueueScheduler=i},78938:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});var r=n(62135),o=n(34878),i=n(47313),s=Function.prototype,a=Object.prototype,u=s.toString,c=a.hasOwnProperty,l=u.call(Object);const f=function(t){if(!(0,i.A)(t)||"[object Object]"!=(0,r.A)(t))return!1;var e=(0,o.A)(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},79159:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.skipWhile=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return o(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(i.Subscriber)},79397:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(80743),o=n(92413),i=n(85295);e.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&r.isArray(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(i.from([e].concat(t)),new o.CombineLatestOperator(n))}}},80084:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},80743:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},80980:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(60781),o=n(78522);e.mergeAll=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),r.mergeMap(o.identity,t)}},82334:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8791),o=n(49529);e.publishBehavior=function(t){return function(e){return o.multicast(new r.BehaviorSubject(t))(e)}}},82784:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(86735),o=n(31027),i=n(35816),s=n(11673);e.timeout=function(t,e){return void 0===e&&(e=r.async),i.timeoutWith(t,s.throwError(new o.TimeoutError),e)}},82900:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(42839),s=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return o(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=i.Immediate.setImmediate(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(i.Immediate.clearImmediate(n),e.scheduled=void 0)},e}(n(70469).AsyncAction);e.AsapAction=s},83153:(t,e,n)=>{"use strict";var r=n(89710),o=n(57338);function i(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}t.exports=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var t=this.currentContext();return t.lastChild||t},i.prototype.transform=function(t){return this.currentNode().setAttribute("transform",Object.keys(t).map(function(e){return e+"("+t[e].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})},i.prototype.setWidth=function(t){this.svg.setAttribute("width",Math.floor(t))},i.prototype.setHeight=function(t){this.svg.setAttribute("height",Math.floor(t))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(t,e,n,i,s){var a=this;if(Array.isArray(t))return t.forEach(function(t){a.rect.apply(a,t.concat(s))}),this;var u=o("rect");return this.currentContext().appendChild(u),this.setAttributes(u,r({x:t,y:e,width:n,height:i},s)),this},i.prototype.circle=function(t,e,n,i){var s=o("circle");return this.currentContext().appendChild(s),this.setAttributes(s,r({cx:t,cy:e,r:n},i)),this},i.prototype.path=function(t,e){var n=o("path");return this.currentContext().appendChild(n),this.setAttributes(n,r({d:t},e)),this},i.prototype.polyline=function(t,e){var n=this;if(Array.isArray(t))return t.forEach(function(t){n.polyline(t,e)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,r({points:t},e)),this},i.prototype.group=function(t){var e=o("g");return this.currentContext().appendChild(e),this.context.push(e),this.setAttributes(e,r({},t)),this}},83232:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(92209);e.concatMapTo=function(t,e){return r.concatMap(function(){return t},e)}},83516:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=n(39600).A.Symbol},83903:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(21016),a=n(89152),u=n(87778);e.windowToggle=function(t,e){return function(n){return n.lift(new c(t,e))}};var c=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.openings,this.closingSelector))},t}(),l=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(o.openSubscription=u.subscribeToResult(o,n,n)),o}return o(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,o=-1;++o<r;){var i=n[o];i.window.error(e),i.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var o=e[r];o.window.complete(),o.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,o){if(t===this.openings){var a=void 0;try{a=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var c=new i.Subject,l=new s.Subscription,f={window:c,subscription:l};this.contexts.push(f);var p=u.subscribeToResult(this,a,f);p.closed?this.closeWindow(this.contexts.length-1):(p.context=f,l.add(p)),this.destination.next(c)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,o=n.subscription;e.splice(t,1),r.complete(),o.unsubscribe()}},e}(a.OuterSubscriber)},84864:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=function(t){return"function"==typeof t}},85002:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.scan=function(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new s(t,e,n))}};var s=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.accumulator,this.seed,this.hasSeed))},t}(),a=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.accumulator=n,i._seed=r,i.hasSeed=o,i.index=0,i}return o(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(i.Subscriber)},85203:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.refCount=function(){return function(t){return t.lift(new s(t))}};var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new a(t,n),o=e.subscribe(r);return r.closed||(r.connection=n.connect()),o},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return o(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.Subscriber)},85295:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(41727),i=n(67670);e.from=function(t,e){return e?i.scheduled(t,e):t instanceof r.Observable?t:new r.Observable(o.subscribeTo(t))}},85343:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.distinct=function(t,e){return function(n){return n.lift(new s(t,e))}};var s=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.keySelector,this.flushes))},t}(),a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(o))),o}return o(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.SimpleOuterSubscriber);e.DistinctSubscriber=a},85356:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(67446),s=n(80743),a=n(77759),u=n(78258),c=n(75901);e.zip=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),i.fromArray(t,void 0).lift(new l(n))};var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.resultSelector))},t}();e.ZipOperator=l;var f=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var o=t.call(this,e)||this;return o.resultSelector=n,o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:void 0,o}return o(e,t),e.prototype._next=function(t){var e=this.iterators;s.isArray(t)?e.push(new h(t)):"function"==typeof t[u.iterator]?e.push(new p(t[u.iterator]())):e.push(new d(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];r.stillUnsubscribed?this.destination.add(r.subscribe()):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++)if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return;var o=!1,i=[];for(r=0;r<e;r++){var s,a=(s=t[r]).next();if(s.hasCompleted()&&(o=!0),a.done)return void n.complete();i.push(a.value)}this.resultSelector?this._tryresultSelector(i):n.next(i),o&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.Subscriber);e.ZipSubscriber=f;var p=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),h=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[u.iterator]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),d=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(e,t),e.prototype[u.iterator]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return c.innerSubscribe(this.observable,new c.SimpleInnerSubscriber(this))},e}(c.SimpleOuterSubscriber)},85378:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=/^(?:0|[1-9]\d*)$/;const o=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},85476:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.count=function(t){return function(e){return e.lift(new s(t,e))}};var s=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.source))},t}(),a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.source=r,o.count=0,o.index=0,o}return o(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(i.Subscriber)},85517:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(85356);e.zipAll=function(t){return function(e){return e.lift(new r.ZipOperator(t))}}},85602: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)}}}()},85624:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(2519),a=n(34914);e.take=function(t){return function(e){return 0===t?a.empty():e.lift(new u(t))}};var u=function(){function t(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.total))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return o(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(i.Subscriber)},85632:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(71140);const o=(0,n(67244).A)(Object.keys,Object);var i=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,r.A)(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},85791:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(21016);e.scheduleArray=function(t,e){return new r.Observable(function(n){var r=new o.Subscription,i=0;return r.add(e.schedule(function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}},85916:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.catchError=function(t){return function(e){var n=new s(t),r=e.lift(n);return n.caught=r}};var s=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.selector,this.caught))},t}(),a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.selector=n,o.caught=r,o}return o(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.SimpleInnerSubscriber(this);this.add(r);var o=i.innerSubscribe(n,r);o!==r&&this.add(o)}},e}(i.SimpleOuterSubscriber)},86050:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(89233);e.pluck=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return r.map(function(t,e){return function(n){for(var r=n,o=0;o<e;o++){var i=null!=r?r[t[o]]:void 0;if(void 0===i)return;r=i}return r}}(t,n))(e)}}},86284:(t,e,n)=>{"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,{A:()=>r})},86430:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(75901);e.mergeScan=function(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new s(t,e,n))}};var s=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.accumulator,this.seed,this.concurrent))},t}();e.MergeScanOperator=s;var a=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.accumulator=n,i.acc=r,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(r)}else this.buffer.push(t)},e.prototype._innerSub=function(t){var e=new i.SimpleInnerSubscriber(this),n=this.destination;n.add(e);var r=i.innerSubscribe(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.SimpleOuterSubscriber);e.MergeScanSubscriber=a},86735:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(70469),o=n(25646);e.asyncScheduler=new o.AsyncScheduler(r.AsyncAction),e.async=e.asyncScheduler},87362:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.isEmpty=function(){return function(t){return t.lift(new s)}};var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}(),a=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(i.Subscriber)},87440:(t,e,n)=>{"use strict";n.d(e,{wE:()=>_,_3:()=>p,eb:()=>d,Gz:()=>y,dX:()=>b,$F:()=>v,Sj:()=>g,uN:()=>m,mv:()=>h,PQ:()=>r.A});var r=n(19758);const o="ArrowFunctionExpression";var i={name:"arrow",init(t){function e(n){n&&(Object.values(n).forEach(t=>{t&&"object"==typeof t&&e(t)}),"=>"===n.operator&&(n.type=o,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===t.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}t.addBinaryOp("=>",.1,!0),t.hooks.add("gobble-expression",function(e){if(this.gobbleSpaces(),this.code===t.OPAREN_CODE){const n=this.index;if(this.index++,this.gobbleSpaces(),this.code===t.CPAREN_CODE){this.index++;const t=this.gobbleBinaryOp();if("=>"===t){const n=this.gobbleBinaryExpression();return n||this.throwError("Expected expression after "+t),void(e.node={type:o,params:null,body:n})}}this.index=n}}),t.hooks.add("after-expression",function(t){e(t.node)})}},s={name:"new",init(t){t.addUnaryOp("new"),t.hooks.add("after-token",function(e){const n=e.node;if(n&&"new"===n.operator){n.argument&&[t.CALL_EXP,t.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),e.node=n.argument;let r=e.node;for(;r.type===t.MEMBER_EXP||r.type===t.CALL_EXP&&r.callee.type===t.MEMBER_EXP;)r=r.type===t.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}},a={name:"numbers",init(t){function e(t){return"x"===t||"X"===t?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===t||"B"===t?(this.index+=2,[[48,49]]):"o"===t||"O"===t||t>="0"&&t<="7"?(this.index+=t<="7"?1:2,[[48,55]]):null}function n(t){return"x"===t||"X"===t?16:"b"===t||"B"===t?2:8}function r(t,e){return 95===t||e.some(([e,n])=>t>=e&&t<=n)}function o(e){const n=this.index;let r="";const o=()=>{for(;t.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};o(),this.code===t.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),o());let i=this.char;"e"!==i&&"E"!==i||(r+=this.expr.charAt(this.index++),i=this.char,"+"!==i&&"-"!==i||(r+=this.expr.charAt(this.index++)),o(),t.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));const s=this.code;if(t.isIdentifierStart(s))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(s===t.PERIOD_CODE)return r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:s,number:r},null,2)}`),void(this.index=n);e.node={type:t.LITERAL,value:parseFloat(r),raw:this.expr.substring(n,this.index)}}t.hooks.add("gobble-token",function(i){if(48===this.code){const s=this.index,a=this.expr.charAt(this.index+1),u=e.call(this,a);if(!u)return;let c="";for(;r(this.code,u);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(t.isIdentifierPart(this.code)){if(t.isDecimalDigit(this.code)&&t.isDecimalDigit(a.charCodeAt(0)))return this.index=s+1,void o.call(this,i);this.throwError("unexpected char within number")}i.node={type:t.LITERAL,value:parseInt(c,n(a)),raw:this.expr.substring(s,this.index)}}else(t.isDecimalDigit(this.code)||this.code===t.PERIOD_CODE)&&o.call(this,i)})}},u={name:"regex",init(t){t.hooks.add("gobble-token",function(e){if(47===this.code){const n=++this.index;let r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){const r=this.expr.slice(n,this.index);let o,i="";for(;++this.index<this.expr.length;){const t=this.code;if(!(t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57))break;i+=this.char}try{o=new RegExp(r,i)}catch(t){this.throwError(t.message)}return e.node={type:t.LITERAL,value:o,raw:this.expr.slice(n-1,this.index)},e.node=this.gobbleTokenProperty(e.node),e.node}this.code===t.OBRACK_CODE?r=!0:r&&this.code===t.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}},c={name:"ternary",init(t){t.hooks.add("after-expression",function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const n=e.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&t.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&t.binary_ops[r.right.operator]<=.9;)r=r.right;e.node.test=r.right,r.right=e.node,e.node=n}}else this.throwError("Expected :")}})}},l={name:"jsepTemplateLiteral",init(t){function e(t,e=!0){if(96===this.code){const n={type:"TemplateLiteral",quasis:[],expressions:[]};let r="",o="",i=!1;const s=this.expr.length,a=()=>n.quasis.push({type:"TemplateElement",value:{raw:o,cooked:r},tail:i});for(;this.index<s;){let s=this.expr.charAt(++this.index);if("`"===s)return this.index+=1,i=!0,a(),t.node=n,e&&(t.node=this.gobbleTokenProperty(t.node)),t.node;if("$"===s&&"{"===this.expr.charAt(this.index+1))this.index+=2,a(),o="",r="",n.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===s)switch(o+=s,s=this.expr.charAt(++this.index),o+=s,s){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=s}else r+=s,o+=s}this.throwError("Unclosed `")}}t.hooks.add("gobble-token",e),t.hooks.add("after-token",function(n){if((n.node.type===t.IDENTIFIER||n.node.type===t.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:e.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}},f=n(89987);function p(t,e={}){return g(t,e,w)}async function h(t,e={}){return m(t,e,w)}function d(t,e={}){return g(t,e,O)}function y(t,e={}){return m(t,e,O)}function b(t,e={}){return g(t,e,x)}function v(t,e={}){return m(t,e,x)}function g(t,e={},n){if(!("string"==typeof t||"object"==typeof t&&t&&"type"in t))throw`Unknown expression type ${t}. Expressions must either be a string or pre-compiled string.`;null==e&&(e={});const o=function(t){return j(t,f.z)}(e),i=S("string"==typeof t?(0,r.A)(t):t,o);if(n(i))return i;throw{type:"Invalid result",message:"string"==typeof t?`The expression ${t} did not produce a valid result`:"The expression did not produce a valid result"}}async function m(t,e={},n){if(!("string"==typeof t||"object"==typeof t&&t&&"type"in t))return Promise.reject(`Unknown expression type ${t}. Expressions must either be a string or pre-compiled string.`);null==e&&(e={});const o=function(t){return j(t,f.f)}(e);return Promise.resolve(S("string"==typeof t?(0,r.A)(t):t,o)).then(e=>{if(n(e))return e;throw{type:"Invalid result",message:"string"==typeof t?`The expression ${t} did not produce a valid result`:"The expression did not produce a valid result"}})}function _(t){return(0,r.A)(t)}function w(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||null==t||t instanceof Date}function O(t){return"boolean"==typeof t}function x(t){return"number"==typeof t}function S(t,e){switch(t.type){case"UnaryExpression":return function(t,e){const n=S(t.argument,e);switch(t.operator){case"+":return+n;case"-":return-n;case"~":return~n;case"!":return!n;default:throw`Expression evaluator does not support operator '${t.operator}''`}}(t,e);case"BinaryExpression":return function(t,e){let n=S(t.left,e),r=S(t.right,e);switch(t.operator){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;case"%":return n%r;case"**":return n**r;case"==":return n==r;case"===":return n===r;case"!=":return n!=r;case"!==":return n!==r;case">":return n>r;case">=":return n>=r;case"<":return n<r;case"<=":return n<=r;case"in":return n in r;case"&&":return n&&r;case"||":return n||r;case"??":return n??r;default:throw`Expression evaluator does not support operator '${t.operator}' operator`}}(t,e);case"ConditionalExpression":return function(t,e){const n=S(t.test,e);return S(n?t.consequent:t.alternate,e)}(t,e);case"CallExpression":return function(t,e){let n=t.arguments?.map(P(e)),r=S(t.callee,e);if(!r)throw`No function named ${C(t.callee)} is defined in this context`;if("function"!=typeof r)throw`${C(t.callee)} is not a function`;return r(...n)}(t,e);case"ArrowFunctionExpression":return function(t,e){const n=t.params?.map(t=>{if("Identifier"===t.type)return t.name;throw`Cannot handle parameter of type ${t.type}`})??[];return function(...r){if(r.length<n.length)throw`Required argument(s) ${n.slice(r.length,-1).join(", ")} were not provided`;const o=Object.fromEntries(n.reduce((t,e,n)=>{const o=r[n];return k(o)&&t.push([e,o]),t},[]));return S(t.body,e.addVariables(o))}.bind(e.thisObj??null)}(t,e);case"MemberExpression":return function(t,e){let n=S(t.object,e);if(void 0===n)switch(t.object.type){case"Identifier":{let n=E(t.object,e);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":{let n=E(t.property,e);throw TypeError(`TypeError: cannot read properties of undefined (reading '${n}')`)}default:throw`VisitMemberExpression does not support operator '${t.object.type}' type`}let r,o=n;if("string"==typeof n)o=String.prototype;else if("number"==typeof n)o=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw"VisitMemberExpression does not support member access on type "+typeof n;switch(e.thisObj=o,t.property.type){case"Identifier":case"MemberExpression":r=S(t.property,e);break;default:{const o=S(t.property,e);if(void 0===o)throw{type:"Illegal property access",message:"No property was supplied to the property access"};A(o),r=n[o]}}return"function"==typeof r?r.bind(n):r}(t,e);case"ArrayExpression":return function(t,e){return t.elements?.map(P(e))}(t,e);case"SequenceExpression":return function(t,e){const n=t.expressions.map(P(e));return n[n.length-1]}(t,e);case"NewExpression":return function(t,e){if(!t.callee||"Identifier"!==t.callee.type)throw t.callee?"new must be called with either Date or RegExp":'Could not handle "new" without a specified class';{let n=t.arguments?.map(P(e));switch(t.callee.name){case"Date":return new Date(...n);case"RegExp":return new RegExp(...n);default:throw`Cannot instantiate object of type ${t.callee.name}`}}}(t,e);case"Literal":return function(t){return A(t.value),t.value}(t);case"Identifier":return function(t,e){A(t.name);const n=e.thisObj;if(n&&("object"==typeof n||"function"==typeof n)&&t.name in n){const e=n[t.name];return A(e),e}if(e.variables&&t.name in e.variables){const n=e.variables[t.name];return A(n),n}return t.name in e.globals?e.globals[t.name]:void 0}(t,e);case"TemplateLiteral":return function(t,e){const n=t.expressions?.map(P(e))??[],r=t.quasis?.map(P(e))??[];return r.filter(t=>!t.tail).map(t=>t.value).join("")+n.join("")+r.filter(t=>t.tail).map(t=>t.value).join("")}(t,e);case"TemplateElement":return function(t){return{value:t.cooked,tail:t.tail}}(t);default:throw`Expression evaluator does not support expression of type '${t.type}'`}}function E(t,e){switch(t.type){case"Literal":return t.value;case"Identifier":return t.name;case"MemberExpression":return E(t.property,e);default:throw`VisitExpressionName does not support expression of type '${t.type}'`}}function j(t,e){const n={thisObj:void 0,variables:{...t},globals:{...e},addVariables(t){return this.variables={...this.variables,...t},this}};return n.addVariables.bind(n),n}function P(t){return function(e){return null===e?null:S(e,t)}}function A(t){if("__proto__"===t||"prototype"===t||"constructor"===t)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`}}function k(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(const e of Object.keys(t))if(!k(t[e]))return!1;return!0}if(Array.isArray(t))for(const e of t)if(!k(e))return!1;return!1}function C(t){return t?"MemberExpression"===t.type?t.property?.name:t.name:null}r.A.plugins.register(i),r.A.plugins.register(s),r.A.plugins.register(a),r.A.plugins.register(u),r.A.plugins.register(c),r.A.plugins.register(l),r.A.addBinaryOp("in",7),r.A.addBinaryOp("??",1)},87635:(t,e,n)=>{"use strict";n.d(e,{c:()=>c});var r=n(61171),o=n(18904),i=n(90979),s=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function a(t){return t}var u=n(60315),c=function(){function t(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 s=this.operator,a=function(t,e,n){if(t){if(t instanceof r.v)return t;if(t[o.D])return t[o.D]()}return t||e||n?new r.v(t,e,n):new r.v(i.I)}(t,e,n);if(s?a.add(s.call(a,this.source)):a.add(this.source||u.$.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),u.$.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.$.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&&o instanceof r.v?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=l(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[s]=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:(0===(n=t).length?a:1===n.length?n[0]:function(t){return n.reduce(function(t,e){return e(t)},t)})(this);var n},t.prototype.toPromise=function(t){var e=this;return new(t=l(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}();function l(t){if(t||(t=u.$.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},87778:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1359),o=n(41727),i=n(95092);e.subscribeToResult=function(t,e,n,s,a){if(void 0===a&&(a=new r.InnerSubscriber(t,n,s)),!a.closed)return e instanceof i.Observable?e.subscribe(a):o.subscribeTo(e)(a)}},88179:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.distinctUntilChanged=function(t,e){return function(n){return n.lift(new s(t,e))}};var s=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.compare,this.keySelector))},t}(),a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=r,o.hasKey=!1,"function"==typeof n&&(o.compare=n),o}return o(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(i.Subscriber)},88360:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(86735);e.sampleTime=function(t,e){return void 0===e&&(e=s.async),function(n){return n.lift(new a(t,e))}};var a=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.period,this.scheduler))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.period=n,o.scheduler=r,o.hasValue=!1,o.add(r.schedule(c,n,{subscriber:o,period:n})),o}return o(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(i.Subscriber);function c(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}},88537:(t,e,n)=>{"use strict";n.d(e,{CH:()=>f,yG:()=>l});var r,o,i,s,a=n(1343),u=n.n(a),c=n(9247);const l=u().forwardRef(function({children:t,size:e=16,...n},o){return u().createElement(c.A,{width:e,height:e,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},r||(r=u().createElement("path",{d:"M24,20l-1.41,1.41L26.17,25H10a4,4,0,0,1,0-8H22A6,6,0,0,0,22,5H5.83L9.41,1.41,8,0,2,6l6,6,1.41-1.41L5.83,7H22a4,4,0,0,1,0,8H10a6,6,0,0,0,0,12H26.17l-3.58,3.59L24,32l6-6Z"})),t)}),f=u().forwardRef(function({children:t,size:e=16,...n},r){return u().createElement(c.A,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},o||(o=u().createElement("circle",{cx:"16",cy:"8",r:"2"})),i||(i=u().createElement("circle",{cx:"16",cy:"16",r:"2"})),s||(s=u().createElement("circle",{cx:"16",cy:"24",r:"2"})),t)})},88724:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(97913);const o=function(t){var e=new t.constructor(t.byteLength);return new r.A(e).set(new r.A(t)),e}},89133:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(71929);function o(t,e,n){return 0===n?[e]:(t.push(e),t)}e.toArray=function(){return r.reduce(o,[])}},89152:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(77759).Subscriber);e.OuterSubscriber=i},89155:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(99623),o=n(23935);e.startWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return o.isScheduler(n)?(t.pop(),function(e){return r.concat(t,e,n)}):function(e){return r.concat(t,e)}}},89233:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.map=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 s(t,e))}};var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},t}();e.MapOperator=s;var a=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(e,t),e.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)},e}(i.Subscriber)},89646:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(80743),o=n(57894);e.race=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&r.isArray(t[0])&&(t=t[0]),e.lift.call(o.race.apply(void 0,[e].concat(t)))}}},89710:t=>{var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(t){if(!t||"[object Object]"!==n.call(t)||t.nodeType||t.setInterval)return!1;var r,o=e.call(t,"constructor"),i=e.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(r in t);return void 0===r||e.call(t,r)}t.exports=function t(){var e,n,o,i,s,a,u=arguments[0]||{},c=1,l=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},c=2),"object"!=typeof u&&"function"!=typeof u&&(u={});c<l;c++)if(null!=(e=arguments[c]))for(n in e)o=u[n],u!==(i=e[n])&&(f&&i&&(r(i)||(s=Array.isArray(i)))?(s?(s=!1,a=o&&Array.isArray(o)?o:[]):a=o&&r(o)?o:{},u[n]=t(f,a,i)):void 0!==i&&(u[n]=i));return u}},89987:(t,e,n)=>{"use strict";n.d(e,{f:()=>o,z:()=>r});const r={Array,Boolean,Symbol,Infinity:1/0,NaN:NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},o={...r,Promise}},90239:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(92413);e.combineAll=function(t){return function(e){return e.lift(new r.CombineLatestOperator(t))}}},90624:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArrayLike=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},90952:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.defaultIfEmpty=function(t){return void 0===t&&(t=null),function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.defaultValue))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return o(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(i.Subscriber)},90979:(t,e,n)=>{"use strict";n.d(e,{I:()=>i});var r=n(60315),o=n(44856),i={closed:!0,next:function(t){},error:function(t){if(r.$.useDeprecatedSynchronousErrorHandling)throw t;(0,o.T)(t)},complete:function(){}}},91039:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95092),o=n(21016);e.schedulePromise=function(t,e){return new r.Observable(function(n){var r=new o.Subscription;return r.add(e.schedule(function(){return t.then(function(t){r.add(e.schedule(function(){n.next(t),r.add(e.schedule(function(){return n.complete()}))}))},function(t){r.add(e.schedule(function(){return n.error(t)}))})})),r})}},91451:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20328);e.shareReplay=function(t,e,n){var o;return o=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,o=t.bufferSize,i=void 0===o?Number.POSITIVE_INFINITY:o,s=t.windowTime,a=void 0===s?Number.POSITIVE_INFINITY:s,u=t.refCount,c=t.scheduler,l=0,f=!1,p=!1;return function(t){var o;l++,!e||f?(f=!1,e=new r.ReplaySubject(i,a,c),o=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){f=!0,e.error(t)},complete:function(){p=!0,n=void 0,e.complete()}}),p&&(n=void 0)):o=e.subscribe(this),this.add(function(){l--,o.unsubscribe(),o=void 0,n&&!p&&u&&0===l&&(n.unsubscribe(),n=void 0,e=void 0)})}}(o))}}},91465:(t,e,n)=>{"use strict";n.d(e,{A:()=>b});var r=n(50405);const o=n(39600).A["__core-js_shared__"];var i,s=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var a=n(97942),u=n(1548),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,h=f.hasOwnProperty,d=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(t){return!(!(0,a.A)(t)||(e=t,s&&s in e))&&((0,r.A)(t)?d:c).test((0,u.A)(t));var e},b=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return y(n)?n:void 0}},92209:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(60781);e.concatMap=function(t,e){return r.mergeMap(t,e,1)}},92413:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(23935),s=n(80743),a=n(89152),u=n(87778),c=n(67446),l={};e.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return i.isScheduler(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&s.isArray(t[0])&&(t=t[0]),c.fromArray(t,r).lift(new f(n))};var f=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.resultSelector))},t}();e.CombineLatestOperator=f;var p=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return o(e,t),e.prototype._next=function(t){this.values.push(l),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(u.subscribeToResult(this,r,void 0,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n){var r=this.values,o=r[n],i=this.toRespond?o===l?--this.toRespond:this.toRespond:0;r[n]=e,0===i&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.OuterSubscriber);e.CombineLatestSubscriber=p},92472:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.every=function(t,e){return function(n){return n.lift(new s(t,e,n))}};var s=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg,this.source))},t}(),a=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return o(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(i.Subscriber)},92661:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(86735);e.debounceTime=function(t,e){return void 0===e&&(e=s.async),function(n){return n.lift(new a(t,e))}};var a=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.dueTime,this.scheduler))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(i.Subscriber);function c(t){t.debouncedNext()}},93296:(t,e,n)=>{"use strict";var r=n(1343),o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,u=r.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!o(t,n)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=i({inst:{value:n,getSnapshot:e}}),o=r[0].inst,l=r[1];return a(function(){o.value=n,o.getSnapshot=e,c(o)&&l({inst:o})},[t,n,e]),s(function(){return c(o)&&l({inst:o}),t(function(){c(o)&&l({inst:o})})},[t]),u(n),n};e.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},93886:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(71077),s=n(86735),a=n(77759),u=n(19673),c=n(23935);e.windowTime=function(t){var e=s.async,n=null,r=Number.POSITIVE_INFINITY;return c.isScheduler(arguments[3])&&(e=arguments[3]),c.isScheduler(arguments[2])?e=arguments[2]:u.isNumeric(arguments[2])&&(r=Number(arguments[2])),c.isScheduler(arguments[1])?e=arguments[1]:u.isNumeric(arguments[1])&&(n=Number(arguments[1])),function(o){return o.lift(new l(t,n,r,e))}};var l=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return o(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(i.Subject),p=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=o,s.scheduler=i,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var u={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:i};s.add(i.schedule(y,n,u)),s.add(i.schedule(d,r,c))}else{var l={subscriber:s,window:a,windowTimeSpan:n};s.add(i.schedule(h,n,l))}return s}return o(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var o=e[r];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new f;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(a.Subscriber);function h(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function d(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,o=t.windowCreationInterval,i=n.openWindow(),s=this,a={action:s,subscription:null},u={subscriber:n,window:i,context:a};a.subscription=r.schedule(y,e,u),s.add(a.subscription),s.schedule(t,o)}function y(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}},94215:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPromise=function(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}},94360:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(86735),s=n(77759),a=n(23935);e.bufferTime=function(t){var e=arguments.length,n=i.async;a.isScheduler(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var o=Number.POSITIVE_INFINITY;return e>=3&&(o=arguments[2]),function(e){return e.lift(new u(t,r,o,n))}};var u=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),c=function(){this.buffer=[]},l=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=o,s.scheduler=i,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var u={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=i.schedule(f,n,u))}else{var c={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:i};s.add(a.closeAction=i.schedule(h,n,c)),s.add(i.schedule(p,r,l))}return s}return o(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,o=0;o<r;o++){var i=n[o],s=i.buffer;s.push(t),s.length==this.maxBufferSize&&(e=i)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(f,n,r))}},e.prototype.openContext=function(){var t=new c;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(s.Subscriber);function f(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function p(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,o=t.scheduler,i=r.openContext();r.closed||(r.add(i.closeAction=o.schedule(h,n,{subscriber:r,context:i})),this.schedule(t,e))}function h(t){var e=t.subscriber,n=t.context;e.closeContext(n)}},94688:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}();e.Scheduler=n},95092:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(21226),o=n(67595),i=n(46713),s=n(27928),a=n(5319),u=function(){function t(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 r=this.operator,i=o.toSubscriber(t,e,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||a.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),a.config.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){a.config.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),r.canReportError(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=c(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[i.observable]=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:s.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=c(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}();function c(t){if(t||(t=a.config.Promise||Promise),!t)throw new Error("no Promise impl found");return t}e.Observable=u},95309:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(17545),o=n(2474);function i(t,e){if(e&&("object"==(0,r.A)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.A)(t)}},95819:(t,e,n)=>{"use strict";function r(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function o(t){return function e(n){return 0===arguments.length||r(n)?e:t.apply(this,arguments)}}function i(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return r(n)?e:o(function(e){return t(n,e)});default:return r(n)&&r(i)?e:r(n)?o(function(e){return t(e,i)}):r(i)?o(function(e){return t(n,e)}):t(n,i)}}}function s(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function a(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1}function u(t,e){return Object.prototype.hasOwnProperty.call(e,t)}n.d(e,{ZU:()=>V,Nh:()=>Ft,hs:()=>Z,Rt:()=>X,T0:()=>ht,ks:()=>vt,zj:()=>mt,IS:()=>tt,UY:()=>it,g$:()=>at,P0:()=>st,G9:()=>nt,vu:()=>rt,YP:()=>et,GI:()=>ot,td:()=>_t,tN:()=>ut,r4:()=>zt,gU:()=>Ht,qG:()=>qt,yL:()=>Yt,mq:()=>wt,Gt:()=>gt,kl:()=>yt,FL:()=>dt,GV:()=>bt,H:()=>Q,Nc:()=>F,y$:()=>Gt});const c="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};var l=Object.prototype.toString;const f=function(){return"[object Arguments]"===l.call(arguments)?function(t){return"[object Arguments]"===l.call(t)}:function(t){return u("callee",t)}}();var p=!{toString:null}.propertyIsEnumerable("toString"),h=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],d=function(){return arguments.propertyIsEnumerable("length")}(),y=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1};const b="function"!=typeof Object.keys||d?o(function(t){if(Object(t)!==t)return[];var e,n,r=[],o=d&&f(t);for(e in t)!u(e,t)||o&&"length"===e||(r[r.length]=e);if(p)for(n=h.length-1;n>=0;)u(e=h[n],t)&&!y(r,e)&&(r[r.length]=e),n-=1;return r}):o(function(t){return Object(t)!==t?[]:Object.keys(t)}),v=o(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function g(t,e,n,r){var o=s(t);function i(t,e){return m(t,e,n.slice(),r.slice())}return!a(function(t,e){return!a(i,e,t)},s(e),o)}function m(t,e,n,r){if(c(t,e))return!0;var o,i,s=v(t);if(s!==v(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(s){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(o=t.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof e||!c(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!c(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 a=n.length-1;a>=0;){if(n[a]===t)return r[a]===e;a-=1}switch(s){case"Map":return t.size===e.size&&g(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&g(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 l=b(t);if(l.length!==b(e).length)return!1;var f=n.concat([t]),p=r.concat([e]);for(a=l.length-1;a>=0;){var h=l[a];if(!u(h,e)||!m(e[h],t[h],f,p))return!1;a-=1}return!0}const _=i(function(t,e){return m(t,e,[],[])});function w(t){return function e(n,s,a){switch(arguments.length){case 0:return e;case 1:return r(n)?e:i(function(e,r){return t(n,e,r)});case 2:return r(n)&&r(s)?e:r(n)?i(function(e,n){return t(e,s,n)}):r(s)?i(function(e,r){return t(n,e,r)}):o(function(e){return t(n,s,e)});default:return r(n)&&r(s)&&r(a)?e:r(n)&&r(s)?i(function(e,n){return t(e,n,a)}):r(n)&&r(a)?i(function(e,n){return t(e,s,n)}):r(s)&&r(a)?i(function(e,r){return t(n,e,r)}):r(n)?o(function(e){return t(e,s,a)}):r(s)?o(function(e){return t(n,e,a)}):r(a)?o(function(e){return t(n,s,e)}):t(n,s,a)}}}function O(t){return"[object Object]"===Object.prototype.toString.call(t)}const x=w(function(t,e,n){var r,o={};for(r in n=n||{},e=e||{})u(r,e)&&(o[r]=u(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)u(r,n)&&!u(r,o)&&(o[r]=n[r]);return o}),S=w(function t(e,n,r){return x(function(n,r,o){return O(r)&&O(o)?t(e,r,o):e(n,r,o)},n,r)}),E=i(function(t,e){return S(function(t,e,n){return n},t,e)}),j=i(function(t,e){for(var n={},r={},o=0,i=t.length;o<i;)r[t[o]]=1,o+=1;for(var s in e)r.hasOwnProperty(s)||(n[s]=e[s]);return n});function P(t,e,n){if(n||(n=new A),o=typeof(r=t),null==r||"object"!=o&&"function"!=o)return t;var r,o,i,s=function(r){var o=n.get(t);if(o)return o;for(var i in n.set(t,r),t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e?P(t[i],!0,n):t[i]);return r};switch(v(t)){case"Object":return s(Object.create(Object.getPrototypeOf(t)));case"Array":return s(Array(t.length));case"Date":return new Date(t.valueOf());case"RegExp":return i=t,new RegExp(i.source,i.flags?i.flags:(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.sticky?"y":"")+(i.unicode?"u":"")+(i.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return t.slice();default:return t}}var A=function(){function t(){this.map={},this.length=0}return t.prototype.set=function(t,e){var n=this.hash(t),r=this.map[n];r||(this.map[n]=r=[]),r.push([t,e]),this.length+=1},t.prototype.hash=function(t){var e=[];for(var n in t)e.push(Object.prototype.toString.call(t[n]));return e.join()},t.prototype.get=function(t){if(this.length<=180){for(var e in this.map)for(var n=this.map[e],r=0;r<n.length;r+=1)if((i=n[r])[0]===t)return i[1]}else{var o=this.hash(t);if(n=this.map[o])for(r=0;r<n.length;r+=1){var i;if((i=n[r])[0]===t)return i[1]}}},t}();const k=o(function(t){return null!=t&&"function"==typeof t.clone?t.clone():P(t,!0)}),C=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},T=o(function(t){return!!C(t)||!!t&&"object"==typeof t&&!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))});var N="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function I(t,e,n){return function(r,o,i){if(T(i))return t(r,o,i);if(null==i)return o;if("function"==typeof i["fantasy-land/reduce"])return e(r,o,i,"fantasy-land/reduce");if(null!=i[N])return n(r,o,i[N]());if("function"==typeof i.next)return n(r,o,i);if("function"==typeof i.reduce)return e(r,o,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function D(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)}const M=i(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,s){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,s,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,s,a,u){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,s,a,u,c){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,s,a,u,c,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)})});function R(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)}function L(t,e,n,r){return t["@@transducer/result"](n[r](M(t["@@transducer/step"],t),e))}const $=I(D,L,R);var U=function(){function t(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}();const B=w(function(t,e,n){return $("function"==typeof t?new U(t):t,e,n)});var V=function(t){return t.Array="Array",t.Boolean="Boolean",t.ConceptUuid="ConceptUuid",t.Number="Number",t.Object="Object",t.String="String",t.UUID="UUID",t.PersonAttributeTypeUuid="PersonAttributeTypeUuid",t.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",t}({});function F(t,e){return n=>{if(!t(n))return"function"==typeof e?e(n):e}}const K=F(t=>Array.isArray(t),"must be an array"),W=F(t=>"boolean"==typeof t,"must be a boolean"),z=F(t=>"number"==typeof t,"must be a number"),q=F(t=>"string"==typeof t,"must be a string"),H=F(t=>"object"==typeof t&&!Array.isArray(t)&&null!==t,"must be an object (not an array or null)"),Y=F(t=>/^[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");var G=n(22337),J=n(27388);const X=(0,G.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),Q=(0,G.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Q.subscribe(t=>{var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))});const Z=(0,G.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function tt(t){return(0,G.jf)(`config-module-${t}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function et(){return(0,G.jf)("config-extension-slots",{slots:{}})}function nt(t){return rt(et().getState(),t)}function rt(t,e){return t.slots[e]??{loaded:!1,config:{}}}function ot(){return(0,G.jf)("config-extensions",{configs:{}})}function it(t,e){if("string"!=typeof t||"string"!=typeof e||"__proto__"===t||"__proto__"===e||"constructor"===t||"constructor"===e||"prototype"===t||"prototype"===e)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");const n=ot(),r=n=>n.configs[t]?.[e];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},setState(r,o=!1){n.setState(n=>{n.configs[t]||(n.configs[t]={});const i="function"==typeof r?r(n.configs.slotName[e]):r;return n.configs[t][e]=o?Object.assign({},i):Object.assign({},n.configs[t][e],i),n})},subscribe:t=>n.subscribe((e,n)=>{const o=r(e),i=r(n);(0,J.b)(o,i)||t(o,i)}),destroy(){}}}function st(t,e,n){const r=t.configs[e]?.[n];return r??{loaded:!1,config:null}}function at(t,e,n){const r=t.configure?.[n];return r??null}const ut=(0,G.Zd)("config-implementer-tools",{config:{}});function ct(t,e){for(let n of Object.keys(t.schemas)){const r=tt(n);if(t.moduleLoaded[n]){const o=At(n,t,e);r.setState({translationOverridesLoaded:!0,loaded:!0,config:o})}else{const o=kt(n,t,e);r.setState({translationOverridesLoaded:!0,loaded:!1,config:o})}}}function lt(t,e){const n=function(t,e){const n=Tt(jt(t,e)),r=Object.keys(n).reduce((t,e)=>(n[e]?.extensionSlots&&(t[e]=n[e]?.extensionSlots),t),{});!function(t){for(let[e,n]of Object.entries(t))for(let[t,r]of Object.entries(n))Et(r,e,t)}(r);return Object.keys(r).reduce((t,e)=>({...t,...r[e]}),{})}(t,e),r=Object.fromEntries(Object.entries(n).map(([t,e])=>[t,{loaded:!0,config:e}])),o=et(),i=o.getState(),s={slots:{...i.slots,...r}};_(i,s)||o.setState(s)}function ft(t,e){const n=function(t,e){let n=xt(k(t.schemas));const r=[...t.providedConfigs.map(t=>[t.config,t.source]),[e.config,"temporary config"]];for(let[t,e]of r)n=Tt([n,St(t,e)]);return n}(t,e);ut.setState({config:n})}function pt(t,e,n){const r={};for(let o of e.mountedExtensions){const e=Ot(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,t,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:e,loaded:!0}}}ot().setState({configs:r})}function ht(t,e){Pt(t,e);const n=E(e,Wt);X.setState(e=>({...e,schemas:{...e.schemas,[t]:n},moduleLoaded:{...e.moduleLoaded,[t]:!0}}))}function dt(t){X.setState(e=>({...e,schemas:{...e.schemas,[t]:Wt}}))}function yt(t){X.setState(e=>({...e,moduleLoaded:{...e.moduleLoaded,[t]:!0}}))}function bt(t){X.setState(e=>({...e,schemas:{...e.schemas,[t]:Kt}}))}function vt(t,e){Pt(t,e);const n=E(e,Wt);X.getState().schemas[t]&&console.error(`Config schema for extension ${t} already exists. If there are multiple extensions with this same name, one will probably crash.`),X.setState(e=>({...e,schemas:{...e.schemas,[t]:n}}))}function gt(t,e="provided"){X.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:e,config:t}]}))}function mt(t){return new Promise(e=>{const n=tt(t);function r(t){if(t.loaded&&t.config){const n=j(["Display conditions","Translation overrides"],t.config);e(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})}function _t(t,e,n){const r=[new Promise(e=>{const n=tt(t);function r(t){if(t.translationOverridesLoaded&&t.config){const n=t.config["Translation overrides"]??{};e(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})];return e&&n&&r.push(new Promise(t=>{const r=it(e,n);function o(e){if(e.loaded&&e.config){const n=e.config["Translation overrides"]??{};t(n),i&&i()}}o(r.getState());const i=r.subscribe(o)})),Promise.all(r)}function wt(t,e,n){Nt(t,e,n);const r=Lt(t,e);return Dt(t,r,n),r}function Ot(t,e,n,r,o,i){const s=function(t){const[e]=t.split("#");return e}(r),a=o.schemas[s],u=a?s:e,c=jt(o,i),l=Ct(t,c),f=l?.extensionSlots?.[n]?.configure?.[r]??{},p=Tt([Ct(u,c),f]),h=a??o.schemas[e];Nt(h,p,u);const d=Lt(h,p);return Dt(h,d,u),delete d.extensionSlots,d}function xt(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:Ut(t)?Object.keys(t).reduce((e,n)=>(e[n]=xt(t[n]),e),{}):{}}function St(t,e){return Ut(t)?Object.keys(t).reduce((n,r)=>(n[r]=St(t[r],e),n),{}):{_value:t,_source:e}}function Et(t,e,n){const r=`${e}.extensionSlots.${n}`,o=`Extension slot config '${r}'`,i=Object.keys(t).filter(t=>!["add","remove","order","configure"].includes(t));i.length&&Vt(r,o+`' contains invalid keys '${i.join("', '")}'`),t.add&&(Array.isArray(t.add)&&t.add.every(t=>"string"==typeof t)||Vt(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every(t=>"string"==typeof t)||Vt(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every(t=>"string"==typeof t)||Vt(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(Ut(t.configure)||Vt(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))}function jt(t,e){return[...t.providedConfigs.map(t=>t.config),e.config]}function Pt(t,e,n=""){const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(e).filter(t=>!t.startsWith("_"))){const i=n+(n&&".")+o,s=e[o];if("Display conditions"===i&&console.error(`${t} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${t} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!Ut(s)){console.error(`${t} has bad config schema definition for key '${i}'. ${r}`);continue}s.hasOwnProperty("_default")||Pt(t,s,i);const a=s._elements;if($t(a)&&Pt(t,a,i+"._elements"),s._validators)for(let e of s._validators)"function"!=typeof e&&console.error(`${t} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${e}.`);const u=s._type;u&&!Object.values(V).includes(u)&&console.error(`${t} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(V).join(", ")}. Received '${u}'`),Object.keys(s).every(t=>["_description","_validators","_elements","_type"].includes(t))&&!n.includes("._elements")&&console.error(`${t} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(s)}`),a&&u&&![V.Array,V.Object].includes(u)&&console.error(`${t} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(u)}`)}}function At(t,e,n){const r=e.schemas[t],o=Ct(t,jt(e,n));Nt(r,o,t);const i=Lt(r,o);return Dt(r,i,t),delete i.extensionSlots,i}function kt(t,e,n){const r=Ct(t,jt(e,n)),o=Lt(Wt,r);return Dt(Wt,o,t),delete o.extensionSlots,o}function Ct(t,e){return Tt(e.map(({[t]:e})=>e).filter(t=>!!t))}function Tt(t){return B(E)({},t)}function Nt(t,e,n=""){for(const r of Object.keys(e)){const o=e[r],i=n+"."+r,s=t[r];t.hasOwnProperty(r)?It(s,o,i):"extensionSlots"===r&&""!==n||Vt(i,`Unknown config key '${i}' provided. Ignoring.`)}}function It(t,e,n){Mt(n,t._type,e),Ut(e)?t._type===V.Object?function(t,e,n){if(t._elements)for(const r of Object.keys(e)){const o=e[r];It(t._elements,o,`${n}.${r}`)}}(t,e,n):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||Nt(t,e,n):t._type===V.Array&&function(t,e,n){if(Mt(n,V.Array,e)){if($t(t._elements))for(let r=0;r<e.length;r++)It(t._elements,e[r],`${n}[${r}]`);for(let r=0;r<e.length;r++)Mt(`${n}[${r}]`,t._elements?._type,e[r])}}(t,e,n)}function Dt(t,e,n=""){if(t)if(e!==t._default&&Rt(n,t._validators,e),Ut(e))for(const r of Object.keys(e)){const o=e[r],i=n+"."+r,s=t[r];t._type===V.Object&&t._elements?Dt(t._elements,o,i):Dt(s,o,i)}else if(Array.isArray(e)&&t._elements)for(let r=0;r<e.length;r++)Dt(t._elements,e[r],`${n}[${r}]`)}function Mt(t,e,n){return!e||Rt(t,[{Array:K,Boolean:W,ConceptUuid:Y,Number:z,Object:H,String:q,UUID:Y,PersonAttributeTypeUuid:Y,PatientIdentifierTypeUuid:Y}[e]],n)}function Rt(t,e,n){let r=!0;if(e)try{for(let o of e){const e=o(n);"string"==typeof e&&(Vt(t,"object"==typeof n?`Invalid configuration for ${t}: ${e}`:`Invalid configuration value ${n} for ${t}: ${e}`),r=!1)}}catch(e){console.error(`Skipping invalid validator at "${t}". Encountered error\n\t${e}`)}return r}ct(X.getState(),Q.getState()),X.subscribe(t=>ct(t,Q.getState())),Q.subscribe(t=>ct(X.getState(),t)),ft(X.getState(),Q.getState()),X.subscribe(t=>ft(t,Q.getState())),Q.subscribe(t=>ft(X.getState(),t)),lt(X.getState(),Q.getState()),X.subscribe(t=>lt(t,Q.getState())),Q.subscribe(t=>lt(X.getState(),t)),pt(X.getState(),Z.getState(),Q.getState()),X.subscribe(t=>{pt(t,Z.getState(),Q.getState())}),Z.subscribe(t=>{pt(X.getState(),t,Q.getState())}),Q.subscribe(t=>{pt(X.getState(),Z.getState(),t)});const Lt=(t,e)=>{const n=k(e);if(!t)return n;for(const e of Object.keys(t)){const r=n[e],o=t[e];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(e)||(n[e]=o._default);const t=o._elements;if(r&&$t(t))if(o._type===V.Array&&Array.isArray(r)){const o=r.map(e=>Lt(t,e));n[e]=o}else if(o._type===V.Object)for(let e of Object.keys(r))r[e]=Lt(t,r[e])}else if(Ut(o)){const t=r??{};Ut(t)&&(n[e]=Lt(o,t))}}return n};function $t(t){return!!t&&Object.keys(t).filter(t=>!["_default","_validators"].includes(t)).length>0}function Ut(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}let Bt=new Set;function Vt(t,e){const n=`${t}:::${e}`;Bt||(Bt=new Set),Bt.has(n)||(console.error(e),Bt.add(n))}function Ft(t){t?Bt.forEach(e=>{e.startsWith(t)&&Bt.delete(e)}):Bt.clear()}const Kt={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:V.Object,_default:{},_validators:[F(t=>Object.keys(t).every(t=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(t)),t=>`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${Object.keys(t).filter(t=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(t)).join(", ")}.`)]}},Wt={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:V.Array,_default:[]}},...Kt},zt=(t,e)=>F(n=>t<=n&&n<=e,`must be between ${t} and ${e}`),qt=t=>{const e=t.concat(["openmrsBase","openmrsSpaBase"]);return F(t=>{if(!t||"string"!=typeof t)return!1;const n=/\${(.*?)}/g;let r=n.exec(t);for(;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(t=>"${"+t+"}").join(", "))},Ht=qt([]),Yt=t=>F(e=>t.includes(e),`Must be one of the following: '${t.join("', '")}'.`),Gt={inRange:zt,isUrl:Ht,isUrlWithTemplateParameters:qt,oneOf:Yt}},96488:(t,e,n)=>{"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,{A:()=>r})},96696:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759),s=n(2519),a=n(34914);e.takeLast=function(t){return function(e){return 0===t?a.empty():e.lift(new u(t))}};var u=function(){function t(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.total))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return o(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o<n;o++){var i=e++%n;t.next(r[i])}t.complete()},e}(i.Subscriber)},96904:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(71077),o=n(49529);e.publish=function(t){return t?o.multicast(function(){return new r.Subject},t):o.multicast(new r.Subject)}},96956:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=Array.isArray},97913:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=n(39600).A.Uint8Array},97942:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},98155:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(77759);e.pairwise=function(){return function(t){return t.lift(new s)}};var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return o(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(i.Subscriber)},99271:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(61758);const o=function(t,e,n){"__proto__"==e&&r.A?(0,r.A)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},99549:(t,e,n)=>{"use strict";n(18780).audit,n(13441).auditTime,n(11853).buffer,n(77650).bufferCount,n(94360).bufferTime,n(43381).bufferToggle,n(51069).bufferWhen,n(85916).catchError,n(90239).combineAll,n(79397).combineLatest,n(66255).concat,n(60208).concatAll,n(92209).concatMap,n(83232).concatMapTo,n(85476).count,n(59768).debounce,n(92661).debounceTime,n(90952).defaultIfEmpty,n(17436).delay,n(41136).delayWhen,n(56051).dematerialize,n(85343).distinct,n(88179).distinctUntilChanged,n(43670).distinctUntilKeyChanged,n(57366).elementAt,n(61650).endWith,n(92472).every,n(65893).exhaust,n(29219).exhaustMap,n(76527).expand,n(64629).filter,n(4349).finalize,n(32376).find,n(8674).findIndex,n(77089).first,n(36217).groupBy,n(76024).ignoreElements,n(87362).isEmpty,n(6047).last;var r=n(89233);e.Tj=r.map,n(27296).mapTo,n(75434).materialize,n(57001).max,n(14779).merge,n(80980).mergeAll;var o=n(60781);o.mergeMap,o.flatMap,n(62988).mergeMapTo,n(86430).mergeScan,n(21547).min,n(49529).multicast,n(24654).observeOn,n(45276).onErrorResumeNext,n(98155).pairwise,n(27337).partition,n(86050).pluck,n(96904).publish,n(82334).publishBehavior,n(20232).publishLast,n(24355).publishReplay,n(89646).race,n(71929).reduce,n(30068).repeat,n(58440).repeatWhen,n(39933).retry,n(53325).retryWhen,n(85203).refCount,n(27677).sample,n(88360).sampleTime,n(85002).scan,n(54332).sequenceEqual,n(49184).share,n(91451).shareReplay,n(76003).single,n(67124).skip,n(31444).skipLast,n(51026).skipUntil,n(79159).skipWhile,n(89155).startWith,n(30162).subscribeOn,n(21324).switchAll,n(20917).switchMap,n(35428).switchMapTo;var i=n(85624);e.s=i.take,n(96696).takeLast,n(41534).takeUntil,n(5179).takeWhile,n(68022).tap,n(15019).throttle,n(7406).throttleTime,n(8347).throwIfEmpty,n(61115).timeInterval,n(82784).timeout,n(35816).timeoutWith,n(42748).timestamp,n(89133).toArray,n(22363).window,n(32216).windowCount,n(93886).windowTime,n(83903).windowToggle,n(27539).windowWhen,n(76788).withLatestFrom,n(64868).zip,n(85517).zipAll},99623:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(47986),o=n(60208);e.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.concatAll()(r.of.apply(void 0,t))}}}]);
|