@openmrs/esm-fast-data-entry-app 1.0.1-pre.93 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/__mocks__/react-i18next.js +9 -14
  2. package/dist/12.js +1 -0
  3. package/dist/12.js.map +1 -0
  4. package/dist/132.js +1 -1
  5. package/dist/151.js +2 -0
  6. package/dist/151.js.LICENSE.txt +5 -0
  7. package/dist/151.js.map +1 -0
  8. package/dist/195.js +1 -0
  9. package/dist/195.js.map +1 -0
  10. package/dist/197.js +1 -0
  11. package/dist/221.js +1 -0
  12. package/dist/221.js.map +1 -0
  13. package/dist/259.js +1 -0
  14. package/dist/259.js.map +1 -0
  15. package/dist/265.js +1 -0
  16. package/dist/265.js.map +1 -0
  17. package/dist/269.js +1 -0
  18. package/dist/269.js.map +1 -0
  19. package/dist/300.js +1 -0
  20. package/dist/335.js +1 -0
  21. package/dist/367.js +1 -0
  22. package/dist/367.js.map +1 -0
  23. package/dist/384.js +1 -0
  24. package/dist/384.js.map +1 -0
  25. package/dist/540.js +2 -0
  26. package/dist/540.js.map +1 -0
  27. package/dist/55.js +1 -0
  28. package/dist/579.js +1 -0
  29. package/dist/579.js.map +1 -0
  30. package/dist/595.js +1 -1
  31. package/dist/595.js.LICENSE.txt +34 -2
  32. package/dist/595.js.map +1 -0
  33. package/dist/602.js +1 -0
  34. package/dist/602.js.map +1 -0
  35. package/dist/616.js +1 -0
  36. package/dist/616.js.map +1 -0
  37. package/dist/626.js +2 -0
  38. package/dist/626.js.map +1 -0
  39. package/dist/652.js +1 -0
  40. package/dist/77.js +1 -0
  41. package/dist/77.js.map +1 -0
  42. package/dist/773.js +2 -0
  43. package/dist/{68.js.LICENSE.txt → 773.js.LICENSE.txt} +13 -2
  44. package/dist/773.js.map +1 -0
  45. package/dist/88.js +1 -0
  46. package/dist/88.js.map +1 -0
  47. package/dist/930.js +1 -0
  48. package/dist/930.js.map +1 -0
  49. package/dist/961.js +2 -0
  50. package/dist/961.js.map +1 -0
  51. package/dist/983.js +1 -0
  52. package/dist/983.js.map +1 -0
  53. package/dist/99.js +1 -0
  54. package/dist/main.js +1 -1
  55. package/dist/main.js.map +1 -0
  56. package/dist/openmrs-esm-fast-data-entry-app.js +1 -1
  57. package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +380 -156
  58. package/dist/openmrs-esm-fast-data-entry-app.js.map +1 -0
  59. package/dist/routes.json +1 -0
  60. package/jest.config.json +2 -1
  61. package/package.json +41 -35
  62. package/prettier.config.js +8 -0
  63. package/src/CancelModal.tsx +9 -15
  64. package/src/CompleteModal.tsx +7 -18
  65. package/src/FormBootstrap.tsx +31 -18
  66. package/src/Root.tsx +7 -12
  67. package/src/add-group-modal/AddGroupModal.tsx +73 -112
  68. package/src/add-group-modal/styles.scss +7 -3
  69. package/src/config-schema.ts +63 -24
  70. package/src/constant.ts +1 -1
  71. package/src/context/FormWorkflowContext.tsx +26 -39
  72. package/src/context/FormWorkflowReducer.ts +50 -74
  73. package/src/context/GroupFormWorkflowContext.tsx +40 -59
  74. package/src/context/GroupFormWorkflowReducer.ts +84 -109
  75. package/src/declarations.d.ts +3 -0
  76. package/src/empty-state/EmptyDataIllustration.tsx +4 -16
  77. package/src/empty-state/EmptyState.tsx +8 -13
  78. package/src/empty-state/styles.scss +14 -14
  79. package/src/form-entry-workflow/FormEntryWorkflow.tsx +43 -55
  80. package/src/form-entry-workflow/form-review-card/FormReviewCard.tsx +7 -7
  81. package/src/form-entry-workflow/form-review-card/index.ts +1 -1
  82. package/src/form-entry-workflow/form-review-card/styles.scss +9 -11
  83. package/src/form-entry-workflow/index.ts +1 -1
  84. package/src/form-entry-workflow/patient-banner/PatientBanner.test.tsx +5 -5
  85. package/src/form-entry-workflow/patient-banner/PatientBanner.tsx +14 -27
  86. package/src/form-entry-workflow/patient-banner/index.ts +1 -1
  87. package/src/form-entry-workflow/patient-banner/styles.scss +11 -12
  88. package/src/form-entry-workflow/patient-search-header/PatientSearchHeader.tsx +19 -28
  89. package/src/form-entry-workflow/patient-search-header/index.ts +1 -1
  90. package/src/form-entry-workflow/patient-search-header/styles.scss +13 -10
  91. package/src/form-entry-workflow/styles.scss +11 -13
  92. package/src/form-entry-workflow/workflow-review/WorkflowReview.tsx +13 -11
  93. package/src/form-entry-workflow/workflow-review/index.ts +1 -1
  94. package/src/form-entry-workflow/workflow-review/styles.scss +0 -4
  95. package/src/forms-app-menu-link.tsx +4 -6
  96. package/src/forms-page/FormsPage.tsx +23 -51
  97. package/src/forms-page/forms-table/FormsTable.tsx +22 -42
  98. package/src/forms-page/forms-table/index.ts +1 -1
  99. package/src/forms-page/forms-table/styles.scss +4 -5
  100. package/src/forms-page/index.ts +1 -1
  101. package/src/forms-page/styles.scss +3 -5
  102. package/src/group-form-entry-workflow/GroupFormEntryWorkflow.tsx +9 -9
  103. package/src/group-form-entry-workflow/GroupSessionWorkspace.tsx +77 -117
  104. package/src/group-form-entry-workflow/SessionDetailsForm.tsx +73 -50
  105. package/src/group-form-entry-workflow/SessionMetaWorkspace.tsx +20 -28
  106. package/src/group-form-entry-workflow/attendance-table/AttendanceTable.tsx +15 -29
  107. package/src/group-form-entry-workflow/attendance-table/index.ts +1 -1
  108. package/src/group-form-entry-workflow/configurable-questions/ConfigurableQuestionsSection.tsx +45 -0
  109. package/src/group-form-entry-workflow/group-display-header/GroupDisplayHeader.test.tsx +5 -5
  110. package/src/group-form-entry-workflow/group-display-header/GroupDisplayHeader.tsx +13 -21
  111. package/src/group-form-entry-workflow/group-display-header/index.ts +1 -1
  112. package/src/group-form-entry-workflow/group-display-header/styles.scss +20 -20
  113. package/src/group-form-entry-workflow/group-search/CompactGroupResults.tsx +24 -35
  114. package/src/group-form-entry-workflow/group-search/CompactGroupSearch.tsx +13 -15
  115. package/src/group-form-entry-workflow/group-search/GroupSearch.tsx +22 -38
  116. package/src/group-form-entry-workflow/group-search/compact-group-result.scss +16 -17
  117. package/src/group-form-entry-workflow/group-search/compact-group-search.scss +7 -8
  118. package/src/group-form-entry-workflow/group-search/group-search.scss +20 -23
  119. package/src/group-form-entry-workflow/group-search-header/GroupSearchHeader.tsx +20 -21
  120. package/src/group-form-entry-workflow/group-search-header/index.ts +1 -1
  121. package/src/group-form-entry-workflow/group-search-header/styles.scss +8 -8
  122. package/src/group-form-entry-workflow/index.ts +1 -1
  123. package/src/group-form-entry-workflow/styles.scss +13 -16
  124. package/src/hooks/index.ts +7 -6
  125. package/src/hooks/useFormState.ts +3 -3
  126. package/src/hooks/useGetAllForms.ts +7 -15
  127. package/src/hooks/useGetEncounter.ts +3 -3
  128. package/src/hooks/useGetPatient.ts +2 -2
  129. package/src/hooks/useGetPatients.ts +4 -6
  130. package/src/hooks/useGetSystemSetting.ts +3 -5
  131. package/src/hooks/useKeyPress.ts +5 -5
  132. package/src/hooks/usePostEndpoint.ts +10 -10
  133. package/src/hooks/useSearchEndpoint.ts +23 -40
  134. package/src/hooks/useSpecificQuestions.ts +75 -0
  135. package/src/hooks/useStartVisit.ts +18 -28
  136. package/src/index.ts +12 -76
  137. package/src/patient-card/PatientCard.tsx +8 -20
  138. package/src/patient-card/index.ts +1 -1
  139. package/src/patient-card/styles.scss +2 -4
  140. package/src/routes.json +24 -0
  141. package/src/setup-tests.ts +1 -1
  142. package/src/types.ts +25 -0
  143. package/tools/i18next-parser.config.js +19 -19
  144. package/translations/am.json +75 -0
  145. package/translations/ar.json +75 -0
  146. package/translations/en.json +7 -1
  147. package/translations/es.json +75 -0
  148. package/translations/fr.json +33 -8
  149. package/translations/he.json +75 -0
  150. package/translations/km.json +75 -0
  151. package/tsconfig.json +2 -1
  152. package/turbo.json +18 -0
  153. package/webpack.config.js +1 -1
  154. package/dist/153.js +0 -1
  155. package/dist/229.js +0 -1
  156. package/dist/247.js +0 -1
  157. package/dist/255.js +0 -1
  158. package/dist/294.js +0 -2
  159. package/dist/32.js +0 -1
  160. package/dist/327.js +0 -1
  161. package/dist/571.js +0 -1
  162. package/dist/574.js +0 -1
  163. package/dist/617.js +0 -1
  164. package/dist/656.js +0 -2
  165. package/dist/658.js +0 -2
  166. package/dist/658.js.LICENSE.txt +0 -27
  167. package/dist/68.js +0 -2
  168. package/dist/74.js +0 -1
  169. package/dist/757.js +0 -1
  170. package/dist/776.js +0 -1
  171. package/dist/804.js +0 -1
  172. package/dist/820.js +0 -1
  173. package/dist/935.js +0 -2
  174. package/dist/openmrs-esm-fast-data-entry-app.old +0 -1
  175. package/src/declarations.d.tsx +0 -2
  176. /package/dist/{294.js.LICENSE.txt → 540.js.LICENSE.txt} +0 -0
  177. /package/dist/{656.js.LICENSE.txt → 626.js.LICENSE.txt} +0 -0
  178. /package/dist/{935.js.LICENSE.txt → 961.js.LICENSE.txt} +0 -0
package/dist/151.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 151.js.LICENSE.txt */
2
+ (globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[151],{5867:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-config","@openmrs/esm-navigation","@openmrs/esm-error-handling","@openmrs/esm-offline"],(function(e,t){var u={},s={},c={},l={};return{setters:[function(e){u.Type=e.Type,u.defineConfigSchema=e.defineConfigSchema,u.getConfig=e.getConfig,u.validators=e.validators},function(e){s.navigate=e.navigate},function(e){c.reportError=e.reportError},function(e){l.getSynchronizationItems=e.getSynchronizationItems}],execute:function(){e(function(){var e={385:function(){System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(t,n){if(t){if("string"==typeof t)return e(t,3);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){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()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},824:function(e){"use strict";e.exports=u},254:function(e){"use strict";e.exports=c},513:function(e){"use strict";e.exports=s},738:function(e){"use strict";e.exports=l}},t={};function f(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,f),o.exports}f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){"use strict";var e=function(e,t){function n(){this.constructor=e}st(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},u=function(e){setTimeout((function(){throw e}),0)},s=function(e){return null!==e&&"object"==typeof e},c=function(e){return e.reduce((function(e,t){return e.concat(i(t,pt)?t.errors:t)}),[])},l=function(e){return e},h=function(e){if(e||(e=lt.Promise||Promise),!e)throw new Error("no Promise impl found");return e},p=function(e,t,n){var r=g(e,t,n);zt.length?zt.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},y=function(e){if("function"!=typeof e)throw Error(m(28,!1));zt.push(e)},v=function(e){if("function"!=typeof e)throw Error(m(29,!1));var t=!1;return zt=zt.filter((function(n){var r=n===e;return t=t||r,!r})),t},m=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},g=function(e,t,n){var r,o="".concat(E(t)," '").concat(_(t),"' died in status ").concat(t.status,": ");if(i(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(m(30,!1,t.status,_(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=_(t),t.status=n,r},b=function(e){return e.status===Qt},w=function(e){try{return e.activeWhen(window.location)}catch(t){return p(t,e,nn),!1}},_=function(e){return e.name},S=function(e){return Boolean(e.unmountThisParcel)},E=function(e){return S(e)?"parcel":"application"},O=function(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]},x=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},k=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!x(t,(function(e){return"function"!=typeof e}))));var t},A=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=E(e),o=_(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return P(n)?n:Promise.reject(m(15,!1,r,o,t,a))}))}),Promise.resolve())}},P=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},j=function(e,t){return Promise.resolve().then((function(){return e.status!==Wt?e:(e.status=Yt,e.bootstrap?U(e,"bootstrap").then(n).catch((function(n){if(t)throw g(n,e,nn);return p(n,e,nn),e})):Promise.resolve().then(n))}));function n(){return e.status=$t,e}},D=function(e,t){return Promise.resolve().then((function(){if(e.status!==Qt)return e;e.status=Zt;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw g(r,e,nn);p(r,e,nn)}))})).then((function(){return e}));function r(){return U(e,"unmount").then((function(){e.status=$t}),(function(n){if(t)throw g(n,e,nn);p(n,e,nn)}))}}))},C=function(e,t){return Promise.resolve().then((function(){return e.status!==$t?e:(on||(window.dispatchEvent(new Vt("single-spa:before-first-mount")),on=!0),e.status=Jt,U(e,"mount").then((function(){return e.status=Qt,an||(window.dispatchEvent(new Vt("single-spa:first-mount")),an=!0),e})).catch((function(n){return e.status=Qt,D(e,!0).then(r,r);function r(){if(t)throw g(n,e,nn);return p(n,e,nn),e}})))}))},T=function(){return I.apply(sn,arguments)},I=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(m(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(m(3,!1,a(e.name)));var r=un++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(m(4,!1,o,void 0===t?"undefined":a(t)));if(!t.domElement)throw Error(m(5,!1,o));var i,u="function"==typeof e,s=u?e:function(){return Promise.resolve(e)},c={id:r,parcels:{},status:u?qt:Wt,customProps:t,parentName:_(n),unmountThisParcel:function(){return p.then((function(){if(c.status!==Qt)throw Error(m(6,!1,o,c.status));return D(c,!0)})).then((function(e){return c.parentName&&delete n.parcels[c.id],e})).then((function(e){return f(e),e})).catch((function(e){throw c.status=nn,d(e),e}))}};n.parcels[r]=c;var l=s();if(!l||"function"!=typeof l.then)throw Error(m(7,!1));l=l.then((function(e){if(!e)throw Error(m(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!k(e.bootstrap))throw Error(m(9,!1,o));if(!k(e.mount))throw Error(m(10,!1,o));if(!k(e.unmount))throw Error(m(11,!1,o));if(e.update&&!k(e.update))throw Error(m(12,!1,o));var t=A(e,"bootstrap"),n=A(e,"mount"),a=A(e,"unmount");c.status=Wt,c.name=o,c.bootstrap=t,c.mount=n,c.unmount=a,c.timeouts=G(e.timeouts),e.update&&(c.update=A(e,"update"),i.update=function(e){return c.customProps=e,M((t=c,Promise.resolve().then((function(){if(t.status!==Qt)throw Error(m(32,!1,_(t)));return t.status=Xt,U(t,"update").then((function(){return t.status=Qt,t})).catch((function(e){throw g(e,t,nn)}))}))));var t})}));var f,d,h=l.then((function(){return j(c,!0)})),p=h.then((function(){return C(c,!0)})),y=new Promise((function(e,t){f=e,d=t}));return i={mount:function(){return M(Promise.resolve().then((function(){if(c.status!==$t)throw Error(m(13,!1,o,c.status));return n.parcels[r]=c,C(c)})))},unmount:function(){return M(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:M(l),bootstrapPromise:M(h),mountPromise:M(p),unmountPromise:M(y)}},M=function(e){return e.then((function(){return null}))},R=function(e){var t=_(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(m(40,!1),t,n));var r=O({},n,{name:t,mountParcel:I.bind(e),singleSpa:Gt});return S(e)&&(r.unmountSelf=e.unmountThisParcel),r},N=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(16,!1));cn.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},L=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(17,!1));cn.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},F=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(18,!1));cn.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},B=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(19,!1));cn.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},U=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=E(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](R(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=m(31,!1,t,o,_(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},G=function(e){var t={};for(var n in cn)t[n]=O({},cn[n],e&&e[n]||{});return t},K=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Ht&&e.status!==tn?e:(e.status=qt,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(R(e));if(!P(r))throw n=!0,Error(m(33,!1,_(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!k(t.bootstrap)&&(r=35),k(t.mount)||(r=36),k(t.unmount)||(r=37);var o=E(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(m(r,!1,o,_(e),i),t),p(void 0,e,nn),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=O({},e.devtools.overlays,t.devtools.overlays)),e.status=Wt,e.bootstrap=A(t,"bootstrap"),e.mount=A(t,"mount"),e.unmount=A(t,"unmount"),e.unload=A(t,"unload"),e.timeouts=G(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=nn:(r=tn,e.loadErrorTime=(new Date).getTime()),p(t,e,r),e})));var t,n}))},V=function(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(m(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=Y(window.location.href),r=Y(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)},z=function(e){var t=this;if(e){var n=e[0].type;dn.indexOf(n)>=0&&fn[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},H=function(){Sn([],arguments)},q=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Ut&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},W=function(e){if(pn)throw Error(m(43,!1));Ut=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,pn=!0,hn=window.history.replaceState,window.addEventListener("hashchange",H),window.addEventListener("popstate",H);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&dn.indexOf(e)>=0)||x(fn[e],(function(e){return e===n})))return t.apply(this,arguments);fn[e].push(n)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&dn.indexOf(e)>=0))return n.apply(this,arguments);fn[e]=fn[e].filter((function(e){return e!==t}))},window.history.pushState=q(window.history.pushState,"pushState"),window.history.replaceState=q(hn,"replaceState")},Y=function(e){var t=document.createElement("a");return t.href=e,t},$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!yn){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return J.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return J.call(this,n,window.removeEventListener,e,t,arguments)},yn=!0}},J=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){dn.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},Q=function(e){return Promise.resolve().then((function(){var t=vn[_(e)];if(!t)return e;if(e.status===Ht)return X(e,t),e;if(e.status===en)return t.promise.then((function(){return e}));if(e.status!==$t&&e.status!==tn)return e;var n=e.status===tn?Promise.resolve():U(e,"unload");return e.status=en,n.then((function(){return X(e,t),e})).catch((function(n){return function(e,t,n){delete vn[_(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,p(n,e,nn),t.reject(n)}(e,t,n),e}))}))},X=function(e,t){delete vn[_(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Ht,t.resolve()},Z=function(e,t,n,r){vn[_(e)]={app:e,resolve:n,reject:r},Object.defineProperty(vn[_(e)],"promise",{get:t})},ee=function(e){return vn[e]},te=function(){return mn.filter(b).map(_)},ne=function(){return mn.map(_)},re=function(e){var t=x(mn,(function(t){return _(t)===e}));return t?t.status:null},oe=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(m(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(m(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(m(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(m(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(m(24,!1));if(!ce(e.customProps))throw Error(m(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(m(20,!1));if(!t)throw Error(m(23,!1));if("function"!=typeof n)throw Error(m(24,!1));if(!ce(r))throw Error(m(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:le(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(pe()||gn||(gn=!0,setTimeout((function(){pe()||console.warn(m(1,!1))}),5e3)),-1!==ne().indexOf(o.name))throw Error(m(21,!1,o.name));mn.push(O({loadErrorTime:null,status:Ht,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ln&&($(),Sn())},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return mn.filter((function(t){return t.activeWhen(e)})).map(_)},ae=function(e){if(0===mn.filter((function(t){return _(t)===e})).length)throw Error(m(25,!1,e));return(ln?ue(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=mn.map(_).indexOf(e);mn.splice(t,1)}))},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(m(26,!1));var n=x(mn,(function(t){return _(t)===e}));if(!n)throw Error(m(27,!1,e));var r,o=ee(_(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){Z(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,se(n,o.resolve,o.reject)):r=new Promise((function(e,t){Z(n,(function(){return r}),e,t),se(n,e,t)})),r},se=function(e,t,n){Promise.resolve().then((function(){if(x(ie(),(function(t){return t===_(e)})))return fe()})).then((function(){return D(e).then(Q).then((function(){t(),setTimeout((function(){Sn()}))}))})).catch(n)},ce=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},le=function(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},fe=function(){return Sn()},de=function(e,t){return w(e)?j(e).then((function(e){return t.then((function(){return w(e)?C(e):e}))})):t.then((function(){return e}))},he=function(e){En=!0,ln&&(W(e),Sn())},pe=function(){return En},ye=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},ve=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},be=function(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)},we=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=be(e);if(t.headers||(t.headers={}),Nt(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(Dn)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(Cn)){var r=new URL(n,window.location.toString());r.searchParams.has("_summary")||(r.searchParams.set("_summary","data"),n=r.toString())}var o,i,a=Error();return window.fetch(n,t).then((o=function(e){var t,r,o;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(i){switch(i.label){case 0:return(t=e).ok?204!==t.status?[3,2]:[4,(0,Lt.getConfig)("@openmrs/esm-api")]:[3,4];case 1:return i.sent().followRedirects&&t.headers.has("location")&&(r=t.headers.get("location"))&&(0,Ft.navigate)({to:r}),t.data=null,[2,t];case 2:return[2,t.clone().text().then((function(e){try{e&&(t.data=JSON.parse(e))}catch(e){}return t}))];case 3:return[3,6];case 4:return[4,(0,Lt.getConfig)("@openmrs/esm-api")];case 5:return o=i.sent().redirectAuthFailure,n===be(Tn)&&403===t.status||o.enabled&&o.errors.includes(t.status)?(sessionStorage.removeItem(xn),(0,Ft.navigate)({to:o.url}),[2,o.resolvePromise?Promise.resolve():new Promise((function(){}))]):[2,t.clone().text().then((function(e){var r=e;try{r=JSON.parse(e)}catch(e){}throw new In(n,t,r,a)}),(function(e){throw new In(n,t,null,a)}))];case 6:return[2]}}))},i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){ve(i,n,r,a,u,"next",e)}function u(e){ve(i,n,r,a,u,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)}))},_e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new wt((function(r){var o=!1;return we(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},Se=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ee=function(e,t){return we("".concat(Mn,"/").concat(e),{signal:t.signal})},Oe=function(e,t,n){return we("".concat(Mn,"?patient=").concat(e,"&includeEncounterless=").concat(t),{signal:n.signal})},xe=function(e,t){return Rn.apply(this,arguments)},ke=function(e,t){return we("".concat(Mn,"/").concat(e),{method:"DELETE",signal:t.signal})},Ae=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Pe=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ae(i,r,o,a,u,"next",e)}function u(e){Ae(i,r,o,a,u,"throw",e)}a(void 0)}))}},je=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Bn<Date.now()-6e4||!Fn.getState().loaded)&&Ie(),new wt((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Fn.getState()),Fn.subscribe(n)}))},Ce=function(){return(Bn<Date.now()-6e4||!Fn.getState().loaded)&&Ie(),Fn},Te=function(e){var t,n,r,o=null!==(r=null==e||null===(t=e.user)||void 0===t||null===(n=t.userProperties)||void 0===n?void 0:n.defaultLocale)&&void 0!==r?r:e.locale,i=document.documentElement.getAttribute("lang");(function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0})(o)&&o!==i&&document.documentElement.setAttribute("lang",o)},Ie=function(e,t){Bn=Date.now();var n={};return e&&t&&(n.Authorization="Basic ".concat(window.btoa("".concat(e,":").concat(t)))),Ue(we(Tn,{headers:n}))},Me=function(){Fn.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},Re=function(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!Ln(t.privileges.find((function(t){return e===t.display}))):Array.isArray(e)?e.every((function(e){return!Ln(t.privileges.find((function(t){return e===t.display})))})):(Ln(e)||console.error('Could not understand privileges "'.concat(e,'"')),!0)}(e,t)||function(e){return!Ln(e.roles.find((function(e){return"System Developer"===e.display})))}(t)},Ne=function(){var e,t;return new Promise((function(n){var r=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(Fn.getState()),e||(t=Fn.subscribe(r))}))},Le=function(){return new Promise((function(e,t){De().subscribe((function(t){e(t.sessionLocation)}),t).unsubscribe()}))},Fe=function(e,t){return Un.apply(this,arguments)},Be=function(e,t,n){return Gn.apply(this,arguments)},Ue=function(e){return new Promise((function(t,n){e.then((function(e){var r;"object"==typeof(null==e?void 0:e.data)?(r={loaded:!0,session:e.data},Fn.setState(r),t(r)):(r={loaded:!1,session:null},Fn.setState(r),n(r))})).catch((function(e){(0,Nn.reportError)("Failed to fetch new session information: ".concat(e));var t={loaded:!1,session:null};Fn.setState(t),n(t)}))}))},Ge=function(){(0,Lt.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Lt.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Lt.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Lt.validators.isUrl]},errors:{_type:Lt.Type.Array,_default:[401],_elements:{_type:Lt.Type.Number,_validators:[Lt.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Lt.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:Lt.Type.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}}),Ie()},Ke=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ve=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},ze=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ve(i,r,o,a,u,"next",e)}function u(e){Ve(i,r,o,a,u,"throw",e)}a(void 0)}))}},He=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},qe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},We=function(e,t){return Vn.apply(this,arguments)},Ye=function(e){return zn.apply(this,arguments)},$e=function(){return(0,Bt.getGlobalStore)("visit",er)},Je=function(e,t){$e().setState({patientUuid:e,manuallySetVisitUuid:t})},Qe=function(e,t){return we("".concat(Dn,"/visit"),{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},Xe=function(e,t,n){return we("".concat(Dn,"/visit/").concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},Ze=function(e,t,n){var r=null!=n?n:Zn;return we("".concat(Dn,"/visit?patient=").concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})},et=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new nr(e,t))}},tt=function(e){return function(t){return 0===e?ir:t.lift(new ar(e))}},nt=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},rt=function(){return _e("".concat(Dn,"/visittype")).pipe(et((function(e){return e.data.results.map(nt)}))).pipe(tt(1))},ot=function(e){return{uuid:e.uuid,display:e.display}},it=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);var r=n.toString();return _e("".concat(Dn,"/location").concat(r?"?"+r:"")).pipe(et((function(e){return e.data.results.map(ot)}))).pipe(tt(1))};f.r(d),f.d(d,{OpenmrsFetchError:function(){return In},VisitMode:function(){return Hn},VisitStatus:function(){return qn},attachmentUrl:function(){return Mn},backendDependencies:function(){return sr},clearCurrentUser:function(){return Me},createAttachment:function(){return xe},defaultVisitCustomRepresentation:function(){return Zn},deleteAttachmentPermanently:function(){return ke},fetchCurrentPatient:function(){return We},fhirBaseUrl:function(){return Cn},getAttachmentByUuid:function(){return Ee},getAttachments:function(){return Oe},getCurrentUser:function(){return De},getLocations:function(){return it},getLoggedInUser:function(){return Ne},getSessionLocation:function(){return Le},getSessionStore:function(){return Ce},getStartedVisit:function(){return tr},getVisitStore:function(){return $e},getVisitTypes:function(){return rt},getVisitsForPatient:function(){return Ze},makeUrl:function(){return be},openmrsFetch:function(){return we},openmrsObservableFetch:function(){return _e},refetchCurrentUser:function(){return Ie},restBaseUrl:function(){return Dn},saveVisit:function(){return Qe},sessionEndpoint:function(){return Tn},sessionStore:function(){return Fn},setCurrentVisit:function(){return Je},setSessionLocation:function(){return Fe},setUserLanguage:function(){return Te},setUserProperties:function(){return Be},setupApiModule:function(){return Ge},toLocationObject:function(){return ot},toVisitTypeObject:function(){return nt},updateVisit:function(){return Xe},userHasAccess:function(){return Re}});var at,ut,st=function(e,t){return st=Object.setPrototypeOf||i({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},st(e,t)},ct=!1,lt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,ct=e},get useDeprecatedSynchronousErrorHandling(){return ct}},ft={closed:!0,next:function(e){},error:function(e){if(lt.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},dt=Array.isArray||function(e){return e&&"number"==typeof e.length},ht=function(){var e=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this};return e.prototype=Object.create(Error.prototype),e}(),pt=ht,yt=function(){var e=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return e.prototype.unsubscribe=function(){var n;if(!this.closed){var r=this,o=r._parentOrParents,a=r._ctorUnsubscribe,u=r._unsubscribe,l=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i(o,e))o.remove(this);else if(null!==o)for(var f=0;f<o.length;++f)o[f].remove(this);if(t(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(e){n=i(e,pt)?c(e.errors):[e]}}if(dt(l)){f=-1;for(var d=l.length;++f<d;){var h=l[f];if(s(h))try{h.unsubscribe()}catch(e){n=n||[],i(e,pt)?n=n.concat(c(e.errors)):n.push(e)}}}if(n)throw new pt(n)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(void 0===t?"undefined":a(t)){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!i(n,e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(i(o,e)){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[n]:u.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}(),vt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),mt=function(t){function n(e,r,o){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=ft;break;case 1:if(!e){a.destination=ft;break}if("object"==typeof e){i(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new gt(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new gt(a,e,r,o)}return a}return e(n,t),n.prototype[vt]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(yt),gt=function(n){var r=function(e,r,o,i){var a,u=n.call(this)||this;u._parentSubscriber=e;var s=u;return t(r)?a=r:r&&(a=r.next,o=r.error,i=r.complete,r!==ft&&(t((s=Object.create(r)).unsubscribe)&&u.add(s.unsubscribe.bind(s)),s.unsubscribe=u.unsubscribe.bind(u))),u._context=s,u._next=a,u._error=o,u._complete=i,u};return e(r,n),r.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;lt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},r.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=lt.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},r.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};lt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),lt.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},r.prototype.__tryOrSetError=function(e,t,n){if(!lt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return lt.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},r.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},r}(mt),bt="function"==typeof Symbol&&Symbol.observable||"@@observable",wt=function(){var e=function(e){this._isScalar=!1,e&&(this._subscribe=e)};return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,o=function(e,t,n){if(e){if(i(e,mt))return e;if(e[vt])return e[vt]()}return e||t||n?new mt(e,t,n):new mt(ft)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||lt.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),lt.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){lt.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&i(r,mt)?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=h(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[bt]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===(n=e).length?l:1===n.length?n[0]:function(e){return n.reduce((function(e,t){return t(e)}),e)})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=h(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}(),_t="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,St="object"==typeof self&&self&&self.Object===Object&&self,Et=(_t||St||Function("return this")()).Symbol,Ot=Object.prototype,xt=Ot.hasOwnProperty,kt=Ot.toString,At=Et?Et.toStringTag:void 0,Pt=Object.prototype.toString,jt=Et?Et.toStringTag:void 0,Dt=(at=Object.getPrototypeOf,ut=Object,function(e){return at(ut(e))}),Ct=Function.prototype,Tt=Object.prototype,It=Ct.toString,Mt=Tt.hasOwnProperty,Rt=It.call(Object),Nt=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":jt&&jt in Object(e)?function(e){var t=xt.call(e,At),n=e[At];try{e[At]=void 0;var r=!0}catch(e){}var o=kt.call(e);return r&&(t?e[At]=n:delete e[At]),o}(e):function(e){return Pt.call(e)}(e)}(e))return!1;var t=Dt(e);if(null===t)return!0;var n=Mt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&i(n,n)&&It.call(n)==Rt},Lt=f(824),Ft=f(513),Bt=f(385);(0,Bt.createGlobalStore)("breadcrumbs",[]);var Ut,Gt=Object.freeze({__proto__:null,get start(){return he},get ensureJQuerySupport(){return $},get setBootstrapMaxTime(){return N},get setMountMaxTime(){return L},get setUnmountMaxTime(){return F},get setUnloadMaxTime(){return B},get registerApplication(){return oe},get unregisterApplication(){return ae},get getMountedApps(){return te},get getAppStatus(){return re},get unloadApplication(){return ue},get checkActivityFunctions(){return ie},get getAppNames(){return ne},get pathToActiveWhen(){return le},get navigateToUrl(){return V},get patchHistoryApi(){return W},get triggerAppChange(){return fe},get addErrorHandler(){return y},get removeErrorHandler(){return v},get mountRootParcel(){return T},get NOT_LOADED(){return Ht},get LOADING_SOURCE_CODE(){return qt},get NOT_BOOTSTRAPPED(){return Wt},get BOOTSTRAPPING(){return Yt},get NOT_MOUNTED(){return $t},get MOUNTING(){return Jt},get UPDATING(){return Xt},get LOAD_ERROR(){return tn},get MOUNTED(){return Qt},get UNLOADING(){return en},get UNMOUNTING(){return Zt},get SKIP_BECAUSE_BROKEN(){return nn}}),Kt=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,Vt=function(){try{var e=new Kt("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?Kt:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},zt=[],Ht="NOT_LOADED",qt="LOADING_SOURCE_CODE",Wt="NOT_BOOTSTRAPPED",Yt="BOOTSTRAPPING",$t="NOT_MOUNTED",Jt="MOUNTING",Qt="MOUNTED",Xt="UPDATING",Zt="UNMOUNTING",en="UNLOADING",tn="LOAD_ERROR",nn="SKIP_BECAUSE_BROKEN",rn=[],on=!1,an=!1,un=0,sn={parcels:{}},cn={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}},ln="undefined"!=typeof window,fn={hashchange:[],popstate:[]},dn=["hashchange","popstate"],hn=null,pn=!1;ln&&(window.singleSpaNavigate?console.warn(m(41,!1)):window.singleSpaNavigate=V);var yn=!1,vn={},mn=[],gn=!1,bn=!1,wn=[],_n=ln&&window.location.href;function Sn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(bn)return new Promise((function(e,n){wn.push({resolve:e,reject:n,eventArguments:t})}));var r,i=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return mn.forEach((function(i){var a=i.status!==nn&&w(i);switch(i.status){case tn:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Ht:case qt:a&&n.push(i);break;case Wt:case $t:!a&&ee(_(i))?e.push(i):a&&r.push(i);break;case Qt:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),a=i.appsToUnload,u=i.appsToUnmount,s=i.appsToLoad,c=i.appsToMount,l=[],f=_n,d=_n=window.location.href;return pe()?(bn=!0,r=a.concat(s,u,c),Promise.resolve().then((function(){return g(0===r.length?"before-no-app-change":"before-app-change",v(!0)),g("before-routing-event",v(!0,{cancelNavigation:h})),Promise.all(l).then((function(n){if(n.some((function(e){return e})))return hn.call(window.history,history.state,"",f.substring(location.origin.length)),_n=location.href,bn=!1,Sn(e,t,!0);var r=a.map(Q),o=u.map(D).map((function(e){return e.then(Q)})).concat(r),i=Promise.all(o);i.then((function(){g("before-mount-routing-event",v(!0))}),(function(e){throw e}));var l=s.map((function(e){return K(e).then((function(e){return de(e,i)}))})),d=c.filter((function(e){return s.indexOf(e)<0})).map((function(e){return de(e,i)}));return i.catch((function(e){throw y(),e})).then((function(){return y(),Promise.all(l.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(p).then((function(){}),(function(e){throw e}))}))}))}))):(r=s,Promise.resolve().then((function(){var e=s.map(K);return Promise.all(e).then(y).then((function(){return[]})).catch((function(e){throw y(),e})).finally((function(){}))})));function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);l.push(t.catch((function(e){return console.warn(Error(m(42,!1))),console.warn(e),!1})))}function p(){var t=te();e.forEach((function(e){return e.resolve(t)}));try{g(0===r.length?"no-app-change":"app-change",v()),g("routing-event",v())}catch(e){setTimeout((function(){throw e}))}if(bn=!1,wn.length>0){var n=wn;wn=[],Sn(n)}return t}function y(){n||(e.forEach((function(e){z(e.eventArguments)})),z(t))}function v(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,l={},h=(o(e={},Qt,[]),o(e,$t,[]),o(e,Ht,[]),o(e,nn,[]),e);n?(s.concat(c).forEach((function(e,t){y(e,Qt)})),a.forEach((function(e){y(e,Ht)})),u.forEach((function(e){y(e,$t)}))):r.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:l,appsByNewStatus:h,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:d}};return i&&O(p.detail,i),p;function y(e,t){var n=_(e);t=t||re(n),l[n]=t,(h[t]=h[t]||[]).push(n)}}function g(e,t){n||window.dispatchEvent(new Vt("single-spa:".concat(e),t))}}var En=!1,On={getRawAppData:function(){return function(e){if(Array.isArray(e))return r(e)}(e=mn)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:Sn,NOT_LOADED:Ht,toLoadPromise:K,toBootstrapPromise:j,unregisterApplication:ae,getProfilerData:function(){return rn}};ln&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=On);var xn="openmrs:history";function kn(e,t,n){return kn=ge()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Pn(o,n.prototype),o},kn.apply(null,arguments)}function An(e){return An=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},An(e)}function Pn(e,t){return Pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Pn(e,t)}function jn(e){var t="function"==typeof Map?new Map:void 0;return jn=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return kn(e,arguments,An(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Pn(r,e)},jn(e)}var Dn="/ws/rest/v1",Cn="/ws/fhir2/R4",Tn="".concat(Dn,"/session"),In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pn(e,t)}(o,e);var t,n,r=(t=o,n=ge(),function(){var e,r=An(t);if(n){var o=An(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":a(n))&&"function"!=typeof t?ye(e):t;var n}(this,e)});function o(e,t,n,a){var u;return function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),me(ye(u=r.call(this)),"response",void 0),me(ye(u),"responseBody",void 0),u.message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return o}(jn(Error)),Mn="".concat(Dn,"/attachment");function Rn(){var e;return e=function(e,t){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){return(n=new FormData).append("fileCaption",t.fileDescription),n.append("patient",e),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),[2,we("".concat(Mn),{method:"POST",body:n})]}))},Rn=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,u,"next",e)}function u(e){Se(i,r,o,a,u,"throw",e)}a(void 0)}))},Rn.apply(this,arguments)}var Nn=f(254),Ln=function(e){return void 0===e},Fn=(0,Bt.createGlobalStore)("session",{loaded:!1,session:null}),Bn=0;function Un(){return(Un=Pe((function(e,t){return je(this,(function(n){return[2,Ue(we(Tn,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))]}))}))).apply(this,arguments)}function Gn(){return(Gn=Pe((function(e,t,n){return je(this,(function(r){switch(r.label){case 0:return n||(n=new AbortController),[4,we("".concat(Dn,"/user/").concat(e),{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal})];case 1:return r.sent(),[2,Ie()]}}))}))).apply(this,arguments)}Fn.subscribe((function(e){return e.session&&Te(e.session)}));var Kn=f(738);function Vn(){return Vn=ze((function(e,t){var n,r,o,i,a,u=arguments;return qe(this,(function(s){switch(s.label){case 0:return n=!(u.length>2&&void 0!==u[2])||u[2],e?(r=null,[4,Promise.all([we("".concat(Cn,"/Patient/").concat(e),t).catch((function(e){return r=e})),n?Ye(e):Promise.resolve(null)])]):[3,2];case 1:if(o=He.apply(void 0,[s.sent(),2]),i=o[0],a=o[1],i.ok)return[2,i.data];if(a)return[2,a];if(r)throw r;s.label=2;case 2:return[2,null]}}))})),Vn.apply(this,arguments)}function zn(){return(zn=ze((function(e){var t,n,r;return qe(this,(function(o){switch(o.label){case 0:return[4,(0,Kn.getSynchronizationItems)("patient-registration")];case 1:return t=o.sent(),n=t.find((function(t){return t.fhirPatient.id===e})),[2,null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null]}}))}))).apply(this,arguments)}var Hn,qn,Wn=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),Yn=function(t){var n=function(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r};return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(yt),$n=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(mt),Jn=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[vt]=function(){return new $n(this)},n.prototype.lift=function(e){var t=new Qn(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Wn;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Wn;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Wn;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new Wn;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new Wn;return this.hasError?(e.error(this.thrownError),yt.EMPTY):this.isStopped?(e.complete(),yt.EMPTY):(this.observers.push(e),new Yn(this,e))},n.prototype.asObservable=function(){var e=new wt;return e.source=this,e},n.create=function(e,t){return new Qn(e,t)},n}(wt),Qn=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):yt.EMPTY},n}(Jn),Xn=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Wn;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(Jn);!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(Hn||(Hn={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(qn||(qn={}));var Zn="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))",er=function(){try{return JSON.parse(localStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};$e().subscribe((function(e){var t;t=e,localStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))}));var tr=new Xn(null),nr=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new rr(e,this.project,this.thisArg))},e}(),rr=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(mt),or=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),ir=new wt((function(e){return e.complete()})),ar=function(){var e=function(e){if(this.total=e,this.total<0)throw new or};return e.prototype.call=function(e,t){return t.subscribe(new ur(e,this.total))},e}(),ur=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(mt),sr={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),d}())}}}))},1834:()=>{function e(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-state","@openmrs/esm-utils"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.shallowEqual=e.shallowEqual}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},618:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},s=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},c=function(e,t,n,r){var i=o(e);function a(e,t){return de(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},h=function(e,t,n,r){return e["@@transducer/result"](n[r](xe(e["@@transducer/step"],e),t))},p=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},y=function(e){return(0,Me.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1,translationOverridesLoaded:!1})},v=function(){return(0,Me.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(e){return g(v().getState(),e)},g=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},b=function(){return(0,Me.getGlobalStore)("config-extensions",{configs:{}})},w=function(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");var n=b(),r=function(n){var r;return null===(r=n.configs[e])||void 0===r?void 0:r[t]};return{getInitialState:function(){return r(n.getInitialState())},getState:function(){var e;return null!==(e=r(n.getState()))&&void 0!==e?e:{loaded:!1,config:null}},setState:function(r){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n.setState((function(n){n.configs[e]||(n.configs[e]={});var i="function"==typeof r?r(n.configs.slotName[t]):r;return n.configs[e][t]=o?Object.assign({},i):Object.assign({},n.configs[e][t],i),n}))},subscribe:function(e){return n.subscribe((function(t,n){var o=r(t),i=r(n);(0,Re.shallowEqual)(o,i)||e(o,i)}))},destroy:function(){}}},_=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e},x=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},k=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},A=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},P=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}},j=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=y(u);if(e.moduleLoaded[u]){var c=H(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!0,config:c})}else{var l=q(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!1,config:l})}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},D=function(e,t){var n,r,o=(n=Y(z(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=k(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(s)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=k(d.value,2),y=p[0];V(p[1],u,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return O({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=k(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=v(),u=a.getState(),s={slots:O({},u.slots,i)};he(u,s)||a.setState(s)},C=function(e,t){var n=function(e,t){var n=Ue(we(e.schemas)),r=A(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=k(u.value,2);n=Y([n,Ge(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t);Be.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=t.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=K(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=x(O({},r[c.slotName]),E({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}b().setState({configs:r})},I=function(e,t){Ke(e,t);var n=ve(t,Ye);Ne.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,n)),moduleLoaded:x(O({},t.moduleLoaded),E({},e,!0))})}))},M=function(e){Ne.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,Ye))})}))},R=function(e){Ne.setState((function(t){return x(O({},t),{moduleLoaded:x(O({},t.moduleLoaded),E({},e,!0))})}))},N=function(e){Ne.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,We))})}))},L=function(e,t){Ke(e,t);var n=ve(t,Ye);Ne.getState().schemas[e]&&console.error("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ne.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,n))})}))},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";Ne.setState((function(n){return x(O({},n),{providedConfigs:A(n.providedConfigs).concat([{source:t,config:e}])})}))},B=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=me(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},U=function(e,t,n){var r=[new Promise((function(t){var n=function(e){if(e.translationOverridesLoaded&&e.config){var n,r=null!==(n=e.config["Translation overrides"])&&void 0!==n?n:{};t(r),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))];return t&&n&&r.push(new Promise((function(e){var r=function(t){if(t.loaded&&t.config){var n,r=null!==(n=t.config["Translation overrides"])&&void 0!==n?n:{};e(r),i&&i()}},o=w(t,n);r(o.getState());var i=o.subscribe(r)}))),Promise.all(r)},G=function(e,t,n){$(e,t,n);var r=He(e,t);return ze(e,r,n),r},K=function(e,t,n,r,o,i){var a,u,s,c,l=function(e){return k(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=z(o,i),p=W(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},v=Y([W(d,h),y]),m=null!=f?f:o.schemas[t];$(m,v,d);var g=He(m,v);return ze(m,g,d),delete g.extensionSlots,g},V=function(e,t,n){var r="".concat(t,".extensionSlots.").concat(n),o="Extension slot config '".concat(r,"'"),i=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));i.length&&ee(r,o+"' contains invalid keys '".concat(i.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||ee(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||ee(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||ee(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Z(e.configure)||ee(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))},z=function(e,t){return A(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},H=function(e,t,n){var r=t.schemas[e],o=W(e,z(t,n));$(r,o,e);var i=He(r,o);return ze(r,i,e),delete i.extensionSlots,i},q=function(e,t,n){var r=W(e,z(t,n)),o=He(Ye,r);return ze(Ye,o,e),delete o.extensionSlots,o},W=function(e,t){return Y(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},Y=function(e){return Ae(ve)({},e)},$=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e.hasOwnProperty(s)?Ve(f,c,l):"extensionSlots"===s&&""!==n||ee(l,"Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},J=function(e,t,n){return!t||Q(e,[{Array:Pe,Boolean:je,ConceptUuid:Ie,Number:De,Object:Te,String:Ce,UUID:Ie,PersonAttributeTypeUuid:Ie,PatientIdentifierTypeUuid:Ie}[t]],n)},Q=function(e,t,n){var r=!0;if(t)try{var o=!0,i=!1,a=void 0;try{for(var u,s=t[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=(0,u.value)(n);"string"==typeof c&&(ee(e,"object"==typeof n?"Invalid configuration for ".concat(e,": ").concat(c):"Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)),r=!1)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}return r},X=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},Z=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},ee=function(e,t){var n="".concat(e,":::").concat(t);qe.has(n)||(console.error(t),qe.add(n))},te=function(e){e?qe.forEach((function(t){t.startsWith(e)&&qe.delete(t)})):qe.clear()};i.r(a),i.d(a,{Type:function(){return be},clearConfigErrors:function(){return te},configExtensionStore:function(){return Fe},configInternalStore:function(){return Ne},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return L},getConfig:function(){return B},getConfigStore:function(){return y},getExtensionConfig:function(){return w},getExtensionConfigFromStore:function(){return _},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return g},getExtensionSlotsConfigStore:function(){return v},getExtensionsConfigStore:function(){return b},getTranslationOverrides:function(){return U},implementerToolsConfigStore:function(){return Be},inRange:function(){return $e},isUrl:function(){return Qe},isUrlWithTemplateParameters:function(){return Je},oneOf:function(){return Xe},processConfig:function(){return G},provide:function(){return F},registerModuleLoad:function(){return R},registerModuleWithConfigSystem:function(){return M},registerTranslationNamespace:function(){return N},temporaryConfigStore:function(){return Le},validator:function(){return p},validators:function(){return Ze}});var ne="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},re=Object.prototype.toString,oe=function(){return"[object Arguments]"===re.call(arguments)?function(e){return"[object Arguments]"===re.call(e)}:function(e){return s("callee",e)}}(),ie=oe,ae=!{toString:null}.propertyIsEnumerable("toString"),ue=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],se=function(){return arguments.propertyIsEnumerable("length")}(),ce=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},le="function"!=typeof Object.keys||se?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=se&&ie(e);for(t in e)!s(t,e)||o&&"length"===t||(r[r.length]=t);if(ae)for(n=ue.length-1;n>=0;)s(t=ue[n],e)&&!ce(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),fe=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function de(t,n,r,o){if(ne(t,n))return!0;var i,a,u=fe(t);if(u!==fe(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!ne(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!ne(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=le(t);if(f.length!==le(n).length)return!1;var d=r.concat([t]),h=o.concat([n]);for(l=f.length-1;l>=0;){var p=f[l];if(!s(p,n)||!de(n[p],t[p],d,h))return!1;l-=1}return!0}var he=r((function(e,t){return de(e,t,[],[])})),pe=l((function(e,t,n){var r,o={};for(r in t)s(r,t)&&(o[r]=s(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o})),ye=l((function e(t,n,r){return pe((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),ve=r((function(e,t){return ye((function(e,t,n){return n}),e,t)})),me=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function ge(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ge(e[u],t,n,!0):e[u];return o};switch(fe(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var be,we=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ge(e,[],[],!0)})),_e=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Se=n((function(e){return!!_e(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),Ee=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Oe=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,s,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),xe=Oe,ke="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Ae=l((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Ee(e)}(e)),Se(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return h(e,t,n,"fantasy-land/reduce");if(null!=n[ke])return d(e,t,n[ke]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return h(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(be||(be={}));var Pe=p((function(e){return Array.isArray(e)}),"must be an array"),je=p((function(e){return"boolean"==typeof e}),"must be a boolean"),De=p((function(e){return"number"==typeof e}),"must be a number"),Ce=p((function(e){return"string"==typeof e}),"must be a string"),Te=p((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ie=p((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Me=i(685),Re=i(618),Ne=(0,Me.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),Le=(0,Me.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Le.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Fe=(0,Me.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Be=(0,Me.createGlobalStore)("config-implementer-tools",{config:{}});function Ue(e){return e.hasOwnProperty("_default")?x(O({},e),{_value:e._default,_source:"default"}):Z(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ue(e[n]),t}),{}):{}}function Ge(e,t){return Z(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ge(e[r],t),n}),{}):{_value:e,_source:t}}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(){var o=u.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!Z(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||Ke(e,a,i);var s=a._elements;if(X(s)&&Ke(e,s,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var d,h=a._validators[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(be).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(be).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),s&&y&&![be.Array,be.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ve(e,t,n){J(n,e._type,t),Z(t)?e._type===be.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s];$(e._elements,c,"".concat(n,".").concat(s))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||$(e,t,n):e._type===be.Array&&function(e,t,n){if(J(n,be.Array,t)){if(X(e._elements))for(var r=0;r<t.length;r++)Ve(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;J("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}}(e,t,n)}function ze(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Q(n,e._validators,t),Z(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e._type===be.Object&&e._elements?ze(e._elements,c,l):ze(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)ze(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}j(Ne.getState(),Le.getState()),Ne.subscribe((function(e){return j(e,Le.getState())})),Le.subscribe((function(e){return j(Ne.getState(),e)})),C(Ne.getState(),Le.getState()),Ne.subscribe((function(e){return C(e,Le.getState())})),Le.subscribe((function(e){return C(Ne.getState(),e)})),D(Ne.getState(),Le.getState()),Ne.subscribe((function(e){return D(e,Le.getState())})),Le.subscribe((function(e){return D(Ne.getState(),e)})),T(Ne.getState(),Fe.getState(),Le.getState()),Ne.subscribe((function(e){T(e,Fe.getState(),Le.getState())})),Fe.subscribe((function(e){T(Ne.getState(),e,Le.getState())})),Le.subscribe((function(e){T(Ne.getState(),Fe.getState(),e)}));var He=function(e,t){var n=we(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=a.value,r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&X(i))if(o._type===be.Array&&Array.isArray(r)){var u=r.map((function(e){return He(i,e)}));n[t]=u}else if(o._type===be.Object){var s=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;r[h]=He(i,r[h])}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}else if(Z(o)){var p=null!=r?r:{};Z(p)&&(n[t]=He(o,p))}},s=Object.keys(e)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n},qe=new Set,We={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:be.Object,_default:{},_validators:[p((function(e){return Object.keys(e).every((function(e){return/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}))}),(function(e){var t=Object.keys(e).filter((function(e){return!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}));return"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: ".concat(t.join(", "),".")}))]}},Ye=O({"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:be.Array,_default:[]}}},We),$e=function(e,t){return p((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Je=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return p((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},Qe=Je([]),Xe=function(e){return p((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ze={inRange:$e,isUrl:Qe,isUrlWithTemplateParameters:Je,oneOf:Xe}}(),a}())}}}))},6007:()=>{System.register(["@openmrs/esm-globals","@openmrs/esm-translations"],(function(e,t){var n={},r={};return{setters:[function(e){n.dispatchToastShown=e.dispatchToastShown},function(e){r.getCoreTranslation=e.getCoreTranslation}],execute:function(){e(function(){"use strict";var e={728:function(e){e.exports=n},901:function(e){e.exports=r}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){o.S={};var e={},t={};o.I=function(n,r){r||(r=[]);var i=t[n];if(i||(i=t[n]={}),!(r.indexOf(i)>=0)){if(r.push(i),e[n])return e[n];o.o(o.S,n)||(o.S[n]={}),o.S[n];var a=[];return e[n]=a.length?Promise.all(a).then((function(){return e[n]=1})):1}}}();var i={};return function(){var e=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},t=function(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function u(t){e(a,o,i,u,s,"next",t)}function s(t){e(a,o,i,u,s,"throw",t)}u(void 0)}))}},n=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},r=function(e){return e.replace(/[\/\-@]/g,"_")},a=function(e){return f.apply(this,arguments)},u=function(e,t){return d.apply(this,arguments)},s=function(){return h.apply(this,arguments)};o.r(i),o.d(i,{getCurrentImportMap:function(){return s},importDynamic:function(){return a},preloadImport:function(){return u},slugify:function(){return r}});var c=o(728),l=o(901);function f(){return f=t((function(e){var t,i,a,s,c,l,f,d,h,p,y=arguments;return n(this,(function(n){switch(n.label){case 0:return t=y.length>1&&void 0!==y[1]?y[1]:"./start",a=!(null==(i=y.length>2?y[2]:void 0)?void 0:i.maxLoadingTime)||i.maxLoadingTime<=0?6e5:i.maxLoadingTime,s=void 0,[4,Promise.race([u(e,null==i?void 0:i.importMap),new Promise((function(t,n){s=setTimeout((function(){var t;n(new Error("Could not resolve requested script, ".concat(e,", within ").concat((t=a)<1e3?"".concat(t," milliseconds"):t<6e4?"".concat(Math.floor(t/1e3)," seconds"):t<36e5?"".concat(Math.floor(t/6e4)," minutes"):t<864e5?"".concat(Math.floor(t/36e5)," hours"):"".concat(Math.floor(t/864e5)," days"),".")))}),a)}))])];case 1:if(n.sent(),s&&clearTimeout(s),c=r(e),"object"!=typeof(v=l=window[c])||null===v||!("init"in v)||"function"!=typeof v.init||!("get"in v)||"function"!=typeof v.get)throw f="The global variable ".concat(c," does not refer to a federated module"),console.error(f),new Error(f);return l.init(o.S.default),[4,l.get(t)];case 2:if(d=n.sent(),"object"!=typeof(h=d())||null===h)throw p="Container for ".concat(e," did not return an ESM module as expected"),console.error(p),new Error(p);return[2,h]}var v}))})),f.apply(this,arguments)}function d(){return(d=t((function(e,t){var o,i,a,u,f,d,h,y;return n(this,(function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.trim().length)throw o="Attempted to call importDynamic() without supplying a package to load",console.error(o),new Error(o);return i=r(e),window[i]?[3,7]:null==t?[3,1]:(u=t,[3,3]);case 1:return[4,s()];case 2:u=n.sent(),n.label=3;case 3:if(!(a=u).imports.hasOwnProperty(e))throw f="Could not find the package ".concat(e," defined in the current importmap"),console.error(f),new Error(f);(d=a.imports[e]).startsWith("./")&&(d=window.spaBase+d.substring(1)),h=!!window.localStorage.getItem("import-map-override:".concat(e)),n.label=4;case 4:return n.trys.push([4,6,,7]),[4,new Promise((function(e,t){!function(e,t,n){var r=document.head.querySelector('script[src="'.concat(e,'"]')),o=window[p];if(o||(o=window[p]=new Set([])),r){var i,a,u;o.has(e)?(u=function(){i&&r.removeEventListener("load",i),a&&r.removeEventListener("error",a)},i=function(){u(),t(null)},a=function(e){u(),n(e.message)},r.addEventListener("load",i),r.addEventListener("error",a)):(console.warn("Script at ".concat(e," already loaded. Not loading it again.")),t(null))}else{o.add(e);var s=document.createElement("script");s.src=e,s.type="text/javascript",s.async=!0;var c,l,f,d=setTimeout((function(){console.error("The script at ".concat(e," did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration."))}),5e3);f=function(){clearTimeout(d),o.delete(e),c&&s.removeEventListener("load",c),l&&s.removeEventListener("error",l)},c=function(){f(),t(null)},l=function(t){f();var r,o="Failed to load script from ".concat(e);console.error(o,t),n(null!==(r=t.message)&&void 0!==r?r:o)},s.addEventListener("load",c),s.addEventListener("error",l),document.head.appendChild(s)}}(d,e,t)}))];case 5:return[2,n.sent()];case 6:return y=n.sent(),h&&(0,c.dispatchToastShown)({kind:"error",title:(0,l.getCoreTranslation)("scriptLoadingFailed","Error: Script failed to load"),description:(0,l.getCoreTranslation)("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.",{url:d}),actionButtonLabel:(0,l.getCoreTranslation)("resetOverrides","Reset overrides"),onActionButtonClick:function(){window.importMapOverrides.resetOverrides(),window.location.reload()}}),[2,Promise.reject(y)];case 7:return[2,Promise.resolve()]}}))}))).apply(this,arguments)}function h(){return(h=t((function(){return n(this,(function(e){return[2,window.importMapOverrides.getCurrentPageMap()]}))}))).apply(this,arguments)}var p=Symbol("__openmrs_script_loading")}(),i}())}}}))},6577:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchToastShown=e.dispatchToastShown}],execute:function(){e(function(){"use strict";var e={728:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};r.r(o),r.d(o,{createErrorHandler:function(){return t},reportError:function(){return e}});var i=r(728);window.onerror=function(e){return console.error("Unexpected error: ",e),(0,i.dispatchToastShown)({description:null!=e?e:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){var t;console.error("Unhandled rejection: ",e.reason),(0,i.dispatchToastShown)({description:null!==(t=e.reason)&&void 0!==t?t:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}}(),o}())}}}))},1757:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}System.register([],(function(e,n){return{execute:function(){e(function(){"use strict";var e=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},a=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},u=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,s,"next",e)}function s(e){a(i,r,o,u,s,"throw",e)}u(void 0)}))}},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):(n=e,null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](n):n instanceof r);var n,r},l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e},f=function(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},d=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},h=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},S)},p=function(e){return Q.apply(this,arguments)},y=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},E)},v=function(e){return w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},E)},m=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},O)},g=function(e){return w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},O)},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");null==t&&(t={});var r=function(e){return x(e,W)}(t),o=Z("string"==typeof e?F(e):e,r);if(n(o))return o;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}},w=function(e){return X.apply(this,arguments)},_=function(e){return F(e)},S=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||c(e,Date)},E=function(e){return"boolean"==typeof e},O=function(e){return"number"==typeof e},x=function(e,t){var n={thisObj:void 0,variables:l({},e),globals:l({},t),addVariables:function(e){return this.variables=l({},this.variables,e),this}};return n.addVariables.bind(n),n},k=function(e){return function(t){return null===t?null:Z(t,e)}},A=function(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:"Cannot access the ".concat(e," property of objects")}},P=function(e){return e?"MemberExpression"===e.type?null===(t=e.property)||void 0===t?void 0:t.name:e.name:null;var t},j=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},D=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},C=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){D(e,t,n[t])}))}return e},T=function(e){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");var t,n={globals:C({},Y),isLocalExpression:!1,variables:new Set};return ne("string"==typeof e?F(e):e,n),function(e){if(Array.isArray(e))return j(e)}(t=n.variables)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},I=function(e){return function(t){return null===t?null:ne(t,e)}},M={d:function(e,t){for(var n in t)M.o(t,n)&&!M.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},R={};M.r(R),M.d(R,{compile:function(){return _},evaluate:function(){return h},evaluateAsBoolean:function(){return y},evaluateAsBooleanAsync:function(){return v},evaluateAsNumber:function(){return m},evaluateAsNumberAsync:function(){return g},evaluateAsType:function(){return b},evaluateAsTypeAsync:function(){return w},evaluateAsync:function(){return p},extractVariableNames:function(){return T},jsep:function(){return F}});var N=function(){function e(n){t(this,e),this.expr=n,this.index=0}return r(e,[{key:"char",get:function(){return this.expr.charAt(this.index)}},{key:"code",get:function(){return this.expr.charCodeAt(this.index)}},{key:"throwError",value:function(e){var t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}},{key:"runHook",value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:"searchHook",value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find((function(e){return e.call(n.context,n),n.node})),n.node}}},{key:"gobbleSpaces",value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}},{key:"parse",value:function(){this.runHook("before-all");var t=this.gobbleExpressions(),n=1===t.length?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}},{key:"gobbleExpressions",value:function(t){for(var n,r,o=[];this.index<this.expr.length;)if((n=this.code)===e.SEMCOL_CODE||n===e.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())o.push(r);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return o}},{key:"gobbleExpression",value:function(){var e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}},{key:"gobbleBinaryOp",value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:"gobbleBinaryExpression",value:function(){var t,n,r,o,i,a,u,s,c;if(!(a=this.gobbleToken()))return a;if(!(n=this.gobbleBinaryOp()))return a;for(i={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},(u=this.gobbleToken())||this.throwError("Expected expression after "+n),o=[a,i,u];n=this.gobbleBinaryOp();){if(0===(r=e.binaryPrecedence(n))){this.index-=n.length;break}i={value:n,prec:r,right_a:e.right_associative.has(n)},c=n;for(var l=function(e){return i.right_a&&e.right_a?r>e.prec:r<=e.prec};o.length>2&&l(o[o.length-2]);)u=o.pop(),n=o.pop().value,a=o.pop(),t={type:e.BINARY_EXP,operator:n,left:a,right:u},o.push(t);(t=this.gobbleToken())||this.throwError("Expected expression after "+c),o.push(i,t)}for(t=o[s=o.length-1];s>1;)t={type:e.BINARY_EXP,operator:o[s-1].value,left:o[s-2],right:t},s-=2;return t}},{key:"gobbleToken",value:function(){var t,n,r,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"))return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(r=(n=this.expr.substr(this.index,e.max_unop_len)).length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var i=this.gobbleToken();return i||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:i,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}},{key:"gobbleTokenProperty",value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?((t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:"gobbleNumericLiteral",value:function(){for(var t,n,r="";e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(r+=this.expr.charAt(this.index++),"+"!==(t=this.char)&&"-"!==t||(r+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return n=this.code,e.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(n===e.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(r),raw:r}}},{key:"gobbleStringLiteral",value:function(){for(var t="",n=this.index,r=this.expr.charAt(this.index++),o=!1;this.index<this.expr.length;){var i=this.expr.charAt(this.index++);if(i===r){o=!0;break}if("\\"===i)switch(i=this.expr.charAt(this.index++),i){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+=i}else t+=i}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}},{key:"gobbleIdentifier",value:function(){var t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}},{key:"gobbleArguments",value:function(t){for(var n=[],r=!1,o=0;this.index<this.expr.length;){this.gobbleSpaces();var i=this.code;if(i===t){r=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===e.COMMA_CODE){if(this.index++,++o!==n.length)if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(var a=n.length;a<o;a++)n.push(null)}else if(n.length!==o&&0!==o)this.throwError("Expected comma");else{var u=this.gobbleExpression();u&&u.type!==e.COMPOUND||this.throwError("Expected comma"),n.push(u)}}return r||this.throwError("Expected "+String.fromCharCode(t)),n}},{key:"gobbleGroup",value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:e.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}},{key:"gobbleArray",value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:"version",get:function(){return"1.3.9"}},{key:"toString",value:function(){return"JavaScript Expression Parser (JSEP) v"+e.version}},{key:"addUnaryOp",value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:"addBinaryOp",value:function(t,n,r){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,r?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:"addIdentifierChar",value:function(t){return e.additional_identifier_chars.add(t),e}},{key:"addLiteral",value:function(t,n){return e.literals[t]=n,e}},{key:"removeUnaryOp",value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:"removeAllUnaryOps",value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:"removeIdentifierChar",value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:"removeBinaryOp",value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:"removeAllBinaryOps",value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:"removeLiteral",value:function(t){return delete e.literals[t],e}},{key:"removeAllLiterals",value:function(){return e.literals={},e}},{key:"parse",value:function(t){return new e(t).parse()}},{key:"getMaxKeyLen",value:function(e){var t;return(t=Math).max.apply(t,[0].concat(o(Object.keys(e).map((function(e){return e.length})))))}},{key:"isDecimalDigit",value:function(e){return e>=48&&e<=57}},{key:"binaryPrecedence",value:function(t){return e.binary_ops[t]||0}},{key:"isIdentifierStart",value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:"isIdentifierPart",value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}]),e}(),L=new(function(){function e(){t(this,e)}return r(e,[{key:"add",value:function(e,t,n){if("string"!=typeof arguments[0])for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else(Array.isArray(e)?e:[e]).forEach((function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)}),this)}},{key:"run",value:function(e,t){this[e]=this[e]||[],this[e].forEach((function(e){e.call(t&&t.context?t.context:t,t)}))}}]),e}());Object.assign(N,{hooks:L,plugins:new(function(){function e(n){t(this,e),this.jsep=n,this.registered={}}return r(e,[{key:"register",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this;t.forEach((function(e){if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");r.registered[e.name]||(e.init(r.jsep),r.registered[e.name]=e)}))}}]),e}())(N),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,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),N.max_unop_len=N.getMaxKeyLen(N.unary_ops),N.max_binop_len=N.getMaxKeyLen(N.binary_ops);var F=function(e){return new N(e).parse()},B=Object.getOwnPropertyNames((function e(){t(this,e)}));Object.getOwnPropertyNames(N).filter((function(e){return!B.includes(e)&&void 0===F[e]})).forEach((function(e){F[e]=N[e]})),F.Jsep=N,F.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}}))}});var U,G,K="ArrowFunctionExpression",V={name:"arrow",init:function(e){function t(n){n&&(Object.values(n).forEach((function(e){e&&"object"==typeof e&&t(e)})),"=>"===n.operator&&(n.type=K,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",(function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){var n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;var r=this.gobbleBinaryOp();if("=>"===r){var o=this.gobbleBinaryExpression();return o||this.throwError("Expected expression after "+r),void(t.node={type:K,params:null,body:o})}}this.index=n}})),e.hooks.add("after-expression",(function(e){t(e.node)}))}},z={name:"numbers",init:function(e){var t=function(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null},n=function(e){return"x"===e||"X"===e?16:"b"===e||"B"===e?2:8},r=function(e,t){return 95===e||t.some((function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),r=n[0],o=n[1];return e>=r&&e<=o}))},o=function(t){var n=this,r=this.index,o="",i=function(){for(;e.isDecimalDigit(n.code)||95===n.code;)95===n.code?n.index++:o+=n.expr.charAt(n.index++)};i(),this.code===e.PERIOD_CODE&&(o+=this.expr.charAt(this.index++),i());var a=this.char;"e"!==a&&"E"!==a||(o+=this.expr.charAt(this.index++),"+"!==(a=this.char)&&"-"!==a||(o+=this.expr.charAt(this.index++)),i(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+o+this.char+")"));var u=this.code;if(e.isIdentifierStart(u))this.throwError("Variable names cannot start with a number ("+o+this.char+")");else if(u===e.PERIOD_CODE)return o.length>1&&this.throwError("Unexpected period ".concat(JSON.stringify({chCode:u,number:o},null,2))),void(this.index=r);t.node={type:e.LITERAL,value:parseFloat(o),raw:this.expr.substring(r,this.index)}};e.hooks.add("gobble-token",(function(i){if(48===this.code){var a=this.index,u=this.expr.charAt(this.index+1),s=t.call(this,u);if(!s)return;for(var c="";r(this.code,s);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(u.charCodeAt(0)))return this.index=a+1,void o.call(this,i);this.throwError("unexpected char within number")}i.node={type:e.LITERAL,value:parseInt(c,n(u)),raw:this.expr.substring(a,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&o.call(this,i)}))}},H={name:"regex",init:function(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){for(var n=++this.index,r=!1;this.index<this.expr.length;){if(47===this.code&&!r){for(var o=this.expr.slice(n,this.index),i=void 0,a="";++this.index<this.expr.length;){var u=this.code;if(!(u>=97&&u<=122||u>=65&&u<=90||u>=48&&u<=57))break;a+=this.char}try{i=new RegExp(o,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:i,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}},q={name:"jsepTemplateLiteral",init:function(e){var t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(96===this.code){for(var n={type:"TemplateLiteral",quasis:[],expressions:[]},r="",i="",a=!1,u=this.expr.length,s=function(){return n.quasis.push({type:"TemplateElement",value:{raw:i,cooked:r},tail:a})};this.index<u;){var c,l=this.expr.charAt(++this.index);if("`"===l)return this.index+=1,a=!0,s(),e.node=n,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===l&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),i="",r="",(c=n.expressions).push.apply(c,o(this.gobbleExpressions(125))),125!==this.code&&this.throwError("unclosed ${");else if("\\"===l)switch(i+=l,l=this.expr.charAt(++this.index),i+=l,l){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+=l}else r+=l,i+=l}this.throwError("Unclosed `")}};e.hooks.add("gobble-token",t),e.hooks.add("after-token",(function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node}))}},W={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)}},Y=(U=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){e(t,n,r[n])}))}return t}({},W),G=null!=(G={Promise})?G:{},Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(G)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(G)).forEach((function(e){Object.defineProperty(U,e,Object.getOwnPropertyDescriptor(G,e))})),U);function $(e,t,n){return $=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&J(o,n.prototype),o},$.apply(null,arguments)}function J(e,t){return J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},J(e,t)}function Q(){return Q=u((function(e){var t=arguments;return d(this,(function(n){return[2,w(e,t.length>1&&void 0!==t[1]?t[1]:{},S)]}))})),Q.apply(this,arguments)}function X(){return X=u((function(e){var t,n,r,o=arguments;return d(this,(function(i){return t=o.length>1&&void 0!==o[1]?o[1]:{},n=o.length>2?o[2]:void 0,"string"==typeof e||"object"==typeof e&&e&&"type"in e?(null==t&&(t={}),r=function(e){return x(e,Y)}(t),[2,Promise.resolve(Z("string"==typeof e?F(e):e,r)).then((function(t){if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}}))]):[2,Promise.reject("Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string."))]}))})),X.apply(this,arguments)}function Z(e,t){switch(e.type){case"UnaryExpression":return function(e,t){var n=Z(e.argument,t);switch(e.operator){case"+":return+n;case"-":return-n;case"~":return~n;case"!":return!n;default:throw"Expression evaluator does not support operator '".concat(e.operator,"''")}}(e,t);case"BinaryExpression":return function(e,t){var n=Z(e.left,t),r=Z(e.right,t);switch(e.operator){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;case"%":return n%r;case"**":return Math.pow(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 null!=n?n:r;default:throw"Expression evaluator does not support operator '".concat(e.operator,"' operator")}}(e,t);case"ConditionalExpression":return function(e,t){var n=Z(e.test,t);return Z(n?e.consequent:e.alternate,t)}(e,t);case"CallExpression":return function(e,t){var n,r=null===(n=e.arguments)||void 0===n?void 0:n.map(k(t)),o=Z(e.callee,t);if(!o)throw"No function named ".concat(P(e.callee)," is defined in this context");if("function"!=typeof o)throw"".concat(P(e.callee)," is not a function");return o.apply(void 0,f(r))}(e,t);case"ArrowFunctionExpression":return function(e,t){var n,r,o,i=null!==(r=null===(n=e.params)||void 0===n?void 0:n.map((function(e){if("Identifier"===e.type)return e.name;throw"Cannot handle parameter of type ".concat(e.type)})))&&void 0!==r?r:[];return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r.length<i.length)throw"Required argument(s) ".concat(i.slice(r.length,-1).join(", ")," were not provided");var a=Object.fromEntries(i.reduce((function(e,t,n){var o=r[n];return te(o)&&e.push([t,o]),e}),[]));return Z(e.body,t.addVariables(a))}.bind(null!==(o=t.thisObj)&&void 0!==o?o:null)}(e,t);case"MemberExpression":return function(e,t){var n=Z(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":var r=ee(e.object,t);throw ReferenceError("ReferenceError: ".concat(r," is not defined"));case"MemberExpression":var o=ee(e.property,t);throw TypeError("TypeError: cannot read properties of undefined (reading '".concat(o,"')"));default:throw"VisitMemberExpression does not support operator '".concat(e.object.type,"' type")}var i,a=n;if("string"==typeof n)a=String.prototype;else if("number"==typeof n)a=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw"VisitMemberExpression does not support member access on type ".concat(void 0===n?"undefined":function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;var t}(n));switch(t.thisObj=a,e.property.type){case"Identifier":case"MemberExpression":i=Z(e.property,t);break;default:var u=Z(e.property,t);if(void 0===u)throw{type:"Illegal property access",message:"No property was supplied to the property access"};A(u),i=n[u]}return"function"==typeof i?i.bind(n):i}(e,t);case"ArrayExpression":return function(e,t){var n;return null===(n=e.elements)||void 0===n?void 0:n.map(k(t))}(e,t);case"SequenceExpression":return function(e,t){var n=e.expressions.map(k(t));return n[n.length-1]}(e,t);case"NewExpression":return function(e,t){if(!e.callee||"Identifier"!==e.callee.type)throw e.callee?"new must be called with either Date or RegExp":'Could not handle "new" without a specified class';var n,r=null===(n=e.arguments)||void 0===n?void 0:n.map(k(t));switch(e.callee.name){case"Date":return $(Date,f(r));case"RegExp":return $(RegExp,f(r));default:throw"Cannot instantiate object of type ".concat(e.callee.name)}}(e,t);case"Literal":return function(e,t){return A(e.value),e.value}(e);case"Identifier":return function(e,t){A(e.name);var n=t.thisObj;if(n&&("object"==typeof n||"function"==typeof n)&&e.name in n){var r=n[e.name];return A(r),r}if(t.variables&&e.name in t.variables){var o=t.variables[e.name];return A(o),o}return e.name in t.globals?t.globals[e.name]:void 0}(e,t);case"TemplateLiteral":return function(e,t){var n,r,o,i,a=null!==(o=null===(n=e.expressions)||void 0===n?void 0:n.map(k(t)))&&void 0!==o?o:[],u=null!==(i=null===(r=e.quasis)||void 0===r?void 0:r.map(k(t)))&&void 0!==i?i:[];return u.filter((function(e){return!e.tail})).map((function(e){return e.value})).join("")+a.join("")+u.filter((function(e){return e.tail})).map((function(e){return e.value})).join("")}(e,t);case"TemplateElement":return function(e,t){return{value:e.cooked,tail:e.tail}}(e);default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}function ee(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return ee(e.property,t);default:throw"VisitExpressionName does not support expression of type '".concat(e.type,"'")}}function te(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"function"==typeof e||null===e||c(e,RegExp))return!0;if("object"==typeof e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(!te(e[o.value]))return!1}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!0}if(Array.isArray(e)){var a=!0,u=!1,s=void 0;try{for(var l,f=e[Symbol.iterator]();!(a=(l=f.next()).done);a=!0)if(!te(l.value))return!1}catch(e){u=!0,s=e}finally{try{a||null==f.return||f.return()}finally{if(u)throw s}}}return!1}function ne(e,t){switch(e.type){case"UnaryExpression":return function(e,t){return ne(e.argument,t)}(e,t);case"BinaryExpression":return function(e,t){return[ne(e.left,t),ne(e.right,t)].filter(Boolean)}(e,t);case"ConditionalExpression":return function(e,t){return[ne(e.consequent,t),ne(e.test,t),ne(e.alternate,t)].filter(Boolean)}(e,t);case"CallExpression":return function(e,t){var n,r=ne(e.callee,t);return null===(n=e.arguments)||void 0===n||n.map(I(t)),r}(e,t);case"ArrowFunctionExpression":return function(e,t){var n,r,o=C({},t);o.isLocalExpression=!0;var i,a=null!==(r=null===(n=e.params)||void 0===n?void 0:n.map(I(o)))&&void 0!==r?r:[],u=null!==(i=ne(e.body,o))&&void 0!==i?i:[];if(u&&Array.isArray(u)){var s=!0,c=!1,l=void 0;try{for(var f,d=u[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;a.includes(h)||t.variables.add(h)}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}(e,t);case"MemberExpression":return function(e,t){ne(e.object,t);var n=C({},t);n.isLocalExpression=!0,ne(e.property,n)}(e,t);case"ArrayExpression":return function(e,t){var n;null===(n=e.elements)||void 0===n||n.map(I(t))}(e,t);case"SequenceExpression":return function(e,t){var n;null===(n=e.expressions)||void 0===n||n.map(I(t))}(e,t);case"NewExpression":return function(e,t){var n;null===(n=e.arguments)||void 0===n||n.map(I(t))}(e,t);case"Literal":case"TemplateElement":return;case"Identifier":return function(e,t){if(!(e.name in t.globals)){if(t.isLocalExpression)return e.name;t.variables.add(e.name)}}(e,t);case"TemplateLiteral":return function(e,t){var n,r;null===(n=e.expressions)||void 0===n||n.map(I(t)),null===(r=e.quasis)||void 0===r||r.map(I(t))}(e,t);default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}return F.plugins.register(V),F.plugins.register({name:"new",init:function(e){e.addUnaryOp("new"),e.hooks.add("after-token",(function(t){var n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;for(var r=t.node;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}}))}}),F.plugins.register(z),F.plugins.register(H),F.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}}))}}),F.plugins.register(q),F.addBinaryOp("in",7),F.addBinaryOp("??",1),R}())}}}))},7093:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}e=n.nmd(e),System.register(["@openmrs/esm-config","@openmrs/esm-state","@openmrs/esm-api","@openmrs/esm-expression-evaluator","@openmrs/esm-feature-flags","@openmrs/esm-utils","single-spa"],(function(i,a){var u={},s={},c={},l={},f={},d={},h={};return{setters:[function(e){u.configExtensionStore=e.configExtensionStore,u.getExtensionConfigFromStore=e.getExtensionConfigFromStore,u.getExtensionSlotConfig=e.getExtensionSlotConfig,u.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,u.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,u.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){s.createGlobalStore=e.createGlobalStore,s.getGlobalStore=e.getGlobalStore},function(e){c.sessionStore=e.sessionStore,c.userHasAccess=e.userHasAccess},function(e){l.evaluateAsBoolean=e.evaluateAsBoolean},function(e){f.featureFlagsStore=e.featureFlagsStore},function(e){d.isOnline=e.isOnline},function(e){h.mountRootParcel=e.mountRootParcel}],execute:function(){i(function(){var i={103:function(){System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))},t=function(e){if(!window.offlineEnabled)return function(){};var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},n=function(e){return e({online:!window.offlineEnabled||navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(v,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},i=function(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))},u=function(e){window.dispatchEvent(new CustomEvent(w,{detail:e}))},s=function(e){window.dispatchEvent(new CustomEvent(b,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(m,t),function(){return window.removeEventListener(m,t)}},l=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(g,t),function(){return window.removeEventListener(g,t)}},f=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(b,t),function(){return window.removeEventListener(b,t)}},d=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(w,t),function(){return window.removeEventListener(w,t)}},h={d:function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},p={};h.r(p),h.d(p,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},dispatchSnackbarShown:function(){return u},dispatchToastShown:function(){return s},subscribeActionableNotificationShown:function(){return l},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return o},subscribeSnackbarShown:function(){return d},subscribeToastShown:function(){return f}});var y="openmrs:connectivity-changed",v="openmrs:precache-static-dependencies",m="openmrs:notification-shown",g="openmrs:actionable-notification-shown",b="openmrs:toast-shown",w="openmrs:snack-bar-shown";return p}())}}}))},766:function(e){"use strict";e.exports=c},824:function(e){"use strict";e.exports=u},234:function(e){"use strict";e.exports=l},708:function(e){"use strict";e.exports=f},685:function(e){"use strict";e.exports=s},618:function(e){"use strict";e.exports=d},645:function(e){"use strict";e.exports=h}},a={};function p(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e](n,n.exports,p),n.exports}p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return function(){"use strict";var i=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},a=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},u=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},s=function(e){var t=this.__data__=new Re(e);this.size=t.size},c=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dt;++t<n;)this.add(e[t])},l=function(e){var t=kn.getState(),n=e(t);n!==t&&kn.setState(n)},f=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=!0,c=!1,l=void 0;try{for(var f,d=u.instances[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;t.push({slotModuleName:h.slotModuleName,extensionModuleName:u.moduleName,slotName:h.slotName,extensionId:h.id})}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}En(On.configExtensionStore.getState().mountedExtensions,t)||On.configExtensionStore.setState({mountedExtensions:t})},d=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},h=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e},m=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},g=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},b=function(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},w=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}},_=function(e,t,n,r,o){var i={},a=(0,In.isOnline)(),u=Object.entries(r.flags).filter((function(e){return g(e,2)[1].enabled})).map((function(e){return g(e,1)[0]})),s=!0,c=!1,l=void 0;try{for(var f,d=Object.entries(e.slots)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=g(f.value,2),p=h[0],y=h[1],v=C(p,e,(0,On.getExtensionSlotConfigFromStore)(t,y.name).config,n,u,a,o.session);i[p]={moduleName:y.moduleName,assignedExtensions:v}}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}En(Rn.getState().slots,i)||Rn.setState({slots:i})},S=function(){_(Mn.getState(),Nn.getState(),Ln.getState(),Cn.featureFlagsStore.getState(),jn.sessionStore.getState())},E=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},O=function(e){return g(e.split("#"),1)[0]},x=function(e,t){var n=O(t);return e.extensions[n]},k=function(e){return x(Mn.getState(),e)},A=function(e,t){l((function(n){var r=n.slots[e];return m(v({},n),r?{slots:m(v({},n.slots),h({},e,m(v({},r),{attachedIds:b(r.attachedIds).concat([t])})))}:{slots:m(v({},n.slots),h({},e,m(v({},E(e)),{attachedIds:[t]})))})}))},P=function(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?m(v({},n),{slots:m(v({},n.slots),h({},e,m(v({},r),{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},j=function(e){l((function(t){var n=t.slots[e];return n?m(v({},t),{slots:m(v({},t.slots),h({},e,m(v({},n),{attachedIds:[]})))}):t}))},D=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},C=function(e,t,n,r,o,i,a){var u=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=Mn.getState().extensions;return b(t).concat(b(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,u=D(e,o,null===(r=i[O(e)])||void 0===r?void 0:r.order,t),s=D(n,o,null===(a=i[O(n)])||void 0===a?void 0:a.order,t);return-1===s?-1:-1===u?1:u-s}))}(n,t.slots[e].attachedIds),s=[],c=!0,l=!1,f=void 0;try{for(var d,h=u[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value,y=(0,On.getExtensionConfigFromStore)(r,e,p).config,v=O(p),m=t.extensions[v];if(m){var g,w,_,S,E,x,k,A=null!==(x=null!==(E=null==y||null===(g=y["Display conditions"])||void 0===g?void 0:g.privileges)&&void 0!==E?E:m.privileges)&&void 0!==x?x:[];if(A&&("string"==typeof A||Array.isArray(A)&&A.length>0)){if(!(null==a?void 0:a.user))continue;if(!(0,jn.userHasAccess)(A,a.user))continue}var P,j,C,T,I=null!==(k=null==y||null===(w=y["Display conditions"])||void 0===w?void 0:w.expression)&&void 0!==k?k:null;if(null!==I)try{if(!(0,Dn.evaluateAsBoolean)(I,{session:a}))continue}catch(e){console.error("Error while evaluating expression ".concat(I),e);continue}if(m.featureFlag&&!o.includes(m.featureFlag))continue;if(window.offlineEnabled&&!Oe(i,m.online,m.offline))continue;s.push({id:p,name:v,moduleName:m.moduleName,config:y,featureFlag:m.featureFlag,meta:m.meta,online:null===(j=null!==(P=null==y||null===(_=y["Display conditions"])||void 0===_?void 0:_.online)&&void 0!==P?P:m.online)||void 0===j||j,offline:null!==(T=null!==(C=null==y||null===(S=y["Display conditions"])||void 0===S?void 0:S.offline)&&void 0!==C?C:m.offline)&&void 0!==T&&T})}}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}return s},T=function(e){var t=Mn.getState(),n=(0,On.getExtensionSlotConfig)(e).config,r=Ln.getState(),o=Cn.featureFlagsStore.getState(),i=jn.sessionStore.getState(),a=(0,In.isOnline)();return C(e,t,n,r,Object.entries(o.flags).filter((function(e){return g(e,2)[1].enabled})).map((function(e){return g(e,1)[0]})),a,i.session)},I=function(e){Vn.setState((function(t){return t.modals[e.name]=e,t}))},M=function(e){var t=Vn.getState().modals[e];if(!t){var n=k(e);n&&(t={name:e,load:n.load,moduleName:n.moduleName},console.warn("Modal ".concat(e,' 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.')),I(t))}return t},R=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},N=function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")},L=function(e){var t=function(e,t){if("object"!=zn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=zn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zn(t)?t:String(t)},F=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L(r.key),r)}},B=function(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},U=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},G=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hn(e,t)},K=function(e,t){if(t&&("object"===zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U(e)},V=function(e,t,n){return(t=L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},z=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},H=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},q=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},W=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},Y=function(e){return null==e?"":""+e},$=function(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}},J=function(e,t,n){var r=$(e,t,Object);r.obj[r.k]=n},Q=function(e,t){var n=$(e,t),r=n.obj,o=n.k;if(r)return r[o]},X=function(e,t,n){var r=Q(e,n);return void 0!==r?r:Q(t,n)},Z=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},ee=function(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return Xn[e]})):e},te=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ne=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},re=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},oe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},ie=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ae=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ue=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},se=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ce=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},le=function(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}},fe=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},de=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},he=function(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e},pe=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ye=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},ve=function(){},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},be=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ge(e,t,n[t])}))}return e},we=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},_e=function(e){var t,n,r,o,i,a;br.setState((function(u){return{workspaces:we(be({},u.workspaces),ge({},e.name,we(be({},e),{preferredWindowSize:null!==(t=e.preferredWindowSize)&&void 0!==t?t:"normal",type:null!==(n=e.type)&&void 0!==n?n:"form",canHide:null!==(r=e.canHide)&&void 0!==r&&r,canMaximize:null!==(o=e.canMaximize)&&void 0!==o&&o,width:null!==(i=e.width)&&void 0!==i?i:"narrow",groups:null!==(a=e.groups)&&void 0!==a?a:[]})))}}))},Se=function(e){var t=br.getState().workspaces;if(t[e])return t[e];var n,r,o,i,a,u,s,c,l,f,d,h,p,y,v,m,g,b,w=k(e);if(w)return wr.has(e)||(console.warn("The workspace '".concat(e,'\' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.')),wr.add(e)),{name:w.name,title:(m=w,b=null==m||null===(g=m.meta)||void 0===g?void 0:g.title,"string"==typeof b?b:b&&"object"==typeof b?(p=m.moduleName,y=b.key,v=b.default,gr.t(y,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){me(e,t,n[t])}))}return e}({ns:p,defaultValue:v},void 0))):m.name),moduleName:w.moduleName,preferredWindowSize:null!==(s=null===(n=w.meta)||void 0===n?void 0:n.screenSize)&&void 0!==s?s:"normal",load:w.load,type:null!==(c=null===(r=w.meta)||void 0===r?void 0:r.type)&&void 0!==c?c:"form",canHide:null!==(l=null===(o=w.meta)||void 0===o?void 0:o.canHide)&&void 0!==l&&l,canMaximize:null!==(f=null===(i=w.meta)||void 0===i?void 0:i.canMaximize)&&void 0!==f&&f,width:null!==(d=null===(a=w.meta)||void 0===a?void 0:a.width)&&void 0!==d?d:"narrow",groups:null!==(h=null==w||null===(u=w.meta)||void 0===u?void 0:u.groups)&&void 0!==h?h:[]};throw new Error("No workspace named '".concat(e,"' has been registered."))},Ee=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Oe((0,In.isOnline)(),e,t)},Oe=function(e){return Boolean(e?!(arguments.length>1&&void 0!==arguments[1])||arguments[1]:arguments.length>2&&void 0!==arguments[2]&&arguments[2])},xe=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ke=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ae=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Pe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ae(e,t,n[t])}))}return e},je=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},De=function(e,t,n,r){return Er.apply(this,arguments)};p.r(y),p.d(y,{attach:function(){return A},checkStatus:function(){return Ee},checkStatusFor:function(){return Oe},detach:function(){return P},detachAll:function(){return j},extensionStore:function(){return Or},getAssignedExtensions:function(){return T},getExtensionInternalStore:function(){return An},getExtensionNameFromId:function(){return O},getExtensionRegistration:function(){return k},getExtensionRegistrationFrom:function(){return x},getExtensionStore:function(){return Pn},getModalRegistration:function(){return M},getWorkspaceRegistration:function(){return Se},registerExtension:function(){return Un},registerExtensionSlot:function(){return Gn},registerModal:function(){return I},registerWorkspace:function(){return _e},renderExtension:function(){return De},reset:function(){return Kn},updateInternalExtensionStore:function(){return l}});var Ce=function(e,t){return e===t||e!=e&&t!=t},Te=function(e,t){for(var n=e.length;n--;)if(Ce(e[n][0],t))return n;return-1},Ie=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(e){var t=this.__data__,n=Te(t,e);return!(n<0||(n==t.length-1?t.pop():Ie.call(t,n,1),--this.size,0))},i.prototype.get=function(e){var t=this.__data__,n=Te(t,e);return n<0?void 0:t[n][1]},i.prototype.has=function(e){return Te(this.__data__,e)>-1},i.prototype.set=function(e,t){var n=this.__data__,r=Te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Me,Re=i,Ne="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Le="object"==typeof self&&self&&self.Object===Object&&self,Fe=Ne||Le||Function("return this")(),Be=Fe.Symbol,Ue=Object.prototype,Ge=Ue.hasOwnProperty,Ke=Ue.toString,Ve=Be?Be.toStringTag:void 0,ze=Object.prototype.toString,He=Be?Be.toStringTag:void 0,qe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":He&&He in Object(e)?function(e){var t=Ge.call(e,Ve),n=e[Ve];try{e[Ve]=void 0;var r=!0}catch(e){}var o=Ke.call(e);return r&&(t?e[Ve]=n:delete e[Ve]),o}(e):function(e){return ze.call(e)}(e)},We=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},Ye=function(e){if(!We(e))return!1;var t=qe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},$e=Fe["__core-js_shared__"],Je=(Me=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||""))?"Symbol(src)_1."+Me:"",Qe=Function.prototype.toString,Xe=function(e){if(null!=e){try{return Qe.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ze=/^\[object .+?Constructor\]$/,et=Function.prototype,tt=Object.prototype,nt=et.toString,rt=tt.hasOwnProperty,ot=RegExp("^"+nt.call(rt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),it=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!We(e)||(t=e,Je&&Je in t))&&(Ye(e)?ot:Ze).test(Xe(e));var t}(n)?n:void 0},at=it(Fe,"Map"),ut=it(Object,"create"),st=Object.prototype.hasOwnProperty,ct=Object.prototype.hasOwnProperty;a.prototype.clear=function(){this.__data__=ut?ut(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(ut){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return st.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return ut?void 0!==t[e]:ct.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ut&&void 0===t?"__lodash_hash_undefined__":t,this};var lt=a,ft=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new lt,map:new(at||Re),string:new lt}},u.prototype.delete=function(e){var t=ft(this,e).delete(e);return this.size-=t?1:0,t},u.prototype.get=function(e){return ft(this,e).get(e)},u.prototype.has=function(e){return ft(this,e).has(e)},u.prototype.set=function(e,t){var n=ft(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var dt=u;s.prototype.clear=function(){this.__data__=new Re,this.size=0},s.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},s.prototype.get=function(e){return this.__data__.get(e)},s.prototype.has=function(e){return this.__data__.has(e)},s.prototype.set=function(e,t){var n=this.__data__;if(r(n,Re)){var o=n.__data__;if(!at||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new dt(o)}return n.set(e,t),this.size=n.size,this};var ht=s;c.prototype.add=c.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},c.prototype.has=function(e){return this.__data__.has(e)};var pt=c,yt=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},vt=function(e,t,n,r,o,i){var a=1&n,u=e.length,s=t.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,h=2&n?new pt:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var p=e[f],y=t[f];if(r)var v=a?r(y,p,f,t,e,i):r(p,y,f,e,t,i);if(void 0!==v){if(v)continue;d=!1;break}if(h){if(!yt(t,(function(e,t){if(a=t,!h.has(a)&&(p===e||o(p,e,n,r,i)))return h.push(t);var a}))){d=!1;break}}else if(p!==y&&!o(p,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},mt=Fe.Uint8Array,gt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},bt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},wt=Be?Be.prototype:void 0,_t=wt?wt.valueOf:void 0,St=Array.isArray,Et=Object.prototype.propertyIsEnumerable,Ot=Object.getOwnPropertySymbols,xt=Ot?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(Ot(e),(function(t){return Et.call(e,t)})))}:function(){return[]},kt=function(e){return null!=e&&"object"==typeof e},At=function(e){return kt(e)&&"[object Arguments]"==qe(e)},Pt=Object.prototype,jt=Pt.hasOwnProperty,Dt=Pt.propertyIsEnumerable,Ct=At(function(){return arguments}())?At:function(e){return kt(e)&&jt.call(e,"callee")&&!Dt.call(e,"callee")},Tt=Ct,It=t&&!t.nodeType&&t,Mt=It&&e&&!e.nodeType&&e,Rt=Mt&&Mt.exports===It?Fe.Buffer:void 0,Nt=(Rt?Rt.isBuffer:void 0)||function(){return!1},Lt=/^(?:0|[1-9]\d*)$/,Ft=function(e,t){var n=void 0===e?"undefined":o(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Lt.test(e))&&e>-1&&e%1==0&&e<t},Bt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Ut={};Ut["[object Float32Array]"]=Ut["[object Float64Array]"]=Ut["[object Int8Array]"]=Ut["[object Int16Array]"]=Ut["[object Int32Array]"]=Ut["[object Uint8Array]"]=Ut["[object Uint8ClampedArray]"]=Ut["[object Uint16Array]"]=Ut["[object Uint32Array]"]=!0,Ut["[object Arguments]"]=Ut["[object Array]"]=Ut["[object ArrayBuffer]"]=Ut["[object Boolean]"]=Ut["[object DataView]"]=Ut["[object Date]"]=Ut["[object Error]"]=Ut["[object Function]"]=Ut["[object Map]"]=Ut["[object Number]"]=Ut["[object Object]"]=Ut["[object RegExp]"]=Ut["[object Set]"]=Ut["[object String]"]=Ut["[object WeakMap]"]=!1;var Gt,Kt=t&&!t.nodeType&&t,Vt=Kt&&e&&!e.nodeType&&e,zt=Vt&&Vt.exports===Kt&&Ne.process,Ht=function(){try{return Vt&&Vt.require&&Vt.require("util").types||zt&&zt.binding&&zt.binding("util")}catch(e){}}(),qt=Ht&&Ht.isTypedArray,Wt=qt?(Gt=qt,function(e){return Gt(e)}):function(e){return kt(e)&&Bt(e.length)&&!!Ut[qe(e)]},Yt=Object.prototype.hasOwnProperty,$t=Object.prototype,Jt=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Qt=Object.prototype.hasOwnProperty,Xt=function(e){return null!=(t=e)&&Bt(t.length)&&!Ye(t)?function(e,t){var n=St(e),r=!n&&Tt(e),o=!n&&!r&&Nt(e),i=!n&&!r&&!o&&Wt(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!Yt.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ft(c,s))||u.push(c);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||$t))return Jt(e);var t,n,r=[];for(var o in Object(e))Qt.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Zt=function(e){return function(e,t,n){var r=t(e);return St(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Xt,xt)},en=Object.prototype.hasOwnProperty,tn=it(Fe,"DataView"),nn=it(Fe,"Promise"),rn=it(Fe,"Set"),on=it(Fe,"WeakMap"),an="[object Map]",un="[object Promise]",sn="[object Set]",cn="[object WeakMap]",ln="[object DataView]",fn=Xe(tn),dn=Xe(at),hn=Xe(nn),pn=Xe(rn),yn=Xe(on),vn=qe;(tn&&vn(new tn(new ArrayBuffer(1)))!=ln||at&&vn(new at)!=an||nn&&vn(nn.resolve())!=un||rn&&vn(new rn)!=sn||on&&vn(new on)!=cn)&&(vn=function(e){var t=qe(e),n="[object Object]"==t?e.constructor:void 0,r=n?Xe(n):"";if(r)switch(r){case fn:return ln;case dn:return an;case hn:return un;case pn:return sn;case yn:return cn}return t});var mn=vn,gn="[object Arguments]",bn="[object Array]",wn="[object Object]",_n=Object.prototype.hasOwnProperty,Sn=function e(t,n,o,i,a){return t===n||(null==t||null==n||!kt(t)&&!kt(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=St(e),s=St(t),c=u?bn:mn(e),l=s?bn:mn(t),f=(c=c==gn?wn:c)==wn,d=(l=l==gn?wn:l)==wn,h=c==l;if(h&&Nt(e)){if(!Nt(t))return!1;u=!0,f=!1}if(h&&!f)return a||(a=new ht),u||Wt(e)?vt(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new mt(e),new mt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ce(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=gt;case"[object Set]":var s=1&r;if(u||(u=bt),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=vt(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(_t)return _t.call(e)==_t.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var p=f&&_n.call(e,"__wrapped__"),y=d&&_n.call(t,"__wrapped__");if(p||y){var v=p?e.value():e,m=y?t.value():t;return a||(a=new ht),i(v,m,n,o,a)}}return!!h&&(a||(a=new ht),function(e,t,n,o,i,a){var u=1&n,s=Zt(e),c=s.length;if(c!=Zt(t).length&&!u)return!1;for(var l=c;l--;){var f=s[l];if(!(u?f in t:en.call(t,f)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var p=!0;a.set(e,t),a.set(t,e);for(var y=u;++l<c;){var v=e[f=s[l]],m=t[f];if(o)var g=u?o(m,v,f,t,e,a):o(v,m,f,e,t,a);if(!(void 0===g?v===m||i(v,m,n,o,a):g)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,o,i,a))}(t,n,o,i,e,a))},En=function(e,t){return Sn(e,t)},On=p(824),xn=p(685),kn=(0,xn.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),An=function(){return(0,xn.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Pn=function(){return(0,xn.getGlobalStore)("extensions",{slots:{}})};f(kn.getState()),kn.subscribe(f);var jn=p(766),Dn=p(234),Cn=p(708),Tn=p(103),In=p(618),Mn=An(),Rn=Pn(),Nn=(0,On.getExtensionSlotsConfigStore)(),Ln=(0,On.getExtensionsConfigStore)();Mn.subscribe((function(e){_(e,Nn.getState(),Ln.getState(),Cn.featureFlagsStore.getState(),jn.sessionStore.getState())})),Nn.subscribe((function(e){_(Mn.getState(),e,Ln.getState(),Cn.featureFlagsStore.getState(),jn.sessionStore.getState())})),Ln.subscribe((function(e){_(Mn.getState(),Nn.getState(),e,Cn.featureFlagsStore.getState(),jn.sessionStore.getState())})),Cn.featureFlagsStore.subscribe((function(e){_(Mn.getState(),Nn.getState(),Ln.getState(),e,jn.sessionStore.getState())})),jn.sessionStore.subscribe((function(e){_(Mn.getState(),Nn.getState(),Ln.getState(),Cn.featureFlagsStore.getState(),e)})),S(),(0,Tn.subscribeConnectivityChanged)(S);var Fn,Bn,Un=function(e){return Mn.setState((function(t){return t.extensions[e.name]=m(v({},e),{instances:[]}),t}))},Gn=function(e,t){return Mn.setState((function(n){var r,o=null===(r=n.slots[t])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(t,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),n;if(o&&o==e)return n;if(n.slots[t])return m(v({},n),{slots:m(v({},n.slots),h({},t,m(v({},n.slots[t]),{moduleName:e})))});var i=E(t,e);return m(v({},n),{slots:m(v({},n.slots),h({},t,i))})}))},Kn=function(){return Rn.setState((function(){return{slots:{},extensions:{}}}))},Vn=(0,xn.createGlobalStore)("modalRegistry",{modals:{}});function zn(e){return zn="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)},zn(e)}function Hn(e,t){return Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hn(e,t)}function qn(e){return qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qn(e)}Fn=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){R(e,t,n[t])}))}return e}({},{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"}),Bn=null!=(Bn={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",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",unknown:"Unknown"})?Bn:{},Object.getOwnPropertyDescriptors?Object.defineProperties(Fn,Object.getOwnPropertyDescriptors(Bn)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(Bn)).forEach((function(e){Object.defineProperty(Fn,e,Object.getOwnPropertyDescriptor(Bn,e))}));var Wn={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},Yn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};N(this,e),this.init(t,n)}return B(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Wn,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,q(q({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),$n=new Yn,Jn=function(){function e(){N(this,e),this.observers={}}return B(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function Qn(e,t,n){for(var o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?"string"==typeof e[o]||r(e[o],String)||"string"==typeof t[o]||r(t[o],String)?n&&(e[o]=t[o]):Qn(e[o],t[o],n):e[o]=t[o]);return e}var Xn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},Zn="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,er=[" ",",","?","!",";"];function tr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,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 a=2,u=r.slice(i,i+a).join(n),s=o[u];void 0===s&&r.length>i+a;)a++,s=o[u=r.slice(i,i+a).join(n)];if(void 0===s)return;if(null===s)return null;if(t.endsWith(u)){if("string"==typeof s)return s;if(u&&"string"==typeof s[u])return s[u]}var c=r.slice(i+a).join(n);return c?tr(s,c,n):void 0}o=o[r[i]]}return o}}var nr=function(e){G(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=qn(t);if(n){var o=qn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return K(this,e)});function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return N(this,o),t=r.call(this),Zn&&Jn.call(U(t)),t.data=e||{},t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return B(o,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var u=Q(this.data,a);return u||!i||"string"!=typeof n?u:tr(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),J(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var u=Q(this.data,a)||{};r?Qn(u,n,o):u=ne(ne({},u),n),J(this.data,a,u),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?ne(ne({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),o}(Jn),rr={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},or={},ir=function(e){G(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=qn(t);if(n){var o=qn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return K(this,e)});function o(e){var t,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return N(this,o),t=r.call(this),Zn&&Jn.call(U(t)),n=e,i=U(t),["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){n[e]&&(i[e]=n[e])})),t.options=a,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=$n.create("translator"),t}return B(o,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=er.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:o};var s=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,n){var r=this;if("object"!==zn(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],t),s=u.key,c=u.namespaces,l=c[c.length-1],f=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(d){var h=t.nsSeparator||this.options.nsSeparator;return i?(p.res="".concat(l).concat(h).concat(s),p):"".concat(l).concat(h).concat(s)}return i?(p.res=s,p):s}var p=this.resolve(e,t),y=p&&p.res,v=p&&p.usedKey||s,m=p&&p.exactUsedKey||s,g=Object.prototype.toString.apply(y),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&y&&"string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0&&("string"!=typeof b||"[object Array]"!==g)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,y,oe(oe({},t),{},{ns:c})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");return i?(p.res=_,p):_}if(a){var S="[object Array]"===g,E=S?[]:{},O=S?m:v;for(var x in y)if(Object.prototype.hasOwnProperty.call(y,x)){var k="".concat(O).concat(a).concat(x);E[x]=this.translate(k,oe(oe({},t),{joinArrays:!1,ns:c})),E[x]===k&&(E[x]=y[x])}y=E}}else if(w&&"string"==typeof b&&"[object Array]"===g)(y=y.join(b))&&(y=this.extendTranslation(y,e,t,n));else{var A=!1,P=!1,j=void 0!==t.count&&"string"!=typeof t.count,D=o.hasDefaultValue(t),C=j?this.pluralResolver.getSuffix(f,t.count,t):"",T=t["defaultValue".concat(C)]||t.defaultValue;!this.isValidLookup(y)&&D&&(A=!0,y=T),this.isValidLookup(y)||(P=!0,y=s);var I=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:y,M=D&&T!==y&&this.options.updateMissing;if(P||A||M){if(this.logger.log(M?"updateKey":"missingKey",f,l,s,M?T:y),a){var R=this.resolve(s,oe(oe({},t),{},{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 N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var F=0;F<L.length;F++)N.push(L[F]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(t.lng||this.language):N.push(t.lng||this.language);var B=function(e,n,o){var i=D&&o!==y?o:I;r.options.missingKeyHandler?r.options.missingKeyHandler(e,l,n,i,M,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,l,n,i,M,t),r.emit("missingKey",e,l,n,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?N.forEach((function(e){r.pluralResolver.getSuffixes(e,t).forEach((function(n){B([e],s+n,t["defaultValue".concat(n)]||T)}))})):B(N,s,T))}y=this.extendTranslation(y,e,t,p,n),P&&y===s&&this.options.appendNamespaceToMissingKey&&(y="".concat(l,":").concat(s)),(P||A)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l,":").concat(s):s,A?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(p.res=y,p):y}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,oe(oe({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(oe(oe({},n),{interpolation:oe(oe({},this.options.interpolation),n.interpolation)}));var a,u="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(u){var s=e.match(this.interpolator.nestingRegexp);a=s&&s.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=oe(oe({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),u){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,d="string"==typeof f?[f]:f;return null!=e&&d&&d.length&&!1!==n.applyPostProcessor&&(e=rr.handle(d,e,t,this.options&&this.options.postProcessPassResolved?oe({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var s=a.extractFromKey(e,u),c=s.key;n=c;var l=s.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==u.count&&"string"!=typeof u.count,d=f&&!u.ordinal&&0===u.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==u.context&&("string"==typeof u.context||"number"==typeof u.context)&&""!==u.context,p=u.lngs?u.lngs:a.languageUtils.toResolveHierarchy(u.lng||a.language,u.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!or["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(or["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.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!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,s=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(s,c,n,e,u);else{var l;f&&(l=a.pluralResolver.getSuffix(n,u.count,u));var p="".concat(a.options.pluralSeparator,"zero");if(f&&(s.push(c+l),d&&s.push(c+p)),h){var y="".concat(c).concat(a.options.contextSeparator).concat(u.context);s.push(y),f&&(s.push(y+l),d&&s.push(y+p))}}for(;i=s.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,u))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),o}(Jn),ar=function(){function e(t){N(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$n.create("languageUtils")}return B(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=ie(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=ie(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=ie(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),ur=[{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}],sr={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},cr=["v1","v2","v3"],lr={zero:0,one:1,two:2,few:3,many:4,other:5},fr=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};N(this,e),this.languageUtils=t,this.options=r,this.logger=$n.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={},ur.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:sr[e.fc]}}))})),n)}return B(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return lr[e]-lr[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.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===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!cr.includes(this.options.compatibilityJSON)}}]),e}(),dr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};N(this,e),this.logger=$n.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return B(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ee,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?Z(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?Z(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?Z(t.nestingPrefix):t.nestingPrefixEscaped||Z("$t("),this.nestingSuffix=t.nestingSuffix?Z(t.nestingSuffix):t.nestingSuffixEscaped||Z(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,u=function(e){return e.replace(/\$/g,"$$$$")},s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=X(t,c,e);return s.alwaysFormat?s.format(o,void 0,n,ue(ue(ue({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),u=i.join(s.formatSeparator).trim();return s.format(X(t,c,a),u,n,ue(ue(ue({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof f){var u=f(e,o,r);i="string"==typeof u?u:""}else if(r&&r.hasOwnProperty(n))i="";else{if(d){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=Y(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=function(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var i=(o=this.interpolate(o,u)).match(/'/g),a=o.match(/"/g);(i&&i.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{u=JSON.parse(o),t&&(u=ue(ue({},t),u))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e},i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=ue({},a);for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(e);){var s=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),s=l,c=!0}if((r=t(o.call(this,n[1].trim(),u),u))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Y(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=s.reduce((function(e,t){return i.format(e,t,a.lng,ue(ue({},a),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),hr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};N(this,e),this.logger=$n.create("formatter"),this.options=t,this.formats={number:le((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:le((function(e,t){var n=new Intl.NumberFormat(e,ce(ce({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:le((function(e,t){var n=new Intl.DateTimeFormat(e,ce({},t));return function(e){return n.format(e)}})),relativetime:le((function(e,t){var n=new Intl.RelativeTimeFormat(e,ce({},t));return function(e){return n.format(e,t.range||"day")}})),list:le((function(e,t){var n=new Intl.ListFormat(e,ce({},t));return function(e){return n.format(e)}}))},this.init(t)}return B(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=le(t)}},{key:"format",value:function(e,t,n,r){var o=this;return t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=function(e){if(Array.isArray(e))return e}(i=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}var i}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,u=i.formatOptions;if(o.formats[a]){var s=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=c.locale||c.lng||r.locale||r.lng||n;s=o.formats[a](e,l,ce(ce(ce({},u),r),c))}catch(e){o.logger.warn(e)}return s}return o.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}(),pr=function(e){G(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=qn(t);if(n){var o=qn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return K(this,e)});function o(e,t,n){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return N(this,o),i=r.call(this),Zn&&Jn.call(U(i)),i.backend=e,i.store=t,i.services=n,i.languageUtils=n.languageUtils,i.options=a,i.logger=$n.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,a.backend,a),i}return B(o,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},u={},s={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var u="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[u]=2:o.state[u]<0||(1===o.state[u]?void 0===a[u]&&(a[u]=!0):(o.state[u]=1,r=!1,void 0===a[u]&&(a[u]=!0),void 0===i[u]&&(i[u]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(u[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(s)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,u,s,c,l;r=n.loaded,u=i,(c=(s=$(r,[o],Object)).obj)[l=s.k]=c[l]||[],c[l].push(u),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[n](e,t,(function(u,s){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)}u&&s&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(u,s)}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,de(de({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),o}(Jn),yr=function(e){G(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=qn(t);if(n){var o=qn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return K(this,e)});function o(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(N(this,o),e=r.call(this),Zn&&Jn.call(U(e)),e.options=he(n),e.services={},e.logger=$n,e.modules={external:[]},t=U(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),K(e,U(e));setTimeout((function(){e.init(n,i)}),0)}return e}return B(o,[{key:"init",value:function(){var e=function(e){return e?"function"==typeof e?new e:e:null},t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof n&&(r=n,n={}),!n.defaultNS&&!1!==n.defaultNS&&n.ns&&("string"==typeof n.ns?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));var o={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(e){var t={};if("object"===zn(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===zn(e[2])||"object"===zn(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};if(this.options=ye(ye(ye({},o),this.options),he(n)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ye(ye({},o.interpolation),this.options.interpolation)),void 0!==n.keySeparator&&(this.options.userDefinedKeySeparator=n.keySeparator),void 0!==n.nsSeparator&&(this.options.userDefinedNsSeparator=n.nsSeparator),!this.options.isClone){var i;this.modules.logger?$n.init(e(this.modules.logger),this.options):$n.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=hr);var a=new ar(this.options);this.store=new nr(this.options.resources,this.options);var u=this.services;u.logger=$n,u.resourceStore=this.store,u.languageUtils=a,u.pluralResolver=new fr(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format||(u.formatter=e(i),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new dr(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new pr(e(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=e(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=e(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ir(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,r||(r=ve),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[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 c=W(),l=function(){var e=function(e,n){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),c.resolve(n),r(e,n)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ve,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=W();return e||(e=this.languages),t||(t=this.options.ns),n||(n=ve),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&rr.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=W();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,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)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==zn(o)){for(var a=arguments.length,u=new Array(a>2?a-2:0),s=2;s<a;s++)u[s-2]=arguments[s];i=r.options.overloadTranslationOptionHandler([t,o].concat(u))}else i=ye({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",l=i.keyPrefix?"".concat(i.keyPrefix).concat(c).concat(t):t;return r.t(l,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var u=n.precheck(this,a);if(void 0!==u)return u}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=W();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=W();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ve,r=ye(ye(ye({},this.options),t),{isClone:!0}),i=new o(r);return void 0===t.debug&&void 0===t.prefix||(i.logger=i.logger.clone(t)),["store","services","language"].forEach((function(t){i[t]=e[t]})),i.services=ye({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new ir(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(r,n),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),o}(Jn);V(yr,"createInstance",(function(){return new yr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var vr=yr.createInstance();vr.createInstance=yr.createInstance,vr.createInstance,vr.init,vr.loadResources,vr.reloadResources,vr.use,vr.changeLanguage,vr.getFixedT,vr.t,vr.exists,vr.setDefaultNamespace,vr.hasLoadedNamespace,vr.loadNamespaces,vr.loadLanguages;var mr=vr,gr=mr.default||mr;gr.on("initialized",(function(){window.i18next.loadNamespaces(["core"])}));var br=(0,xn.createGlobalStore)("workspaceRegistrations",{workspaces:{}}),wr=new Set,_r=p(645),Sr=0;function Er(){var e;return e=function(e,t,n,r){var o,i,a,u,s,c,f,d,h,p,y,v,m,g,b=arguments;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(w){switch(w.label){case 0:if(o=b.length>4&&void 0!==b[4]?b[4]:function(e){return e},i=b.length>5&&void 0!==b[5]?b[5]:{},a=O(r),u=k(r),s=null,!e)return[3,3];if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));return c=u.load,f=u.meta,d=u.moduleName,h=u.online,p=u.offline,Ee(h,p)?(l((function(o){var i,u={domElement:e,id:r,slotName:t,slotModuleName:n};return je(Pe({},o),{extensions:je(Pe({},o.extensions),Ae({},a,je(Pe({},o.extensions[a]),{instances:(i=o.extensions[a].instances,function(e){if(Array.isArray(e))return xe(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([u])})))})})),[4,c()]):[3,2];case 1:y=w.sent(),v=y.default,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(y,["default"]),g=Sr++,s=(0,_r.mountRootParcel)(o(je(Pe({},null!=v?v:m),{name:"".concat(t,"/").concat(a,"-").concat(g)})),je(Pe({},i),{_meta:f,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:d},domElement:e})),w.label=2;case 2:return[3,4];case 3:console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available.")),w.label=4;case 4:return[2,s]}}))},Er=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ke(i,r,o,a,u,"next",e)}function u(e){ke(i,r,o,a,u,"throw",e)}a(void 0)}))},Er.apply(this,arguments)}var Or=An()}(),y}())}}}))},9375:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},i=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},a=function(e,r,o){var a;d.setState((function(u){var s;return{flags:i(n({},u.flags),t({},e,{enabled:null!==(a=null===(s=u.flags[e])||void 0===s?void 0:s.enabled)&&void 0!==a&&a,label:r,description:o}))}}))},u=function(e){return d.getState().flags[e].enabled},s=function(e,t){d.subscribe((function(n){t(n.flags[e].enabled)}))},c=function(e,r){d.setState((function(o){return{flags:i(n({},o.flags),t({},e,i(n({},o.flags[e]),{enabled:r})))}}))};r.r(o),r.d(o,{featureFlagsStore:function(){return d},getFeatureFlag:function(){return u},registerFeatureFlag:function(){return a},setFeatureFlag:function(){return c},subscribeToFeatureFlag:function(){return s}});var l=r(685),f={flags:function(){var e={},t=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;if(u.startsWith("openmrs:feature-flag:")){var s=u.replace("openmrs:feature-flag:",""),c=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(s))||"{}");e[s]=n({enabled:"true"===localStorage.getItem(u)},c)}}}catch(e){r=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}return e}()},d=(0,l.getGlobalStore)("feature-flags",f);d.subscribe((function(t){var n,r=!0,o=!1,i=void 0;try{for(var a,u=Object.entries(t.flags)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=function(e){if(Array.isArray(e))return e}(n=a.value)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(t,n){if(t){if("string"==typeof t)return e(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=s[0],l=s[1];localStorage.setItem("openmrs:feature-flag:".concat(c),l.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(c),JSON.stringify({label:l.label,description:l.description}))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}))}(),o}())}}}))},5151:(e,t,n)=>{"use strict";n.r(t),n.d(t,{addRoutesOverride:()=>y.Ay,finishRegisteringAllApps:()=>y.yw,getCoreTranslation:()=>g.V,initializeApp:()=>y.Wp,isOpenmrsAppRoutes:()=>y.Uz,isOpenmrsRoutes:()=>y.nX,localStorageRoutesPrefix:()=>y.ll,registerApp:()=>y.FZ,removeRoutesOverride:()=>y.p9,resetAllRoutesOverrides:()=>y.gM,translateFrom:()=>g.t,tryRegisterExtension:()=>y.Y1});var r=n(5867),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);n.d(t,o);var i=n(1834);o={};for(const e in i)"default"!==e&&(o[e]=()=>i[e]);n.d(t,o);var a=n(6007);o={};for(const e in a)"default"!==e&&(o[e]=()=>a[e]);n.d(t,o);var u=n(6577);o={};for(const e in u)"default"!==e&&(o[e]=()=>u[e]);n.d(t,o);var s=n(1757);o={};for(const e in s)"default"!==e&&(o[e]=()=>s[e]);n.d(t,o);var c=n(7093);o={};for(const e in c)"default"!==e&&(o[e]=()=>c[e]);n.d(t,o);var l=n(9375);o={};for(const e in l)"default"!==e&&(o[e]=()=>l[e]);n.d(t,o);var f=n(6511);o={};for(const e in f)"default"!==e&&(o[e]=()=>f[e]);n.d(t,o);var d=n(6693);o={};for(const e in d)"default"!==e&&(o[e]=()=>d[e]);n.d(t,o);var h=n(2225);o={};for(const e in h)"default"!==e&&(o[e]=()=>h[e]);n.d(t,o);var p=n(7837);o={};for(const e in p)"default"!==e&&(o[e]=()=>p[e]);n.d(t,o);var y=n(4115),v=n(209);o={};for(const e in v)["default","addRoutesOverride","finishRegisteringAllApps","initializeApp","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","registerApp","removeRoutesOverride","resetAllRoutesOverrides","tryRegisterExtension"].indexOf(e)<0&&(o[e]=()=>v[e]);n.d(t,o);var m=n(5801);o={};for(const e in m)["default","addRoutesOverride","finishRegisteringAllApps","initializeApp","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","registerApp","removeRoutesOverride","resetAllRoutesOverrides","tryRegisterExtension"].indexOf(e)<0&&(o[e]=()=>m[e]);n.d(t,o);var g=n(5095),b=n(3441);o={};for(const e in b)["default","addRoutesOverride","finishRegisteringAllApps","initializeApp","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","registerApp","removeRoutesOverride","resetAllRoutesOverrides","tryRegisterExtension","getCoreTranslation","translateFrom"].indexOf(e)<0&&(o[e]=()=>b[e]);n.d(t,o)},6511:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))},t=function(e){if(!window.offlineEnabled)return function(){};var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},n=function(e){return e({online:!window.offlineEnabled||navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(v,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},i=function(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))},u=function(e){window.dispatchEvent(new CustomEvent(w,{detail:e}))},s=function(e){window.dispatchEvent(new CustomEvent(b,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(m,t),function(){return window.removeEventListener(m,t)}},l=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(g,t),function(){return window.removeEventListener(g,t)}},f=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(b,t),function(){return window.removeEventListener(b,t)}},d=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(w,t),function(){return window.removeEventListener(w,t)}},h={d:function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},p={};h.r(p),h.d(p,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},dispatchSnackbarShown:function(){return u},dispatchToastShown:function(){return s},subscribeActionableNotificationShown:function(){return l},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return o},subscribeSnackbarShown:function(){return d},subscribeToastShown:function(){return f}});var y="openmrs:connectivity-changed",v="openmrs:precache-static-dependencies",m="openmrs:notification-shown",g="openmrs:actionable-notification-shown",b="openmrs:toast-shown",w="openmrs:snack-bar-shown";return p}())}}}))},6693:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-state"],(function(e,t){var u={};return{setters:[function(e){u.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=u}},t={};function s(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,s),o.exports}s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){var e=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},t=function(e){return e&&e.sensitive?"":"i"},u=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},l=function(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},f=function(e){return t=e.matcher,(null!=(n=RegExp)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):i(t,n))?e.matcher:"string"==typeof e.matcher?Pe(e.matcher):Pe(e.path);var t,n},d=function(e){return h([e])},h=function(e){var t=p(),n=e.map((function(e){return{matcher:f(e),settings:e}})),r=l(t).concat(l(n));je.setState(r,!0)},p=function(){return je.getState()},y=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},v=function(e,t){if(e.length>0){var n=De(e,t);if(n){for(var r=[n],o=De(e,n.settings.parent);void 0!==o;)r.push(o),o=De(e,o.settings.parent);return r.reverse()}}return[]},m=function(e){return v(p(),e)},g=function(e,t,n){var r=S(e,t,n);Re.length?Re.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},b=function(e){if("function"!=typeof e)throw Error(_(28,!1));Re.push(e)},w=function(e){if("function"!=typeof e)throw Error(_(29,!1));var t=!1;return Re=Re.filter((function(n){var r=n===e;return t=t||r,!r})),t},_=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},S=function(e,t,n){var r,o="".concat(A(t)," '").concat(x(t),"' died in status ").concat(t.status,": ");if(i(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(_(30,!1,t.status,x(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=x(t),t.status=n,r},E=function(e){return e.status===Ke},O=function(e){try{return e.activeWhen(window.location)}catch(t){return g(t,e,We),!1}},x=function(e){return e.name},k=function(e){return Boolean(e.unmountThisParcel)},A=function(e){return k(e)?"parcel":"application"},P=function(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]},j=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},D=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!j(t,(function(e){return"function"!=typeof e}))));var t},C=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=A(e),o=x(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return T(n)?n:Promise.reject(_(15,!1,r,o,t,a))}))}),Promise.resolve())}},T=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},I=function(e,t){return Promise.resolve().then((function(){return e.status!==Fe?e:(e.status=Be,e.bootstrap?z(e,"bootstrap").then(n).catch((function(n){if(t)throw S(n,e,We);return g(n,e,We),e})):Promise.resolve().then(n))}));function n(){return e.status=Ue,e}},M=function(e,t){return Promise.resolve().then((function(){if(e.status!==Ke)return e;e.status=ze;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw S(r,e,We);g(r,e,We)}))})).then((function(){return e}));function r(){return z(e,"unmount").then((function(){e.status=Ue}),(function(n){if(t)throw S(n,e,We);g(n,e,We)}))}}))},R=function(e,t){return Promise.resolve().then((function(){return e.status!==Ue?e:($e||(window.dispatchEvent(new Me("single-spa:before-first-mount")),$e=!0),e.status=Ge,z(e,"mount").then((function(){return e.status=Ke,Je||(window.dispatchEvent(new Me("single-spa:first-mount")),Je=!0),e})).catch((function(n){return e.status=Ke,M(e,!0).then(r,r);function r(){if(t)throw S(n,e,We);return g(n,e,We),e}})))}))},N=function(){return L.apply(Xe,arguments)},L=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(_(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(_(3,!1,a(e.name)));var r=Qe++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(_(4,!1,o,void 0===t?"undefined":a(t)));if(!t.domElement)throw Error(_(5,!1,o));var i,u="function"==typeof e,s=u?e:function(){return Promise.resolve(e)},c={id:r,parcels:{},status:u?Le:Fe,customProps:t,parentName:x(n),unmountThisParcel:function(){return p.then((function(){if(c.status!==Ke)throw Error(_(6,!1,o,c.status));return M(c,!0)})).then((function(e){return c.parentName&&delete n.parcels[c.id],e})).then((function(e){return f(e),e})).catch((function(e){throw c.status=We,d(e),e}))}};n.parcels[r]=c;var l=s();if(!l||"function"!=typeof l.then)throw Error(_(7,!1));l=l.then((function(e){if(!e)throw Error(_(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!D(e.bootstrap))throw Error(_(9,!1,o));if(!D(e.mount))throw Error(_(10,!1,o));if(!D(e.unmount))throw Error(_(11,!1,o));if(e.update&&!D(e.update))throw Error(_(12,!1,o));var t=C(e,"bootstrap"),n=C(e,"mount"),a=C(e,"unmount");c.status=Fe,c.name=o,c.bootstrap=t,c.mount=n,c.unmount=a,c.timeouts=H(e.timeouts),e.update&&(c.update=C(e,"update"),i.update=function(e){return c.customProps=e,F((t=c,Promise.resolve().then((function(){if(t.status!==Ke)throw Error(_(32,!1,x(t)));return t.status=Ve,z(t,"update").then((function(){return t.status=Ke,t})).catch((function(e){throw S(e,t,We)}))}))));var t})}));var f,d,h=l.then((function(){return I(c,!0)})),p=h.then((function(){return R(c,!0)})),y=new Promise((function(e,t){f=e,d=t}));return i={mount:function(){return F(Promise.resolve().then((function(){if(c.status!==Ue)throw Error(_(13,!1,o,c.status));return n.parcels[r]=c,R(c)})))},unmount:function(){return F(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:F(l),bootstrapPromise:F(h),mountPromise:F(p),unmountPromise:F(y)}},F=function(e){return e.then((function(){return null}))},B=function(e){var t=x(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(_(40,!1),t,n));var r=P({},n,{name:t,mountParcel:L.bind(e),singleSpa:Te});return k(e)&&(r.unmountSelf=e.unmountThisParcel),r},U=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(16,!1));Ze.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},G=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(17,!1));Ze.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},K=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(18,!1));Ze.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},V=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(19,!1));Ze.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},z=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=A(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](B(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=_(31,!1,t,o,x(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},H=function(e){var t={};for(var n in Ze)t[n]=P({},Ze[n],e&&e[n]||{});return t},q=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Ne&&e.status!==qe?e:(e.status=Le,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(B(e));if(!T(r))throw n=!0,Error(_(33,!1,x(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!D(t.bootstrap)&&(r=35),D(t.mount)||(r=36),D(t.unmount)||(r=37);var o=A(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(_(r,!1,o,x(e),i),t),g(void 0,e,We),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=P({},e.devtools.overlays,t.devtools.overlays)),e.status=Fe,e.bootstrap=C(t,"bootstrap"),e.mount=C(t,"mount"),e.unmount=C(t,"unmount"),e.unload=C(t,"unload"),e.timeouts=H(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=We:(r=qe,e.loadErrorTime=(new Date).getTime()),g(t,e,r),e})));var t,n}))},W=function(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(_(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=X(window.location.href),r=X(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)},Y=function(e){var t=this;if(e){var n=e[0].type;nt.indexOf(n)>=0&&tt[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},$=function(){dt([],arguments)},J=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Ce&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},Q=function(e){if(ot)throw Error(_(43,!1));Ce=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ot=!0,rt=window.history.replaceState,window.addEventListener("hashchange",$),window.addEventListener("popstate",$);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&nt.indexOf(e)>=0)||j(tt[e],(function(e){return e===n})))return t.apply(this,arguments);tt[e].push(n)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&nt.indexOf(e)>=0))return n.apply(this,arguments);tt[e]=tt[e].filter((function(e){return e!==t}))},window.history.pushState=J(window.history.pushState,"pushState"),window.history.replaceState=J(rt,"replaceState")},X=function(e){var t=document.createElement("a");return t.href=e,t},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!it){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return ee.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return ee.call(this,n,window.removeEventListener,e,t,arguments)},it=!0}},ee=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){nt.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},te=function(e){return Promise.resolve().then((function(){var t=at[x(e)];if(!t)return e;if(e.status===Ne)return ne(e,t),e;if(e.status===He)return t.promise.then((function(){return e}));if(e.status!==Ue&&e.status!==qe)return e;var n=e.status===qe?Promise.resolve():z(e,"unload");return e.status=He,n.then((function(){return ne(e,t),e})).catch((function(n){return function(e,t,n){delete at[x(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,g(n,e,We),t.reject(n)}(e,t,n),e}))}))},ne=function(e,t){delete at[x(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Ne,t.resolve()},re=function(e,t,n,r){at[x(e)]={app:e,resolve:n,reject:r},Object.defineProperty(at[x(e)],"promise",{get:t})},oe=function(e){return at[e]},ie=function(){return ut.filter(E).map(x)},ae=function(){return ut.map(x)},ue=function(e){var t=j(ut,(function(t){return x(t)===e}));return t?t.status:null},se=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(_(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(_(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(_(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(_(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(_(24,!1));if(!he(e.customProps))throw Error(_(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(_(20,!1));if(!t)throw Error(_(23,!1));if("function"!=typeof n)throw Error(_(24,!1));if(!he(r))throw Error(_(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:pe(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(ge()||st||(st=!0,setTimeout((function(){ge()||console.warn(_(1,!1))}),5e3)),-1!==ae().indexOf(o.name))throw Error(_(21,!1,o.name));ut.push(P({loadErrorTime:null,status:Ne,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),et&&(Z(),dt())},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return ut.filter((function(t){return t.activeWhen(e)})).map(x)},le=function(e){if(0===ut.filter((function(t){return x(t)===e})).length)throw Error(_(25,!1,e));return(et?fe(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=ut.map(x).indexOf(e);ut.splice(t,1)}))},fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(_(26,!1));var n=j(ut,(function(t){return x(t)===e}));if(!n)throw Error(_(27,!1,e));var r,o=oe(x(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){re(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,de(n,o.resolve,o.reject)):r=new Promise((function(e,t){re(n,(function(){return r}),e,t),de(n,e,t)})),r},de=function(e,t,n){Promise.resolve().then((function(){if(j(ce(),(function(t){return t===x(e)})))return ye()})).then((function(){return M(e).then(te).then((function(){t(),setTimeout((function(){dt()}))}))})).catch(n)},he=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},pe=function(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},ye=function(){return dt()},ve=function(e,t){return O(e)?I(e).then((function(e){return t.then((function(){return O(e)?R(e):e}))})):t.then((function(){return e}))},me=function(e){ht=!0,et&&(Q(e),dt())},ge=function(){return ht},be=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},we=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return _e(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){be(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},_e=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},Se=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=we(t,n).replace(window.location.origin,"");o.startsWith(r)?W(o):window.location.assign(o)},Ee=function(e){var t,n=JSON.parse(null!==(t=sessionStorage.getItem(yt))&&void 0!==t?t:"[]")||[];n.push(e),n.length>50&&(n=n.slice(-50)),sessionStorage.setItem(yt,JSON.stringify(n))},Oe=function(){var e;0===JSON.parse(null!==(e=sessionStorage.getItem(yt))&&void 0!==e?e:"[]").length&&document.referrer&&Ee(document.referrer),window.addEventListener("single-spa:routing-event",(function(e){var t,n,r=xe();"replaceState"==(null===(t=e.detail.originalEvent)||void 0===t?void 0:t.singleSpaTrigger)?(r[r.length-1]=window.location.href,sessionStorage.setItem(yt,JSON.stringify(r))):!(null===(n=e.detail.originalEvent)||void 0===n?void 0:n.singleSpa)&&r.includes(window.location.href)?ke({toUrl:window.location.href}):r[r.length-1]!==window.location.href&&Ee(window.location.href)}))},xe=function(){var e;return JSON.parse(null!==(e=sessionStorage.getItem(yt))&&void 0!==e?e:"[]")},ke=function(e){var t=e.toUrl,n=xe(),r=n.lastIndexOf(t);if(-1==r)throw new Error("URL ".concat(t," not found in history; cannot go back to it."));var o=n.slice(0,r+1);Se({to:n[r]}),sessionStorage.setItem(yt,JSON.stringify(o))},Ae=function(){sessionStorage.removeItem(yt)};function Pe(n,r,o){return i(n,RegExp)?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(n,r):Array.isArray(n)?function(e,n,r){var o=e.map((function(e){return Pe(e,n,r).source}));return new RegExp("(?:"+o.join("|")+")",t(r))}(n,r,o):function(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,s=void 0===u||u,c=o.end,l=void 0===c||c,f=o.encode,d=void 0===f?function(e){return e}:f,h="["+e(o.endsWith||"")+"]|$",p="["+e(o.delimiter||"/#?")+"]",y=s?"^":"",v=0,m=n;v<m.length;v++){var g=m[v];if("string"==typeof g)y+=e(d(g));else{var b=e(d(g.prefix)),w=e(d(g.suffix));if(g.pattern)if(r&&r.push(g),b||w)if("+"===g.modifier||"*"===g.modifier){var _="*"===g.modifier?"?":"";y+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+_}else y+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else y+="("+g.pattern+")"+g.modifier;else y+="(?:"+b+w+")"+g.modifier}}if(l)a||(y+=p+"?"),y+=o.endsWith?"(?="+h+")":"$";else{var S=n[n.length-1],E="string"==typeof S?p.indexOf(S[S.length-1])>-1:void 0===S;a||(y+="(?:"+p+"(?="+h+"))?"),E||(y+="(?="+p+"|"+h+")")}return new RegExp(y,t(o))}(function(t,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<e.length;){var s=e.charCodeAt(u);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",u=[],s=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},h=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var p=f("CHAR"),y=f("NAME"),v=f("PATTERN");if(y||v){var m=p||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(u.push(l),l=""),u.push({name:y||s++,prefix:m,suffix:"",pattern:v||a,modifier:f("MODIFIER")||""})}else{var g=p||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(u.push(l),l=""),f("OPEN")){m=h();var b=f("NAME")||"",w=f("PATTERN")||"",_=h();d("CLOSE"),u.push({name:b||(w?s++:""),pattern:b&&!w?a:w,prefix:m,suffix:_,modifier:f("MODIFIER")||""})}else d("END")}}return u}(n,o),r,o)}(n,r,o)}s.r(c),s.d(c,{clearHistory:function(){return Ae},filterBreadcrumbs:function(){return v},getBreadcrumbs:function(){return p},getBreadcrumbsFor:function(){return m},getHistory:function(){return xe},goBackInHistory:function(){return ke},interpolateString:function(){return _e},interpolateUrl:function(){return we},navigate:function(){return Se},registerBreadcrumb:function(){return d},registerBreadcrumbs:function(){return h},setupHistory:function(){return Oe}});var je=(0,s(685).createGlobalStore)("breadcrumbs",[]);function De(e,t){if(t)return function(e,t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,1):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.filter((function(e){return e.matcher.test(t)})));return n[0]}(e,t)||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=De(e,n.join("/"));if(r)return r}}(e,t)}var Ce,Te=Object.freeze({__proto__:null,get start(){return me},get ensureJQuerySupport(){return Z},get setBootstrapMaxTime(){return U},get setMountMaxTime(){return G},get setUnmountMaxTime(){return K},get setUnloadMaxTime(){return V},get registerApplication(){return se},get unregisterApplication(){return le},get getMountedApps(){return ie},get getAppStatus(){return ue},get unloadApplication(){return fe},get checkActivityFunctions(){return ce},get getAppNames(){return ae},get pathToActiveWhen(){return pe},get navigateToUrl(){return W},get patchHistoryApi(){return Q},get triggerAppChange(){return ye},get addErrorHandler(){return b},get removeErrorHandler(){return w},get mountRootParcel(){return N},get NOT_LOADED(){return Ne},get LOADING_SOURCE_CODE(){return Le},get NOT_BOOTSTRAPPED(){return Fe},get BOOTSTRAPPING(){return Be},get NOT_MOUNTED(){return Ue},get MOUNTING(){return Ge},get UPDATING(){return Ve},get LOAD_ERROR(){return qe},get MOUNTED(){return Ke},get UNLOADING(){return He},get UNMOUNTING(){return ze},get SKIP_BECAUSE_BROKEN(){return We}}),Ie=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,Me=function(){try{var e=new Ie("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?Ie:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},Re=[],Ne="NOT_LOADED",Le="LOADING_SOURCE_CODE",Fe="NOT_BOOTSTRAPPED",Be="BOOTSTRAPPING",Ue="NOT_MOUNTED",Ge="MOUNTING",Ke="MOUNTED",Ve="UPDATING",ze="UNMOUNTING",He="UNLOADING",qe="LOAD_ERROR",We="SKIP_BECAUSE_BROKEN",Ye=[],$e=!1,Je=!1,Qe=0,Xe={parcels:{}},Ze={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}},et="undefined"!=typeof window,tt={hashchange:[],popstate:[]},nt=["hashchange","popstate"],rt=null,ot=!1;et&&(window.singleSpaNavigate?console.warn(_(41,!1)):window.singleSpaNavigate=W);var it=!1,at={},ut=[],st=!1,ct=!1,lt=[],ft=et&&window.location.href;function dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(ct)return new Promise((function(e,n){lt.push({resolve:e,reject:n,eventArguments:t})}));var r,i=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return ut.forEach((function(i){var a=i.status!==We&&O(i);switch(i.status){case qe:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Ne:case Le:a&&n.push(i);break;case Fe:case Ue:!a&&oe(x(i))?e.push(i):a&&r.push(i);break;case Ke:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),a=i.appsToUnload,u=i.appsToUnmount,s=i.appsToLoad,c=i.appsToMount,l=[],f=ft,d=ft=window.location.href;return ge()?(ct=!0,r=a.concat(s,u,c),Promise.resolve().then((function(){return m(0===r.length?"before-no-app-change":"before-app-change",v(!0)),m("before-routing-event",v(!0,{cancelNavigation:h})),Promise.all(l).then((function(n){if(n.some((function(e){return e})))return rt.call(window.history,history.state,"",f.substring(location.origin.length)),ft=location.href,ct=!1,dt(e,t,!0);var r=a.map(te),o=u.map(M).map((function(e){return e.then(te)})).concat(r),i=Promise.all(o);i.then((function(){m("before-mount-routing-event",v(!0))}),(function(e){throw e}));var l=s.map((function(e){return q(e).then((function(e){return ve(e,i)}))})),d=c.filter((function(e){return s.indexOf(e)<0})).map((function(e){return ve(e,i)}));return i.catch((function(e){throw y(),e})).then((function(){return y(),Promise.all(l.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(p).then((function(){}),(function(e){throw e}))}))}))}))):(r=s,Promise.resolve().then((function(){var e=s.map(q);return Promise.all(e).then(y).then((function(){return[]})).catch((function(e){throw y(),e})).finally((function(){}))})));function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);l.push(t.catch((function(e){return console.warn(Error(_(42,!1))),console.warn(e),!1})))}function p(){var t=ie();e.forEach((function(e){return e.resolve(t)}));try{m(0===r.length?"no-app-change":"app-change",v()),m("routing-event",v())}catch(e){setTimeout((function(){throw e}))}if(ct=!1,lt.length>0){var n=lt;lt=[],dt(n)}return t}function y(){n||(e.forEach((function(e){Y(e.eventArguments)})),Y(t))}function v(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,l={},h=(o(e={},Ke,[]),o(e,Ue,[]),o(e,Ne,[]),o(e,We,[]),e);n?(s.concat(c).forEach((function(e,t){y(e,Ke)})),a.forEach((function(e){y(e,Ne)})),u.forEach((function(e){y(e,Ue)}))):r.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:l,appsByNewStatus:h,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:d}};return i&&P(p.detail,i),p;function y(e,t){var n=x(e);t=t||ue(n),l[n]=t,(h[t]=h[t]||[]).push(n)}}function m(e,t){n||window.dispatchEvent(new Me("single-spa:".concat(e),t))}}var ht=!1,pt={getRawAppData:function(){return function(e){if(Array.isArray(e))return r(e)}(e=ut)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:dt,NOT_LOADED:Ne,toLoadPromise:q,toBootstrapPromise:I,unregisterApplication:le,getProfilerData:function(){return Ye}};et&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=pt);var yt="openmrs:history"}(),c}())}}}))},2225:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function p(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},i={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){i.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){"use strict";var e={766:function(e){e.exports=r},685:function(e){e.exports=i}},t={};function p(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,p),o.exports}p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return function(){var e=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},t=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},r=function(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)},i=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},v=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},m=function(){},g=function(e,t){if(!t)return e&&e.then?e.then(m):Promise.resolve()},b=function(e,t){if(void 0!==In)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),In;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new Tn(e,t);return In=n.register().then((function(){return n.controlling.then((function(){return n}))}))},w=function(){return null!=In?In:Promise.resolve(void 0)},S=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},E=function(e){return Ln.apply(this,arguments)},O=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},x=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)}))}},k=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},A=function(){return Fn.apply(this,arguments)},P=function(){return Bn.apply(this,arguments)},j=function(){return Un.apply(this,arguments)},D=function(){return Gn.apply(this,arguments)},C=function(){return{current:Vn,notAvailable:"unavailable"===Vn,active:"on"===Vn}},T=function(e){"unavailable"!==Vn&&"unavailable"!==e&&(localStorage.setItem(Kn,"on"===e?"active":"disabled"),Vn=e)},I=function(){return zn.apply(this,arguments)},M=function(e,t){return"object"!=typeof t||qn(t).forEach((function(n){e[n]=t[n]})),e},R=function(e,t){return $n.call(e,t)},N=function(e,t){"function"==typeof t&&(t=t(Yn(e))),("undefined"==typeof Reflect?qn:Reflect.ownKeys)(t).forEach((function(n){L(e,n,t[n])}))},L=function(e,t,n,r){Jn(e,t,M(n&&R(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},F=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),L(e.prototype,"constructor",e),{extend:N.bind(null,e.prototype)}}}},B=function(e,t,n){return Zn.call(e,t,n)},U=function(e,t){return t(e)},G=function(e){if(!e)throw new Error("Assertion Failed")},K=function(e){Hn.setImmediate?setImmediate(e):setTimeout(e,0)},V=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},z=function(e){var t={};for(var n in e)R(e,n)&&(t[n]=e[n]);return t},H=function(e){return nr.apply([],e)},q=function(e){ir="undefined"!=typeof WeakMap&&new WeakMap;var t=ar(e);return ir=null,t},W=function(e){return ur.call(e).slice(8,-1)},Y=function(e){var t,n,r,o;if(1===arguments.length){if(Wn(e))return e.slice();if(this===lr&&"string"==typeof e)return[e];if(o=cr(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n},$=function(e,t){dr=e,hr=t},J=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(hr).map((function(e){return"\n"+e})).join("")):""},Q=function(e,t){this._e=yr(),this.name=e,this.message=t},X=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},Z=function(e,t,n,r){this._e=yr(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=X(e,t)},ee=function(e,t){this._e=yr(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=X(e,t)},te=function(){},ne=function(e){return e},re=function(e,t){return null==e||e===ne?t:function(n){return t(e(n))}},oe=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},ie=function(e,t){return e===te?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?oe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?oe(o,this.onerror):o),void 0!==i?i:n}},ae=function(e,t){return e===te?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?oe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?oe(r,this.onerror):r)}},ue=function(e,t){return e===te?t:function(n){var r=e.apply(this,arguments);M(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?oe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?oe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:M(r,a)}},se=function(e,t){return e===te?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},ce=function(e,t){return e===te?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}},le=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=te,this._lib=!1;var t=this._PSD=Kr;if(dr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Or)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&de(this,this._value))}this._state=null,this._value=null,++t.ref,Wr(this,e)},fe=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},de=function(e,t){if(Fr.push(t),null===e._state){var n=e._lib&&ge();t=Ur(t),e._state=!1,e._value=t,dr&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((function(){var n=Xn(t,"stack");t._promise=e,L(t,"stack",{get:function(){return Tr?n&&(n.get?n.get.apply(t):n.value):e.stack}})})),function(e){Lr.some((function(t){return t._value===e._value}))||Lr.push(e)}(e),he(e),n&&be()}},he=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)pe(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===zr&&(++zr,Mr((function(){0==--zr&&we()}),[]))},pe=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++zr,Mr(ye,[n,e,t])}else e._listeners.push(t)},ye=function(e,t,n){try{Br=t;var r,o=t._value;t._state?r=e(o):(Fr.length&&(Fr=[]),r=e(o),-1===Fr.indexOf(o)&&function(e){for(var t=Lr.length;t;)if(Lr[--t]._value===e._value)return void Lr.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Br=null,0==--zr&&we(),--n.psd.ref||n.psd.finalize()}},ve=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},me=function(){ge()&&be()},ge=function(){var e=Rr;return Rr=!1,Nr=!1,e},be=function(){var e,t,n;do{for(;Vr.length>0;)for(e=Vr,Vr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Vr.length>0);Rr=!0,Nr=!0},we=function(){var e=Lr;Lr=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Hr.slice(0),n=t.length;n;)t[--n]()},_e=function(e){return new le(Or,!1,e)},Se=function(e,t){var n=Kr;return function(){var r=ge(),o=Kr;try{return je(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{je(o,!1),r&&be()}}},Ee=function(e,t,n,r){var o=Kr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var a=Gr.env;i.env=Cr?{Promise:le,PromiseProp:{value:le,configurable:!0,writable:!0},all:le.all,race:le.race,allSettled:le.allSettled,any:le.any,resolve:le.resolve,reject:le.reject,nthen:Me(a.nthen,i),gthen:Me(a.gthen,i)}:{},t&&M(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=Ce(i,e,n,r);return 0===i.ref&&i.finalize(),u},Oe=function(){return $r.id||($r.id=++Jr),++$r.awaits,$r.echoes+=100,$r.id},xe=function(){return!!$r.awaits&&(0==--$r.awaits&&($r.id=0),$r.echoes=100*$r.awaits,!0)},ke=function(e){return $r.echoes&&e&&e.constructor===Dr?(Oe(),e.then((function(e){return xe(),e}),(function(e){return xe(),to(e)}))):e},Ae=function(e){++Zr,$r.echoes&&0!=--$r.echoes||($r.echoes=$r.id=0),Qr.push(Kr),je(e,!0)},Pe=function(){var e=Qr[Qr.length-1];Qr.pop(),je(e,!1)},je=function(e,t){var n=Kr;if((t?!$r.echoes||Xr++&&e===Kr:!Xr||--Xr&&e===Kr)||Te(t?Ae.bind(null,e):Pe),e!==Kr&&(Kr=e,n===Gr&&(Gr.env=De()),Cr)){var r=Gr.env.Promise,o=e.env;Ar.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(Hn,"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))}},De=function(){var e=Hn.Promise;return Cr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Hn,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Ar.then,gthen:e.prototype.then}:{}},Ce=function(e,t,n,r,o){var i=Kr;try{return je(e,!0),t(n,r,o)}finally{je(i,!1)}},Te=function(e){jr.call(kr,e)},Ie=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=Kr;n&&Oe(),je(t,!0);try{return e.apply(this,arguments)}finally{je(o,!1),r&&Te(xe)}}},Me=function(e,t){return function(n,r){return e.call(this,Ie(n,t),Ie(r,t))}},Re=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(Hn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),M(r,o)):Hn.CustomEvent&&M(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Hn.dispatchEvent&&(dispatchEvent(r),!Hn.PromiseRejectionEvent&&Hn.onunhandledrejection))try{Hn.onunhandledrejection(r)}catch(e){}dr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},Ne=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Le=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=q(t))[e],t}},Fe=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){qn(e).forEach((function(t){var n=e[t];if(Wn(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new _r.InvalidArgument("Invalid event config");var r=i(t,ne,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){K((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=se),o||(o=te);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}},Be=function(e,t){return F(t).from({prototype:e}),t},Ue=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},Ge=function(e,t){e.filter=Ne(e.filter,t)},Ke=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return Ne(r(),t())}:t,e.justLimit=n&&!r},Ve=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new _r.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},ze=function(e,t,n){var r=Ve(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},He=function(e,t,n,r){var o=e.replayFilter?Ne(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),R(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),qe(ze(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return qe(ze(e,r,n),Ne(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},qe=function(e,t,n,r){var o=Se(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=te}),(function(t){e.fail(t),n=te}))||o(e.value,e,(function(e){return n=e})),n()}))}))},We=function(e){var t=void 0===e?"undefined":h(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=W(e);return"ArrayBuffer"===n?"binary":n},Ye=function(e){return s(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},$e=function(e,t){return e<t?-1:e===t?0:1},Je=function(e,t){return e>t?-1:e===t?0:1},Qe=function(e,t,n){var r=s(e,vo)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Xe=function(e){return new e.Collection(e,(function(){return nt("")})).limit(0)},Ze=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,s=0;s<a;++s){var c=t[s];if(c!==r[s])return o(e[s],n[s])<0?e.substr(0,s)+n[s]+n.substr(s+1):o(e[s],r[s])<0?e.substr(0,s)+r[s]+n.substr(s+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[s],c)<0&&(u=s)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},et=function(e,t,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return Qe(e,"String expected.");function d(e){o=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),i=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?$e:Je;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),s=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}d("next");var h=new e.Collection(e,(function(){return tt(u[0],s[f-1]+r)}));h._ondirectionchange=function(e){d(e)};var p=0;return h._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,s,p))return!0;for(var h=null,y=p;y<f;++y){var v=Ze(o,d,u[y],s[y],a,c);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+l)}:r),!1})),h},tt=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},nt=function(e){return{type:1,lower:e,upper:e}},rt=function(e){return Se((function(t){return ot(t),e(t.target.error),!1}))},ot=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},it=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+at(t)}},at=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},ut=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:V(n,(function(e){return[e.name,e]}))}},st=function(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return er(t,e)}}(e):function(t){return er(t,e)}},ct=function(e){return[].slice.call(e)},lt=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},ft=function(e,t){var n=e._novip,r=t.db,o=function(e,t,n,r){var o=n.IDBKeyRange,i=(n.indexedDB,function(e,t){return t.reduce((function(e,t){return c({},e,(0,t.create)(e))}),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}var o=function(e,t){var n=ct(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=Wn(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:st(t)},indexes:ct(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:Wn(o),keyPath:o,unique:n,multiEntry:r,extractKey:st(o)};return i[lt(o)]=a,a})),getIndexByKeyPath:function(e){return i[lt(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[lt(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),i=o.schema,a=o.hasGetAll,u=i.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,o=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,s){e=Se(e);var c=n.objectStore(t),l=null==c.keyPath,d="put"===o||"add"===o;if(!d&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var h,p=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var y=[],v=[],m=0,g=function(e){++m,ot(e)};if("deleteRange"===o){if(4===u.type)return e({numFailures:m,failures:v,results:[],lastResult:void 0});3===u.type?y.push(h=c.clear()):y.push(h=c.delete(r(u)))}else{var b=f(d?l?[a,i]:[a,null]:[i,null],2),w=b[0],_=b[1];if(d)for(var S=0;S<p;++S)y.push(h=_&&void 0!==_[S]?c[o](w[S],_[S]):c[o](w[S])),h.onerror=g;else for(var E=0;E<p;++E)y.push(h=c[o](w[E])),h.onerror=g}var O=function(t){var n=t.target.result;y.forEach((function(e,t){return null!=e.error&&(v[t]=e.error)})),e({numFailures:m,failures:v,results:"delete"===o?i:y.map((function(e){return e.result})),lastResult:n})};h.onerror=function(e){g(e),O(e)},h.onsuccess=O}))},getMany:function(e){var n=e.trans,r=e.keys;return new Promise((function(e,o){e=Se(e);for(var i,a=n.objectStore(t),u=r.length,s=new Array(u),c=0,l=0,f=function(t){var n=t.target;s[n._pos]=n.result,++l===c&&e(s)},d=rt(o),h=0;h<u;++h)null!=r[h]&&((i=a.get(r[h]))._pos=h,i.onsuccess=f,i.onerror=d,++c);0===c&&e(s)}))},get:function(e){var n=e.trans,r=e.key;return new Promise((function(e,o){e=Se(e);var i=n.objectStore(t).get(r);i.onsuccess=function(t){return e(t.target.result)},i.onerror=rt(o)}))},query:function(e){return function(n){return new Promise((function(o,i){o=Se(o);var a=n.trans,u=n.values,s=n.limit,c=n.query,l=s===1/0?void 0:s,f=c.index,d=c.range,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===s)return o({result:[]});if(e){var v=u?p.getAll(y,l):p.getAllKeys(y,l);v.onsuccess=function(e){return o({result:e.target.result})},v.onerror=rt(i)}else{var m=0,g=u||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),b=[];g.onsuccess=function(e){var t=g.result;return t?(b.push(u?t.value:t.primaryKey),++m===s?o({result:b}):void t.continue()):o({result:b})},g.onerror=rt(i)}}))}}(a),openCursor:function(e){var n=e.trans,o=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,s){e=Se(e);var c=i.index,l=i.range,f=n.objectStore(t),d=c.isPrimaryKey?f:f.index(c.name),h=a?u?"prevunique":"prev":u?"nextunique":"next",p=o||!("openKeyCursor"in d)?d.openCursor(r(l),h):d.openKeyCursor(r(l),h);p.onerror=rt(s),p.onsuccess=Se((function(t){var r=p.result;if(r){r.___id=++wo,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=Se(s),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=Se(e),p.onerror=rt(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(p.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=Se((function(e){p.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),s)}))},count:function(e){var n=e.query,o=e.trans,i=n.index,a=n.range;return new Promise((function(e,n){var u=o.objectStore(t),s=i.isPrimaryKey?u:u.index(i.name),c=r(a),l=c?s.count(c):s.count();l.onsuccess=Se((function(t){return e(t.target.result)})),l.onerror=rt(n)}))}}}(e)})),s={};return u.forEach((function(e){return s[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!s[e])throw new Error("Table '".concat(e,"' not found"));return s[e]},MIN_KEY:-1/0,MAX_KEY:bo(t),schema:i}}(t,o,r),e.dbcore));return{dbcore:i}}(n._middlewares,r,n._deps,t);n.core=o.dbcore,n.tables.forEach((function(e){var t=e.name;n.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=n.core.table(t),s(n[t],n.Table)&&(n[t].core=e.core))}))},dt=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=Xn(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||s(t,o.Transaction)?L(t,e,{get:function(){return this.table(e)},set:function(t){Jn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},ht=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)s(e[t],n.Table)&&delete e[t]}))},pt=function(e,t){return e._cfg.version-t._cfg.version},yt=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,s=i.idxByName,c=void 0;for(c in u)s[c]||a.del.push(c);for(c in s){var l=u[c],f=s[c];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},vt=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return mt(o,e)})),o},mt=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},gt=function(e,t,n){var r={};return B(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=it(at(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var s=t.index(t.indexNames[u]);o=s.keyPath;var c=it(s.name,o,!!s.unique,!!s.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(c)}r[e]=ut(e,i,a)})),r},bt=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var c=0;c<u.indexNames.length;++c){var l=u.indexNames[c],f=u.index(l).keyPath,d="string"==typeof f?f:"["+B(f).join("+")+"]";if(t[a]){var h=t[a].idxByName[d];h&&(h.name=l,delete t[a].idxByName[d],t[a].idxByName[l]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Hn.WorkerGlobalScope&&s(Hn,Hn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},wt=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Co("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},_t=function(e){return e&&"function"==typeof e.databases},St=function(e){return Ee((function(){return Kr.letThrough=!0,e()}))},Et=function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()},Ot=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Wn(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},xt=function(e,t,n){var r=arguments.length;if(r<2)throw new _r.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,H(o),n]},kt=function(e,t,n){for(var r=Wn(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},At=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===ho(t.keys[o],e[i])&&(r.push(n?q(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},Pt=function(e){return!("from"in e)},jt=function(e,t){Pt(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;Po(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},Dt=function(e){var t=Pt(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&ho(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||ho(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},Ct=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=c({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=Tt(a)}e.d=Tt(e)},Tt=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},It=function(e,t){return qn(t).forEach((function(n){jt(e[n]||(e[n]=new Ao),t[n])})),e},Mt=function(e){var t=Ro;try{Ro=!0,mo.storagemutated.fire(e)}finally{Ro=t}},Rt=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},Nt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Lt=function(){return new Ko},Ft=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Bt=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ut=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bt(i,r,o,a,u,"next",e)}function u(e){Bt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Gt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Kt=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Gt(e,t,n[t])}))}return e},Vt=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},zt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Ht=function(){return Ho},qt=function(){return qo.apply(this,arguments)},Wt=function(){return Yo.apply(this,arguments)},Yt=function(e,t,n,r){return $o.apply(this,arguments)},$t=function(e,t,n){return Jo.apply(this,arguments)},Jt=function(e,t){return Qo.apply(this,arguments)},Qt=function(e,t){return Xo.apply(this,arguments)},Xt=function(e){return Zo.apply(this,arguments)},Zt=function(e){return ei.apply(this,arguments)},en=function(e){return ti.apply(this,arguments)},tn=function(e){var t;return!!(null===(t=zo[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},nn=function(e){return ni.apply(this,arguments)},rn=function(e){return ri.apply(this,arguments)},on=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};zo[e]={type:e,dependsOn:t,process:n,options:r}},an=function(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(ai)},un=function(){return li+ci()},sn=function(e){return e.startsWith(li)},cn=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ln=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},fn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ln(i,r,o,a,u,"next",e)}function u(e){ln(i,r,o,a,u,"throw",e)}a(void 0)}))}},dn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},hn=function(){return Object.values(fi)},pn=function(e){fi[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),fi[e.id]=e},yn=function(e){return di.apply(this,arguments)},vn=function(e,t){return hi.apply(this,arguments)},mn=function(e,t){return pi.apply(this,arguments)},gn=function(e,t,n){return yi.apply(this,arguments)},bn=function(e,t){return vi.apply(this,arguments)},wn=function(e,t,n){return mi.apply(this,arguments)},_n=function(e,t){return gi.apply(this,arguments)},Sn=function(e,t,n){return bi.apply(this,arguments)},En=function(){return wi.apply(this,arguments)},On=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},xn=function(){return Pn(),_i},kn=function(e,t){Pn(),pn({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},An=function(e){return Si.apply(this,arguments)},Pn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};p.r(y),p.d(y,{activateOfflineCapability:function(){return I},beginEditSynchronizationItem:function(){return nn},canBeginEditSynchronizationItemsOfType:function(){return tn},deleteSynchronizationItem:function(){return rn},generateOfflineUuid:function(){return un},getCurrentOfflineMode:function(){return C},getDynamicOfflineDataEntries:function(){return yn},getDynamicOfflineDataEntriesFor:function(){return vn},getDynamicOfflineDataHandlers:function(){return hn},getFullSynchronizationItems:function(){return Zt},getFullSynchronizationItemsFor:function(){return Qt},getOfflineDb:function(){return Lt},getOfflinePatientDataStore:function(){return xn},getOfflineSynchronizationStore:function(){return Ht},getOmrsServiceWorker:function(){return w},getSynchronizationItem:function(){return en},getSynchronizationItems:function(){return Xt},getSynchronizationItemsFor:function(){return Jt},isOfflineUuid:function(){return sn},messageOmrsServiceWorker:function(){return E},offlineUuidPrefix:function(){return li},omrsOfflineCachingStrategyHttpHeaderName:function(){return Nn},omrsOfflineResponseBodyHttpHeaderName:function(){return Mn},omrsOfflineResponseStatusHttpHeaderName:function(){return Rn},putDynamicOfflineData:function(){return mn},putDynamicOfflineDataFor:function(){return gn},queueSynchronizationItem:function(){return $t},queueSynchronizationItemFor:function(){return Yt},registerOfflinePatientHandler:function(){return kn},registerOmrsServiceWorker:function(){return b},removeDynamicOfflineData:function(){return bn},removeDynamicOfflineDataFor:function(){return wn},runSynchronization:function(){return qt},setCurrentOfflineMode:function(){return T},setupDynamicOfflineDataHandler:function(){return pn},setupOfflineSync:function(){return on},syncAllDynamicOfflineData:function(){return _n},syncDynamicOfflineData:function(){return Sn},syncOfflinePatientData:function(){return An}});try{self["workbox:window:6.5.4"]&&_()}catch(e){}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var jn=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},Dn=function(e,t){this.type=e,Object.assign(this,t)},Cn={type:"SKIP_WAITING"},Tn=function(t){var n,r,o=function(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new jn,r.en=new jn,r.on=new jn,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Dn(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Dn("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new Dn("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return v(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Dn("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,u=o.prototype;return u.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return g(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),v(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&i(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new Dn("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},u.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},u.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},u.messageSW=function(t){try{return v(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},u.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,Cn)},u.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},u.bn=function(){try{var e=this;return function(t,n){try{var r=v(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}((function(){return v(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(a=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,a),o}(function(){var e=function(){this.Pn=new Map},t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),In=void 0,Mn="x-omrs-offline-response-body",Rn="x-omrs-offline-response-status",Nn="x-omrs-offline-caching-strategy";function Ln(){return Ln=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){S(i,r,o,a,u,"next",e)}function u(e){S(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){var t,n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){switch(r.label){case 0:return[4,w()];case 1:return(t=r.sent())?[4,t.messageSW(e)]:[3,3];case 2:return n=r.sent(),[3,4];case 3:n={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."},r.label=4;case 4:return[2,n]}}))})),Ln.apply(this,arguments)}function Fn(){return Fn=x((function(){var e;return k(this,(function(t){e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return[2,!0]}return[2,!1]}))})),Fn.apply(this,arguments)}function Bn(){return(Bn=x((function(){return k(this,(function(e){return[2,!window.indexedDB]}))}))).apply(this,arguments)}function Un(){return Un=x((function(){return k(this,(function(e){return[2,new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}}))]}))})),Un.apply(this,arguments)}function Gn(){return(Gn=x((function(){var e,t;return k(this,(function(n){switch(n.label){case 0:return[4,j()];case 1:return(t=n.sent())?[3,3]:[4,P()];case 2:t=n.sent(),n.label=3;case 3:return(e=t)?[3,5]:[4,A()];case 4:e=n.sent(),n.label=5;case 5:return[2,e]}}))}))).apply(this,arguments)}var Kn="openmrs3:offline-mode",Vn="unavailable";function zn(){return(zn=x((function(){return k(this,(function(e){switch(e.label){case 0:return[4,D()];case 1:return e.sent()||(Vn="active"===localStorage.getItem(Kn)?"on":"off"),navigator.onLine,[2]}}))}))).apply(this,arguments)}var Hn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,qn=Object.keys,Wn=Array.isArray;"undefined"==typeof Promise||Hn.Promise||(Hn.Promise=Promise);var Yn=Object.getPrototypeOf,$n={}.hasOwnProperty,Jn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;function Xn(e,t){var n;return Qn(e,t)||(n=Yn(e))&&Xn(n,t)}var Zn=[].slice;function er(e,t){if(R(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=er(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:er(u,t.substr(a+1))}}function tr(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){G("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)tr(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?Wn(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var s=e[a];s&&R(e,a)||(s=e[a]={}),tr(s,u,n)}}else void 0===n?Wn(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var nr=[].concat,rr="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(H([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return Hn[e]})),or=rr.map((function(e){return Hn[e]}));V(rr,(function(e){return[e,!0]}));var ir=null;function ar(e){if(!e||"object"!=typeof e)return e;var t=ir&&ir.get(e);if(t)return t;if(Wn(e)){t=[],ir&&ir.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(ar(e[n]))}else if(or.indexOf(e.constructor)>=0)t=e;else{var o=Yn(e);for(var i in t=o===Object.prototype?{}:Object.create(o),ir&&ir.set(e,t),e)R(e,i)&&(t[i]=ar(e[i]))}return t}var ur={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",cr="symbol"==(void 0===sr?"undefined":h(sr))?function(e){var t;return null!=e&&(t=e[sr])&&t.apply(e)}:function(){return null},lr={},fr="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),hr=function(){return!0},pr=!new Error("").stack;function yr(){if(pr)try{throw yr.arguments,new Error}catch(e){return e}return new Error}var vr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(vr),gr={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"};F(Q).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+J(this._e,2))}},toString:function(){return this.name+": "+this.message}}),F(Z).from(Q),F(ee).from(Q);var br=mr.reduce((function(e,t){return e[t]=t+"Error",e}),{}),wr=Q,_r=mr.reduce((function(e,t){var n=function(e,n){this._e=yr(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=gr[t]||r,this.inner=null)},r=t+"Error";return F(n).from(wr),e[t]=n,e}),{});_r.Syntax=SyntaxError,_r.Type=TypeError,_r.Range=RangeError;var Sr=vr.reduce((function(e,t){return e[t+"Error"]=_r[t],e}),{}),Er=mr.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=_r[t]),e}),{});Er.ModifyError=Z,Er.DexieError=Q,Er.BulkError=ee;var Or={},xr=f("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,Yn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Yn(t),e]}(),3),kr=xr[0],Ar=xr[1],Pr=xr[2],jr=Ar&&Ar.then,Dr=kr&&kr.constructor,Cr=!!Pr,Tr=!1,Ir=Pr?function(){Pr.then(me)}:Hn.setImmediate?setImmediate.bind(null,me):Hn.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){me(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(me,0)},Mr=function(e,t){Vr.push([e,t]),Nr&&(Ir(),Nr=!1)},Rr=!0,Nr=!0,Lr=[],Fr=[],Br=null,Ur=ne,Gr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Re,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Re(e[0],e[1])}catch(e){}}))}},Kr=Gr,Vr=[],zr=0,Hr=[],qr={get:function(){var e=function(e,r){var o=this,i=!t.global&&(t!==Kr||n!==Zr),a=i&&!xe(),u=new le((function(n,u){pe(o,new fe(Ie(e,t,i,a),Ie(r,t,i,a),n,u,t))}));return dr&&ve(u,this),u},t=Kr,n=Zr;return e.prototype=Or,e},set:function(e){L(this,"then",e&&e.prototype===Or?qr:{get:function(){return e},set:qr.set})}};function Wr(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&ge();t&&"function"==typeof t.then?Wr(e,(function(e,n){s(t,le)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,he(e)),n&&be()}}),de.bind(null,e))}catch(t){de(e,t)}}function Yr(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=J(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return dr&&((r=J(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Yr(e._prev,t,n)),t}N(le.prototype,{then:qr,_then:function(e,t){pe(this,new fe(null,null,e,t,Kr))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return s(e,t)?n(e):_e(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):_e(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),_e(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Tr=!0;var e=Yr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Tr=!1}}},timeout:function(e,t){var n=this;return e<1/0?new le((function(r,o){var i=setTimeout((function(){return o(new _r.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&L(le.prototype,Symbol.toStringTag,"Dexie.Promise"),Gr.env=De(),N(le,{all:function(){var e=Y.apply(null,arguments).map(ke);return new le((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return le.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(s(e,le))return e;if(e&&"function"==typeof e.then)return new le((function(t,n){e.then(t,n)}));var t=new le(Or,!0,e);return ve(t,Br),t},reject:_e,race:function(){var e=Y.apply(null,arguments).map(ke);return new le((function(t,n){e.map((function(e){return le.resolve(e).then(t,n)}))}))},PSD:{get:function(){return Kr},set:function(e){return Kr=e}},totalEchoes:{get:function(){return Zr}},newPSD:Ee,usePSD:Ce,scheduler:{get:function(){return Mr},set:function(e){Mr=e}},rejectionMapper:{get:function(){return Ur},set:function(e){Ur=e}},follow:function(e,t){return new le((function(n,r){return Ee((function(t,n){var r=Kr;r.unhandleds=[],r.onunhandled=n,r.finalize=oe((function(){var e=this;!function(e){Hr.push((function t(){e(),Hr.splice(Hr.indexOf(t),1)})),++zr,Mr((function(){0==--zr&&we()}),[])}((function(){0===e.unhandleds.length?t():n(e.unhandleds[0])}))}),r.finalize),e()}),t,n,r)}))}}),Dr&&(Dr.allSettled&&L(le,"allSettled",(function(){var e=Y.apply(null,arguments).map(ke);return new le((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return le.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),Dr.any&&"undefined"!=typeof AggregateError&&L(le,"any",(function(){var e=Y.apply(null,arguments).map(ke);return new le((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return le.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var $r={awaits:0,echoes:0,id:0},Jr=0,Qr=[],Xr=0,Zr=0,eo=0;-1===(""+jr).indexOf("[native code]")&&(Oe=xe=te);var to=le.reject;function no(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Kr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return no(e,t,n,r)}))):to(o)}return o._promise(t,(function(e,t){return Ee((function(){return Kr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return to(new _r.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return to(new _r.DatabaseClosed);e.open().catch(te)}return e._state.dbReadyPromise.then((function(){return no(e,t,n,r)}))}var ro=String.fromCharCode(65535),oo="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",io=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),uo=ao,so=ao,co=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},lo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},fo=function(){function e(){o(this,e)}return a(e,[{key:"_trans",value:function(e,t,n){var r=function(e,n,r){if(!r.schema[i])throw new _r.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)},o=this._tx||Kr.trans,i=this.name,a=ge();try{return o&&o.db===this.db?o===Kr.trans?o._promise(e,r,n):Ee((function(){return o._promise(e,r,n)}),{trans:o,transless:Kr.transless||Kr}):no(this.db,e,[this.name],r)}finally{a&&be()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){var t=function(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}};if("string"==typeof e)return new this.db.WhereClause(this,e);if(Wn(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=qn(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&n.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return n.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==ro)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&dr&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,a=f(n.reduce((function(n,r){var i=f(n,2),a=i[0],u=i[1],s=o[r],c=e[r];return[a||s,a||!s?Ne(u,s&&s.multi?function(e){var n=er(e,r);return Wn(n)&&n.some((function(e){return t(c,e)}))}:function(e){return t(c,er(e,r))}):u]}),[null,null]),2),u=a[0],s=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(s):r?this.filter(s):this.where(n).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,Wn(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(R(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){M(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||Wn(e))return this.where(":id").equals(e).modify(t);var n=er(e,this.schema.primKey.keyPath);if(void 0===n)return to(new _r.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?qn(t).forEach((function(n){tr(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:lo})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new _r.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new _r.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new ee("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function ho(e,t){try{var n=We(e),r=We(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(Ye(e),Ye(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=ho(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var po=function(){function e(){o(this,e)}return a(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,to.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,to.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=Ne(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return He(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&M(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return He(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Ue(n,!0))return r.count({trans:e,query:{index:Ve(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return He(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=function(e,t){var n=a(e,i),r=a(t,i);return n<r?-u:n>r?u:0},r=e.split(".").reverse(),o=r[0],i=r.length-1;function a(e,t){return t?a(e[r[t]],t-1):e[o]}var u="next"===this._ctx.dir?1:-1;return this.toArray((function(e){return e.sort(n)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Ue(n,!0)&&n.limit>0){var r=n.valueMapper,o=Ve(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return He(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Ue(t)?Ke(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):Ke(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ke(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return Ge(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return Ge(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Ne(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Ue(t,!0)&&t.limit>0)return this._read((function(e){var n=Ve(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Ge(this._ctx,(function(e){var t=e.primaryKey.toString(),r=R(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=qn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];er(t,o)!==u&&(tr(t,o,u),n=!0)}return n}}var u=n.table.core,s=u.schema.primaryKey,c=s.outbound,l=s.extractKey,f=t.db._options.modifyChunkSize||200,d=[],h=0,p=[],y=function(e,t){var n=t.failures,r=t.numFailures;h+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,s=qn(n)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;d.push(n[c])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var s=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+s),cache:"immutable"}).then((function(d){for(var h=[],p=[],v=c?[]:null,m=[],g=0;g<s;++g){var b=d[g],w={value:q(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):c||0===ho(l(b),l(w.value))?(p.push(w.value),c&&v.push(t[a+g])):(m.push(t[a+g]),h.push(w.value)))}var _=Ue(n)&&n.limit===1/0&&("function"!=typeof e||e===yo)&&{index:n.index,range:n.range};return Promise.resolve(h.length>0&&u.mutate({trans:r,type:"add",values:h}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);y(h.length,e)}))).then((function(){return(p.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:v,values:p,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return y(p.length,e)}))})).then((function(){return(m.length>0||_&&e===yo)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return y(m.length,e)}))})).then((function(){return t.length>a+s&&i(a+f)}))}))};return i(0).then((function(){if(d.length>0)throw new Z("Error modifying one or more objects",d,h,p);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Ue(e)&&(e.isPrimKey&&!so||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new Z("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(yo)}}]),e}(),yo=function(e,t){return t.value=null},vo=function(){function e(){o(this,e)}return a(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Xe(this):new this.Collection(this,(function(){return tt(e,t,!n,!r)}))}catch(e){return Qe(this,oo)}}},{key:"equals",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return nt(e)}))}},{key:"above",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return tt(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return tt(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Qe(this,"String expected."):this.between(e,e+ro,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):et(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],ro)}},{key:"equalsIgnoreCase",value:function(e){return et(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=Y.apply(lr,arguments);return 0===e.length?Xe(this):et(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=Y.apply(lr,arguments);return 0===e.length?Xe(this):et(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,ro)}},{key:"anyOf",value:function(){var e=this,t=Y.apply(lr,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Qe(this,oo)}if(0===t.length)return Xe(this);var r=new this.Collection(this,(function(){return tt(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=Y.apply(lr,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Qe(this,oo)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=function(e,t){return d(e[0],t[0])},o=this._cmp,i=this._ascending,a=this._descending,u=this._min,s=this._max;if(0===e.length)return Xe(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Qe(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",_r.InvalidArgument);var c,l=!t||!1!==t.includeLowers,f=t&&!0===t.includeUppers,d=i;try{c=e.reduce((function(e,t){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(o(t[0],i[1])<0&&o(t[1],i[0])>0){i[0]=u(i[0],t[0]),i[1]=s(i[1],t[1]);break}}return n===r&&e.push(t),e}),[]),c.sort(r)}catch(e){return Qe(this,oo)}var h=0,p=f?function(e){return i(e,c[h][1])>0}:function(e){return i(e,c[h][1])>=0},y=l?function(e){return a(e,c[h][0])>0}:function(e){return a(e,c[h][0])>=0},v=p,m=new this.Collection(this,(function(){return tt(c[0][0],c[c.length-1][1],!l,!f)}));return m._ondirectionchange=function(e){"next"===e?(v=p,d=i):(v=y,d=a),c.sort(r)},m._addAlgorithm((function(e,t,r){for(var o=e.key;v(o);)if(++h===c.length)return t(r),!1;return!!function(e){return!p(e)&&!y(e)}(o)||(0===n._cmp(o,c[h][1])||0===n._cmp(o,c[h][0])||t((function(){d===i?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),m}},{key:"startsWithAnyOf",value:function(){var e=Y.apply(lr,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Xe(this):this.inAnyRange(e.map((function(e){return[e,e+ro]}))):Qe(this,"startsWithAnyOf() only works with strings")}}]),e}(),mo=Fe(null,"storagemutated"),go=function(){function e(){o(this,e)}return a(e,[{key:"_lock",value:function(){return G(!Kr.global),++this._reculock,1!==this._reculock||Kr.global||(Kr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(G(!Kr.global),0==--this._reculock)for(Kr.global||(Kr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Ce(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&Kr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(G(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new _r.DatabaseClosed(r);case"MissingAPIError":throw new _r.MissingAPI(r.message,r);default:throw new _r.OpenFailed(r)}if(!this.active)throw new _r.TransactionInactive;return G(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Se((function(n){ot(n),t._reject(e.error)})),e.onabort=Se((function(n){ot(n),t.active&&t._reject(new _r.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=Se((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&mo.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return to(new _r.ReadOnly("Transaction is readonly"));if(!this.active)return to(new _r.TransactionInactive);if(this._locked())return new le((function(o,i){r._blockedFuncs.push([function(){r._promise(e,t,n).then(o,i)},Kr])}));if(n)return Ee((function(){var e=new le((function(e,n){r._lock();var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return e.finally((function(){return r._unlock()})),e._lib=!0,e}));var o=new le((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=le.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new le((function(e,r){n.then((function(n){return t._waitingQueue.push(Se(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(Se(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new _r.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(R(t,e))return t[e];var n=this.schema[e];if(!n)throw new _r.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),bo=function(e){try{return e.only([[]]),bo=function(){return[[]]},[[]]}catch(e){return bo=function(){return ro},ro}},wo=0,_o=function(){function e(){o(this,e)}return a(e,[{key:"_parseStoresSpec",value:function(e,t){qn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return it(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Wn(r),0===t)})),o=r.shift();if(o.multi)throw new _r.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new _r.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new _r.Schema("Index must have a name and cannot be an empty string")})),t[n]=ut(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?M(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){M(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,ht(t,[t._allTables,t,t.Transaction.prototype]),dt(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],qn(o),o),t._storeNames=qn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=ce(this._cfg.contentUpgrade||te,e),this}}]),e}();function So(e,t,n,r,o){return le.resolve().then((function(){var i=Kr.transless||Kr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return So(e,t,n,null,o)}))):to(r)}var s,c=fr(o);c&&Oe();var l=le.follow((function(){if(s=o.call(a,a))if(c){var e=xe.bind(null,null);s.then(e,e)}else"function"==typeof s.next&&"function"==typeof s.throw&&(s=Ot(s))}),u);return(s&&"function"==typeof s.then?le.resolve(s).then((function(e){return a.active?e:to(new _r.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return s}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),to(e)}))}))}var Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return l(c({},e),{table:function(t){var n=function(t){var n,r,o=t.query.index;return o.isVirtual?l(c({},t),{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:kt(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:kt(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t},r=e.table(t),o=r.schema,i={},a=[];function u(e,t,n){var r=lt(e),o=i[r]=i[r]||[],s=null==e?0:"string"==typeof e?1:e.length,f=t>0,d=l(c({},n),{isVirtual:f,keyTail:t,keyLength:s,extractKey:st(e),unique:!f&&n.unique});return o.push(d),d.isPrimaryKey||a.push(d),s>1&&u(2===s?e[0]:e.slice(0,s-1),t+1,n),o.sort((function(e,t){return e.keyTail-t.keyTail})),d}var s=u(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[s];var f=!0,d=!1,h=void 0;try{for(var p,y=o.indexes[Symbol.iterator]();!(f=(p=y.next()).done);f=!0){var v=p.value;u(v.keyPath,0,v)}}catch(e){d=!0,h=e}finally{try{f||null==y.return||y.return()}finally{if(d)throw h}}var m=l(c({},r),{schema:l(c({},o),{primaryKey:s,indexes:a,getIndexByKeyPath:function(e){var t=i[lt(e)];return t&&t[0]}}),count:function(e){return r.count(n(e))},query:function(e){return r.query(n(e))},openCursor:function(t){var o=t.query.index,i=o.keyTail,a=o.isVirtual,u=o.keyLength;return a?r.openCursor(n(t)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(kt(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?n.continue(n.key.slice(0,u).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(kt(t,e.MAX_KEY,i),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===u?e[0]:e.slice(0,u)}},value:{get:function(){return n.value}}});return r}(n)})):r.openCursor(t)}});return m}})}};function Oo(e,t,n,r){return n=n||{},r=r||"",qn(e).forEach((function(o){if(R(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=W(i);u!==W(a)?n[r+o]=t[o]:"Object"===u?Oo(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),qn(t).forEach((function(o){R(e,o)||(n[r+o]=t[o])})),n}var xo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return l(c({},e),{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=l(c({},n),{mutate:function(e){var o=function(e){var t=Kr.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?l(c({},e),{keys:o}):c({},e)).type&&(e.values=d(e.values)),e.keys&&(e.keys=d(e.keys)),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((function(i){var a=o.map((function(n,o){var a=i[o],c={onerror:null,onsuccess:null};if("delete"===e.type)u.fire.call(c,n,a,t);else if("add"===e.type||void 0===a){var l=s.fire.call(c,n,e.values[o],t);null==n&&null!=l&&(n=l,e.keys[o]=n,r.outbound||tr(e.values[o],r.keyPath,n))}else{var d=Oo(a,e.values[o]),h=f.fire.call(c,d,n,a,t);if(h){var p=e.values[o];Object.keys(h).forEach((function(e){R(p,e)?p[e]=h[e]:tr(p,e,h[e])}))}}return c}));return n.mutate(e).then((function(t){for(var n=t.failures,r=t.results,u=t.numFailures,s=t.lastResult,c=0;c<o.length;++c){var l=r?r[c]:o[c],f=a[c];null==l?f.onerror&&f.onerror(n[c]):f.onsuccess&&f.onsuccess("put"===e.type&&i[c]?e.values[c]:l)}return{failures:n,results:r,numFailures:u,lastResult:s}})).catch((function(e){return a.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))},i=Kr.trans,a=i.table(t).hook,u=a.deleting,s=a.creating,f=a.updating;switch(e.type){case"add":if(s.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"put":if(s.fire===te&&f.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"delete":if(u.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"deleteRange":if(u.fire===te)break;return i._promise("readwrite",(function(){return function(e){return h(e.trans,e.range,1e4)}(e)}),!0)}return n.mutate(e);function h(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:h(e,l(c({},t),{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},ko={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return l(c({},n),{getMany:function(e){if(!e.cache)return n.getMany(e);var t=At(e.keys,e.trans._cache,"clone"===e.cache);return t?le.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?q(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},Ao=function(e,t){if(!this){var n=new Ao;return e&&"d"in e&&M(n,e),n}M(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Po(e,t,n){var r=ho(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Pt(e))return M(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(ho(n,e.from)<0)return o?Po(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Ct(e);if(ho(t,e.to)>0)return i?Po(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Ct(e);ho(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ho(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&jt(e,o),i&&a&&jt(e,i)}}N(Ao.prototype,u({add:function(e){return jt(this,e),this},addKey:function(e){return Po(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return Po(t,e,e)})),this}},sr,(function(){return Dt(this)})));var jo,Do={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Ao(e.MIN_KEY,e.MAX_KEY);return l(c({},e),{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,s=a.outbound,d=l(c({},o),{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),s=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new Ao)},c=s(""),l=s(":dels"),d=e.type,h=f("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),p=h[0],y=h[1],v=e.trans._cache;return o.mutate(e).then((function(e){if(Wn(p)){"delete"!==d&&(p=e.results),c.addKeys(p);var t=At(p,v);t||"add"===d||l.addKeys(p),(t||y)&&function(e,t,n,r){t.indexes.forEach((function(t){var o=function(e){return null!=e?t.extractKey(e):null},i=e(t.name||""),a=function(e){return t.multiEntry&&Wn(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(n||r).forEach((function(e,t){var i=n&&o(n[t]),u=r&&o(r[t]);0!==ho(i,u)&&(null!=i&&a(i),null!=u&&a(u))}))}))}(s,i,t,y)}else if(p){var r={from:p.lower,to:p.upper};l.add(r),c.add(r)}else c.add(n),l.add(n),i.indexes.forEach((function(e){return s(e.name).add(n)}));return e}))}}),h=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new Ao(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},p={get:function(e){return[a,new Ao(e.key)]},getMany:function(e){return[a,(new Ao).addKeys(e.keys)]},count:h,query:h,openCursor:h};return qn(p).forEach((function(e){d[e]=function(i){var a=Kr.subscr;if(a){var d=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new Ao)},h=d(""),y=d(":dels"),v=f(p[e](i),2),m=v[0],g=v[1];if(d(m.name||"").add(g),!m.isPrimaryKey){if("count"!==e){var b="query"===e&&s&&i.values&&o.query(l(c({},i),{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(s&&i.values)return b.then((function(e){var n=e.result;return h.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?h.addKeys(n):y.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return y.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return y.addKey(e),e}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return t}))}y.add(n)}}return o[e].apply(this,arguments)}})),d}})}},Co=function(){function e(t,n){var r=this;o(this,e),this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=c({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var a=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:te,dbReadyPromise:null,cancelOpen:te,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new le((function(e){s.dbReadyResolve=e})),s.openCanceller=new le((function(e,t){s.cancelOpen=t})),this._state=s,this.name=t,this.on=Fe(this,"populate","blocked","versionchange","close",{ready:[ce,te]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(t){return function(n,o){e.vip((function(){var e=r._state;if(e.openComplete)e.dbOpenError||le.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var i=r;o||t((function e(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,Be(po.prototype,(function(e,t){this.db=u;var n=lo,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==ne?a:null}}))),this.Table=function(e){return Be(fo.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Fe(null,{creating:[ie,te],reading:[re,ne],updating:[ue,te],deleting:[ae,te]})}))}(this),this.Transaction=function(e){return Be(go.prototype,(function(t,n,r,o,i){var a=this;this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Fe(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 le((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),to(e)}))}))}(this),this.Version=function(e){return Be(_o.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Be(vo.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};var o=e._deps.indexedDB;if(!o)throw new _r.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(e,t){return o.cmp(t,e)},this._max=function(e,t){return o.cmp(e,t)>0?e:t},this._min=function(e,t){return o.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=bo(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){r.on("blocked").fire(e),io.filter((function(e){return e.name===r.name&&e!==r&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Eo),this.use(xo),this.use(Do),this.use(ko),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach((function(e){return e(r)}))}return a(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new _r.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new _r.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(pt),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||Kr.letThrough||this._vip)?e():new le((function(e,n){if(t._state.openComplete)return n(new _r.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new _r.DatabaseClosed);t.open().catch(te)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=function(){if(n.openCanceller!==o)throw new _r.DatabaseClosed("db.open() was cancelled")},n=e._state,r=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?to(n.dbOpenError):e}));dr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,a=null,u=!1;return le.race([o,("undefined"==typeof navigator?le.resolve():Et()).then((function(){return new le((function(o,i){if(t(),!r)throw new _r.MissingAPI;var s=e.name,c=n.autoSchema?r.open(s):r.open(s,Math.round(10*e.verno));if(!c)throw new _r.MissingAPI;c.onerror=rt(i),c.onblocked=Se(e._fireOnBlocked),c.onupgradeneeded=Se((function(t){if(a=c.transaction,n.autoSchema&&!e._options.allowEmptyDB){c.onerror=ot,a.abort(),c.result.close();var o=r.deleteDatabase(s);o.onsuccess=o.onerror=Se((function(){i(new _r.NoSuchDatabase("Database ".concat(s," doesnt exist")))}))}else{a.onerror=rt(i);var l=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;u=l<1,e._novip.idbdb=c.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=Kr.transless||Kr;Ee((function(){Kr.trans=i,Kr.transless=u,0===t?(qn(o).forEach((function(e){vt(n,e,o[e].primKey,o[e].indexes)})),ft(e,n),le.follow((function(){return e.on.populate.fire(i)})).catch(a)):function(e,t,n,r){var o=e._novip,i=[],a=o._versions,u=o._dbSchema=gt(0,o.idbdb,r),s=!1;return a.filter((function(e){return e._cfg.version>=t})).forEach((function(e){i.push((function(){var i=u,a=e._cfg.dbschema;bt(o,i,r),bt(o,a,r),u=o._dbSchema=a;var c=yt(i,a);c.add.forEach((function(e){vt(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new _r.Upgrade("Not yet support for changing primary key");var t=r.objectStore(e.name);e.add.forEach((function(e){return mt(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),mt(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=e._cfg.contentUpgrade;if(l&&e._cfg.version>t){ft(o,r),n._memoizedTables={},s=!0;var f=z(a);c.del.forEach((function(e){f[e]=i[e]})),ht(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],qn(f),f),n.schema=f;var d,h=fr(l);h&&Oe();var p=le.follow((function(){if((d=l(n))&&h){var e=xe.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?le.resolve(d):p.then((function(){return d}))}})),i.push((function(t){s&&uo||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(n){return null==e[n]&&t.db.deleteObjectStore(n)}))}(e._cfg.dbschema,t),ht(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function e(){return i.length?le.resolve(i.shift()(n.idbtrans)).then(e):le.resolve()}().then((function(){var e,t;t=r,qn(e=u).forEach((function(n){t.db.objectStoreNames.contains(n)||vt(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,l/10,a,i)}}),i),c.onsuccess=Se((function(){a=null;var t,r=e._novip.idbdb=c.result,i=B(r.objectStoreNames);if(i.length>0)try{var l=r.transaction(1===(t=i).length?t[0]:t,"readonly");n.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=gt(0,t,n);r._storeNames=B(t.objectStoreNames,0),dt(r,[r._allTables],qn(o),o)}(e,r,l):(bt(e,e._dbSchema,l),function(e,t){var n=yt(gt(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((function(e){return e.add.length||e.change.length})))}(e,l)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ft(e,l)}catch(e){}io.push(e),r.onversionchange=Se((function(t){n.vcFired=!0,e.on("versionchange").fire(t)})),r.onclose=Se((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!_t(n)&&"__dbnames"!==t&&wt(n,r).put({name:t}).catch(te)}(e._deps,s),o()}),i)}))}))]).then((function(){return t(),n.onReadyBeingFired=[],le.resolve(St((function(){return e.on.ready.fire(e.vip)}))).then((function t(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ce,te);return n.onReadyBeingFired=[],le.resolve(St((function(){return r(e.vip)}))).then(t)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return e})).catch((function(t){n.dbOpenError=t;try{a&&a.abort()}catch(e){}return o===n.openCanceller&&e._close(),to(t)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=io.indexOf(this);if(t>=0&&io.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new le((function(t){e.dbReadyResolve=t})),e.openCanceller=new le((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new _r.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new le((function(r,o){var i=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=Se((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!_t(n)&&"__dbnames"!==t&&wt(n,r).delete(t).catch(te)}(e._deps,e.name),r()})),t.onerror=rt(o),t.onblocked=e._fireOnBlocked};if(t)throw new _r.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return qn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=xt.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=Kr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=s(e,r.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new _r.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new _r.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new _r.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):to(e)}var c=So.bind(null,this,i,a,o,n);return o?o._promise(i,c,"lock"):Kr.trans?Ce(Kr.transless,(function(){return r._whenReady(c)})):this._whenReady(c)}},{key:"table",value:function(e){if(!R(this._allTables,e))throw new _r.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),To="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Io=function(){function e(t){o(this,e),this._subscribe=t}return a(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:To,value:function(){return this}}]),e}();try{jo={indexedDB:Hn.indexedDB||Hn.mozIndexedDB||Hn.webkitIndexedDB||Hn.msIndexedDB,IDBKeyRange:Hn.IDBKeyRange||Hn.webkitIDBKeyRange}}catch(r){jo={indexedDB:null,IDBKeyRange:null}}var Mo=Co;N(Mo,l(c({},Er),{delete:function(e){return new Mo(e,{addons:[]}).delete()},exists:function(e){return new Mo(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return _t(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):wt(t,n).toCollection().primaryKeys()}(Mo.dependencies).then(e)}catch(e){return to(new _r.MissingAPI)}},defineClass:function(){return function(e){M(this,e)}},ignoreTransaction:function(e){return Kr.trans?Ce(Kr.transless,e):e()},vip:St,async:function(e){return function(){try{var t=Ot(e.apply(this,arguments));return t&&"function"==typeof t.then?t:le.resolve(t)}catch(e){return to(e)}}},spawn:function(e,t,n){try{var r=Ot(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:le.resolve(r)}catch(e){return to(e)}},currentTransaction:{get:function(){return Kr.trans||null}},waitFor:function(e,t){var n=le.resolve("function"==typeof e?Mo.ignoreTransaction(e):e).timeout(t||6e4);return Kr.trans?Kr.trans.waitFor(n):n},Promise:le,debug:{get:function(){return dr},set:function(e){$(e,"dexie"===e?function(){return!0}:co)}},derive:F,extend:M,props:N,override:U,Events:Fe,on:mo,liveQuery:function(e){return new Io((function(t){var n=function(){return qn(a).some((function(e){return i[e]&&function(e,t){var n=Dt(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=Dt(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(ho(u.from,o.to)<=0&&ho(u.to,o.from)>=0)return!0;ho(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=fr(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var s=!1,c=!1,l=function(e){It(i,e),n()&&f()},f=function(){if(!s&&!o){i={};var d={},h=function(t){r&&Oe();var n=function(){return Ee(e,{subscr:t,trans:null})},o=Kr.trans?Ce(Kr.transless,n):n();return r&&o.then(xe,xe),o}(d);c||(mo("storagemutated",l),c=!0),s=!0,Promise.resolve(h).then((function(e){s=!1,o||(n()?f():(i={},a=d,t.next&&t.next(e)))}),(function(e){s=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:It,getByKeyPath:er,setByKeyPath:tr,delByKeyPath:function(e,t){"string"==typeof t?tr(e,t,void 0):"length"in t&&[].map.call(t,(function(t){tr(e,t,void 0)}))},shallowClone:z,deepClone:q,getObjectDiff:Oo,cmp:ho,asap:K,minKey:-1/0,addons:[],connections:io,errnames:br,dependencies:jo,semVer:"3.2.3",version:"3.2.3".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),Mo.maxKey=bo(Mo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(e){var t;Ro||(ao?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),Ro=!0,dispatchEvent(t),Ro=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;Ro||Mt(t)})));var Ro=!1;if("undefined"!=typeof BroadcastChannel){var No=new BroadcastChannel("x-storagemutated-1");"function"==typeof No.unref&&No.unref(),mo("storagemutated",(function(e){Ro||No.postMessage(e)})),No.onmessage=function(e){e.data&&Mt(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(e){try{Ro||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&d(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Mt(t.changedParts)}}));var Lo=self.document&&navigator.serviceWorker;Lo&&Lo.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Mt(t.changedParts)}))}le.rejectionMapper=function(e,t){if(!e||s(e,Q)||s(e,TypeError)||s(e,SyntaxError)||!e.name||!Sr[e.name])return e;var n=new Sr[e.name](t||e.message,e);return"stack"in e&&L(n,"stack",{get:function(){return this.inner.stack}}),n},$(dr,co);var Fo=p(766),Bo=p(685);function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Uo(e)}function Go(e,t){return Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Go(e,t)}var Ko=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Go(e,t)}(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uo(e);if(t){var o=Uo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":h(n))&&"function"!=typeof t?Rt(e):t;var n}(this,n)}}(n);function n(){var e;return function(e,t){if(!s(e,t))throw new TypeError("Cannot call a class as a function")}(this,n),Nt(Rt(e=t.call(this,"EsmOffline")),"syncQueue",void 0),Nt(Rt(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}(Co),Vo=new Ko,zo={},Ho=(0,Bo.createGlobalStore)("offline-synchronization",{});function qo(){return qo=Ut((function(){var e,t,n,r,o,i,a,u,s,c,l,f,d;return zt(this,(function(h){switch(h.label){case 0:return Ho.getState().synchronization?[2]:[4,Vo.syncQueue.count()];case 1:e=h.sent(),t={},n=Object.entries(zo),r=n.length,o={},i=new AbortController,a=function(){var e,t,n=Ho.getState().synchronization;Ho.setState({synchronization:(e=Kt({},n),t={pendingCount:n.pendingCount-1},t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e)})},h.label=2;case 2:h.trys.push([2,,10,11]),Ho.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}}),u=0,h.label=3;case 3:if(!(u<r&&n.length>0))return[3,8];s=n.length,h.label=4;case 4:return s--?(c=Vt(n[s],2),l=c[0],f=c[1],(d=f.dependsOn.map((function(e){return t[e]}))).every(Boolean)?(o[l]={},[4,Promise.all(d)]):[3,6]):[3,7];case 5:h.sent(),t[l]=function(e,t,n,r){return Wo.apply(this,arguments)}(f,o,i,a),n.splice(s,1),h.label=6;case 6:return[3,4];case 7:return u++,[3,3];case 8:return[4,Promise.allSettled(Object.values(t))];case 9:return h.sent(),[3,11];case 10:return Ho.setState({synchronization:void 0}),[7];case 11:return[2]}}))})),qo.apply(this,arguments)}function Wo(){return Wo=Ut((function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h,p,y,v,m,g,b,w;return zt(this,(function(_){switch(_.label){case 0:return o=e.type,i=e.dependsOn,a=e.process,u=[],s=[],[4,Wt()];case 1:return c=_.sent(),[4,Vo.syncQueue.where({type:o,userId:c}).each((function(e,t){u.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)}))];case 2:_.sent(),l=0,_.label=3;case 3:if(!(l<u.length))return[3,11];f=Vt(u[l],3),d=f[0],h=f[1],p=f[2],y=p.id,v=p.dependencies,m=void 0===v?[]:v,_.label=4;case 4:return _.trys.push([4,7,9,10]),[4,a(h,{abort:n,index:l,items:s,userId:c,dependencies:m.map((function(e){var n=e.id,r=e.type;return i.includes(r)?t[r][n]:void 0}))})];case 5:return g=_.sent(),void 0!==y&&(t[o][y]=g),[4,Vo.syncQueue.delete(d)];case 6:return _.sent(),[3,10];case 7:return b=_.sent(),[4,Vo.syncQueue.update(d,{lastError:{name:null==b?void 0:b.name,message:null!==(w=null==b?void 0:b.message)&&void 0!==w?w:null==b?void 0:b.toString()}})];case 8:return _.sent(),[3,10];case 9:return r(),[7];case 10:return l++,[3,3];case 11:return[2]}}))})),Wo.apply(this,arguments)}function Yo(){return(Yo=Ut((function(){var e;return zt(this,(function(t){switch(t.label){case 0:return[4,(0,Fo.getLoggedInUser)()];case 1:return[2,(null==(e=t.sent())?void 0:e.uuid)||"*"]}}))}))).apply(this,arguments)}function $o(){return($o=Ut((function(e,t,n,r){var o;return zt(this,(function(i){switch(i.label){case 0:return void 0===(o=r&&r.id)?[3,2]:[4,Vo.syncQueue.where({type:t,userId:e}).filter((function(e){return(null==e?void 0:e.descriptor.id)===o})).delete().catch(Co.errnames.DatabaseClosed)];case 1:i.sent(),i.label=2;case 2:return[4,Vo.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(Co.errnames.DatabaseClosed,(function(){return-1}))];case 3:return[2,i.sent()]}}))}))).apply(this,arguments)}function Jo(){return(Jo=Ut((function(e,t,n){return zt(this,(function(r){switch(r.label){case 0:return[4,Wt()];case 1:return[4,Yt(r.sent(),e,t,n)];case 2:return[2,r.sent()]}}))}))).apply(this,arguments)}function Qo(){return(Qo=Ut((function(e,t){return zt(this,(function(n){switch(n.label){case 0:return[4,Qt(e,t)];case 1:return[2,n.sent().map((function(e){return e.content}))]}}))}))).apply(this,arguments)}function Xo(){return(Xo=Ut((function(e,t){var n;return zt(this,(function(r){switch(r.label){case 0:return n=t?{type:t,userId:e}:{userId:e},[4,Vo.syncQueue.where(n).toArray().catch(Co.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function Zo(){return(Zo=Ut((function(e){return zt(this,(function(t){switch(t.label){case 0:return[4,Wt()];case 1:return[4,Jt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ei(){return(ei=Ut((function(e){return zt(this,(function(t){switch(t.label){case 0:return[4,Wt()];case 1:return[4,Qt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ti(){return(ti=Ut((function(e){return zt(this,(function(t){switch(t.label){case 0:return[4,Vo.syncQueue.get(e).catch(Co.errnames.DatabaseClosed,(function(){}))];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function ni(){return(ni=Ut((function(e){var t,n,r;return zt(this,(function(o){switch(o.label){case 0:return[4,en(e)];case 1:if(!(n=o.sent()))throw new Error("No sync item with the ID ".concat(e," exists."));if(!(r=null===(t=zo[n.type])||void 0===t?void 0:t.options.onBeginEditSyncItem))throw new Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(n.type,'" supports editing items.'));return r(n),[2]}}))}))).apply(this,arguments)}function ri(){return(ri=Ut((function(e){return zt(this,(function(t){switch(t.label){case 0:return[4,Vo.syncQueue.delete(e).catch(Co.errnames.DatabaseClosed)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}for(var oi,ii={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},ai=new Uint8Array(16),ui=[],si=0;si<256;++si)ui.push((si+256).toString(16).slice(1));var ci=function(e,t,n){if(ii.randomUUID&&!t&&!e)return ii.randomUUID();var r=(e=e||{}).random||(e.rng||an)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ui[e[t+0]]+ui[e[t+1]]+ui[e[t+2]]+ui[e[t+3]]+"-"+ui[e[t+4]]+ui[e[t+5]]+"-"+ui[e[t+6]]+ui[e[t+7]]+"-"+ui[e[t+8]]+ui[e[t+9]]+"-"+ui[e[t+10]]+ui[e[t+11]]+ui[e[t+12]]+ui[e[t+13]]+ui[e[t+14]]+ui[e[t+15]]}(r)},li="OFFLINE+",fi={};function di(){return(di=fn((function(e){return dn(this,(function(t){switch(t.label){case 0:return[4,En()];case 1:return[4,vn(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function hi(){return(hi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return n=t?{type:t,users:e}:{users:e},[4,(new Ko).dynamicOfflineData.where(n).toArray().catch(Co.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function pi(){return(pi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,gn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function yi(){return yi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new Ko).dynamicOfflineData.get({type:t,identifier:n}).catch(Co.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?[3,3]:[4,r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(Co.errnames.DatabaseClosed)];case 2:return i.sent(),[3,5];case 3:return o.users.includes(e)?[3,5]:[4,r.dynamicOfflineData.update(o.id,{users:(a=o.users,function(e){if(Array.isArray(e))return cn(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])}).catch(Co.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}var a}))})),yi.apply(this,arguments)}function vi(){return(vi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,wn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function mi(){return mi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new Ko).dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(Co.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?o.users.length>1?[4,r.dynamicOfflineData.update(o.id,{users:o.users.filter((function(t){return t!==e}))}).catch(Co.errnames.DatabaseClosed)]:[3,3]:[3,5];case 2:return i.sent(),[3,5];case 3:return[4,r.dynamicOfflineData.delete(o.id).catch(Co.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}}))})),mi.apply(this,arguments)}function gi(){return gi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return[4,yn(e)];case 1:return n=r.sent(),[4,Promise.all(n.map((o=fn((function(e){return dn(this,(function(n){return[2,Sn(e.type,e.identifier,t)]}))})),function(e){return o.apply(this,arguments)})))];case 2:return r.sent(),[2]}var o}))})),gi.apply(this,arguments)}function bi(){return bi=fn((function(e,t,n){var r,o,i,a,u,s,c,l,f;return dn(this,(function(d){switch(d.label){case 0:return[4,mn(e,t)];case 1:return d.sent(),r=new Ko,[4,En()];case 2:return o=d.sent(),[4,r.dynamicOfflineData.get({type:e,identifier:t}).catch(Co.errnames.DatabaseClosed,(function(){}))];case 3:return i=d.sent(),a=hn().filter((function(t){return t.type===e})),i?[4,Promise.all(a.map((h=fn((function(e){var r,o,i;return dn(this,(function(a){try{return e.sync(t,n),[2,{id:e.id,error:void 0}]}catch(t){return i=null!==(o=null===(r=t.message)||void 0===r?void 0:r.toString())&&void 0!==o?o:t.toString(),[2,{id:e.id,error:i}]}return[2]}))})),function(e){return h.apply(this,arguments)})))]:[2];case 4:return u=d.sent(),s=u.filter((function(e){return!e.error})).map((function(e){return e.id})),c=u.filter((function(e){return e.error})).map((function(e){return e.id})),l=u.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),f={syncedOn:new Date,syncedBy:o,succeededHandlers:s,erroredHandlers:c,errors:l},i.id?[4,r.dynamicOfflineData.update(i.id,{syncState:f}).catch(Co.errnames.DatabaseClosed)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2]}var h}))})),bi.apply(this,arguments)}function wi(){return(wi=fn((function(){var e;return dn(this,(function(t){switch(t.label){case 0:return[4,(0,Fo.getLoggedInUser)()];case 1:if(!(e=t.sent().uuid))throw new Error("Using the dynamic offline data API requires a logged in user.");return[2,e]}}))}))).apply(this,arguments)}var _i=(0,Bo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function Si(){return Si=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){On(i,r,o,a,u,"next",e)}function u(e){On(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return Pn(),[4,Sn("patient",e)];case 1:return t.sent(),[2]}}))})),Si.apply(this,arguments)}}(),y}())}}}))},7837:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,s,"next",e)}function s(e){o(a,r,i,u,s,"throw",e)}u(void 0)}))}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function h(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function p(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}e=n.nmd(e),System.register(["react","@openmrs/esm-navigation","@openmrs/esm-extensions","@openmrs/esm-api","react-dom","react-i18next","swr","@openmrs/esm-context","@openmrs/esm-utils","@openmrs/esm-config","@openmrs/esm-globals","@openmrs/esm-feature-flags","dayjs"],(function(r,o){var a={},h={},v={},m={},g={},b={},w={},_={},S={},E={},O={},x={},k={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(g,"__esModule",{value:!0}),{setters:[function(e){Object.keys(e).forEach((function(t){a[t]=e[t]}))},function(e){h.interpolateUrl=e.interpolateUrl,h.navigate=e.navigate},function(e){v.getExtensionInternalStore=e.getExtensionInternalStore,v.getExtensionStore=e.getExtensionStore,v.registerExtensionSlot=e.registerExtensionSlot,v.renderExtension=e.renderExtension},function(e){m.attachmentUrl=e.attachmentUrl,m.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,m.fetchCurrentPatient=e.fetchCurrentPatient,m.getCurrentUser=e.getCurrentUser,m.getLocations=e.getLocations,m.getSessionStore=e.getSessionStore,m.getVisitStore=e.getVisitStore,m.getVisitTypes=e.getVisitTypes,m.makeUrl=e.makeUrl,m.openmrsFetch=e.openmrsFetch,m.restBaseUrl=e.restBaseUrl,m.userHasAccess=e.userHasAccess},function(e){Object.keys(e).forEach((function(t){g[t]=e[t]}))},function(e){b.I18nextProvider=e.I18nextProvider},function(e){w.SWRConfig=e.SWRConfig,w.default=e.default},function(e){_.registerContext=e.registerContext,_.subscribeToContext=e.subscribeToContext,_.unregisterContext=e.unregisterContext,_.updateContext=e.updateContext},function(e){S.isOnline=e.isOnline,S.shallowEqual=e.shallowEqual},function(e){E.getConfigStore=e.getConfigStore,E.getExtensionConfigFromStore=e.getExtensionConfigFromStore,E.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){O.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){x.featureFlagsStore=e.featureFlagsStore},function(e){k.default=e.default}],execute:function(){r(function(){var r={332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},645:function(e,t,n){"use strict";var r=n(493);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},385:function(){System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(t,n){if(t){if("string"==typeof t)return e(t,3);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){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()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},173:function(e,t,n){"use strict";var r=function(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}},o=n(954),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useState,u=o.useEffect,s=o.useLayoutEffect,c=o.useDebugValue,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),o=a({inst:{value:n,getSnapshot:t}}),i=o[0].inst,l=o[1];return s((function(){i.value=n,i.getSnapshot=t,r(i)&&l({inst:i})}),[e,n,t]),u((function(){return r(i)&&l({inst:i}),e((function(){r(i)&&l({inst:i})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:l},374:function(e,t,n){"use strict";e.exports=n(173)},766:function(e){"use strict";e.exports=m},824:function(e){"use strict";e.exports=E},743:function(e){"use strict";e.exports=_},45:function(e){"use strict";e.exports=v},708:function(e){"use strict";e.exports=x},728:function(e){"use strict";e.exports=O},513:function(e){"use strict";e.exports=h},618:function(e){"use strict";e.exports=S},688:function(e){"use strict";e.exports=k},954:function(e){"use strict";e.exports=a},493:function(e){"use strict";e.exports=g},281:function(e){"use strict";e.exports=b},725:function(e){"use strict";e.exports=w}},o={};function A(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e].call(n.exports,n,n.exports,A),n.exports}A.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return A.d(t,{a:t}),t},A.d=function(e,t){for(var n in t)A.o(t,n)&&!A.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},A.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},A.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var P={};return function(){"use strict";var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(e){var t=e.to,n=e.templateParams,o=e.onBeforeNavigate,i=e.children,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","onBeforeNavigate","children"]);return(0,it.useEffect)((function(){a.href&&console.warn("ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '".concat(a.href,"'")),a.onClick&&console.warn("ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ".concat(t))}),[]),it.default.createElement("a",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}({onClick:function(e){return function(e,t,n,r){0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||(e.preventDefault(),null==r||r(e),(0,ut.navigate)({to:t,templateParams:n})),0===e.button&&(e.ctrlKey||e.metaKey)&&(null==r||r(e)),0===e.button&&e.shiftKey&&(null==r||r(e)),1===e.button&&(null==r||r(e))}(e,t,n,o)},href:(0,ut.interpolateUrl)(t,n)},a),i)},a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},h=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e},m=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},g=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},b=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){g(e,t,n[t])}))}return e},w=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},_=function(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},S=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}},E=function(e,t){var n=function(n){r[n]=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];e.setState((function(e){var r,i=[e].concat(_(o));return(r=t)[n].apply(r,_(i))}))}};"function"==typeof t&&(t=t(e));var r={};for(var o in t)n(o);return r},O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft(),n=arguments.length>2?arguments[2]:void 0,r=w((0,it.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];return(0,it.useEffect)((function(){return(0,lt.subscribeTo)(e,t,i)}),[e,t]),b({},o,(0,it.useMemo)((function(){return n?E(e,n):{}}),[e,n]))},x=function(e,t){return O(e,ft(),t)},k=function(e){return function(t){var n=w((0,it.useState)(e.getState()),2),r=n[0],o=n[1];return(0,it.useEffect)((function(){return e.subscribe((function(e){return o(e)}))}),[]),b({},r,(0,it.useMemo)((function(){return t?E(e,t):{}}),[t]))}},j=function(e){var t,n=dt(e);return null!==(t=null==n?void 0:n.assignedExtensions)&&void 0!==t?t:[]},D=function(e){var t=(0,it.useContext)(at).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,it.useEffect)((function(){(0,st.registerExtensionSlot)(t,e)}),[]),{extensions:j(e),extensionSlotName:e,extensionSlotModuleName:t}},C=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},T=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){C(e,t,n[t])}))}return e},I=function(e){return e},M=function(e){var t=e.name,n=e.extensionSlotName,r=e.select,o=void 0===r?I:r,i=e.children,a=e.state,u=e.style,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["name","extensionSlotName","select","children","state","style"]);if(i&&a)throw new Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");var c,l,f,d,h=null!=t?t:n,p=(0,it.useRef)(null),y=D(h),v=y.extensions,m=y.extensionSlotModuleName,g=(0,it.useMemo)((function(){return o(v)}),[o,v]),b=(0,it.useMemo)((function(){if("function"==typeof i&&!it.default.isValidElement(i))return g.map((function(e){return i(e,a)}))}),[i,g]);return it.default.createElement("div",T({ref:p,"data-extension-slot-name":h,"data-extension-slot-module-name":m,style:(f=T({},u),d={position:"relative"},d=null!=d?d:{},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(d)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(d)).forEach((function(e){Object.defineProperty(f,e,Object.getOwnPropertyDescriptor(d,e))})),f)},s),h&&(null==g?void 0:g.map((function(e,t){return it.default.createElement(at.Provider,{key:e.id,value:{moduleName:m,featureName:"",extension:{extensionId:e.id,extensionSlotName:h,extensionSlotModuleName:m}}},null!==(l=null!==(c=null==b?void 0:b[t])&&void 0!==c?c:"function"!=typeof i?i:null)&&void 0!==l?l:it.default.createElement(ct,{state:a}))}))))},R=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},N=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},L=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},F=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},B=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(mt(n)));return function(){var e=n(t);if(!u(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(mt(e)));return e}},U=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},G=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=q(e,t,(function(){n(this)})),i=B(e,t)(),a=function(e){var t=e.renderType,n=e.elementToRender,r=e.domElement,o=e.reactDom[t];if("function"!=typeof o)throw new Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:z(e),renderType:H(e)});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},K=function(e,t){return new Promise((function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():z(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},V=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=q(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=B(e,t)();z(e).render(r,i)}}))},z=function(e){return e.ReactDOMClient||e.ReactDOM},H=function(e){return"function"==typeof e.renderType?e.renderType():e.renderType},q=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=gt?e.React.createElement(gt.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,L(L({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)},W=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},Ot,e);return function(e){var n,r,o,i;return r=n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Et(e,t)}(i,n);var r,o=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=St(e);if(t){var o=St(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":d(n))&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}(i);function i(e){var n;return function(e,t){if(!u(e,t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}},n}return(r=[{key:"componentDidCatch",value:function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})}},{key:"render",value:function(){if(this.state.caughtError)return it.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=it.default.createElement(it.Suspense,{fallback:null},it.default.createElement(_t.SWRConfig,{value:xt},it.default.createElement(at.Provider,{value:this.state.config},t.disableTranslations?it.default.createElement(e,this.props):it.default.createElement(wt.I18nextProvider,{i18n:window.i18next,defaultNS:this.props._extensionContext?"".concat(t.moduleName,"___").concat(this.props._extensionContext.extensionSlotName,"___").concat(this.props._extensionContext.extensionId):t.moduleName},it.default.createElement(e,this.props)))));return t.strictMode&&it.default.StrictMode?it.default.createElement(it.default.StrictMode,null,n):n}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(i.prototype,r),i}(it.default.Component),o="displayName",i="OpenmrsReactComponent(".concat(t.featureName,")"),o in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,n}},Y=function(e,t){return function(e){if("object"!==vt(e))throw new Error("single-spa-react requires a configuration object");var t,n=L(L({},bt),e);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!==(t=n.ReactDOMClient)&&void 0!==t&&t.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");!gt&&n.React.createContext&&(gt=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:U.bind(null,n),mount:G.bind(null,n),unmount:K.bind(null,n)};return n.parcelCanUpdate&&(r.update=V.bind(null,n)),r}({React:it.default,ReactDOMClient:yt,rootComponent:W(t)(e)})},$=function(e,t){return function(){return e().then((function(e){return Y(e.default,t)}))}},J=function(e,t){return function(){return Promise.resolve(Y(e,t))}},Q=function(e,t){var n=(0,it.useRef)(null!=t?t:{}),r=(0,it.useRef)((function(t){return(0,At.updateContext)(e,t)}));return(0,it.useEffect)((function(){return(0,At.registerContext)(e,null!=t?t:{}),function(){(0,At.unregisterContext)(e)}}),[e]),(0,it.useEffect)((function(){var r=null!=t?t:{};(0,Pt.shallowEqual)(n.current,r)||((0,At.updateContext)(e,(function(){return r})),n.current=r)}),[t]),r.current},X=function(e){return Q(e.namespace,e.value),null},Z=function(){var e=(0,it.useRef)();return e.current&&!e.current.signal.aborted||(e.current=new AbortController),(0,it.useEffect)((function(){var t=e.current;return function(){return null==t?void 0:t.abort()}}),[]),e.current},ee=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},te=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return null!=e?e:{}},r=function(e){if(Array.isArray(e))return e}(t=(0,it.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return ee(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];return(0,it.useEffect)((function(){if(null==e||""===e.replace(" ",""))throw new Error('The namespace supplied to useAppContext must be a non-empty string, but was "'.concat(e,'".'))}),[e]),(0,it.useEffect)((function(){return(0,At.subscribeToContext)(e,(function(e){if(void 0!==e){var t=n?n(e):null!=e?e:{};(0,Pt.shallowEqual)(o,t)||i(t)}}))}),[]),o},ne=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},re=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},oe=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},ie=function(e){var t=this.__data__=new Rt(e);this.size=t.size},ae=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new hn;++t<n;)this.add(e[t])},ue=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},se=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,it.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return ue(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,it.useEffect)((function(){return(0,st.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];xr(a,r)||o(a)}))}),[]),r},ce=function(e,t){var n,r=(0,_t.default)("".concat(ht.attachmentUrl,"?patient=").concat(e,"&includeEncounterless=").concat(t),ht.openmrsFetch),o=r.data,i=r.error,a=r.mutate,u=r.isLoading,s=r.isValidating;return(0,it.useMemo)((function(){return{isLoading:u,data:null!==(n=null==o?void 0:o.data.results)&&void 0!==n?n:[],error:i,mutate:a,isValidating:s}}),[o,i,u,s,a])},le=function(e){(0,it.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},fe=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},de=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},he=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){de(e,t,n[t])}))}return e},pe=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},ye=function(e){var t,n=(0,it.useContext)(at),r=n.moduleName,o=n.extension,i=null!==(t=null==e?void 0:e.externalModuleName)&&void 0!==t?t:r;if(!i&&!o)throw Error(Pr);var a=function(e){var t=(0,it.useMemo)((function(){return(0,kr.getConfigStore)(e)}),[e]),n=e,r=function(e){var t=pe((0,it.useState)(function(e){return function(){var t=e.getState();return t.loaded&&t.config?t.config:null}}(e)),2),n=t[0],r=t[1];return(0,it.useEffect)((function(){return null==e?void 0:e.subscribe((function(e){e.loaded&&e.config&&r(e.config)}))}),[e]),n}(t);if(!r)throw Ar[n]||(Ar[n]=function(e){return new Promise((function(t){var n=e.subscribe((function(e){e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),Ar[n];return r}(i),u=function(e){var t=(0,it.useMemo)(kr.getExtensionsConfigStore,[]),n=function(e,t){var n=pe((0,it.useState)(function(e,t){return t?function(){var n=e.getState(),r=(0,kr.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t)),2),r=n[0],o=n[1];return(0,it.useEffect)((function(){if(t)return e.subscribe((function(e){var n=(0,kr.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);n.loaded&&n.config&&!xr(n.config,r)&&o(n.config)}))}),[e,t,r]),r}(t,e);if(!n&&e){var r="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!Ar[r]&&t&&(Ar[r]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,kr.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),Ar[r]}return n||{}}(o);return(0,it.useMemo)((function(){return(null==e?void 0:e.externalModuleName)&&i===e.externalModuleName?he({},a):he({},a,u)}),[i,null==e?void 0:e.externalModuleName,a,u])},ve=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},me=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,it.useState)((0,Pt.isOnline)()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ve(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ve(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,it.useEffect)((function(){return(0,Dr.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},ge=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},be=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,r=function(e){if(Array.isArray(e))return e}(t=(0,it.useState)(e))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return ge(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];return(0,it.useEffect)((function(){var t=setTimeout((function(){i(e)}),n);return function(){clearTimeout(t)}}),[e,n]),o},we=function(e){var t=j(e);return(0,it.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},_e=function(e){var t,n=O(Ir.featureFlagsStore).flags;return(0,it.useEffect)((function(){n[e]||console.error('useFeatureFlag: Attempted to get value of non-existent flag "'.concat(e,'". Did you forget to call registerFeatureFlag?'))}),[n[e]]),null===(t=n[e])||void 0===t?void 0:t.enabled},Se=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ee=function(){var e,t=(e=(0,it.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Se(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return(0,it.useCallback)((function(){t((function(e){return e+1}))}),[])},Oe=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},xe=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}})),e},ke=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,it.useState)(xe))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Oe(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oe(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,it.useEffect)((function(){var e=function(){r(xe())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},Ae=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Pe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=function(e){if(Array.isArray(e))return e}(e=(0,it.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ae(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];return(0,it.useEffect)((function(){var e=(0,ht.getLocations)(t,n).subscribe((function(e){i(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[t,n]),o},je=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,it.useRef)(null);return(0,it.useEffect)((function(){var r=function(r){t&&n.current&&!n.current.contains(r.target)&&e(r)};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),function(){window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}}),[e,t]),n},De=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ce=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.abortController,i=r.fetchInit,a=r.url,u=r.swrConfig,s=Dt(),c=(0,it.useMemo)((function(){return null!==(n=null!==(t=null==i?void 0:i.signal)&&void 0!==t?t:null==o?void 0:o.signal)&&void 0!==n?n:s.signal}),[null==o?void 0:o.signal,null==i?void 0:i.signal,s.signal]),l=(0,it.useCallback)((function(e){var t,n,r=function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;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 ".concat(e,"."))}(e,a);return(0,ht.openmrsFetch)(r,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){De(e,t,n[t])}))}return e}({},i),n=null!=(n={signal:c})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})),t))}),[c,i,a]);return(0,_t.default)(e,l,u)},Te=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ie=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},Me=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,it.useState)(null!=e?e:Ie()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Te(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=(0,_t.default)(r?["patient",r]:null,(function(){return(0,ht.fetchCurrentPatient)(r,{})})),a=i.data,u=i.error,s=i.isValidating;return(0,it.useEffect)((function(){var e=function(){var e=Ie();e!==r&&o(e)};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r]),(0,it.useMemo)((function(){return{isLoading:s&&!u&&!a,patient:a,patientUuid:r,error:u}}),[s,u,a,r])},Re=function(e){var t=D(e),n=t.extensions,r=t.extensionSlotModuleName;return e?n.map((function(t){return function(n){var o=n.state;return it.default.createElement(at.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r}}},it.default.createElement(ct,{state:o}))}})):[]},Ne=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Le=function(){var e,t=(0,it.useRef)(),n=function(e){if(Array.isArray(e))return e}(e=(0,it.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ne(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=null;if(!r){if(gr){var a=(0,ht.getSessionStore)().getState();a.loaded&&(i=a.session)}else gr=new Promise((function(e){var n=function(n){var r=n.loaded,o=n.session;r&&(e(o),i=o,t.current&&t.current(),t.current=void 0)};n((0,ht.getSessionStore)().getState()),i||(t.current=(0,ht.getSessionStore)().subscribe(n))}));if(!i)throw gr;o(i)}(0,it.useEffect)((function(){return t.current||(t.current=(0,ht.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(i=n,o(n))}))),function(){t.current&&t.current(),t.current=void 0}}),[]);var u=r||i;if(!u)throw gr?(console.warn("useSession is in an unexpected state. Attempting to recover."),gr):Error("useSession is in an invalid state.");return u},Fe=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ht.defaultVisitCustomRepresentation,r=O((0,ht.getVisitStore)()),o=r.patientUuid,i=r.manuallySetVisitUuid,a=e&&o==e?i:null,u="?patient=".concat(e,"&v=").concat(n,"&includeInactive=false"),s="/".concat(a,"?v=").concat(n),c=(0,_t.default)(e?"".concat(ht.restBaseUrl,"/visit").concat(u):null,ht.openmrsFetch),l=c.data,f=c.error,d=c.mutate,h=c.isValidating,p=(0,_t.default)(e&&a?"".concat(ht.restBaseUrl,"/visit").concat(s):null,ht.openmrsFetch),y=p.data,v=p.error,m=p.mutate,g=p.isValidating,b=(0,it.useMemo)((function(){return null!==(t=null==l?void 0:l.data.results.find((function(e){return null===e.stopDatetime})))&&void 0!==t?t:null}),[l]),w=(0,it.useMemo)((function(){return a?null==y?void 0:y.data:null!=b?b:null}),[y,b,a]);return{error:f||v,mutate:function(){d(),m()},isValidating:h||g,activeVisit:b,currentVisit:w,currentVisitIsRetrospective:Boolean(a),isLoading:Boolean((!l||a&&!y)&&(!f||!v))}},Be=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ue=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,it.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Be(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Be(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,it.useEffect)((function(){var e=(0,ht.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},Ge=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ke=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr,r=function(e){if(Array.isArray(e))return e}(e=(0,it.useState)(1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ge(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ge(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1],a=(0,it.useMemo)((function(){return"number"==typeof n&&n>0?Math.max(1,Math.ceil(t.length/n)):1}),[t.length,n]),u=(0,it.useMemo)((function(){var e=(o-1)*n,r=(o+0)*n;return t.slice(e,r)}),[t,o,n]),s=(0,it.useCallback)((function(e){i(Math.max(1,Math.min(a,e)))}),[i,a]),c=(0,it.useCallback)((function(){o<a&&i(o+1)}),[o,a,i]),l=(0,it.useCallback)((function(){o>1&&i(o-1)}),[o,i]);return(0,it.useMemo)((function(){return{results:u,totalPages:a,currentPage:o,paginated:t.length>n,showNextButton:o<a,showPreviousButton:o>1,goTo:s,goToNext:c,goToPrevious:l}}),[u,a,t.length,n,o,s,c,l])},Ve=function(){var e="".concat(ht.restBaseUrl,"/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType"),t=(0,_t.default)(e,ht.openmrsFetch),n=t.data,r=t.error,o=t.isLoading;return(0,it.useMemo)((function(){var e,t;return{primaryIdentifierCode:null===(e=null==n||null===(t=n.data)||void 0===t?void 0:t.results[0])||void 0===e?void 0:e.metadataUuid,isLoading:o,error:r}}),[n,r,o])},ze=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},He=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},qe=function(e,t){return We(e,t,Vo,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})},We=function(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=n.getPaginatedUrl,u=n.getTotalCount,s=n.getCurrentPageSize,c=n.getData,l=i.immutable,f=i.swrConfig,d=null!==(r=i.fetcher)&&void 0!==r?r:ht.openmrsFetch,h=function(e){if(Array.isArray(e))return e}(o=(0,it.useState)(1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(e,t){if(e){if("string"==typeof e)return ze(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(e,2):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=h[0],y=h[1],v=(0,it.useRef)(Number.NaN),m=(0,it.useRef)(Number.NaN),g=t,b=(p-1)*t,w=(0,it.useMemo)((function(){return a(e,g,b)}),[e,g,b]),_=(l?Ko:_t.default)(w,d,f),S=_.data,E=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(_,["data"]);(null==S?void 0:S.data)&&(v.current=u(null==S?void 0:S.data),m.current=s(null==S?void 0:S.data));var O=Math.ceil(v.current/t),x=(0,it.useCallback)((function(e){0<e&&e<=O?y(e):console.warn("Invalid attempt to go to out of bounds page: "+e)}),[e,p,O]),k=(0,it.useCallback)((function(){x(p+1)}),[e,p,O]),A=(0,it.useCallback)((function(){x(p-1)}),[e,p,O]);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){He(e,t,n[t])}))}return e}({data:c(null==S?void 0:S.data),totalPages:O,totalCount:v.current,currentPage:p,currentPageSize:m,paginated:O>1,showNextButton:p<O,showPreviousButton:p>1,goTo:x,goToNext:k,goToPrevious:A},E)},Ye=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return We(e,t,$e(),n)},$e=function(){var e,t;return{getPaginatedUrl:function(e,t,n){if(e){var r=new URL((0,ht.makeUrl)(e.toString()),window.location.toString());return r.searchParams.set("_count",""+t),r.searchParams.set("_getpagesoffset",""+n),r.toString()}return null},getNextUrl:function(e){var t,n,r=null===(t=null==e||null===(n=e.link)||void 0===n?void 0:n.find((function(e){return"next"==e.relation})))||void 0===t?void 0:t.url;if(r){var o=new URL(r);return o.host=window.location.host,o.protocol=window.location.protocol,o.toString()}return null},getTotalCount:function(t){return null!==(e=null==t?void 0:t.total)&&void 0!==e?e:Number.NaN},getCurrentPageSize:function(e){var n;return null!==(t=null==e||null===(n=e.entry)||void 0===n?void 0:n.length)&&void 0!==t?t:Number.NaN},getData:function(e){var t;return null==e||null===(t=e.entry)||void 0===t?void 0:t.map((function(e){return e.resource}))}}},Je=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Qe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Je(e,t,n[t])}))}return e},Xe=function(e){return Ze(e,Vo,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},Ze=function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.swrInfiniteConfig,a=o.immutable,u=t.getNextUrl,s=t.getTotalCount,c=t.getData,l=null!==(r=o.fetcher)&&void 0!==r?r:ht.openmrsFetch,f=(0,it.useCallback)((function(n,r){var o;return 0==n?null!==(o=null==e?void 0:e.toString())&&void 0!==o?o:null:t.getNextUrl(r.data)}),[e]),d=Yo(f,l,Qe({},i,a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{})),h=d.data,p=(d.size,d.setSize),y=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(d,["data","size","setSize"]),v=u(null==h?void 0:h[h.length-1].data),m=null!=v,g=s(null==h||null===(n=h[0])||void 0===n?void 0:n.data);return Qe({data:null==h?void 0:h.flatMap((function(e){return c(e.data)})),totalCount:g,hasMore:m,loadMore:function(){var e;p((null!==(e=null==h?void 0:h.length)&&void 0!==e?e:0)+1)},nextUri:v},y)},et=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ze(e,$e(),t)},tt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},nt=function(e){return rt(e,Vo,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},rt=function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Ze(e,t,o),a=i.hasMore,u=i.error,s=i.data,c=i.loadMore,l=i.isLoading,f=i.nextUri;return(0,it.useEffect)((function(){a&&!u&&c()}),[a,f]),o.partialData?i:(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){tt(e,t,n[t])}))}return e}({},i),r=null!=(r={data:a||u?void 0:s,isLoading:l||a})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n)},ot=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return rt(e,$e(),t)};A.r(P),A.d(P,{ComponentContext:function(){return at},ConfigurableLink:function(){return o},Extension:function(){return ct},ExtensionSlot:function(){return M},OpenmrsAppContext:function(){return X},RenderIfValueIsTruthy:function(){return jt},UserHasAccess:function(){return pt},createUseStore:function(){return k},getAsyncExtensionLifecycle:function(){return kt},getAsyncLifecycle:function(){return $},getFhirServerPaginationHandlers:function(){return $e},getLifecycle:function(){return Y},getSyncLifecycle:function(){return J},isDesktop:function(){return Mr},openmrsComponentDecorator:function(){return W},useAbortController:function(){return Z},useAppContext:function(){return te},useAssignedExtensionIds:function(){return se},useAssignedExtensions:function(){return j},useAttachments:function(){return ce},useBodyScrollLock:function(){return le},useConfig:function(){return ye},useConnectedExtensions:function(){return jr},useConnectivity:function(){return me},useDebounce:function(){return be},useDefineAppContext:function(){return Q},useExtensionInternalStore:function(){return Cr},useExtensionSlot:function(){return D},useExtensionSlotMeta:function(){return we},useExtensionSlotStore:function(){return dt},useExtensionStore:function(){return Tr},useFeatureFlag:function(){return _e},useFhirFetchAll:function(){return ot},useFhirInfinite:function(){return et},useFhirPagination:function(){return Ye},useForceUpdate:function(){return Ee},useLayoutType:function(){return ke},useLocations:function(){return Pe},useOnClickOutside:function(){return je},useOpenmrsFetchAll:function(){return nt},useOpenmrsInfinite:function(){return Xe},useOpenmrsPagination:function(){return qe},useOpenmrsSWR:function(){return Ce},usePagination:function(){return Ke},usePatient:function(){return Me},usePrimaryIdentifierCode:function(){return Ve},useRenderableExtensions:function(){return Re},useSession:function(){return Le},useStore:function(){return O},useStoreWithActions:function(){return x},useVisit:function(){return Fe},useVisitTypes:function(){return Ue}});var it=A(954),at=it.default.createContext({moduleName:"",featureName:""}),ut=A(513),st=A(45),ct=function(e){var t,n=e.state,r=e.children,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["state","children"]),i=function(e){if(Array.isArray(e))return e}(t=(0,it.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return a(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=i[0],c=i[1],l=(0,it.useContext)(at).extension,f=(0,it.useRef)(null),d=(0,it.useRef)(Promise.resolve()),h=(0,it.useRef)(!1),p=(0,it.useCallback)((function(e){c(e)}),[c]);return(0,it.useEffect)((function(){if(null!=s&&(null==l?void 0:l.extensionSlotName)&&l.extensionSlotModuleName&&l.extensionSlotModuleName&&!f.current&&!h.current)return h.current=!0,(0,st.renderExtension)(s,l.extensionSlotName,l.extensionSlotModuleName,l.extensionId,void 0,n).then((function(e){f.current=e,h.current=!1})),function(){if(f&&f.current)switch(f.current.getStatus()){case"MOUNTING":f.current.mountPromise.then((function(){var e;"MOUNTED"===(null===(e=f.current)||void 0===e?void 0:e.getStatus())&&f.current.unmount()}));break;case"MOUNTED":f.current.unmount();break;case"UPDATING":d.current&&d.current.then((function(){var e;"MOUNTED"===(null===(e=f.current)||void 0===e?void 0:e.getStatus())&&f.current.unmount()}))}}}),[null==l?void 0:l.extensionSlotName,null==l?void 0:l.extensionId,null==l?void 0:l.extensionSlotModuleName,s]),(0,it.useEffect)((function(){f.current&&f.current.update&&"UNMOUNTING"!==f.current.getStatus()&&Promise.all([f.current.mountPromise,d.current]).then((function(){var e;"MOUNTED"===(null==f||null===(e=f.current)||void 0===e?void 0:e.getStatus())&&f.current.update&&(d.current=f.current.update(v({},n)).catch((function(e){var t,n,r;if(n=e,!(null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):u(n,r))||!e.message.includes("minified message #32")||"MOUNTED"===(null===(t=f.current)||void 0===t?void 0:t.getStatus()))throw e})))}))}),[n]),l?it.default.createElement("div",v({ref:p,"data-extension-id":null==l?void 0:l.extensionId,style:{position:"relative"}},o),r):null},lt=A(385),ft=function(){return function(e){return e}},dt=function(e){return O((0,st.getExtensionStore)(),(function(t){var n;return null===(n=t.slots)||void 0===n?void 0:n[e]}))},ht=A(766),pt=function(e){var t,n=e.privilege,r=e.fallback,o=e.children,i=function(e){if(Array.isArray(e))return e}(t=(0,it.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return R(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],u=i[1];return(0,it.useEffect)((function(){var e=(0,ht.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return e.unsubscribe()}}),[]),a&&(0,ht.userHasAccess)(n,a)?it.default.createElement(it.default.Fragment,null,o):r?it.default.createElement(it.default.Fragment,null,r):null},yt=A(645);function vt(e){return(vt="function"==typeof Symbol&&"symbol"==d(Symbol.iterator)?function(e){return void 0===e?"undefined":d(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":d(e)})(e)}function mt(e){return(mt="function"==typeof Symbol&&"symbol"==d(Symbol.iterator)?function(e){return void 0===e?"undefined":d(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":d(e)})(e)}var gt=null;try{gt=n(6072).createContext()}catch(N){}var bt={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}},wt=A(281),_t=A(725);function St(e){return St=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},St(e)}function Et(e,t){return Et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Et(e,t)}var Ot={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},xt={errorRetryCount:3,fetcher:ht.openmrsFetch,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0},kt=$,At=A(743),Pt=A(618),jt=function(e){var t=e.children,n=e.value,r=e.fallback;return Boolean(n)?it.default.createElement(it.default.Fragment,null,t):r?it.default.createElement(it.default.Fragment,null,r):null},Dt=Z,Ct=function(e,t){return e===t||e!=e&&t!=t},Tt=function(e,t){for(var n=e.length;n--;)if(Ct(e[n][0],t))return n;return-1},It=Array.prototype.splice;ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,n=Tt(t,e);return!(n<0||(n==t.length-1?t.pop():It.call(t,n,1),--this.size,0))},ne.prototype.get=function(e){var t=this.__data__,n=Tt(t,e);return n<0?void 0:t[n][1]},ne.prototype.has=function(e){return Tt(this.__data__,e)>-1},ne.prototype.set=function(e,t){var n=this.__data__,r=Tt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Mt,Rt=ne,Nt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Lt="object"==typeof self&&self&&self.Object===Object&&self,Ft=Nt||Lt||Function("return this")(),Bt=Ft.Symbol,Ut=Object.prototype,Gt=Ut.hasOwnProperty,Kt=Ut.toString,Vt=Bt?Bt.toStringTag:void 0,zt=Object.prototype.toString,Ht=Bt?Bt.toStringTag:void 0,qt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ht&&Ht in Object(e)?function(e){var t=Gt.call(e,Vt),n=e[Vt];try{e[Vt]=void 0;var r=!0}catch(e){}var o=Kt.call(e);return r&&(t?e[Vt]=n:delete e[Vt]),o}(e):function(e){return zt.call(e)}(e)},Wt=function(e){var t=void 0===e?"undefined":d(e);return null!=e&&("object"==t||"function"==t)},Yt=function(e){if(!Wt(e))return!1;var t=qt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},$t=Ft["__core-js_shared__"],Jt=(Mt=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||""))?"Symbol(src)_1."+Mt:"",Qt=Function.prototype.toString,Xt=function(e){if(null!=e){try{return Qt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Zt=/^\[object .+?Constructor\]$/,en=Function.prototype,tn=Object.prototype,nn=en.toString,rn=tn.hasOwnProperty,on=RegExp("^"+nn.call(rn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),an=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Wt(e)||(t=e,Jt&&Jt in t))&&(Yt(e)?on:Zt).test(Xt(e));var t}(n)?n:void 0},un=an(Ft,"Map"),sn=an(Object,"create"),cn=Object.prototype.hasOwnProperty,ln=Object.prototype.hasOwnProperty;re.prototype.clear=function(){this.__data__=sn?sn(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(sn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return cn.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return sn?void 0!==t[e]:ln.call(t,e)},re.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=sn&&void 0===t?"__lodash_hash_undefined__":t,this};var fn=re,dn=function(e,t){var n,r,o=e.__data__;return("string"==(r=d(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};oe.prototype.clear=function(){this.size=0,this.__data__={hash:new fn,map:new(un||Rt),string:new fn}},oe.prototype.delete=function(e){var t=dn(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return dn(this,e).get(e)},oe.prototype.has=function(e){return dn(this,e).has(e)},oe.prototype.set=function(e,t){var n=dn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var hn=oe;ie.prototype.clear=function(){this.__data__=new Rt,this.size=0},ie.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ie.prototype.get=function(e){return this.__data__.get(e)},ie.prototype.has=function(e){return this.__data__.has(e)},ie.prototype.set=function(e,t){var n=this.__data__;if(u(n,Rt)){var r=n.__data__;if(!un||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new hn(r)}return n.set(e,t),this.size=n.size,this};var pn=ie;ae.prototype.add=ae.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ae.prototype.has=function(e){return this.__data__.has(e)};var yn=ae,vn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},mn=function(e,t){return e.has(t)},gn=function(e,t,n,r,o,i){var a=1&n,u=e.length,s=t.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,h=2&n?new yn:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var p=e[f],y=t[f];if(r)var v=a?r(y,p,f,t,e,i):r(p,y,f,e,t,i);if(void 0!==v){if(v)continue;d=!1;break}if(h){if(!vn(t,(function(e,t){if(!mn(h,t)&&(p===e||o(p,e,n,r,i)))return h.push(t)}))){d=!1;break}}else if(p!==y&&!o(p,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},bn=Ft.Uint8Array,wn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},_n=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Sn=Bt?Bt.prototype:void 0,En=Sn?Sn.valueOf:void 0,On=Array.isArray,xn=Object.prototype.propertyIsEnumerable,kn=Object.getOwnPropertySymbols,An=kn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(kn(e),(function(t){return xn.call(e,t)})))}:function(){return[]},Pn=function(e){return null!=e&&"object"==typeof e},jn=function(e){return Pn(e)&&"[object Arguments]"==qt(e)},Dn=Object.prototype,Cn=Dn.hasOwnProperty,Tn=Dn.propertyIsEnumerable,In=jn(function(){return arguments}())?jn:function(e){return Pn(e)&&Cn.call(e,"callee")&&!Tn.call(e,"callee")},Mn=In,Rn=t&&!t.nodeType&&t,Nn=Rn&&e&&!e.nodeType&&e,Ln=Nn&&Nn.exports===Rn?Ft.Buffer:void 0,Fn=(Ln?Ln.isBuffer:void 0)||function(){return!1},Bn=/^(?:0|[1-9]\d*)$/,Un=function(e,t){var n=void 0===e?"undefined":d(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Bn.test(e))&&e>-1&&e%1==0&&e<t},Gn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Kn={};Kn["[object Float32Array]"]=Kn["[object Float64Array]"]=Kn["[object Int8Array]"]=Kn["[object Int16Array]"]=Kn["[object Int32Array]"]=Kn["[object Uint8Array]"]=Kn["[object Uint8ClampedArray]"]=Kn["[object Uint16Array]"]=Kn["[object Uint32Array]"]=!0,Kn["[object Arguments]"]=Kn["[object Array]"]=Kn["[object ArrayBuffer]"]=Kn["[object Boolean]"]=Kn["[object DataView]"]=Kn["[object Date]"]=Kn["[object Error]"]=Kn["[object Function]"]=Kn["[object Map]"]=Kn["[object Number]"]=Kn["[object Object]"]=Kn["[object RegExp]"]=Kn["[object Set]"]=Kn["[object String]"]=Kn["[object WeakMap]"]=!1;var Vn,zn=t&&!t.nodeType&&t,Hn=zn&&e&&!e.nodeType&&e,qn=Hn&&Hn.exports===zn&&Nt.process,Wn=function(){try{return Hn&&Hn.require&&Hn.require("util").types||qn&&qn.binding&&qn.binding("util")}catch(e){}}(),Yn=Wn&&Wn.isTypedArray,$n=Yn?(Vn=Yn,function(e){return Vn(e)}):function(e){return Pn(e)&&Gn(e.length)&&!!Kn[qt(e)]},Jn=Object.prototype.hasOwnProperty,Qn=Object.prototype,Xn=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Zn=Object.prototype.hasOwnProperty,er=function(e){return null!=(t=e)&&Gn(t.length)&&!Yt(t)?function(e,t){var n=On(e),r=!n&&Mn(e),o=!n&&!r&&Fn(e),i=!n&&!r&&!o&&$n(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!Jn.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Un(c,s))||u.push(c);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Qn))return Xn(e);var t,n,r=[];for(var o in Object(e))Zn.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},tr=function(e){return function(e,t,n){var r=t(e);return On(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,er,An)},nr=Object.prototype.hasOwnProperty,rr=an(Ft,"DataView"),or=an(Ft,"Promise"),ir=an(Ft,"Set"),ar=an(Ft,"WeakMap"),ur="[object Map]",sr="[object Promise]",cr="[object Set]",lr="[object WeakMap]",fr="[object DataView]",dr=Xt(rr),hr=Xt(un),pr=Xt(or),yr=Xt(ir),vr=Xt(ar),mr=qt;(rr&&mr(new rr(new ArrayBuffer(1)))!=fr||un&&mr(new un)!=ur||or&&mr(or.resolve())!=sr||ir&&mr(new ir)!=cr||ar&&mr(new ar)!=lr)&&(mr=function(e){var t=qt(e),n="[object Object]"==t?e.constructor:void 0,r=n?Xt(n):"";if(r)switch(r){case dr:return fr;case hr:return ur;case pr:return sr;case yr:return cr;case vr:return lr}return t});var gr,br=mr,wr="[object Arguments]",_r="[object Array]",Sr="[object Object]",Er=Object.prototype.hasOwnProperty,Or=function e(t,n,r,o,i){return t===n||(null==t||null==n||!Pn(t)&&!Pn(n)?t!=t&&n!=n:function(e,t,n,r,o,i){var a=On(e),s=On(t),c=a?_r:br(e),l=s?_r:br(t),f=(c=c==wr?Sr:c)==Sr,d=(l=l==wr?Sr:l)==Sr,h=c==l;if(h&&Fn(e)){if(!Fn(t))return!1;a=!0,f=!1}if(h&&!f)return i||(i=new pn),a||$n(e)?gn(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new bn(e),new bn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ct(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=wn;case"[object Set]":var s=1&r;if(u||(u=_n),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=gn(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(En)return En.call(e)==En.call(t)}return!1}(e,t,c,n,r,o,i);if(!(1&n)){var p=f&&Er.call(e,"__wrapped__"),y=d&&Er.call(t,"__wrapped__");if(p||y){var v=p?e.value():e,m=y?t.value():t;return i||(i=new pn),o(v,m,n,r,i)}}return!!h&&(i||(i=new pn),function(e,t,n,r,o,i){var a=1&n,s=tr(e),c=s.length;if(c!=tr(t).length&&!a)return!1;for(var l=c;l--;){var f=s[l];if(!(a?f in t:nr.call(t,f)))return!1}var d=i.get(e),h=i.get(t);if(d&&h)return d==t&&h==e;var p=!0;i.set(e,t),i.set(t,e);for(var y=a;++l<c;){var v=e[f=s[l]],m=t[f];if(r)var g=a?r(m,v,f,t,e,i):r(v,m,f,e,t,i);if(!(void 0===g?v===m||o(v,m,n,r,i):g)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&u(b,b)&&"function"==typeof w&&u(w,w)||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}(t,n,r,o,e,i))},xr=function(e,t){return Or(e,t)},kr=A(824),Ar={},Pr='No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".',jr=j,Dr=A(728),Cr=k((0,st.getExtensionInternalStore)()),Tr=k((0,st.getExtensionStore)()),Ir=A(708),Mr=function(e){return"small-desktop"===e||"large-desktop"===e},Rr=A(688),Nr=A(332),Lr=A.n(Nr);Rr.default.extend(Lr());var Fr=10,Br=A(374),Ur=function(){},Gr=void 0,Kr=Object,Vr=function(e){return e===Gr},zr=function(e){return"function"==typeof e},Hr=function(e,t){return s({},e,t)},qr=new WeakMap,Wr=0,Yr=function(e){var t,n,r=void 0===e?"undefined":d(e),o=e&&e.constructor,i=o==Date;if(Kr(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=qr.get(e))return t;if(t=++Wr+"~",qr.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=Yr(e[n])+",";qr.set(e,t)}if(o==Kr){t="#";for(var a=Kr.keys(e).sort();!Vr(n=a.pop());)Vr(e[n])||(t+=n+":"+Yr(e[n])+",");qr.set(e,t)}}return t},$r=new WeakMap,Jr={},Qr={},Xr="undefined",Zr=("undefined"==typeof window?"undefined":d(window))!=Xr,eo=("undefined"==typeof document?"undefined":d(document))!=Xr,to=function(e,t){var n=$r.get(e);return[function(){return!Vr(t)&&e.get(t)||Jr},function(r){if(!Vr(t)){var o=e.get(t);t in Qr||(Qr[t]=o),n[5](t,Hr(o,r),o||Jr)}},n[6],function(){return!Vr(t)&&t in Qr?Qr[t]:!Vr(t)&&e.get(t)||Jr}]},no=!0,ro=l(Zr&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ur,Ur],2),oo=ro[0],io=ro[1],ao={isOnline:function(){return no},isVisible:function(){var e=eo&&document.visibilityState;return Vr(e)||"hidden"!==e}},uo={initFocus:function(e){return eo&&document.addEventListener("visibilitychange",e),oo("focus",e),function(){eo&&document.removeEventListener("visibilitychange",e),io("focus",e)}},initReconnect:function(e){var t=function(){no=!0,e()},n=function(){no=!1};return oo("online",t),oo("offline",n),function(){io("online",t),io("offline",n)}}},so=!it.default.useId,co=!Zr||"Deno"in window,lo=function(e){return Zr&&d(window.requestAnimationFrame)!=Xr?window.requestAnimationFrame(e):setTimeout(e,1)},fo=co?it.useEffect:it.useLayoutEffect,ho="undefined"!=typeof navigator&&navigator.connection,po=!co&&ho&&(["slow-2g","2g"].includes(ho.effectiveType)||ho.saveData),yo=function(e){if(zr(e))try{e=e()}catch(t){e=""}var t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?Yr(e):"",t]},vo=0,mo=function(){return++vo};function go(){return bo.apply(this,arguments)}function bo(){return bo=i((function(){var e,t,n,r,o,a,u,s,c,f,d,h,y,v,m,g,b,w,_,S,E,O,x=arguments;function k(e){return A.apply(this,arguments)}function A(){return A=i((function(e){var n,r,i,a,s,v,m,g,b,w,_,S,E,O,x,k,A,P,j,D;return p(this,(function(p){switch(p.label){case 0:if(n=l(yo(e),1),!(r=n[0]))return[2];if(i=l(to(o,r),2),a=i[0],s=i[1],v=l($r.get(o),4),m=v[0],g=v[1],b=v[2],w=v[3],_=function(){var t=m[r];return(zr(c.revalidate)?c.revalidate(a().data,e):!1!==c.revalidate)&&(delete b[r],delete w[r],t&&t[0])?t[0](2).then((function(){return a().data})):a().data},t.length<3)return[2,_()];if(E=u,O=mo(),g[r]=[O,0],x=!Vr(h),k=a(),A=k.data,P=k._c,j=Vr(P)?A:P,x&&(h=zr(h)?h(j,A):h,s({data:h,_c:j})),zr(E))try{E=E(j)}catch(e){S=e}return E&&zr(E.then)?[4,E.catch((function(e){S=e}))]:[3,2];case 1:if(E=p.sent(),O!==g[r][0]){if(S)throw S;return[2,E]}S&&x&&function(e){return"function"==typeof d?d(e):!1!==d}(S)&&(f=!0,s({data:j,_c:Gr})),p.label=2;case 2:if(f&&!S&&(zr(f)?(D=f(E,j),s({data:D,error:Gr,_c:Gr})):s({data:E,error:Gr,_c:Gr})),g[r][1]=mo(),Promise.resolve(_()).then((function(){s({_c:Gr})})),!S)return[2,E];if(y)throw S;return[2]}}))})),A.apply(this,arguments)}return p(this,(function(i){for(e=x.length,t=new Array(e),n=0;n<e;n++)t[n]=x[n];if(r=l(t,4),o=r[0],a=r[1],u=r[2],s=r[3],c=Hr({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{}),f=c.populateCache,d=c.rollbackOnError,h=c.optimisticData,y=c.throwOnError,zr(a)){v=a,m=[],g=o.keys(),b=!0,w=!1,_=void 0;try{for(S=g[Symbol.iterator]();!(b=(E=S.next()).done);b=!0)O=E.value,!/^\$(inf|sub)\$/.test(O)&&v(o.get(O)._k)&&m.push(O)}catch(e){w=!0,_=e}finally{try{b||null==S.return||S.return()}finally{if(w)throw _}}return[2,Promise.all(m.map(k))]}return[2,k(a)]}))})),bo.apply(this,arguments)}var wo=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},_o=function(e,t){if(!$r.has(e)){var n=Hr(uo,t),r={},o=go.bind(Gr,e),i=Ur,a={},u=function(e,t){var n=a[e]||[];return a[e]=n,n.push(t),function(){return n.splice(n.indexOf(t),1)}},s=function(t,n,r){e.set(t,n);var o=a[t],i=!0,u=!1,s=void 0;if(o)try{for(var c,l=o[Symbol.iterator]();!(i=(c=l.next()).done);i=!0)(0,c.value)(n,r)}catch(e){u=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(u)throw s}}},c=function(){if(!$r.has(e)&&($r.set(e,[r,{},{},{},o,s,u]),!co)){var t=n.initFocus(setTimeout.bind(Gr,wo.bind(Gr,r,0))),a=n.initReconnect(setTimeout.bind(Gr,wo.bind(Gr,r,1)));i=function(){t&&t(),a&&a(),$r.delete(e)}}};return c(),[e,o,c,i]}return[e,$r.get(e)[4]]},So=l(_o(new Map),2),Eo=So[0],Oo=So[1],xo=Hr({onLoadingSlow:Ur,onSuccess:Ur,onError:Ur,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!Vr(i)&&a>i||setTimeout(r,u,o)},onDiscarded:Ur,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:po?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:po?5e3:3e3,compare:function(e,t){return Yr(e)==Yr(t)},isPaused:function(){return!1},cache:Eo,mutate:Oo,fallback:{}},ao),ko=function(e,t){var n=Hr(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Hr(o,a))}return n},Ao=(0,it.createContext)({}),Po=function(e){var t=e.value,n=(0,it.useContext)(Ao),r=zr(t),o=(0,it.useMemo)((function(){return r?t(n):t}),[r,n,t]),i=(0,it.useMemo)((function(){return r?o:ko(n,o)}),[r,n,o]),a=o&&o.provider,u=(0,it.useRef)(Gr);a&&!u.current&&(u.current=_o(a(i.cache||Eo),o));var s=u.current;return s&&(i.cache=s[0],i.mutate=s[1]),fo((function(){if(s)return s[2]&&s[2](),s[3]}),[]),(0,it.createElement)(Ao.Provider,Hr(e,{value:i}))},jo="$inf$",Do=Zr&&window.__SWR_DEVTOOLS_USE__,Co=Do?window.__SWR_DEVTOOLS_USE__:[],To=function(e){return zr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Io=Co.concat((function(e){return function(t,n,r){return e(t,n&&function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=l(yo(t),1)[0],a=l($r.get(Eo),4)[3];if(i.startsWith(jo))return n.apply(void 0,f(r));var u=a[i];return Vr(u)?n.apply(void 0,f(r)):(delete a[i],u)},r)}})),Mo=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o=Hr(xo,(0,it.useContext)(Ao)),i=l(To(n),3),a=i[0],u=i[1],s=i[2],c=ko(o,s),f=e,d=(c.use||[]).concat(Io),h=d.length;h--;)f=d[h](f);return f(a,u||c.fetcher||null,c)}},Ro=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},No=function(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=l(To(r),3),a=i[0],u=i[1],f=i[2],d=(f.use||[]).concat(t);return e(a,u,c(s({},f),{use:d}))}};Do&&(window.__SWR_DEVTOOLS_REACT__=it.default);var Lo=it.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},Fo={dedupe:!0};Kr.defineProperty(Po,"defaultValue",{value:xo});var Bo,Uo,Go=Mo((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,c=n.revalidateOnMount,d=n.revalidateIfStale,h=n.refreshInterval,y=n.refreshWhenHidden,v=n.refreshWhenOffline,m=n.keepPreviousData,g=l($r.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=l(yo(e),2),O=E[0],x=E[1],k=(0,it.useRef)(!1),A=(0,it.useRef)(!1),P=(0,it.useRef)(O),j=(0,it.useRef)(t),D=(0,it.useRef)(n),C=function(){return D.current},T=function(){return C().isVisible()&&C().isOnline()},I=l(to(r,O),4),M=I[0],R=I[1],N=I[2],L=I[3],F=(0,it.useRef)({}).current,B=Vr(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!Vr(e[r]))return!1;if(!o($,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,it.useMemo)((function(){var e=!!O&&!!t&&(Vr(c)?!C().isPaused()&&!a&&(!!Vr(d)||d):c),n=function(t){var n=Hr(t);return delete n._k,e?s({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),K=(0,Br.useSyncExternalStore)((0,it.useCallback)((function(e){return N(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),V=!k.current,z=b[O]&&b[O].length>0,H=K.data,q=Vr(H)?B:H,W=K.error,Y=(0,it.useRef)(q),$=m?Vr(H)?Y.current:H:q,J=!(z&&!Vr(W))&&(V&&!Vr(c)?c:!C().isPaused()&&(a?!Vr(q)&&d:Vr(q)||d)),Q=!!(O&&t&&V&&J),X=Vr(K.isValidating)?Q:K.isValidating,Z=Vr(K.isLoading)?Q:K.isLoading,ee=(0,it.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,f,d,h,y,v,m,g,S,E,D;return p(this,(function(p){switch(p.label){case 0:if(t=j.current,!O||!t||A.current||C().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return so?!A.current&&O===P.current&&k.current:O===P.current},f={isValidating:!1,isLoading:!1},d=function(){R(f)},h=function(){var e=_[O];e&&e[1]===i&&delete _[O]},y={isValidating:!0},Vr(M().data)&&(y.isLoading=!0),p.label=1;case 1:return p.trys.push([1,3,,4]),s&&(R(y),n.loadingTimeout&&Vr(M().data)&&setTimeout((function(){a&&c()&&C().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),mo()]),v=l(_[O],2),r=v[0],i=v[1],[4,r];case 2:return r=p.sent(),s&&setTimeout(h,n.dedupingInterval),_[O]&&_[O][1]===i?(f.error=Gr,m=w[O],!Vr(m)&&(i<=m[0]||i<=m[1]||0===m[1])?[2,(d(),s&&c()&&C().onDiscarded(O),!1)]:(g=M().data,f.data=o(g,r)?g:r,s&&c()&&C().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&C().onDiscarded(O),!1)];case 3:return S=p.sent(),h(),E=C(),D=E.shouldRetryOnError,E.isPaused()||(f.error=S,s&&c()&&(E.onError(S,O,E),(!0===D||zr(D)&&D(S))&&(C().revalidateOnFocus&&C().revalidateOnReconnect&&!T()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,d(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,it.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return go.apply(void 0,[r,P.current].concat(f(t)))}),[]);if(fo((function(){j.current=t,D.current=n,Vr(H)||(Y.current=H)})),fo((function(){if(O){var e=ee.bind(Gr,Fo),t=0,n=Ro(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();C().revalidateOnFocus&&o>t&&T()&&(t=o+C().focusThrottleInterval,e())}else if(1==n)C().revalidateOnReconnect&&T()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return A.current=!1,P.current=O,k.current=!0,R({_k:x}),J&&(Vr(q)||co?e():lo(e)),function(){A.current=!0,n()}}}),[O]),fo((function(){var e,t=function(){var t=zr(h)?h(M().data):h;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!y&&!C().isVisible()||!v&&!C().isOnline()?t():ee(Fo).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[h,y,v,O]),(0,it.useDebugValue)($),a&&Vr(q)&&O){if(!so&&co)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,D.current=n,A.current=!1;var ne=S[O];if(!Vr(ne)){var re=te(ne);Lo(re)}if(!Vr(W))throw W;var oe=ee(Fo);Vr($)||(oe.status="fulfilled",oe.value=!0),Lo(oe)}return{mutate:te,get data(){return F.data=!0,$},get error(){return F.error=!0,W},get isValidating(){return F.isValidating=!0,X},get isLoading(){return F.isLoading=!0,Z}}})),Ko=No(Go,(function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}})),Vo={getPaginatedUrl:function(e,t,n){if(e){var r=new URL(e.toString());return r.searchParams.set("limit",""+t),r.searchParams.set("startIndex",""+n),r.searchParams.set("totalCount","true"),r.toString()}return null},getNextUrl:function(e){var t,n,r=null===(t=null==e||null===(n=e.links)||void 0===n?void 0:n.find((function(e){return"next"==e.rel})))||void 0===t?void 0:t.uri;if(r){var o=new URL(r);return o.host=window.location.host,o.protocol=window.location.protocol,o.toString()}return null},getTotalCount:function(e){return null!==(Bo=null==e?void 0:e.totalCount)&&void 0!==Bo?Bo:Number.NaN},getCurrentPageSize:function(e){var t;return null!==(Uo=null==e||null===(t=e.results)||void 0===t?void 0:t.length)&&void 0!==Uo?Uo:Number.NaN},getData:function(e){return null==e?void 0:e.results}},zo=it.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},Ho={dedupe:!0};Kr.defineProperty(Po,"defaultValue",{value:xo});var qo=Mo((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,c=n.revalidateOnMount,d=n.revalidateIfStale,h=n.refreshInterval,y=n.refreshWhenHidden,v=n.refreshWhenOffline,m=n.keepPreviousData,g=l($r.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=l(yo(e),2),O=E[0],x=E[1],k=(0,it.useRef)(!1),A=(0,it.useRef)(!1),P=(0,it.useRef)(O),j=(0,it.useRef)(t),D=(0,it.useRef)(n),C=function(){return D.current},T=function(){return C().isVisible()&&C().isOnline()},I=l(to(r,O),4),M=I[0],R=I[1],N=I[2],L=I[3],F=(0,it.useRef)({}).current,B=Vr(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!Vr(e[r]))return!1;if(!o($,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,it.useMemo)((function(){var e=!!O&&!!t&&(Vr(c)?!C().isPaused()&&!a&&(!!Vr(d)||d):c),n=function(t){var n=Hr(t);return delete n._k,e?s({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),K=(0,Br.useSyncExternalStore)((0,it.useCallback)((function(e){return N(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),V=!k.current,z=b[O]&&b[O].length>0,H=K.data,q=Vr(H)?B:H,W=K.error,Y=(0,it.useRef)(q),$=m?Vr(H)?Y.current:H:q,J=!(z&&!Vr(W))&&(V&&!Vr(c)?c:!C().isPaused()&&(a?!Vr(q)&&d:Vr(q)||d)),Q=!!(O&&t&&V&&J),X=Vr(K.isValidating)?Q:K.isValidating,Z=Vr(K.isLoading)?Q:K.isLoading,ee=(0,it.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,f,d,h,y,v,m,g,S,E,D;return p(this,(function(p){switch(p.label){case 0:if(t=j.current,!O||!t||A.current||C().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return so?!A.current&&O===P.current&&k.current:O===P.current},f={isValidating:!1,isLoading:!1},d=function(){R(f)},h=function(){var e=_[O];e&&e[1]===i&&delete _[O]},y={isValidating:!0},Vr(M().data)&&(y.isLoading=!0),p.label=1;case 1:return p.trys.push([1,3,,4]),s&&(R(y),n.loadingTimeout&&Vr(M().data)&&setTimeout((function(){a&&c()&&C().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),mo()]),v=l(_[O],2),r=v[0],i=v[1],[4,r];case 2:return r=p.sent(),s&&setTimeout(h,n.dedupingInterval),_[O]&&_[O][1]===i?(f.error=Gr,m=w[O],!Vr(m)&&(i<=m[0]||i<=m[1]||0===m[1])?[2,(d(),s&&c()&&C().onDiscarded(O),!1)]:(g=M().data,f.data=o(g,r)?g:r,s&&c()&&C().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&C().onDiscarded(O),!1)];case 3:return S=p.sent(),h(),E=C(),D=E.shouldRetryOnError,E.isPaused()||(f.error=S,s&&c()&&(E.onError(S,O,E),(!0===D||zr(D)&&D(S))&&(C().revalidateOnFocus&&C().revalidateOnReconnect&&!T()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,d(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,it.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return go.apply(void 0,[r,P.current].concat(f(t)))}),[]);if(fo((function(){j.current=t,D.current=n,Vr(H)||(Y.current=H)})),fo((function(){if(O){var e=ee.bind(Gr,Ho),t=0,n=Ro(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();C().revalidateOnFocus&&o>t&&T()&&(t=o+C().focusThrottleInterval,e())}else if(1==n)C().revalidateOnReconnect&&T()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return A.current=!1,P.current=O,k.current=!0,R({_k:x}),J&&(Vr(q)||co?e():lo(e)),function(){A.current=!0,n()}}}),[O]),fo((function(){var e,t=function(){var t=zr(h)?h(M().data):h;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!y&&!C().isVisible()||!v&&!C().isOnline()?t():ee(Ho).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[h,y,v,O]),(0,it.useDebugValue)($),a&&Vr(q)&&O){if(!so&&co)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,D.current=n,A.current=!1;var ne=S[O];if(!Vr(ne)){var re=te(ne);zo(re)}if(!Vr(W))throw W;var oe=ee(Ho);Vr($)||(oe.status="fulfilled",oe.value=!0),zo(oe)}return{mutate:te,get data(){return F.data=!0,$},get error(){return F.error=!0,W},get isValidating(){return F.isValidating=!0,X},get isLoading(){return F.isLoading=!0,Z}}})),Wo=Promise.resolve(),Yo=No(qo,(function(e){return function(t,n,r){var o,a=(0,it.useRef)(!1),u=r.cache,f=r.initialSize,d=void 0===f?1:f,h=r.revalidateAll,v=void 0!==h&&h,m=r.persistSize,g=void 0!==m&&m,b=r.revalidateFirstPage,w=void 0===b||b,_=r.revalidateOnMount,S=void 0!==_&&_,E=r.parallel,O=void 0!==E&&E,x=l($r.get(Eo),4)[3];try{o=function(e){return yo(e?e(0,null):null)[0]}(t),o&&(o=jo+o)}catch(e){}var k=l(to(u,o),3),A=k[0],P=k[1],j=k[2],D=(0,it.useCallback)((function(){return Vr(A()._l)?d:A()._l}),[u,o,d]);(0,Br.useSyncExternalStore)((0,it.useCallback)((function(e){return o?j(o,(function(){e()})):function(){}}),[u,o]),D,D);var C=(0,it.useCallback)((function(){var e=A()._l;return Vr(e)?d:e}),[o,d]),T=(0,it.useRef)(C());fo((function(){a.current?o&&P({_l:g?T.current:C()}):a.current=!0}),[o,u]);var I=S&&!a.current,M=e(o,function(){var e=i((function(e){var o,a,s,c,f,d,h,m,g,b,_;return p(this,(function(S){switch(S.label){case 0:o=function(e){var o,f,d,h,y,_,S,E,k;return p(this,(function(A){switch(A.label){case 0:return o=l(yo(t(e,O?null:b)),2),f=o[0],d=o[1],f?(h=l(to(u,f),2),y=h[0],_=h[1],S=y().data,E=v||a||Vr(S)||w&&!e&&!Vr(m)||I||m&&!Vr(m[e])&&!r.compare(m[e],S),n&&("function"==typeof s?s(S,d):E)?(k=function(){var t=i((function(){var t;return p(this,(function(r){switch(r.label){case 0:return f in x?(t=x[f],delete x[f],[4,t]):[3,2];case 1:return S=r.sent(),[3,4];case 2:return[4,n(d)];case 3:S=r.sent(),r.label=4;case 4:return _({data:S,_k:d}),c[e]=S,[2]}}))}));return function(){return t.apply(this,arguments)}}(),O?(g.push(k),[3,3]):[3,1]):[3,4]):[2,"break"];case 1:return[4,k()];case 2:A.sent(),A.label=3;case 3:return[3,5];case 4:c[e]=S,A.label=5;case 5:return O||(b=S),[2]}}))},a=A()._i,s=A()._r,P({_r:Gr}),c=[],f=C(),d=l(to(u,e),1),h=d[0],m=h().data,g=[],b=null,_=0,S.label=1;case 1:return _<f?[5,y(o(_))]:[3,4];case 2:if("break"===S.sent())return[3,4];S.label=3;case 3:return++_,[3,1];case 4:return O?[4,Promise.all(g.map((function(e){return e()})))]:[3,6];case 5:S.sent(),S.label=6;case 6:return[2,(P({_i:Gr}),c)]}}))}));return function(t){return e.apply(this,arguments)}}(),r),R=(0,it.useCallback)((function(e,t){var n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return o?(r&&(Vr(e)?P({_i:!0,_r:n.revalidate}):P({_i:!1,_r:n.revalidate})),arguments.length?M.mutate(e,c(s({},n),{revalidate:r})):M.mutate()):Wo}),[o,u]),N=(0,it.useCallback)((function(e){if(!o)return Wo;var n,r=l(to(u,o),2)[1];if(zr(e)?n=e(C()):"number"==typeof e&&(n=e),"number"!=typeof n)return Wo;r({_l:n}),T.current=n;for(var i=[],a=l(to(u,o),1)[0],s=null,c=0;c<n;++c){var f=l(yo(t(c,s)),1)[0],d=l(to(u,f),1)[0],h=f?d().data:Gr;if(Vr(h))return R(a().data);i.push(h),s=h}return R(i)}),[o,u,R,C]);return{size:C(),setSize:N,mutate:R,get data(){return M.data},get error(){return M.error},get isValidating(){return M.isValidating},get isLoading(){return M.isLoading}}}}))}(),P}())}}}))},4115:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>lt,yw:()=>at,Wp:()=>d,Uz:()=>pt,nX:()=>yt,ll:()=>r,FZ:()=>it,p9:()=>ft,gM:()=>dt,Y1:()=>tt});var r="openmrs-routes:",o=n(6007),i=n(1834),a={bootstrap:function(){return Promise.resolve()},mount:function(){return Promise.resolve()},unmount:function(){return Promise.resolve()}};function u(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)}))}}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var l=new Map;function f(e,t){return s((function(){var n;return c(this,(function(r){switch(r.label){case 0:return[4,(0,o.importDynamic)(e)];case 1:return(n=r.sent())&&Object.hasOwn(n,t)&&"function"==typeof n[t]?[2,d(e,n).then((function(){return n[t]()}))]:(n&&Object.hasOwn(n,t)?console.warn("The export ".concat(t," of the app ").concat(e," is not a function")):console.warn("The app ".concat(e," does not define a component called ").concat(t,", this cannot be loaded")),[2,a])}}))}))}function d(e,t){return h.apply(this,arguments)}function h(){return(h=s((function(e,t){var n,r;return c(this,(function(a){switch(a.label){case 0:return e in l?[3,5]:null==t?[3,1]:(r=t,[3,3]);case 1:return[4,(0,o.importDynamic)(e)];case 2:r=a.sent(),a.label=3;case 3:return n=r,[4,l[e]=new Promise((function(t,r){if(Object.hasOwn(n,"startupApp")){var o=n.startupApp;if("function"==typeof o)return Promise.resolve(o()).then((function(){(0,i.registerModuleLoad)(e),t(null)})).catch(r)}(0,i.registerModuleLoad)(e),t(null)}))];case 4:return a.sent(),[3,7];case 5:return[4,l[e]];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))).apply(this,arguments)}var p=Object.freeze({__proto__:null,get start(){return Je},get ensureJQuerySupport(){return Oe},get setBootstrapMaxTime(){return oe},get setMountMaxTime(){return ie},get setUnmountMaxTime(){return ae},get setUnloadMaxTime(){return ue},get registerApplication(){return Ne},get unregisterApplication(){return Fe},get getMountedApps(){return Te},get getAppStatus(){return Me},get unloadApplication(){return Be},get checkActivityFunctions(){return Le},get getAppNames(){return Ie},get pathToActiveWhen(){return Ke},get navigateToUrl(){return pe},get patchHistoryApi(){return _e},get triggerAppChange(){return qe},get addErrorHandler(){return b},get removeErrorHandler(){return w},get mountRootParcel(){return Z},get NOT_LOADED(){return E},get LOADING_SOURCE_CODE(){return O},get NOT_BOOTSTRAPPED(){return x},get BOOTSTRAPPING(){return k},get NOT_MOUNTED(){return A},get MOUNTING(){return P},get UPDATING(){return D},get LOAD_ERROR(){return I},get MOUNTED(){return j},get UNLOADING(){return T},get UNMOUNTING(){return C},get SKIP_BECAUSE_BROKEN(){return M}}),y=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,v=function(){try{var e=new y("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?y:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n};let m=[];function g(e,t,n){const r=S(e,t,n);m.length?m.forEach((e=>e(r))):setTimeout((()=>{throw r}))}function b(e){if("function"!=typeof e)throw Error(_(28,!1));m.push(e)}function w(e){if("function"!=typeof e)throw Error(_(29,!1));let t=!1;return m=m.filter((n=>{const r=n===e;return t=t||r,!r})),t}function _(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function S(e,t,n){const r=`${B(t)} '${L(t)}' died in status ${t.status}: `;let o;if(e instanceof Error){try{e.message=r+e.message}catch(e){}o=e}else{console.warn(_(30,!1,t.status,L(t)));try{o=Error(r+JSON.stringify(e))}catch(t){o=e}}return o.appOrParcelName=L(t),t.status=n,o}const E="NOT_LOADED",O="LOADING_SOURCE_CODE",x="NOT_BOOTSTRAPPED",k="BOOTSTRAPPING",A="NOT_MOUNTED",P="MOUNTING",j="MOUNTED",D="UPDATING",C="UNMOUNTING",T="UNLOADING",I="LOAD_ERROR",M="SKIP_BECAUSE_BROKEN";function R(e){return e.status===j}function N(e){try{return e.activeWhen(window.location)}catch(t){return g(t,e,M),!1}}function L(e){return e.name}function F(e){return Boolean(e.unmountThisParcel)}function B(e){return F(e)?"parcel":"application"}function U(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function G(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function K(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!G(t,(e=>"function"!=typeof e))));var t}function V(e,t){let n=e[t]||[];n=Array.isArray(n)?n:[n],0===n.length&&(n=[()=>Promise.resolve()]);const r=B(e),o=L(e);return function(e){return n.reduce(((n,i,a)=>n.then((()=>{const n=i(e);return z(n)?n:Promise.reject(_(15,!1,r,o,t,a))}))),Promise.resolve())}}function z(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let H=[];function q(e,t){return Promise.resolve().then((()=>e.status!==x?e:(e.status=k,e.bootstrap?se(e,"bootstrap").then(n).catch((n=>{if(t)throw S(n,e,M);return g(n,e,M),e})):Promise.resolve().then(n))));function n(){return e.status=A,e}}function W(e,t){return Promise.resolve().then((()=>{if(e.status!==j)return e;e.status=C;const n=Object.keys(e.parcels).map((t=>e.parcels[t].unmountThisParcel()));return Promise.all(n).then(r,(n=>r().then((()=>{const r=Error(n.message);if(t)throw S(r,e,M);g(r,e,M)})))).then((()=>e));function r(){return se(e,"unmount").then((()=>{e.status=A}),(n=>{if(t)throw S(n,e,M);g(n,e,M)}))}}))}let Y=!1,$=!1;function J(e,t){return Promise.resolve().then((()=>e.status!==A?e:(Y||(window.dispatchEvent(new v("single-spa:before-first-mount")),Y=!0),e.status=P,se(e,"mount").then((()=>(e.status=j,$||(window.dispatchEvent(new v("single-spa:first-mount")),$=!0),e))).catch((n=>{return e.status=j,W(e,!0).then(r,r);function r(){if(t)throw S(n,e,M);return g(n,e,M),e}})))))}let Q=0;const X={parcels:{}};function Z(){return ee.apply(X,arguments)}function ee(e,t){const n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(_(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(_(3,!1,typeof e.name));const r=Q++;let o=e.name||`parcel-${r}`;if("object"!=typeof t)throw Error(_(4,!1,o,typeof t));if(!t.domElement)throw Error(_(5,!1,o));const i="function"==typeof e,a=i?e:()=>Promise.resolve(e),u={id:r,parcels:{},status:i?O:x,customProps:t,parentName:L(n),unmountThisParcel:()=>f.then((()=>{if(u.status!==j)throw Error(_(6,!1,o,u.status));return W(u,!0)})).then((e=>(u.parentName&&delete n.parcels[u.id],e))).then((e=>(d(e),e))).catch((e=>{throw u.status=M,h(e),e}))};let s;n.parcels[r]=u;let c=a();if(!c||"function"!=typeof c.then)throw Error(_(7,!1));c=c.then((e=>{if(!e)throw Error(_(8,!1));if(o=e.name||`parcel-${r}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!K(e.bootstrap))throw Error(_(9,!1,o));if(!K(e.mount))throw Error(_(10,!1,o));if(!K(e.unmount))throw Error(_(11,!1,o));if(e.update&&!K(e.update))throw Error(_(12,!1,o));const t=V(e,"bootstrap"),n=V(e,"mount"),i=V(e,"unmount");u.status=x,u.name=o,u.bootstrap=t,u.mount=n,u.unmount=i,u.timeouts=ce(e.timeouts),e.update&&(u.update=V(e,"update"),s.update=function(e){return u.customProps=e,te((t=u,Promise.resolve().then((()=>{if(t.status!==j)throw Error(_(32,!1,L(t)));return t.status=D,se(t,"update").then((()=>(t.status=j,t))).catch((e=>{throw S(e,t,M)}))}))));var t})}));const l=c.then((()=>q(u,!0))),f=l.then((()=>J(u,!0)));let d,h;const p=new Promise(((e,t)=>{d=e,h=t}));return s={mount:()=>te(Promise.resolve().then((()=>{if(u.status!==A)throw Error(_(13,!1,o,u.status));return n.parcels[r]=u,J(u)}))),unmount:()=>te(u.unmountThisParcel()),getStatus:()=>u.status,loadPromise:te(c),bootstrapPromise:te(l),mountPromise:te(f),unmountPromise:te(p)},s}function te(e){return e.then((()=>null))}function ne(e){const t=L(e);let n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(_(40,!1),t,n));const r=U({},n,{name:t,mountParcel:ee.bind(e),singleSpa:p});return F(e)&&(r.unmountSelf=e.unmountThisParcel),r}const re={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 oe(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(16,!1));re.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ie(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(17,!1));re.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ae(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(18,!1));re.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ue(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(19,!1));re.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function se(e,t){const n=e.timeouts[t],r=n.warningMillis,o=B(e);return new Promise(((i,a)=>{let u=!1,s=!1;e[t](ne(e)).then((e=>{u=!0,i(e)})).catch((e=>{u=!0,a(e)})),setTimeout((()=>l(1)),r),setTimeout((()=>l(!0)),n.millis);const c=_(31,!1,t,o,L(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){const t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((()=>l(t+1)),r)}}}))}function ce(e){const t={};for(let n in re)t[n]=U({},re[n],e&&e[n]||{});return t}function le(e){return Promise.resolve().then((()=>{if(e.loadPromise)return e.loadPromise;if(e.status!==E&&e.status!==I)return e;let t,n;return e.status=O,e.loadPromise=Promise.resolve().then((()=>{const r=e.loadApp(ne(e));if(!z(r))throw n=!0,Error(_(33,!1,L(e)));return r.then((n=>{let r;e.loadErrorTime=null,t=n,"object"!=typeof t&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!K(t.bootstrap)&&(r=35),K(t.mount)||(r=36),K(t.unmount)||(r=37);const o=B(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(_(r,!1,o,L(e),n),t),g(void 0,e,M),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=U({},e.devtools.overlays,t.devtools.overlays)),e.status=x,e.bootstrap=V(t,"bootstrap"),e.mount=V(t,"mount"),e.unmount=V(t,"unmount"),e.unload=V(t,"unload"),e.timeouts=ce(t.timeouts),delete e.loadPromise,e}))})).catch((t=>{let r;return delete e.loadPromise,n?r=M:(r=I,e.loadErrorTime=(new Date).getTime()),g(t,e,r),e}))}))}const fe="undefined"!=typeof window,de={hashchange:[],popstate:[]},he=["hashchange","popstate"];function pe(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(_(14,!1));t=e.currentTarget.href,e.preventDefault()}const n=Se(window.location.href),r=Se(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function ye(e){if(e){const t=e[0].type;he.indexOf(t)>=0&&de[t].forEach((t=>{try{t.apply(this,e)}catch(e){setTimeout((()=>{throw e}))}}))}}let ve;function me(){We([],arguments)}function ge(e,t){return function(){const n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ve&&n===o||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){n=document.createEvent("PopStateEvent"),n.initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let be=null,we=!1;function _e(e){if(we)throw Error(_(43,!1));ve=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,we=!0,be=window.history.replaceState,window.addEventListener("hashchange",me),window.addEventListener("popstate",me);const t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&he.indexOf(e)>=0)||G(de[e],(e=>e===n)))return t.apply(this,arguments);de[e].push(n)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&he.indexOf(e)>=0))return n.apply(this,arguments);de[e]=de[e].filter((e=>e!==t))},window.history.pushState=ge(window.history.pushState,"pushState"),window.history.replaceState=ge(be,"replaceState")}function Se(e){const t=document.createElement("a");return t.href=e,t}fe&&(window.singleSpaNavigate?console.warn(_(41,!1)):window.singleSpaNavigate=pe);let Ee=!1;function Oe(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!Ee){const t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return xe.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return xe.call(this,n,window.removeEventListener,e,t,arguments)},Ee=!0}}function xe(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((e=>{he.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}const ke={};function Ae(e){return Promise.resolve().then((()=>{const t=ke[L(e)];if(!t)return e;if(e.status===E)return Pe(e,t),e;if(e.status===T)return t.promise.then((()=>e));if(e.status!==A&&e.status!==I)return e;const n=e.status===I?Promise.resolve():se(e,"unload");return e.status=T,n.then((()=>(Pe(e,t),e))).catch((n=>(function(e,t,n){delete ke[L(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,g(n,e,M),t.reject(n)}(e,t,n),e)))}))}function Pe(e,t){delete ke[L(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=E,t.resolve()}function je(e,t,n,r){ke[L(e)]={app:e,resolve:n,reject:r},Object.defineProperty(ke[L(e)],"promise",{get:t})}function De(e){return ke[e]}const Ce=[];function Te(){return Ce.filter(R).map(L)}function Ie(){return Ce.map(L)}function Me(e){const t=G(Ce,(t=>L(t)===e));return t?t.status:null}let Re=!1;function Ne(e,t,n,r){const o=function(e,t,n,r){const o={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(_(39,!1));const t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce(((e,n)=>t.indexOf(n)>=0?e:e.concat(n)),[]);if(0!==n.length)throw Error(_(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(_(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(_(20,!1));const r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(_(24,!1));if(!Ge(e.customProps))throw Error(_(22,!1))}(e),o.name=e.name,o.loadApp=e.app,o.activeWhen=e.activeWhen,o.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(_(20,!1));if(!t)throw Error(_(23,!1));if("function"!=typeof n)throw Error(_(24,!1));if(!Ge(r))throw Error(_(22,!1))}(e,t,n,r),o.name=e,o.loadApp=t,o.activeWhen=n,o.customProps=r),o.loadApp="function"!=typeof(i=o.loadApp)?()=>Promise.resolve(i):i,o.customProps=function(e){return e||{}}(o.customProps),o.activeWhen=function(e){let t=Array.isArray(e)?e:[e];return t=t.map((e=>"function"==typeof e?e:Ke(e))),e=>t.some((t=>t(e)))}(o.activeWhen),o;var i}(e,t,n,r);if(Qe()||Re||(Re=!0,setTimeout((()=>{Qe()||console.warn(_(1,!1))}),5e3)),-1!==Ie().indexOf(o.name))throw Error(_(21,!1,o.name));Ce.push(U({loadErrorTime:null,status:E,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),fe&&(Oe(),We())}function Le(e=window.location){return Ce.filter((t=>t.activeWhen(e))).map(L)}function Fe(e){if(0===Ce.filter((t=>L(t)===e)).length)throw Error(_(25,!1,e));return(fe?Be(e,{waitForUnmount:!1}):Promise.resolve()).then((()=>{const t=Ce.map(L).indexOf(e);Ce.splice(t,1)}))}function Be(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(_(26,!1));const n=G(Ce,(t=>L(t)===e));if(!n)throw Error(_(27,!1,e));const r=De(L(n));if(t&&t.waitForUnmount){if(r)return r.promise;{const e=new Promise(((t,r)=>{je(n,(()=>e),t,r)}));return e}}{let e;return r?(e=r.promise,Ue(n,r.resolve,r.reject)):e=new Promise(((t,r)=>{je(n,(()=>e),t,r),Ue(n,t,r)})),e}}function Ue(e,t,n){Promise.resolve().then((()=>{if(G(Le(),(t=>t===L(e))))return qe()})).then((()=>W(e).then(Ae).then((()=>{t(),setTimeout((()=>{We()}))})))).catch(n)}function Ge(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ke(e,t){const n=function(e,t){let n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){const n=e[t];(!r&&":"===n||r&&"/"===n)&&i(t)}return i(e.length),new RegExp(o,"i");function i(i){const a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{const e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}r=!r,n=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);const r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let Ve=!1,ze=[],He=fe&&window.location.href;function qe(){return We()}function We(e=[],t,n=!1){if(Ve)return new Promise(((e,n)=>{ze.push({resolve:e,reject:n,eventArguments:t})}));const{appsToUnload:r,appsToUnmount:o,appsToLoad:i,appsToMount:a}=function(){const e=[],t=[],n=[],r=[],o=(new Date).getTime();return Ce.forEach((i=>{const a=i.status!==M&&N(i);switch(i.status){case I:a&&o-i.loadErrorTime>=200&&n.push(i);break;case E:case O:a&&n.push(i);break;case x:case A:!a&&De(L(i))?e.push(i):a&&r.push(i);break;case j:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}();let u,s=[],c=He,l=He=window.location.href;return Qe()?(Ve=!0,u=r.concat(i,o,a),Promise.resolve().then((()=>(y(0===u.length?"before-no-app-change":"before-app-change",p(!0)),y("before-routing-event",p(!0,{cancelNavigation:f})),Promise.all(s).then((n=>{if(n.some((e=>e)))return be.call(window.history,history.state,"",c.substring(location.origin.length)),He=location.href,Ve=!1,We(e,t,!0);const u=r.map(Ae),s=o.map(W).map((e=>e.then(Ae))).concat(u),l=Promise.all(s);l.then((()=>{y("before-mount-routing-event",p(!0))}),(e=>{throw e}));const f=i.map((e=>le(e).then((e=>Ye(e,l))))),v=a.filter((e=>i.indexOf(e)<0)).map((e=>Ye(e,l)));return l.catch((e=>{throw h(),e})).then((()=>(h(),Promise.all(f.concat(v)).catch((t=>{throw e.forEach((e=>e.reject(t))),t})).then(d).then((()=>{}),(e=>{throw e})))))})))))):(u=i,Promise.resolve().then((()=>{const e=i.map(le);return Promise.all(e).then(h).then((()=>[])).catch((e=>{throw h(),e})).finally((()=>{}))})));function f(e=!0){const t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);s.push(t.catch((e=>(console.warn(Error(_(42,!1))),console.warn(e),!1))))}function d(){const t=Te();e.forEach((e=>e.resolve(t)));try{y(0===u.length?"no-app-change":"app-change",p()),y("routing-event",p())}catch(e){setTimeout((()=>{throw e}))}if(Ve=!1,ze.length>0){const e=ze;ze=[],We(e)}return t}function h(){n||(e.forEach((e=>{ye(e.eventArguments)})),ye(t))}function p(e=!1,n){const s={},f={[j]:[],[A]:[],[E]:[],[M]:[]};e?(i.concat(a).forEach(((e,t)=>{h(e,j)})),r.forEach((e=>{h(e,E)})),o.forEach((e=>{h(e,A)}))):u.forEach((e=>{h(e)}));const d={detail:{newAppStatuses:s,appsByNewStatus:f,totalAppChanges:u.length,originalEvent:null==t?void 0:t[0],oldUrl:c,newUrl:l}};return n&&U(d.detail,n),d;function h(e,t){const n=L(e);t=t||Me(n),s[n]=t,(f[t]=f[t]||[]).push(n)}}function y(e,t){n||window.dispatchEvent(new v(`single-spa:${e}`,t))}}function Ye(e,t){return N(e)?q(e).then((e=>t.then((()=>N(e)?J(e):e)))):t.then((()=>e))}let $e=!1;function Je(e){$e=!0,fe&&(_e(e),We())}function Qe(){return $e}var Xe={getRawAppData:function(){return[...Ce]},reroute:We,NOT_LOADED:E,toLoadPromise:le,toBootstrapPromise:q,unregisterApplication:Fe,getProfilerData:function(){return H}};fe&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Xe);var Ze=n(9375),et=n(7093);function tt(e,t){var n=t.name;if(n){t.slots&&t.slot&&console.warn("The extension ".concat(n," from ").concat(e," declares both a 'slots' property and\na 'slot' property. Only the 'slots' property will be honored."));var r=t.slots?t.slots:t.slot?[t.slot]:[];if(t.component||t.load){var o,i,a=void 0;if(t.component)a=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The extension ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the extension will not be loaded."));a=t.load}a&&(0,et.registerExtension)({name:n,load:a,meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:null===(o=t.online)||void 0===o||o,offline:null!==(i=t.offline)&&void 0!==i&&i,featureFlag:t.featureFlag});var u=!0,s=!1,c=void 0;try{for(var l,d=r[Symbol.iterator]();!(u=(l=d.next()).done);u=!0){var h=l.value;(0,et.attach)(h,n)}}catch(e){s=!0,c=e}finally{try{u||null==d.return||d.return()}finally{if(s)throw c}}}else console.error("The extension ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the extension definition."),t)}else console.error("An extension definition in ".concat(e,' is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nextension definition.'),t)}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rt=[];function ot(e){if(Array.isArray(e)){var t=e.map(ot);return function(e){return t.some((function(t){return t(e)}))}}return"string"==typeof e?Ke(window.getOpenmrsSpaBase()+e):(n=e,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)?function(t){return function(e,t){return e.test(t.pathname.replace(window.getOpenmrsSpaBase(),""))}(e,t)}:function(){return e});var n,r}function it(e,t){if(e&&t&&"object"==typeof t){var n,r;(0,i.registerModuleWithConfigSystem)(e);var o,a,u,s=null!==(r=t.extensions)&&void 0!==r?r:[],c=null!==(o=t.modals)&&void 0!==o?o:[],l=null!==(a=t.workspaces)&&void 0!==a?a:[],d=null!==(u=t.featureFlags)&&void 0!==u?u:[];null===(n=t.pages)||void 0===n||n.forEach((function(t){var n,r,o;t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?rt.push((r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nt(e,t,n[t])}))}return e}({},t),o=null!=(o={order:null!==(n=t.order)&&void 0!==n?n:Number.MAX_SAFE_INTEGER,appName:e})?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})),r)):console.warn("A page for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),s.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?tt(e,t):console.warn("An extension for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),c.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){var n=t.name;if(n)if(t.component||t.load){var r=void 0;if(t.component)r=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The modal ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the modal will not be loaded."));r=t.load}r&&(0,et.registerModal)({name:n,load:r,moduleName:e})}else console.error("The modal ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the modal definition."),t);else console.error("A modal definition in ".concat(e,' is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nmodal definition.'),t)}(e,t):console.warn("A modal for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),l.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){var n=t.name;if(n){var r=t.title;if(r)if(t.component||t.load){var o,i=void 0;if(t.component)i=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The workspace ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the workspace will not be loaded."));i=t.load}i&&(0,et.registerWorkspace)({name:n,title:r,load:i,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:null!==(o=t.groups)&&void 0!==o?o:[]})}else console.error("The workspace ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the workspace definition."),t);else console.error("A workspace definition in ".concat(e,' is missing a title and thus cannot be registered.\nTo fix this, ensure that you define the "title" field inside the workspace definition.'),t)}else console.error("A workspace definition in ".concat(e,' is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.'),t)}(e,t):console.warn("A workspace for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),d.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"flagName")?function(e,t){t.flagName?t.label?t.description?(0,Ze.registerFeatureFlag)(t.flagName,t.label,t.description):console.error("A feature flag definition in ".concat(e,' is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "description" field inside the feature flag definition.'),t):console.error("A feature flag definition in ".concat(e,' is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "label" field inside the feature flag definition.'),t):console.error("A feature flag definition in ".concat(e,' is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the feature flag definition.'),t)}(e,t):console.warn("A feature flag for ".concat(e," could not be registered as it does not appear to have the required properties"),t)}))}}function at(){rt.sort((function(e,t){var n=e.order-t.order;return 0!=n?n:e.appName.localeCompare(t.appName,"en")}));var e=new Map,t=!0,n=!1,r=void 0;try{for(var o,i=rt[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.has(a.appName)?e.set(a.appName,e.get(a.appName)+1):e.set(a.appName,0);var u=e.get(a.appName),s="".concat(a.appName,"-page-").concat(u),c=document.createElement("div");c.id="single-spa-application:".concat(s),document.body.appendChild(c),ut(s,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}function ut(e,t){var n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);if(!1!==n)if(t.component){var r=function(e,t){var n=t.online,r=t.offline,o=t.featureFlag;return window.offlineEnabled?function(t){return!!(navigator.onLine&&(null==n||n)||!navigator.onLine&&null!=r&&r)&&!(o&&!(0,Ze.getFeatureFlag)(o))&&e(t)}:e}(ot(n),t);Ne(e,f(t.appName,t.component),r)}else console.warn('A registered page definition is missing a component and thus cannot be registered.\nTo fix this, ensure that you define the "component" field inside the page definition.',e);else console.warn('A registered page definition is missing a route and thus cannot be registered.\nTo fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.',e)}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ct=(0,n(3441).canAccessStorage)();function lt(e,t){if(ct){if("string"==typeof t){if(t.startsWith("http"))return ht(e,t);try{var n=JSON.parse(t);if(pt(n))return ht(e,n);console.error("The supplied routes for ".concat(e," is not a valid OpenmrsAppRoutes object"),t)}catch(t){console.error("Could not add routes override for ".concat(e,": "),t)}}else{if(r=t,null!=(o=URL)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](r):r instanceof o)return ht(e,t.toString());if(pt(t))return ht(e,t)}var r,o;console.error("Override for ".concat(e," is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL"),t)}}function ft(e){if(ct){var t=r+e;localStorage.removeItem(t)}}function dt(){if(ct)for(var e=window.localStorage,t=0;t<e.length;t++){var n,o=e.key(t);(null===(n=o)||void 0===n?void 0:n.startsWith(r))&&e.removeItem(o)}}function ht(e,t){var n=r+e;localStorage.setItem(n,JSON.stringify(t))}function pt(e){if(e&&"object"==typeof e){var t=Object.prototype.hasOwnProperty,n=e;return!!((!t.call(e,"pages")||Boolean(n.pages)&&Array.isArray(n.pages))&&(!t.call(e,"extensions")||Boolean(n.extensions)&&Array.isArray(n.extensions))&&(!t.call(e,"workspaces")||Boolean(n.workspaces)&&Array.isArray(n.workspaces))&&(!t.call(e,"modals")||Boolean(n.modals)&&Array.isArray(n.modals)))}return!1}function yt(e){if(e&&"object"==typeof e){var t=e;return Object.entries(t).every((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return st(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?st(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],r=t[1];return"string"==typeof n&&pt(r)}))}return!1}},209:()=>{System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(t,n){if(t){if("string"==typeof t)return e(t,3);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){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()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},5801:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,s,"next",e)}function s(e){o(a,r,i,u,s,"throw",e)}u(void 0)}))}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function v(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function m(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function g(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}e=n.nmd(e),System.register(["@openmrs/esm-error-handling","@openmrs/esm-extensions","@openmrs/esm-navigation","@openmrs/esm-react-utils","@openmrs/esm-state","@openmrs/esm-translations","dayjs","i18next","react","react-dom","react-i18next","rxjs"],(function(r,o){var u={},v={},b={},w={},S={},E={},O={},x={},k={},A={},P={},j={};return Object.defineProperty(k,"__esModule",{value:!0}),Object.defineProperty(A,"__esModule",{value:!0}),{setters:[function(){},function(e){v.getExtensionInternalStore=e.getExtensionInternalStore,v.getExtensionStore=e.getExtensionStore},function(){},function(){},function(e){S.createGlobalStore=e.createGlobalStore,S.getGlobalStore=e.getGlobalStore},function(){},function(e){O.default=e.default},function(e){x.default=e.default},function(e){Object.keys(e).forEach((function(t){k[t]=e[t]}))},function(e){Object.keys(e).forEach((function(t){A[t]=e[t]}))},function(){},function(e){j.BehaviorSubject=e.BehaviorSubject,j.Subject=e.Subject}],execute:function(){r(function(){var r={976:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e,t=[],n=0;n<arguments.length;n++){var i=arguments[n];if(i){var a=void 0===i?"undefined":(e=i)&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e);if("string"===a||"number"===a)t.push(i);else if(Array.isArray(i)){if(i.length){var u=o.apply(null,i);u&&t.push(u)}}else if("object"===a){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){t.push(i.toString());continue}for(var s in i)r.call(i,s)&&i[s]&&t.push(s)}}}return t.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},701:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},353:function(e,t,n){!function(t){"use strict";var r=function(e){return function(t,n){return"object"==typeof t&&(n=t,t=null),null==t&&(t=(new Date).toString()),n||(n={}),e.call(this,t,n)}},o=n(42),i=e.exports={generate:r((function(e,t){return new o(e,t)}))};t&&(t.fn.geopattern=r((function(e,n){return this.each((function(){var r=t(this).attr("data-title-sha");r&&(n=t.extend({hash:r},n));var o=i.generate(e,n);t(this).css("background-image",o.toDataUrl())}))})))}("undefined"!=typeof jQuery?jQuery:null)},851:function(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return t+t+n+n+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map((function(t){return("0"+e[t].toString(16)).slice(-2)})).join("")},rgb2hsl:function(e){var t=e.r,n=e.g,r=e.b;t/=255,n/=255,r/=255;var o,i,a=Math.max(t,n,r),u=Math.min(t,n,r),s=(a+u)/2;if(a===u)o=i=0;else{var c=a-u;switch(i=s>.5?c/(2-a-u):c/(a+u),a){case t:o=(n-r)/c+(n<r?6:0);break;case n:o=(r-t)/c+2;break;case r:o=(t-n)/c+4}o/=6}return{h:o,s:i,l:s}},hsl2rgb:function(e){var t,n,r,o=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},i=e.h,a=e.s,u=e.l;if(0===a)t=n=r=u;else{var s=u<.5?u*(1+a):u+a-u*a,c=2*u-s;t=o(c,s,i+1/3),n=o(c,s,i),r=o(c,s,i-1/3)}return{r:Math.round(255*t),g:Math.round(255*n),b:Math.round(255*r)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},42:function(e,t,n){"use strict";var r=function(e,t,n){return parseInt(e.substr(t,n||1),16)},o=function(e,t,n,r,o){return(parseFloat(e)-t)*(o-r)/(n-t)+r},i=function(e){return e%2==0?g:m},a=function(e){return o(e,0,15,_,S)},u=function(e){return[[e,0,e,3*e],[0,e,3*e,e]]},s=function(e){return[0,0,e,e,0,e,0,0].join(",")},c=function(e,t,n,r,o){var u=s(r),c=a(o[0]),l=i(o[0]),f={stroke:b,"stroke-opacity":w,"fill-opacity":c,fill:l};e.polyline(u,f).transform({translate:[t+r,n],scale:[-1,1]}),e.polyline(u,f).transform({translate:[t+r,n+2*r],scale:[1,-1]}),c=a(o[1]),l=i(o[1]),f={stroke:b,"stroke-opacity":w,"fill-opacity":c,fill:l},e.polyline(u,f).transform({translate:[t+r,n+2*r],scale:[-1,-1]}),e.polyline(u,f).transform({translate:[t+r,n],scale:[1,1]})},l=function(e,t,n,r,o){var u=a(o),c=i(o),l=s(r),f={stroke:b,"stroke-opacity":w,"fill-opacity":u,fill:c};e.polyline(l,f).transform({translate:[t,n+r],scale:[1,-1]}),e.polyline(l,f).transform({translate:[t+2*r,n+r],scale:[-1,-1]}),e.polyline(l,f).transform({translate:[t,n+r],scale:[1,1]}),e.polyline(l,f).transform({translate:[t+2*r,n+r],scale:[-1,1]})},f=n(495),d=n(851),h=n(451),p=n(138),y={baseColor:"#933c3c"},v=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],m="#222",g="#ddd",b="#000",w=.02,_=.02,S=.15,E=e.exports=function(e,t){return this.opts=f({},y,t),this.hash=t.hash||h(e),this.svg=new p,this.generateBackground(),this.generatePattern(),this};E.prototype.toSvg=function(){return this.svg.toString()},E.prototype.toString=function(){return this.toSvg()},E.prototype.toBase64=function(){var e=this.toSvg();return"undefined"!=typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},E.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},E.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},E.prototype.generateBackground=function(){var e,t,n,i;this.opts.color?n=d.hex2rgb(this.opts.color):(t=o(r(this.hash,14,3),0,4095,0,359),i=r(this.hash,17),(e=d.rgb2hsl(d.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,e.s=i%2==0?Math.min(1,(100*e.s+i)/100):Math.max(0,(100*e.s-i)/100),n=d.hsl2rgb(e)),this.color=d.rgb2hex(n),this.svg.rect(0,0,"100%","100%",{fill:d.rgb2rgbString(n)})},E.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(v.indexOf(e)<0)throw new Error("The generator "+e+" does not exist.")}else e=v[r(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},E.prototype.geoHexagons=function(){var e,t,n,u,s,c,l,f=o(r(this.hash,0),0,15,8,60),d=f*Math.sqrt(3),h=2*f,p=function(e){var t=e,n=t/2,r=Math.sin(60*Math.PI/180)*t;return[0,r,n,0,n+t,0,2*t,r,n+t,2*r,n,2*r,0,r].join(",")}(f);for(this.svg.setWidth(3*h+3*f),this.svg.setHeight(6*d),t=0,l=0;l<6;l++)for(c=0;c<6;c++)e=c%2==0?l*d:l*d+d/2,n=a(s=r(this.hash,t)),u={fill:i(s),"fill-opacity":n,stroke:b,"stroke-opacity":w},this.svg.polyline(p,u).transform({translate:[c*f*1.5-h/2,e-d/2]}),0===c&&this.svg.polyline(p,u).transform({translate:[6*f*1.5-h/2,e-d/2]}),0===l&&(e=c%2==0?6*d:6*d+d/2,this.svg.polyline(p,u).transform({translate:[c*f*1.5-h/2,e-d/2]})),0===c&&0===l&&this.svg.polyline(p,u).transform({translate:[6*f*1.5-h/2,5*d+d/2]}),t++},E.prototype.geoSineWaves=function(){var e,t,n,u,s,c,l=Math.floor(o(r(this.hash,0),0,15,100,400)),f=Math.floor(o(r(this.hash,1),0,15,30,100)),d=Math.floor(o(r(this.hash,2),0,15,3,30));for(this.svg.setWidth(l),this.svg.setHeight(36*d),e=0;e<36;e++)t=a(s=r(this.hash,e)),u={fill:"none",stroke:i(s),opacity:t,"stroke-width":d+"px"},n="M0 "+f+" C "+(c=l/4*.7)+" 0, "+(l/2-c)+" 0, "+l/2+" "+f+" S "+(l-c)+" "+2*f+", "+l+" "+f+" S "+(1.5*l-c)+" 0, "+1.5*l+", "+f,this.svg.path(n,u).transform({translate:[-l/4,d*e-1.5*f]}),this.svg.path(n,u).transform({translate:[-l/4,d*e-1.5*f+36*d]})},E.prototype.geoChevrons=function(){var e,t,n,u,s,c,l,f,d,h,p=o(r(this.hash,0),0,15,30,80),y=o(r(this.hash,0),0,15,30,80),v=[[0,0,(e=p)/2,(t=y)-(n=.66*t),e/2,t,0,n,0,0],[e/2,t-n,e,0,e,n,e/2,t,e/2,t-n]].map((function(e){return e.join(",")}));for(this.svg.setWidth(6*p),this.svg.setHeight(6*y*.66),s=0,h=0;h<6;h++)for(d=0;d<6;d++)c=a(f=r(this.hash,s)),u=i(f),l={stroke:b,"stroke-opacity":w,fill:u,"fill-opacity":c,"stroke-width":1},this.svg.group(l).transform({translate:[d*p,h*y*.66-y/2]}).polyline(v).end(),0===h&&this.svg.group(l).transform({translate:[d*p,6*y*.66-y/2]}).polyline(v).end(),s+=1},E.prototype.geoPlusSigns=function(){var e,t,n,s,c,l,f,d=o(r(this.hash,0),0,15,10,25),h=3*d,p=u(d);for(this.svg.setWidth(12*d),this.svg.setHeight(12*d),t=0,f=0;f<6;f++)for(l=0;l<6;l++)n=a(c=r(this.hash,t)),e=f%2==0?0:1,s={fill:i(c),stroke:b,"stroke-opacity":w,"fill-opacity":n},this.svg.group(s).transform({translate:[l*h-l*d+e*d-d,f*h-f*d-h/2]}).rect(p).end(),0===l&&this.svg.group(s).transform({translate:[4*h-l*d+e*d-d,f*h-f*d-h/2]}).rect(p).end(),0===f&&this.svg.group(s).transform({translate:[l*h-l*d+e*d-d,4*h-f*d-h/2]}).rect(p).end(),0===l&&0===f&&this.svg.group(s).transform({translate:[4*h-l*d+e*d-d,4*h-f*d-h/2]}).rect(p).end(),t++},E.prototype.geoXes=function(){var e,t,n,s,c,l,f,d=o(r(this.hash,0),0,15,10,25),h=u(d),p=3*d*.943;for(this.svg.setWidth(3*p),this.svg.setHeight(3*p),t=0,f=0;f<6;f++)for(l=0;l<6;l++)n=a(c=r(this.hash,t)),e=l%2==0?f*p-.5*p:f*p-.5*p+p/4,s={fill:i(c),opacity:n},this.svg.group(s).transform({translate:[l*p/2-p/2,e-f*p/2],rotate:[45,p/2,p/2]}).rect(h).end(),0===l&&this.svg.group(s).transform({translate:[6*p/2-p/2,e-f*p/2],rotate:[45,p/2,p/2]}).rect(h).end(),0===f&&(e=l%2==0?6*p-p/2:6*p-p/2+p/4,this.svg.group(s).transform({translate:[l*p/2-p/2,e-6*p/2],rotate:[45,p/2,p/2]}).rect(h).end()),5===f&&this.svg.group(s).transform({translate:[l*p/2-p/2,e-11*p/2],rotate:[45,p/2,p/2]}).rect(h).end(),0===l&&0===f&&this.svg.group(s).transform({translate:[6*p/2-p/2,e-6*p/2],rotate:[45,p/2,p/2]}).rect(h).end(),t++},E.prototype.geoOverlappingCircles=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*l),this.svg.setHeight(6*l),e=0,c=0;c<6;c++)for(s=0;s<6;s++)t=a(u=r(this.hash,e)),n={fill:i(u),opacity:t},this.svg.circle(s*l,c*l,l,n),0===s&&this.svg.circle(6*l,c*l,l,n),0===c&&this.svg.circle(s*l,6*l,l,n),0===s&&0===c&&this.svg.circle(6*l,6*l,l,n),e++},E.prototype.geoOctogons=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,10,60),f=function(e){var t=.33*e;return[t,0,e-t,0,e,t,e,e-t,e-t,e,t,e,0,e-t,0,t,t,0].join(",")}(l);for(this.svg.setWidth(6*l),this.svg.setHeight(6*l),t=0,c=0;c<6;c++)for(s=0;s<6;s++)n=a(u=r(this.hash,t)),e=i(u),this.svg.polyline(f,{fill:e,"fill-opacity":n,stroke:b,"stroke-opacity":w}).transform({translate:[s*l,c*l]}),t+=1},E.prototype.geoSquares=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*l),this.svg.setHeight(6*l),t=0,c=0;c<6;c++)for(s=0;s<6;s++)n=a(u=r(this.hash,t)),e=i(u),this.svg.rect(s*l,c*l,l,l,{fill:e,"fill-opacity":n,stroke:b,"stroke-opacity":w}),t+=1},E.prototype.geoConcentricCircles=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,10,60),f=l/5;for(this.svg.setWidth(6*(l+f)),this.svg.setHeight(6*(l+f)),t=0,c=0;c<6;c++)for(s=0;s<6;s++)n=a(u=r(this.hash,t)),e=i(u),this.svg.circle(s*l+s*f+(l+f)/2,c*l+c*f+(l+f)/2,l/2,{fill:"none",stroke:e,opacity:n,"stroke-width":f+"px"}),n=a(u=r(this.hash,39-t)),e=i(u),this.svg.circle(s*l+s*f+(l+f)/2,c*l+c*f+(l+f)/2,l/4,{fill:e,"fill-opacity":n}),t+=1},E.prototype.geoOverlappingRings=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,10,60),f=l/4;for(this.svg.setWidth(6*l),this.svg.setHeight(6*l),e=0,c=0;c<6;c++)for(s=0;s<6;s++)t=a(u=r(this.hash,e)),n={fill:"none",stroke:i(u),opacity:t,"stroke-width":f+"px"},this.svg.circle(s*l,c*l,l-f/2,n),0===s&&this.svg.circle(6*l,c*l,l-f/2,n),0===c&&this.svg.circle(s*l,6*l,l-f/2,n),0===s&&0===c&&this.svg.circle(6*l,6*l,l-f/2,n),e+=1},E.prototype.geoTriangles=function(){var e,t,n,u,s,c,l,f=o(r(this.hash,0),0,15,15,80),d=f/2*Math.sqrt(3),h=function(e,t){var n=e/2;return[n,0,e,t,0,t,n,0].join(",")}(f,d);for(this.svg.setWidth(3*f),this.svg.setHeight(6*d),e=0,l=0;l<6;l++)for(c=0;c<6;c++)t=a(s=r(this.hash,e)),u={fill:i(s),"fill-opacity":t,stroke:b,"stroke-opacity":w},n=l%2==0?c%2==0?180:0:c%2!=0?180:0,this.svg.polyline(h,u).transform({translate:[c*f*.5-f/2,d*l],rotate:[n,f/2,d/2]}),0===c&&this.svg.polyline(h,u).transform({translate:[6*f*.5-f/2,d*l],rotate:[n,f/2,d/2]}),e+=1},E.prototype.geoDiamonds=function(){var e,t,n,u,s,c,l,f,d,h=o(r(this.hash,0),0,15,10,50),p=o(r(this.hash,1),0,15,10,50),y=[(e=h)/2,0,e,(t=p)/2,e/2,t,0,t/2].join(",");for(this.svg.setWidth(6*h),this.svg.setHeight(3*p),u=0,d=0;d<6;d++)for(f=0;f<6;f++)s=a(l=r(this.hash,u)),c={fill:i(l),"fill-opacity":s,stroke:b,"stroke-opacity":w},n=d%2==0?0:h/2,this.svg.polyline(y,c).transform({translate:[f*h-h/2+n,p/2*d-p/2]}),0===f&&this.svg.polyline(y,c).transform({translate:[6*h-h/2+n,p/2*d-p/2]}),0===d&&this.svg.polyline(y,c).transform({translate:[f*h-h/2+n,p/2*6-p/2]}),0===f&&0===d&&this.svg.polyline(y,c).transform({translate:[6*h-h/2+n,p/2*6-p/2]}),u+=1},E.prototype.geoNestedSquares=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,4,12),f=7*l;for(this.svg.setWidth(6*(f+l)+6*l),this.svg.setHeight(6*(f+l)+6*l),e=0,c=0;c<6;c++)for(s=0;s<6;s++)t=a(u=r(this.hash,e)),n={fill:"none",stroke:i(u),opacity:t,"stroke-width":l+"px"},this.svg.rect(s*f+s*l*2+l/2,c*f+c*l*2+l/2,f,f,n),t=a(u=r(this.hash,39-e)),n={fill:"none",stroke:i(u),opacity:t,"stroke-width":l+"px"},this.svg.rect(s*f+s*l*2+l/2+2*l,c*f+c*l*2+l/2+2*l,3*l,3*l,n),e+=1},E.prototype.geoMosaicSquares=function(){var e,t,n,i=o(r(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*i),this.svg.setHeight(8*i),e=0,n=0;n<4;n++)for(t=0;t<4;t++)t%2==0?n%2==0?l(this.svg,t*i*2,n*i*2,i,r(this.hash,e)):c(this.svg,t*i*2,n*i*2,i,[r(this.hash,e),r(this.hash,e+1)]):n%2==0?c(this.svg,t*i*2,n*i*2,i,[r(this.hash,e),r(this.hash,e+1)]):l(this.svg,t*i*2,n*i*2,i,r(this.hash,e)),e+=1},E.prototype.geoPlaid=function(){var e,t,n,o,u,s,c=0,l=0;for(t=0;t<36;)c+=r(this.hash,t)+5,n=a(s=r(this.hash,t+1)),e=i(s),o=s+5,this.svg.rect(0,c,"100%",o,{opacity:n,fill:e}),c+=o,t+=2;for(t=0;t<36;)l+=r(this.hash,t)+5,n=a(s=r(this.hash,t+1)),e=i(s),u=s+5,this.svg.rect(l,0,u,"100%",{opacity:n,fill:e}),l+=u,t+=2;this.svg.setWidth(l),this.svg.setHeight(c)},E.prototype.geoTessellation=function(){var e,t,n,u,s,c=o(r(this.hash,0),0,15,5,40),l=c*Math.sqrt(3),f=2*c,d=c/2*Math.sqrt(3),h=function(e,t){return[0,0,t,e/2,0,e,0,0].join(",")}(c,d),p=3*c+2*d,y=2*l+2*c;for(this.svg.setWidth(p),this.svg.setHeight(y),t=0;t<20;t++)switch(n=a(s=r(this.hash,t)),e=i(s),u={stroke:b,"stroke-opacity":w,fill:e,"fill-opacity":n,"stroke-width":1},t){case 0:this.svg.rect(-c/2,-c/2,c,c,u),this.svg.rect(p-c/2,-c/2,c,c,u),this.svg.rect(-c/2,y-c/2,c,c,u),this.svg.rect(p-c/2,y-c/2,c,c,u);break;case 1:this.svg.rect(f/2+d,l/2,c,c,u);break;case 2:this.svg.rect(-c/2,y/2-c/2,c,c,u),this.svg.rect(p-c/2,y/2-c/2,c,c,u);break;case 3:this.svg.rect(f/2+d,1.5*l+c,c,c,u);break;case 4:this.svg.polyline(h,u).transform({translate:[c/2,-c/2],rotate:[0,c/2,d/2]}),this.svg.polyline(h,u).transform({translate:[c/2,y- -c/2],rotate:[0,c/2,d/2],scale:[1,-1]});break;case 5:this.svg.polyline(h,u).transform({translate:[p-c/2,-c/2],rotate:[0,c/2,d/2],scale:[-1,1]}),this.svg.polyline(h,u).transform({translate:[p-c/2,y+c/2],rotate:[0,c/2,d/2],scale:[-1,-1]});break;case 6:this.svg.polyline(h,u).transform({translate:[p/2+c/2,l/2]});break;case 7:this.svg.polyline(h,u).transform({translate:[p-p/2-c/2,l/2],scale:[-1,1]});break;case 8:this.svg.polyline(h,u).transform({translate:[p/2+c/2,y-l/2],scale:[1,-1]});break;case 9:this.svg.polyline(h,u).transform({translate:[p-p/2-c/2,y-l/2],scale:[-1,-1]});break;case 10:this.svg.polyline(h,u).transform({translate:[c/2,y/2-c/2]});break;case 11:this.svg.polyline(h,u).transform({translate:[p-c/2,y/2-c/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,c,c,u).transform({translate:[c/2,c/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,c,c,u).transform({scale:[-1,1],translate:[c/2-p,c/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,c,c,u).transform({translate:[c/2,y/2-c/2-c],rotate:[30,0,c]});break;case 15:this.svg.rect(0,0,c,c,u).transform({scale:[-1,1],translate:[c/2-p,y/2-c/2-c],rotate:[30,0,c]});break;case 16:this.svg.rect(0,0,c,c,u).transform({scale:[1,-1],translate:[c/2,y/2-y-c/2-c],rotate:[30,0,c]});break;case 17:this.svg.rect(0,0,c,c,u).transform({scale:[-1,-1],translate:[c/2-p,y/2-y-c/2-c],rotate:[30,0,c]});break;case 18:this.svg.rect(0,0,c,c,u).transform({scale:[1,-1],translate:[c/2,c/2-y],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,c,c,u).transform({scale:[-1,-1],translate:[c/2-p,c/2-y],rotate:[-30,0,0]})}}},451:function(e){"use strict";var t=function(){var e=function(){for(var e=16;e<80;e++){var t=s[e-3]^s[e-8]^s[e-14]^s[e-16];s[e]=t<<1|t>>>31}var n,l,f=r,d=o,h=i,p=a,y=u;for(e=0;e<80;e++){e<20?(n=p^d&(h^p),l=1518500249):e<40?(n=d^h^p,l=1859775393):e<60?(n=d&h|p&(d|h),l=2400959708):(n=d^h^p,l=3395469782);var v=(f<<5|f>>>27)+n+y+l+(0|s[e]);y=p,p=h,h=d<<30|d>>>2,d=f,f=v}for(r=r+f|0,o=o+d|0,i=i+h|0,a=a+p|0,u=u+y|0,c=0,e=0;e<16;e++)s[e]=0},t=function(t){s[c]|=(255&t)<<l,l?l-=8:(c++,l=24),16===c&&e()},n=function(e){for(var t="",n=28;n>=0;n-=4)t+=(e>>n&15).toString(16);return t},r=1732584193,o=4023233417,i=2562383102,a=271733878,u=3285377520,s=new Uint32Array(80),c=0,l=24,f=0;return{update:function(e){if("string"==typeof e)return function(e){var n=e.length;f+=8*n;for(var r=0;r<n;r++)t(e.charCodeAt(r))}(e);var n=e.length;f+=8*n;for(var r=0;r<n;r++)t(e[r])},digest:function(){t(128),(c>14||14===c&&l<24)&&e(),c=14,l=24,t(0),t(0),t(f>0xffffffffff?f/1099511627776:0),t(f>4294967295?f/4294967296:0);for(var s=24;s>=0;s-=8)t(f>>s);return n(r)+n(o)+n(i)+n(a)+n(u)}}};e.exports=function(e){if(void 0===e)return t();var n=t();return n.update(e),n.digest()}},138:function(e,t,n){"use strict";var r=function(){return this.width=100,this.height=100,this.svg=i("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this},o=n(495),i=n(97);e.exports=r,r.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},r.prototype.end=function(){return this.context.pop(),this},r.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},r.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map((function(t){return t+"("+e[t].join(",")+")"})).join(" ")),this},r.prototype.setAttributes=function(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))},r.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},r.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},r.prototype.toString=function(){return this.svg.toString()},r.prototype.rect=function(e,t,n,r,a){var u=this;if(Array.isArray(e))return e.forEach((function(e){u.rect.apply(u,e.concat(a))})),this;var s=i("rect");return this.currentContext().appendChild(s),this.setAttributes(s,o({x:e,y:t,width:n,height:r},a)),this},r.prototype.circle=function(e,t,n,r){var a=i("circle");return this.currentContext().appendChild(a),this.setAttributes(a,o({cx:e,cy:t,r:n},r)),this},r.prototype.path=function(e,t){var n=i("path");return this.currentContext().appendChild(n),this.setAttributes(n,o({d:e},t)),this},r.prototype.polyline=function(e,t){var n=this;if(Array.isArray(e))return e.forEach((function(e){n.polyline(e,t)})),this;var r=i("polyline");return this.currentContext().appendChild(r),this.setAttributes(r,o({points:e},t)),this},r.prototype.group=function(e){var t=i("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,o({},e)),this}},97:function(e){"use strict";var t=e.exports=function(e){return(null!=(n=t)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](this):l(this,n))?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e);var n};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map((function(t){return[" ",t,'="',e.attributes[t],'"'].join("")})).join(""),">",e.children.map((function(e){return e.toString()})).join(""),"</",e.tagName,">"].join("")}},495:function(e){var t=function(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var t,o=n.call(e,"constructor"),i=n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function e(){var n,r,o,i,a,u,s=arguments[0]||{},c=1,l=arguments.length,f=!1;for("boolean"==typeof s&&(f=s,s=arguments[1]||{},c=2),"object"!=typeof s&&"function"!=typeof s&&(s={});c<l;c++)if(null!=(n=arguments[c]))for(r in n)o=s[r],s!==(i=n[r])&&(f&&i&&(t(i)||(a=Array.isArray(i)))?(a?(a=!1,u=o&&Array.isArray(o)?o:[]):u=o&&t(o)?o:{},s[r]=e(f,u,i)):void 0!==i&&(s[r]=i));return s}},279:function(e,t,n){"use strict";var r=n(493);r.createRoot,r.hydrateRoot},978:function(e,t,n){"use strict";var r=function(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}},o=n(954),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useState,u=o.useEffect,s=o.useLayoutEffect,c=o.useDebugValue,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),o=a({inst:{value:n,getSnapshot:t}}),i=o[0].inst,l=o[1];return s((function(){i.value=n,i.getSnapshot=t,r(i)&&l({inst:i})}),[e,n,t]),u((function(){return r(i)&&l({inst:i}),e((function(){r(i)&&l({inst:i})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:l},921:function(e,t,n){"use strict";e.exports=n(978)},641:function(e,t,n){var r=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},o=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},i=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},a=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)};System.register(["@openmrs/esm-config","@openmrs/esm-navigation","@openmrs/esm-error-handling","@openmrs/esm-offline"],(function(e,t){var u={},s={},c={},l={};return{setters:[function(e){u.Type=e.Type,u.defineConfigSchema=e.defineConfigSchema,u.getConfig=e.getConfig,u.validators=e.validators},function(e){s.navigate=e.navigate},function(e){c.reportError=e.reportError},function(e){l.getSynchronizationItems=e.getSynchronizationItems}],execute:function(){e(function(){var e={385:function(){System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(t,n){if(t){if("string"==typeof t)return e(t,3);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){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()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},824:function(e){"use strict";e.exports=u},254:function(e){"use strict";e.exports=c},513:function(e){"use strict";e.exports=s},738:function(e){"use strict";e.exports=l}},t={};function f(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,f),o.exports}f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){"use strict";var e=function(e,t){var n=function(){this.constructor=e};st(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},u=function(e){setTimeout((function(){throw e}),0)},s=function(e){return null!==e&&"object"==typeof e},c=function(e){return e.reduce((function(e,t){return e.concat(i(t,pt)?t.errors:t)}),[])},l=function(e){return e},h=function(e){if(e||(e=lt.Promise||Promise),!e)throw new Error("no Promise impl found");return e},p=function(e,t,n){var r=g(e,t,n);zt.length?zt.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},y=function(e){if("function"!=typeof e)throw Error(m(28,!1));zt.push(e)},v=function(e){if("function"!=typeof e)throw Error(m(29,!1));var t=!1;return zt=zt.filter((function(n){var r=n===e;return t=t||r,!r})),t},m=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},g=function(e,t,n){var r,o="".concat(E(t)," '").concat(_(t),"' died in status ").concat(t.status,": ");if(i(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(m(30,!1,t.status,_(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=_(t),t.status=n,r},b=function(e){return e.status===Qt},w=function(e){try{return e.activeWhen(window.location)}catch(t){return p(t,e,nn),!1}},_=function(e){return e.name},S=function(e){return Boolean(e.unmountThisParcel)},E=function(e){return S(e)?"parcel":"application"},O=function(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]},x=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},k=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!x(t,(function(e){return"function"!=typeof e}))));var t},A=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=E(e),o=_(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return P(n)?n:Promise.reject(m(15,!1,r,o,t,a))}))}),Promise.resolve())}},P=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},j=function(e,t){var n=function(){return e.status=$t,e};return Promise.resolve().then((function(){return e.status!==Wt?e:(e.status=Yt,e.bootstrap?U(e,"bootstrap").then(n).catch((function(n){if(t)throw g(n,e,nn);return p(n,e,nn),e})):Promise.resolve().then(n))}))},D=function(e,t){return Promise.resolve().then((function(){var n=function(){return U(e,"unmount").then((function(){e.status=$t}),(function(n){if(t)throw g(n,e,nn);p(n,e,nn)}))};if(e.status!==Qt)return e;e.status=Zt;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw g(n,e,nn);p(n,e,nn)}))})).then((function(){return e}))}))},C=function(e,t){return Promise.resolve().then((function(){return e.status!==$t?e:(on||(window.dispatchEvent(new Vt("single-spa:before-first-mount")),on=!0),e.status=Jt,U(e,"mount").then((function(){return e.status=Qt,an||(window.dispatchEvent(new Vt("single-spa:first-mount")),an=!0),e})).catch((function(n){var r=function(){if(t)throw g(n,e,nn);return p(n,e,nn),e};return e.status=Qt,D(e,!0).then(r,r)})))}))},T=function(){return I.apply(sn,arguments)},I=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(m(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(m(3,!1,a(e.name)));var r=un++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(m(4,!1,o,void 0===t?"undefined":a(t)));if(!t.domElement)throw Error(m(5,!1,o));var i,u="function"==typeof e,s=u?e:function(){return Promise.resolve(e)},c={id:r,parcels:{},status:u?qt:Wt,customProps:t,parentName:_(n),unmountThisParcel:function(){return p.then((function(){if(c.status!==Qt)throw Error(m(6,!1,o,c.status));return D(c,!0)})).then((function(e){return c.parentName&&delete n.parcels[c.id],e})).then((function(e){return f(e),e})).catch((function(e){throw c.status=nn,d(e),e}))}};n.parcels[r]=c;var l=s();if(!l||"function"!=typeof l.then)throw Error(m(7,!1));l=l.then((function(e){if(!e)throw Error(m(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!k(e.bootstrap))throw Error(m(9,!1,o));if(!k(e.mount))throw Error(m(10,!1,o));if(!k(e.unmount))throw Error(m(11,!1,o));if(e.update&&!k(e.update))throw Error(m(12,!1,o));var t=A(e,"bootstrap"),n=A(e,"mount"),a=A(e,"unmount");c.status=Wt,c.name=o,c.bootstrap=t,c.mount=n,c.unmount=a,c.timeouts=G(e.timeouts),e.update&&(c.update=A(e,"update"),i.update=function(e){return c.customProps=e,M((t=c,Promise.resolve().then((function(){if(t.status!==Qt)throw Error(m(32,!1,_(t)));return t.status=Xt,U(t,"update").then((function(){return t.status=Qt,t})).catch((function(e){throw g(e,t,nn)}))}))));var t})}));var f,d,h=l.then((function(){return j(c,!0)})),p=h.then((function(){return C(c,!0)})),y=new Promise((function(e,t){f=e,d=t}));return i={mount:function(){return M(Promise.resolve().then((function(){if(c.status!==$t)throw Error(m(13,!1,o,c.status));return n.parcels[r]=c,C(c)})))},unmount:function(){return M(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:M(l),bootstrapPromise:M(h),mountPromise:M(p),unmountPromise:M(y)}},M=function(e){return e.then((function(){return null}))},R=function(e){var t=_(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(m(40,!1),t,n));var r=O({},n,{name:t,mountParcel:I.bind(e),singleSpa:Gt});return S(e)&&(r.unmountSelf=e.unmountThisParcel),r},N=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(16,!1));cn.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},L=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(17,!1));cn.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},F=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(18,!1));cn.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},B=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(19,!1));cn.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},U=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=E(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](R(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=m(31,!1,t,o,_(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},G=function(e){var t={};for(var n in cn)t[n]=O({},cn[n],e&&e[n]||{});return t},K=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Ht&&e.status!==tn?e:(e.status=qt,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(R(e));if(!P(r))throw n=!0,Error(m(33,!1,_(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!k(t.bootstrap)&&(r=35),k(t.mount)||(r=36),k(t.unmount)||(r=37);var o=E(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(m(r,!1,o,_(e),i),t),p(void 0,e,nn),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=O({},e.devtools.overlays,t.devtools.overlays)),e.status=Wt,e.bootstrap=A(t,"bootstrap"),e.mount=A(t,"mount"),e.unmount=A(t,"unmount"),e.unload=A(t,"unload"),e.timeouts=G(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=nn:(r=tn,e.loadErrorTime=(new Date).getTime()),p(t,e,r),e})));var t,n}))},V=function(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(m(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=Y(window.location.href),r=Y(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)},z=function(e){var t=this;if(e){var n=e[0].type;dn.indexOf(n)>=0&&fn[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},H=function(){Sn([],arguments)},q=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Ut&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},W=function(e){if(pn)throw Error(m(43,!1));Ut=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,pn=!0,hn=window.history.replaceState,window.addEventListener("hashchange",H),window.addEventListener("popstate",H);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&dn.indexOf(e)>=0)||x(fn[e],(function(e){return e===n})))return t.apply(this,arguments);fn[e].push(n)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&dn.indexOf(e)>=0))return n.apply(this,arguments);fn[e]=fn[e].filter((function(e){return e!==t}))},window.history.pushState=q(window.history.pushState,"pushState"),window.history.replaceState=q(hn,"replaceState")},Y=function(e){var t=document.createElement("a");return t.href=e,t},$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!yn){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return J.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return J.call(this,n,window.removeEventListener,e,t,arguments)},yn=!0}},J=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){dn.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},Q=function(e){return Promise.resolve().then((function(){var t=vn[_(e)];if(!t)return e;if(e.status===Ht)return X(e,t),e;if(e.status===en)return t.promise.then((function(){return e}));if(e.status!==$t&&e.status!==tn)return e;var n=e.status===tn?Promise.resolve():U(e,"unload");return e.status=en,n.then((function(){return X(e,t),e})).catch((function(n){return function(e,t,n){delete vn[_(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,p(n,e,nn),t.reject(n)}(e,t,n),e}))}))},X=function(e,t){delete vn[_(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Ht,t.resolve()},Z=function(e,t,n,r){vn[_(e)]={app:e,resolve:n,reject:r},Object.defineProperty(vn[_(e)],"promise",{get:t})},ee=function(e){return vn[e]},te=function(){return mn.filter(b).map(_)},ne=function(){return mn.map(_)},re=function(e){var t=x(mn,(function(t){return _(t)===e}));return t?t.status:null},oe=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(m(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(m(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(m(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(m(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(m(24,!1));if(!ce(e.customProps))throw Error(m(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(m(20,!1));if(!t)throw Error(m(23,!1));if("function"!=typeof n)throw Error(m(24,!1));if(!ce(r))throw Error(m(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:le(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(pe()||gn||(gn=!0,setTimeout((function(){pe()||console.warn(m(1,!1))}),5e3)),-1!==ne().indexOf(o.name))throw Error(m(21,!1,o.name));mn.push(O({loadErrorTime:null,status:Ht,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ln&&($(),Sn())},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return mn.filter((function(t){return t.activeWhen(e)})).map(_)},ae=function(e){if(0===mn.filter((function(t){return _(t)===e})).length)throw Error(m(25,!1,e));return(ln?ue(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=mn.map(_).indexOf(e);mn.splice(t,1)}))},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(m(26,!1));var n=x(mn,(function(t){return _(t)===e}));if(!n)throw Error(m(27,!1,e));var r,o=ee(_(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){Z(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,se(n,o.resolve,o.reject)):r=new Promise((function(e,t){Z(n,(function(){return r}),e,t),se(n,e,t)})),r},se=function(e,t,n){Promise.resolve().then((function(){if(x(ie(),(function(t){return t===_(e)})))return fe()})).then((function(){return D(e).then(Q).then((function(){t(),setTimeout((function(){Sn()}))}))})).catch(n)},ce=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},le=function(e,t){var n=function(e,t){var n=function(n){var a=e.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":a,n===e.length)if(o)t&&(i+="$");else{var u=t?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(u,"$"):"".concat(i,"(/").concat(u,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==e[0]&&(e="/"+e);for(var a=0;a<e.length;a++){var u=e[a];(!o&&":"===u||o&&"/"===u)&&n(a)}return n(e.length),new RegExp(i,"i")}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},fe=function(){return Sn()},de=function(e,t){return w(e)?j(e).then((function(e){return t.then((function(){return w(e)?C(e):e}))})):t.then((function(){return e}))},he=function(e){En=!0,ln&&(W(e),Sn())},pe=function(){return En},ye=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},ve=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},be=function(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)},we=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=be(e);if(t.headers||(t.headers={}),Nt(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(Dn)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(Cn)){var r=new URL(n,window.location.toString());r.searchParams.has("_summary")||(r.searchParams.set("_summary","data"),n=r.toString())}var o,i,a=Error();return window.fetch(n,t).then((o=function(e){var t,r,o;return function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i}(this,(function(i){switch(i.label){case 0:return(t=e).ok?204!==t.status?[3,2]:[4,(0,Lt.getConfig)("@openmrs/esm-api")]:[3,4];case 1:return i.sent().followRedirects&&t.headers.has("location")&&(r=t.headers.get("location"))&&(0,Ft.navigate)({to:r}),t.data=null,[2,t];case 2:return[2,t.clone().text().then((function(e){try{e&&(t.data=JSON.parse(e))}catch(e){}return t}))];case 3:return[3,6];case 4:return[4,(0,Lt.getConfig)("@openmrs/esm-api")];case 5:return o=i.sent().redirectAuthFailure,n===be(Tn)&&403===t.status||o.enabled&&o.errors.includes(t.status)?(sessionStorage.removeItem(xn),(0,Ft.navigate)({to:o.url}),[2,o.resolvePromise?Promise.resolve():new Promise((function(){}))]):[2,t.clone().text().then((function(e){var r=e;try{r=JSON.parse(e)}catch(e){}throw new In(n,t,r,a)}),(function(e){throw new In(n,t,null,a)}))];case 6:return[2]}}))},i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){ve(i,n,r,a,u,"next",e)}function u(e){ve(i,n,r,a,u,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)}))},_e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new wt((function(r){var o=!1;return we(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},Se=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ee=function(e,t){return we("".concat(Mn,"/").concat(e),{signal:t.signal})},Oe=function(e,t,n){return we("".concat(Mn,"?patient=").concat(e,"&includeEncounterless=").concat(t),{signal:n.signal})},xe=function(e,t){return Rn.apply(this,arguments)},ke=function(e,t){return we("".concat(Mn,"/").concat(e),{method:"DELETE",signal:t.signal})},Ae=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Pe=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ae(i,r,o,a,u,"next",e)}function u(e){Ae(i,r,o,a,u,"throw",e)}a(void 0)}))}},je=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Bn<Date.now()-6e4||!Fn.getState().loaded)&&Ie(),new wt((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Fn.getState()),Fn.subscribe(n)}))},Ce=function(){return(Bn<Date.now()-6e4||!Fn.getState().loaded)&&Ie(),Fn},Te=function(e){var t,n,r,o=null!==(r=null==e||null===(t=e.user)||void 0===t||null===(n=t.userProperties)||void 0===n?void 0:n.defaultLocale)&&void 0!==r?r:e.locale,i=document.documentElement.getAttribute("lang");(function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0})(o)&&o!==i&&document.documentElement.setAttribute("lang",o)},Ie=function(e,t){Bn=Date.now();var n={};return e&&t&&(n.Authorization="Basic ".concat(window.btoa("".concat(e,":").concat(t)))),Ue(we(Tn,{headers:n}))},Me=function(){Fn.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},Re=function(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!Ln(t.privileges.find((function(t){return e===t.display}))):Array.isArray(e)?e.every((function(e){return!Ln(t.privileges.find((function(t){return e===t.display})))})):(Ln(e)||console.error('Could not understand privileges "'.concat(e,'"')),!0)}(e,t)||function(e){return!Ln(e.roles.find((function(e){return"System Developer"===e.display})))}(t)},Ne=function(){var e,t;return new Promise((function(n){var r=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(Fn.getState()),e||(t=Fn.subscribe(r))}))},Le=function(){return new Promise((function(e,t){De().subscribe((function(t){e(t.sessionLocation)}),t).unsubscribe()}))},Fe=function(e,t){return Un.apply(this,arguments)},Be=function(e,t,n){return Gn.apply(this,arguments)},Ue=function(e){return new Promise((function(t,n){e.then((function(e){var r;"object"==typeof(null==e?void 0:e.data)?(r={loaded:!0,session:e.data},Fn.setState(r),t(r)):(r={loaded:!1,session:null},Fn.setState(r),n(r))})).catch((function(e){(0,Nn.reportError)("Failed to fetch new session information: ".concat(e));var t={loaded:!1,session:null};Fn.setState(t),n(t)}))}))},Ge=function(){(0,Lt.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Lt.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Lt.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Lt.validators.isUrl]},errors:{_type:Lt.Type.Array,_default:[401],_elements:{_type:Lt.Type.Number,_validators:[Lt.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Lt.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:Lt.Type.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}}),Ie()},Ke=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ve=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},ze=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ve(i,r,o,a,u,"next",e)}function u(e){Ve(i,r,o,a,u,"throw",e)}a(void 0)}))}},He=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},qe=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},We=function(e,t){return Vn.apply(this,arguments)},Ye=function(e){return zn.apply(this,arguments)},$e=function(){return(0,Bt.getGlobalStore)("visit",er)},Je=function(e,t){$e().setState({patientUuid:e,manuallySetVisitUuid:t})},Qe=function(e,t){return we("".concat(Dn,"/visit"),{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},Xe=function(e,t,n){return we("".concat(Dn,"/visit/").concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},Ze=function(e,t,n){var r=null!=n?n:Zn;return we("".concat(Dn,"/visit?patient=").concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})},et=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new nr(e,t))}},tt=function(e){return function(t){return 0===e?ir:t.lift(new ar(e))}},nt=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},rt=function(){return _e("".concat(Dn,"/visittype")).pipe(et((function(e){return e.data.results.map(nt)}))).pipe(tt(1))},ot=function(e){return{uuid:e.uuid,display:e.display}},it=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);var r=n.toString();return _e("".concat(Dn,"/location").concat(r?"?"+r:"")).pipe(et((function(e){return e.data.results.map(ot)}))).pipe(tt(1))};f.r(d),f.d(d,{OpenmrsFetchError:function(){return In},VisitMode:function(){return Hn},VisitStatus:function(){return qn},attachmentUrl:function(){return Mn},backendDependencies:function(){return sr},clearCurrentUser:function(){return Me},createAttachment:function(){return xe},defaultVisitCustomRepresentation:function(){return Zn},deleteAttachmentPermanently:function(){return ke},fetchCurrentPatient:function(){return We},fhirBaseUrl:function(){return Cn},getAttachmentByUuid:function(){return Ee},getAttachments:function(){return Oe},getCurrentUser:function(){return De},getLocations:function(){return it},getLoggedInUser:function(){return Ne},getSessionLocation:function(){return Le},getSessionStore:function(){return Ce},getStartedVisit:function(){return tr},getVisitStore:function(){return $e},getVisitTypes:function(){return rt},getVisitsForPatient:function(){return Ze},makeUrl:function(){return be},openmrsFetch:function(){return we},openmrsObservableFetch:function(){return _e},refetchCurrentUser:function(){return Ie},restBaseUrl:function(){return Dn},saveVisit:function(){return Qe},sessionEndpoint:function(){return Tn},sessionStore:function(){return Fn},setCurrentVisit:function(){return Je},setSessionLocation:function(){return Fe},setUserLanguage:function(){return Te},setUserProperties:function(){return Be},setupApiModule:function(){return Ge},toLocationObject:function(){return ot},toVisitTypeObject:function(){return nt},updateVisit:function(){return Xe},userHasAccess:function(){return Re}});var at,ut,st=function(e,t){return st=Object.setPrototypeOf||i({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},st(e,t)},ct=!1,lt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,ct=e},get useDeprecatedSynchronousErrorHandling(){return ct}},ft={closed:!0,next:function(e){},error:function(e){if(lt.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},dt=Array.isArray||function(e){return e&&"number"==typeof e.length},ht=function(){var e=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this};return e.prototype=Object.create(Error.prototype),e}(),pt=ht,yt=function(){var e=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return e.prototype.unsubscribe=function(){var n;if(!this.closed){var r=this,o=r._parentOrParents,a=r._ctorUnsubscribe,u=r._unsubscribe,l=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i(o,e))o.remove(this);else if(null!==o)for(var f=0;f<o.length;++f)o[f].remove(this);if(t(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(e){n=i(e,pt)?c(e.errors):[e]}}if(dt(l)){f=-1;for(var d=l.length;++f<d;){var h=l[f];if(s(h))try{h.unsubscribe()}catch(e){n=n||[],i(e,pt)?n=n.concat(c(e.errors)):n.push(e)}}}if(n)throw new pt(n)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(void 0===t?"undefined":a(t)){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!i(n,e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(i(o,e)){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[n]:u.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}(),vt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),mt=function(t){function n(e,r,o){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=ft;break;case 1:if(!e){a.destination=ft;break}if("object"==typeof e){i(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new gt(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new gt(a,e,r,o)}return a}return e(n,t),n.prototype[vt]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(yt),gt=function(n){var r=function(e,r,o,i){var a,u=n.call(this)||this;u._parentSubscriber=e;var s=u;return t(r)?a=r:r&&(a=r.next,o=r.error,i=r.complete,r!==ft&&(t((s=Object.create(r)).unsubscribe)&&u.add(s.unsubscribe.bind(s)),s.unsubscribe=u.unsubscribe.bind(u))),u._context=s,u._next=a,u._error=o,u._complete=i,u};return e(r,n),r.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;lt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},r.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=lt.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},r.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};lt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),lt.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},r.prototype.__tryOrSetError=function(e,t,n){if(!lt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return lt.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},r.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},r}(mt),bt="function"==typeof Symbol&&Symbol.observable||"@@observable",wt=function(){var e=function(e){this._isScalar=!1,e&&(this._subscribe=e)};return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,o=function(e,t,n){if(e){if(i(e,mt))return e;if(e[vt])return e[vt]()}return e||t||n?new mt(e,t,n):new mt(ft)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||lt.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),lt.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){lt.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&i(r,mt)?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=h(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[bt]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===(n=e).length?l:1===n.length?n[0]:function(e){return n.reduce((function(e,t){return t(e)}),e)})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=h(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}(),_t="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,St="object"==typeof self&&self&&self.Object===Object&&self,Et=(_t||St||Function("return this")()).Symbol,Ot=Object.prototype,xt=Ot.hasOwnProperty,kt=Ot.toString,At=Et?Et.toStringTag:void 0,Pt=Object.prototype.toString,jt=Et?Et.toStringTag:void 0,Dt=(at=Object.getPrototypeOf,ut=Object,function(e){return at(ut(e))}),Ct=Function.prototype,Tt=Object.prototype,It=Ct.toString,Mt=Tt.hasOwnProperty,Rt=It.call(Object),Nt=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":jt&&jt in Object(e)?function(e){var t=xt.call(e,At),n=e[At];try{e[At]=void 0;var r=!0}catch(e){}var o=kt.call(e);return r&&(t?e[At]=n:delete e[At]),o}(e):function(e){return Pt.call(e)}(e)}(e))return!1;var t=Dt(e);if(null===t)return!0;var n=Mt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&i(n,n)&&It.call(n)==Rt},Lt=f(824),Ft=f(513),Bt=f(385);(0,Bt.createGlobalStore)("breadcrumbs",[]);var Ut,Gt=Object.freeze({__proto__:null,get start(){return he},get ensureJQuerySupport(){return $},get setBootstrapMaxTime(){return N},get setMountMaxTime(){return L},get setUnmountMaxTime(){return F},get setUnloadMaxTime(){return B},get registerApplication(){return oe},get unregisterApplication(){return ae},get getMountedApps(){return te},get getAppStatus(){return re},get unloadApplication(){return ue},get checkActivityFunctions(){return ie},get getAppNames(){return ne},get pathToActiveWhen(){return le},get navigateToUrl(){return V},get patchHistoryApi(){return W},get triggerAppChange(){return fe},get addErrorHandler(){return y},get removeErrorHandler(){return v},get mountRootParcel(){return T},get NOT_LOADED(){return Ht},get LOADING_SOURCE_CODE(){return qt},get NOT_BOOTSTRAPPED(){return Wt},get BOOTSTRAPPING(){return Yt},get NOT_MOUNTED(){return $t},get MOUNTING(){return Jt},get UPDATING(){return Xt},get LOAD_ERROR(){return tn},get MOUNTED(){return Qt},get UNLOADING(){return en},get UNMOUNTING(){return Zt},get SKIP_BECAUSE_BROKEN(){return nn}}),Kt=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,Vt=function(){try{var e=new Kt("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?Kt:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},zt=[],Ht="NOT_LOADED",qt="LOADING_SOURCE_CODE",Wt="NOT_BOOTSTRAPPED",Yt="BOOTSTRAPPING",$t="NOT_MOUNTED",Jt="MOUNTING",Qt="MOUNTED",Xt="UPDATING",Zt="UNMOUNTING",en="UNLOADING",tn="LOAD_ERROR",nn="SKIP_BECAUSE_BROKEN",rn=[],on=!1,an=!1,un=0,sn={parcels:{}},cn={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}},ln="undefined"!=typeof window,fn={hashchange:[],popstate:[]},dn=["hashchange","popstate"],hn=null,pn=!1;ln&&(window.singleSpaNavigate?console.warn(m(41,!1)):window.singleSpaNavigate=V);var yn=!1,vn={},mn=[],gn=!1,bn=!1,wn=[],_n=ln&&window.location.href;function Sn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(bn)return new Promise((function(e,n){wn.push({resolve:e,reject:n,eventArguments:t})}));var r,i=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return mn.forEach((function(i){var a=i.status!==nn&&w(i);switch(i.status){case tn:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Ht:case qt:a&&n.push(i);break;case Wt:case $t:!a&&ee(_(i))?e.push(i):a&&r.push(i);break;case Qt:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),a=i.appsToUnload,u=i.appsToUnmount,s=i.appsToLoad,c=i.appsToMount,l=[],f=_n,d=_n=window.location.href;return pe()?(bn=!0,r=a.concat(s,u,c),Promise.resolve().then((function(){return g(0===r.length?"before-no-app-change":"before-app-change",v(!0)),g("before-routing-event",v(!0,{cancelNavigation:h})),Promise.all(l).then((function(n){if(n.some((function(e){return e})))return hn.call(window.history,history.state,"",f.substring(location.origin.length)),_n=location.href,bn=!1,Sn(e,t,!0);var r=a.map(Q),o=u.map(D).map((function(e){return e.then(Q)})).concat(r),i=Promise.all(o);i.then((function(){g("before-mount-routing-event",v(!0))}),(function(e){throw e}));var l=s.map((function(e){return K(e).then((function(e){return de(e,i)}))})),d=c.filter((function(e){return s.indexOf(e)<0})).map((function(e){return de(e,i)}));return i.catch((function(e){throw y(),e})).then((function(){return y(),Promise.all(l.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(p).then((function(){}),(function(e){throw e}))}))}))}))):(r=s,Promise.resolve().then((function(){var e=s.map(K);return Promise.all(e).then(y).then((function(){return[]})).catch((function(e){throw y(),e})).finally((function(){}))})));function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);l.push(t.catch((function(e){return console.warn(Error(m(42,!1))),console.warn(e),!1})))}function p(){var t=te();e.forEach((function(e){return e.resolve(t)}));try{g(0===r.length?"no-app-change":"app-change",v()),g("routing-event",v())}catch(e){setTimeout((function(){throw e}))}if(bn=!1,wn.length>0){var n=wn;wn=[],Sn(n)}return t}function y(){n||(e.forEach((function(e){z(e.eventArguments)})),z(t))}function v(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,l={},h=(o(e={},Qt,[]),o(e,$t,[]),o(e,Ht,[]),o(e,nn,[]),e);n?(s.concat(c).forEach((function(e,t){y(e,Qt)})),a.forEach((function(e){y(e,Ht)})),u.forEach((function(e){y(e,$t)}))):r.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:l,appsByNewStatus:h,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:d}};return i&&O(p.detail,i),p;function y(e,t){var n=_(e);t=t||re(n),l[n]=t,(h[t]=h[t]||[]).push(n)}}function g(e,t){n||window.dispatchEvent(new Vt("single-spa:".concat(e),t))}}var En=!1,On={getRawAppData:function(){return function(e){if(Array.isArray(e))return r(e)}(e=mn)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:Sn,NOT_LOADED:Ht,toLoadPromise:K,toBootstrapPromise:j,unregisterApplication:ae,getProfilerData:function(){return rn}};ln&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=On);var xn="openmrs:history";function kn(e,t,n){return kn=ge()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Pn(o,n.prototype),o},kn.apply(null,arguments)}function An(e){return An=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},An(e)}function Pn(e,t){return Pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Pn(e,t)}function jn(e){var t="function"==typeof Map?new Map:void 0;return jn=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return kn(e,arguments,An(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Pn(r,e)},jn(e)}var Dn="/ws/rest/v1",Cn="/ws/fhir2/R4",Tn="".concat(Dn,"/session"),In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pn(e,t)}(o,e);var t,n,r=(t=o,n=ge(),function(){var e,r=An(t);if(n){var o=An(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":a(n))&&"function"!=typeof t?ye(e):t;var n}(this,e)});function o(e,t,n,a){var u;return function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),me(ye(u=r.call(this)),"response",void 0),me(ye(u),"responseBody",void 0),u.message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return o}(jn(Error)),Mn="".concat(Dn,"/attachment");function Rn(){var e;return e=function(e,t){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){return(n=new FormData).append("fileCaption",t.fileDescription),n.append("patient",e),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),[2,we("".concat(Mn),{method:"POST",body:n})]}))},Rn=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,u,"next",e)}function u(e){Se(i,r,o,a,u,"throw",e)}a(void 0)}))},Rn.apply(this,arguments)}var Nn=f(254),Ln=function(e){return void 0===e},Fn=(0,Bt.createGlobalStore)("session",{loaded:!1,session:null}),Bn=0;function Un(){return(Un=Pe((function(e,t){return je(this,(function(n){return[2,Ue(we(Tn,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))]}))}))).apply(this,arguments)}function Gn(){return(Gn=Pe((function(e,t,n){return je(this,(function(r){switch(r.label){case 0:return n||(n=new AbortController),[4,we("".concat(Dn,"/user/").concat(e),{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal})];case 1:return r.sent(),[2,Ie()]}}))}))).apply(this,arguments)}Fn.subscribe((function(e){return e.session&&Te(e.session)}));var Kn=f(738);function Vn(){return Vn=ze((function(e,t){var n,r,o,i,a,u=arguments;return qe(this,(function(s){switch(s.label){case 0:return n=!(u.length>2&&void 0!==u[2])||u[2],e?(r=null,[4,Promise.all([we("".concat(Cn,"/Patient/").concat(e),t).catch((function(e){return r=e})),n?Ye(e):Promise.resolve(null)])]):[3,2];case 1:if(o=He.apply(void 0,[s.sent(),2]),i=o[0],a=o[1],i.ok)return[2,i.data];if(a)return[2,a];if(r)throw r;s.label=2;case 2:return[2,null]}}))})),Vn.apply(this,arguments)}function zn(){return(zn=ze((function(e){var t,n,r;return qe(this,(function(o){switch(o.label){case 0:return[4,(0,Kn.getSynchronizationItems)("patient-registration")];case 1:return t=o.sent(),n=t.find((function(t){return t.fhirPatient.id===e})),[2,null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null]}}))}))).apply(this,arguments)}var Hn,qn,Wn=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),Yn=function(t){var n=function(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r};return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(yt),$n=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(mt),Jn=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[vt]=function(){return new $n(this)},n.prototype.lift=function(e){var t=new Qn(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Wn;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Wn;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Wn;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new Wn;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new Wn;return this.hasError?(e.error(this.thrownError),yt.EMPTY):this.isStopped?(e.complete(),yt.EMPTY):(this.observers.push(e),new Yn(this,e))},n.prototype.asObservable=function(){var e=new wt;return e.source=this,e},n.create=function(e,t){return new Qn(e,t)},n}(wt),Qn=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):yt.EMPTY},n}(Jn),Xn=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Wn;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(Jn);!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(Hn||(Hn={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(qn||(qn={}));var Zn="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))",er=function(){try{return JSON.parse(localStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};$e().subscribe((function(e){var t;t=e,localStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))}));var tr=new Xn(null),nr=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new rr(e,this.project,this.thisArg))},e}(),rr=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(mt),or=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),ir=new wt((function(e){return e.complete()})),ar=function(){var e=function(e){if(this.total=e,this.total<0)throw new or};return e.prototype.call=function(e,t){return t.subscribe(new ur(e,this.total))},e}(),ur=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(mt),sr={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),d}())}}}))},714:function(){var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)};System.register(["@openmrs/esm-state","@openmrs/esm-utils"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.shallowEqual=e.shallowEqual}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},618:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},s=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},c=function(e,t,n,r){var i=function(e,t){return de(e,t,n.slice(),r.slice())},a=o(e);return!u((function(e,t){return!u(i,t,e)}),o(t),a)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},h=function(e,t,n,r){return e["@@transducer/result"](n[r](xe(e["@@transducer/step"],e),t))},p=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},y=function(e){return(0,Me.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1,translationOverridesLoaded:!1})},v=function(){return(0,Me.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(e){return g(v().getState(),e)},g=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},b=function(){return(0,Me.getGlobalStore)("config-extensions",{configs:{}})},w=function(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");var n=b(),r=function(n){var r;return null===(r=n.configs[e])||void 0===r?void 0:r[t]};return{getInitialState:function(){return r(n.getInitialState())},getState:function(){var e;return null!==(e=r(n.getState()))&&void 0!==e?e:{loaded:!1,config:null}},setState:function(r){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n.setState((function(n){n.configs[e]||(n.configs[e]={});var i="function"==typeof r?r(n.configs.slotName[t]):r;return n.configs[e][t]=o?Object.assign({},i):Object.assign({},n.configs[e][t],i),n}))},subscribe:function(e){return n.subscribe((function(t,n){var o=r(t),i=r(n);(0,Re.shallowEqual)(o,i)||e(o,i)}))},destroy:function(){}}},_=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e},x=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},k=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},A=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},P=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}},j=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=y(u);if(e.moduleLoaded[u]){var c=H(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!0,config:c})}else{var l=q(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!1,config:l})}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},D=function(e,t){var n,r,o=(n=Y(z(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=k(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(s)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=k(d.value,2),y=p[0];V(p[1],u,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return O({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=k(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=v(),u=a.getState(),s={slots:O({},u.slots,i)};he(u,s)||a.setState(s)},C=function(e,t){var n=function(e,t){var n=Ue(we(e.schemas)),r=A(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=k(u.value,2);n=Y([n,Ge(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t);Be.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=t.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=K(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=x(O({},r[c.slotName]),E({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}b().setState({configs:r})},I=function(e,t){Ke(e,t);var n=ve(t,Ye);Ne.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,n)),moduleLoaded:x(O({},t.moduleLoaded),E({},e,!0))})}))},M=function(e){Ne.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,Ye))})}))},R=function(e){Ne.setState((function(t){return x(O({},t),{moduleLoaded:x(O({},t.moduleLoaded),E({},e,!0))})}))},N=function(e){Ne.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,We))})}))},L=function(e,t){Ke(e,t);var n=ve(t,Ye);Ne.getState().schemas[e]&&console.error("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ne.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,n))})}))},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";Ne.setState((function(n){return x(O({},n),{providedConfigs:A(n.providedConfigs).concat([{source:t,config:e}])})}))},B=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=me(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},U=function(e,t,n){var r=[new Promise((function(t){var n=function(e){if(e.translationOverridesLoaded&&e.config){var n,r=null!==(n=e.config["Translation overrides"])&&void 0!==n?n:{};t(r),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))];return t&&n&&r.push(new Promise((function(e){var r=function(t){if(t.loaded&&t.config){var n,r=null!==(n=t.config["Translation overrides"])&&void 0!==n?n:{};e(r),i&&i()}},o=w(t,n);r(o.getState());var i=o.subscribe(r)}))),Promise.all(r)},G=function(e,t,n){$(e,t,n);var r=He(e,t);return ze(e,r,n),r},K=function(e,t,n,r,o,i){var a,u,s,c,l=function(e){return k(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=z(o,i),p=W(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},v=Y([W(d,h),y]),m=null!=f?f:o.schemas[t];$(m,v,d);var g=He(m,v);return ze(m,g,d),delete g.extensionSlots,g},V=function(e,t,n){var r="".concat(t,".extensionSlots.").concat(n),o="Extension slot config '".concat(r,"'"),i=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));i.length&&ee(r,o+"' contains invalid keys '".concat(i.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||ee(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||ee(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||ee(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Z(e.configure)||ee(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))},z=function(e,t){return A(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},H=function(e,t,n){var r=t.schemas[e],o=W(e,z(t,n));$(r,o,e);var i=He(r,o);return ze(r,i,e),delete i.extensionSlots,i},q=function(e,t,n){var r=W(e,z(t,n)),o=He(Ye,r);return ze(Ye,o,e),delete o.extensionSlots,o},W=function(e,t){return Y(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},Y=function(e){return Ae(ve)({},e)},$=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e.hasOwnProperty(s)?Ve(f,c,l):"extensionSlots"===s&&""!==n||ee(l,"Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},J=function(e,t,n){return!t||Q(e,[{Array:Pe,Boolean:je,ConceptUuid:Ie,Number:De,Object:Te,String:Ce,UUID:Ie,PersonAttributeTypeUuid:Ie,PatientIdentifierTypeUuid:Ie}[t]],n)},Q=function(e,t,n){var r=!0;if(t)try{var o=!0,i=!1,a=void 0;try{for(var u,s=t[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=(0,u.value)(n);"string"==typeof c&&(ee(e,"object"==typeof n?"Invalid configuration for ".concat(e,": ").concat(c):"Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)),r=!1)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}return r},X=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},Z=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},ee=function(e,t){var n="".concat(e,":::").concat(t);qe.has(n)||(console.error(t),qe.add(n))},te=function(e){e?qe.forEach((function(t){t.startsWith(e)&&qe.delete(t)})):qe.clear()};i.r(a),i.d(a,{Type:function(){return be},clearConfigErrors:function(){return te},configExtensionStore:function(){return Fe},configInternalStore:function(){return Ne},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return L},getConfig:function(){return B},getConfigStore:function(){return y},getExtensionConfig:function(){return w},getExtensionConfigFromStore:function(){return _},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return g},getExtensionSlotsConfigStore:function(){return v},getExtensionsConfigStore:function(){return b},getTranslationOverrides:function(){return U},implementerToolsConfigStore:function(){return Be},inRange:function(){return $e},isUrl:function(){return Qe},isUrlWithTemplateParameters:function(){return Je},oneOf:function(){return Xe},processConfig:function(){return G},provide:function(){return F},registerModuleLoad:function(){return R},registerModuleWithConfigSystem:function(){return M},registerTranslationNamespace:function(){return N},temporaryConfigStore:function(){return Le},validator:function(){return p},validators:function(){return Ze}});var ne="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},re=Object.prototype.toString,oe=function(){return"[object Arguments]"===re.call(arguments)?function(e){return"[object Arguments]"===re.call(e)}:function(e){return s("callee",e)}}(),ie=oe,ae=!{toString:null}.propertyIsEnumerable("toString"),ue=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],se=function(){return arguments.propertyIsEnumerable("length")}(),ce=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},le="function"!=typeof Object.keys||se?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=se&&ie(e);for(t in e)!s(t,e)||o&&"length"===t||(r[r.length]=t);if(ae)for(n=ue.length-1;n>=0;)s(t=ue[n],e)&&!ce(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),fe=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function de(t,n,r,o){if(ne(t,n))return!0;var i,a,u=fe(t);if(u!==fe(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!ne(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!ne(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=le(t);if(f.length!==le(n).length)return!1;var d=r.concat([t]),h=o.concat([n]);for(l=f.length-1;l>=0;){var p=f[l];if(!s(p,n)||!de(n[p],t[p],d,h))return!1;l-=1}return!0}var he=r((function(e,t){return de(e,t,[],[])})),pe=l((function(e,t,n){var r,o={};for(r in t)s(r,t)&&(o[r]=s(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o})),ye=l((function e(t,n,r){return pe((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),ve=r((function(e,t){return ye((function(e,t,n){return n}),e,t)})),me=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function ge(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ge(e[u],t,n,!0):e[u];return o};switch(fe(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var be,we=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ge(e,[],[],!0)})),_e=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Se=n((function(e){return!!_e(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),Ee=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Oe=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,s,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),xe=Oe,ke="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Ae=l((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Ee(e)}(e)),Se(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return h(e,t,n,"fantasy-land/reduce");if(null!=n[ke])return d(e,t,n[ke]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return h(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(be||(be={}));var Pe=p((function(e){return Array.isArray(e)}),"must be an array"),je=p((function(e){return"boolean"==typeof e}),"must be a boolean"),De=p((function(e){return"number"==typeof e}),"must be a number"),Ce=p((function(e){return"string"==typeof e}),"must be a string"),Te=p((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ie=p((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Me=i(685),Re=i(618),Ne=(0,Me.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),Le=(0,Me.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Le.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Fe=(0,Me.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Be=(0,Me.createGlobalStore)("config-implementer-tools",{config:{}});function Ue(e){return e.hasOwnProperty("_default")?x(O({},e),{_value:e._default,_source:"default"}):Z(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ue(e[n]),t}),{}):{}}function Ge(e,t){return Z(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ge(e[r],t),n}),{}):{_value:e,_source:t}}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(){var o=u.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!Z(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||Ke(e,a,i);var s=a._elements;if(X(s)&&Ke(e,s,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var d,h=a._validators[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(be).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(be).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),s&&y&&![be.Array,be.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ve(e,t,n){J(n,e._type,t),Z(t)?e._type===be.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s];$(e._elements,c,"".concat(n,".").concat(s))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||$(e,t,n):e._type===be.Array&&function(e,t,n){if(J(n,be.Array,t)){if(X(e._elements))for(var r=0;r<t.length;r++)Ve(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;J("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}}(e,t,n)}function ze(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Q(n,e._validators,t),Z(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e._type===be.Object&&e._elements?ze(e._elements,c,l):ze(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)ze(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}j(Ne.getState(),Le.getState()),Ne.subscribe((function(e){return j(e,Le.getState())})),Le.subscribe((function(e){return j(Ne.getState(),e)})),C(Ne.getState(),Le.getState()),Ne.subscribe((function(e){return C(e,Le.getState())})),Le.subscribe((function(e){return C(Ne.getState(),e)})),D(Ne.getState(),Le.getState()),Ne.subscribe((function(e){return D(e,Le.getState())})),Le.subscribe((function(e){return D(Ne.getState(),e)})),T(Ne.getState(),Fe.getState(),Le.getState()),Ne.subscribe((function(e){T(e,Fe.getState(),Le.getState())})),Fe.subscribe((function(e){T(Ne.getState(),e,Le.getState())})),Le.subscribe((function(e){T(Ne.getState(),Fe.getState(),e)}));var He=function(e,t){var n=we(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=a.value,r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&X(i))if(o._type===be.Array&&Array.isArray(r)){var u=r.map((function(e){return He(i,e)}));n[t]=u}else if(o._type===be.Object){var s=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;r[h]=He(i,r[h])}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}else if(Z(o)){var p=null!=r?r:{};Z(p)&&(n[t]=He(o,p))}},s=Object.keys(e)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n},qe=new Set,We={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:be.Object,_default:{},_validators:[p((function(e){return Object.keys(e).every((function(e){return/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}))}),(function(e){var t=Object.keys(e).filter((function(e){return!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}));return"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: ".concat(t.join(", "),".")}))]}},Ye=O({"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:be.Array,_default:[]}}},We),$e=function(e,t){return p((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Je=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return p((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},Qe=Je([]),Xe=function(e){return p((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ze={inRange:$e,isUrl:Qe,isUrlWithTemplateParameters:Je,oneOf:Xe}}(),a}())}}}))},863:function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")},n=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}},r=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},o=function(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},i=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}};System.register([],(function(e,n){return{execute:function(){e(function(){"use strict";var e=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},a=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},u=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,s,"next",e)}function s(e){a(i,r,o,u,s,"throw",e)}u(void 0)}))}},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):(n=e,null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](n):l(n,r));var n,r},f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e},d=function(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},h=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},p=function(e){return _(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},O)},v=function(e){return Z.apply(this,arguments)},m=function(e){return _(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x)},g=function(e){return S(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x)},b=function(e){return _(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},k)},w=function(e){return S(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},k)},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");null==t&&(t={});var r=function(e){return A(e,$)}(t),o=te("string"==typeof e?U(e):e,r);if(n(o))return o;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}},S=function(e){return ee.apply(this,arguments)},E=function(e){return U(e)},O=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||c(e,Date)},x=function(e){return"boolean"==typeof e},k=function(e){return"number"==typeof e},A=function(e,t){var n={thisObj:void 0,variables:f({},e),globals:f({},t),addVariables:function(e){return this.variables=f({},this.variables,e),this}};return n.addVariables.bind(n),n},P=function(e){return function(t){return null===t?null:te(t,e)}},j=function(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:"Cannot access the ".concat(e," property of objects")}},D=function(e){return e?"MemberExpression"===e.type?null===(t=e.property)||void 0===t?void 0:t.name:e.name:null;var t},C=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},T=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},I=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){T(e,t,n[t])}))}return e},M=function(e){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");var t,n={globals:I({},J),isLocalExpression:!1,variables:new Set};return oe("string"==typeof e?U(e):e,n),function(e){if(Array.isArray(e))return C(e)}(t=n.variables)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},R=function(e){return function(t){return null===t?null:oe(t,e)}},N={d:function(e,t){for(var n in t)N.o(t,n)&&!N.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},L={};N.r(L),N.d(L,{compile:function(){return E},evaluate:function(){return p},evaluateAsBoolean:function(){return m},evaluateAsBooleanAsync:function(){return g},evaluateAsNumber:function(){return b},evaluateAsNumberAsync:function(){return w},evaluateAsType:function(){return _},evaluateAsTypeAsync:function(){return S},evaluateAsync:function(){return v},extractVariableNames:function(){return M},jsep:function(){return U}});var F=function(){function e(n){t(this,e),this.expr=n,this.index=0}return r(e,[{key:"char",get:function(){return this.expr.charAt(this.index)}},{key:"code",get:function(){return this.expr.charCodeAt(this.index)}},{key:"throwError",value:function(e){var t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}},{key:"runHook",value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:"searchHook",value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find((function(e){return e.call(n.context,n),n.node})),n.node}}},{key:"gobbleSpaces",value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}},{key:"parse",value:function(){this.runHook("before-all");var t=this.gobbleExpressions(),n=1===t.length?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}},{key:"gobbleExpressions",value:function(t){for(var n,r,o=[];this.index<this.expr.length;)if((n=this.code)===e.SEMCOL_CODE||n===e.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())o.push(r);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return o}},{key:"gobbleExpression",value:function(){var e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}},{key:"gobbleBinaryOp",value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:"gobbleBinaryExpression",value:function(){var t,n,r,o,i,a,u,s,c;if(!(a=this.gobbleToken()))return a;if(!(n=this.gobbleBinaryOp()))return a;for(i={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},(u=this.gobbleToken())||this.throwError("Expected expression after "+n),o=[a,i,u];n=this.gobbleBinaryOp();){if(0===(r=e.binaryPrecedence(n))){this.index-=n.length;break}i={value:n,prec:r,right_a:e.right_associative.has(n)},c=n;for(var l=function(e){return i.right_a&&e.right_a?r>e.prec:r<=e.prec};o.length>2&&l(o[o.length-2]);)u=o.pop(),n=o.pop().value,a=o.pop(),t={type:e.BINARY_EXP,operator:n,left:a,right:u},o.push(t);(t=this.gobbleToken())||this.throwError("Expected expression after "+c),o.push(i,t)}for(t=o[s=o.length-1];s>1;)t={type:e.BINARY_EXP,operator:o[s-1].value,left:o[s-2],right:t},s-=2;return t}},{key:"gobbleToken",value:function(){var t,n,r,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"))return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(r=(n=this.expr.substr(this.index,e.max_unop_len)).length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var i=this.gobbleToken();return i||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:i,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}},{key:"gobbleTokenProperty",value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?((t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:"gobbleNumericLiteral",value:function(){for(var t,n,r="";e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(r+=this.expr.charAt(this.index++),"+"!==(t=this.char)&&"-"!==t||(r+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return n=this.code,e.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(n===e.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(r),raw:r}}},{key:"gobbleStringLiteral",value:function(){for(var t="",n=this.index,r=this.expr.charAt(this.index++),o=!1;this.index<this.expr.length;){var i=this.expr.charAt(this.index++);if(i===r){o=!0;break}if("\\"===i)switch(i=this.expr.charAt(this.index++),i){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+=i}else t+=i}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}},{key:"gobbleIdentifier",value:function(){var t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}},{key:"gobbleArguments",value:function(t){for(var n=[],r=!1,o=0;this.index<this.expr.length;){this.gobbleSpaces();var i=this.code;if(i===t){r=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===e.COMMA_CODE){if(this.index++,++o!==n.length)if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(var a=n.length;a<o;a++)n.push(null)}else if(n.length!==o&&0!==o)this.throwError("Expected comma");else{var u=this.gobbleExpression();u&&u.type!==e.COMPOUND||this.throwError("Expected comma"),n.push(u)}}return r||this.throwError("Expected "+String.fromCharCode(t)),n}},{key:"gobbleGroup",value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:e.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}},{key:"gobbleArray",value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:"version",get:function(){return"1.3.9"}},{key:"toString",value:function(){return"JavaScript Expression Parser (JSEP) v"+e.version}},{key:"addUnaryOp",value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:"addBinaryOp",value:function(t,n,r){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,r?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:"addIdentifierChar",value:function(t){return e.additional_identifier_chars.add(t),e}},{key:"addLiteral",value:function(t,n){return e.literals[t]=n,e}},{key:"removeUnaryOp",value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:"removeAllUnaryOps",value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:"removeIdentifierChar",value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:"removeBinaryOp",value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:"removeAllBinaryOps",value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:"removeLiteral",value:function(t){return delete e.literals[t],e}},{key:"removeAllLiterals",value:function(){return e.literals={},e}},{key:"parse",value:function(t){return new e(t).parse()}},{key:"getMaxKeyLen",value:function(e){var t;return(t=Math).max.apply(t,[0].concat(o(Object.keys(e).map((function(e){return e.length})))))}},{key:"isDecimalDigit",value:function(e){return e>=48&&e<=57}},{key:"binaryPrecedence",value:function(t){return e.binary_ops[t]||0}},{key:"isIdentifierStart",value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:"isIdentifierPart",value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}]),e}(),B=new(function(){function e(){t(this,e)}return r(e,[{key:"add",value:function(e,t,n){if("string"!=typeof arguments[0])for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else(Array.isArray(e)?e:[e]).forEach((function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)}),this)}},{key:"run",value:function(e,t){this[e]=this[e]||[],this[e].forEach((function(e){e.call(t&&t.context?t.context:t,t)}))}}]),e}());Object.assign(F,{hooks:B,plugins:new(function(){function e(n){t(this,e),this.jsep=n,this.registered={}}return r(e,[{key:"register",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this;t.forEach((function(e){if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");r.registered[e.name]||(e.init(r.jsep),r.registered[e.name]=e)}))}}]),e}())(F),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,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),F.max_unop_len=F.getMaxKeyLen(F.unary_ops),F.max_binop_len=F.getMaxKeyLen(F.binary_ops);var U=function(e){return new F(e).parse()},G=Object.getOwnPropertyNames((function e(){t(this,e)}));Object.getOwnPropertyNames(F).filter((function(e){return!G.includes(e)&&void 0===U[e]})).forEach((function(e){U[e]=F[e]})),U.Jsep=F,U.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}}))}});var K,V,z="ArrowFunctionExpression",H={name:"arrow",init:function(e){function t(n){n&&(Object.values(n).forEach((function(e){e&&"object"==typeof e&&t(e)})),"=>"===n.operator&&(n.type=z,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",(function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){var n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;var r=this.gobbleBinaryOp();if("=>"===r){var o=this.gobbleBinaryExpression();return o||this.throwError("Expected expression after "+r),void(t.node={type:z,params:null,body:o})}}this.index=n}})),e.hooks.add("after-expression",(function(e){t(e.node)}))}},q={name:"numbers",init:function(e){var t=function(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null},n=function(e){return"x"===e||"X"===e?16:"b"===e||"B"===e?2:8},r=function(e,t){return 95===e||t.some((function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||i(e,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),r=n[0],o=n[1];return e>=r&&e<=o}))},o=function(t){var n=this,r=this.index,o="",i=function(){for(;e.isDecimalDigit(n.code)||95===n.code;)95===n.code?n.index++:o+=n.expr.charAt(n.index++)};i(),this.code===e.PERIOD_CODE&&(o+=this.expr.charAt(this.index++),i());var a=this.char;"e"!==a&&"E"!==a||(o+=this.expr.charAt(this.index++),"+"!==(a=this.char)&&"-"!==a||(o+=this.expr.charAt(this.index++)),i(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+o+this.char+")"));var u=this.code;if(e.isIdentifierStart(u))this.throwError("Variable names cannot start with a number ("+o+this.char+")");else if(u===e.PERIOD_CODE)return o.length>1&&this.throwError("Unexpected period ".concat(JSON.stringify({chCode:u,number:o},null,2))),void(this.index=r);t.node={type:e.LITERAL,value:parseFloat(o),raw:this.expr.substring(r,this.index)}};e.hooks.add("gobble-token",(function(i){if(48===this.code){var a=this.index,u=this.expr.charAt(this.index+1),s=t.call(this,u);if(!s)return;for(var c="";r(this.code,s);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(u.charCodeAt(0)))return this.index=a+1,void o.call(this,i);this.throwError("unexpected char within number")}i.node={type:e.LITERAL,value:parseInt(c,n(u)),raw:this.expr.substring(a,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&o.call(this,i)}))}},W={name:"regex",init:function(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){for(var n=++this.index,r=!1;this.index<this.expr.length;){if(47===this.code&&!r){for(var o=this.expr.slice(n,this.index),i=void 0,a="";++this.index<this.expr.length;){var u=this.code;if(!(u>=97&&u<=122||u>=65&&u<=90||u>=48&&u<=57))break;a+=this.char}try{i=new RegExp(o,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:i,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}},Y={name:"jsepTemplateLiteral",init:function(e){var t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(96===this.code){for(var n={type:"TemplateLiteral",quasis:[],expressions:[]},r="",i="",a=!1,u=this.expr.length,s=function(){return n.quasis.push({type:"TemplateElement",value:{raw:i,cooked:r},tail:a})};this.index<u;){var c,l=this.expr.charAt(++this.index);if("`"===l)return this.index+=1,a=!0,s(),e.node=n,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===l&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),i="",r="",(c=n.expressions).push.apply(c,o(this.gobbleExpressions(125))),125!==this.code&&this.throwError("unclosed ${");else if("\\"===l)switch(i+=l,l=this.expr.charAt(++this.index),i+=l,l){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+=l}else r+=l,i+=l}this.throwError("Unclosed `")}};e.hooks.add("gobble-token",t),e.hooks.add("after-token",(function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node}))}},$={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)}},J=(K=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){e(t,n,r[n])}))}return t}({},$),V=null!=(V={Promise})?V:{},Object.getOwnPropertyDescriptors?Object.defineProperties(K,Object.getOwnPropertyDescriptors(V)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(V)).forEach((function(e){Object.defineProperty(K,e,Object.getOwnPropertyDescriptor(V,e))})),K);function Q(e,t,n){return Q=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&X(o,n.prototype),o},Q.apply(null,arguments)}function X(e,t){return X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},X(e,t)}function Z(){return Z=u((function(e){var t=arguments;return h(this,(function(n){return[2,S(e,t.length>1&&void 0!==t[1]?t[1]:{},O)]}))})),Z.apply(this,arguments)}function ee(){return ee=u((function(e){var t,n,r,o=arguments;return h(this,(function(i){return t=o.length>1&&void 0!==o[1]?o[1]:{},n=o.length>2?o[2]:void 0,"string"==typeof e||"object"==typeof e&&e&&"type"in e?(null==t&&(t={}),r=function(e){return A(e,J)}(t),[2,Promise.resolve(te("string"==typeof e?U(e):e,r)).then((function(t){if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}}))]):[2,Promise.reject("Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string."))]}))})),ee.apply(this,arguments)}function te(e,t){switch(e.type){case"UnaryExpression":return function(e,t){var n=te(e.argument,t);switch(e.operator){case"+":return+n;case"-":return-n;case"~":return~n;case"!":return!n;default:throw"Expression evaluator does not support operator '".concat(e.operator,"''")}}(e,t);case"BinaryExpression":return function(e,t){var n=te(e.left,t),r=te(e.right,t);switch(e.operator){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;case"%":return n%r;case"**":return Math.pow(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 null!=n?n:r;default:throw"Expression evaluator does not support operator '".concat(e.operator,"' operator")}}(e,t);case"ConditionalExpression":return function(e,t){var n=te(e.test,t);return te(n?e.consequent:e.alternate,t)}(e,t);case"CallExpression":return function(e,t){var n,r=null===(n=e.arguments)||void 0===n?void 0:n.map(P(t)),o=te(e.callee,t);if(!o)throw"No function named ".concat(D(e.callee)," is defined in this context");if("function"!=typeof o)throw"".concat(D(e.callee)," is not a function");return o.apply(void 0,d(r))}(e,t);case"ArrowFunctionExpression":return function(e,t){var n,r,o,i=null!==(r=null===(n=e.params)||void 0===n?void 0:n.map((function(e){if("Identifier"===e.type)return e.name;throw"Cannot handle parameter of type ".concat(e.type)})))&&void 0!==r?r:[];return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r.length<i.length)throw"Required argument(s) ".concat(i.slice(r.length,-1).join(", ")," were not provided");var a=Object.fromEntries(i.reduce((function(e,t,n){var o=r[n];return re(o)&&e.push([t,o]),e}),[]));return te(e.body,t.addVariables(a))}.bind(null!==(o=t.thisObj)&&void 0!==o?o:null)}(e,t);case"MemberExpression":return function(e,t){var n=te(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":var r=ne(e.object,t);throw ReferenceError("ReferenceError: ".concat(r," is not defined"));case"MemberExpression":var o=ne(e.property,t);throw TypeError("TypeError: cannot read properties of undefined (reading '".concat(o,"')"));default:throw"VisitMemberExpression does not support operator '".concat(e.object.type,"' type")}var i,a=n;if("string"==typeof n)a=String.prototype;else if("number"==typeof n)a=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw"VisitMemberExpression does not support member access on type ".concat(void 0===n?"undefined":function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":y(t);var t}(n));switch(t.thisObj=a,e.property.type){case"Identifier":case"MemberExpression":i=te(e.property,t);break;default:var u=te(e.property,t);if(void 0===u)throw{type:"Illegal property access",message:"No property was supplied to the property access"};j(u),i=n[u]}return"function"==typeof i?i.bind(n):i}(e,t);case"ArrayExpression":return function(e,t){var n;return null===(n=e.elements)||void 0===n?void 0:n.map(P(t))}(e,t);case"SequenceExpression":return function(e,t){var n=e.expressions.map(P(t));return n[n.length-1]}(e,t);case"NewExpression":return function(e,t){if(!e.callee||"Identifier"!==e.callee.type)throw e.callee?"new must be called with either Date or RegExp":'Could not handle "new" without a specified class';var n,r=null===(n=e.arguments)||void 0===n?void 0:n.map(P(t));switch(e.callee.name){case"Date":return Q(Date,d(r));case"RegExp":return Q(RegExp,d(r));default:throw"Cannot instantiate object of type ".concat(e.callee.name)}}(e,t);case"Literal":return function(e,t){return j(e.value),e.value}(e);case"Identifier":return function(e,t){j(e.name);var n=t.thisObj;if(n&&("object"==typeof n||"function"==typeof n)&&e.name in n){var r=n[e.name];return j(r),r}if(t.variables&&e.name in t.variables){var o=t.variables[e.name];return j(o),o}return e.name in t.globals?t.globals[e.name]:void 0}(e,t);case"TemplateLiteral":return function(e,t){var n,r,o,i,a=null!==(o=null===(n=e.expressions)||void 0===n?void 0:n.map(P(t)))&&void 0!==o?o:[],u=null!==(i=null===(r=e.quasis)||void 0===r?void 0:r.map(P(t)))&&void 0!==i?i:[];return u.filter((function(e){return!e.tail})).map((function(e){return e.value})).join("")+a.join("")+u.filter((function(e){return e.tail})).map((function(e){return e.value})).join("")}(e,t);case"TemplateElement":return function(e,t){return{value:e.cooked,tail:e.tail}}(e);default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}function ne(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return ne(e.property,t);default:throw"VisitExpressionName does not support expression of type '".concat(e.type,"'")}}function re(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"function"==typeof e||null===e||c(e,RegExp))return!0;if("object"==typeof e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(!re(e[o.value]))return!1}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!0}if(Array.isArray(e)){var a=!0,u=!1,s=void 0;try{for(var l,f=e[Symbol.iterator]();!(a=(l=f.next()).done);a=!0)if(!re(l.value))return!1}catch(e){u=!0,s=e}finally{try{a||null==f.return||f.return()}finally{if(u)throw s}}}return!1}function oe(e,t){switch(e.type){case"UnaryExpression":return function(e,t){return oe(e.argument,t)}(e,t);case"BinaryExpression":return function(e,t){return[oe(e.left,t),oe(e.right,t)].filter(Boolean)}(e,t);case"ConditionalExpression":return function(e,t){return[oe(e.consequent,t),oe(e.test,t),oe(e.alternate,t)].filter(Boolean)}(e,t);case"CallExpression":return function(e,t){var n,r=oe(e.callee,t);return null===(n=e.arguments)||void 0===n||n.map(R(t)),r}(e,t);case"ArrowFunctionExpression":return function(e,t){var n,r,o=I({},t);o.isLocalExpression=!0;var i,a=null!==(r=null===(n=e.params)||void 0===n?void 0:n.map(R(o)))&&void 0!==r?r:[],u=null!==(i=oe(e.body,o))&&void 0!==i?i:[];if(u&&Array.isArray(u)){var s=!0,c=!1,l=void 0;try{for(var f,d=u[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;a.includes(h)||t.variables.add(h)}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}(e,t);case"MemberExpression":return function(e,t){oe(e.object,t);var n=I({},t);n.isLocalExpression=!0,oe(e.property,n)}(e,t);case"ArrayExpression":return function(e,t){var n;null===(n=e.elements)||void 0===n||n.map(R(t))}(e,t);case"SequenceExpression":return function(e,t){var n;null===(n=e.expressions)||void 0===n||n.map(R(t))}(e,t);case"NewExpression":return function(e,t){var n;null===(n=e.arguments)||void 0===n||n.map(R(t))}(e,t);case"Literal":case"TemplateElement":return;case"Identifier":return function(e,t){if(!(e.name in t.globals)){if(t.isLocalExpression)return e.name;t.variables.add(e.name)}}(e,t);case"TemplateLiteral":return function(e,t){var n,r;null===(n=e.expressions)||void 0===n||n.map(R(t)),null===(r=e.quasis)||void 0===r||r.map(R(t))}(e,t);default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}return U.plugins.register(H),U.plugins.register({name:"new",init:function(e){e.addUnaryOp("new"),e.hooks.add("after-token",(function(t){var n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;for(var r=t.node;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}}))}}),U.plugins.register(q),U.plugins.register(W),U.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}}))}}),U.plugins.register(Y),U.addBinaryOp("in",7),U.addBinaryOp("??",1),L}())}}}))},570:function(){System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},i=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},a=function(e,r,o){var a;d.setState((function(u){var s;return{flags:i(n({},u.flags),t({},e,{enabled:null!==(a=null===(s=u.flags[e])||void 0===s?void 0:s.enabled)&&void 0!==a&&a,label:r,description:o}))}}))},u=function(e){return d.getState().flags[e].enabled},s=function(e,t){d.subscribe((function(n){t(n.flags[e].enabled)}))},c=function(e,r){d.setState((function(o){return{flags:i(n({},o.flags),t({},e,i(n({},o.flags[e]),{enabled:r})))}}))};r.r(o),r.d(o,{featureFlagsStore:function(){return d},getFeatureFlag:function(){return u},registerFeatureFlag:function(){return a},setFeatureFlag:function(){return c},subscribeToFeatureFlag:function(){return s}});var l=r(685),f={flags:function(){var e={},t=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;if(u.startsWith("openmrs:feature-flag:")){var s=u.replace("openmrs:feature-flag:",""),c=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(s))||"{}");e[s]=n({enabled:"true"===localStorage.getItem(u)},c)}}}catch(e){r=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}return e}()},d=(0,l.getGlobalStore)("feature-flags",f);d.subscribe((function(t){var n,r=!0,o=!1,i=void 0;try{for(var a,u=Object.entries(t.flags)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=function(e){if(Array.isArray(e))return e}(n=a.value)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(t,n){if(t){if("string"==typeof t)return e(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=s[0],l=s[1];localStorage.setItem("openmrs:feature-flag:".concat(c),l.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(c),JSON.stringify({label:l.label,description:l.description}))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}))}(),o}())}}}))},103:function(){System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))},t=function(e){if(!window.offlineEnabled)return function(){};var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},n=function(e){return e({online:!window.offlineEnabled||navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(v,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},i=function(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))},u=function(e){window.dispatchEvent(new CustomEvent(w,{detail:e}))},s=function(e){window.dispatchEvent(new CustomEvent(b,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(m,t),function(){return window.removeEventListener(m,t)}},l=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(g,t),function(){return window.removeEventListener(g,t)}},f=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(b,t),function(){return window.removeEventListener(b,t)}},d=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(w,t),function(){return window.removeEventListener(w,t)}},h={d:function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},p={};h.r(p),h.d(p,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},dispatchSnackbarShown:function(){return u},dispatchToastShown:function(){return s},subscribeActionableNotificationShown:function(){return l},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return o},subscribeSnackbarShown:function(){return d},subscribeToastShown:function(){return f}});var y="openmrs:connectivity-changed",v="openmrs:precache-static-dependencies",m="openmrs:notification-shown",g="openmrs:actionable-notification-shown",b="openmrs:toast-shown",w="openmrs:snack-bar-shown";return p}())}}}))},593:function(e,t,n){var r=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},o=function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")},i=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}},a=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e},u=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},s=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e},f=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},d=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},h=function(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)},v=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}};System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},i={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){i.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){"use strict";var e={766:function(e){e.exports=r},685:function(e){e.exports=i}},t={};function l(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,l),o.exports}l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return function(){var e=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},t=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},r=function(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)},i=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},v=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},m=function(){},g=function(e,t){if(!t)return e&&e.then?e.then(m):Promise.resolve()},b=function(e,t){if(void 0!==In)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),In;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new Tn(e,t);return In=n.register().then((function(){return n.controlling.then((function(){return n}))}))},w=function(){return null!=In?In:Promise.resolve(void 0)},S=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},E=function(e){return Ln.apply(this,arguments)},O=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},x=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)}))}},k=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},A=function(){return Fn.apply(this,arguments)},P=function(){return Bn.apply(this,arguments)},j=function(){return Un.apply(this,arguments)},D=function(){return Gn.apply(this,arguments)},C=function(){return{current:Vn,notAvailable:"unavailable"===Vn,active:"on"===Vn}},T=function(e){"unavailable"!==Vn&&"unavailable"!==e&&(localStorage.setItem(Kn,"on"===e?"active":"disabled"),Vn=e)},I=function(){return zn.apply(this,arguments)},M=function(e,t){return"object"!=typeof t||qn(t).forEach((function(n){e[n]=t[n]})),e},R=function(e,t){return $n.call(e,t)},N=function(e,t){"function"==typeof t&&(t=t(Yn(e))),("undefined"==typeof Reflect?qn:Reflect.ownKeys)(t).forEach((function(n){L(e,n,t[n])}))},L=function(e,t,n,r){Jn(e,t,M(n&&R(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},F=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),L(e.prototype,"constructor",e),{extend:N.bind(null,e.prototype)}}}},B=function(e,t,n){return Zn.call(e,t,n)},U=function(e,t){return t(e)},G=function(e){if(!e)throw new Error("Assertion Failed")},K=function(e){Hn.setImmediate?setImmediate(e):setTimeout(e,0)},V=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},z=function(e){var t={};for(var n in e)R(e,n)&&(t[n]=e[n]);return t},H=function(e){return nr.apply([],e)},q=function(e){ir="undefined"!=typeof WeakMap&&new WeakMap;var t=ar(e);return ir=null,t},W=function(e){return ur.call(e).slice(8,-1)},Y=function(e){var t,n,r,o;if(1===arguments.length){if(Wn(e))return e.slice();if(this===lr&&"string"==typeof e)return[e];if(o=cr(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n},$=function(e,t){dr=e,hr=t},J=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(hr).map((function(e){return"\n"+e})).join("")):""},Q=function(e,t){this._e=yr(),this.name=e,this.message=t},X=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},Z=function(e,t,n,r){this._e=yr(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=X(e,t)},ee=function(e,t){this._e=yr(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=X(e,t)},te=function(){},ne=function(e){return e},re=function(e,t){return null==e||e===ne?t:function(n){return t(e(n))}},oe=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},ie=function(e,t){return e===te?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?oe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?oe(o,this.onerror):o),void 0!==i?i:n}},ae=function(e,t){return e===te?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?oe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?oe(r,this.onerror):r)}},ue=function(e,t){return e===te?t:function(n){var r=e.apply(this,arguments);M(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?oe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?oe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:M(r,a)}},se=function(e,t){return e===te?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},ce=function(e,t){return e===te?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}},le=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=te,this._lib=!1;var t=this._PSD=Kr;if(dr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Or)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&de(this,this._value))}this._state=null,this._value=null,++t.ref,Wr(this,e)},fe=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},de=function(e,t){if(Fr.push(t),null===e._state){var n=e._lib&&ge();t=Ur(t),e._state=!1,e._value=t,dr&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((function(){var n=Xn(t,"stack");t._promise=e,L(t,"stack",{get:function(){return Tr?n&&(n.get?n.get.apply(t):n.value):e.stack}})})),function(e){Lr.some((function(t){return t._value===e._value}))||Lr.push(e)}(e),he(e),n&&be()}},he=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)pe(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===zr&&(++zr,Mr((function(){0==--zr&&we()}),[]))},pe=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++zr,Mr(ye,[n,e,t])}else e._listeners.push(t)},ye=function(e,t,n){try{Br=t;var r,o=t._value;t._state?r=e(o):(Fr.length&&(Fr=[]),r=e(o),-1===Fr.indexOf(o)&&function(e){for(var t=Lr.length;t;)if(Lr[--t]._value===e._value)return void Lr.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Br=null,0==--zr&&we(),--n.psd.ref||n.psd.finalize()}},ve=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},me=function(){ge()&&be()},ge=function(){var e=Rr;return Rr=!1,Nr=!1,e},be=function(){var e,t,n;do{for(;Vr.length>0;)for(e=Vr,Vr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Vr.length>0);Rr=!0,Nr=!0},we=function(){var e=Lr;Lr=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Hr.slice(0),n=t.length;n;)t[--n]()},_e=function(e){return new le(Or,!1,e)},Se=function(e,t){var n=Kr;return function(){var r=ge(),o=Kr;try{return je(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{je(o,!1),r&&be()}}},Ee=function(e,t,n,r){var o=Kr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var a=Gr.env;i.env=Cr?{Promise:le,PromiseProp:{value:le,configurable:!0,writable:!0},all:le.all,race:le.race,allSettled:le.allSettled,any:le.any,resolve:le.resolve,reject:le.reject,nthen:Me(a.nthen,i),gthen:Me(a.gthen,i)}:{},t&&M(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=Ce(i,e,n,r);return 0===i.ref&&i.finalize(),u},Oe=function(){return $r.id||($r.id=++Jr),++$r.awaits,$r.echoes+=100,$r.id},xe=function(){return!!$r.awaits&&(0==--$r.awaits&&($r.id=0),$r.echoes=100*$r.awaits,!0)},ke=function(e){return $r.echoes&&e&&e.constructor===Dr?(Oe(),e.then((function(e){return xe(),e}),(function(e){return xe(),to(e)}))):e},Ae=function(e){++Zr,$r.echoes&&0!=--$r.echoes||($r.echoes=$r.id=0),Qr.push(Kr),je(e,!0)},Pe=function(){var e=Qr[Qr.length-1];Qr.pop(),je(e,!1)},je=function(e,t){var n=Kr;if((t?!$r.echoes||Xr++&&e===Kr:!Xr||--Xr&&e===Kr)||Te(t?Ae.bind(null,e):Pe),e!==Kr&&(Kr=e,n===Gr&&(Gr.env=De()),Cr)){var r=Gr.env.Promise,o=e.env;Ar.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(Hn,"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))}},De=function(){var e=Hn.Promise;return Cr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Hn,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Ar.then,gthen:e.prototype.then}:{}},Ce=function(e,t,n,r,o){var i=Kr;try{return je(e,!0),t(n,r,o)}finally{je(i,!1)}},Te=function(e){jr.call(kr,e)},Ie=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=Kr;n&&Oe(),je(t,!0);try{return e.apply(this,arguments)}finally{je(o,!1),r&&Te(xe)}}},Me=function(e,t){return function(n,r){return e.call(this,Ie(n,t),Ie(r,t))}},Re=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(Hn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),M(r,o)):Hn.CustomEvent&&M(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Hn.dispatchEvent&&(dispatchEvent(r),!Hn.PromiseRejectionEvent&&Hn.onunhandledrejection))try{Hn.onunhandledrejection(r)}catch(e){}dr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},Ne=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Le=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=q(t))[e],t}},Fe=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){qn(e).forEach((function(t){var n=e[t];if(Wn(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new _r.InvalidArgument("Invalid event config");var r=i(t,ne,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){K((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=se),o||(o=te);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}},Be=function(e,t){return F(t).from({prototype:e}),t},Ue=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},Ge=function(e,t){e.filter=Ne(e.filter,t)},Ke=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return Ne(r(),t())}:t,e.justLimit=n&&!r},Ve=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new _r.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},ze=function(e,t,n){var r=Ve(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},He=function(e,t,n,r){var o=e.replayFilter?Ne(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),R(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),qe(ze(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return qe(ze(e,r,n),Ne(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},qe=function(e,t,n,r){var o=Se(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=te}),(function(t){e.fail(t),n=te}))||o(e.value,e,(function(e){return n=e})),n()}))}))},We=function(e){var t=void 0===e?"undefined":p(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=W(e);return"ArrayBuffer"===n?"binary":n},Ye=function(e){return s(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},$e=function(e,t){return e<t?-1:e===t?0:1},Je=function(e,t){return e>t?-1:e===t?0:1},Qe=function(e,t,n){var r=s(e,vo)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Xe=function(e){return new e.Collection(e,(function(){return nt("")})).limit(0)},Ze=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,s=0;s<a;++s){var c=t[s];if(c!==r[s])return o(e[s],n[s])<0?e.substr(0,s)+n[s]+n.substr(s+1):o(e[s],r[s])<0?e.substr(0,s)+r[s]+n.substr(s+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[s],c)<0&&(u=s)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},et=function(e,t,n,r){var o,i,a,u,s,c,l,f=function(e){o=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),i=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?$e:Je;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),s=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r},d=n.length;if(!n.every((function(e){return"string"==typeof e})))return Qe(e,"String expected.");f("next");var h=new e.Collection(e,(function(){return tt(u[0],s[d-1]+r)}));h._ondirectionchange=function(e){f(e)};var p=0;return h._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var f=i(o);if(t(f,s,p))return!0;for(var h=null,y=p;y<d;++y){var v=Ze(o,f,u[y],s[y],a,c);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+l)}:r),!1})),h},tt=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},nt=function(e){return{type:1,lower:e,upper:e}},rt=function(e){return Se((function(t){return ot(t),e(t.target.error),!1}))},ot=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},it=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+at(t)}},at=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},ut=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:V(n,(function(e){return[e.name,e]}))}},st=function(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return er(t,e)}}(e):function(t){return er(t,e)}},ct=function(e){return[].slice.call(e)},lt=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},ft=function(e,t){var n=e._novip,r=t.db,o=function(e,t,n,r){var o=n.IDBKeyRange,i=(n.indexedDB,function(e,t){return t.reduce((function(e,t){return c({},e,(0,t.create)(e))}),e)}(function(e,t,n){var r=function(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)},o=function(e,t){var n=ct(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=Wn(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:st(t)},indexes:ct(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:Wn(o),keyPath:o,unique:n,multiEntry:r,extractKey:st(o)};return i[lt(o)]=a,a})),getIndexByKeyPath:function(e){return i[lt(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[lt(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),i=o.schema,a=o.hasGetAll,u=i.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,o=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,s){e=Se(e);var c=n.objectStore(t),l=null==c.keyPath,f="put"===o||"add"===o;if(!f&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var h,p=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var y=[],v=[],m=0,g=function(e){++m,ot(e)};if("deleteRange"===o){if(4===u.type)return e({numFailures:m,failures:v,results:[],lastResult:void 0});3===u.type?y.push(h=c.clear()):y.push(h=c.delete(r(u)))}else{var b=d(f?l?[a,i]:[a,null]:[i,null],2),w=b[0],_=b[1];if(f)for(var S=0;S<p;++S)y.push(h=_&&void 0!==_[S]?c[o](w[S],_[S]):c[o](w[S])),h.onerror=g;else for(var E=0;E<p;++E)y.push(h=c[o](w[E])),h.onerror=g}var O=function(t){var n=t.target.result;y.forEach((function(e,t){return null!=e.error&&(v[t]=e.error)})),e({numFailures:m,failures:v,results:"delete"===o?i:y.map((function(e){return e.result})),lastResult:n})};h.onerror=function(e){g(e),O(e)},h.onsuccess=O}))},getMany:function(e){var n=e.trans,r=e.keys;return new Promise((function(e,o){e=Se(e);for(var i,a=n.objectStore(t),u=r.length,s=new Array(u),c=0,l=0,f=function(t){var n=t.target;s[n._pos]=n.result,++l===c&&e(s)},d=rt(o),h=0;h<u;++h)null!=r[h]&&((i=a.get(r[h]))._pos=h,i.onsuccess=f,i.onerror=d,++c);0===c&&e(s)}))},get:function(e){var n=e.trans,r=e.key;return new Promise((function(e,o){e=Se(e);var i=n.objectStore(t).get(r);i.onsuccess=function(t){return e(t.target.result)},i.onerror=rt(o)}))},query:function(e){return function(n){return new Promise((function(o,i){o=Se(o);var a=n.trans,u=n.values,s=n.limit,c=n.query,l=s===1/0?void 0:s,f=c.index,d=c.range,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===s)return o({result:[]});if(e){var v=u?p.getAll(y,l):p.getAllKeys(y,l);v.onsuccess=function(e){return o({result:e.target.result})},v.onerror=rt(i)}else{var m=0,g=u||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),b=[];g.onsuccess=function(e){var t=g.result;return t?(b.push(u?t.value:t.primaryKey),++m===s?o({result:b}):void t.continue()):o({result:b})},g.onerror=rt(i)}}))}}(a),openCursor:function(e){var n=e.trans,o=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,s){e=Se(e);var c=i.index,l=i.range,f=n.objectStore(t),d=c.isPrimaryKey?f:f.index(c.name),h=a?u?"prevunique":"prev":u?"nextunique":"next",p=o||!("openKeyCursor"in d)?d.openCursor(r(l),h):d.openKeyCursor(r(l),h);p.onerror=rt(s),p.onsuccess=Se((function(t){var r=p.result;if(r){r.___id=++wo,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=Se(s),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=Se(e),p.onerror=rt(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(p.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=Se((function(e){p.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),s)}))},count:function(e){var n=e.query,o=e.trans,i=n.index,a=n.range;return new Promise((function(e,n){var u=o.objectStore(t),s=i.isPrimaryKey?u:u.index(i.name),c=r(a),l=c?s.count(c):s.count();l.onsuccess=Se((function(t){return e(t.target.result)})),l.onerror=rt(n)}))}}}(e)})),s={};return u.forEach((function(e){return s[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!s[e])throw new Error("Table '".concat(e,"' not found"));return s[e]},MIN_KEY:-1/0,MAX_KEY:bo(t),schema:i}}(t,o,r),e.dbcore));return{dbcore:i}}(n._middlewares,r,n._deps,t);n.core=o.dbcore,n.tables.forEach((function(e){var t=e.name;n.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=n.core.table(t),s(n[t],n.Table)&&(n[t].core=e.core))}))},dt=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=Xn(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||s(t,o.Transaction)?L(t,e,{get:function(){return this.table(e)},set:function(t){Jn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},ht=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)s(e[t],n.Table)&&delete e[t]}))},pt=function(e,t){return e._cfg.version-t._cfg.version},yt=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,s=i.idxByName,c=void 0;for(c in u)s[c]||a.del.push(c);for(c in s){var l=u[c],f=s[c];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},vt=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return mt(o,e)})),o},mt=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},gt=function(e,t,n){var r={};return B(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=it(at(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var s=t.index(t.indexNames[u]);o=s.keyPath;var c=it(s.name,o,!!s.unique,!!s.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(c)}r[e]=ut(e,i,a)})),r},bt=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var c=0;c<u.indexNames.length;++c){var l=u.indexNames[c],f=u.index(l).keyPath,d="string"==typeof f?f:"["+B(f).join("+")+"]";if(t[a]){var h=t[a].idxByName[d];h&&(h.name=l,delete t[a].idxByName[d],t[a].idxByName[l]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Hn.WorkerGlobalScope&&s(Hn,Hn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},wt=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Co("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},_t=function(e){return e&&"function"==typeof e.databases},St=function(e){return Ee((function(){return Kr.letThrough=!0,e()}))},Et=function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()},Ot=function(e){var t=function(e){return function(t){var n=e(t),i=n.value;return n.done?i:i&&"function"==typeof i.then?i.then(r,o):Wn(i)?Promise.all(i).then(r,o):r(i)}},n=function(t){return e.next(t)},r=t(n),o=t((function(t){return e.throw(t)}));return t(n)()},xt=function(e,t,n){var r=arguments.length;if(r<2)throw new _r.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,H(o),n]},kt=function(e,t,n){for(var r=Wn(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},At=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===ho(t.keys[o],e[i])&&(r.push(n?q(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},Pt=function(e){return!("from"in e)},jt=function(e,t){Pt(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;Po(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},Dt=function(e){var t=Pt(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&ho(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||ho(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},Ct=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=c({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=Tt(a)}e.d=Tt(e)},Tt=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},It=function(e,t){return qn(t).forEach((function(n){jt(e[n]||(e[n]=new Ao),t[n])})),e},Mt=function(e){var t=Ro;try{Ro=!0,mo.storagemutated.fire(e)}finally{Ro=t}},Rt=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},Nt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Lt=function(){return new Ko},Ft=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Bt=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ut=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bt(i,r,o,a,u,"next",e)}function u(e){Bt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Gt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Kt=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Gt(e,t,n[t])}))}return e},Vt=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},zt=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},Ht=function(){return Ho},qt=function(){return qo.apply(this,arguments)},Wt=function(){return Yo.apply(this,arguments)},Yt=function(e,t,n,r){return $o.apply(this,arguments)},$t=function(e,t,n){return Jo.apply(this,arguments)},Jt=function(e,t){return Qo.apply(this,arguments)},Qt=function(e,t){return Xo.apply(this,arguments)},Xt=function(e){return Zo.apply(this,arguments)},Zt=function(e){return ei.apply(this,arguments)},en=function(e){return ti.apply(this,arguments)},tn=function(e){var t;return!!(null===(t=zo[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},nn=function(e){return ni.apply(this,arguments)},rn=function(e){return ri.apply(this,arguments)},on=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};zo[e]={type:e,dependsOn:t,process:n,options:r}},an=function(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(ai)},un=function(){return li+ci()},sn=function(e){return e.startsWith(li)},cn=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ln=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},fn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ln(i,r,o,a,u,"next",e)}function u(e){ln(i,r,o,a,u,"throw",e)}a(void 0)}))}},dn=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},hn=function(){return Object.values(fi)},pn=function(e){fi[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),fi[e.id]=e},yn=function(e){return di.apply(this,arguments)},vn=function(e,t){return hi.apply(this,arguments)},mn=function(e,t){return pi.apply(this,arguments)},gn=function(e,t,n){return yi.apply(this,arguments)},bn=function(e,t){return vi.apply(this,arguments)},wn=function(e,t,n){return mi.apply(this,arguments)},_n=function(e,t){return gi.apply(this,arguments)},Sn=function(e,t,n){return bi.apply(this,arguments)},En=function(){return wi.apply(this,arguments)},On=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},xn=function(){return Pn(),_i},kn=function(e,t){Pn(),pn({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},An=function(e){return Si.apply(this,arguments)},Pn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};l.r(y),l.d(y,{activateOfflineCapability:function(){return I},beginEditSynchronizationItem:function(){return nn},canBeginEditSynchronizationItemsOfType:function(){return tn},deleteSynchronizationItem:function(){return rn},generateOfflineUuid:function(){return un},getCurrentOfflineMode:function(){return C},getDynamicOfflineDataEntries:function(){return yn},getDynamicOfflineDataEntriesFor:function(){return vn},getDynamicOfflineDataHandlers:function(){return hn},getFullSynchronizationItems:function(){return Zt},getFullSynchronizationItemsFor:function(){return Qt},getOfflineDb:function(){return Lt},getOfflinePatientDataStore:function(){return xn},getOfflineSynchronizationStore:function(){return Ht},getOmrsServiceWorker:function(){return w},getSynchronizationItem:function(){return en},getSynchronizationItems:function(){return Xt},getSynchronizationItemsFor:function(){return Jt},isOfflineUuid:function(){return sn},messageOmrsServiceWorker:function(){return E},offlineUuidPrefix:function(){return li},omrsOfflineCachingStrategyHttpHeaderName:function(){return Nn},omrsOfflineResponseBodyHttpHeaderName:function(){return Mn},omrsOfflineResponseStatusHttpHeaderName:function(){return Rn},putDynamicOfflineData:function(){return mn},putDynamicOfflineDataFor:function(){return gn},queueSynchronizationItem:function(){return $t},queueSynchronizationItemFor:function(){return Yt},registerOfflinePatientHandler:function(){return kn},registerOmrsServiceWorker:function(){return b},removeDynamicOfflineData:function(){return bn},removeDynamicOfflineDataFor:function(){return wn},runSynchronization:function(){return qt},setCurrentOfflineMode:function(){return T},setupDynamicOfflineDataHandler:function(){return pn},setupOfflineSync:function(){return on},syncAllDynamicOfflineData:function(){return _n},syncDynamicOfflineData:function(){return Sn},syncOfflinePatientData:function(){return An}});try{self["workbox:window:6.5.4"]&&_()}catch(e){}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var jn=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},Dn=function(e,t){this.type=e,Object.assign(this,t)},Cn={type:"SKIP_WAITING"},Tn=function(t){var n,r,o=function(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new jn,r.en=new jn,r.on=new jn,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Dn(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Dn("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new Dn("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return v(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Dn("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,u=o.prototype;return u.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return g(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),v(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&i(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new Dn("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},u.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},u.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},u.messageSW=function(t){try{return v(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},u.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,Cn)},u.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},u.bn=function(){try{var e=this;return function(t,n){try{var r=v(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}((function(){return v(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(a=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,a),o}(function(){var e=function(){this.Pn=new Map},t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),In=void 0,Mn="x-omrs-offline-response-body",Rn="x-omrs-offline-response-status",Nn="x-omrs-offline-caching-strategy";function Ln(){return Ln=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){S(i,r,o,a,u,"next",e)}function u(e){S(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){var t,n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){switch(r.label){case 0:return[4,w()];case 1:return(t=r.sent())?[4,t.messageSW(e)]:[3,3];case 2:return n=r.sent(),[3,4];case 3:n={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."},r.label=4;case 4:return[2,n]}}))})),Ln.apply(this,arguments)}function Fn(){return Fn=x((function(){var e;return k(this,(function(t){e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return[2,!0]}return[2,!1]}))})),Fn.apply(this,arguments)}function Bn(){return(Bn=x((function(){return k(this,(function(e){return[2,!window.indexedDB]}))}))).apply(this,arguments)}function Un(){return Un=x((function(){return k(this,(function(e){return[2,new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}}))]}))})),Un.apply(this,arguments)}function Gn(){return(Gn=x((function(){var e,t;return k(this,(function(n){switch(n.label){case 0:return[4,j()];case 1:return(t=n.sent())?[3,3]:[4,P()];case 2:t=n.sent(),n.label=3;case 3:return(e=t)?[3,5]:[4,A()];case 4:e=n.sent(),n.label=5;case 5:return[2,e]}}))}))).apply(this,arguments)}var Kn="openmrs3:offline-mode",Vn="unavailable";function zn(){return(zn=x((function(){return k(this,(function(e){switch(e.label){case 0:return[4,D()];case 1:return e.sent()||(Vn="active"===localStorage.getItem(Kn)?"on":"off"),navigator.onLine,[2]}}))}))).apply(this,arguments)}var Hn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,qn=Object.keys,Wn=Array.isArray;"undefined"==typeof Promise||Hn.Promise||(Hn.Promise=Promise);var Yn=Object.getPrototypeOf,$n={}.hasOwnProperty,Jn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;function Xn(e,t){var n;return Qn(e,t)||(n=Yn(e))&&Xn(n,t)}var Zn=[].slice;function er(e,t){if(R(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=er(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:er(u,t.substr(a+1))}}function tr(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){G("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)tr(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?Wn(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var s=e[a];s&&R(e,a)||(s=e[a]={}),tr(s,u,n)}}else void 0===n?Wn(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var nr=[].concat,rr="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(H([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return Hn[e]})),or=rr.map((function(e){return Hn[e]}));V(rr,(function(e){return[e,!0]}));var ir=null;function ar(e){if(!e||"object"!=typeof e)return e;var t=ir&&ir.get(e);if(t)return t;if(Wn(e)){t=[],ir&&ir.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(ar(e[n]))}else if(or.indexOf(e.constructor)>=0)t=e;else{var o=Yn(e);for(var i in t=o===Object.prototype?{}:Object.create(o),ir&&ir.set(e,t),e)R(e,i)&&(t[i]=ar(e[i]))}return t}var ur={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",cr="symbol"==(void 0===sr?"undefined":p(sr))?function(e){var t;return null!=e&&(t=e[sr])&&t.apply(e)}:function(){return null},lr={},fr="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),hr=function(){return!0},pr=!new Error("").stack;function yr(){if(pr)try{throw yr.arguments,new Error}catch(e){return e}return new Error}var vr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(vr),gr={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"};F(Q).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+J(this._e,2))}},toString:function(){return this.name+": "+this.message}}),F(Z).from(Q),F(ee).from(Q);var br=mr.reduce((function(e,t){return e[t]=t+"Error",e}),{}),wr=Q,_r=mr.reduce((function(e,t){var n=function(e,n){this._e=yr(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=gr[t]||r,this.inner=null)},r=t+"Error";return F(n).from(wr),e[t]=n,e}),{});_r.Syntax=SyntaxError,_r.Type=TypeError,_r.Range=RangeError;var Sr=vr.reduce((function(e,t){return e[t+"Error"]=_r[t],e}),{}),Er=mr.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=_r[t]),e}),{});Er.ModifyError=Z,Er.DexieError=Q,Er.BulkError=ee;var Or={},xr=d("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,Yn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Yn(t),e]}(),3),kr=xr[0],Ar=xr[1],Pr=xr[2],jr=Ar&&Ar.then,Dr=kr&&kr.constructor,Cr=!!Pr,Tr=!1,Ir=Pr?function(){Pr.then(me)}:Hn.setImmediate?setImmediate.bind(null,me):Hn.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){me(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(me,0)},Mr=function(e,t){Vr.push([e,t]),Nr&&(Ir(),Nr=!1)},Rr=!0,Nr=!0,Lr=[],Fr=[],Br=null,Ur=ne,Gr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Re,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Re(e[0],e[1])}catch(e){}}))}},Kr=Gr,Vr=[],zr=0,Hr=[],qr={get:function(){var e=function(e,r){var o=this,i=!t.global&&(t!==Kr||n!==Zr),a=i&&!xe(),u=new le((function(n,u){pe(o,new fe(Ie(e,t,i,a),Ie(r,t,i,a),n,u,t))}));return dr&&ve(u,this),u},t=Kr,n=Zr;return e.prototype=Or,e},set:function(e){L(this,"then",e&&e.prototype===Or?qr:{get:function(){return e},set:qr.set})}};function Wr(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&ge();t&&"function"==typeof t.then?Wr(e,(function(e,n){s(t,le)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,he(e)),n&&be()}}),de.bind(null,e))}catch(t){de(e,t)}}function Yr(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=J(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return dr&&((r=J(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Yr(e._prev,t,n)),t}N(le.prototype,{then:qr,_then:function(e,t){pe(this,new fe(null,null,e,t,Kr))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return s(e,t)?n(e):_e(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):_e(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),_e(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Tr=!0;var e=Yr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Tr=!1}}},timeout:function(e,t){var n=this;return e<1/0?new le((function(r,o){var i=setTimeout((function(){return o(new _r.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&L(le.prototype,Symbol.toStringTag,"Dexie.Promise"),Gr.env=De(),N(le,{all:function(){var e=Y.apply(null,arguments).map(ke);return new le((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return le.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(s(e,le))return e;if(e&&"function"==typeof e.then)return new le((function(t,n){e.then(t,n)}));var t=new le(Or,!0,e);return ve(t,Br),t},reject:_e,race:function(){var e=Y.apply(null,arguments).map(ke);return new le((function(t,n){e.map((function(e){return le.resolve(e).then(t,n)}))}))},PSD:{get:function(){return Kr},set:function(e){return Kr=e}},totalEchoes:{get:function(){return Zr}},newPSD:Ee,usePSD:Ce,scheduler:{get:function(){return Mr},set:function(e){Mr=e}},rejectionMapper:{get:function(){return Ur},set:function(e){Ur=e}},follow:function(e,t){return new le((function(n,r){return Ee((function(t,n){var r=Kr;r.unhandleds=[],r.onunhandled=n,r.finalize=oe((function(){var e=this;!function(e){Hr.push((function t(){e(),Hr.splice(Hr.indexOf(t),1)})),++zr,Mr((function(){0==--zr&&we()}),[])}((function(){0===e.unhandleds.length?t():n(e.unhandleds[0])}))}),r.finalize),e()}),t,n,r)}))}}),Dr&&(Dr.allSettled&&L(le,"allSettled",(function(){var e=Y.apply(null,arguments).map(ke);return new le((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return le.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),Dr.any&&"undefined"!=typeof AggregateError&&L(le,"any",(function(){var e=Y.apply(null,arguments).map(ke);return new le((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return le.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var $r={awaits:0,echoes:0,id:0},Jr=0,Qr=[],Xr=0,Zr=0,eo=0;-1===(""+jr).indexOf("[native code]")&&(Oe=xe=te);var to=le.reject;function no(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Kr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return no(e,t,n,r)}))):to(o)}return o._promise(t,(function(e,t){return Ee((function(){return Kr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return to(new _r.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return to(new _r.DatabaseClosed);e.open().catch(te)}return e._state.dbReadyPromise.then((function(){return no(e,t,n,r)}))}var ro=String.fromCharCode(65535),oo="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",io=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),uo=ao,so=ao,co=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},lo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},fo=function(){function e(){o(this,e)}return a(e,[{key:"_trans",value:function(e,t,n){var r=function(e,n,r){if(!r.schema[i])throw new _r.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)},o=this._tx||Kr.trans,i=this.name,a=ge();try{return o&&o.db===this.db?o===Kr.trans?o._promise(e,r,n):Ee((function(){return o._promise(e,r,n)}),{trans:o,transless:Kr.transless||Kr}):no(this.db,e,[this.name],r)}finally{a&&be()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){var t=function(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}};if("string"==typeof e)return new this.db.WhereClause(this,e);if(Wn(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=qn(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&n.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return n.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==ro)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&dr&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,a=d(n.reduce((function(n,r){var i=d(n,2),a=i[0],u=i[1],s=o[r],c=e[r];return[a||s,a||!s?Ne(u,s&&s.multi?function(e){var n=er(e,r);return Wn(n)&&n.some((function(e){return t(c,e)}))}:function(e){return t(c,er(e,r))}):u]}),[null,null]),2),u=a[0],s=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(s):r?this.filter(s):this.where(n).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,Wn(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(R(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){M(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||Wn(e))return this.where(":id").equals(e).modify(t);var n=er(e,this.schema.primKey.keyPath);if(void 0===n)return to(new _r.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?qn(t).forEach((function(n){tr(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:lo})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new _r.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new _r.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new ee("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function ho(e,t){try{var n=We(e),r=We(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(Ye(e),Ye(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=ho(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var po=function(){function e(){o(this,e)}return a(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,to.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,to.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=Ne(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return He(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&M(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return He(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Ue(n,!0))return r.count({trans:e,query:{index:Ve(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return He(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=function(e,t){var n=a(e,i),r=a(t,i);return n<r?-u:n>r?u:0},r=e.split(".").reverse(),o=r[0],i=r.length-1;function a(e,t){return t?a(e[r[t]],t-1):e[o]}var u="next"===this._ctx.dir?1:-1;return this.toArray((function(e){return e.sort(n)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Ue(n,!0)&&n.limit>0){var r=n.valueMapper,o=Ve(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return He(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Ue(t)?Ke(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):Ke(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ke(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return Ge(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return Ge(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Ne(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Ue(t,!0)&&t.limit>0)return this._read((function(e){var n=Ve(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Ge(this._ctx,(function(e){var t=e.primaryKey.toString(),r=R(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=qn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];er(t,o)!==u&&(tr(t,o,u),n=!0)}return n}}var u=n.table.core,s=u.schema.primaryKey,c=s.outbound,l=s.extractKey,f=t.db._options.modifyChunkSize||200,d=[],h=0,p=[],y=function(e,t){var n=t.failures,r=t.numFailures;h+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,s=qn(n)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;d.push(n[c])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var s=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+s),cache:"immutable"}).then((function(d){for(var h=[],p=[],v=c?[]:null,m=[],g=0;g<s;++g){var b=d[g],w={value:q(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):c||0===ho(l(b),l(w.value))?(p.push(w.value),c&&v.push(t[a+g])):(m.push(t[a+g]),h.push(w.value)))}var _=Ue(n)&&n.limit===1/0&&("function"!=typeof e||e===yo)&&{index:n.index,range:n.range};return Promise.resolve(h.length>0&&u.mutate({trans:r,type:"add",values:h}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);y(h.length,e)}))).then((function(){return(p.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:v,values:p,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return y(p.length,e)}))})).then((function(){return(m.length>0||_&&e===yo)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return y(m.length,e)}))})).then((function(){return t.length>a+s&&i(a+f)}))}))};return i(0).then((function(){if(d.length>0)throw new Z("Error modifying one or more objects",d,h,p);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Ue(e)&&(e.isPrimKey&&!so||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new Z("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(yo)}}]),e}(),yo=function(e,t){return t.value=null},vo=function(){function e(){o(this,e)}return a(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Xe(this):new this.Collection(this,(function(){return tt(e,t,!n,!r)}))}catch(e){return Qe(this,oo)}}},{key:"equals",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return nt(e)}))}},{key:"above",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return tt(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Qe(this,oo):new this.Collection(this,(function(){return tt(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Qe(this,"String expected."):this.between(e,e+ro,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):et(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],ro)}},{key:"equalsIgnoreCase",value:function(e){return et(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=Y.apply(lr,arguments);return 0===e.length?Xe(this):et(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=Y.apply(lr,arguments);return 0===e.length?Xe(this):et(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,ro)}},{key:"anyOf",value:function(){var e=this,t=Y.apply(lr,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Qe(this,oo)}if(0===t.length)return Xe(this);var r=new this.Collection(this,(function(){return tt(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=Y.apply(lr,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Qe(this,oo)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=function(e,t){return d(e[0],t[0])},o=this._cmp,i=this._ascending,a=this._descending,u=this._min,s=this._max;if(0===e.length)return Xe(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Qe(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",_r.InvalidArgument);var c,l=!t||!1!==t.includeLowers,f=t&&!0===t.includeUppers,d=i;try{c=e.reduce((function(e,t){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(o(t[0],i[1])<0&&o(t[1],i[0])>0){i[0]=u(i[0],t[0]),i[1]=s(i[1],t[1]);break}}return n===r&&e.push(t),e}),[]),c.sort(r)}catch(e){return Qe(this,oo)}var h=0,p=f?function(e){return i(e,c[h][1])>0}:function(e){return i(e,c[h][1])>=0},y=l?function(e){return a(e,c[h][0])>0}:function(e){return a(e,c[h][0])>=0},v=p,m=new this.Collection(this,(function(){return tt(c[0][0],c[c.length-1][1],!l,!f)}));return m._ondirectionchange=function(e){"next"===e?(v=p,d=i):(v=y,d=a),c.sort(r)},m._addAlgorithm((function(e,t,r){for(var o=e.key;v(o);)if(++h===c.length)return t(r),!1;return!!function(e){return!p(e)&&!y(e)}(o)||(0===n._cmp(o,c[h][1])||0===n._cmp(o,c[h][0])||t((function(){d===i?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),m}},{key:"startsWithAnyOf",value:function(){var e=Y.apply(lr,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Xe(this):this.inAnyRange(e.map((function(e){return[e,e+ro]}))):Qe(this,"startsWithAnyOf() only works with strings")}}]),e}(),mo=Fe(null,"storagemutated"),go=function(){function e(){o(this,e)}return a(e,[{key:"_lock",value:function(){return G(!Kr.global),++this._reculock,1!==this._reculock||Kr.global||(Kr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(G(!Kr.global),0==--this._reculock)for(Kr.global||(Kr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Ce(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&Kr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(G(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new _r.DatabaseClosed(r);case"MissingAPIError":throw new _r.MissingAPI(r.message,r);default:throw new _r.OpenFailed(r)}if(!this.active)throw new _r.TransactionInactive;return G(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Se((function(n){ot(n),t._reject(e.error)})),e.onabort=Se((function(n){ot(n),t.active&&t._reject(new _r.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=Se((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&mo.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return to(new _r.ReadOnly("Transaction is readonly"));if(!this.active)return to(new _r.TransactionInactive);if(this._locked())return new le((function(o,i){r._blockedFuncs.push([function(){r._promise(e,t,n).then(o,i)},Kr])}));if(n)return Ee((function(){var e=new le((function(e,n){r._lock();var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return e.finally((function(){return r._unlock()})),e._lib=!0,e}));var o=new le((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=le.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new le((function(e,r){n.then((function(n){return t._waitingQueue.push(Se(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(Se(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new _r.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(R(t,e))return t[e];var n=this.schema[e];if(!n)throw new _r.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),bo=function(e){try{return e.only([[]]),bo=function(){return[[]]},[[]]}catch(e){return bo=function(){return ro},ro}},wo=0,_o=function(){function e(){o(this,e)}return a(e,[{key:"_parseStoresSpec",value:function(e,t){qn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return it(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Wn(r),0===t)})),o=r.shift();if(o.multi)throw new _r.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new _r.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new _r.Schema("Index must have a name and cannot be an empty string")})),t[n]=ut(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?M(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){M(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,ht(t,[t._allTables,t,t.Transaction.prototype]),dt(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],qn(o),o),t._storeNames=qn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=ce(this._cfg.contentUpgrade||te,e),this}}]),e}();function So(e,t,n,r,o){return le.resolve().then((function(){var i=Kr.transless||Kr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return So(e,t,n,null,o)}))):to(r)}var s,c=fr(o);c&&Oe();var l=le.follow((function(){if(s=o.call(a,a))if(c){var e=xe.bind(null,null);s.then(e,e)}else"function"==typeof s.next&&"function"==typeof s.throw&&(s=Ot(s))}),u);return(s&&"function"==typeof s.then?le.resolve(s).then((function(e){return a.active?e:to(new _r.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return s}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),to(e)}))}))}var Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return f(c({},e),{table:function(t){var n=function(t){var n,r,o=t.query.index;return o.isVirtual?f(c({},t),{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:kt(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:kt(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t},r=e.table(t),o=r.schema,i={},a=[];function u(e,t,n){var r=lt(e),o=i[r]=i[r]||[],s=null==e?0:"string"==typeof e?1:e.length,l=t>0,d=f(c({},n),{isVirtual:l,keyTail:t,keyLength:s,extractKey:st(e),unique:!l&&n.unique});return o.push(d),d.isPrimaryKey||a.push(d),s>1&&u(2===s?e[0]:e.slice(0,s-1),t+1,n),o.sort((function(e,t){return e.keyTail-t.keyTail})),d}var s=u(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[s];var l=!0,d=!1,h=void 0;try{for(var p,y=o.indexes[Symbol.iterator]();!(l=(p=y.next()).done);l=!0){var v=p.value;u(v.keyPath,0,v)}}catch(e){d=!0,h=e}finally{try{l||null==y.return||y.return()}finally{if(d)throw h}}var m=f(c({},r),{schema:f(c({},o),{primaryKey:s,indexes:a,getIndexByKeyPath:function(e){var t=i[lt(e)];return t&&t[0]}}),count:function(e){return r.count(n(e))},query:function(e){return r.query(n(e))},openCursor:function(t){var o=t.query.index,i=o.keyTail,a=o.isVirtual,u=o.keyLength;return a?r.openCursor(n(t)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(kt(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?n.continue(n.key.slice(0,u).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(kt(t,e.MAX_KEY,i),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===u?e[0]:e.slice(0,u)}},value:{get:function(){return n.value}}});return r}(n)})):r.openCursor(t)}});return m}})}};function Oo(e,t,n,r){return n=n||{},r=r||"",qn(e).forEach((function(o){if(R(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=W(i);u!==W(a)?n[r+o]=t[o]:"Object"===u?Oo(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),qn(t).forEach((function(o){R(e,o)||(n[r+o]=t[o])})),n}var xo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return f(c({},e),{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=f(c({},n),{mutate:function(e){var o=function(e){var t=Kr.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?f(c({},e),{keys:o}):c({},e)).type&&(e.values=h(e.values)),e.keys&&(e.keys=h(e.keys)),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((function(i){var a=o.map((function(n,o){var a=i[o],c={onerror:null,onsuccess:null};if("delete"===e.type)u.fire.call(c,n,a,t);else if("add"===e.type||void 0===a){var f=s.fire.call(c,n,e.values[o],t);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||tr(e.values[o],r.keyPath,n))}else{var d=Oo(a,e.values[o]),h=l.fire.call(c,d,n,a,t);if(h){var p=e.values[o];Object.keys(h).forEach((function(e){R(p,e)?p[e]=h[e]:tr(p,e,h[e])}))}}return c}));return n.mutate(e).then((function(t){for(var n=t.failures,r=t.results,u=t.numFailures,s=t.lastResult,c=0;c<o.length;++c){var l=r?r[c]:o[c],f=a[c];null==l?f.onerror&&f.onerror(n[c]):f.onsuccess&&f.onsuccess("put"===e.type&&i[c]?e.values[c]:l)}return{failures:n,results:r,numFailures:u,lastResult:s}})).catch((function(e){return a.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))},i=Kr.trans,a=i.table(t).hook,u=a.deleting,s=a.creating,l=a.updating;switch(e.type){case"add":if(s.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"put":if(s.fire===te&&l.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"delete":if(u.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"deleteRange":if(u.fire===te)break;return i._promise("readwrite",(function(){return function(e){return d(e.trans,e.range,1e4)}(e)}),!0)}return n.mutate(e);function d(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:d(e,f(c({},t),{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},ko={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return f(c({},n),{getMany:function(e){if(!e.cache)return n.getMany(e);var t=At(e.keys,e.trans._cache,"clone"===e.cache);return t?le.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?q(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},Ao=function(e,t){if(!this){var n=new Ao;return e&&"d"in e&&M(n,e),n}M(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Po(e,t,n){var r=ho(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Pt(e))return M(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(ho(n,e.from)<0)return o?Po(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Ct(e);if(ho(t,e.to)>0)return i?Po(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Ct(e);ho(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ho(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&jt(e,o),i&&a&&jt(e,i)}}N(Ao.prototype,u({add:function(e){return jt(this,e),this},addKey:function(e){return Po(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return Po(t,e,e)})),this}},sr,(function(){return Dt(this)})));var jo,Do={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Ao(e.MIN_KEY,e.MAX_KEY);return f(c({},e),{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,s=a.outbound,l=f(c({},o),{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),s=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new Ao)},c=s(""),l=s(":dels"),f=e.type,h=d("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),p=h[0],y=h[1],v=e.trans._cache;return o.mutate(e).then((function(e){if(Wn(p)){"delete"!==f&&(p=e.results),c.addKeys(p);var t=At(p,v);t||"add"===f||l.addKeys(p),(t||y)&&function(e,t,n,r){t.indexes.forEach((function(t){var o=function(e){return null!=e?t.extractKey(e):null},i=e(t.name||""),a=function(e){return t.multiEntry&&Wn(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(n||r).forEach((function(e,t){var i=n&&o(n[t]),u=r&&o(r[t]);0!==ho(i,u)&&(null!=i&&a(i),null!=u&&a(u))}))}))}(s,i,t,y)}else if(p){var r={from:p.lower,to:p.upper};l.add(r),c.add(r)}else c.add(n),l.add(n),i.indexes.forEach((function(e){return s(e.name).add(n)}));return e}))}}),h=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new Ao(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},p={get:function(e){return[a,new Ao(e.key)]},getMany:function(e){return[a,(new Ao).addKeys(e.keys)]},count:h,query:h,openCursor:h};return qn(p).forEach((function(e){l[e]=function(i){var a=Kr.subscr;if(a){var l=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new Ao)},h=l(""),y=l(":dels"),v=d(p[e](i),2),m=v[0],g=v[1];if(l(m.name||"").add(g),!m.isPrimaryKey){if("count"!==e){var b="query"===e&&s&&i.values&&o.query(f(c({},i),{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(s&&i.values)return b.then((function(e){var n=e.result;return h.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?h.addKeys(n):y.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return y.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return y.addKey(e),e}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return t}))}y.add(n)}}return o[e].apply(this,arguments)}})),l}})}},Co=function(){function e(t,n){var r=this;o(this,e),this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=c({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var a=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:te,dbReadyPromise:null,cancelOpen:te,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new le((function(e){s.dbReadyResolve=e})),s.openCanceller=new le((function(e,t){s.cancelOpen=t})),this._state=s,this.name=t,this.on=Fe(this,"populate","blocked","versionchange","close",{ready:[ce,te]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(t){return function(n,o){e.vip((function(){var e=r._state;if(e.openComplete)e.dbOpenError||le.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var i=r;o||t((function e(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,Be(po.prototype,(function(e,t){this.db=u;var n=lo,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==ne?a:null}}))),this.Table=function(e){return Be(fo.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Fe(null,{creating:[ie,te],reading:[re,ne],updating:[ue,te],deleting:[ae,te]})}))}(this),this.Transaction=function(e){return Be(go.prototype,(function(t,n,r,o,i){var a=this;this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Fe(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 le((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),to(e)}))}))}(this),this.Version=function(e){return Be(_o.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Be(vo.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};var o=e._deps.indexedDB;if(!o)throw new _r.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(e,t){return o.cmp(t,e)},this._max=function(e,t){return o.cmp(e,t)>0?e:t},this._min=function(e,t){return o.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=bo(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){r.on("blocked").fire(e),io.filter((function(e){return e.name===r.name&&e!==r&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Eo),this.use(xo),this.use(Do),this.use(ko),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach((function(e){return e(r)}))}return a(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new _r.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new _r.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(pt),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||Kr.letThrough||this._vip)?e():new le((function(e,n){if(t._state.openComplete)return n(new _r.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new _r.DatabaseClosed);t.open().catch(te)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=function(){if(n.openCanceller!==o)throw new _r.DatabaseClosed("db.open() was cancelled")},n=e._state,r=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?to(n.dbOpenError):e}));dr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,a=null,u=!1;return le.race([o,("undefined"==typeof navigator?le.resolve():Et()).then((function(){return new le((function(o,i){if(t(),!r)throw new _r.MissingAPI;var s=e.name,c=n.autoSchema?r.open(s):r.open(s,Math.round(10*e.verno));if(!c)throw new _r.MissingAPI;c.onerror=rt(i),c.onblocked=Se(e._fireOnBlocked),c.onupgradeneeded=Se((function(t){if(a=c.transaction,n.autoSchema&&!e._options.allowEmptyDB){c.onerror=ot,a.abort(),c.result.close();var o=r.deleteDatabase(s);o.onsuccess=o.onerror=Se((function(){i(new _r.NoSuchDatabase("Database ".concat(s," doesnt exist")))}))}else{a.onerror=rt(i);var l=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;u=l<1,e._novip.idbdb=c.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=Kr.transless||Kr;Ee((function(){Kr.trans=i,Kr.transless=u,0===t?(qn(o).forEach((function(e){vt(n,e,o[e].primKey,o[e].indexes)})),ft(e,n),le.follow((function(){return e.on.populate.fire(i)})).catch(a)):function(e,t,n,r){var o=e._novip,i=[],a=o._versions,u=o._dbSchema=gt(0,o.idbdb,r),s=!1;return a.filter((function(e){return e._cfg.version>=t})).forEach((function(e){i.push((function(){var i=u,a=e._cfg.dbschema;bt(o,i,r),bt(o,a,r),u=o._dbSchema=a;var c=yt(i,a);c.add.forEach((function(e){vt(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new _r.Upgrade("Not yet support for changing primary key");var t=r.objectStore(e.name);e.add.forEach((function(e){return mt(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),mt(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=e._cfg.contentUpgrade;if(l&&e._cfg.version>t){ft(o,r),n._memoizedTables={},s=!0;var f=z(a);c.del.forEach((function(e){f[e]=i[e]})),ht(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],qn(f),f),n.schema=f;var d,h=fr(l);h&&Oe();var p=le.follow((function(){if((d=l(n))&&h){var e=xe.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?le.resolve(d):p.then((function(){return d}))}})),i.push((function(t){s&&uo||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(n){return null==e[n]&&t.db.deleteObjectStore(n)}))}(e._cfg.dbschema,t),ht(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function e(){return i.length?le.resolve(i.shift()(n.idbtrans)).then(e):le.resolve()}().then((function(){var e,t;t=r,qn(e=u).forEach((function(n){t.db.objectStoreNames.contains(n)||vt(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,l/10,a,i)}}),i),c.onsuccess=Se((function(){a=null;var t,r=e._novip.idbdb=c.result,i=B(r.objectStoreNames);if(i.length>0)try{var l=r.transaction(1===(t=i).length?t[0]:t,"readonly");n.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=gt(0,t,n);r._storeNames=B(t.objectStoreNames,0),dt(r,[r._allTables],qn(o),o)}(e,r,l):(bt(e,e._dbSchema,l),function(e,t){var n=yt(gt(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((function(e){return e.add.length||e.change.length})))}(e,l)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ft(e,l)}catch(e){}io.push(e),r.onversionchange=Se((function(t){n.vcFired=!0,e.on("versionchange").fire(t)})),r.onclose=Se((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!_t(n)&&"__dbnames"!==t&&wt(n,r).put({name:t}).catch(te)}(e._deps,s),o()}),i)}))}))]).then((function(){return t(),n.onReadyBeingFired=[],le.resolve(St((function(){return e.on.ready.fire(e.vip)}))).then((function t(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ce,te);return n.onReadyBeingFired=[],le.resolve(St((function(){return r(e.vip)}))).then(t)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return e})).catch((function(t){n.dbOpenError=t;try{a&&a.abort()}catch(e){}return o===n.openCanceller&&e._close(),to(t)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=io.indexOf(this);if(t>=0&&io.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new le((function(t){e.dbReadyResolve=t})),e.openCanceller=new le((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new _r.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new le((function(r,o){var i=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=Se((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!_t(n)&&"__dbnames"!==t&&wt(n,r).delete(t).catch(te)}(e._deps,e.name),r()})),t.onerror=rt(o),t.onblocked=e._fireOnBlocked};if(t)throw new _r.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return qn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=xt.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=Kr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=s(e,r.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new _r.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new _r.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new _r.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):to(e)}var c=So.bind(null,this,i,a,o,n);return o?o._promise(i,c,"lock"):Kr.trans?Ce(Kr.transless,(function(){return r._whenReady(c)})):this._whenReady(c)}},{key:"table",value:function(e){if(!R(this._allTables,e))throw new _r.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),To="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Io=function(){function e(t){o(this,e),this._subscribe=t}return a(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:To,value:function(){return this}}]),e}();try{jo={indexedDB:Hn.indexedDB||Hn.mozIndexedDB||Hn.webkitIndexedDB||Hn.msIndexedDB,IDBKeyRange:Hn.IDBKeyRange||Hn.webkitIDBKeyRange}}catch(r){jo={indexedDB:null,IDBKeyRange:null}}var Mo=Co;N(Mo,f(c({},Er),{delete:function(e){return new Mo(e,{addons:[]}).delete()},exists:function(e){return new Mo(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return _t(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):wt(t,n).toCollection().primaryKeys()}(Mo.dependencies).then(e)}catch(e){return to(new _r.MissingAPI)}},defineClass:function(){return function(e){M(this,e)}},ignoreTransaction:function(e){return Kr.trans?Ce(Kr.transless,e):e()},vip:St,async:function(e){return function(){try{var t=Ot(e.apply(this,arguments));return t&&"function"==typeof t.then?t:le.resolve(t)}catch(e){return to(e)}}},spawn:function(e,t,n){try{var r=Ot(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:le.resolve(r)}catch(e){return to(e)}},currentTransaction:{get:function(){return Kr.trans||null}},waitFor:function(e,t){var n=le.resolve("function"==typeof e?Mo.ignoreTransaction(e):e).timeout(t||6e4);return Kr.trans?Kr.trans.waitFor(n):n},Promise:le,debug:{get:function(){return dr},set:function(e){$(e,"dexie"===e?function(){return!0}:co)}},derive:F,extend:M,props:N,override:U,Events:Fe,on:mo,liveQuery:function(e){return new Io((function(t){var n=function(){return qn(a).some((function(e){return i[e]&&function(e,t){var n=Dt(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=Dt(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(ho(u.from,o.to)<=0&&ho(u.to,o.from)>=0)return!0;ho(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=fr(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var s=!1,c=!1,l=function(e){It(i,e),n()&&f()},f=function(){if(!s&&!o){i={};var d={},h=function(t){r&&Oe();var n=function(){return Ee(e,{subscr:t,trans:null})},o=Kr.trans?Ce(Kr.transless,n):n();return r&&o.then(xe,xe),o}(d);c||(mo("storagemutated",l),c=!0),s=!0,Promise.resolve(h).then((function(e){s=!1,o||(n()?f():(i={},a=d,t.next&&t.next(e)))}),(function(e){s=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:It,getByKeyPath:er,setByKeyPath:tr,delByKeyPath:function(e,t){"string"==typeof t?tr(e,t,void 0):"length"in t&&[].map.call(t,(function(t){tr(e,t,void 0)}))},shallowClone:z,deepClone:q,getObjectDiff:Oo,cmp:ho,asap:K,minKey:-1/0,addons:[],connections:io,errnames:br,dependencies:jo,semVer:"3.2.3",version:"3.2.3".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),Mo.maxKey=bo(Mo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(e){var t;Ro||(ao?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),Ro=!0,dispatchEvent(t),Ro=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;Ro||Mt(t)})));var Ro=!1;if("undefined"!=typeof BroadcastChannel){var No=new BroadcastChannel("x-storagemutated-1");"function"==typeof No.unref&&No.unref(),mo("storagemutated",(function(e){Ro||No.postMessage(e)})),No.onmessage=function(e){e.data&&Mt(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(e){try{Ro||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&h(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Mt(t.changedParts)}}));var Lo=self.document&&navigator.serviceWorker;Lo&&Lo.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Mt(t.changedParts)}))}le.rejectionMapper=function(e,t){if(!e||s(e,Q)||s(e,TypeError)||s(e,SyntaxError)||!e.name||!Sr[e.name])return e;var n=new Sr[e.name](t||e.message,e);return"stack"in e&&L(n,"stack",{get:function(){return this.inner.stack}}),n},$(dr,co);var Fo=l(766),Bo=l(685);function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Uo(e)}function Go(e,t){return Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Go(e,t)}var Ko=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Go(e,t)}(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uo(e);if(t){var o=Uo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":p(n))&&"function"!=typeof t?Rt(e):t;var n}(this,n)}}(n);function n(){var e;return function(e,t){if(!s(e,t))throw new TypeError("Cannot call a class as a function")}(this,n),Nt(Rt(e=t.call(this,"EsmOffline")),"syncQueue",void 0),Nt(Rt(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}(Co),Vo=new Ko,zo={},Ho=(0,Bo.createGlobalStore)("offline-synchronization",{});function qo(){return qo=Ut((function(){var e,t,n,r,o,i,a,u,s,c,l,f,d;return zt(this,(function(h){switch(h.label){case 0:return Ho.getState().synchronization?[2]:[4,Vo.syncQueue.count()];case 1:e=h.sent(),t={},n=Object.entries(zo),r=n.length,o={},i=new AbortController,a=function(){var e,t,n=Ho.getState().synchronization;Ho.setState({synchronization:(e=Kt({},n),t={pendingCount:n.pendingCount-1},t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e)})},h.label=2;case 2:h.trys.push([2,,10,11]),Ho.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}}),u=0,h.label=3;case 3:if(!(u<r&&n.length>0))return[3,8];s=n.length,h.label=4;case 4:return s--?(c=Vt(n[s],2),l=c[0],f=c[1],(d=f.dependsOn.map((function(e){return t[e]}))).every(Boolean)?(o[l]={},[4,Promise.all(d)]):[3,6]):[3,7];case 5:h.sent(),t[l]=function(e,t,n,r){return Wo.apply(this,arguments)}(f,o,i,a),n.splice(s,1),h.label=6;case 6:return[3,4];case 7:return u++,[3,3];case 8:return[4,Promise.allSettled(Object.values(t))];case 9:return h.sent(),[3,11];case 10:return Ho.setState({synchronization:void 0}),[7];case 11:return[2]}}))})),qo.apply(this,arguments)}function Wo(){return Wo=Ut((function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h,p,y,v,m,g,b,w;return zt(this,(function(_){switch(_.label){case 0:return o=e.type,i=e.dependsOn,a=e.process,u=[],s=[],[4,Wt()];case 1:return c=_.sent(),[4,Vo.syncQueue.where({type:o,userId:c}).each((function(e,t){u.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)}))];case 2:_.sent(),l=0,_.label=3;case 3:if(!(l<u.length))return[3,11];f=Vt(u[l],3),d=f[0],h=f[1],p=f[2],y=p.id,v=p.dependencies,m=void 0===v?[]:v,_.label=4;case 4:return _.trys.push([4,7,9,10]),[4,a(h,{abort:n,index:l,items:s,userId:c,dependencies:m.map((function(e){var n=e.id,r=e.type;return i.includes(r)?t[r][n]:void 0}))})];case 5:return g=_.sent(),void 0!==y&&(t[o][y]=g),[4,Vo.syncQueue.delete(d)];case 6:return _.sent(),[3,10];case 7:return b=_.sent(),[4,Vo.syncQueue.update(d,{lastError:{name:null==b?void 0:b.name,message:null!==(w=null==b?void 0:b.message)&&void 0!==w?w:null==b?void 0:b.toString()}})];case 8:return _.sent(),[3,10];case 9:return r(),[7];case 10:return l++,[3,3];case 11:return[2]}}))})),Wo.apply(this,arguments)}function Yo(){return(Yo=Ut((function(){var e;return zt(this,(function(t){switch(t.label){case 0:return[4,(0,Fo.getLoggedInUser)()];case 1:return[2,(null==(e=t.sent())?void 0:e.uuid)||"*"]}}))}))).apply(this,arguments)}function $o(){return($o=Ut((function(e,t,n,r){var o;return zt(this,(function(i){switch(i.label){case 0:return void 0===(o=r&&r.id)?[3,2]:[4,Vo.syncQueue.where({type:t,userId:e}).filter((function(e){return(null==e?void 0:e.descriptor.id)===o})).delete().catch(Co.errnames.DatabaseClosed)];case 1:i.sent(),i.label=2;case 2:return[4,Vo.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(Co.errnames.DatabaseClosed,(function(){return-1}))];case 3:return[2,i.sent()]}}))}))).apply(this,arguments)}function Jo(){return(Jo=Ut((function(e,t,n){return zt(this,(function(r){switch(r.label){case 0:return[4,Wt()];case 1:return[4,Yt(r.sent(),e,t,n)];case 2:return[2,r.sent()]}}))}))).apply(this,arguments)}function Qo(){return(Qo=Ut((function(e,t){return zt(this,(function(n){switch(n.label){case 0:return[4,Qt(e,t)];case 1:return[2,n.sent().map((function(e){return e.content}))]}}))}))).apply(this,arguments)}function Xo(){return(Xo=Ut((function(e,t){var n;return zt(this,(function(r){switch(r.label){case 0:return n=t?{type:t,userId:e}:{userId:e},[4,Vo.syncQueue.where(n).toArray().catch(Co.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function Zo(){return(Zo=Ut((function(e){return zt(this,(function(t){switch(t.label){case 0:return[4,Wt()];case 1:return[4,Jt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ei(){return(ei=Ut((function(e){return zt(this,(function(t){switch(t.label){case 0:return[4,Wt()];case 1:return[4,Qt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ti(){return(ti=Ut((function(e){return zt(this,(function(t){switch(t.label){case 0:return[4,Vo.syncQueue.get(e).catch(Co.errnames.DatabaseClosed,(function(){}))];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function ni(){return(ni=Ut((function(e){var t,n,r;return zt(this,(function(o){switch(o.label){case 0:return[4,en(e)];case 1:if(!(n=o.sent()))throw new Error("No sync item with the ID ".concat(e," exists."));if(!(r=null===(t=zo[n.type])||void 0===t?void 0:t.options.onBeginEditSyncItem))throw new Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(n.type,'" supports editing items.'));return r(n),[2]}}))}))).apply(this,arguments)}function ri(){return(ri=Ut((function(e){return zt(this,(function(t){switch(t.label){case 0:return[4,Vo.syncQueue.delete(e).catch(Co.errnames.DatabaseClosed)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}for(var oi,ii={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},ai=new Uint8Array(16),ui=[],si=0;si<256;++si)ui.push((si+256).toString(16).slice(1));var ci=function(e,t,n){if(ii.randomUUID&&!t&&!e)return ii.randomUUID();var r=(e=e||{}).random||(e.rng||an)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ui[e[t+0]]+ui[e[t+1]]+ui[e[t+2]]+ui[e[t+3]]+"-"+ui[e[t+4]]+ui[e[t+5]]+"-"+ui[e[t+6]]+ui[e[t+7]]+"-"+ui[e[t+8]]+ui[e[t+9]]+"-"+ui[e[t+10]]+ui[e[t+11]]+ui[e[t+12]]+ui[e[t+13]]+ui[e[t+14]]+ui[e[t+15]]}(r)},li="OFFLINE+",fi={};function di(){return(di=fn((function(e){return dn(this,(function(t){switch(t.label){case 0:return[4,En()];case 1:return[4,vn(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function hi(){return(hi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return n=t?{type:t,users:e}:{users:e},[4,(new Ko).dynamicOfflineData.where(n).toArray().catch(Co.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function pi(){return(pi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,gn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function yi(){return yi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new Ko).dynamicOfflineData.get({type:t,identifier:n}).catch(Co.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?[3,3]:[4,r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(Co.errnames.DatabaseClosed)];case 2:return i.sent(),[3,5];case 3:return o.users.includes(e)?[3,5]:[4,r.dynamicOfflineData.update(o.id,{users:(a=o.users,function(e){if(Array.isArray(e))return cn(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])}).catch(Co.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}var a}))})),yi.apply(this,arguments)}function vi(){return(vi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,wn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function mi(){return mi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new Ko).dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(Co.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?o.users.length>1?[4,r.dynamicOfflineData.update(o.id,{users:o.users.filter((function(t){return t!==e}))}).catch(Co.errnames.DatabaseClosed)]:[3,3]:[3,5];case 2:return i.sent(),[3,5];case 3:return[4,r.dynamicOfflineData.delete(o.id).catch(Co.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}}))})),mi.apply(this,arguments)}function gi(){return gi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return[4,yn(e)];case 1:return n=r.sent(),[4,Promise.all(n.map((o=fn((function(e){return dn(this,(function(n){return[2,Sn(e.type,e.identifier,t)]}))})),function(e){return o.apply(this,arguments)})))];case 2:return r.sent(),[2]}var o}))})),gi.apply(this,arguments)}function bi(){return bi=fn((function(e,t,n){var r,o,i,a,u,s,c,l,f;return dn(this,(function(d){switch(d.label){case 0:return[4,mn(e,t)];case 1:return d.sent(),r=new Ko,[4,En()];case 2:return o=d.sent(),[4,r.dynamicOfflineData.get({type:e,identifier:t}).catch(Co.errnames.DatabaseClosed,(function(){}))];case 3:return i=d.sent(),a=hn().filter((function(t){return t.type===e})),i?[4,Promise.all(a.map((h=fn((function(e){var r,o,i;return dn(this,(function(a){try{return e.sync(t,n),[2,{id:e.id,error:void 0}]}catch(t){return i=null!==(o=null===(r=t.message)||void 0===r?void 0:r.toString())&&void 0!==o?o:t.toString(),[2,{id:e.id,error:i}]}return[2]}))})),function(e){return h.apply(this,arguments)})))]:[2];case 4:return u=d.sent(),s=u.filter((function(e){return!e.error})).map((function(e){return e.id})),c=u.filter((function(e){return e.error})).map((function(e){return e.id})),l=u.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),f={syncedOn:new Date,syncedBy:o,succeededHandlers:s,erroredHandlers:c,errors:l},i.id?[4,r.dynamicOfflineData.update(i.id,{syncState:f}).catch(Co.errnames.DatabaseClosed)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2]}var h}))})),bi.apply(this,arguments)}function wi(){return(wi=fn((function(){var e;return dn(this,(function(t){switch(t.label){case 0:return[4,(0,Fo.getLoggedInUser)()];case 1:if(!(e=t.sent().uuid))throw new Error("Using the dynamic offline data API requires a logged in user.");return[2,e]}}))}))).apply(this,arguments)}var _i=(0,Bo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function Si(){return Si=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){On(i,r,o,a,u,"next",e)}function u(e){On(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return Pn(),[4,Sn("patient",e)];case 1:return t.sent(),[2]}}))})),Si.apply(this,arguments)}}(),y}())}}}))},925:function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")},n=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}},r=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},o=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)},i=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},a=function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},u=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},s=function(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},c=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)},f=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}},d=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}};function h(e,t,n){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}},h(e,t,n||e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}System.register(["dayjs"],(function(e,n){var l={};return{setters:[function(e){l.default=e.default}],execute:function(){e(function(){var e={6893:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(2712).__exportStar(n(715),t)},2943:function(e,t,n){"use strict";var r=function(e){return Intl.getCanonicalLocales(e)},o=function(e,t){var n=t.zoneNames,r=t.uppercaseLinks,o=e.toUpperCase(),i=n.reduce((function(e,t){return e[t.toUpperCase()]=t,e}),{}),a=r[o]||i[o];return"Etc/UTC"===a||"Etc/GMT"===a?"UTC":a},a=function(e){if("symbol"==(void 0===e?"undefined":c(e)))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},u=function(e){if(void 0===e)return NaN;if(null===e)return 0;if("boolean"==typeof e)return e?1:0;if("number"==typeof e)return e;if("symbol"==(void 0===e?"undefined":c(e))||"bigint"==(void 0===e?"undefined":c(e)))throw new TypeError("Cannot convert symbol/bigint to number");return Number(e)},s=function(e){return isFinite(e)?Math.abs(e)>8640000000000001?NaN:function(e){var t=u(e);if(isNaN(t)||f(t,-0))return 0;if(isFinite(t))return t;var n=Math.floor(Math.abs(t));return t<0&&(n=-n),f(n,-0)?0:n}(e):NaN},l=function(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)},f=function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},d=function(e){return new Array(e)},h=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":"symbol"==(void 0===e?"undefined":c(e))?"Symbol":"bigint"==(void 0===e?"undefined":c(e))?"BigInt":void 0},y=function(e,t){return e-Math.floor(e/t)*t},v=function(e){return Math.floor(e/xe)},m=function(e){return y(v(e)+4,7)},g=function(e){return Date.UTC(e,0)/xe},b=function(e){return Date.UTC(e,0)},w=function(e){return new Date(e).getUTCFullYear()},_=function(e){return e%4!=0?365:e%100!=0?366:e%400!=0?365:366},S=function(e){return v(e)-g(w(e))},E=function(e){return 365===_(w(e))?0:1},O=function(e){var t=S(e),n=E(e);if(t>=0&&t<31)return 0;if(t<59+n)return 1;if(t<90+n)return 2;if(t<120+n)return 3;if(t<151+n)return 4;if(t<181+n)return 5;if(t<212+n)return 6;if(t<243+n)return 7;if(t<273+n)return 8;if(t<304+n)return 9;if(t<334+n)return 10;if(t<365+n)return 11;throw new Error("Invalid time")},x=function(e){var t=S(e),n=O(e),r=E(e);if(0===n)return t+1;if(1===n)return t-30;if(2===n)return t-58-r;if(3===n)return t-89-r;if(4===n)return t-119-r;if(5===n)return t-150-r;if(6===n)return t-180-r;if(7===n)return t-211-r;if(8===n)return t-242-r;if(9===n)return t-272-r;if(10===n)return t-303-r;if(11===n)return t-333-r;throw new Error("Invalid time")},k=function(e){return y(Math.floor(e/Ce),ke)},A=function(e){return y(Math.floor(e/De),Ae)},P=function(e){return y(Math.floor(e/je),Pe)},j=function(e,t,n){if("function"!=typeof e)return!1;if(null==n?void 0:n.boundTargetFunction)return i(t,null==n?void 0:n.boundTargetFunction);if("object"!=typeof t)return!1;var r=e.prototype;if("object"!=typeof r)throw new TypeError("OrdinaryHasInstance called on an object with an invalid prototype property.");return Object.prototype.isPrototypeOf.call(r,t)},D=function(e){return y(e,je)},C=function(e){return void 0===e?Object.create(null):l(e)},T=function(e,t,n,r){if(void 0===e)return r;var o=Number(e);if(isNaN(o)||o<t||o>n)throw new RangeError("".concat(o," is outside of range [").concat(t,", ").concat(n,"]"));return Math.floor(o)},I=function(e,t,n,r,o){return T(e[t],n,r,o)},M=function(e,t,n,r,o){if("object"!=typeof e)throw new TypeError("Options must be an object");var i=e[t];if(void 0!==i){if("boolean"!==n&&"string"!==n)throw new TypeError("invalid type");if("boolean"===n&&(i=Boolean(i)),"string"===n&&(i=a(i)),void 0!==r&&!r.filter((function(e){return e==i})).length)throw new RangeError("".concat(i," is not within ").concat(r.join(", ")));return i}return o},R=function(e){if(void 0===e)return Object.create(null);if("object"==typeof e)return e;throw new TypeError("Options must be an object")},N=function(e,t,n,r,o,i){var u=e[t];if(void 0===u)return i;if(!0===u)return r;if(!1===Boolean(u))return o;if("true"===(u=a(u))||"false"===u)return i;if(-1===(n||[]).indexOf(u))throw new RangeError("Invalid value ".concat(u));return u},L=function(e){return e.slice(e.indexOf("-")+1)},F=function(e){return Ie.indexOf(e)>-1},B=function(e,t){var n=t.zoneNamesFromData,r=t.uppercaseLinks,o=e.toUpperCase(),i=new Set,a=new Set;return n.map((function(e){return e.toUpperCase()})).forEach((function(e){return i.add(e)})),Object.keys(r).forEach((function(e){a.add(e.toUpperCase()),i.add(r[e].toUpperCase())})),i.has(o)||a.has(o)},U=function(e){return 3===(e=e.replace(/([a-z])/g,(function(e,t){return t.toUpperCase()}))).length&&!Me.test(e)},G=function(e){if(F(e=e.replace(/([A-Z])/g,(function(e,t){return t.toLowerCase()}))))return!0;var t=e.split("-per-");if(2!==t.length)return!1;var n=t[0],r=t[1];return!(!F(n)||!F(r))},K=function(e,t,n,r){if(e===t)return t;if(void 0===r)throw new Error("unsignedRoundingMode is mandatory");if("zero"===r)return t;if("infinity"===r)return n;var o=e-t,i=n-e;if(o<i)return t;if(i<o)return n;if(o!==i)throw new Error("Unexpected error");if("half-zero"===r)return t;if("half-infinity"===r)return n;if("half-even"!==r)throw new Error("Unexpected value for unsignedRoundingMode: ".concat(r));return 0==t/(n-t)%2?t:n},V=function(e){return e},z=function(e){return Math.floor(Math.log(e)*Math.LOG10E)},H=function(e,t){if("function"==typeof e.repeat)return e.repeat(t);for(var n=new Array(t),r=0;r<n.length;r++)n[r]=e;return n.join("")},q=function(e,t,n,r){e.get(t)||e.set(t,Object.create(null)),e.get(t)[n]=r},W=function(e,t,n){for(var r=0,o=Object.keys(n);r<o.length;r++){var i=o[r];q(e,t,i,n[i])}},Y=function(e,t,n){return $(e,t,n)[n]},$=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.get(t);if(!o)throw new TypeError("".concat(t," InternalSlot has not been initialized"));return n.reduce((function(e,t){return e[t]=o[t],e}),Object.create(null))},J=function(e){return"literal"===e.type},Q=function(e,t,n){var r=n.value;Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})},X=function(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n})},Z=function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)},ee=function(e,t,n){var r=(0,n.getInternalSlots)(e),o=r.notation,i=r.dataLocaleData,a=r.numberingSystem;switch(o){case"standard":return 0;case"scientific":return t;case"engineering":return 3*Math.floor(t/3);default:var u=r.compactDisplay,s=r.style,c=r.currencyDisplay,l=void 0;if("currency"===s&&"name"!==c)l=(i.numbers.currency[a]||i.numbers.currency[i.numbers.nu[0]]).short;else{var f=i.numbers.decimal[a]||i.numbers.decimal[i.numbers.nu[0]];l="long"===u?f.long:f.short}if(!l)return 0;var d=String(Math.pow(10,t)),h=Object.keys(l);if(d<h[0])return 0;if(d>h[h.length-1])return h[h.length-1].length-1;var p=h.indexOf(d);if(-1===p)return 0;var y=h[p];return"0"===l[y].other?0:y.length-l[y].other.match(/0+/)[0].length}},te=function(e,t,n){var r,o,i,a,u=function(e,t){return t<0?e*Math.pow(10,-t):e/Math.pow(10,t)},s=n;if(0===e)r=H("0",s),o=0,i=0;else{var c=e.toString(),l=c.indexOf("e"),f=c.split("e"),d=f[0],h=f[1],p=d.replace(".","");if(l>=0&&p.length<=s)o=+h,r=p+H("0",s-p.length),i=e;else{var y=(o=z(e))-s+1,v=Math.round(u(e,y));u(v,s-1)>=10&&(o+=1,v=Math.floor(v/10)),r=v.toString(),i=u(v,s-1-o)}}if(o>=s-1?(r+=H("0",o-s+1),a=o+1):o>=0?(r="".concat(r.slice(0,o+1),".").concat(r.slice(o+1)),a=o+1):(r="0.".concat(H("0",-o-1)).concat(r),a=1),r.indexOf(".")>=0&&n>t){for(var m=n-t;m>0&&"0"===r[r.length-1];)r=r.slice(0,-1),m--;"."===r[r.length-1]&&(r=r.slice(0,-1))}return{formattedString:r,roundedNumber:i,integerDigitsCount:a}},ne=function(e,t,n){var r,o,i=n,a=Math.round(e*Math.pow(10,i)),u=a/Math.pow(10,i);if(a<1e21)r=a.toString();else{var s=(r=a.toString()).split("e"),c=s[0],l=s[1];r=c.replace(".",""),r+=H("0",Math.max(+l-r.length+1,0))}if(0!==i){var f=r.length;f<=i&&(r=H("0",i+1-f)+r,f=i+1);var d=r.slice(0,f-i),h=r.slice(f-i);r="".concat(d,".").concat(h),o=d.length}else o=r.length;for(var p=n-t;p>0&&"0"===r[r.length-1];)r=r.slice(0,-1),p--;return"."===r[r.length-1]&&(r=r.slice(0,-1)),{formattedString:r,roundedNumber:u,integerDigitsCount:o}},re=function(e,t){var n,r=t<0||f(t,-0);switch(r&&(t=-t),e.roundingType){case"significantDigits":n=te(t,e.minimumSignificantDigits,e.maximumSignificantDigits);break;case"fractionDigits":n=ne(t,e.minimumFractionDigits,e.maximumFractionDigits);break;default:(n=te(t,1,2)).integerDigitsCount>1&&(n=ne(t,0,0))}t=n.roundedNumber;var o=n.formattedString,i=n.integerDigitsCount,a=e.minimumIntegerDigits;return i<a&&(o=H("0",a-i)+o),r&&(t=-t),{roundedNumber:t,formattedString:o}},oe=function(e,t,n){var r=n.getInternalSlots;if(0===t)return[0,0];t<0&&(t=-t);var o=z(t),i=ee(e,o,{getInternalSlots:r});t=i<0?t*Math.pow(10,-i):t/Math.pow(10,i);var a=re(r(e),t);return 0===a.roundedNumber||z(a.roundedNumber)===o-i?[i,o]:[ee(e,o+1,{getInternalSlots:r}),o+1]},ie=function(e,t){var n=t.currencyDigitsData;return h(n,e)?n[e]:2},ae=function(e,t,n){var r=(0,n.getInternalSlots)(e),o=r.dataLocaleData.numbers.symbols[r.numberingSystem].approximatelySign;return t.push({type:"approximatelySign",value:o}),t},ue=function(e,t,n,r){var o,i,a=e.sign,u=e.exponent,s=e.magnitude,c=r.notation,l=r.style,f=r.numberingSystem,d=t.numbers.nu[0],h=null;if("compact"===c&&s&&(h=function(e,t,n,r,o,i,a){var u,s,c=e.roundedNumber,l=e.sign,f=e.magnitude,d=String(Math.pow(10,f)),h=n.numbers.nu[0];if("currency"===r&&"name"!==i){var p=null===(u=((y=n.numbers.currency)[a]||y[h]).short)||void 0===u?void 0:u[d];if(!p)return null;s=le(t,c,p)}else{var y,v=((y=n.numbers.decimal)[a]||y[h])[o][d];if(!v)return null;s=le(t,c,v)}return"0"===s?null:s=ce(s,l).replace(/([^\s;\-\+\d¤]+)/g,"{c:$1}").replace(/0+/,"0")}(e,n,t,l,r.compactDisplay,r.currencyDisplay,f)),"currency"===l&&"name"!==r.currencyDisplay){var p=t.currencies[r.currency];if(p)switch(r.currencyDisplay){case"code":o=r.currency;break;case"symbol":o=p.symbol;break;default:o=p.narrow}else o=r.currency}i=h||("decimal"===l||"unit"===l||"currency"===l&&"name"===r.currencyDisplay?ce((t.numbers.decimal[f]||t.numbers.decimal[d]).standard,a):ce("currency"===l?(v=t.numbers.currency[f]||t.numbers.currency[d])[r.currencySign]:t.numbers.percent[f]||t.numbers.percent[d],a));var y=Be.exec(i)[0];if(i=i.replace(Be,"{0}").replace(/'(.)'/g,"$1"),"currency"===l&&"name"!==r.currencyDisplay){var v,m=(v=t.numbers.currency[f]||t.numbers.currency[d]).currencySpacing.afterInsertBetween;m&&!Fe.test(o)&&(i=i.replace("¤{0}","¤".concat(m,"{0}")));var g=v.currencySpacing.beforeInsertBetween;g&&!Le.test(o)&&(i=i.replace("{0}¤","{0}".concat(g,"¤")))}for(var b=i.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g),w=[],_=t.numbers.symbols[f]||t.numbers.symbols[d],S=0,E=b;S<E.length;S++)if(K=E[S])switch(K){case"{0}":w.push.apply(w,se(_,e,c,u,f,!h&&Boolean(r.useGrouping),y,l));break;case"-":w.push({type:"minusSign",value:_.minusSign});break;case"+":w.push({type:"plusSign",value:_.plusSign});break;case"%":w.push({type:"percentSign",value:_.percentSign});break;case"¤":w.push({type:"currency",value:o});break;default:/^\{c:/.test(K)?w.push({type:"compact",value:K.substring(3,K.length-1)}):w.push({type:"literal",value:K})}switch(l){case"currency":if("name"===r.currencyDisplay){var O,x=(t.numbers.currency[f]||t.numbers.currency[d]).unitPattern,k=t.currencies[r.currency];O=k?le(n,e.roundedNumber*Math.pow(10,u),k.displayName):r.currency;for(var A=[],P=0,j=x.split(/(\{[01]\})/g);P<j.length;P++)switch(K=j[P]){case"{0}":A.push.apply(A,w);break;case"{1}":A.push({type:"currency",value:O});break;default:K&&A.push({type:"literal",value:K})}return A}return w;case"unit":var D=r.unit,C=r.unitDisplay,T=t.units.simple[D];if(x=void 0,T)x=le(n,e.roundedNumber*Math.pow(10,u),t.units.simple[D][C]);else{var I=D.split("-per-"),M=I[0],R=I[1];T=t.units.simple[M];var N=le(n,e.roundedNumber*Math.pow(10,u),t.units.simple[M][C]),L=t.units.simple[R].perUnit[C];if(L)x=L.replace("{0}",N);else{var F=t.units.compound.per[C],B=le(n,1,t.units.simple[R][C]);x=x=F.replace("{0}",N).replace("{1}",B.replace("{0}",""))}}A=[];for(var U=0,G=x.split(/(\s*\{0\}\s*)/);U<G.length;U++){var K=G[U],V=/^(\s*)\{0\}(\s*)$/.exec(K);V?(V[1]&&A.push({type:"literal",value:V[1]}),A.push.apply(A,w),V[2]&&A.push({type:"literal",value:V[2]})):K&&A.push({type:"unit",value:K})}return A;default:return w}},se=function(e,t,n,r,o,i,a,u){var s=[],c=t.formattedString,l=t.roundedNumber;if(isNaN(l))return[{type:"nan",value:c}];if(!isFinite(l))return[{type:"infinity",value:c}];var f=Ne[o];f&&(c=c.replace(/\d/g,(function(e){return f[+e]||e})));var d,h,p=c.indexOf(".");if(p>0?(d=c.slice(0,p),h=c.slice(p+1)):d=c,i&&("compact"!==n||l>=1e4)){var y="currency"===u&&null!=e.currencyGroup?e.currencyGroup:e.group,v=[],m=a.split(".")[0].split(","),g=3,b=3;m.length>1&&(g=m[m.length-1].length),m.length>2&&(b=m[m.length-2].length);var w=d.length-g;if(w>0){for(v.push(d.slice(w,w+g)),w-=b;w>0;w-=b)v.push(d.slice(w,w+b));v.push(d.slice(0,w+b))}else v.push(d);for(;v.length>0;){var _=v.pop();s.push({type:"integer",value:_}),v.length>0&&s.push({type:"group",value:y})}}else s.push({type:"integer",value:d});if(void 0!==h){var S="currency"===u&&null!=e.currencyDecimal?e.currencyDecimal:e.decimal;s.push({type:"decimal",value:S},{type:"fraction",value:h})}if(("scientific"===n||"engineering"===n)&&isFinite(l)){s.push({type:"exponentSeparator",value:e.exponential}),r<0&&(s.push({type:"exponentMinusSign",value:e.minusSign}),r=-r);var E=ne(r,0,0);s.push({type:"exponentInteger",value:E.formattedString})}return s},ce=function(e,t){e.indexOf(";")<0&&(e="".concat(e,";-").concat(e));var n=e.split(";"),r=n[0],o=n[1];switch(t){case 0:return r;case-1:return o;default:return o.indexOf("-")>=0?o.replace(/-/g,"+"):"+".concat(r)}},le=function(e,t,n){return n[e.select(t)]||n.other},fe=function(e,t,n){var r,o,i,a=n.getInternalSlots,u=a(e),s=u.pl,c=u.dataLocaleData,l=u.numberingSystem,d=c.numbers.symbols[l]||c.numbers.symbols[c.numbers.nu[0]],h=0,p=0;if(isNaN(t))o=d.nan;else if(t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)o=d.infinity;else{if(!f(t,-0)){if(!isFinite(t))throw new Error("Input must be a mathematical value");"percent"==u.style&&(t*=100),p=(r=oe(e,t,{getInternalSlots:a}))[0],h=r[1],t=p<0?t*Math.pow(10,-p):t/Math.pow(10,p)}var y=re(u,t);o=y.formattedString,t=y.roundedNumber}switch(u.signDisplay){case"never":i=0;break;case"auto":i=f(t,0)||t>0||isNaN(t)?0:-1;break;case"always":i=f(t,0)||t>0||isNaN(t)?1:-1;break;default:i=0===t||isNaN(t)?0:t>0?1:-1}return ue({roundedNumber:t,formattedString:o,exponent:p,magnitude:h,sign:i},u.dataLocaleData,s,u)},de=function(e,t,n,r){var o=r.getInternalSlots;if(isNaN(t)||isNaN(n))throw new RangeError("Input must be a number");var i=[],a=fe(e,t,{getInternalSlots:o}),u=fe(e,n,{getInternalSlots:o});if(a===u)return ae(e,a,{getInternalSlots:o});for(var s=0,c=a;s<c.length;s++)c[s].source="startRange";i=i.concat(a);var l=o(e),f=l.dataLocaleData.numbers.symbols[l.numberingSystem];i.push({type:"literal",value:f.rangeSign,source:"shared"});for(var d=0,h=u;d<h.length;d++)h[d].source="endRange";return i.concat(u)},he=function(e,t,n,r){return de(e,t,n,{getInternalSlots:r.getInternalSlots}).map((function(e){return e.value})).join("")},pe=function(e,t,n,r){return de(e,t,n,{getInternalSlots:r.getInternalSlots}).map((function(e,t){return{type:e.type,value:e.value,source:e.source,result:t.toString()}}))},ye=function(e,t,n){for(var r=fe(e,t,n),o=d(0),i=0,a=r;i<a.length;i++){var u=a[i];o.push({type:u.type,value:u.value})}return o},ve=function(e,t){return t?Ue[e]:Ge[e]},me=function(e,t,n,r,o){var i=I(t,"minimumIntegerDigits",1,21,1),a=t.minimumFractionDigits,u=t.maximumFractionDigits,s=t.minimumSignificantDigits,c=t.maximumSignificantDigits;e.minimumIntegerDigits=i;var l=M(t,"roundingPriority","string",["auto","morePrecision","lessPrecision"],"auto"),f=void 0!==s||void 0!==c,d=void 0!==a||void 0!==u,h=!0,p=!0;if("auto"===l&&(h=f,(f||!d&&"compact"===o)&&(p=!1)),h&&(f?(s=T(s,1,21,1),c=T(c,s,21,21),e.minimumSignificantDigits=s,e.maximumSignificantDigits=c):(e.minimumSignificantDigits=1,e.maximumSignificantDigits=21)),p)if(d){if(a=T(a,0,20,void 0),u=T(u,0,20,void 0),void 0===a)a=Math.min(n,u);else if(void 0===u)u=Math.max(r,a);else if(a>u)throw new RangeError("Invalid range, ".concat(a," > ").concat(u));e.minimumFractionDigits=a,e.maximumFractionDigits=u}else e.minimumFractionDigits=n,e.maximumFractionDigits=r;h||p?e.roundingType="morePrecision"===l?"morePrecision":"lessPrecision"===l?"lessPrecision":f?"significantDigits":"fractionDigits":(e.roundingType="morePrecision",e.minimumFractionDigits=0,e.maximumFractionDigits=0,e.minimumSignificantDigits=1,e.maximumSignificantDigits=2)},ge=function(e,t,n){void 0===t&&(t=Object.create(null));var r=(0,n.getInternalSlots)(e),o=M(t,"style","string",["decimal","percent","currency","unit"],"decimal");r.style=o;var i=M(t,"currency","string",void 0,void 0);if(void 0!==i&&!U(i))throw RangeError("Malformed currency code");if("currency"===o&&void 0===i)throw TypeError("currency cannot be undefined");var a=M(t,"currencyDisplay","string",["code","symbol","narrowSymbol","name"],"symbol"),u=M(t,"currencySign","string",["standard","accounting"],"standard"),s=M(t,"unit","string",void 0,void 0);if(void 0!==s&&!G(s))throw RangeError("Invalid unit argument for Intl.NumberFormat()");if("unit"===o&&void 0===s)throw TypeError("unit cannot be undefined");var c=M(t,"unitDisplay","string",["short","narrow","long"],"short");"currency"===o&&(r.currency=i.toUpperCase(),r.currencyDisplay=a,r.currencySign=u),"unit"===o&&(r.unit=s,r.unitDisplay=c)},be=function(e,t,n,o){var i=o.getInternalSlots,a=o.localeData,u=o.availableLocales,s=o.numberingSystemNames,c=o.getDefaultLocale,l=o.currencyDigitsData,f=r(t),d=C(n),h=Object.create(null),p=M(d,"localeMatcher","string",["lookup","best fit"],"best fit");h.localeMatcher=p;var y=M(d,"numberingSystem","string",void 0,void 0);if(void 0!==y&&s.indexOf(y)<0)throw RangeError("Invalid numberingSystems: ".concat(y));h.nu=y;var v=(0,Ke.ResolveLocale)(Array.from(u),f,h,["nu"],a,c),m=a[v.dataLocale];Z(!!m,"Missing locale data for ".concat(v.dataLocale));var g=i(e);g.locale=v.locale,g.dataLocale=v.dataLocale,g.numberingSystem=v.nu,g.dataLocaleData=m,ge(e,d,{getInternalSlots:i});var b,w,_=g.style;if("currency"===_){var S=ie(g.currency,{currencyDigitsData:l});b=S,w=S}else b=0,w="percent"===_?0:3;var E=M(d,"notation","string",["standard","scientific","engineering","compact"],"standard");g.notation=E,me(g,d,b,w,E);var O=I(d,"roundingIncrement",1,5e3,1);if(-1===Ve.indexOf(O))throw new RangeError("Invalid rounding increment value: ".concat(O,".\nValid values are ").concat(Ve,"."));if(1!==O&&"fractionDigits"!==g.roundingType)throw new TypeError("For roundingIncrement > 1 only fractionDigits is a valid roundingType");if(1!==O&&g.maximumFractionDigits!==g.minimumFractionDigits)throw new RangeError("With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.");g.roundingIncrement=O;var x=M(d,"trailingZeroDisplay","string",["auto","stripIfInteger"],"auto");g.trailingZeroDisplay=x;var k=M(d,"compactDisplay","string",["short","long"],"short"),A="auto";return"compact"===E&&(g.compactDisplay=k,A="min2"),g.useGrouping=N(d,"useGrouping",["min2","auto","always"],"always",!1,A),g.signDisplay=M(d,"signDisplay","string",["auto","never","always","exceptZero","negative"],"auto"),g.roundingMode=M(d,"roundingMode","string",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],"halfExpand"),e},we=function(e){for(var t=[],n=e.indexOf("{"),r=0,o=0,i=e.length;n<e.length&&n>-1;)Z((r=e.indexOf("}",n))>n,"Invalid pattern ".concat(e)),n>o&&t.push({type:"literal",value:e.substring(o,n)}),t.push({type:e.substring(n+1,r),value:void 0}),o=r+1,n=e.indexOf("{",o);return o<i&&t.push({type:"literal",value:e.substring(o,i)}),t},_e=function(e,t,n){return void 0!==n&&M(n=l(n),"localeMatcher","string",["lookup","best fit"],"best fit"),(0,Ke.LookupSupportedLocales)(Array.from(e),t)},Se=function(e){return"MISSING_LOCALE_DATA"===e.type};n.r(t),n.d(t,{ApplyUnsignedRoundingMode:function(){return K},ArrayCreate:function(){return d},CanonicalizeLocaleList:function(){return r},CanonicalizeTimeZoneName:function(){return o},CoerceOptionsToObject:function(){return C},CollapseNumberRange:function(){return V},ComputeExponent:function(){return oe},ComputeExponentForMagnitude:function(){return ee},CurrencyDigits:function(){return ie},DateFromTime:function(){return x},Day:function(){return v},DayFromYear:function(){return g},DayWithinYear:function(){return S},DaysInYear:function(){return _},FormatApproximately:function(){return ae},FormatNumericRange:function(){return he},FormatNumericRangeToParts:function(){return pe},FormatNumericToParts:function(){return ye},FormatNumericToString:function(){return re},GetNumberOption:function(){return I},GetOption:function(){return M},GetOptionsObject:function(){return R},GetStringOrBooleanOption:function(){return N},GetUnsignedRoundingMode:function(){return ve},HasOwnProperty:function(){return h},HourFromTime:function(){return k},InLeapYear:function(){return E},InitializeNumberFormat:function(){return be},IsSanctionedSimpleUnitIdentifier:function(){return F},IsValidTimeZoneName:function(){return B},IsWellFormedCurrencyCode:function(){return U},IsWellFormedUnitIdentifier:function(){return G},MinFromTime:function(){return A},MonthFromTime:function(){return O},OrdinaryHasInstance:function(){return j},PartitionNumberPattern:function(){return fe},PartitionNumberRangePattern:function(){return de},PartitionPattern:function(){return we},RangePatternType:function(){return Ee},SANCTIONED_UNITS:function(){return Te},SIMPLE_UNITS:function(){return Ie},SameValue:function(){return f},SecFromTime:function(){return P},SetNumberFormatDigitOptions:function(){return me},SetNumberFormatUnitOptions:function(){return ge},SupportedLocales:function(){return _e},TimeClip:function(){return s},TimeFromYear:function(){return b},ToNumber:function(){return u},ToObject:function(){return l},ToRawFixed:function(){return ne},ToRawPrecision:function(){return te},ToString:function(){return a},Type:function(){return p},WeekDay:function(){return m},YearFromTime:function(){return w},_formatToParts:function(){return ue},createDataProperty:function(){return X},defineProperty:function(){return Q},getInternalSlot:function(){return Y},getMagnitude:function(){return z},getMultiInternalSlots:function(){return $},invariant:function(){return Z},isLiteralPart:function(){return J},isMissingLocaleDataError:function(){return Se},msFromTime:function(){return D},removeUnitNamespace:function(){return L},setInternalSlot:function(){return q},setMultiInternalSlots:function(){return W}});var Ee,Oe,xe=864e5,ke=24,Ae=60,Pe=60,je=1e3,De=je*Pe,Ce=De*Ae,Te=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"],Ie=Te.map(L),Me=/[^A-Z]/,Re=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/,Ne={adlm:["𞥐","𞥑","𞥒","𞥓","𞥔","𞥕","𞥖","𞥗","𞥘","𞥙"],ahom:["𑜰","𑜱","𑜲","𑜳","𑜴","𑜵","𑜶","𑜷","𑜸","𑜹"],arab:["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],arabext:["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],bali:["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],beng:["০","১","২","৩","৪","৫","৬","৭","৮","৯"],bhks:["𑱐","𑱑","𑱒","𑱓","𑱔","𑱕","𑱖","𑱗","𑱘","𑱙"],brah:["𑁦","𑁧","𑁨","𑁩","𑁪","𑁫","𑁬","𑁭","𑁮","𑁯"],cakm:["𑄶","𑄷","𑄸","𑄹","𑄺","𑄻","𑄼","𑄽","𑄾","𑄿"],cham:["꩐","꩑","꩒","꩓","꩔","꩕","꩖","꩗","꩘","꩙"],deva:["०","१","२","३","४","५","६","७","८","९"],diak:["𑥐","𑥑","𑥒","𑥓","𑥔","𑥕","𑥖","𑥗","𑥘","𑥙"],fullwide:["0","1","2","3","4","5","6","7","8","9"],gong:["𑶠","𑶡","𑶢","𑶣","𑶤","𑶥","𑶦","𑶧","𑶨","𑶩"],gonm:["𑵐","𑵑","𑵒","𑵓","𑵔","𑵕","𑵖","𑵗","𑵘","𑵙"],gujr:["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],guru:["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],hanidec:["〇","一","二","三","四","五","六","七","八","九"],hmng:["𖭐","𖭑","𖭒","𖭓","𖭔","𖭕","𖭖","𖭗","𖭘","𖭙"],hmnp:["𞅀","𞅁","𞅂","𞅃","𞅄","𞅅","𞅆","𞅇","𞅈","𞅉"],java:["꧐","꧑","꧒","꧓","꧔","꧕","꧖","꧗","꧘","꧙"],kali:["꤀","꤁","꤂","꤃","꤄","꤅","꤆","꤇","꤈","꤉"],khmr:["០","១","២","៣","៤","៥","៦","៧","៨","៩"],knda:["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],lana:["᪀","᪁","᪂","᪃","᪄","᪅","᪆","᪇","᪈","᪉"],lanatham:["᪐","᪑","᪒","᪓","᪔","᪕","᪖","᪗","᪘","᪙"],laoo:["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],lepc:["᪐","᪑","᪒","᪓","᪔","᪕","᪖","᪗","᪘","᪙"],limb:["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],mathbold:["𝟎","𝟏","𝟐","𝟑","𝟒","𝟓","𝟔","𝟕","𝟖","𝟗"],mathdbl:["𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"],mathmono:["𝟶","𝟷","𝟸","𝟹","𝟺","𝟻","𝟼","𝟽","𝟾","𝟿"],mathsanb:["𝟬","𝟭","𝟮","𝟯","𝟰","𝟱","𝟲","𝟳","𝟴","𝟵"],mathsans:["𝟢","𝟣","𝟤","𝟥","𝟦","𝟧","𝟨","𝟩","𝟪","𝟫"],mlym:["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],modi:["𑙐","𑙑","𑙒","𑙓","𑙔","𑙕","𑙖","𑙗","𑙘","𑙙"],mong:["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],mroo:["𖩠","𖩡","𖩢","𖩣","𖩤","𖩥","𖩦","𖩧","𖩨","𖩩"],mtei:["꯰","꯱","꯲","꯳","꯴","꯵","꯶","꯷","꯸","꯹"],mymr:["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],mymrshan:["႐","႑","႒","႓","႔","႕","႖","႗","႘","႙"],mymrtlng:["꧰","꧱","꧲","꧳","꧴","꧵","꧶","꧷","꧸","꧹"],newa:["𑑐","𑑑","𑑒","𑑓","𑑔","𑑕","𑑖","𑑗","𑑘","𑑙"],nkoo:["߀","߁","߂","߃","߄","߅","߆","߇","߈","߉"],olck:["᱐","᱑","᱒","᱓","᱔","᱕","᱖","᱗","᱘","᱙"],orya:["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],osma:["𐒠","𐒡","𐒢","𐒣","𐒤","𐒥","𐒦","𐒧","𐒨","𐒩"],rohg:["𐴰","𐴱","𐴲","𐴳","𐴴","𐴵","𐴶","𐴷","𐴸","𐴹"],saur:["꣐","꣑","꣒","꣓","꣔","꣕","꣖","꣗","꣘","꣙"],segment:["🯰","🯱","🯲","🯳","🯴","🯵","🯶","🯷","🯸","🯹"],shrd:["𑇐","𑇑","𑇒","𑇓","𑇔","𑇕","𑇖","𑇗","𑇘","𑇙"],sind:["𑋰","𑋱","𑋲","𑋳","𑋴","𑋵","𑋶","𑋷","𑋸","𑋹"],sinh:["෦","෧","෨","෩","෪","෫","෬","෭","෮","෯"],sora:["𑃰","𑃱","𑃲","𑃳","𑃴","𑃵","𑃶","𑃷","𑃸","𑃹"],sund:["᮰","᮱","᮲","᮳","᮴","᮵","᮶","᮷","᮸","᮹"],takr:["𑛀","𑛁","𑛂","𑛃","𑛄","𑛅","𑛆","𑛇","𑛈","𑛉"],talu:["᧐","᧑","᧒","᧓","᧔","᧕","᧖","᧗","᧘","᧙"],tamldec:["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],telu:["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],thai:["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],tibt:["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"],tirh:["𑓐","𑓑","𑓒","𑓓","𑓔","𑓕","𑓖","𑓗","𑓘","𑓙"],vaii:["ᘠ","ᘡ","ᘢ","ᘣ","ᘤ","ᘥ","ᘦ","ᘧ","ᘨ","ᘩ"],wara:["𑣠","𑣡","𑣢","𑣣","𑣤","𑣥","𑣦","𑣧","𑣨","𑣩"],wcho:["𞋰","𞋱","𞋲","𞋳","𞋴","𞋵","𞋶","𞋷","𞋸","𞋹"]},Le=new RegExp("^".concat(Re.source)),Fe=new RegExp("".concat(Re.source,"$")),Be=/[#0](?:[\.,][#0]+)*/g,Ue={ceil:"zero",floor:"infinity",expand:"infinity",trunc:"zero",halfCeil:"half-zero",halfFloor:"half-infinity",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"},Ge={ceil:"infinity",floor:"zero",expand:"infinity",trunc:"zero",halfCeil:"half-infinity",halfFloor:"half-zero",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"},Ke=n(3367),Ve=[1,2,5,10,20,25,50,100,200,250,500,1e3,2e3],ze=n(2712);Oe=Error,(0,ze.__extends)((function(){var e=null!==Oe&&Oe.apply(this,arguments)||this;return e.type="MISSING_LOCALE_DATA",e}),Oe),function(e){e.startRange="startRange",e.shared="shared",e.endRange="endRange"}(Ee||(Ee={}))},6979:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationRecordSign=void 0;var r=n(2552);t.DurationRecordSign=function(e){for(var t=0,n=r.TABLE_1;t<n.length;t++){var o=n[t];if(e[o]<0)return-1;if(e[o]>0)return 1}return 0}},7332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetDurationUnitOptions=void 0;var r=n(2943);t.GetDurationUnitOptions=function(e,t,n,o,i,a){var u=(0,r.GetOption)(t,e,"string",o,void 0),s="always";void 0===u&&("digital"===n?("hours"!==e&&"minutes"!==e&&"seconds"!==e&&(s="auto"),u=i):(s="auto",u="numeric"===a||"2-digit"===a?"numeric":n));var c="".concat(e,"Display"),l=(0,r.GetOption)(t,c,"string",["always","auto"],s);if("numeric"===a||"2-digit"===a){if("numeric"!==u&&"2-digit"!==u)throw new RangeError("Can't mix numeric and non-numeric styles");if("minutes"!==e&&"seconds"!==e||(u="2-digit"),"numeric"===u&&"always"===l&&("milliseconds"===e||"microseconds"===e||"nanoseconds"===e))throw new RangeError("Can't display milliseconds, microseconds, or nanoseconds in numeric format")}return{style:u,display:l}}},1076:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsValidDurationRecord=void 0;var r=n(2943),o=n(2552),i=n(6979);t.IsValidDurationRecord=function(e){for(var t=(0,i.DurationRecordSign)(e),n=0,a=o.TABLE_1;n<a.length;n++){var u=a[n],s=e[u];if((0,r.invariant)(isFinite(Number(s)),"".concat(u," is not finite")),s<0&&t>0)return!1;if(s>0&&t<0)return!1}return!0}},984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartitionDurationFormatPattern=void 0;var r=n(2943),o=n(2552),i=n(715),a=n(6732);t.PartitionDurationFormatPattern=function(e,t){var n=[],u=!1,s=!1,c=(0,a.getInternalSlots)(e),l=c.dataLocale,f=i.DurationFormat.localeData[l];if(!f)throw new TypeError("Invalid locale");for(var d=c.numberingSystem,h=f.digitalFormat[d],p=function(e){var r=o.TABLE_2[e],i=t[r.valueField],a=c[r.styleSlot],l=c[r.displaySlot],f=r.unit,d=r.numberFormatUnit,p=Object.create(null);if("seconds"!==f&&"milliseconds"!==f&&"microseconds"!==f||"numeric"===("seconds"===f?c.milliseconds:"milliseconds"===f?c.microseconds:c.nanoseconds)&&(i+="seconds"===f?t.milliseconds/1e3+t.microseconds/1e6+t.nanoseconds/1e9:"milliseconds"===f?t.microseconds/1e3+t.nanoseconds/1e6:t.nanoseconds/1e3,void 0===c.fractionalDigits?(p.maximumFractionDigits=9,p.minimumFractionDigits=0):(p.maximumFractionDigits=c.fractionalDigits,p.minimumFractionDigits=c.fractionalDigits),p.roundingMode="trunc",u=!0),0!==i||"auto"!==l){p.numberingSystem=c.numberingSystem,"2-digit"===a&&(p.minimumIntegerDigits=2),"2-digit"!==a&&"numeric"!==a&&(p.style="unit",p.unit=d,p.unitDisplay=a);var y,v=new Intl.NumberFormat(c.locale,p);s?(y=n[n.length-1]).push({type:"literal",value:h}):y=[],v.formatToParts(i).forEach((function(e){var t=e.type,n=e.value;y.push({type:t,value:n,unit:d})})),s||("2-digit"!==a&&"numeric"!==a||(s=!0),n.push(y))}else s=!1},y=0;y<o.TABLE_2.length&&!u;y++)p(y);var v=Object.create(null);v.type="unit";var m=c.style;"digital"===m&&(m="short"),v.style=m;for(var g=new Intl.ListFormat(c.locale,v),b=[],w=0,_=n;w<_.length;w++){for(var S="",E=0,O=_[w];E<O.length;E++)S+=I=O[E].value;b.push(S)}for(var x=g.formatToParts(b),k=0,A=n.length,P=[],j=0,D=x;j<D.length;j++){var C=D[j],T=C.type,I=C.value;if("element"===T){(0,r.invariant)(k<A,"Index out of bounds");for(var M=0,R=n[k];M<R.length;M++){var N=R[M];P.push(N)}k++}else(0,r.invariant)("literal"===T,"Type must be literal"),P.push({type:"literal",value:I})}return P}},8905:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToDurationRecord=void 0;var r=n(1076),o=n(1370);t.ToDurationRecord=function(e){if("object"!=typeof e){if("string"==typeof e)throw new RangeError("Invalid duration format");throw new TypeError("Invalid duration")}var t={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};if(void 0!==e.days&&(t.days=(0,o.ToIntegerIfIntegral)(e.days)),void 0!==e.hours&&(t.hours=(0,o.ToIntegerIfIntegral)(e.hours)),void 0!==e.microseconds&&(t.microseconds=(0,o.ToIntegerIfIntegral)(e.microseconds)),void 0!==e.milliseconds&&(t.milliseconds=(0,o.ToIntegerIfIntegral)(e.milliseconds)),void 0!==e.minutes&&(t.minutes=(0,o.ToIntegerIfIntegral)(e.minutes)),void 0!==e.months&&(t.months=(0,o.ToIntegerIfIntegral)(e.months)),void 0!==e.nanoseconds&&(t.nanoseconds=(0,o.ToIntegerIfIntegral)(e.nanoseconds)),void 0!==e.seconds&&(t.seconds=(0,o.ToIntegerIfIntegral)(e.seconds)),void 0!==e.weeks&&(t.weeks=(0,o.ToIntegerIfIntegral)(e.weeks)),void 0!==e.years&&(t.years=(0,o.ToIntegerIfIntegral)(e.years)),void 0===e.years&&void 0===e.months&&void 0===e.weeks&&void 0===e.days&&void 0===e.hours&&void 0===e.minutes&&void 0===e.seconds&&void 0===e.milliseconds&&void 0===e.microseconds&&void 0===e.nanoseconds)throw new TypeError("Invalid duration format");if(!(0,r.IsValidDurationRecord)(t))throw new RangeError("Invalid duration format");return t}},1370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToIntegerIfIntegral=void 0;var r=n(2943);t.ToIntegerIfIntegral=function(e){var t=(0,r.ToNumber)(e);if(!Number.isInteger(t))throw new RangeError("".concat(e," is not an integer"));return t}},2552:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TABLE_2=t.TABLE_1=void 0,t.TABLE_1=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"],t.TABLE_2=[{valueField:"years",styleSlot:"years",displaySlot:"yearsDisplay",unit:"years",numberFormatUnit:"year"},{valueField:"months",styleSlot:"months",displaySlot:"monthsDisplay",unit:"months",numberFormatUnit:"month"},{valueField:"weeks",styleSlot:"weeks",displaySlot:"weeksDisplay",unit:"weeks",numberFormatUnit:"week"},{valueField:"days",styleSlot:"days",displaySlot:"daysDisplay",unit:"days",numberFormatUnit:"day"},{valueField:"hours",styleSlot:"hours",displaySlot:"hoursDisplay",unit:"hours",numberFormatUnit:"hour"},{valueField:"minutes",styleSlot:"minutes",displaySlot:"minutesDisplay",unit:"minutes",numberFormatUnit:"minute"},{valueField:"seconds",styleSlot:"seconds",displaySlot:"secondsDisplay",unit:"seconds",numberFormatUnit:"second"},{valueField:"milliseconds",styleSlot:"milliseconds",displaySlot:"millisecondsDisplay",unit:"milliseconds",numberFormatUnit:"millisecond"},{valueField:"microseconds",styleSlot:"microseconds",displaySlot:"microsecondsDisplay",unit:"microseconds",numberFormatUnit:"microsecond"},{valueField:"nanoseconds",styleSlot:"nanoseconds",displaySlot:"nanosecondsDisplay",unit:"nanoseconds",numberFormatUnit:"nanosecond"}]},715:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationFormat=void 0;var r=n(2943),o=n(3367),a=n(7332),u=n(984),s=n(8905),c=n(6732),l=n(743),f=n(2052),d=["locale","style","years","yearsDisplay","months","monthsDisplay","weeks","weeksDisplay","days","daysDisplay","hours","hoursDisplay","minutes","minutesDisplay","seconds","secondsDisplay","milliseconds","millisecondsDisplay","microseconds","microsecondsDisplay","nanoseconds","nanosecondsDisplay","numberingSystem","fractionalDigits"],h=[{styleSlot:"years",displaySlot:"yearsDisplay",unit:"years",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"months",displaySlot:"monthsDisplay",unit:"months",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"weeks",displaySlot:"weeksDisplay",unit:"weeks",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"days",displaySlot:"daysDisplay",unit:"days",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"hours",displaySlot:"hoursDisplay",unit:"hours",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"minutes",displaySlot:"minutesDisplay",unit:"minutes",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"seconds",displaySlot:"secondsDisplay",unit:"seconds",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"milliseconds",displaySlot:"millisecondsDisplay",unit:"milliseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"},{styleSlot:"microseconds",displaySlot:"microsecondsDisplay",unit:"microseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"},{styleSlot:"nanoseconds",displaySlot:"nanosecondsDisplay",unit:"nanoseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"}],p=function(){function e(t,n){if(!(this&&i(this,e)?this.constructor:void 0))throw new TypeError("Intl.DurationFormat must be called with 'new'");var u=(0,r.CanonicalizeLocaleList)(t),s=Object.create(null),f=void 0===n?Object.create(null):(0,r.ToObject)(n),d=(0,r.GetOption)(f,"localeMatcher","string",["best fit","lookup"],"best fit"),p=(0,r.GetOption)(f,"numberingSystem","string",void 0,void 0);if(void 0!==p&&l.numberingSystemNames.indexOf(p)<0)throw RangeError("Invalid numberingSystems: ".concat(p));s.nu=p,s.localeMatcher=d;var y=e.localeData,v=e.availableLocales,m=(0,o.ResolveLocale)(v,u,s,["nu"],y,e.getDefaultLocale),g=m.locale,b=(0,c.getInternalSlots)(this);b.initializedDurationFormat=!0,b.locale=g,b.numberingSystem=m.nu;var w=(0,r.GetOption)(f,"style","string",["long","short","narrow","digital"],"short");b.style=w,b.dataLocale=m.dataLocale;var _="";h.forEach((function(e){var t=e.styleSlot,n=e.displaySlot,r=e.unit,o=e.values,i=e.digitalDefault,u=(0,a.GetDurationUnitOptions)(r,f,w,o,i,_);b[t]=u.style,b[n]=u.display,"hours"!==r&&"minutes"!==r&&"seconds"!==r&&"milliseconds"!==r&&"microseconds"!==r||(_=u.style)})),b.fractionalDigits=(0,r.GetNumberOption)(f,"fractionalDigits",0,9,void 0)}return e.prototype.resolvedOptions=function(){if("object"!=typeof this||!(0,r.OrdinaryHasInstance)(e,this))throw TypeError("Method Intl.DurationFormat.prototype.resolvedOptions called on incompatible receiver");for(var t=(0,c.getInternalSlots)(this),n={},o=0,i=d;o<i.length;o++){var a=i[o],u=t[a];"fractionalDigits"===a?void 0!==u&&(u=Number(u)):(0,r.invariant)(void 0!==u,"Missing internal slot ".concat(a)),n[a]=u}return n},e.prototype.formatToParts=function(e){if(void 0===(0,c.getInternalSlots)(this).initializedDurationFormat)throw new TypeError("Error uninitialized locale");for(var t=(0,s.ToDurationRecord)(e),n=[],r=0,o=(0,u.PartitionDurationFormatPattern)(this,t);r<o.length;r++){var i=o[r],a=i.type,l=i.unit,f={type:a,value:i.value};l&&(f.unit=l),n.push(f)}return n},e.prototype.format=function(e){if(void 0===(0,c.getInternalSlots)(this).initializedDurationFormat)throw new TypeError("Error uninitialized locale");for(var t=(0,s.ToDurationRecord)(e),n="",r=0,o=(0,u.PartitionDurationFormatPattern)(this,t);r<o.length;r++)n+=o[r].value;return n},e.supportedLocalesOf=function(t,n){return(0,r.SupportedLocales)(e.availableLocales,(0,r.CanonicalizeLocaleList)(t),n)},e.__defaultLocale="en",e.availableLocales=new Set,e.localeData=Object.keys(f.TIME_SEPARATORS.localeData).reduce((function(t,n){e.availableLocales.add(n);var r=f.TIME_SEPARATORS.localeData[n].nu;return t[n]={nu:r,digitalFormat:f.TIME_SEPARATORS.localeData[n].separator||r.reduce((function(e,t){return e[t]=f.TIME_SEPARATORS.default,e}),{})},t}),{}),e.getDefaultLocale=function(){return e.__defaultLocale},e.polyfilled=!0,e}();t.DurationFormat=p},6732:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInternalSlots=void 0;var n=new WeakMap;t.getInternalSlots=function(e){var t=n.get(e);return t||(t=Object.create(null),n.set(e,t)),t}},743:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberingSystemNames=void 0,t.numberingSystemNames=["adlm","ahom","arab","arabext","armn","armnlow","bali","beng","bhks","brah","cakm","cham","cyrl","deva","diak","ethi","fullwide","geor","gong","gonm","grek","greklow","gujr","guru","hanidays","hanidec","hans","hansfin","hant","hantfin","hebr","hmng","hmnp","java","jpan","jpanfin","jpanyear","kali","kawi","khmr","knda","lana","lanatham","laoo","latn","lepc","limb","mathbold","mathdbl","mathmono","mathsanb","mathsans","mlym","modi","mong","mroo","mtei","mymr","mymrshan","mymrtlng","nagm","newa","nkoo","olck","orya","osma","rohg","roman","romanlow","saur","segment","shrd","sind","sinh","sora","sund","takr","talu","taml","tamldec","telu","thai","tibt","tirh","tnsa","vaii","wara","wcho"]},2052:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TIME_SEPARATORS=void 0,t.TIME_SEPARATORS={default:":",localeData:{aa:{nu:["latn"]},"aa-DJ":{nu:["latn"]},"aa-ER":{nu:["latn"]},ab:{nu:["latn"]},af:{nu:["latn"]},"af-NA":{nu:["latn"]},agq:{nu:["latn"]},ak:{nu:["latn"]},am:{nu:["latn"]},an:{nu:["latn"]},ann:{nu:["latn"]},apc:{nu:["latn"]},ar:{nu:["arab","latn"]},"ar-AE":{nu:["latn","latn"]},"ar-BH":{nu:["arab","latn"]},"ar-DJ":{nu:["arab","latn"]},"ar-DZ":{nu:["latn","latn"]},"ar-EG":{nu:["arab","latn"]},"ar-EH":{nu:["latn","latn"]},"ar-ER":{nu:["arab","latn"]},"ar-IL":{nu:["arab","latn"]},"ar-IQ":{nu:["arab","latn"]},"ar-JO":{nu:["arab","latn"]},"ar-KM":{nu:["arab","latn"]},"ar-KW":{nu:["arab","latn"]},"ar-LB":{nu:["arab","latn"]},"ar-LY":{nu:["latn","latn"]},"ar-MA":{nu:["latn","latn"]},"ar-MR":{nu:["arab","latn"]},"ar-OM":{nu:["arab","latn"]},"ar-PS":{nu:["arab","latn"]},"ar-QA":{nu:["arab","latn"]},"ar-SA":{nu:["arab","latn"]},"ar-SD":{nu:["arab","latn"]},"ar-SO":{nu:["arab","latn"]},"ar-SS":{nu:["arab","latn"]},"ar-SY":{nu:["arab","latn"]},"ar-TD":{nu:["arab","latn"]},"ar-TN":{nu:["latn","latn"]},"ar-YE":{nu:["arab","latn"]},arn:{nu:["latn"]},as:{nu:["beng"]},asa:{nu:["latn"]},ast:{nu:["latn"]},az:{nu:["latn"]},"az-Arab":{nu:["arabext"]},"az-Arab-IQ":{nu:["arabext"]},"az-Arab-TR":{nu:["arabext"]},"az-Cyrl":{nu:["latn"]},"az-Latn":{nu:["latn"]},ba:{nu:["latn"]},bal:{nu:["latn"]},"bal-Arab":{nu:["latn"]},"bal-Latn":{nu:["latn"]},bas:{nu:["latn"]},be:{nu:["latn"]},"be-tarask":{nu:["latn"]},bem:{nu:["latn"]},bez:{nu:["latn"]},bg:{nu:["latn"]},bgc:{nu:["deva"]},bgn:{nu:["arabext"]},"bgn-AE":{nu:["arabext"]},"bgn-AF":{nu:["arabext"]},"bgn-IR":{nu:["arabext"]},"bgn-OM":{nu:["arabext"]},bho:{nu:["deva"]},blt:{nu:["latn"]},bm:{nu:["latn"]},"bm-Nkoo":{nu:["latn"]},bn:{nu:["beng"]},"bn-IN":{nu:["beng"]},bo:{nu:["latn"]},"bo-IN":{nu:["latn"]},br:{nu:["latn"]},brx:{nu:["latn"]},bs:{nu:["latn"]},"bs-Cyrl":{nu:["latn"]},"bs-Latn":{nu:["latn"]},bss:{nu:["latn"]},byn:{nu:["latn"]},ca:{nu:["latn"]},"ca-AD":{nu:["latn"]},"ca-ES-valencia":{nu:["latn"]},"ca-FR":{nu:["latn"]},"ca-IT":{nu:["latn"]},cad:{nu:["latn"]},cch:{nu:["latn"]},ccp:{nu:["cakm"]},"ccp-IN":{nu:["cakm"]},ce:{nu:["latn"]},ceb:{nu:["latn"]},cgg:{nu:["latn"]},cho:{nu:["latn"]},chr:{nu:["latn"]},cic:{nu:["latn"]},ckb:{nu:["arab"]},"ckb-IR":{nu:["arab"]},co:{nu:["latn"]},cs:{nu:["latn"]},cu:{nu:["latn"]},cv:{nu:["latn"]},cy:{nu:["latn"]},da:{nu:["latn"],separator:{latn:"."}},"da-GL":{nu:["latn"],separator:{latn:"."}},dav:{nu:["latn"]},de:{nu:["latn"]},"de-AT":{nu:["latn"]},"de-BE":{nu:["latn"]},"de-CH":{nu:["latn"]},"de-IT":{nu:["latn"]},"de-LI":{nu:["latn"]},"de-LU":{nu:["latn"]},dje:{nu:["latn"]},doi:{nu:["latn"]},dsb:{nu:["latn"]},dua:{nu:["latn"]},dv:{nu:["latn"]},dyo:{nu:["latn"]},dz:{nu:["tibt"]},ebu:{nu:["latn"]},ee:{nu:["latn"]},"ee-TG":{nu:["latn"]},el:{nu:["latn"]},"el-CY":{nu:["latn"]},"el-polyton":{nu:["latn"]},en:{nu:["latn"]},"en-001":{nu:["latn"]},"en-150":{nu:["latn"]},"en-AE":{nu:["latn"]},"en-AG":{nu:["latn"]},"en-AI":{nu:["latn"]},"en-AS":{nu:["latn"]},"en-AT":{nu:["latn"]},"en-AU":{nu:["latn"]},"en-BB":{nu:["latn"]},"en-BE":{nu:["latn"]},"en-BI":{nu:["latn"]},"en-BM":{nu:["latn"]},"en-BS":{nu:["latn"]},"en-BW":{nu:["latn"]},"en-BZ":{nu:["latn"]},"en-CA":{nu:["latn"]},"en-CC":{nu:["latn"]},"en-CH":{nu:["latn"]},"en-CK":{nu:["latn"]},"en-CM":{nu:["latn"]},"en-CX":{nu:["latn"]},"en-CY":{nu:["latn"]},"en-DE":{nu:["latn"]},"en-DG":{nu:["latn"]},"en-DK":{nu:["latn"],separator:{latn:"."}},"en-DM":{nu:["latn"]},"en-Dsrt":{nu:["latn"]},"en-ER":{nu:["latn"]},"en-FI":{nu:["latn"],separator:{latn:"."}},"en-FJ":{nu:["latn"]},"en-FK":{nu:["latn"]},"en-FM":{nu:["latn"]},"en-GB":{nu:["latn"]},"en-GD":{nu:["latn"]},"en-GG":{nu:["latn"]},"en-GH":{nu:["latn"]},"en-GI":{nu:["latn"]},"en-GM":{nu:["latn"]},"en-GU":{nu:["latn"]},"en-GY":{nu:["latn"]},"en-HK":{nu:["latn"]},"en-IE":{nu:["latn"]},"en-IL":{nu:["latn"]},"en-IM":{nu:["latn"]},"en-IN":{nu:["latn"]},"en-IO":{nu:["latn"]},"en-JE":{nu:["latn"]},"en-JM":{nu:["latn"]},"en-KE":{nu:["latn"]},"en-KI":{nu:["latn"]},"en-KN":{nu:["latn"]},"en-KY":{nu:["latn"]},"en-LC":{nu:["latn"]},"en-LR":{nu:["latn"]},"en-LS":{nu:["latn"]},"en-MG":{nu:["latn"]},"en-MH":{nu:["latn"]},"en-MO":{nu:["latn"]},"en-MP":{nu:["latn"]},"en-MS":{nu:["latn"]},"en-MT":{nu:["latn"]},"en-MU":{nu:["latn"]},"en-MV":{nu:["latn"]},"en-MW":{nu:["latn"]},"en-MY":{nu:["latn"]},"en-NA":{nu:["latn"]},"en-NF":{nu:["latn"]},"en-NG":{nu:["latn"]},"en-NL":{nu:["latn"]},"en-NR":{nu:["latn"]},"en-NU":{nu:["latn"]},"en-NZ":{nu:["latn"]},"en-PG":{nu:["latn"]},"en-PH":{nu:["latn"]},"en-PK":{nu:["latn"]},"en-PN":{nu:["latn"]},"en-PR":{nu:["latn"]},"en-PW":{nu:["latn"]},"en-RW":{nu:["latn"]},"en-SB":{nu:["latn"]},"en-SC":{nu:["latn"]},"en-SD":{nu:["latn"]},"en-SE":{nu:["latn"]},"en-SG":{nu:["latn"]},"en-SH":{nu:["latn"]},"en-SI":{nu:["latn"]},"en-SL":{nu:["latn"]},"en-SS":{nu:["latn"]},"en-SX":{nu:["latn"]},"en-SZ":{nu:["latn"]},"en-Shaw":{nu:["latn"]},"en-TC":{nu:["latn"]},"en-TK":{nu:["latn"]},"en-TO":{nu:["latn"]},"en-TT":{nu:["latn"]},"en-TV":{nu:["latn"]},"en-TZ":{nu:["latn"]},"en-UG":{nu:["latn"]},"en-UM":{nu:["latn"]},"en-VC":{nu:["latn"]},"en-VG":{nu:["latn"]},"en-VI":{nu:["latn"]},"en-VU":{nu:["latn"]},"en-WS":{nu:["latn"]},"en-ZA":{nu:["latn"]},"en-ZM":{nu:["latn"]},"en-ZW":{nu:["latn"]},eo:{nu:["latn"]},es:{nu:["latn"]},"es-419":{nu:["latn"]},"es-AR":{nu:["latn"]},"es-BO":{nu:["latn"]},"es-BR":{nu:["latn"]},"es-BZ":{nu:["latn"]},"es-CL":{nu:["latn"]},"es-CO":{nu:["latn"]},"es-CR":{nu:["latn"]},"es-CU":{nu:["latn"]},"es-DO":{nu:["latn"]},"es-EA":{nu:["latn"]},"es-EC":{nu:["latn"]},"es-GQ":{nu:["latn"]},"es-GT":{nu:["latn"]},"es-HN":{nu:["latn"]},"es-IC":{nu:["latn"]},"es-MX":{nu:["latn"]},"es-NI":{nu:["latn"]},"es-PA":{nu:["latn"]},"es-PE":{nu:["latn"]},"es-PH":{nu:["latn"]},"es-PR":{nu:["latn"]},"es-PY":{nu:["latn"]},"es-SV":{nu:["latn"]},"es-US":{nu:["latn"]},"es-UY":{nu:["latn"]},"es-VE":{nu:["latn"]},et:{nu:["latn"]},eu:{nu:["latn"]},ewo:{nu:["latn"]},fa:{nu:["arabext"]},"fa-AF":{nu:["arabext"]},ff:{nu:["latn"]},"ff-Adlm":{nu:["adlm"]},"ff-Adlm-BF":{nu:["adlm"]},"ff-Adlm-CM":{nu:["adlm"]},"ff-Adlm-GH":{nu:["adlm"]},"ff-Adlm-GM":{nu:["adlm"]},"ff-Adlm-GW":{nu:["adlm"]},"ff-Adlm-LR":{nu:["adlm"]},"ff-Adlm-MR":{nu:["adlm"]},"ff-Adlm-NE":{nu:["adlm"]},"ff-Adlm-NG":{nu:["adlm"]},"ff-Adlm-SL":{nu:["adlm"]},"ff-Adlm-SN":{nu:["adlm"]},"ff-Latn":{nu:["latn"]},"ff-Latn-BF":{nu:["latn"]},"ff-Latn-CM":{nu:["latn"]},"ff-Latn-GH":{nu:["latn"]},"ff-Latn-GM":{nu:["latn"]},"ff-Latn-GN":{nu:["latn"]},"ff-Latn-GW":{nu:["latn"]},"ff-Latn-LR":{nu:["latn"]},"ff-Latn-MR":{nu:["latn"]},"ff-Latn-NE":{nu:["latn"]},"ff-Latn-NG":{nu:["latn"]},"ff-Latn-SL":{nu:["latn"]},fi:{nu:["latn"],separator:{latn:"."}},fil:{nu:["latn"]},fo:{nu:["latn"]},"fo-DK":{nu:["latn"]},fr:{nu:["latn"]},"fr-BE":{nu:["latn"]},"fr-BF":{nu:["latn"]},"fr-BI":{nu:["latn"]},"fr-BJ":{nu:["latn"]},"fr-BL":{nu:["latn"]},"fr-CA":{nu:["latn"]},"fr-CD":{nu:["latn"]},"fr-CF":{nu:["latn"]},"fr-CG":{nu:["latn"]},"fr-CH":{nu:["latn"]},"fr-CI":{nu:["latn"]},"fr-CM":{nu:["latn"]},"fr-DJ":{nu:["latn"]},"fr-DZ":{nu:["latn"]},"fr-GA":{nu:["latn"]},"fr-GF":{nu:["latn"]},"fr-GN":{nu:["latn"]},"fr-GP":{nu:["latn"]},"fr-GQ":{nu:["latn"]},"fr-HT":{nu:["latn"]},"fr-KM":{nu:["latn"]},"fr-LU":{nu:["latn"]},"fr-MA":{nu:["latn"]},"fr-MC":{nu:["latn"]},"fr-MF":{nu:["latn"]},"fr-MG":{nu:["latn"]},"fr-ML":{nu:["latn"]},"fr-MQ":{nu:["latn"]},"fr-MR":{nu:["latn"]},"fr-MU":{nu:["latn"]},"fr-NC":{nu:["latn"]},"fr-NE":{nu:["latn"]},"fr-PF":{nu:["latn"]},"fr-PM":{nu:["latn"]},"fr-RE":{nu:["latn"]},"fr-RW":{nu:["latn"]},"fr-SC":{nu:["latn"]},"fr-SN":{nu:["latn"]},"fr-SY":{nu:["latn"]},"fr-TD":{nu:["latn"]},"fr-TG":{nu:["latn"]},"fr-TN":{nu:["latn"]},"fr-VU":{nu:["latn"]},"fr-WF":{nu:["latn"]},"fr-YT":{nu:["latn"]},frr:{nu:["latn"]},fur:{nu:["latn"]},fy:{nu:["latn"]},ga:{nu:["latn"]},"ga-GB":{nu:["latn"]},gaa:{nu:["latn"]},gd:{nu:["latn"]},gez:{nu:["latn"]},"gez-ER":{nu:["latn"]},gl:{nu:["latn"]},gn:{nu:["latn"]},gsw:{nu:["latn"]},"gsw-FR":{nu:["latn"]},"gsw-LI":{nu:["latn"]},gu:{nu:["latn"]},guz:{nu:["latn"]},gv:{nu:["latn"]},ha:{nu:["latn"]},"ha-Arab":{nu:["latn"]},"ha-Arab-SD":{nu:["latn"]},"ha-GH":{nu:["latn"]},"ha-NE":{nu:["latn"]},haw:{nu:["latn"]},he:{nu:["latn"]},hi:{nu:["latn"]},"hi-Latn":{nu:["latn"]},hnj:{nu:["hmnp","latn"]},"hnj-Hmnp":{nu:["hmnp","latn"]},hr:{nu:["latn"]},"hr-BA":{nu:["latn"]},hsb:{nu:["latn"]},hu:{nu:["latn"]},hy:{nu:["latn"]},ia:{nu:["latn"]},id:{nu:["latn"],separator:{latn:"."}},ig:{nu:["latn"]},ii:{nu:["latn"]},io:{nu:["latn"]},is:{nu:["latn"]},it:{nu:["latn"]},"it-CH":{nu:["latn"]},"it-SM":{nu:["latn"]},"it-VA":{nu:["latn"]},iu:{nu:["latn"]},"iu-Latn":{nu:["latn"]},ja:{nu:["latn"]},jbo:{nu:["latn"]},jgo:{nu:["latn"]},jmc:{nu:["latn"]},jv:{nu:["latn"]},ka:{nu:["latn"]},kab:{nu:["latn"]},kaj:{nu:["latn"]},kam:{nu:["latn"]},kcg:{nu:["latn"]},kde:{nu:["latn"]},kea:{nu:["latn"]},ken:{nu:["latn"]},kgp:{nu:["latn"]},khq:{nu:["latn"]},ki:{nu:["latn"]},kk:{nu:["latn"]},kkj:{nu:["latn"]},kl:{nu:["latn"]},kln:{nu:["latn"]},km:{nu:["latn"]},kn:{nu:["latn"]},ko:{nu:["latn"]},"ko-KP":{nu:["latn"]},kok:{nu:["latn"]},kpe:{nu:["latn"]},"kpe-GN":{nu:["latn"]},ks:{nu:["arabext"]},"ks-Arab":{nu:["arabext"]},"ks-Deva":{nu:["latn"]},ksb:{nu:["latn"]},ksf:{nu:["latn"]},ksh:{nu:["latn"]},ku:{nu:["latn"]},kw:{nu:["latn"]},ky:{nu:["latn"]},la:{nu:["latn"]},lag:{nu:["latn"]},lb:{nu:["latn"]},lg:{nu:["latn"]},lij:{nu:["latn"]},lkt:{nu:["latn"]},lmo:{nu:["latn"]},ln:{nu:["latn"]},"ln-AO":{nu:["latn"]},"ln-CF":{nu:["latn"]},"ln-CG":{nu:["latn"]},lo:{nu:["latn"]},lrc:{nu:["arabext"]},"lrc-IQ":{nu:["arabext"]},lt:{nu:["latn"]},lu:{nu:["latn"]},luo:{nu:["latn"]},luy:{nu:["latn"]},lv:{nu:["latn"]},mai:{nu:["latn"]},mas:{nu:["latn"]},"mas-TZ":{nu:["latn"]},mdf:{nu:["latn"]},mer:{nu:["latn"]},mfe:{nu:["latn"]},mg:{nu:["latn"]},mgh:{nu:["latn"]},mgo:{nu:["latn"]},mi:{nu:["latn"]},mk:{nu:["latn"]},ml:{nu:["latn"]},mn:{nu:["latn"]},"mn-Mong":{nu:["latn"]},"mn-Mong-MN":{nu:["latn"]},mni:{nu:["beng"]},"mni-Beng":{nu:["beng"]},"mni-Mtei":{nu:["mtei"]},moh:{nu:["latn"]},mr:{nu:["deva"]},ms:{nu:["latn"]},"ms-Arab":{nu:["latn"]},"ms-Arab-BN":{nu:["latn"]},"ms-BN":{nu:["latn"]},"ms-ID":{nu:["latn"],separator:{latn:"."}},"ms-SG":{nu:["latn"]},mt:{nu:["latn"]},mua:{nu:["latn"]},mus:{nu:["latn"]},my:{nu:["mymr"]},myv:{nu:["latn"]},mzn:{nu:["arabext"]},naq:{nu:["latn"]},nb:{nu:["latn"]},"nb-SJ":{nu:["latn"]},nd:{nu:["latn"]},nds:{nu:["latn"]},"nds-NL":{nu:["latn"]},ne:{nu:["deva"]},"ne-IN":{nu:["deva"]},nl:{nu:["latn"]},"nl-AW":{nu:["latn"]},"nl-BE":{nu:["latn"]},"nl-BQ":{nu:["latn"]},"nl-CW":{nu:["latn"]},"nl-SR":{nu:["latn"]},"nl-SX":{nu:["latn"]},nmg:{nu:["latn"]},nn:{nu:["latn"]},nnh:{nu:["latn"]},no:{nu:["latn"]},nqo:{nu:["nkoo"]},nr:{nu:["latn"]},nso:{nu:["latn"]},nus:{nu:["latn"]},nv:{nu:["latn"]},ny:{nu:["latn"]},nyn:{nu:["latn"]},oc:{nu:["latn"]},"oc-ES":{nu:["latn"]},om:{nu:["latn"]},"om-KE":{nu:["latn"]},or:{nu:["latn"]},os:{nu:["latn"]},"os-RU":{nu:["latn"]},osa:{nu:["latn"]},pa:{nu:["latn"]},"pa-Arab":{nu:["arabext"]},"pa-Guru":{nu:["latn"]},pap:{nu:["latn"]},"pap-AW":{nu:["latn"]},pcm:{nu:["latn"]},pis:{nu:["latn"]},pl:{nu:["latn"]},prg:{nu:["latn"]},ps:{nu:["arabext"]},"ps-PK":{nu:["arabext"]},pt:{nu:["latn"]},"pt-AO":{nu:["latn"]},"pt-CH":{nu:["latn"]},"pt-CV":{nu:["latn"]},"pt-GQ":{nu:["latn"]},"pt-GW":{nu:["latn"]},"pt-LU":{nu:["latn"]},"pt-MO":{nu:["latn"]},"pt-MZ":{nu:["latn"]},"pt-PT":{nu:["latn"]},"pt-ST":{nu:["latn"]},"pt-TL":{nu:["latn"]},qu:{nu:["latn"]},"qu-BO":{nu:["latn"]},"qu-EC":{nu:["latn"]},quc:{nu:["latn"]},raj:{nu:["deva"]},rhg:{nu:["latn"]},"rhg-Rohg":{nu:["latn"]},"rhg-Rohg-BD":{nu:["latn"]},rif:{nu:["latn"]},rm:{nu:["latn"]},rn:{nu:["latn"]},ro:{nu:["latn"]},"ro-MD":{nu:["latn"]},rof:{nu:["latn"]},ru:{nu:["latn"]},"ru-BY":{nu:["latn"]},"ru-KG":{nu:["latn"]},"ru-KZ":{nu:["latn"]},"ru-MD":{nu:["latn"]},"ru-UA":{nu:["latn"]},rw:{nu:["latn"]},rwk:{nu:["latn"]},sa:{nu:["deva"]},sah:{nu:["latn"]},saq:{nu:["latn"]},sat:{nu:["olck"]},"sat-Deva":{nu:["deva"]},"sat-Olck":{nu:["olck"]},sbp:{nu:["latn"]},sc:{nu:["latn"]},scn:{nu:["latn"]},sd:{nu:["arab"]},"sd-Arab":{nu:["arab"]},"sd-Deva":{nu:["latn"]},sdh:{nu:["arab"]},"sdh-IQ":{nu:["arab"]},se:{nu:["latn"]},"se-FI":{nu:["latn"]},"se-SE":{nu:["latn"]},seh:{nu:["latn"]},ses:{nu:["latn"]},sg:{nu:["latn"]},shi:{nu:["latn"]},"shi-Latn":{nu:["latn"]},"shi-Tfng":{nu:["latn"]},shn:{nu:["latn"]},"shn-TH":{nu:["latn"]},si:{nu:["latn"],separator:{latn:"."}},sid:{nu:["latn"]},sk:{nu:["latn"]},sl:{nu:["latn"]},sma:{nu:["latn"]},"sma-NO":{nu:["latn"]},smj:{nu:["latn"]},"smj-NO":{nu:["latn"]},smn:{nu:["latn"],separator:{latn:"."}},sms:{nu:["latn"]},sn:{nu:["latn"]},so:{nu:["latn"]},"so-DJ":{nu:["latn"]},"so-ET":{nu:["latn"]},"so-KE":{nu:["latn"]},sq:{nu:["latn"]},"sq-MK":{nu:["latn"]},"sq-XK":{nu:["latn"]},sr:{nu:["latn"]},"sr-Cyrl":{nu:["latn"]},"sr-Cyrl-BA":{nu:["latn"]},"sr-Cyrl-ME":{nu:["latn"]},"sr-Cyrl-XK":{nu:["latn"]},"sr-Latn":{nu:["latn"]},"sr-Latn-BA":{nu:["latn"]},"sr-Latn-ME":{nu:["latn"]},"sr-Latn-XK":{nu:["latn"]},ss:{nu:["latn"]},"ss-SZ":{nu:["latn"]},ssy:{nu:["latn"]},st:{nu:["latn"]},"st-LS":{nu:["latn"]},su:{nu:["latn"],separator:{latn:"."}},"su-Latn":{nu:["latn"],separator:{latn:"."}},sv:{nu:["latn"]},"sv-AX":{nu:["latn"]},"sv-FI":{nu:["latn"],separator:{latn:"."}},sw:{nu:["latn"]},"sw-CD":{nu:["latn"]},"sw-KE":{nu:["latn"]},"sw-UG":{nu:["latn"]},syr:{nu:["latn"]},"syr-SY":{nu:["latn"]},szl:{nu:["latn"]},ta:{nu:["latn"]},"ta-LK":{nu:["latn"]},"ta-MY":{nu:["latn"]},"ta-SG":{nu:["latn"]},te:{nu:["latn"]},teo:{nu:["latn"]},"teo-KE":{nu:["latn"]},tg:{nu:["latn"]},th:{nu:["latn"]},ti:{nu:["latn"]},"ti-ER":{nu:["latn"]},tig:{nu:["latn"]},tk:{nu:["latn"]},tn:{nu:["latn"]},"tn-BW":{nu:["latn"]},to:{nu:["latn"]},tok:{nu:["latn"]},tpi:{nu:["latn"]},tr:{nu:["latn"]},"tr-CY":{nu:["latn"]},trv:{nu:["latn"]},trw:{nu:["latn"]},ts:{nu:["latn"]},tt:{nu:["latn"]},twq:{nu:["latn"]},tzm:{nu:["latn"]},ug:{nu:["latn"]},uk:{nu:["latn"]},und:{nu:["latn"]},ur:{nu:["latn"]},"ur-IN":{nu:["arabext"],separator:{arabext:"٫"}},uz:{nu:["latn"]},"uz-Arab":{nu:["arabext"]},"uz-Cyrl":{nu:["latn"]},"uz-Latn":{nu:["latn"]},vai:{nu:["latn"]},"vai-Latn":{nu:["latn"]},"vai-Vaii":{nu:["latn"]},ve:{nu:["latn"]},vec:{nu:["latn"]},vi:{nu:["latn"]},vo:{nu:["latn"]},vun:{nu:["latn"]},wa:{nu:["latn"]},wae:{nu:["latn"]},wal:{nu:["latn"]},wbp:{nu:["latn"]},wo:{nu:["latn"]},xh:{nu:["latn"]},xog:{nu:["latn"]},yav:{nu:["latn"]},yi:{nu:["latn"]},yo:{nu:["latn"]},"yo-BJ":{nu:["latn"]},yrl:{nu:["latn"]},"yrl-CO":{nu:["latn"]},"yrl-VE":{nu:["latn"]},yue:{nu:["latn"]},"yue-Hans":{nu:["latn"]},"yue-Hant":{nu:["latn"]},zgh:{nu:["latn"]},zh:{nu:["latn"]},"zh-Hans":{nu:["latn"]},"zh-Hans-HK":{nu:["latn"]},"zh-Hans-MO":{nu:["latn"]},"zh-Hans-SG":{nu:["latn"]},"zh-Hant":{nu:["latn"]},"zh-Hant-HK":{nu:["latn"]},"zh-Hant-MO":{nu:["latn"]},zu:{nu:["latn"]}}}},3367:function(e,t,n){"use strict";var r=function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)},o=function(e,t,n){var r=t.split("-"),o=r[0],i=r[1],a=r[2],u=!0;if(a&&"$"===a[0]){var s="!"!==a[1],c=(s?n[a.slice(1)]:n[a.slice(2)]).map((function(e){return m[e]||[e]})).reduce((function(e,t){return(0,y.__spreadArray)((0,y.__spreadArray)([],e,!0),t,!0)}),[]);u&&(u=!(c.indexOf(e.region||"")>1!=s))}else u&&(u=!e.region||"*"===a||a===e.region);return u&&(u=!e.script||"*"===i||i===e.script),u&&(u=!e.language||"*"===o||o===e.language),u},i=function(e){return[e.language,e.script,e.region].filter(Boolean).join("-")},a=function(e,t,n){for(var r=0,a=n.matches;r<a.length;r++){var u=a[r],s=o(e,u.desired,n.matchVariables)&&o(t,u.supported,n.matchVariables);if(u.oneway||s||(s=o(e,u.supported,n.matchVariables)&&o(t,u.desired,n.matchVariables)),s){var c=10*u.distance;return n.paradigmLocales.indexOf(i(e))>-1!=n.paradigmLocales.indexOf(i(t))>-1?c-1:c}}throw new Error("No matching distance found")},u=function(e,t,n){var r,o,i=[],u=t.reduce((function(e,t){var n=t.replace(g,"");return i.push(n),e[n]=t,e}),{}),s=function(e,t,n){void 0===n&&(n=b);var r=1/0,o={matchedDesiredLocale:"",distances:{}};return e.forEach((function(e,n){o.distances[e]||(o.distances[e]={}),t.forEach((function(t){var i=function(e,t){var n=new Intl.Locale(e).maximize(),r=new Intl.Locale(t).maximize(),o={language:n.language,script:n.script||"",region:n.region||""},i={language:r.language,script:r.script||"",region:r.region||""},u=0,s=function(){var e,t;if(!p){var n=null===(t=null===(e=v.supplemental.languageMatching["written-new"][0])||void 0===e?void 0:e.paradigmLocales)||void 0===t?void 0:t._locales.split(" "),r=v.supplemental.languageMatching["written-new"].slice(1,5),o=v.supplemental.languageMatching["written-new"].slice(5).map((function(e){var t=Object.keys(e)[0],n=e[t];return{supported:t,desired:n._desired,distance:+n._distance,oneway:"true"===n.oneway}}),{});p={matches:o,matchVariables:r.reduce((function(e,t){var n=Object.keys(t)[0],r=t[n];return e[n.slice(1)]=r._value.split("+"),e}),{}),paradigmLocales:(0,y.__spreadArray)((0,y.__spreadArray)([],n,!0),n.map((function(e){return new Intl.Locale(e.replace(/_/g,"-")).maximize().toString()})),!0)}}return p}();return o.language!==i.language&&(u+=a({language:n.language,script:"",region:""},{language:r.language,script:"",region:""},s)),o.script!==i.script&&(u+=a({language:n.language,script:o.script,region:""},{language:r.language,script:o.script,region:""},s)),o.region!==i.region&&(u+=a(o,i,s)),u}(e,t)+0+40*n;o.distances[e][t]=i,i<r&&(r=i,o.matchedDesiredLocale=e,o.matchedSupportedLocale=t)}))})),r>=n&&(o.matchedDesiredLocale=void 0,o.matchedSupportedLocale=void 0),o}(i,e);return s.matchedSupportedLocale&&s.matchedDesiredLocale&&(r=s.matchedSupportedLocale,o=u[s.matchedDesiredLocale].slice(s.matchedDesiredLocale.length)||void 0),r?{locale:r,extension:o}:{locale:n()}},s=function(e,t){for(var n=t;;){if(e.indexOf(n)>-1)return n;var r=n.lastIndexOf("-");if(!~r)return;r>=2&&"-"===n[r-2]&&(r-=2),n=n.slice(0,r)}},l=function(e,t){r(2===t.length,"key must have 2 elements");var n=e.length,o="-".concat(t,"-"),i=e.indexOf(o);if(-1!==i){for(var a=i+4,u=a,s=a,c=!1;!c;){var l=e.indexOf("-",s);2==(-1===l?n-s:l-s)?c=!0:-1===l?(u=n,c=!0):(u=l,s=l+1)}return e.slice(a,u)}if(o="-".concat(t),-1!==(i=e.indexOf(o))&&i+3===n)return""},f=function(e,t,n,o,i,a){var f;f="lookup"===n.localeMatcher?function(e,t,n){for(var r={locale:""},o=0,i=t;o<i.length;o++){var a=i[o],u=a.replace(g,""),c=s(e,u);if(c)return r.locale=c,a!==u&&(r.extension=a.slice(u.length,a.length)),r}return r.locale=n(),r}(Array.from(e),t,a):u(Array.from(e),t,a);for(var d=f.locale,h={locale:"",dataLocale:d},p="-u",y=0,v=o;y<v.length;y++){var m=v[y];r(d in i,"Missing locale data for ".concat(d));var b=i[d];r("object"==typeof b&&null!==b,"locale data ".concat(m," must be an object"));var w=b[m];r(Array.isArray(w),"keyLocaleData for ".concat(m," must be an array"));var _=w[0];r("string"==typeof _||null===_,"value must be string or null but got ".concat(void 0===_?"undefined":c(_)," in key ").concat(m));var S="";if(f.extension){var E=l(f.extension,m);void 0!==E&&(""!==E?~w.indexOf(E)&&(_=E,S="-".concat(m,"-").concat(_)):~E.indexOf("true")&&(_="true",S="-".concat(m)))}if(m in n){var O=n[m];r("string"==typeof O||null==O,"optionsValue must be String, Undefined or Null"),~w.indexOf(O)&&O!==_&&(_=O,S="")}h[m]=_,p+=S}if(p.length>2){var x=d.indexOf("-x-");if(-1===x)d+=p;else{var k=d.slice(0,x),A=d.slice(x,d.length);d=k+p+A}d=Intl.getCanonicalLocales(d)[0]}return h.locale=d,h},d=function(e,t){for(var n=[],r=0,o=t;r<o.length;r++){var i=s(e,o[r].replace(g,""));i&&n.push(i)}return n},h=function(e,t,n,r){return f(t,(o=e,Intl.getCanonicalLocales(o)),{localeMatcher:(null==r?void 0:r.algorithm)||"best fit"},[],{},(function(){return n})).locale;var o};n.r(t),n.d(t,{LookupSupportedLocales:function(){return d},ResolveLocale:function(){return f},match:function(){return h}});var p,y=n(2712),v={supplemental:{languageMatching:{"written-new":[{paradigmLocales:{_locales:"en en_GB es es_419 pt_BR pt_PT"}},{$enUS:{_value:"AS+CA+GU+MH+MP+PH+PR+UM+US+VI"}},{$cnsar:{_value:"HK+MO"}},{$americas:{_value:"019"}},{$maghreb:{_value:"MA+DZ+TN+LY+MR+EH"}},{no:{_desired:"nb",_distance:"1"}},{bs:{_desired:"hr",_distance:"4"}},{bs:{_desired:"sh",_distance:"4"}},{hr:{_desired:"sh",_distance:"4"}},{sr:{_desired:"sh",_distance:"4"}},{aa:{_desired:"ssy",_distance:"4"}},{de:{_desired:"gsw",_distance:"4",_oneway:"true"}},{de:{_desired:"lb",_distance:"4",_oneway:"true"}},{no:{_desired:"da",_distance:"8"}},{nb:{_desired:"da",_distance:"8"}},{ru:{_desired:"ab",_distance:"30",_oneway:"true"}},{en:{_desired:"ach",_distance:"30",_oneway:"true"}},{nl:{_desired:"af",_distance:"20",_oneway:"true"}},{en:{_desired:"ak",_distance:"30",_oneway:"true"}},{en:{_desired:"am",_distance:"30",_oneway:"true"}},{es:{_desired:"ay",_distance:"20",_oneway:"true"}},{ru:{_desired:"az",_distance:"30",_oneway:"true"}},{ur:{_desired:"bal",_distance:"20",_oneway:"true"}},{ru:{_desired:"be",_distance:"20",_oneway:"true"}},{en:{_desired:"bem",_distance:"30",_oneway:"true"}},{hi:{_desired:"bh",_distance:"30",_oneway:"true"}},{en:{_desired:"bn",_distance:"30",_oneway:"true"}},{zh:{_desired:"bo",_distance:"20",_oneway:"true"}},{fr:{_desired:"br",_distance:"20",_oneway:"true"}},{es:{_desired:"ca",_distance:"20",_oneway:"true"}},{fil:{_desired:"ceb",_distance:"30",_oneway:"true"}},{en:{_desired:"chr",_distance:"20",_oneway:"true"}},{ar:{_desired:"ckb",_distance:"30",_oneway:"true"}},{fr:{_desired:"co",_distance:"20",_oneway:"true"}},{fr:{_desired:"crs",_distance:"20",_oneway:"true"}},{sk:{_desired:"cs",_distance:"20"}},{en:{_desired:"cy",_distance:"20",_oneway:"true"}},{en:{_desired:"ee",_distance:"30",_oneway:"true"}},{en:{_desired:"eo",_distance:"30",_oneway:"true"}},{es:{_desired:"eu",_distance:"20",_oneway:"true"}},{da:{_desired:"fo",_distance:"20",_oneway:"true"}},{nl:{_desired:"fy",_distance:"20",_oneway:"true"}},{en:{_desired:"ga",_distance:"20",_oneway:"true"}},{en:{_desired:"gaa",_distance:"30",_oneway:"true"}},{en:{_desired:"gd",_distance:"20",_oneway:"true"}},{es:{_desired:"gl",_distance:"20",_oneway:"true"}},{es:{_desired:"gn",_distance:"20",_oneway:"true"}},{hi:{_desired:"gu",_distance:"30",_oneway:"true"}},{en:{_desired:"ha",_distance:"30",_oneway:"true"}},{en:{_desired:"haw",_distance:"20",_oneway:"true"}},{fr:{_desired:"ht",_distance:"20",_oneway:"true"}},{ru:{_desired:"hy",_distance:"30",_oneway:"true"}},{en:{_desired:"ia",_distance:"30",_oneway:"true"}},{en:{_desired:"ig",_distance:"30",_oneway:"true"}},{en:{_desired:"is",_distance:"20",_oneway:"true"}},{id:{_desired:"jv",_distance:"20",_oneway:"true"}},{en:{_desired:"ka",_distance:"30",_oneway:"true"}},{fr:{_desired:"kg",_distance:"30",_oneway:"true"}},{ru:{_desired:"kk",_distance:"30",_oneway:"true"}},{en:{_desired:"km",_distance:"30",_oneway:"true"}},{en:{_desired:"kn",_distance:"30",_oneway:"true"}},{en:{_desired:"kri",_distance:"30",_oneway:"true"}},{tr:{_desired:"ku",_distance:"30",_oneway:"true"}},{ru:{_desired:"ky",_distance:"30",_oneway:"true"}},{it:{_desired:"la",_distance:"20",_oneway:"true"}},{en:{_desired:"lg",_distance:"30",_oneway:"true"}},{fr:{_desired:"ln",_distance:"30",_oneway:"true"}},{en:{_desired:"lo",_distance:"30",_oneway:"true"}},{en:{_desired:"loz",_distance:"30",_oneway:"true"}},{fr:{_desired:"lua",_distance:"30",_oneway:"true"}},{hi:{_desired:"mai",_distance:"20",_oneway:"true"}},{en:{_desired:"mfe",_distance:"30",_oneway:"true"}},{fr:{_desired:"mg",_distance:"30",_oneway:"true"}},{en:{_desired:"mi",_distance:"20",_oneway:"true"}},{en:{_desired:"ml",_distance:"30",_oneway:"true"}},{ru:{_desired:"mn",_distance:"30",_oneway:"true"}},{hi:{_desired:"mr",_distance:"30",_oneway:"true"}},{id:{_desired:"ms",_distance:"30",_oneway:"true"}},{en:{_desired:"mt",_distance:"30",_oneway:"true"}},{en:{_desired:"my",_distance:"30",_oneway:"true"}},{en:{_desired:"ne",_distance:"30",_oneway:"true"}},{nb:{_desired:"nn",_distance:"20"}},{no:{_desired:"nn",_distance:"20"}},{en:{_desired:"nso",_distance:"30",_oneway:"true"}},{en:{_desired:"ny",_distance:"30",_oneway:"true"}},{en:{_desired:"nyn",_distance:"30",_oneway:"true"}},{fr:{_desired:"oc",_distance:"20",_oneway:"true"}},{en:{_desired:"om",_distance:"30",_oneway:"true"}},{en:{_desired:"or",_distance:"30",_oneway:"true"}},{en:{_desired:"pa",_distance:"30",_oneway:"true"}},{en:{_desired:"pcm",_distance:"20",_oneway:"true"}},{en:{_desired:"ps",_distance:"30",_oneway:"true"}},{es:{_desired:"qu",_distance:"30",_oneway:"true"}},{de:{_desired:"rm",_distance:"20",_oneway:"true"}},{en:{_desired:"rn",_distance:"30",_oneway:"true"}},{fr:{_desired:"rw",_distance:"30",_oneway:"true"}},{hi:{_desired:"sa",_distance:"30",_oneway:"true"}},{en:{_desired:"sd",_distance:"30",_oneway:"true"}},{en:{_desired:"si",_distance:"30",_oneway:"true"}},{en:{_desired:"sn",_distance:"30",_oneway:"true"}},{en:{_desired:"so",_distance:"30",_oneway:"true"}},{en:{_desired:"sq",_distance:"30",_oneway:"true"}},{en:{_desired:"st",_distance:"30",_oneway:"true"}},{id:{_desired:"su",_distance:"20",_oneway:"true"}},{en:{_desired:"sw",_distance:"30",_oneway:"true"}},{en:{_desired:"ta",_distance:"30",_oneway:"true"}},{en:{_desired:"te",_distance:"30",_oneway:"true"}},{ru:{_desired:"tg",_distance:"30",_oneway:"true"}},{en:{_desired:"ti",_distance:"30",_oneway:"true"}},{ru:{_desired:"tk",_distance:"30",_oneway:"true"}},{en:{_desired:"tlh",_distance:"30",_oneway:"true"}},{en:{_desired:"tn",_distance:"30",_oneway:"true"}},{en:{_desired:"to",_distance:"30",_oneway:"true"}},{ru:{_desired:"tt",_distance:"30",_oneway:"true"}},{en:{_desired:"tum",_distance:"30",_oneway:"true"}},{zh:{_desired:"ug",_distance:"20",_oneway:"true"}},{ru:{_desired:"uk",_distance:"20",_oneway:"true"}},{en:{_desired:"ur",_distance:"30",_oneway:"true"}},{ru:{_desired:"uz",_distance:"30",_oneway:"true"}},{fr:{_desired:"wo",_distance:"30",_oneway:"true"}},{en:{_desired:"xh",_distance:"30",_oneway:"true"}},{en:{_desired:"yi",_distance:"30",_oneway:"true"}},{en:{_desired:"yo",_distance:"30",_oneway:"true"}},{zh:{_desired:"za",_distance:"20",_oneway:"true"}},{en:{_desired:"zu",_distance:"30",_oneway:"true"}},{ar:{_desired:"aao",_distance:"10",_oneway:"true"}},{ar:{_desired:"abh",_distance:"10",_oneway:"true"}},{ar:{_desired:"abv",_distance:"10",_oneway:"true"}},{ar:{_desired:"acm",_distance:"10",_oneway:"true"}},{ar:{_desired:"acq",_distance:"10",_oneway:"true"}},{ar:{_desired:"acw",_distance:"10",_oneway:"true"}},{ar:{_desired:"acx",_distance:"10",_oneway:"true"}},{ar:{_desired:"acy",_distance:"10",_oneway:"true"}},{ar:{_desired:"adf",_distance:"10",_oneway:"true"}},{ar:{_desired:"aeb",_distance:"10",_oneway:"true"}},{ar:{_desired:"aec",_distance:"10",_oneway:"true"}},{ar:{_desired:"afb",_distance:"10",_oneway:"true"}},{ar:{_desired:"ajp",_distance:"10",_oneway:"true"}},{ar:{_desired:"apc",_distance:"10",_oneway:"true"}},{ar:{_desired:"apd",_distance:"10",_oneway:"true"}},{ar:{_desired:"arq",_distance:"10",_oneway:"true"}},{ar:{_desired:"ars",_distance:"10",_oneway:"true"}},{ar:{_desired:"ary",_distance:"10",_oneway:"true"}},{ar:{_desired:"arz",_distance:"10",_oneway:"true"}},{ar:{_desired:"auz",_distance:"10",_oneway:"true"}},{ar:{_desired:"avl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayh",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayn",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayp",_distance:"10",_oneway:"true"}},{ar:{_desired:"bbz",_distance:"10",_oneway:"true"}},{ar:{_desired:"pga",_distance:"10",_oneway:"true"}},{ar:{_desired:"shu",_distance:"10",_oneway:"true"}},{ar:{_desired:"ssh",_distance:"10",_oneway:"true"}},{az:{_desired:"azb",_distance:"10",_oneway:"true"}},{et:{_desired:"vro",_distance:"10",_oneway:"true"}},{ff:{_desired:"ffm",_distance:"10",_oneway:"true"}},{ff:{_desired:"fub",_distance:"10",_oneway:"true"}},{ff:{_desired:"fue",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuf",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuh",_distance:"10",_oneway:"true"}},{ff:{_desired:"fui",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuq",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuv",_distance:"10",_oneway:"true"}},{gn:{_desired:"gnw",_distance:"10",_oneway:"true"}},{gn:{_desired:"gui",_distance:"10",_oneway:"true"}},{gn:{_desired:"gun",_distance:"10",_oneway:"true"}},{gn:{_desired:"nhd",_distance:"10",_oneway:"true"}},{iu:{_desired:"ikt",_distance:"10",_oneway:"true"}},{kln:{_desired:"enb",_distance:"10",_oneway:"true"}},{kln:{_desired:"eyo",_distance:"10",_oneway:"true"}},{kln:{_desired:"niq",_distance:"10",_oneway:"true"}},{kln:{_desired:"oki",_distance:"10",_oneway:"true"}},{kln:{_desired:"pko",_distance:"10",_oneway:"true"}},{kln:{_desired:"sgc",_distance:"10",_oneway:"true"}},{kln:{_desired:"tec",_distance:"10",_oneway:"true"}},{kln:{_desired:"tuy",_distance:"10",_oneway:"true"}},{kok:{_desired:"gom",_distance:"10",_oneway:"true"}},{kpe:{_desired:"gkp",_distance:"10",_oneway:"true"}},{luy:{_desired:"ida",_distance:"10",_oneway:"true"}},{luy:{_desired:"lkb",_distance:"10",_oneway:"true"}},{luy:{_desired:"lko",_distance:"10",_oneway:"true"}},{luy:{_desired:"lks",_distance:"10",_oneway:"true"}},{luy:{_desired:"lri",_distance:"10",_oneway:"true"}},{luy:{_desired:"lrm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lsm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lto",_distance:"10",_oneway:"true"}},{luy:{_desired:"lts",_distance:"10",_oneway:"true"}},{luy:{_desired:"lwg",_distance:"10",_oneway:"true"}},{luy:{_desired:"nle",_distance:"10",_oneway:"true"}},{luy:{_desired:"nyd",_distance:"10",_oneway:"true"}},{luy:{_desired:"rag",_distance:"10",_oneway:"true"}},{lv:{_desired:"ltg",_distance:"10",_oneway:"true"}},{mg:{_desired:"bhr",_distance:"10",_oneway:"true"}},{mg:{_desired:"bjq",_distance:"10",_oneway:"true"}},{mg:{_desired:"bmm",_distance:"10",_oneway:"true"}},{mg:{_desired:"bzc",_distance:"10",_oneway:"true"}},{mg:{_desired:"msh",_distance:"10",_oneway:"true"}},{mg:{_desired:"skg",_distance:"10",_oneway:"true"}},{mg:{_desired:"tdx",_distance:"10",_oneway:"true"}},{mg:{_desired:"tkg",_distance:"10",_oneway:"true"}},{mg:{_desired:"txy",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmv",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmw",_distance:"10",_oneway:"true"}},{mn:{_desired:"mvf",_distance:"10",_oneway:"true"}},{ms:{_desired:"bjn",_distance:"10",_oneway:"true"}},{ms:{_desired:"btj",_distance:"10",_oneway:"true"}},{ms:{_desired:"bve",_distance:"10",_oneway:"true"}},{ms:{_desired:"bvu",_distance:"10",_oneway:"true"}},{ms:{_desired:"coa",_distance:"10",_oneway:"true"}},{ms:{_desired:"dup",_distance:"10",_oneway:"true"}},{ms:{_desired:"hji",_distance:"10",_oneway:"true"}},{ms:{_desired:"id",_distance:"10",_oneway:"true"}},{ms:{_desired:"jak",_distance:"10",_oneway:"true"}},{ms:{_desired:"jax",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvb",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvr",_distance:"10",_oneway:"true"}},{ms:{_desired:"kxd",_distance:"10",_oneway:"true"}},{ms:{_desired:"lce",_distance:"10",_oneway:"true"}},{ms:{_desired:"lcf",_distance:"10",_oneway:"true"}},{ms:{_desired:"liw",_distance:"10",_oneway:"true"}},{ms:{_desired:"max",_distance:"10",_oneway:"true"}},{ms:{_desired:"meo",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfa",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfb",_distance:"10",_oneway:"true"}},{ms:{_desired:"min",_distance:"10",_oneway:"true"}},{ms:{_desired:"mqg",_distance:"10",_oneway:"true"}},{ms:{_desired:"msi",_distance:"10",_oneway:"true"}},{ms:{_desired:"mui",_distance:"10",_oneway:"true"}},{ms:{_desired:"orn",_distance:"10",_oneway:"true"}},{ms:{_desired:"ors",_distance:"10",_oneway:"true"}},{ms:{_desired:"pel",_distance:"10",_oneway:"true"}},{ms:{_desired:"pse",_distance:"10",_oneway:"true"}},{ms:{_desired:"tmw",_distance:"10",_oneway:"true"}},{ms:{_desired:"urk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkt",_distance:"10",_oneway:"true"}},{ms:{_desired:"xmm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zlm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zmi",_distance:"10",_oneway:"true"}},{ne:{_desired:"dty",_distance:"10",_oneway:"true"}},{om:{_desired:"gax",_distance:"10",_oneway:"true"}},{om:{_desired:"hae",_distance:"10",_oneway:"true"}},{om:{_desired:"orc",_distance:"10",_oneway:"true"}},{or:{_desired:"spv",_distance:"10",_oneway:"true"}},{ps:{_desired:"pbt",_distance:"10",_oneway:"true"}},{ps:{_desired:"pst",_distance:"10",_oneway:"true"}},{qu:{_desired:"qub",_distance:"10",_oneway:"true"}},{qu:{_desired:"qud",_distance:"10",_oneway:"true"}},{qu:{_desired:"quf",_distance:"10",_oneway:"true"}},{qu:{_desired:"qug",_distance:"10",_oneway:"true"}},{qu:{_desired:"quh",_distance:"10",_oneway:"true"}},{qu:{_desired:"quk",_distance:"10",_oneway:"true"}},{qu:{_desired:"qul",_distance:"10",_oneway:"true"}},{qu:{_desired:"qup",_distance:"10",_oneway:"true"}},{qu:{_desired:"qur",_distance:"10",_oneway:"true"}},{qu:{_desired:"qus",_distance:"10",_oneway:"true"}},{qu:{_desired:"quw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qux",_distance:"10",_oneway:"true"}},{qu:{_desired:"quy",_distance:"10",_oneway:"true"}},{qu:{_desired:"qva",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qve",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvi",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvj",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvm",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvs",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvz",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qws",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxr",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxt",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxu",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxw",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdc",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdn",_distance:"10",_oneway:"true"}},{sc:{_desired:"sro",_distance:"10",_oneway:"true"}},{sq:{_desired:"aae",_distance:"10",_oneway:"true"}},{sq:{_desired:"aat",_distance:"10",_oneway:"true"}},{sq:{_desired:"aln",_distance:"10",_oneway:"true"}},{syr:{_desired:"aii",_distance:"10",_oneway:"true"}},{uz:{_desired:"uzs",_distance:"10",_oneway:"true"}},{yi:{_desired:"yih",_distance:"10",_oneway:"true"}},{zh:{_desired:"cdo",_distance:"10",_oneway:"true"}},{zh:{_desired:"cjy",_distance:"10",_oneway:"true"}},{zh:{_desired:"cpx",_distance:"10",_oneway:"true"}},{zh:{_desired:"czh",_distance:"10",_oneway:"true"}},{zh:{_desired:"czo",_distance:"10",_oneway:"true"}},{zh:{_desired:"gan",_distance:"10",_oneway:"true"}},{zh:{_desired:"hak",_distance:"10",_oneway:"true"}},{zh:{_desired:"hsn",_distance:"10",_oneway:"true"}},{zh:{_desired:"lzh",_distance:"10",_oneway:"true"}},{zh:{_desired:"mnp",_distance:"10",_oneway:"true"}},{zh:{_desired:"nan",_distance:"10",_oneway:"true"}},{zh:{_desired:"wuu",_distance:"10",_oneway:"true"}},{zh:{_desired:"yue",_distance:"10",_oneway:"true"}},{"*":{_desired:"*",_distance:"80"}},{"en-Latn":{_desired:"am-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"az-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"bn-Beng",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"bo-Tibt",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"hy-Armn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ka-Geor",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"km-Khmr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"kn-Knda",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"lo-Laoo",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ml-Mlym",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"my-Mymr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ne-Deva",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"or-Orya",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"pa-Guru",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ps-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"sd-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"si-Sinh",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ta-Taml",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"te-Telu",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ti-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"tk-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ur-Arab",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"uz-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"yi-Hebr",_distance:"10",_oneway:"true"}},{"sr-Cyrl":{_desired:"sr-Latn",_distance:"5"}},{"zh-Hans":{_desired:"za-Latn",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"zh-Hant":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"ar-Arab":{_desired:"ar-Latn",_distance:"20",_oneway:"true"}},{"bn-Beng":{_desired:"bn-Latn",_distance:"20",_oneway:"true"}},{"gu-Gujr":{_desired:"gu-Latn",_distance:"20",_oneway:"true"}},{"hi-Deva":{_desired:"hi-Latn",_distance:"20",_oneway:"true"}},{"kn-Knda":{_desired:"kn-Latn",_distance:"20",_oneway:"true"}},{"ml-Mlym":{_desired:"ml-Latn",_distance:"20",_oneway:"true"}},{"mr-Deva":{_desired:"mr-Latn",_distance:"20",_oneway:"true"}},{"ta-Taml":{_desired:"ta-Latn",_distance:"20",_oneway:"true"}},{"te-Telu":{_desired:"te-Latn",_distance:"20",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Latn",_distance:"20",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Latn",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hani",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hrkt",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hani",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hang",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"ko-Hang":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"*-*":{_desired:"*-*",_distance:"50"}},{"ar-*-$maghreb":{_desired:"ar-*-$maghreb",_distance:"4"}},{"ar-*-$!maghreb":{_desired:"ar-*-$!maghreb",_distance:"4"}},{"ar-*-*":{_desired:"ar-*-*",_distance:"5"}},{"en-*-$enUS":{_desired:"en-*-$enUS",_distance:"4"}},{"en-*-GB":{_desired:"en-*-$!enUS",_distance:"3"}},{"en-*-$!enUS":{_desired:"en-*-$!enUS",_distance:"4"}},{"en-*-*":{_desired:"en-*-*",_distance:"5"}},{"es-*-$americas":{_desired:"es-*-$americas",_distance:"4"}},{"es-*-$!americas":{_desired:"es-*-$!americas",_distance:"4"}},{"es-*-*":{_desired:"es-*-*",_distance:"5"}},{"pt-*-$americas":{_desired:"pt-*-$americas",_distance:"4"}},{"pt-*-$!americas":{_desired:"pt-*-$!americas",_distance:"4"}},{"pt-*-*":{_desired:"pt-*-*",_distance:"5"}},{"zh-Hant-$cnsar":{_desired:"zh-Hant-$cnsar",_distance:"4"}},{"zh-Hant-$!cnsar":{_desired:"zh-Hant-$!cnsar",_distance:"4"}},{"zh-Hant-*":{_desired:"zh-Hant-*",_distance:"5"}},{"*-*-*":{_desired:"*-*-*",_distance:"4"}}]}}},m={"001":["001","001-status-grouping","002","005","009","011","013","014","015","017","018","019","021","029","030","034","035","039","053","054","057","061","142","143","145","150","151","154","155","AC","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CQ","CR","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","QO","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UN","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"002":["002","002-status-grouping","011","014","015","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EA","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","IC","IO","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SD","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TN","TZ","UG","YT","ZA","ZM","ZW"],"003":["003","013","021","029","AG","AI","AW","BB","BL","BM","BQ","BS","BZ","CA","CR","CU","CW","DM","DO","GD","GL","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PM","PR","SV","SX","TC","TT","US","VC","VG","VI"],"005":["005","AR","BO","BR","BV","CL","CO","EC","FK","GF","GS","GY","PE","PY","SR","UY","VE"],"009":["009","053","054","057","061","AC","AQ","AS","AU","CC","CK","CP","CX","DG","FJ","FM","GU","HM","KI","MH","MP","NC","NF","NR","NU","NZ","PF","PG","PN","PW","QO","SB","TA","TK","TO","TV","UM","VU","WF","WS"],"011":["011","BF","BJ","CI","CV","GH","GM","GN","GW","LR","ML","MR","NE","NG","SH","SL","SN","TG"],"013":["013","BZ","CR","GT","HN","MX","NI","PA","SV"],"014":["014","BI","DJ","ER","ET","IO","KE","KM","MG","MU","MW","MZ","RE","RW","SC","SO","SS","TF","TZ","UG","YT","ZM","ZW"],"015":["015","DZ","EA","EG","EH","IC","LY","MA","SD","TN"],"017":["017","AO","CD","CF","CG","CM","GA","GQ","ST","TD"],"018":["018","BW","LS","NA","SZ","ZA"],"019":["003","005","013","019","019-status-grouping","021","029","419","AG","AI","AR","AW","BB","BL","BM","BO","BQ","BR","BS","BV","BZ","CA","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GL","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PM","PR","PY","SR","SV","SX","TC","TT","US","UY","VC","VE","VG","VI"],"021":["021","BM","CA","GL","PM","US"],"029":["029","AG","AI","AW","BB","BL","BQ","BS","CU","CW","DM","DO","GD","GP","HT","JM","KN","KY","LC","MF","MQ","MS","PR","SX","TC","TT","VC","VG","VI"],"030":["030","CN","HK","JP","KP","KR","MN","MO","TW"],"034":["034","AF","BD","BT","IN","IR","LK","MV","NP","PK"],"035":["035","BN","ID","KH","LA","MM","MY","PH","SG","TH","TL","VN"],"039":["039","AD","AL","BA","ES","GI","GR","HR","IT","ME","MK","MT","PT","RS","SI","SM","VA","XK"],"053":["053","AU","CC","CX","HM","NF","NZ"],"054":["054","FJ","NC","PG","SB","VU"],"057":["057","FM","GU","KI","MH","MP","NR","PW","UM"],"061":["061","AS","CK","NU","PF","PN","TK","TO","TV","WF","WS"],142:["030","034","035","142","143","145","AE","AF","AM","AZ","BD","BH","BN","BT","CN","CY","GE","HK","ID","IL","IN","IQ","IR","JO","JP","KG","KH","KP","KR","KW","KZ","LA","LB","LK","MM","MN","MO","MV","MY","NP","OM","PH","PK","PS","QA","SA","SG","SY","TH","TJ","TL","TM","TR","TW","UZ","VN","YE"],143:["143","KG","KZ","TJ","TM","UZ"],145:["145","AE","AM","AZ","BH","CY","GE","IL","IQ","JO","KW","LB","OM","PS","QA","SA","SY","TR","YE"],150:["039","150","151","154","155","AD","AL","AT","AX","BA","BE","BG","BY","CH","CQ","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GG","GI","GR","HR","HU","IE","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SJ","SK","SM","UA","VA","XK"],151:["151","BG","BY","CZ","HU","MD","PL","RO","RU","SK","UA"],154:["154","AX","CQ","DK","EE","FI","FO","GB","GG","IE","IM","IS","JE","LT","LV","NO","SE","SJ"],155:["155","AT","BE","CH","DE","FR","LI","LU","MC","NL"],202:["011","014","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","ER","ET","GA","GH","GM","GN","GQ","GW","IO","KE","KM","LR","LS","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TZ","UG","YT","ZA","ZM","ZW"],419:["005","013","029","419","AG","AI","AR","AW","BB","BL","BO","BQ","BR","BS","BV","BZ","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PR","PY","SR","SV","SX","TC","TT","UY","VC","VE","VG","VI"],EU:["AT","BE","BG","CY","CZ","DE","DK","EE","ES","EU","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"],EZ:["AT","BE","CY","DE","EE","ES","EZ","FI","FR","GR","IE","IT","LT","LU","LV","MT","NL","PT","SI","SK"],QO:["AC","AQ","CP","DG","QO","TA"],UN:["AD","AE","AF","AG","AL","AM","AO","AR","AT","AU","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CD","CF","CG","CH","CI","CL","CM","CN","CO","CR","CU","CV","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FM","FR","GA","GB","GD","GE","GH","GM","GN","GQ","GR","GT","GW","GY","HN","HR","HT","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MR","MT","MU","MV","MW","MX","MY","MZ","NA","NE","NG","NI","NL","NO","NP","NR","NZ","OM","PA","PE","PG","PH","PK","PL","PT","PW","PY","QA","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SI","SK","SL","SM","SN","SO","SR","SS","ST","SV","SY","SZ","TD","TG","TH","TJ","TL","TM","TN","TO","TR","TT","TV","TZ","UA","UG","UN","US","UY","UZ","VC","VE","VN","VU","WS","YE","ZA","ZM","ZW"]},g=/-u(?:-[0-9a-z]{2,8})+/gi,b=838},4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},9014:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),u.call(this,e)};var s=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+s,e)).$offset=a,u.$x.$localOffset=s}else u=this.utc();return u};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),o=i(e).local();return d.call(r,o,t,n)}}}()},2257:function(e,n,o){var a=Symbol("SemVer ANY"),u=function(){"use strict";function e(n,r){if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),i(n,e)){if(n.loose===!!r.loose)return n;n=n.value}d("comparator",n,r),this.options=r,this.loose=!!r.loose,this.parse(n),this.semver===a?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}return r(e,[{key:"parse",value:function(e){var t=this.options.loose?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new h(n[2],this.options.loose):this.semver=a}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(d("Comparator.test",e,this.options.loose),this.semver===a||e===a)return!0;if("string"==typeof e)try{e=new h(e,this.options)}catch(e){return!1}return f(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!i(t,e))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new p(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new p(this.value,n).test(t.semver);var r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),a=this.semver.version===t.semver.version,u=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=f(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),c=f(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||o||a&&u||s||c}}],[{key:"ANY",get:function(){return a}}]),e}();e.exports=u;var s=o(5765),c=s.re,l=s.t,f=o(7539),d=o(4225),h=o(6376),p=o(6902)},6902:function(e,n,o){var a=function(){"use strict";function e(n,r){var o=this;if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),i(n,e))return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new e(n.raw,r);if(i(n,u))return this.raw=n.value,this.set=[[n]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n,this.set=n.split(/\s*\|\|\s*/).map((function(e){return o.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(n));this.format()}return r(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,n=this.options.loose;e=e.trim();var r=n?f[d.HYPHENRANGELOOSE]:f[d.HYPHENRANGE];e=e.replace(r,A(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(f[d.COMPARATORTRIM],h),s("comparator trim",e,f[d.COMPARATORTRIM]),e=(e=(e=e.replace(f[d.TILDETRIM],p)).replace(f[d.CARETTRIM],y)).split(/\s+/).join(" ");var o=n?f[d.COMPARATORLOOSE]:f[d.COMPARATOR];return e.split(" ").map((function(e){return m(e,t.options)})).join(" ").split(/\s+/).map((function(e){return k(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(o)}:function(){return!0}).map((function(e){return new u(e,t.options)}))}},{key:"intersects",value:function(t,n){if(!i(t,e))throw new TypeError("a Range is required");return this.set.some((function(e){return v(e,n)&&t.set.some((function(t){return v(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}]),e}();e.exports=a;var u=o(2257),s=o(4225),c=o(6376),l=o(5765),f=l.re,d=l.t,h=l.comparatorTrimReplace,p=l.tildeTrimReplace,y=l.caretTrimReplace,v=function(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n},m=function(e,t){return s("comp",e,t),e=_(e,t),s("caret",e),e=b(e,t),s("tildes",e),e=E(e,t),s("xrange",e),e=x(e,t),s("stars",e),e},g=function(e){return!e||"x"===e.toLowerCase()||"*"===e},b=function(e,t){return e.trim().split(/\s+/).map((function(e){return w(e,t)})).join(" ")},w=function(e,t){var n=t.loose?f[d.TILDELOOSE]:f[d.TILDE];return e.replace(n,(function(t,n,r,o,i){var a;return s("tilde",e,t,n,r,o,i),g(n)?a="":g(r)?a=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):g(o)?a=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):i?(s("replaceTilde pr",i),a=">=".concat(n,".").concat(r,".").concat(o,"-").concat(i," <").concat(n,".").concat(+r+1,".0-0")):a=">=".concat(n,".").concat(r,".").concat(o," <").concat(n,".").concat(+r+1,".0-0"),s("tilde return",a),a}))},_=function(e,t){return e.trim().split(/\s+/).map((function(e){return S(e,t)})).join(" ")},S=function(e,t){s("caret",e,t);var n=t.loose?f[d.CARETLOOSE]:f[d.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(function(t,n,o,i,a){var u;return s("caret",e,t,n,o,i,a),g(n)?u="":g(o)?u=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):g(i)?u="0"===n?">=".concat(n,".").concat(o,".0").concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".0").concat(r," <").concat(+n+1,".0.0-0"):a?(s("replaceCaret pr",a),u="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(+n+1,".0.0-0")):(s("no pr"),u="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i," <").concat(+n+1,".0.0-0")),s("caret return",u),u}))},E=function(e,t){return s("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return O(e,t)})).join(" ")},O=function(e,t){e=e.trim();var n=t.loose?f[d.XRANGELOOSE]:f[d.XRANGE];return e.replace(n,(function(n,r,o,i,a,u){s("xRange",e,n,r,o,i,a,u);var c=g(o),l=c||g(i),f=l||g(a),d=f;return"="===r&&d&&(r=""),u=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(i=0),a=0,">"===r?(r=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(u="-0"),n="".concat(r+o,".").concat(i,".").concat(a).concat(u)):l?n=">=".concat(o,".0.0").concat(u," <").concat(+o+1,".0.0-0"):f&&(n=">=".concat(o,".").concat(i,".0").concat(u," <").concat(o,".").concat(+i+1,".0-0")),s("xRange return",n),n}))},x=function(e,t){return s("replaceStars",e,t),e.trim().replace(f[d.STAR],"")},k=function(e,t){return s("replaceGTE0",e,t),e.trim().replace(f[t.includePrerelease?d.GTE0PRE:d.GTE0],"")},A=function(e){return function(t,n,r,o,i,a,u,s,c,l,f,d,h){return"".concat(n=g(r)?"":g(o)?">=".concat(r,".0.0").concat(e?"-0":""):g(i)?">=".concat(r,".").concat(o,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":"")," ").concat(s=g(c)?"":g(l)?"<".concat(+c+1,".0.0-0"):g(f)?"<".concat(c,".").concat(+l+1,".0-0"):d?"<=".concat(c,".").concat(l,".").concat(f,"-").concat(d):e?"<".concat(c,".").concat(l,".").concat(+f+1,"-0"):"<=".concat(s)).trim()}},P=function(e,t,n){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var o=0;o<e.length;o++)if(s(e[o].semver),e[o].semver!==u.ANY&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},6376:function(e,n,o){var a=o(4225),u=o(3295),s=u.MAX_LENGTH,c=u.MAX_SAFE_INTEGER,l=o(5765),f=l.re,d=l.t,h=o(6742).compareIdentifiers,p=function(){"use strict";function e(n,r){if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),i(n,e)){if(n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease)return n;n=n.version}else if("string"!=typeof n)throw new TypeError("Invalid Version: ".concat(n));if(n.length>s)throw new TypeError("version is longer than ".concat(s," characters"));a("SemVer",n,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;var o=n.trim().match(r.loose?f[d.LOOSE]:f[d.FULL]);if(!o)throw new TypeError("Invalid Version: ".concat(n));if(this.raw=n,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>c||this.major<0)throw new TypeError("Invalid major version");if(this.minor>c||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>c||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<c)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}return r(e,[{key:"format",value:function(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}},{key:"toString",value:function(){return this.version}},{key:"compare",value:function(t){if(a("SemVer.compare",this.version,this.options,t),!i(t,e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}},{key:"compareMain",value:function(t){return i(t,e)||(t=new e(t,this.options)),h(this.major,t.major)||h(this.minor,t.minor)||h(this.patch,t.patch)}},{key:"comparePre",value:function(t){if(i(t,e)||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var n=0;do{var r=this.prerelease[n],o=t.prerelease[n];if(a("prerelease compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return h(r,o)}while(++n)}},{key:"compareBuild",value:function(t){i(t,e)||(t=new e(t,this.options));var n=0;do{var r=this.build[n],o=t.build[n];if(a("prerelease compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return h(r,o)}while(++n)}},{key:"inc",value:function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}();e.exports=p},3507:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:function(e,t,n){var r=n(8718),o=n(1194),i=n(1312),a=n(5903),u=n(1544),s=n(2056);e.exports=function(e,t,n,c){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return a(e,n,c);case"<":return u(e,n,c);case"<=":return s(e,n,c);default:throw new TypeError("Invalid operator: ".concat(t))}}},9038:function(e,t,n){var r=n(6376),o=n(3959),a=n(5765),u=a.re,s=a.t;e.exports=function(e,t){if(i(e,r))return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var a;(a=u[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),u[s.COERCERTL].lastIndex=a.index+a[1].length+a[2].length;u[s.COERCERTL].lastIndex=-1}else n=e.match(u[s.COERCE]);return null===n?null:o("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)}},8880:function(e,t,n){var r=n(6376);e.exports=function(e,t,n){var o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},7880:function(e,t,n){var r=n(6269);e.exports=function(e,t){return r(e,t,!0)}},6269:function(e,t,n){var r=n(6376);e.exports=function(e,t,n){return new r(e,n).compare(new r(t,n))}},2378:function(e,t,n){var r=n(3959),o=n(8718);e.exports=function(e,t){if(o(e,t))return null;var n=r(e),i=r(t),a=n.prerelease.length||i.prerelease.length,u=a?"pre":"",s=a?"prerelease":"";for(var c in n)if(("major"===c||"minor"===c||"patch"===c)&&n[c]!==i[c])return u+c;return s}},8718:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return 0===r(e,t,n)}},1312:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)>0}},5903:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)>=0}},253:function(e,t,n){var r=n(6376);e.exports=function(e,t,n,o){"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},1544:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)<0}},2056:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)<=0}},8679:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).major}},7789:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).minor}},1194:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return 0!==r(e,t,n)}},3959:function(e,t,n){var r=n(3295).MAX_LENGTH,o=n(5765),a=o.re,u=o.t,s=n(6376);e.exports=function(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),i(e,s))return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[u.LOOSE]:a[u.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},2358:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).patch}},7559:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9795:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(t,e,n)}},3657:function(e,t,n){var r=n(8880);e.exports=function(e,t){return e.sort((function(e,n){return r(n,e,t)}))}},5712:function(e,t,n){var r=n(6902);e.exports=function(e,t,n){try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},1100:function(e,t,n){var r=n(8880);e.exports=function(e,t){return e.sort((function(e,n){return r(e,n,t)}))}},6397:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e,t);return n?n.version:null}},1249:function(e,t,n){var r=n(5765);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(3295).SEMVER_SPEC_VERSION,SemVer:n(6376),compareIdentifiers:n(6742).compareIdentifiers,rcompareIdentifiers:n(6742).rcompareIdentifiers,parse:n(3959),valid:n(6397),clean:n(3507),inc:n(253),diff:n(2378),major:n(8679),minor:n(7789),patch:n(2358),prerelease:n(7559),compare:n(6269),rcompare:n(9795),compareLoose:n(7880),compareBuild:n(8880),sort:n(1100),rsort:n(3657),gt:n(1312),lt:n(1544),eq:n(8718),neq:n(1194),gte:n(5903),lte:n(2056),cmp:n(7539),coerce:n(9038),Comparator:n(2257),Range:n(6902),satisfies:n(5712),toComparators:n(1042),maxSatisfying:n(5775),minSatisfying:n(1657),minVersion:n(5316),validRange:n(9042),outside:n(6826),gtr:n(7606),ltr:n(32),intersects:n(2937),simplifyRange:n(7908),subset:n(799)}},3295:function(e){var t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4225:function(e){var t,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=console).error.apply(t,["SEMVER"].concat(s(n)))}:function(){};e.exports=n},6742:function(e){var t=/^[0-9]+$/,n=function(e,n){var r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:function(e,t){return n(t,e)}}},5765:function(e,t,n){var r=n(3295).MAX_SAFE_COMPONENT_LENGTH,o=n(4225),i=(t=e.exports={}).re=[],a=t.src=[],u=t.t={},s=0,c=function(e,t,n){var r=s++;o(r,t),u[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION","(".concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")")),c("MAINVERSIONLOOSE","(".concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")")),c("PRERELEASEIDENTIFIER","(?:".concat(a[u.NUMERICIDENTIFIER],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),c("PRERELEASEIDENTIFIERLOOSE","(?:".concat(a[u.NUMERICIDENTIFIERLOOSE],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),c("PRERELEASE","(?:-(".concat(a[u.PRERELEASEIDENTIFIER],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIER],")*))")),c("PRERELEASELOOSE","(?:-?(".concat(a[u.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIERLOOSE],")*))")),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD","(?:\\+(".concat(a[u.BUILDIDENTIFIER],"(?:\\.").concat(a[u.BUILDIDENTIFIER],")*))")),c("FULLPLAIN","v?".concat(a[u.MAINVERSION]).concat(a[u.PRERELEASE],"?").concat(a[u.BUILD],"?")),c("FULL","^".concat(a[u.FULLPLAIN],"$")),c("LOOSEPLAIN","[v=\\s]*".concat(a[u.MAINVERSIONLOOSE]).concat(a[u.PRERELEASELOOSE],"?").concat(a[u.BUILD],"?")),c("LOOSE","^".concat(a[u.LOOSEPLAIN],"$")),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE","".concat(a[u.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),c("XRANGEIDENTIFIER","".concat(a[u.NUMERICIDENTIFIER],"|x|X|\\*")),c("XRANGEPLAIN","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:").concat(a[u.PRERELEASE],")?").concat(a[u.BUILD],"?)?)?")),c("XRANGEPLAINLOOSE","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:").concat(a[u.PRERELEASELOOSE],")?").concat(a[u.BUILD],"?)?)?")),c("XRANGE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAIN],"$")),c("XRANGELOOSE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAINLOOSE],"$")),c("COERCE","(^|[^\\d])(\\d{1,".concat(r,"})(?:\\.(\\d{1,").concat(r,"}))?(?:\\.(\\d{1,").concat(r,"}))?(?:$|[^\\d])")),c("COERCERTL",a[u.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM","(\\s*)".concat(a[u.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",c("TILDE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAIN],"$")),c("TILDELOOSE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAINLOOSE],"$")),c("LONECARET","(?:\\^)"),c("CARETTRIM","(\\s*)".concat(a[u.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",c("CARET","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAIN],"$")),c("CARETLOOSE","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAINLOOSE],"$")),c("COMPARATORLOOSE","^".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],")$|^$")),c("COMPARATOR","^".concat(a[u.GTLT],"\\s*(").concat(a[u.FULLPLAIN],")$|^$")),c("COMPARATORTRIM","(\\s*)".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],"|").concat(a[u.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE","^\\s*(".concat(a[u.XRANGEPLAIN],")\\s+-\\s+(").concat(a[u.XRANGEPLAIN],")\\s*$")),c("HYPHENRANGELOOSE","^\\s*(".concat(a[u.XRANGEPLAINLOOSE],")\\s+-\\s+(").concat(a[u.XRANGEPLAINLOOSE],")\\s*$")),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},7606:function(e,t,n){var r=n(6826);e.exports=function(e,t,n){return r(e,t,">",n)}},2937:function(e,t,n){var r=n(6902);e.exports=function(e,t,n){return e=new r(e,n),t=new r(t,n),e.intersects(t)}},32:function(e,t,n){var r=n(6826);e.exports=function(e,t,n){return r(e,t,"<",n)}},5775:function(e,t,n){var r=n(6376),o=n(6902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&-1!==a.compare(e)||(a=new r(i=e,n)))})),i}},1657:function(e,t,n){var r=n(6376),o=n(6902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&1!==a.compare(e)||(a=new r(i=e,n)))})),i}},5316:function(e,t,n){var r=n(6376),o=n(6902),i=n(1312);e.exports=function(e,t){e=new o(e,t);var n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(var a=0;a<e.set.length;++a)e.set[a].forEach((function(e){var t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!i(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}}));return n&&e.test(n)?n:null}},6826:function(e,t,n){var r=n(6376),o=n(2257),i=o.ANY,a=n(6902),u=n(5712),s=n(1312),l=n(1544),f=n(2056),d=n(5903);e.exports=function(e,t,n,h){var p,y,v,m,g,b=function(n){var r=t.set[n],a=null,u=null;return r.forEach((function(e){e.semver===i&&(e=new o(">=0.0.0")),a=a||e,u=u||e,p(e.semver,a.semver,h)?a=e:v(e.semver,u.semver,h)&&(u=e)})),a.operator===m||a.operator===g?{v:!1}:u.operator&&u.operator!==m||!y(e,u.semver)?u.operator===g&&v(e,u.semver)?{v:!1}:void 0:{v:!1}};switch(e=new r(e,h),t=new a(t,h),n){case">":p=s,y=f,v=l,m=">",g=">=";break;case"<":p=l,y=d,v=s,m="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(e,t,h))return!1;for(var w=0;w<t.set.length;++w){var _=b(w);if("object"===c(_))return _.v}return!0}},7908:function(e,t,n){var r=n(5712),o=n(6269);e.exports=function(e,t,n){var i=[],a=null,s=null,c=e.sort((function(e,t){return o(e,t,n)})),l=!0,f=!1,d=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var y=h.value;r(y,t,n)?(s=y,a||(a=y)):(s&&i.push([a,s]),s=null,a=null)}}catch(e){f=!0,d=e}finally{try{l||null==p.return||p.return()}finally{if(f)throw d}}a&&i.push([a,null]);var v=[],m=!0,g=!1,b=void 0;try{for(var w,_=i[Symbol.iterator]();!(m=(w=_.next()).done);m=!0){var S=u(w.value,2),E=S[0],O=S[1];E===O?v.push(E):O||E!==c[0]?O?E===c[0]?v.push("<=".concat(O)):v.push("".concat(E," - ").concat(O)):v.push(">=".concat(E)):v.push("*")}}catch(e){g=!0,b=e}finally{try{m||null==_.return||_.return()}finally{if(g)throw b}}var x=v.join(" || "),k="string"==typeof t.raw?t.raw:String(t);return x.length<k.length?x:t}},799:function(e,t,n){var r=n(6902),o=n(2257).ANY,i=n(5712),a=n(6269),u=function(e,t,n){if(1===e.length&&e[0].semver===o)return 1===t.length&&t[0].semver===o;var r,u,l,f,d,h=new Set,p=!0,y=!1,v=void 0;try{for(var m,g=e[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var b=m.value;">"===b.operator||">="===b.operator?r=s(r,b,n):"<"===b.operator||"<="===b.operator?u=c(u,b,n):h.add(b.semver)}}catch(e){y=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(y)throw v}}if(h.size>1)return null;if(r&&u){if((l=a(r.semver,u.semver,n))>0)return null;if(0===l&&(">="!==r.operator||"<="!==u.operator))return null}var w=!0,_=!1,S=void 0;try{for(var E,O=h[Symbol.iterator]();!(w=(E=O.next()).done);w=!0){var x=E.value;if(r&&!i(x,String(r),n))return null;if(u&&!i(x,String(u),n))return null;var k=!0,A=!1,P=void 0;try{for(var j,D=t[Symbol.iterator]();!(k=(j=D.next()).done);k=!0){var C=j.value;if(!i(x,String(C),n))return!1}}catch(e){A=!0,P=e}finally{try{k||null==D.return||D.return()}finally{if(A)throw P}}return!0}}catch(e){_=!0,S=e}finally{try{w||null==O.return||O.return()}finally{if(_)throw S}}var T=!0,I=!1,M=void 0;try{for(var R,N=t[Symbol.iterator]();!(T=(R=N.next()).done);T=!0){var L=R.value;if(d=d||">"===L.operator||">="===L.operator,f=f||"<"===L.operator||"<="===L.operator,r)if(">"===L.operator||">="===L.operator){if(s(r,L,n)===L)return!1}else if(">="===r.operator&&!i(r.semver,String(L),n))return!1;if(u)if("<"===L.operator||"<="===L.operator){if(c(u,L,n)===L)return!1}else if("<="===u.operator&&!i(u.semver,String(L),n))return!1;if(!L.operator&&(u||r)&&0!==l)return!1}}catch(e){I=!0,M=e}finally{try{T||null==N.return||N.return()}finally{if(I)throw M}}return!(r&&f&&!u&&0!==l||u&&d&&!r&&0!==l)},s=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t,n){e=new r(e,n),t=new r(t,n);var o=!1,i=!0,a=!1,s=void 0;try{e:for(var c,l=e.set[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var f=c.value,d=!0,h=!1,p=void 0;try{for(var y,v=t.set[Symbol.iterator]();!(d=(y=v.next()).done);d=!0){var m=y.value,g=u(f,m,n);if(o=o||null!==g,g)continue e}}catch(e){h=!0,p=e}finally{try{d||null==v.return||v.return()}finally{if(h)throw p}}if(o)return!1}}catch(e){a=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}return!0}},1042:function(e,t,n){var r=n(6902);e.exports=function(e,t){return new r(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}},9042:function(e,t,n){var r=n(6902);e.exports=function(e,t){try{return new r(e,t).range||"*"}catch(e){return null}}},9688:function(e){"use strict";e.exports=l},2712:function(e,t,n){"use strict";var r=function(e,t){var n=function(){this.constructor=e};if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");I(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},a=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},u=function(e,t){return function(n,r){t(n,r,e)}},s=function(e,t,n,r,o,i){for(var a,u=function(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e},s=r.kind,c="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?r.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var p={};for(var y in r)p[y]="access"===y?{}:r[y];for(var y in r.access)p.access[y]=r.access[y];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(u(e||null))};var v=(0,n[h])("accessor"===s?{get:f.get,set:f.set}:f[c],p);if("accessor"===s){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(a=u(v.get))&&(f.get=a),(a=u(v.set))&&(f.set=a),(a=u(v.init))&&o.unshift(a)}else(a=u(v))&&("field"===s?o.unshift(a):f[c]=a)}l&&Object.defineProperty(l,r.name,f),d=!0},l=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0},f=function(e){return"symbol"==(void 0===e?"undefined":c(e))?e:"".concat(e)},d=function(e,t,n){return"symbol"==(void 0===t?"undefined":c(t))&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},h=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},p=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){var u=function(e){try{c(r.next(e))}catch(e){a(e)}},s=function(e){try{c(r.throw(e))}catch(e){a(e)}},c=function(e){var t;e.done?o(e.value):(t=e.value,i(t,n)?t:new n((function(e){e(t)}))).then(u,s)};c((r=r.apply(e,t||[])).next())}))},y=function(e,t){var n,r,o,i,a=function(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},v=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||R(t,e,n)},m=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},g=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},b=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e},w=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},S=function(e,t,n){var r=function(e){l[e]&&(c[e]=function(t){return new Promise((function(n,r){f.push([e,t,n,r])>1||o(e,t)}))})},o=function(e,t){try{i((n=l[e](t)).value,N)?Promise.resolve(n.value.v).then(a,u):s(f[0][2],n)}catch(e){s(f[0][3],e)}var n},a=function(e){o("next",e)},u=function(e){o("throw",e)},s=function(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])};if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=n.apply(e,t||[]),f=[];return c={},r("next"),r("throw"),r("return"),c[Symbol.asyncIterator]=function(){return this},c},E=function(e){var t,n,r=function(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:N(e[r](t)),done:!1}:o?o(t):t}:o};return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t},O=function(e){var t=function(t){n[t]=e[t]&&function(n){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(n=e[t](n)).done,n.value)}))}};if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n)},x=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&R(t,e,n);return L(t,e),t},A=function(e){return e&&e.__esModule?e:{default:e}},P=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},j=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},D=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},C=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t},T=function(e){var t=function(t){e.error=e.hasError?new F(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0};return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var o=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(o).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()};n.r(t),n.d(t,{__addDisposableResource:function(){return C},__assign:function(){return M},__asyncDelegator:function(){return E},__asyncGenerator:function(){return S},__asyncValues:function(){return O},__await:function(){return N},__awaiter:function(){return p},__classPrivateFieldGet:function(){return P},__classPrivateFieldIn:function(){return D},__classPrivateFieldSet:function(){return j},__createBinding:function(){return R},__decorate:function(){return a},__disposeResources:function(){return T},__esDecorate:function(){return s},__exportStar:function(){return v},__extends:function(){return r},__generator:function(){return y},__importDefault:function(){return A},__importStar:function(){return k},__makeTemplateObject:function(){return x},__metadata:function(){return h},__param:function(){return u},__propKey:function(){return f},__read:function(){return g},__rest:function(){return o},__runInitializers:function(){return l},__setFunctionName:function(){return d},__spread:function(){return b},__spreadArray:function(){return _},__spreadArrays:function(){return w},__values:function(){return m},default:function(){return B}});var I=function(e,t){return I=Object.setPrototypeOf||i({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},I(e,t)},M=function(){return M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},M.apply(this,arguments)},R=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function N(e){return i(this,N)?(this.v=e,this):new N(e)}var L=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},F="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r},B={__extends:r,__assign:M,__rest:o,__decorate:a,__param:u,__metadata:h,__awaiter:p,__generator:y,__createBinding:R,__exportStar:v,__values:m,__read:g,__spread:b,__spreadArrays:w,__spreadArray:_,__await:N,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:O,__makeTemplateObject:x,__importStar:k,__importDefault:A,__classPrivateFieldGet:P,__classPrivateFieldSet:j,__classPrivateFieldIn:D,__addDisposableResource:C,__disposeResources:T}}},n={};function f(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t].call(o.exports,o,o.exports,f),o.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return function(){"use strict";var e=function(e,t){var r=e.copy(),o="hour"in r?function(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,function(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=w(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=w(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=w(e.minute,60);var t=Math.floor(e.hour/24);return e.hour=w(e.hour,24),t}(e)}(r,t):0;n(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,l(r),v(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=o,function(e){for(;e.day<1;)e.month--,l(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,l(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);var i=r.calendar.getYearsInEra(r);if(r.year>i){var a,u,s=null===(a=(u=r.calendar).isInverseEra)||void 0===a?void 0:a.call(u,r);r.year=i,r.month=s?1:r.calendar.getMonthsInYear(r),r.day=s?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);var c=r.calendar.getMonthsInYear(r);return r.month>c&&(r.month=c,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r},n=function(e,t){var n,r;(null===(n=(r=e.calendar).isInverseEra)||void 0===n?void 0:n.call(r,e))&&(t=-t),e.year+=t},l=function(e){for(;e.month<1;)n(e,-1),e.month+=e.calendar.getMonthsInYear(e);for(var t=0;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,n(e,1)},v=function(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))},m=function(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),v(e)},g=function(t,n){return e(t,function(e){var t={};for(var n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}(n))},b=function(e,t){var n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),m(n),n},w=function(e,t){var n=e%t;return n<0&&(n+=t),n},_=function(e,t,n,r){var o=e.copy();switch(t){case"era":var i=e.calendar.getEras(),a=i.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=S(a,n,0,i.length-1,null==r?void 0:r.round),o.era=i[a],m(o);break;case"year":var u,s;(null===(u=(s=o.calendar).isInverseEra)||void 0===u?void 0:u.call(s,o))&&(n=-n),o.year=S(e.year,n,-1/0,9999,null==r?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=S(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":o.day=S(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),m(o),o},S=function(e,t,n,r){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4]){(e+=Math.sign(t))<n&&(e=r);var o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e},E=function(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)},O=function(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond},x=function(){return null==Ye&&(Ye=(new Intl.DateTimeFormat).resolvedOptions().timeZone),Ye},k=function(e,t){return e-t*Math.floor(e/t)},A=function(e,t,n,r){var o=(t=j(e,t))-1,i=-2;return n<=2?i=0:P(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)},P=function(e){return e%4==0&&(e%100!=0||e%400==0)},j=function(e,t){return"BC"===e?1-t:t},D=function(e){var t="AD";return e<=0&&(t="BC",e=1-e),[t,e]},C=function(e){var t=U(e,new Xe);return"".concat(String(t.year).padStart(4,"0"),"-").concat(String(t.month).padStart(2,"0"),"-").concat(String(t.day).padStart(2,"0"))},T=function(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)},I=function(e){var t,n="object"==typeof e[0]?e.shift():new Xe;if("string"==typeof e[0])t=e.shift();else{var r=n.getEras();t=r[r.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]},M=function(e){return R(j((e=U(e,new Xe)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)},R=function(e,t,n,r,o,i,a){var u=new Date;return u.setUTCHours(r,o,i,a),u.setUTCFullYear(e,t-1,n),u.getTime()},N=function(e,t){if("UTC"===t)return 0;if(e>0&&t===x())return-6e4*new Date(e).getTimezoneOffset();var n=L(e,t),r=n.year,o=n.month,i=n.day,a=n.hour,u=n.minute,s=n.second;return R(r,o,i,a,u,s,0)-1e3*Math.floor(e/1e3)},L=function(e,t){var n=rt.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),rt.set(t,n));var r=n.formatToParts(new Date(e)),o={},i=!0,a=!1,u=void 0;try{for(var s,c=r[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;"literal"!==l.type&&(o[l.type]=l.value)}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}return{year:"BC"===o.era||"B"===o.era?1-o.year:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}},F=function(e,t){return new Date(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compatible",r=B(e);if("UTC"===t)return M(r);if(t===x()&&"compatible"===n){r=U(r,new Xe);var o=new Date,i=j(r.era,r.year);return o.setFullYear(i,r.month-1,r.day),o.setHours(r.hour,r.minute,r.second,r.millisecond),o.getTime()}var a=M(r),u=N(a-ot,t),s=N(a+ot,t),c=function(e,t,n,r){return(n===r?[n]:[n,r]).filter((function(n){return function(e,t,n){var r=L(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}(e,t,n)}))}(r,t,a-u,a-s);if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(a-u,a-s);case"compatible":case"later":return Math.max(a-u,a-s);case"reject":throw new RangeError("No such absolute time found")}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compatible"))},B=function(e,t){var n,r,o=0,i=0,a=0,u=0;if("timeZone"in e)o=(n=e).hour,i=n.minute,a=n.second,u=n.millisecond;else if("hour"in e&&!t)return e;return t&&(o=(r=t).hour,i=r.minute,a=r.second,u=r.millisecond),new nt(e.calendar,e.era,e.year,e.month,e.day,o,i,a,u)},U=function(e,t){if(e.calendar.identifier===t.identifier)return e;var n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,m(r),r},G=function(e){var t=u(D(e.year+-543),2),n=t[0],r=t[1];return new et(n,r,e.month,e.day)},K=function(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1},V=function(e,t){var n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-K(e,n,1,1))/30);return[n,r,t+1-K(e,n,r,1)]},z=function(e){return Math.floor(e%4/3)},H=function(e,t){return t%13!=0?30:z(e)+5},q=function(e){return k(7*e+1,19)<7},W=function(e){var t=Math.floor((235*e-234)/19),n=12084+13753*t,r=29*t+Math.floor(n/25920);return k(3*(r+1),7)<3&&(r+=1),r},Y=function(e){return W(e)+function(e){var t=W(e-1),n=W(e);return W(e+1)-n==356?2:n-t==382?1:0}(e)},$=function(e){return Y(e+1)-Y(e)},J=function(e,t){if(t>=6&&!q(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;var n=function(e){var t=$(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?q(e)?30:0:30},Q=function(e,t,n,r){return r+Math.ceil(29.5*(n-1))+354*(t-1)+Math.floor((3+11*t)/30)+e-1},X=function(e,t,n){var r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+Q(t,r,1,1)))/29.5)+1),i=n-Q(t,r,o,1)+1;return new et(e,r,o,i)},Z=function(e){return(14+11*e)%30<11},ee=function(e){return bt+Je[e-mt]},te=function(e,t){var n=1<<11-(t-1);return $e[e-mt]&n?30:29},ne=function(e,t){for(var n=ee(e),r=1;r<t;r++)n+=te(e,r);return n},re=function(e){return Je[e+1-mt]-Je[e-mt]},oe=function(e){var t=Et.findIndex((function(t){var n=u(t,3),r=n[0],o=n[1],i=n[2];return e.year<r||e.year===r&&e.month<o||e.year===r&&e.month===o&&e.day<i}));return-1===t?Et.length-1:0===t?0:t-1},ie=function(e){var t=xt[kt.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new et(e.year+t,e.month,e.day)},ae=function(e){if(1===e.year){var t=kt.indexOf(e.era);return Et[t]}},ue=function(e){return"minguo"===e.era?e.year+Dt:1-e.year+Dt},se=function(e){var t=e-Dt;return t>0?["minguo",t]:["before_minguo",1-t]},ce=function(e){var t=u(D(ue(e)),2),n=t[0],r=t[1];return new et(n,r,e.month,e.day)},le=function(e,t){var n=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return function(e,t){return t.get?t.get.call(e):t.value}(e,n)},fe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},de=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fe(e,t,n[t])}))}return e},he=function(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&(0,We.default)(e,Nt).isValid()},pe=function(e){return(0,We.default)(e).isToday()},ye=function(e){return he(e)?(0,We.default)(e,Nt).toDate():null},ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,We.default)(e);return t&&(n=n.utc()),n.format(Nt)},me=function(e){return(0,We.default)(e).format("HH:mm")},ge=function(e){return We.default.utc(e).format("HH:mm A")},be=function(e){return _e(e,"DD - MMM - YYYY")},we=function(e){return _e(e,"DD-MMM")},_e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,We.default)(e).format(t)},Se=function(e){return(0,We.default)(e).toDate()},Ee=function(e,t){Bt.register(e,t)},Oe=function(e){var t,n,r=null!=e?e:Pe();return Bt.getCalendar((t=r,(null!=(n=Intl.Locale)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):i(t,n))?r:new Intl.Locale(r)))},xe=function(e,t){var n,r,o=null!==(n=null==t?void 0:t.locale)&&void 0!==n?n:Pe(),i=new Intl.Locale(o),a=de({},Lt,{noToday:"am"===i.language},t),u=a.calendar,s=a.mode,c=a.time,l=a.day,f=a.month,d=a.year,h=a.noToday,p=a.numberingSystem,y={calendar:null!=u?u:Oe(i),year:d?"numeric":void 0,month:f?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},v=(0,We.default)(e).isToday();if(v&&!h)r=(r=new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(o)+r.slice(1);else{"en"===i.language&&(o="en-GB");var m=new Intl.DateTimeFormat(o,y).formatToParts(e);("en"===i.language||"am"===i.language)&&"standard"==s&&d&&l&&(m=m.map(Ut("-"))),"wide"==s&&(m=m.map(Ut(" — "))),"ethiopic"===y.calendar&&(m=m.filter((function(e,t,n){return!("era"===e.type||"literal"===e.type&&t<n.length-1&&"era"===n[t+1].type)}))),r=m.map((function(e){return e.value})).join("")}return(!0===c||v&&"for today"===c)&&(r+=", ".concat(ke(e))),r},ke=function(e){return e.toLocaleTimeString(Pe(),{hour:"2-digit",minute:"2-digit"})},Ae=function(e,t){return xe(e,(n=de({},t),r=null!=(r={time:!0})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n));var n,r},Pe=function(){var e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e},je=function(e,t){var n=Oe("string"==typeof t?new Intl.Locale(t):t);return n?U(e,function(e){switch(e){case"buddhist":return new it;case"ethiopic":return new ct;case"ethioaa":return new lt;case"coptic":return new ft;case"hebrew":return new ht;case"indian":return new pt;case"islamic-civil":return new wt;case"islamic-tbla":return new _t;case"islamic-umalqura":return new St;case"japanese":return new At;case"persian":return new jt;case"roc":return new Ct;default:return new Xe}}(n)):e},De=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,We.default)();if(null==e)return null;var n=(0,We.default)(t),r=(0,We.default)(e),o=n.diff(r,"hours"),i=n.diff(r,"days"),a=n.diff(r,"weeks"),u=n.diff(r,"months"),s=n.diff(r,"years"),c={},l=Pe();if(o<2){var f=n.diff(r,"minutes");c.minutes=f}else if(i<2)c.hours=o;else if(a<4)c.days=i;else if(s<1){var d=n.subtract(a,"weeks").diff(r,"days");c.weeks=a,c.days=d}else if(s<2){var h=n.subtract(u,"months").diff(r,"days");c.months=u,c.days=h}else if(s<18){var p=n.subtract(s,"year").diff(r,"months");c.years=s,c.months=p}else c.years=s;return new Gt.DurationFormat(l,{style:"short",localeMatcher:"lookup"}).format(c)},Ce=function(e){return!window.offlineEnabled||(null!=e?e:navigator.onLine)},Te=function(e){return Me(Ne(e,"usual","official"))},Ie=function(e){return Te(e)},Me=function(e){var t;return e?null!==(t=e.text)&&void 0!==t?t:function(e){var t,n=null!==(t=e.given)&&void 0!==t?t:[];return(e.family?n.concat(e.family):n).join(" ")}(e):""},Re=function(e){return Me(e)},Ne=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];0==n.length&&(n=["usual"]);var o,i=!0,a=!1,u=void 0;try{for(var s,l=function(){var t,n=s.value,r=null===(t=e.name)||void 0===t?void 0:t.find((function(e){return function(e,t){return e.use?e.use===t:"usual"===t}(e,n)}));if(r)return{v:r}},f=n[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var d=l();if("object"==((o=d)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":void 0===o?"undefined":c(o)))return d.v}}catch(e){a=!0,u=e}finally{try{i||null==f.return||f.return()}finally{if(a)throw u}}},Le=function(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t))return!1;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(t);return r.length===o.length&&r.every((function(n){return e[n]===t[n]}))},Fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.localStorage;try{return e.getItem("test"),!0}catch(e){return!1}},Be=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ue=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split("."))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Be(e,3);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Be(e,3):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)},Ge=function(e,t){var n=function(e){var t=e.indexOf("-");if(t>=0){var n=Ue(e.slice(0,t)),r=e.slice(t+1);return"".concat(n,"-").concat(r)}return Ue(e)}(t);return Vt.satisfies(n,e,{includePrerelease:!0})},Ke=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ve=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ke(i,r,o,a,u,"next",e)}function u(e){Ke(i,r,o,a,u,"throw",e)}a(void 0)}))}},ze=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},He=function(e){return zt.apply(this,arguments)},qe=function(e){return Ht.apply(this,arguments)};f.r(y),f.d(y,{age:function(){return De},canAccessStorage:function(){return Fe},convertToLocaleCalendar:function(){return je},displayName:function(){return Ie},formatDate:function(){return xe},formatDatetime:function(){return Ae},formatPatientName:function(){return Me},formatTime:function(){return ke},formattedName:function(){return Re},getDefaultCalendar:function(){return Oe},getDefaultsFromConfigSchema:function(){return Kt},getLocale:function(){return Pe},getPatientName:function(){return Te},isOmrsDateStrict:function(){return he},isOmrsDateToday:function(){return pe},isOnline:function(){return Ce},isVersionSatisfied:function(){return Ge},parseDate:function(){return Se},registerDefaultCalendar:function(){return Ee},retry:function(){return He},selectPreferredName:function(){return Ne},shallowEqual:function(){return Le},toDateObjectStrict:function(){return ye},toOmrsDateFormat:function(){return _e},toOmrsDayDateFormat:function(){return be},toOmrsIsoString:function(){return ve},toOmrsTimeString:function(){return ge},toOmrsTimeString24:function(){return me},toOmrsYearlessDateFormat:function(){return we}});var We=f(9688),Ye=null;new Map;var $e,Je,Qe={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Xe=function(){function e(){t(this,e),this.identifier="gregory"}return r(e,[{key:"fromJulianDay",value:function(e){var t=e,n=t-1721426,r=Math.floor(n/146097),o=k(n,146097),i=Math.floor(o/36524),a=k(o,36524),s=Math.floor(a/1461),c=k(a,1461),l=Math.floor(c/365),f=u(D(400*r+100*i+4*s+l+(4!==i&&4!==l?1:0)),2),d=f[0],h=f[1],p=t-A(d,h,1,1),y=2;t<A(d,h,3,1)?y=0:P(h)&&(y=1);var v=Math.floor((12*(p+y)+373)/367),m=t-A(d,h,v,1)+1;return new et(d,h,v,m)}},{key:"toJulianDay",value:function(e){return A(e.era,e.year,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){return Qe[P(e.year)?"leapyear":"standard"][e.month-1]}},{key:"getMonthsInYear",value:function(e){return 12}},{key:"getDaysInYear",value:function(e){return P(e.year)?366:365}},{key:"getYearsInEra",value:function(e){return 9999}},{key:"getEras",value:function(){return["BC","AD"]}},{key:"isInverseEra",value:function(e){return"BC"===e.era}},{key:"balanceDate",value:function(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}}]),e}(),Ze=new WeakMap,et=function(){function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t(this,n),T(this,Ze,{writable:!0,value:void 0});var i=u(I(r),5),a=i[0],s=i[1],c=i[2],l=i[3],f=i[4];this.calendar=a,this.era=s,this.year=c,this.month=l,this.day=f,m(this)}return r(n,[{key:"copy",value:function(){return this.era?new n(this.calendar,this.era,this.year,this.month,this.day):new n(this.calendar,this.year,this.month,this.day)}},{key:"add",value:function(t){return e(this,t)}},{key:"subtract",value:function(e){return g(this,e)}},{key:"set",value:function(e){return b(this,e)}},{key:"cycle",value:function(e,t,n){return _(this,e,t,n)}},{key:"toDate",value:function(e){return F(this,e)}},{key:"toString",value:function(){return C(this)}},{key:"compare",value:function(e){return E(this,e)}}]),n}(),tt=new WeakMap,nt=function(){function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t(this,n),T(this,tt,{writable:!0,value:void 0});var i=u(I(r),5),a=i[0],s=i[1],c=i[2],l=i[3],f=i[4];this.calendar=a,this.era=s,this.year=c,this.month=l,this.day=f,this.hour=r.shift()||0,this.minute=r.shift()||0,this.second=r.shift()||0,this.millisecond=r.shift()||0,m(this)}return r(n,[{key:"copy",value:function(){return this.era?new n(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new n(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}},{key:"add",value:function(t){return e(this,t)}},{key:"subtract",value:function(e){return g(this,e)}},{key:"set",value:function(e){return b(function(e,t){var n,r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),(n=r).millisecond=Math.max(0,Math.min(n.millisecond,1e3)),n.second=Math.max(0,Math.min(n.second,59)),n.minute=Math.max(0,Math.min(n.minute,59)),n.hour=Math.max(0,Math.min(n.hour,23)),r}(this,e),e)}},{key:"cycle",value:function(e,t,n){switch(e){case"era":case"year":case"month":case"day":return _(this,e,t,n);default:return function(e,t,n,r){var o=e.copy();switch(t){case"hour":var i=e.hour,a=0,u=23;if(12===(null==r?void 0:r.hourCycle)){var s=i>=12;a=s?12:0,u=s?23:11}o.hour=S(i,n,a,u,null==r?void 0:r.round);break;case"minute":o.minute=S(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":o.second=S(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":o.millisecond=S(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return o}(this,e,t,n)}}},{key:"toDate",value:function(e,t){return F(this,e,t)}},{key:"toString",value:function(){return"".concat(C(this),"T").concat((e=this,"".concat(String(e.hour).padStart(2,"0"),":").concat(String(e.minute).padStart(2,"0"),":").concat(String(e.second).padStart(2,"0")).concat(e.millisecond?String(e.millisecond/1e3).slice(1):"")));var e}},{key:"compare",value:function(e){var t=E(this,e);return 0===t?function(e,t){return O(e)-O(t)}(this,B(e)):t}}]),n}(),rt=new Map,ot=864e5,it=function(e){o(i,e);var n=d(i);function i(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var u;return t(this,i),(u=n.call.apply(n,[this].concat(s(r)))).identifier="buddhist",a(u)}return r(i,[{key:"fromJulianDay",value:function(e){var t=h(p(i.prototype),"fromJulianDay",this).call(this,e),n=j(t.era,t.year);return new et(this,n- -543,t.month,t.day)}},{key:"toJulianDay",value:function(e){return h(p(i.prototype),"toJulianDay",this).call(this,G(e))}},{key:"getEras",value:function(){return["BE"]}},{key:"getDaysInMonth",value:function(e){return h(p(i.prototype),"getDaysInMonth",this).call(this,G(e))}},{key:"balanceDate",value:function(){}}]),i}(Xe),at=1723856,ut=1824665,st=5500,ct=function(){function e(){t(this,e),this.identifier="ethiopic"}return r(e,[{key:"fromJulianDay",value:function(e){var t=u(V(at,e),3),n=t[0],r=t[1],o=t[2],i="AM";return n<=0&&(i="AA",n+=st),new et(this,i,n,r,o)}},{key:"toJulianDay",value:function(e){var t=e.year;return"AA"===e.era&&(t-=st),K(at,t,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){return H(e.year,e.month)}},{key:"getMonthsInYear",value:function(){return 13}},{key:"getDaysInYear",value:function(e){return 365+z(e.year)}},{key:"getYearsInEra",value:function(e){return"AA"===e.era?9999:9991}},{key:"getEras",value:function(){return["AA","AM"]}}]),e}(),lt=function(e){o(i,e);var n=d(i);function i(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var u;return t(this,i),(u=n.call.apply(n,[this].concat(s(r)))).identifier="ethioaa",a(u)}return r(i,[{key:"fromJulianDay",value:function(e){var t=u(V(at,e),3),n=t[0],r=t[1],o=t[2];return new et(this,"AA",n+=st,r,o)}},{key:"getEras",value:function(){return["AA"]}},{key:"getYearsInEra",value:function(){return 9999}}]),i}(ct),ft=function(e){o(i,e);var n=d(i);function i(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var u;return t(this,i),(u=n.call.apply(n,[this].concat(s(r)))).identifier="coptic",a(u)}return r(i,[{key:"fromJulianDay",value:function(e){var t=u(V(ut,e),3),n=t[0],r=t[1],o=t[2],i="CE";return n<=0&&(i="BCE",n=1-n),new et(this,i,n,r,o)}},{key:"toJulianDay",value:function(e){var t=e.year;return"BCE"===e.era&&(t=1-t),K(ut,t,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){var t=e.year;return"BCE"===e.era&&(t=1-t),H(t,e.month)}},{key:"isInverseEra",value:function(e){return"BCE"===e.era}},{key:"balanceDate",value:function(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}},{key:"getEras",value:function(){return["BCE","CE"]}},{key:"getYearsInEra",value:function(e){return"BCE"===e.era?9999:9715}}]),i}(ct),dt=347997,ht=function(){function e(){t(this,e),this.identifier="hebrew"}return r(e,[{key:"fromJulianDay",value:function(e){for(var t=e-dt,n=25920*t/765433,r=Math.floor((19*n+234)/235)+1,o=Y(r),i=Math.floor(t-o);i<1;)r--,o=Y(r),i=Math.floor(t-o);for(var a=1,u=0;u<i;)u+=J(r,a),a++;return a--,u-=J(r,a),new et(this,r,a,i-u)}},{key:"toJulianDay",value:function(e){for(var t=Y(e.year),n=1;n<e.month;n++)t+=J(e.year,n);return t+e.day+dt}},{key:"getDaysInMonth",value:function(e){return J(e.year,e.month)}},{key:"getMonthsInYear",value:function(e){return q(e.year)?13:12}},{key:"getDaysInYear",value:function(e){return $(e.year)}},{key:"getYearsInEra",value:function(){return 9999}},{key:"getEras",value:function(){return["AM"]}},{key:"balanceYearMonth",value:function(e,t){t.year!==e.year&&(q(t.year)&&!q(e.year)&&t.month>6?e.month--:!q(t.year)&&q(e.year)&&t.month>6&&e.month++)}}]),e}(),pt=function(e){o(i,e);var n=d(i);function i(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var u;return t(this,i),(u=n.call.apply(n,[this].concat(s(r)))).identifier="indian",a(u)}return r(i,[{key:"fromJulianDay",value:function(e){var t,n,r,o=h(p(i.prototype),"fromJulianDay",this).call(this,e),a=o.year-78,u=e-A(o.era,o.year,1,1);if(u<80?(a--,u+=155+(t=P(o.year-1)?31:30)+90+10):(t=P(o.year)?31:30,u-=80),u<t)n=1,r=u+1;else{var s=u-t;s<155?(n=Math.floor(s/31)+2,r=s%31+1):(s-=155,n=Math.floor(s/30)+7,r=s%30+1)}return new et(this,a,n,r)}},{key:"toJulianDay",value:function(e){var t,n,r=e.year+78,o=u(D(r),2),i=o[0],a=o[1];return P(a)?(t=31,n=A(i,a,3,21)):(t=30,n=A(i,a,3,22)),1===e.month?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=30*(e.month-7)),n+=e.day-1)}},{key:"getDaysInMonth",value:function(e){return 1===e.month&&P(e.year+78)||e.month>=2&&e.month<=6?31:30}},{key:"getYearsInEra",value:function(){return 9919}},{key:"getEras",value:function(){return["saka"]}},{key:"balanceDate",value:function(){}}]),i}(Xe),yt=1948440,vt=1948439,mt=1300,gt=1600,bt=460322,wt=function(){function e(){t(this,e),this.identifier="islamic-civil"}return r(e,[{key:"fromJulianDay",value:function(e){return X(this,yt,e)}},{key:"toJulianDay",value:function(e){return Q(yt,e.year,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){var t=29+e.month%2;return 12===e.month&&Z(e.year)&&t++,t}},{key:"getMonthsInYear",value:function(){return 12}},{key:"getDaysInYear",value:function(e){return Z(e.year)?355:354}},{key:"getYearsInEra",value:function(){return 9665}},{key:"getEras",value:function(){return["AH"]}}]),e}(),_t=function(e){o(i,e);var n=d(i);function i(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var u;return t(this,i),(u=n.call.apply(n,[this].concat(s(r)))).identifier="islamic-tbla",a(u)}return r(i,[{key:"fromJulianDay",value:function(e){return X(this,vt,e)}},{key:"toJulianDay",value:function(e){return Q(vt,e.year,e.month,e.day)}}]),i}(wt),St=function(e){o(i,e);var n=d(i);function i(){var e;if(t(this,i),(e=n.call(this)).identifier="islamic-umalqura",$e||($e=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),(function(e){return e.charCodeAt(0)})).buffer)),!Je){Je=new Uint32Array(gt-mt+1);for(var r=0,o=mt;o<=gt;o++){Je[o-mt]=r;for(var u=1;u<=12;u++)r+=te(o,u)}}return a(e)}return r(i,[{key:"fromJulianDay",value:function(e){var t=e-yt,n=ee(mt),r=ee(gt);if(t<n||t>r)return h(p(i.prototype),"fromJulianDay",this).call(this,e);for(var o=mt-1,a=1,u=1;u>0;){o++,u=t-ee(o)+1;var s=re(o);if(u===s){a=12;break}if(u<s){var c=te(o,a);for(a=1;u>c;)u-=c,a++,c=te(o,a);break}}return new et(this,o,a,t-ne(o,a)+1)}},{key:"toJulianDay",value:function(e){return e.year<mt||e.year>gt?h(p(i.prototype),"toJulianDay",this).call(this,e):yt+ne(e.year,e.month)+(e.day-1)}},{key:"getDaysInMonth",value:function(e){return e.year<mt||e.year>gt?h(p(i.prototype),"getDaysInMonth",this).call(this,e):te(e.year,e.month)}},{key:"getDaysInYear",value:function(e){return e.year<mt||e.year>gt?h(p(i.prototype),"getDaysInYear",this).call(this,e):re(e.year)}}]),i}(wt),Et=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],Ot=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],xt=[1867,1911,1925,1988,2018],kt=["meiji","taisho","showa","heisei","reiwa"],At=function(e){o(i,e);var n=d(i);function i(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var u;return t(this,i),(u=n.call.apply(n,[this].concat(s(r)))).identifier="japanese",a(u)}return r(i,[{key:"fromJulianDay",value:function(e){var t=h(p(i.prototype),"fromJulianDay",this).call(this,e),n=oe(t);return new et(this,kt[n],t.year-xt[n],t.month,t.day)}},{key:"toJulianDay",value:function(e){return h(p(i.prototype),"toJulianDay",this).call(this,ie(e))}},{key:"balanceDate",value:function(e){var t=ie(e),n=oe(t);kt[n]!==e.era&&(e.era=kt[n],e.year=t.year-xt[n]),this.constrainDate(e)}},{key:"constrainDate",value:function(e){var t=kt.indexOf(e.era),n=Ot[t];if(null!=n){var r=u(n,3),o=r[0],i=r[1],a=r[2],s=o-xt[t];e.year=Math.max(1,Math.min(s,e.year)),e.year===s&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){var c=u(Et[t],3),l=c[1],f=c[2];e.month=Math.max(l,e.month),e.month===l&&(e.day=Math.max(f,e.day))}}},{key:"getEras",value:function(){return kt}},{key:"getYearsInEra",value:function(e){var t=kt.indexOf(e.era),n=Et[t],r=Et[t+1];if(null==r)return 9999-n[0]+1;var o=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}},{key:"getDaysInMonth",value:function(e){return h(p(i.prototype),"getDaysInMonth",this).call(this,ie(e))}},{key:"getMinimumMonthInYear",value:function(e){var t=ae(e);return t?t[1]:1}},{key:"getMinimumDayInMonth",value:function(e){var t=ae(e);return t&&e.month===t[1]?t[2]:1}}]),i}(Xe),Pt=[0,31,62,93,124,155,186,216,246,276,306,336],jt=function(){function e(){t(this,e),this.identifier="persian"}return r(e,[{key:"fromJulianDay",value:function(e){var t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30);return new et(this,n,o+1,r-Pt[o]+1)}},{key:"toJulianDay",value:function(e){var t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return(t+=Pt[e.month-1])+e.day}},{key:"getMonthsInYear",value:function(){return 12}},{key:"getDaysInMonth",value:function(e){return e.month<=6?31:e.month<=11||k(25*e.year+11,33)<8?30:29}},{key:"getEras",value:function(){return["AP"]}},{key:"getYearsInEra",value:function(){return 9377}}]),e}(),Dt=1911,Ct=function(e){o(i,e);var n=d(i);function i(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var u;return t(this,i),(u=n.call.apply(n,[this].concat(s(r)))).identifier="roc",a(u)}return r(i,[{key:"fromJulianDay",value:function(e){var t=h(p(i.prototype),"fromJulianDay",this).call(this,e),n=j(t.era,t.year),r=u(se(n),2),o=r[0],a=r[1];return new et(this,o,a,t.month,t.day)}},{key:"toJulianDay",value:function(e){return h(p(i.prototype),"toJulianDay",this).call(this,ce(e))}},{key:"getEras",value:function(){return["before_minguo","minguo"]}},{key:"balanceDate",value:function(e){var t=u(se(ue(e)),2),n=t[0],r=t[1];e.era=n,e.year=r}},{key:"isInverseEra",value:function(e){return"before_minguo"===e.era}},{key:"getDaysInMonth",value:function(e){return h(p(i.prototype),"getDaysInMonth",this).call(this,ce(e))}},{key:"getYearsInEra",value:function(e){return"before_minguo"===e.era?9999:9999-Dt}}]),i}(Xe),Tt=f(9014),It=f.n(Tt),Mt=f(4332),Rt=f.n(Mt);We.default.extend(It()),We.default.extend(Rt());var Nt="YYYY-MM-DDTHH:mm:ss.SSSZZ",Lt={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1},Ft=new WeakMap,Bt=new(function(){function e(){var t,n;!function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")}(this,e),t=Ft,n={writable:!0,value:new Map},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(this,t),t.set(this,n),le(this,Ft).set("am","ethiopic")}var t;return(t=[{key:"register",value:function(e,t){le(this,Ft).set(e,t)}},{key:"getCalendar",value:function(e){if(Boolean(e)){if(e.calendar)return e.calendar;if(e.region){var t="".concat(e.language,"-").concat(e.region);if(le(this,Ft).has(t))return le(this,Ft).get(t)}if(e.language&&le(this,Ft).has(e.language))return le(this,Ft).get(e.language);var n=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return le(this,Ft).set("".concat(e.language).concat(e.region?"-".concat(e.region):""),n),n}}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}()),Ut=function(e){return function(t,n,r){return"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e}}},Gt=f(6893);function Kt(e){var t,n={},r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value;if(e[s].hasOwnProperty("_default"))n[s]=e[s]._default;else{if(s.startsWith("_"))continue;(t=e[s])&&t.constructor===Object?n[s]=Kt(e[s]):n[s]=e[s]}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}var Vt=f(1249);function zt(){return zt=Ve((function(e){var t,n,r,o,i,a,u,s=arguments;return ze(this,(function(c){switch(c.label){case 0:n=(t=s.length>1&&void 0!==s[1]?s[1]:{}).shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return function(e,t){return e<=5}(e)},r=null!=r?r:function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e+1:e;return t*Math.pow(2,n)}(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,qe(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return u=c.sent(),null==o||o(u,i),a=u,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),zt.apply(this,arguments)}function Ht(){return(Ht=Ve((function(e){return ze(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}}(),y}())}}}))},254:function(e){"use strict";e.exports=u},45:function(e){"use strict";e.exports=v},513:function(e){"use strict";e.exports=b},740:function(e){"use strict";e.exports=w},685:function(e){"use strict";e.exports=S},901:function(e){"use strict";e.exports=E},688:function(e){"use strict";e.exports=O},64:function(e){"use strict";e.exports=x},954:function(e){"use strict";e.exports=k},493:function(e){"use strict";e.exports=A},281:function(e){"use strict";e.exports=P},792:function(e){"use strict";e.exports=j}},o={};function D(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e].call(n.exports,n,n.exports,D),n.exports}D.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return D.d(t,{a:t}),t},D.d=function(e,t){for(var n in t)D.o(t,n)&&!D.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},D.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),D.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},D.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var C={};return function(){"use strict";var r=function(e,t){var n=(new DOMParser).parseFromString(t,"image/svg+xml").querySelector("svg");n&&(n.id=e,eo.appendChild(n))},o=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},u=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}},v=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},b=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},w=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},S=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)},E=function(e,t,n){var r=A(e,t,n);vo.length?vo.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},O=function(e){if("function"!=typeof e)throw Error(k(28,!1));vo.push(e)},x=function(e){if("function"!=typeof e)throw Error(k(29,!1));var t=!1;return vo=vo.filter((function(n){var r=n===e;return t=t||r,!r})),t},k=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},A=function(e,t,n){var r,o,i,a="".concat(I(t)," '").concat(C(t),"' died in status ").concat(t.status,": ");if(o=e,null!=(i=Error)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):l(o,i)){try{e.message=a+e.message}catch(e){}r=e}else{console.warn(k(30,!1,t.status,C(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=C(t),t.status=n,r},P=function(e){return e.status===Eo},j=function(e){try{return e.activeWhen(window.location)}catch(t){return E(t,e,Po),!1}},C=function(e){return e.name},T=function(e){return Boolean(e.unmountThisParcel)},I=function(e){return T(e)?"parcel":"application"},M=function(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]},R=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},N=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!R(t,(function(e){return"function"!=typeof e}))));var t},L=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=I(e),o=C(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return F(n)?n:Promise.reject(k(15,!1,r,o,t,a))}))}),Promise.resolve())}},F=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},B=function(e,t){var n=function(){return e.status=_o,e};return Promise.resolve().then((function(){return e.status!==bo?e:(e.status=wo,e.bootstrap?J(e,"bootstrap").then(n).catch((function(n){if(t)throw A(n,e,Po);return E(n,e,Po),e})):Promise.resolve().then(n))}))},U=function(e,t){return Promise.resolve().then((function(){var n=function(){return J(e,"unmount").then((function(){e.status=_o}),(function(n){if(t)throw A(n,e,Po);E(n,e,Po)}))};if(e.status!==Eo)return e;e.status=xo;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw A(n,e,Po);E(n,e,Po)}))})).then((function(){return e}))}))},G=function(e,t){return Promise.resolve().then((function(){return e.status!==_o?e:(Do||(window.dispatchEvent(new yo("single-spa:before-first-mount")),Do=!0),e.status=So,J(e,"mount").then((function(){return e.status=Eo,Co||(window.dispatchEvent(new yo("single-spa:first-mount")),Co=!0),e})).catch((function(n){var r=function(){if(t)throw A(n,e,Po);return E(n,e,Po),e};return e.status=Eo,U(e,!0).then(r,r)})))}))},K=function(){return V.apply(Io,arguments)},V=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(k(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(k(3,!1,S(e.name)));var r=To++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(k(4,!1,o,void 0===t?"undefined":S(t)));if(!t.domElement)throw Error(k(5,!1,o));var i,a="function"==typeof e,u=a?e:function(){return Promise.resolve(e)},s={id:r,parcels:{},status:a?go:bo,customProps:t,parentName:C(n),unmountThisParcel:function(){return h.then((function(){if(s.status!==Eo)throw Error(k(6,!1,o,s.status));return U(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return l(e),e})).catch((function(e){throw s.status=Po,f(e),e}))}};n.parcels[r]=s;var c=u();if(!c||"function"!=typeof c.then)throw Error(k(7,!1));c=c.then((function(e){if(!e)throw Error(k(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!N(e.bootstrap))throw Error(k(9,!1,o));if(!N(e.mount))throw Error(k(10,!1,o));if(!N(e.unmount))throw Error(k(11,!1,o));if(e.update&&!N(e.update))throw Error(k(12,!1,o));var t=L(e,"bootstrap"),n=L(e,"mount"),a=L(e,"unmount");s.status=bo,s.name=o,s.bootstrap=t,s.mount=n,s.unmount=a,s.timeouts=Q(e.timeouts),e.update&&(s.update=L(e,"update"),i.update=function(e){return s.customProps=e,z((t=s,Promise.resolve().then((function(){if(t.status!==Eo)throw Error(k(32,!1,C(t)));return t.status=Oo,J(t,"update").then((function(){return t.status=Eo,t})).catch((function(e){throw A(e,t,Po)}))}))));var t})}));var l,f,d=c.then((function(){return B(s,!0)})),h=d.then((function(){return G(s,!0)})),p=new Promise((function(e,t){l=e,f=t}));return i={mount:function(){return z(Promise.resolve().then((function(){if(s.status!==_o)throw Error(k(13,!1,o,s.status));return n.parcels[r]=s,G(s)})))},unmount:function(){return z(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:z(c),bootstrapPromise:z(d),mountPromise:z(h),unmountPromise:z(p)}},z=function(e){return e.then((function(){return null}))},H=function(e){var t=C(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(k(40,!1),t,n));var r=M({},n,{name:t,mountParcel:V.bind(e),singleSpa:ho});return T(e)&&(r.unmountSelf=e.unmountThisParcel),r},q=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(k(16,!1));Mo.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},W=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(k(17,!1));Mo.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},Y=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(k(18,!1));Mo.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},$=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(k(19,!1));Mo.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},J=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=I(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](H(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=k(31,!1,t,o,C(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},Q=function(e){var t={};for(var n in Mo)t[n]=M({},Mo[n],e&&e[n]||{});return t},X=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==mo&&e.status!==Ao?e:(e.status=go,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(H(e));if(!F(r))throw n=!0,Error(k(33,!1,C(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!N(t.bootstrap)&&(r=35),N(t.mount)||(r=36),N(t.unmount)||(r=37);var o=I(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(k(r,!1,o,C(e),i),t),E(void 0,e,Po),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=M({},e.devtools.overlays,t.devtools.overlays)),e.status=bo,e.bootstrap=L(t,"bootstrap"),e.mount=L(t,"mount"),e.unmount=L(t,"unmount"),e.unload=L(t,"unload"),e.timeouts=Q(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=Po:(r=Ao,e.loadErrorTime=(new Date).getTime()),E(t,e,r),e})));var t,n}))},Z=function(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(k(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=oe(window.location.href),r=oe(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)},ee=function(e){var t=this;if(e){var n=e[0].type;Lo.indexOf(n)>=0&&No[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},te=function(){Wo([],arguments)},ne=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return fo&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},re=function(e){if(Bo)throw Error(k(43,!1));fo=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,Bo=!0,Fo=window.history.replaceState,window.addEventListener("hashchange",te),window.addEventListener("popstate",te);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&Lo.indexOf(e)>=0)||R(No[e],(function(e){return e===n})))return t.apply(this,arguments);No[e].push(n)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&Lo.indexOf(e)>=0))return n.apply(this,arguments);No[e]=No[e].filter((function(e){return e!==t}))},window.history.pushState=ne(window.history.pushState,"pushState"),window.history.replaceState=ne(Fo,"replaceState")},oe=function(e){var t=document.createElement("a");return t.href=e,t},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!Uo){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return ae.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return ae.call(this,n,window.removeEventListener,e,t,arguments)},Uo=!0}},ae=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){Lo.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},ue=function(e){return Promise.resolve().then((function(){var t=Go[C(e)];if(!t)return e;if(e.status===mo)return se(e,t),e;if(e.status===ko)return t.promise.then((function(){return e}));if(e.status!==_o&&e.status!==Ao)return e;var n=e.status===Ao?Promise.resolve():J(e,"unload");return e.status=ko,n.then((function(){return se(e,t),e})).catch((function(n){return function(e,t,n){delete Go[C(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,E(n,e,Po),t.reject(n)}(e,t,n),e}))}))},se=function(e,t){delete Go[C(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=mo,t.resolve()},ce=function(e,t,n,r){Go[C(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Go[C(e)],"promise",{get:t})},le=function(e){return Go[e]},fe=function(){return Ko.filter(P).map(C)},de=function(){return Ko.map(C)},he=function(e){var t=R(Ko,(function(t){return C(t)===e}));return t?t.status:null},pe=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(k(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(k(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(k(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(k(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(k(24,!1));if(!be(e.customProps))throw Error(k(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(k(20,!1));if(!t)throw Error(k(23,!1));if("function"!=typeof n)throw Error(k(24,!1));if(!be(r))throw Error(k(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:we(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(Oe()||Vo||(Vo=!0,setTimeout((function(){Oe()||console.warn(k(1,!1))}),5e3)),-1!==de().indexOf(o.name))throw Error(k(21,!1,o.name));Ko.push(M({loadErrorTime:null,status:mo,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Ro&&(ie(),Wo())},ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Ko.filter((function(t){return t.activeWhen(e)})).map(C)},ve=function(e){if(0===Ko.filter((function(t){return C(t)===e})).length)throw Error(k(25,!1,e));return(Ro?me(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=Ko.map(C).indexOf(e);Ko.splice(t,1)}))},me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(k(26,!1));var n=R(Ko,(function(t){return C(t)===e}));if(!n)throw Error(k(27,!1,e));var r,o=le(C(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){ce(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,ge(n,o.resolve,o.reject)):r=new Promise((function(e,t){ce(n,(function(){return r}),e,t),ge(n,e,t)})),r},ge=function(e,t,n){Promise.resolve().then((function(){if(R(ye(),(function(t){return t===C(e)})))return _e()})).then((function(){return U(e).then(ue).then((function(){t(),setTimeout((function(){Wo()}))}))})).catch(n)},be=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},we=function(e,t){var n=function(e,t){var n=function(n){var a=e.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":a,n===e.length)if(o)t&&(i+="$");else{var u=t?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(u,"$"):"".concat(i,"(/").concat(u,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==e[0]&&(e="/"+e);for(var a=0;a<e.length;a++){var u=e[a];(!o&&":"===u||o&&"/"===u)&&n(a)}return n(e.length),new RegExp(i,"i")}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},_e=function(){return Wo()},Se=function(e,t){return j(e)?B(e).then((function(e){return t.then((function(){return j(e)?G(e):e}))})):t.then((function(){return e}))},Ee=function(e){Yo=!0,Ro&&(re(e),Wo())},Oe=function(){return Yo},xe=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ke=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},Ae=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Pe=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},je=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},De=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},Ce=function(e){return function t(n){return 0===arguments.length||De(n)?t:e.apply(this,arguments)}},Te=function(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return De(n)?t:Ce((function(t){return e(n,t)}));default:return De(n)&&De(r)?t:De(n)?Ce((function(t){return e(t,r)})):De(r)?Ce((function(t){return e(n,t)})):e(n,r)}}},Ie=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},Me=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},Re=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},Ne=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)},Le=function(e,t,n,r){var o=function(e,t){return Oa(e,t,n.slice(),r.slice())},i=Ie(e);return!Me((function(e,t){return!Me(o,t,e)}),Ie(t),i)},Fe=function(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return De(n)?t:Te((function(t,r){return e(n,t,r)}));case 2:return De(n)&&De(r)?t:De(n)?Te((function(t,n){return e(t,r,n)})):De(r)?Te((function(t,r){return e(n,t,r)})):Ce((function(t){return e(n,r,t)}));default:return De(n)&&De(r)&&De(o)?t:De(n)&&De(r)?Te((function(t,n){return e(t,n,o)})):De(n)&&De(o)?Te((function(t,n){return e(t,r,n)})):De(r)&&De(o)?Te((function(t,r){return e(n,t,r)})):De(n)?Ce((function(t){return e(t,r,o)})):De(r)?Ce((function(t){return e(n,t,o)})):De(o)?Ce((function(t){return e(n,r,t)})):e(n,r,o)}}},Be=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},Ue=function(e,t,n,r){return e["@@transducer/result"](n[r](Ma(e["@@transducer/step"],e),t))},Ge=function(e){return"[object Object]"===Object.prototype.toString.call(e)},Ke=function(e){return(0,Jo.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1,translationOverridesLoaded:!1})},Ve=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ze=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},He=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ze(e,t,n[t])}))}return e},qe=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},We=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||$e(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Ye=function(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$e(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},$e=function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}},Je=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=Ke(u);if(e.moduleLoaded[u]){var c=rt(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!0,config:c})}else{var l=ot(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!1,config:l})}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},Qe=function(e,t){var n,r,o=(n=at(nt(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=We(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(s)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=We(d.value,2),y=p[0];tt(p[1],u,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return He({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=We(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=(0,Jo.getGlobalStore)("config-extension-slots",{slots:{}}),u=a.getState(),s={slots:He({},u.slots,i)};ka(u,s)||a.setState(s)},Xe=function(e,t){var n=function(e,t){var n=Xa(Pa(e.schemas)),r=Ye(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=We(u.value,2);n=at([n,Za(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t);Qa.setState({config:n})},Ze=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=t.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=et(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=qe(He({},r[c.slotName]),ze({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}(0,Jo.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})},et=function(e,t,n,r,o,i){var a,u,s,c,l=function(e){return We(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=nt(o,i),p=it(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},v=at([it(d,h),y]),m=null!=f?f:o.schemas[t];ut(m,v,d);var g=nu(m,v);return tu(m,g,d),delete g.extensionSlots,g},tt=function(e,t,n){var r="".concat(t,".extensionSlots.").concat(n),o="Extension slot config '".concat(r,"'"),i=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));i.length&&dt(r,o+"' contains invalid keys '".concat(i.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||dt(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||dt(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||dt(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(ft(e.configure)||dt(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))},nt=function(e,t){return Ye(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},rt=function(e,t,n){var r=t.schemas[e],o=it(e,nt(t,n));ut(r,o,e);var i=nu(r,o);return tu(r,i,e),delete i.extensionSlots,i},ot=function(e,t,n){var r=it(e,nt(t,n)),o=nu(iu,r);return tu(iu,o,e),delete o.extensionSlots,o},it=function(e,t){var n=t.map((function(t){return t[e]})).filter((function(e){return!!e}));return at(n)},at=function(e){return Na(Ga)({},e)},ut=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e.hasOwnProperty(s)?eu(f,c,l):"extensionSlots"===s&&""!==n||dt(l,"Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},st=function(e,t,n){return!t||ct(e,[{Array:Ka,Boolean:Va,ConceptUuid:Wa,Number:za,Object:qa,String:Ha,UUID:Wa,PersonAttributeTypeUuid:Wa,PatientIdentifierTypeUuid:Wa}[t]],n)},ct=function(e,t,n){var r=!0;if(t)try{var o=!0,i=!1,a=void 0;try{for(var u,s=t[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=(0,u.value)(n);"string"==typeof c&&(dt(e,"object"==typeof n?"Invalid configuration for ".concat(e,": ").concat(c):"Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)),r=!1)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}return r},lt=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},ft=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},dt=function(e,t){var n="".concat(e,":::").concat(t);ru.has(n)||(console.error(t),ru.add(n))},ht=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},pt=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},yt=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},vt=function(e){var t=this.__data__=new pu(e);this.size=t.size},mt=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hu;++t<n;)this.add(e[t])},gt=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},bt=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=!0,c=!1,l=void 0;try{for(var f,d=u.instances[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;t.push({slotModuleName:h.slotModuleName,extensionModuleName:u.moduleName,slotName:h.slotName,extensionId:h.id})}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}nc(Jr.configExtensionStore.getState().mountedExtensions,t)||Jr.configExtensionStore.setState({mountedExtensions:t})},wt=function(e){return Boolean(e?!(arguments.length>1&&void 0!==arguments[1])||arguments[1]:arguments.length>2&&void 0!==arguments[2]&&arguments[2])},_t=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},St=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||Ot(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Et=function(e){return function(e){if(Array.isArray(e))return _t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ot(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Ot=function(e,t){if(e){if("string"==typeof e)return _t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(e,t):void 0}},xt=function(e,t,n,r,o){var i={},a=(0,cu.isOnline)(),u=Object.entries(r.flags).filter((function(e){return St(e,2)[1].enabled})).map((function(e){return St(e,1)[0]})),s=!0,c=!1,l=void 0;try{for(var f,d=Object.entries(e.slots)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=St(f.value,2),p=h[0],y=h[1],v=jt(p,e,(0,Jr.getExtensionSlotConfigFromStore)(t,y.name).config,n,u,a,o.session);i[p]={moduleName:y.moduleName,assignedExtensions:v}}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}nc(ac.getState().slots,i)||ac.setState({slots:i})},kt=function(){xt(ic.getState(),uc.getState(),sc.getState(),uu.featureFlagsStore.getState(),na.sessionStore.getState())},At=function(e){return St(e.split("#"),1)[0]},Pt=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},jt=function(e,t,n,r,o,i,a){var u=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=ic.getState().extensions;return Et(t).concat(Et(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,u=Pt(e,o,null===(r=i[At(e)])||void 0===r?void 0:r.order,t),s=Pt(n,o,null===(a=i[At(n)])||void 0===a?void 0:a.order,t);return-1===s?-1:-1===u?1:u-s}))}(n,t.slots[e].attachedIds),s=[],c=!0,l=!1,f=void 0;try{for(var d,h=u[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value,y=(0,Jr.getExtensionConfigFromStore)(r,e,p).config,v=At(p),m=t.extensions[v];if(m){var g,b,w,_,S,E,O,x=null!==(E=null!==(S=null==y||null===(g=y["Display conditions"])||void 0===g?void 0:g.privileges)&&void 0!==S?S:m.privileges)&&void 0!==E?E:[];if(x&&("string"==typeof x||Array.isArray(x)&&x.length>0)){if(!(null==a?void 0:a.user))continue;if(!(0,na.userHasAccess)(x,a.user))continue}var k,A,P,j,D=null!==(O=null==y||null===(b=y["Display conditions"])||void 0===b?void 0:b.expression)&&void 0!==O?O:null;if(null!==D)try{if(!(0,au.evaluateAsBoolean)(D,{session:a}))continue}catch(e){console.error("Error while evaluating expression ".concat(D),e);continue}if(m.featureFlag&&!o.includes(m.featureFlag))continue;if(window.offlineEnabled&&!wt(i,m.online,m.offline))continue;s.push({id:p,name:v,moduleName:m.moduleName,config:y,featureFlag:m.featureFlag,meta:m.meta,online:null===(A=null!==(k=null==y||null===(w=y["Display conditions"])||void 0===w?void 0:w.online)&&void 0!==k?k:m.online)||void 0===A||A,offline:null!==(j=null!==(P=null==y||null===(_=y["Display conditions"])||void 0===_?void 0:_.offline)&&void 0!==P?P:m.offline)&&void 0!==j&&j})}}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}return s},Dt=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ct=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Tt=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ct(e,t,n[t])}))}return e},It=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Mt=function(e,t){return"object"!=typeof t||fc(t).forEach((function(n){e[n]=t[n]})),e},Rt=function(e,t){return pc.call(e,t)},Nt=function(e,t){"function"==typeof t&&(t=t(hc(e))),("undefined"==typeof Reflect?fc:Reflect.ownKeys)(t).forEach((function(n){Lt(e,n,t[n])}))},Lt=function(e,t,n,r){yc(e,t,Mt(n&&Rt(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},Ft=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Lt(e.prototype,"constructor",e),{extend:Nt.bind(null,e.prototype)}}}},Bt=function(e,t,n){return gc.call(e,t,n)},Ut=function(e,t){return t(e)},Gt=function(e){if(!e)throw new Error("Assertion Failed")},Kt=function(e){lc.setImmediate?setImmediate(e):setTimeout(e,0)},Vt=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},zt=function(e){var t={};for(var n in e)Rt(e,n)&&(t[n]=e[n]);return t},Ht=function(e){return _c.apply([],e)},qt=function(e){Oc="undefined"!=typeof WeakMap&&new WeakMap;var t=xc(e);return Oc=null,t},Wt=function(e){return kc.call(e).slice(8,-1)},Yt=function(e){var t,n,r,o;if(1===arguments.length){if(dc(e))return e.slice();if(this===jc&&"string"==typeof e)return[e];if(o=Pc(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n},$t=function(e,t){Cc=e,Tc=t},Jt=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Tc).map((function(e){return"\n"+e})).join("")):""},Qt=function(e,t){this._e=Mc(),this.name=e,this.message=t},Xt=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},Zt=function(e,t,n,r){this._e=Mc(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Xt(e,t)},en=function(e,t){this._e=Mc(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=Xt(e,t)},tn=function(){},nn=function(e){return e},rn=function(e,t){return null==e||e===nn?t:function(n){return t(e(n))}},on=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},an=function(e,t){return e===tn?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?on(r,this.onsuccess):r),o&&(this.onerror=this.onerror?on(o,this.onerror):o),void 0!==i?i:n}},un=function(e,t){return e===tn?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?on(n,this.onsuccess):n),r&&(this.onerror=this.onerror?on(r,this.onerror):r)}},sn=function(e,t){return e===tn?t:function(n){var r=e.apply(this,arguments);Mt(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?on(o,this.onsuccess):o),i&&(this.onerror=this.onerror?on(i,this.onerror):i),void 0===r?void 0===a?void 0:a:Mt(r,a)}},cn=function(e,t){return e===tn?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},ln=function(e,t){return e===tn?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}},fn=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=tn,this._lib=!1;var t=this._PSD=ul;if(Cc&&(this._stackHolder=Mc(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Vc)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&hn(this,this._value))}this._state=null,this._value=null,++t.ref,dl(this,e)},dn=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},hn=function(e,t){if(rl.push(t),null===e._state){var n=e._lib&&bn();t=il(t),e._state=!1,e._value=t,Cc&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((function(){var n=mc(t,"stack");t._promise=e,Lt(t,"stack",{get:function(){return Qc?n&&(n.get?n.get.apply(t):n.value):e.stack}})})),function(e){nl.some((function(t){return t._value===e._value}))||nl.push(e)}(e),pn(e),n&&wn()}},pn=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)yn(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===cl&&(++cl,Zc((function(){0==--cl&&_n()}),[]))},yn=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++cl,Zc(vn,[n,e,t])}else e._listeners.push(t)},vn=function(e,t,n){try{ol=t;var r,o=t._value;t._state?r=e(o):(rl.length&&(rl=[]),r=e(o),-1===rl.indexOf(o)&&function(e){for(var t=nl.length;t;)if(nl[--t]._value===e._value)return void nl.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{ol=null,0==--cl&&_n(),--n.psd.ref||n.psd.finalize()}},mn=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},gn=function(){bn()&&wn()},bn=function(){var e=el;return el=!1,tl=!1,e},wn=function(){var e,t,n;do{for(;sl.length>0;)for(e=sl,sl=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(sl.length>0);el=!0,tl=!0},_n=function(){var e=nl;nl=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=ll.slice(0),n=t.length;n;)t[--n]()},Sn=function(e){return new fn(Vc,!1,e)},En=function(e,t){var n=ul;return function(){var r=bn(),o=ul;try{return Dn(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Dn(o,!1),r&&wn()}}},On=function(e,t,n,r){var o=ul,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++bl;var a=al.env;i.env=Jc?{Promise:fn,PromiseProp:{value:fn,configurable:!0,writable:!0},all:fn.all,race:fn.race,allSettled:fn.allSettled,any:fn.any,resolve:fn.resolve,reject:fn.reject,nthen:Rn(a.nthen,i),gthen:Rn(a.gthen,i)}:{},t&&Mt(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=Tn(i,e,n,r);return 0===i.ref&&i.finalize(),u},xn=function(){return pl.id||(pl.id=++yl),++pl.awaits,pl.echoes+=100,pl.id},kn=function(){return!!pl.awaits&&(0==--pl.awaits&&(pl.id=0),pl.echoes=100*pl.awaits,!0)},An=function(e){return pl.echoes&&e&&e.constructor===$c?(xn(),e.then((function(e){return kn(),e}),(function(e){return kn(),wl(e)}))):e},Pn=function(e){++gl,pl.echoes&&0!=--pl.echoes||(pl.echoes=pl.id=0),vl.push(ul),Dn(e,!0)},jn=function(){var e=vl[vl.length-1];vl.pop(),Dn(e,!1)},Dn=function(e,t){var n=ul;if((t?!pl.echoes||ml++&&e===ul:!ml||--ml&&e===ul)||In(t?Pn.bind(null,e):jn),e!==ul&&(ul=e,n===al&&(al.env=Cn()),Jc)){var r=al.env.Promise,o=e.env;qc.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(lc,"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))}},Cn=function(){var e=lc.Promise;return Jc?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(lc,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:qc.then,gthen:e.prototype.then}:{}},Tn=function(e,t,n,r,o){var i=ul;try{return Dn(e,!0),t(n,r,o)}finally{Dn(i,!1)}},In=function(e){Yc.call(Hc,e)},Mn=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=ul;n&&xn(),Dn(t,!0);try{return e.apply(this,arguments)}finally{Dn(o,!1),r&&In(kn)}}},Rn=function(e,t){return function(n,r){return e.call(this,Mn(n,t),Mn(r,t))}},Nn=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(lc.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),Mt(r,o)):lc.CustomEvent&&Mt(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&lc.dispatchEvent&&(dispatchEvent(r),!lc.PromiseRejectionEvent&&lc.onunhandledrejection))try{lc.onunhandledrejection(r)}catch(e){}Cc&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},Ln=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Fn=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=qt(t))[e],t}},Bn=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){fc(e).forEach((function(t){var n=e[t];if(dc(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Uc.InvalidArgument("Invalid event config");var r=i(t,nn,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){Kt((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=cn),o||(o=tn);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}},Un=function(e,t){return Ft(t).from({prototype:e}),t},Gn=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},Kn=function(e,t){e.filter=Ln(e.filter,t)},Vn=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return Ln(r(),t())}:t,e.justLimit=n&&!r},zn=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Uc.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},Hn=function(e,t,n){var r=zn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},qn=function(e,t,n,r){var o=e.replayFilter?Ln(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),Rt(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Wn(Hn(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Wn(Hn(e,r,n),Ln(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},Wn=function(e,t,n,r){var o=En(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=tn}),(function(t){e.fail(t),n=tn}))||o(e.value,e,(function(e){return n=e})),n()}))}))},Yn=function(e){var t=void 0===e?"undefined":y(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=Wt(e);return"ArrayBuffer"===n?"binary":n},$n=function(e){return l(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},Jn=function(e,t){return e<t?-1:e===t?0:1},Qn=function(e,t){return e>t?-1:e===t?0:1},Xn=function(e,t,n){var r=l(e,Ml)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Zn=function(e){return new e.Collection(e,(function(){return rr("")})).limit(0)},er=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,s=0;s<a;++s){var c=t[s];if(c!==r[s])return o(e[s],n[s])<0?e.substr(0,s)+n[s]+n.substr(s+1):o(e[s],r[s])<0?e.substr(0,s)+r[s]+n.substr(s+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[s],c)<0&&(u=s)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},tr=function(e,t,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return Xn(e,"String expected.");function d(e){o=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),i=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?Jn:Qn;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),s=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}d("next");var h=new e.Collection(e,(function(){return nr(u[0],s[f-1]+r)}));h._ondirectionchange=function(e){d(e)};var p=0;return h._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,s,p))return!0;for(var h=null,y=p;y<f;++y){var v=er(o,d,u[y],s[y],a,c);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+l)}:r),!1})),h},nr=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},rr=function(e){return{type:1,lower:e,upper:e}},or=function(e){return En((function(t){return ir(t),e(t.target.error),!1}))},ir=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},ar=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+ur(t)}},ur=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},sr=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Vt(n,(function(e){return[e.name,e]}))}},cr=function(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return bc(t,e)}}(e):function(t){return bc(t,e)}},lr=function(e){return[].slice.call(e)},fr=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},dr=function(e,t){var n=e._novip,r=t.db,o=function(e,t,n,r){var o=n.IDBKeyRange,i=(n.indexedDB,function(e,t){return t.reduce((function(e,t){return f({},e,(0,t.create)(e))}),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}var o=function(e,t){var n=lr(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=dc(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:cr(t)},indexes:lr(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:dc(o),keyPath:o,unique:n,multiEntry:r,extractKey:cr(o)};return i[fr(o)]=a,a})),getIndexByKeyPath:function(e){return i[fr(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[fr(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),i=o.schema,a=o.hasGetAll,u=i.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,o=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,s){e=En(e);var c=n.objectStore(t),l=null==c.keyPath,f="put"===o||"add"===o;if(!f&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var d,p=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var y=[],v=[],m=0,g=function(e){++m,ir(e)};if("deleteRange"===o){if(4===u.type)return e({numFailures:m,failures:v,results:[],lastResult:void 0});3===u.type?y.push(d=c.clear()):y.push(d=c.delete(r(u)))}else{var b=h(f?l?[a,i]:[a,null]:[i,null],2),w=b[0],_=b[1];if(f)for(var S=0;S<p;++S)y.push(d=_&&void 0!==_[S]?c[o](w[S],_[S]):c[o](w[S])),d.onerror=g;else for(var E=0;E<p;++E)y.push(d=c[o](w[E])),d.onerror=g}var O=function(t){var n=t.target.result;y.forEach((function(e,t){return null!=e.error&&(v[t]=e.error)})),e({numFailures:m,failures:v,results:"delete"===o?i:y.map((function(e){return e.result})),lastResult:n})};d.onerror=function(e){g(e),O(e)},d.onsuccess=O}))},getMany:function(e){var n=e.trans,r=e.keys;return new Promise((function(e,o){e=En(e);for(var i,a=n.objectStore(t),u=r.length,s=new Array(u),c=0,l=0,f=function(t){var n=t.target;s[n._pos]=n.result,++l===c&&e(s)},d=or(o),h=0;h<u;++h)null!=r[h]&&((i=a.get(r[h]))._pos=h,i.onsuccess=f,i.onerror=d,++c);0===c&&e(s)}))},get:function(e){var n=e.trans,r=e.key;return new Promise((function(e,o){e=En(e);var i=n.objectStore(t).get(r);i.onsuccess=function(t){return e(t.target.result)},i.onerror=or(o)}))},query:function(e){return function(n){return new Promise((function(o,i){o=En(o);var a=n.trans,u=n.values,s=n.limit,c=n.query,l=s===1/0?void 0:s,f=c.index,d=c.range,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===s)return o({result:[]});if(e){var v=u?p.getAll(y,l):p.getAllKeys(y,l);v.onsuccess=function(e){return o({result:e.target.result})},v.onerror=or(i)}else{var m=0,g=u||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),b=[];g.onsuccess=function(e){var t=g.result;return t?(b.push(u?t.value:t.primaryKey),++m===s?o({result:b}):void t.continue()):o({result:b})},g.onerror=or(i)}}))}}(a),openCursor:function(e){var n=e.trans,o=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,s){e=En(e);var c=i.index,l=i.range,f=n.objectStore(t),d=c.isPrimaryKey?f:f.index(c.name),h=a?u?"prevunique":"prev":u?"nextunique":"next",p=o||!("openKeyCursor"in d)?d.openCursor(r(l),h):d.openKeyCursor(r(l),h);p.onerror=or(s),p.onsuccess=En((function(t){var r=p.result;if(r){r.___id=++Fl,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=En(s),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=En(e),p.onerror=or(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(p.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=En((function(e){p.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),s)}))},count:function(e){var n=e.query,o=e.trans,i=n.index,a=n.range;return new Promise((function(e,n){var u=o.objectStore(t),s=i.isPrimaryKey?u:u.index(i.name),c=r(a),l=c?s.count(c):s.count();l.onsuccess=En((function(t){return e(t.target.result)})),l.onerror=or(n)}))}}}(e)})),s={};return u.forEach((function(e){return s[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!s[e])throw new Error("Table '".concat(e,"' not found"));return s[e]},MIN_KEY:-1/0,MAX_KEY:Ll(t),schema:i}}(t,o,r),e.dbcore));return{dbcore:i}}(n._middlewares,r,n._deps,t);n.core=o.dbcore,n.tables.forEach((function(e){var t=e.name;n.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=n.core.table(t),l(n[t],n.Table)&&(n[t].core=e.core))}))},hr=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=mc(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||l(t,o.Transaction)?Lt(t,e,{get:function(){return this.table(e)},set:function(t){yc(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},pr=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)l(e[t],n.Table)&&delete e[t]}))},yr=function(e,t){return e._cfg.version-t._cfg.version},vr=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!xl)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,s=i.idxByName,c=void 0;for(c in u)s[c]||a.del.push(c);for(c in s){var l=u[c],f=s[c];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},mr=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return gr(o,e)})),o},gr=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},br=function(e,t,n){var r={};return Bt(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=ar(ur(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var s=t.index(t.indexNames[u]);o=s.keyPath;var c=ar(s.name,o,!!s.unique,!!s.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(c)}r[e]=sr(e,i,a)})),r},wr=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var s=0;s<u.indexNames.length;++s){var c=u.indexNames[s],f=u.index(c).keyPath,d="string"==typeof f?f:"["+Bt(f).join("+")+"]";if(t[a]){var h=t[a].idxByName[d];h&&(h.name=c,delete t[a].idxByName[d],t[a].idxByName[c]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&lc.WorkerGlobalScope&&l(lc,lc.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},_r=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new $l("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},Sr=function(e){return e&&"function"==typeof e.databases},Er=function(e){return On((function(){return ul.letThrough=!0,e()}))},Or=function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()},xr=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):dc(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},kr=function(e,t,n){var r=arguments.length;if(r<2)throw new Uc.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,Ht(o),n]},Ar=function(e,t,n){for(var r=dc(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},Pr=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Cl(t.keys[o],e[i])&&(r.push(n?qt(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},jr=function(e){return!("from"in e)},Dr=function(e,t){jr(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;ql(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},Cr=function(e){var t=jr(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Cl(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Cl(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},Tr=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=f({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=Ir(a)}e.d=Ir(e)},Ir=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},Mr=function(e,t){return fc(t).forEach((function(n){Dr(e[n]||(e[n]=new Hl),t[n])})),e},Rr=function(e){var t=Zl;try{Zl=!0,Rl.storagemutated.fire(e)}finally{Zl=t}},Nr=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},Lr=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Fr=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},Br=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ur=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},Gr=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},Kr=function(){},Vr=function(e,t){if(!t)return e&&e.then?e.then(Kr):Promise.resolve()},zr=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Hr=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},qr=function(e){return function(e){if(Array.isArray(e))return zr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Wr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Wr=function(e,t){if(e){if("string"==typeof e)return zr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zr(e,t):void 0}},Yr=function(e){return function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||Wr(e,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,ro.useState)(e.getState())),r=n[0],o=n[1];return(0,ro.useEffect)((function(){return e.subscribe((function(e){return o(e)}))}),[]),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Hr(e,t,n[t])}))}return e}({},r,(0,ro.useMemo)((function(){return t?function(e,t){var n=function(n){r[n]=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];e.setState((function(e){var r,i=[e].concat(qr(o));return(r=t)[n].apply(r,qr(i))}))}};"function"==typeof t&&(t=t(e));var r={};for(var o in t)n(o);return r}(e,t):{}}),[t]))}},$r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Jr=D(714),Qr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 119"><path fill="var(--logo-red)" fill-rule="evenodd" d="M40.29 40.328a27.76 27.76 0 0 1 19.688-8.154c7.669 0 14.613 3.102 19.646 8.116l.021-18.54A42.84 42.84 0 0 0 59.978 17c-7.089 0-13.813 1.93-19.709 4.968z" clip-rule="evenodd"/><path fill="var(--logo-orange)" fill-rule="evenodd" d="M79.645 79.671a27.74 27.74 0 0 1-19.684 8.154c-7.67 0-14.614-3.101-19.651-8.116l-.02 18.54A42.86 42.86 0 0 0 59.96 103a42.8 42.8 0 0 0 19.672-4.751z" clip-rule="evenodd"/><path fill="var(--logo-purple)" fill-rule="evenodd" d="M40.328 79.696c-5.038-5.037-8.154-11.995-8.154-19.685 0-7.669 3.102-14.612 8.116-19.65l-18.54-.02A42.85 42.85 0 0 0 17 60.012a42.8 42.8 0 0 0 4.752 19.672z" clip-rule="evenodd"/><path fill="var(--logo-green)" fill-rule="evenodd" d="M79.634 40.289a27.75 27.75 0 0 1 8.154 19.688 27.74 27.74 0 0 1-8.117 19.646l18.542.02a42.84 42.84 0 0 0 4.749-19.666c0-7.09-1.714-13.779-4.751-19.675z" clip-rule="evenodd"/><path fill="var(--logo-black)" fill-rule="evenodd" d="M156.184 60.003c0-8.749-6.118-15.777-15.025-15.777-8.909 0-15.025 7.028-15.025 15.776s6.116 15.78 15.025 15.78c8.907 0 15.025-7.031 15.025-15.78m-34.881 0c0-11.483 8.318-19.96 19.856-19.96 11.536 0 19.855 8.478 19.855 19.96 0 11.484-8.319 19.964-19.855 19.964-11.538 0-19.856-8.48-19.856-19.964M179.514 75.54c5.507 0 9.05-4.14 9.05-9.482s-3.543-9.483-9.05-9.483c-5.505 0-9.046 4.142-9.046 9.483s3.541 9.482 9.046 9.482M166.22 53.306h4.248v3.704h.11c2.344-2.725 5.449-4.36 9.154-4.36 8.014 0 13.408 5.67 13.408 13.408 0 7.63-5.613 13.406-12.752 13.406-4.58 0-8.231-2.29-9.81-5.178h-.11V90.87h-4.248zM217.773 63.768c-.163-4.305-3-7.193-7.686-7.193-4.685 0-7.79 2.888-8.335 7.193zm3.653 10.412c-3.001 3.868-6.596 5.284-11.339 5.284-8.01 0-12.914-5.993-12.914-13.406 0-7.901 5.559-13.407 13.08-13.407 7.196 0 12.096 4.906 12.096 13.354v1.362h-20.597c.325 4.413 3.704 8.173 8.335 8.173 3.65 0 6.105-1.307 8.12-3.868zM227.854 59.357c0-2.347-.216-4.361-.216-6.05h4.031c0 1.362.11 2.776.11 4.194h.11c1.144-2.505 4.306-4.85 8.5-4.85 6.705 0 9.699 4.252 9.699 10.41v15.748h-4.248v-15.31c0-4.253-1.856-6.924-5.833-6.924-5.503 0-7.903 3.979-7.903 9.811V78.81h-4.25zM259.211 41.009h6.708L278.8 70.79h.107l12.982-29.782h6.549v37.99h-4.506V47.124h-.106L280.192 79h-2.738l-13.629-31.875h-.107V79h-4.507zM312.392 57.752h4.023c4.992 0 11.487 0 11.487-6.282 0-5.47-4.776-6.276-9.177-6.276h-6.333zm-4.506-16.744h9.711c7.352 0 15.132 1.072 15.132 10.462 0 5.527-3.594 9.125-9.495 10.037l10.784 17.492h-5.525l-10.304-17.063h-5.797V79h-4.506zM358.123 47.713c-1.506-2.414-4.187-3.487-6.926-3.487-3.973 0-8.1 1.88-8.1 6.385 0 3.49 1.931 5.047 7.994 6.98 5.903 1.878 11.377 3.809 11.377 11.267 0 7.567-6.495 11.11-13.36 11.11-4.402 0-9.125-1.45-11.7-5.262l3.862-3.165c1.61 2.794 4.83 4.24 8.105 4.24 3.862 0 8.263-2.253 8.263-6.601 0-4.669-3.165-5.474-9.928-7.728-5.366-1.771-9.442-4.134-9.442-10.463 0-7.298 6.277-10.945 12.929-10.945 4.241 0 7.836 1.178 10.625 4.45zM185.885 90.998h1.424l2.734 6.326h.023l2.758-6.326h1.391v8.07h-.957v-6.77h-.024l-2.894 6.77h-.582l-2.894-6.77h-.022v6.77h-.957zM198.386 90.998h5.071v.889h-4.114v2.53h3.841v.89h-3.841v2.871h4.32v.89h-5.277zM207.891 98.178h1.822c1.848 0 3.25-.935 3.25-3.146s-1.402-3.145-3.25-3.145h-1.822zm-.957-7.18h3.1c1.583 0 3.953 1.06 3.953 4.034 0 2.976-2.37 4.036-3.953 4.036h-3.1zM217.007 99.068h.958v-8.07h-.958zM227.105 92.663c-.478-.651-1.242-.981-2.017-.981-1.8 0-3.077 1.584-3.077 3.35 0 1.87 1.266 3.352 3.077 3.352.98 0 1.767-.4 2.337-1.129l.718.603c-.718.97-1.766 1.414-3.055 1.414-2.314 0-4.102-1.79-4.102-4.24 0-2.37 1.709-4.239 4.102-4.239 1.095 0 2.166.377 2.849 1.266zM233.557 92.23h-.024l-1.675 3.965h3.294zm-.434-1.232h.9l3.43 8.07h-1.117l-.82-1.984h-4.034l-.832 1.984h-1.082zM240.006 90.998h.958v7.18h3.692v.89h-4.65zM252.793 94.554h.855c1.06 0 2.439 0 2.439-1.334 0-1.161-1.014-1.333-1.948-1.333h-1.346zm-.957-3.556h2.063c1.561 0 3.214.228 3.214 2.222 0 1.174-.764 1.938-2.018 2.132l2.291 3.716h-1.173l-2.19-3.625h-1.23v3.625h-.957zM260.51 90.998h5.07v.889h-4.112v2.53h3.84v.89h-3.84v2.871h4.318v.89h-5.276zM274.402 92.663c-.479-.651-1.242-.981-2.018-.981-1.8 0-3.077 1.584-3.077 3.35 0 1.87 1.266 3.352 3.077 3.352.98 0 1.767-.4 2.336-1.129l.718.603c-.718.97-1.766 1.414-3.054 1.414-2.313 0-4.102-1.79-4.102-4.24 0-2.37 1.709-4.239 4.102-4.239 1.094 0 2.166.377 2.85 1.266zM284.739 95.032c0-1.857-1.3-3.35-3.191-3.35-1.892 0-3.191 1.493-3.191 3.35 0 1.858 1.299 3.352 3.191 3.352s3.191-1.494 3.191-3.352m-7.409 0c0-2.439 1.767-4.239 4.218-4.239s4.217 1.8 4.217 4.239-1.767 4.24-4.217 4.24c-2.451 0-4.218-1.8-4.218-4.24M289.514 94.554h.855c1.059 0 2.438 0 2.438-1.334 0-1.161-1.014-1.333-1.948-1.333h-1.345zm-.958-3.556h2.062c1.563 0 3.215.228 3.215 2.222 0 1.174-.763 1.938-2.016 2.132l2.289 3.716h-1.173l-2.189-3.625h-1.23v3.625h-.958zM297.81 98.178h1.825c1.845 0 3.246-.935 3.246-3.146s-1.401-3.145-3.246-3.145h-1.825zm-.957-7.18h3.1c1.585 0 3.956 1.06 3.956 4.034 0 2.976-2.371 4.036-3.956 4.036h-3.1zM315.407 92.422c-.318-.513-.89-.74-1.47-.74-.844 0-1.721.4-1.721 1.356 0 .74.41 1.072 1.698 1.482 1.254.399 2.417.81 2.417 2.393 0 1.607-1.38 2.36-2.838 2.36-.935 0-1.938-.309-2.486-1.118l.821-.672c.342.593 1.026.9 1.721.9.821 0 1.754-.478 1.754-1.402 0-.991-.67-1.163-2.107-1.64-1.139-.377-2.006-.878-2.006-2.222 0-1.551 1.333-2.326 2.747-2.326.9 0 1.664.25 2.256.946zM320.844 95.591l-3.009-4.593h1.219l2.269 3.647 2.335-3.647h1.152l-3.01 4.593v3.477h-.956zM330.565 92.422c-.32-.513-.89-.74-1.471-.74-.843 0-1.72.4-1.72 1.356 0 .74.41 1.072 1.698 1.482 1.254.399 2.415.81 2.415 2.393 0 1.607-1.378 2.36-2.837 2.36-.934 0-1.937-.309-2.485-1.118l.821-.672c.342.593 1.026.9 1.721.9.821 0 1.754-.478 1.754-1.402 0-.991-.671-1.163-2.107-1.64-1.139-.377-2.006-.878-2.006-2.222 0-1.551 1.333-2.326 2.746-2.326.901 0 1.665.25 2.257.946zM339.283 91.887h-2.666v7.18h-.958v-7.18h-2.667v-.889h6.291zM341.665 90.998h5.071v.889h-4.113v2.53h3.84v.89h-3.84v2.871h4.319v.89h-5.277zM349.905 90.998h1.424l2.735 6.326h.023l2.758-6.326h1.391v8.07h-.958v-6.77h-.023l-2.894 6.77h-.582l-2.895-6.77h-.021v6.77h-.958z" clip-rule="evenodd"/></svg>',Xr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 119"><path fill="var(--logo-red)" fill-rule="evenodd" d="M40.29 40.328a27.76 27.76 0 0 1 19.688-8.154c7.669 0 14.613 3.102 19.647 8.116l.02-18.54A42.84 42.84 0 0 0 59.978 17c-7.089 0-13.813 1.93-19.709 4.968z" clip-rule="evenodd"/><path fill="var(--logo-orange)" fill-rule="evenodd" d="M79.645 79.671a27.74 27.74 0 0 1-19.684 8.154c-7.67 0-14.614-3.101-19.651-8.116l-.02 18.54A42.86 42.86 0 0 0 59.96 103a42.8 42.8 0 0 0 19.672-4.751z" clip-rule="evenodd"/><path fill="var(--logo-purple)" fill-rule="evenodd" d="M40.328 79.696c-5.038-5.037-8.154-11.995-8.154-19.685 0-7.669 3.102-14.612 8.116-19.65l-18.54-.02A42.85 42.85 0 0 0 17 60.012a42.8 42.8 0 0 0 4.752 19.672z" clip-rule="evenodd"/><path fill="var(--logo-green)" fill-rule="evenodd" d="M79.634 40.289a27.75 27.75 0 0 1 8.154 19.688 27.74 27.74 0 0 1-8.117 19.646l18.542.02a42.84 42.84 0 0 0 4.749-19.666c0-7.09-1.714-13.779-4.751-19.675z" clip-rule="evenodd"/><path fill="var(--logo-black)" fill-rule="evenodd" d="M156.184 60.003c0-8.749-6.118-15.777-15.025-15.777-8.909 0-15.025 7.028-15.025 15.776s6.116 15.78 15.025 15.78c8.907 0 15.025-7.031 15.025-15.78m-34.881 0c0-11.483 8.318-19.96 19.856-19.96 11.536 0 19.855 8.478 19.855 19.96 0 11.484-8.319 19.964-19.855 19.964-11.538 0-19.856-8.48-19.856-19.964M179.514 75.54c5.507 0 9.05-4.14 9.05-9.482s-3.543-9.483-9.05-9.483c-5.505 0-9.046 4.142-9.046 9.483s3.541 9.482 9.046 9.482M166.22 53.306h4.248v3.704h.11c2.344-2.725 5.449-4.36 9.154-4.36 8.014 0 13.408 5.67 13.408 13.408 0 7.63-5.613 13.406-12.752 13.406-4.58 0-8.231-2.29-9.81-5.178h-.11V90.87h-4.248zM217.773 63.768c-.163-4.305-3-7.193-7.686-7.193-4.685 0-7.79 2.888-8.335 7.193zm3.653 10.412c-3.001 3.868-6.596 5.284-11.339 5.284-8.01 0-12.914-5.993-12.914-13.406 0-7.901 5.559-13.407 13.08-13.407 7.196 0 12.096 4.906 12.096 13.354v1.362h-20.597c.325 4.413 3.704 8.173 8.335 8.173 3.65 0 6.105-1.307 8.12-3.868zM227.854 59.357c0-2.347-.216-4.361-.216-6.05h4.031c0 1.362.11 2.776.11 4.194h.11c1.144-2.505 4.306-4.85 8.5-4.85 6.705 0 9.699 4.252 9.699 10.41v15.748h-4.248v-15.31c0-4.253-1.856-6.924-5.833-6.924-5.503 0-7.903 3.979-7.903 9.811V78.81h-4.25zM259.211 41.009h6.708L278.8 70.79h.107l12.982-29.782h6.549v37.99h-4.506V47.124h-.106L280.192 79h-2.738l-13.629-31.875h-.107V79h-4.507zM312.392 57.752h4.023c4.992 0 11.487 0 11.487-6.282 0-5.47-4.776-6.276-9.177-6.276h-6.333zm-4.506-16.744h9.711c7.352 0 15.132 1.072 15.132 10.462 0 5.527-3.594 9.125-9.495 10.037L334.018 79h-5.525l-10.304-17.063h-5.797V79h-4.506zM358.123 47.713c-1.506-2.414-4.187-3.487-6.926-3.487-3.973 0-8.1 1.88-8.1 6.385 0 3.49 1.931 5.047 7.994 6.98 5.903 1.878 11.377 3.809 11.377 11.267 0 7.567-6.495 11.11-13.36 11.11-4.402 0-9.125-1.45-11.7-5.262l3.862-3.165c1.61 2.794 4.83 4.24 8.105 4.24 3.862 0 8.263-2.253 8.263-6.601 0-4.669-3.165-5.474-9.928-7.728-5.366-1.771-9.442-4.134-9.442-10.463 0-7.298 6.277-10.945 12.929-10.945 4.241 0 7.836 1.178 10.625 4.45z" clip-rule="evenodd"/></svg>',Zr='<svg xmlns="http://www.w3.org/2000/svg" width="121" height="118"><path fill="var(--logo-red)" fill-rule="evenodd" d="M40.436 39.474a27.93 27.93 0 0 1 19.811-8.205c7.717 0 14.705 3.122 19.77 8.167l.021-18.656A43.1 43.1 0 0 0 60.247 16c-7.133 0-13.899 1.943-19.832 4.999z" clip-rule="evenodd"/><path fill="var(--logo-orange)" fill-rule="evenodd" d="M80.038 79.064a27.92 27.92 0 0 1-19.808 8.205c-7.717 0-14.705-3.121-19.774-8.167l-.02 18.657a43.1 43.1 0 0 0 19.794 4.78 43.1 43.1 0 0 0 19.794-4.781z" clip-rule="evenodd"/><path fill="var(--logo-purple)" fill-rule="evenodd" d="M40.474 79.089c-5.069-5.069-8.205-12.07-8.205-19.808 0-7.717 3.121-14.704 8.167-19.773l-18.657-.02A43.1 43.1 0 0 0 17 59.281a43.1 43.1 0 0 0 4.782 19.795z" clip-rule="evenodd"/><path fill="var(--logo-green)" fill-rule="evenodd" d="M80.027 39.435a27.93 27.93 0 0 1 8.205 19.811 27.92 27.92 0 0 1-8.168 19.769l18.658.021a43.1 43.1 0 0 0 4.779-19.79 43.1 43.1 0 0 0-4.781-19.798z" clip-rule="evenodd"/></svg>',eo=document.createElement("div"),to=function(){document.body.appendChild(eo)};eo.id="omrs-svgs-container",eo.style.display="none","complete"===document.readyState?to():window.addEventListener("load",to);var no={"Brand color #1":{_default:"#005d5d",_type:Jr.Type.String},"Brand color #2":{_default:"#004144",_type:Jr.Type.String},"Brand color #3":{_default:"#007d79",_type:Jr.Type.String},excludePatientIdentifierCodeTypes:{uuids:{_type:Jr.Type.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:Jr.Type.UUID}}},implementationName:{_type:Jr.Type.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:Jr.Type.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:Jr.Type.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[Jr.validators.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}}};Number.MAX_SAFE_INTEGER;var ro=D(954),oo=D(792),io={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?io.enableCssCustomProperties=!0:io.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?io.enableUseControlledStateWithValue=!0:io.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?io.enableCssGrid=!0:io.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?io.enableV11Release=!0:io.enableV11Release=!1:io.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?io.enableExperimentalTileContrast=!0:io.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?io.enableV12TileDefaultIcons=!0:io.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?io.enableV12Overflowmenu=!0:io.enableV12Overflowmenu=!1}catch(e){io.enableCssCustomProperties=!1,io.enableUseControlledStateWithValue=!1,io.enableCssGrid=!1,io.enableV11Release=!0,io.enableExperimentalTileContrast=!1,io.enableV12TileDefaultIcons=!1,io.enableV12Overflowmenu=!1}for(var ao=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:io.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:io.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:io.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:io.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:io.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:io.enableV12TileDefaultIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:io.enableV12Overflowmenu}],uo=function(){function e(t){var n=this;(function(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):l(n,r)))throw new TypeError("Cannot call a class as a function");var n,r})(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=o(t.value,2),i=r[0],a=r[1];this.flags.has(i)||this.flags.set(i,a)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==(void 0===(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?"undefined":(o=i)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":void 0===o?"undefined":y(o))?i:String(i),r)}var o,i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),so=new uo(void 0),co=0;co<ao.length;co++){var lo=ao[co];so.add(lo.name,lo.enabled)}!function(){so.merge.apply(so,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1}),D(279),new oo.Subject,new oo.Subject,D(976),D(901),new oo.Subject,new oo.Subject;var fo,ho=Object.freeze({__proto__:null,get start(){return Ee},get ensureJQuerySupport(){return ie},get setBootstrapMaxTime(){return q},get setMountMaxTime(){return W},get setUnmountMaxTime(){return Y},get setUnloadMaxTime(){return $},get registerApplication(){return pe},get unregisterApplication(){return ve},get getMountedApps(){return fe},get getAppStatus(){return he},get unloadApplication(){return me},get checkActivityFunctions(){return ye},get getAppNames(){return de},get pathToActiveWhen(){return we},get navigateToUrl(){return Z},get patchHistoryApi(){return re},get triggerAppChange(){return _e},get addErrorHandler(){return O},get removeErrorHandler(){return x},get mountRootParcel(){return K},get NOT_LOADED(){return mo},get LOADING_SOURCE_CODE(){return go},get NOT_BOOTSTRAPPED(){return bo},get BOOTSTRAPPING(){return wo},get NOT_MOUNTED(){return _o},get MOUNTING(){return So},get UPDATING(){return Oo},get LOAD_ERROR(){return Ao},get MOUNTED(){return Eo},get UNLOADING(){return ko},get UNMOUNTING(){return xo},get SKIP_BECAUSE_BROKEN(){return Po}}),po=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,yo=function(){try{var e=new po("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?po:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},vo=[],mo="NOT_LOADED",go="LOADING_SOURCE_CODE",bo="NOT_BOOTSTRAPPED",wo="BOOTSTRAPPING",_o="NOT_MOUNTED",So="MOUNTING",Eo="MOUNTED",Oo="UPDATING",xo="UNMOUNTING",ko="UNLOADING",Ao="LOAD_ERROR",Po="SKIP_BECAUSE_BROKEN",jo=[],Do=!1,Co=!1,To=0,Io={parcels:{}},Mo={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}},Ro="undefined"!=typeof window,No={hashchange:[],popstate:[]},Lo=["hashchange","popstate"],Fo=null,Bo=!1;Ro&&(window.singleSpaNavigate?console.warn(k(41,!1)):window.singleSpaNavigate=Z);var Uo=!1,Go={},Ko=[],Vo=!1,zo=!1,Ho=[],qo=Ro&&window.location.href;function Wo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);p.push(t.catch((function(e){return console.warn(Error(k(42,!1))),console.warn(e),!1})))},o=function(){var t=fe();e.forEach((function(e){return e.resolve(t)}));try{u(0===s.length?"no-app-change":"app-change",a()),u("routing-event",a())}catch(e){setTimeout((function(){throw e}))}if(zo=!1,Ho.length>0){var n=Ho;Ho=[],Wo(n)}return t},i=function(){n||(e.forEach((function(e){ee(e.eventArguments)})),ee(t))},a=function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0,o={},i=(w(e={},Eo,[]),w(e,_o,[]),w(e,mo,[]),w(e,Po,[]),e);n?(d.concat(h).forEach((function(e,t){u(e,Eo)})),l.forEach((function(e){u(e,mo)})),f.forEach((function(e){u(e,_o)}))):s.forEach((function(e){u(e)}));var a={detail:{newAppStatuses:o,appsByNewStatus:i,totalAppChanges:s.length,originalEvent:null==t?void 0:t[0],oldUrl:y,newUrl:v}};return r&&M(a.detail,r),a;function u(e,t){var n=C(e);t=t||he(n),o[n]=t,(i[t]=i[t]||[]).push(n)}},u=function(e,t){n||window.dispatchEvent(new yo("single-spa:".concat(e),t))};if(zo)return new Promise((function(e,n){Ho.push({resolve:e,reject:n,eventArguments:t})}));var s,c=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Ko.forEach((function(i){var a=i.status!==Po&&j(i);switch(i.status){case Ao:a&&o-i.loadErrorTime>=200&&n.push(i);break;case mo:case go:a&&n.push(i);break;case bo:case _o:!a&&le(C(i))?e.push(i):a&&r.push(i);break;case Eo:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),l=c.appsToUnload,f=c.appsToUnmount,d=c.appsToLoad,h=c.appsToMount,p=[],y=qo,v=qo=window.location.href;return Oe()?(zo=!0,s=l.concat(d,f,h),Promise.resolve().then((function(){return u(0===s.length?"before-no-app-change":"before-app-change",a(!0)),u("before-routing-event",a(!0,{cancelNavigation:r})),Promise.all(p).then((function(n){if(n.some((function(e){return e})))return Fo.call(window.history,history.state,"",y.substring(location.origin.length)),qo=location.href,zo=!1,Wo(e,t,!0);var r=l.map(ue),s=f.map(U).map((function(e){return e.then(ue)})).concat(r),c=Promise.all(s);c.then((function(){u("before-mount-routing-event",a(!0))}),(function(e){throw e}));var p=d.map((function(e){return X(e).then((function(e){return Se(e,c)}))})),v=h.filter((function(e){return d.indexOf(e)<0})).map((function(e){return Se(e,c)}));return c.catch((function(e){throw i(),e})).then((function(){return i(),Promise.all(p.concat(v)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(o).then((function(){}),(function(e){throw e}))}))}))}))):(s=d,Promise.resolve().then((function(){var e=d.map(X);return Promise.all(e).then(i).then((function(){return[]})).catch((function(e){throw i(),e})).finally((function(){}))})))}var Yo=!1,$o={getRawAppData:function(){return function(e){if(Array.isArray(e))return b(e)}(e=Ko)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:Wo,NOT_LOADED:mo,toLoadPromise:X,toBootstrapPromise:B,unregisterApplication:ve,getProfilerData:function(){return jo}};Ro&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=$o);var Jo=D(685),Qo=D(45);D(254),(0,Jo.createGlobalStore)("modalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,D(740),D(513),(0,Jo.createGlobalStore)("workspace",{context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0}),D(281);var Xo=null;try{Xo=n(6072).createContext()}catch(po){}function Zo(e){return(Zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ei(e,t){return(ei=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ti=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ei(e,t)}(r,ro.Component);var t,n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zo(e);if(t){var o=Zo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pe(e)}(this,n)}}(r);function r(e){var t;if(function(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):l(n,r)))throw new TypeError("Cannot call a class as a function");var n,r}(this,r),Ae(Pe(t=n.call(this,e)),"handleRef",(function(e){t.el=e})),Ae(Pe(t),"addThingToDo",(function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then((function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)})).catch((function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout((function(){throw n})),n})))})),Ae(Pe(t),"getParcelProps",(function(){var e=ke(ke({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e})),t.state={hasError:!1},!e.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 t}return(t=[{key:"componentDidMount",value:function(){var e=this;this.addThingToDo("mount",(function(){var t,n=e.props.mountParcel||e.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 e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach((function(n){t.style[n]=e.props.wrapStyle[n]})),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,ke({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise}))}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",(function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())}))}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",(function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()})),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return Xo&&Xo.Consumer?ro.createElement(Xo.Consumer,null,(function(t){return e.mountParcel=t?t.mountParcel:null,null})):null;var t=Xo&&Xo.Consumer?ro.createElement(Xo.Consumer,null,(function(t){return e.mountParcel=t?t.mountParcel:null,null})):void 0;return ro.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,t),r}();Ae(ti,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}}),(0,Jo.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase});var ni=D(688);D(353);var ri=D(921),oi=function(){},ii=void 0,ai=Object,ui=function(e){return e===ii},si=function(e){return"function"==typeof e},ci=function(e,t){return f({},e,t)},li=new WeakMap,fi=0,di=function(e){var t,n,r=void 0===e?"undefined":y(e),o=e&&e.constructor,i=o==Date;if(ai(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=li.get(e))return t;if(t=++fi+"~",li.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=di(e[n])+",";li.set(e,t)}if(o==ai){t="#";for(var a=ai.keys(e).sort();!ui(n=a.pop());)ui(e[n])||(t+=n+":"+di(e[n])+",");li.set(e,t)}}return t},hi=new WeakMap,pi={},yi={},vi="undefined",mi=("undefined"==typeof window?"undefined":y(window))!=vi,gi=("undefined"==typeof document?"undefined":y(document))!=vi,bi=function(e,t){var n=hi.get(e);return[function(){return!ui(t)&&e.get(t)||pi},function(r){if(!ui(t)){var o=e.get(t);t in yi||(yi[t]=o),n[5](t,ci(o,r),o||pi)}},n[6],function(){return!ui(t)&&t in yi?yi[t]:!ui(t)&&e.get(t)||pi}]},wi=!0,_i=h(mi&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[oi,oi],2),Si=_i[0],Ei=_i[1],Oi={isOnline:function(){return wi},isVisible:function(){var e=gi&&document.visibilityState;return ui(e)||"hidden"!==e}},xi={initFocus:function(e){return gi&&document.addEventListener("visibilitychange",e),Si("focus",e),function(){gi&&document.removeEventListener("visibilitychange",e),Ei("focus",e)}},initReconnect:function(e){var t=function(){wi=!0,e()},n=function(){wi=!1};return Si("online",t),Si("offline",n),function(){Ei("online",t),Ei("offline",n)}}},ki=!ro.default.useId,Ai=!mi||"Deno"in window,Pi=function(e){return mi&&y(window.requestAnimationFrame)!=vi?window.requestAnimationFrame(e):setTimeout(e,1)},ji=Ai?ro.useEffect:ro.useLayoutEffect,Di="undefined"!=typeof navigator&&navigator.connection,Ci=!Ai&&Di&&(["slow-2g","2g"].includes(Di.effectiveType)||Di.saveData),Ti=function(e){if(si(e))try{e=e()}catch(t){e=""}var t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?di(e):"",t]},Ii=0,Mi=function(){return++Ii};function Ri(){return Ni.apply(this,arguments)}function Ni(){return Ni=i((function(){var e,t,n,r,o,a,u,s,c,l,f,d,p,y,v,g,b,w,_,S,E,O,x=arguments;function k(e){return A.apply(this,arguments)}function A(){return A=i((function(e){var n,r,i,a,s,y,v,g,b,w,_,S,E,O,x,k,A,P,j,D;return m(this,(function(m){switch(m.label){case 0:if(n=h(Ti(e),1),!(r=n[0]))return[2];if(i=h(bi(o,r),2),a=i[0],s=i[1],y=h(hi.get(o),4),v=y[0],g=y[1],b=y[2],w=y[3],_=function(){var t=v[r];return(si(c.revalidate)?c.revalidate(a().data,e):!1!==c.revalidate)&&(delete b[r],delete w[r],t&&t[0])?t[0](2).then((function(){return a().data})):a().data},t.length<3)return[2,_()];if(E=u,O=Mi(),g[r]=[O,0],x=!ui(d),k=a(),A=k.data,P=k._c,j=ui(P)?A:P,x&&(d=si(d)?d(j,A):d,s({data:d,_c:j})),si(E))try{E=E(j)}catch(e){S=e}return E&&function(e){return si(e.then)}(E)?[4,E.catch((function(e){S=e}))]:[3,2];case 1:if(E=m.sent(),O!==g[r][0]){if(S)throw S;return[2,E]}S&&x&&function(e){return"function"==typeof f?f(e):!1!==f}(S)&&(l=!0,s({data:j,_c:ii})),m.label=2;case 2:if(l&&!S&&(si(l)?(D=l(E,j),s({data:D,error:ii,_c:ii})):s({data:E,error:ii,_c:ii})),g[r][1]=Mi(),Promise.resolve(_()).then((function(){s({_c:ii})})),!S)return[2,E];if(p)throw S;return[2]}}))})),A.apply(this,arguments)}return m(this,(function(i){for(e=x.length,t=new Array(e),n=0;n<e;n++)t[n]=x[n];if(r=h(t,4),o=r[0],a=r[1],u=r[2],s=r[3],c=ci({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{}),l=c.populateCache,f=c.rollbackOnError,d=c.optimisticData,p=c.throwOnError,si(a)){y=a,v=[],g=o.keys(),b=!0,w=!1,_=void 0;try{for(S=g[Symbol.iterator]();!(b=(E=S.next()).done);b=!0)O=E.value,!/^\$(inf|sub)\$/.test(O)&&y(o.get(O)._k)&&v.push(O)}catch(e){w=!0,_=e}finally{try{b||null==S.return||S.return()}finally{if(w)throw _}}return[2,Promise.all(v.map(k))]}return[2,k(a)]}))})),Ni.apply(this,arguments)}var Li=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Fi=function(e,t){if(!hi.has(e)){var n=ci(xi,t),r={},o=Ri.bind(ii,e),i=oi,a={},u=function(e,t){var n=a[e]||[];return a[e]=n,n.push(t),function(){return n.splice(n.indexOf(t),1)}},s=function(t,n,r){e.set(t,n);var o=a[t],i=!0,u=!1,s=void 0;if(o)try{for(var c,l=o[Symbol.iterator]();!(i=(c=l.next()).done);i=!0)(0,c.value)(n,r)}catch(e){u=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(u)throw s}}},c=function(){if(!hi.has(e)&&(hi.set(e,[r,{},{},{},o,s,u]),!Ai)){var t=n.initFocus(setTimeout.bind(ii,Li.bind(ii,r,0))),a=n.initReconnect(setTimeout.bind(ii,Li.bind(ii,r,1)));i=function(){t&&t(),a&&a(),hi.delete(e)}}};return c(),[e,o,c,i]}return[e,hi.get(e)[4]]},Bi=h(Fi(new Map),2),Ui=Bi[0],Gi=Bi[1],Ki=ci({onLoadingSlow:oi,onSuccess:oi,onError:oi,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!ui(i)&&a>i||setTimeout(r,u,o)},onDiscarded:oi,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ci?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Ci?5e3:3e3,compare:function(e,t){return di(e)==di(t)},isPaused:function(){return!1},cache:Ui,mutate:Gi,fallback:{}},Oi),Vi=function(e,t){var n=ci(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=ci(o,a))}return n},zi=(0,ro.createContext)({}),Hi=function(e){var t=e.value,n=(0,ro.useContext)(zi),r=si(t),o=(0,ro.useMemo)((function(){return r?t(n):t}),[r,n,t]),i=(0,ro.useMemo)((function(){return r?o:Vi(n,o)}),[r,n,o]),a=o&&o.provider,u=(0,ro.useRef)(ii);a&&!u.current&&(u.current=Fi(a(i.cache||Ui),o));var s=u.current;return s&&(i.cache=s[0],i.mutate=s[1]),ji((function(){if(s)return s[2]&&s[2](),s[3]}),[]),(0,ro.createElement)(zi.Provider,ci(e,{value:i}))},qi="$inf$",Wi=mi&&window.__SWR_DEVTOOLS_USE__,Yi=Wi?window.__SWR_DEVTOOLS_USE__:[],$i=function(e){return si(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Ji=Yi.concat((function(e){return function(t,n,r){return e(t,n&&function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=h(Ti(t),1)[0],a=h(hi.get(Ui),4)[3];if(i.startsWith(qi))return n.apply(void 0,p(r));var u=a[i];return ui(u)?n.apply(void 0,p(r)):(delete a[i],u)},r)}})),Qi=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o=ci(Ki,(0,ro.useContext)(zi)),i=h($i(n),3),a=i[0],u=i[1],s=i[2],c=Vi(o,s),l=e,f=(c.use||[]).concat(Ji),d=f.length;d--;)l=f[d](l);return l(a,u||c.fetcher||null,c)}},Xi=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},Zi=function(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=h($i(r),3),a=i[0],u=i[1],s=i[2],c=(s.use||[]).concat(t);return e(a,u,d(f({},s),{use:c}))}};Wi&&(window.__SWR_DEVTOOLS_REACT__=ro.default);var ea=ro.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},ta={dedupe:!0};ai.defineProperty(Hi,"defaultValue",{value:Ki}),Qi((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,s=n.revalidateOnMount,c=n.revalidateIfStale,l=n.refreshInterval,d=n.refreshWhenHidden,y=n.refreshWhenOffline,v=n.keepPreviousData,g=h(hi.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=h(Ti(e),2),O=E[0],x=E[1],k=(0,ro.useRef)(!1),A=(0,ro.useRef)(!1),P=(0,ro.useRef)(O),j=(0,ro.useRef)(t),D=(0,ro.useRef)(n),C=function(){return D.current},T=function(){return C().isVisible()&&C().isOnline()},I=h(bi(r,O),4),M=I[0],R=I[1],N=I[2],L=I[3],F=(0,ro.useRef)({}).current,B=ui(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!ui(e[r]))return!1;if(!o($,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,ro.useMemo)((function(){var e=!!O&&!!t&&(ui(s)?!C().isPaused()&&!a&&(!!ui(c)||c):s),n=function(t){var n=ci(t);return delete n._k,e?f({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),K=(0,ri.useSyncExternalStore)((0,ro.useCallback)((function(e){return N(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),V=!k.current,z=b[O]&&b[O].length>0,H=K.data,q=ui(H)?B:H,W=K.error,Y=(0,ro.useRef)(q),$=v?ui(H)?Y.current:H:q,J=!(z&&!ui(W))&&(V&&!ui(s)?s:!C().isPaused()&&(a?!ui(q)&&c:ui(q)||c)),Q=!!(O&&t&&V&&J),X=ui(K.isValidating)?Q:K.isValidating,Z=ui(K.isLoading)?Q:K.isLoading,ee=(0,ro.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,l,f,d,p,y,v,g,S,E,D;return m(this,(function(m){switch(m.label){case 0:if(t=j.current,!O||!t||A.current||C().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return ki?!A.current&&O===P.current&&k.current:O===P.current},l={isValidating:!1,isLoading:!1},f=function(){R(l)},d=function(){var e=_[O];e&&e[1]===i&&delete _[O]},p={isValidating:!0},ui(M().data)&&(p.isLoading=!0),m.label=1;case 1:return m.trys.push([1,3,,4]),s&&(R(p),n.loadingTimeout&&ui(M().data)&&setTimeout((function(){a&&c()&&C().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),Mi()]),y=h(_[O],2),r=y[0],i=y[1],[4,r];case 2:return r=m.sent(),s&&setTimeout(d,n.dedupingInterval),_[O]&&_[O][1]===i?(l.error=ii,v=w[O],!ui(v)&&(i<=v[0]||i<=v[1]||0===v[1])?[2,(f(),s&&c()&&C().onDiscarded(O),!1)]:(g=M().data,l.data=o(g,r)?g:r,s&&c()&&C().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&C().onDiscarded(O),!1)];case 3:return S=m.sent(),d(),E=C(),D=E.shouldRetryOnError,E.isPaused()||(l.error=S,s&&c()&&(E.onError(S,O,E),(!0===D||si(D)&&D(S))&&(C().revalidateOnFocus&&C().revalidateOnReconnect&&!T()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,f(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,ro.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ri.apply(void 0,[r,P.current].concat(p(t)))}),[]);if(ji((function(){j.current=t,D.current=n,ui(H)||(Y.current=H)})),ji((function(){if(O){var e=ee.bind(ii,ta),t=0,n=Xi(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();C().revalidateOnFocus&&o>t&&T()&&(t=o+C().focusThrottleInterval,e())}else if(1==n)C().revalidateOnReconnect&&T()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return A.current=!1,P.current=O,k.current=!0,R({_k:x}),J&&(ui(q)||Ai?e():Pi(e)),function(){A.current=!0,n()}}}),[O]),ji((function(){var e,t=function(){var t=si(l)?l(M().data):l;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!d&&!C().isVisible()||!y&&!C().isOnline()?t():ee(ta).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[l,d,y,O]),(0,ro.useDebugValue)($),a&&ui(q)&&O){if(!ki&&Ai)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,D.current=n,A.current=!1;var ne=S[O];if(!ui(ne)){var re=te(ne);ea(re)}if(!ui(W))throw W;var oe=ee(ta);ui($)||(oe.status="fulfilled",oe.value=!0),ea(oe)}return{mutate:te,get data(){return F.data=!0,$},get error(){return F.error=!0,W},get isValidating(){return F.isValidating=!0,X},get isLoading(){return F.isLoading=!0,Z}}}));var na=D(641);function ra(e,t,n){return ra=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&ia(o,n.prototype),o},ra.apply(null,arguments)}function oa(e){return oa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},oa(e)}function ia(e,t){return ia=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ia(e,t)}function aa(e){var t="function"==typeof Map?new Map:void 0;return aa=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return ra(e,arguments,oa(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ia(n,e)},aa(e)}(0,Jo.createGlobalStore)("breadcrumbs",[]);var ua,sa,ca="/ws/rest/v1";"".concat(ca,"/session"),aa(Error),"".concat(ca,"/attachment"),(0,Jo.createGlobalStore)("session",{loaded:!1,session:null}).subscribe((function(e){return e.session&&(i=null!==(o=null==(t=e.session)||null===(n=t.user)||void 0===n||null===(r=n.userProperties)||void 0===r?void 0:r.defaultLocale)&&void 0!==o?o:t.locale,a=document.documentElement.getAttribute("lang"),void(function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(i)&&i!==a&&document.documentElement.setAttribute("lang",i)));var t,n,r,o,i,a})),D(593),function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(ua||(ua={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(sa||(sa={}));var la,fa,da,ha=function(){try{return JSON.parse(localStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};(0,Jo.getGlobalStore)("visit",ha).subscribe((function(e){var t;t=e,localStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))})),new oo.BehaviorSubject(null),(fa=la||(la={})).Array="Array",fa.Boolean="Boolean",fa.ConceptUuid="ConceptUuid",fa.Number="Number",fa.Object="Object",fa.String="String",fa.UUID="UUID",fa.PersonAttributeTypeUuid="PersonAttributeTypeUuid",fa.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",je((function(e){if(!e||"string"!=typeof e)return!1;for(var t=/\${(.*?)}/g,n=t.exec(e);n;){if(!da.includes(n[1]))return!1;n=t.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+(da=[].concat(["openmrsBase","openmrsSpaBase"])).map((function(e){return"${"+e+"}"})).join(", "));var pa="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ya=Object.prototype.toString,va=function(){return"[object Arguments]"===ya.call(arguments)?function(e){return"[object Arguments]"===ya.call(e)}:function(e){return Re("callee",e)}}(),ma=va,ga=!{toString:null}.propertyIsEnumerable("toString"),ba=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],wa=function(){return arguments.propertyIsEnumerable("length")}(),_a=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},Sa="function"!=typeof Object.keys||wa?Ce((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=wa&&ma(e);for(t in e)!Re(t,e)||o&&"length"===t||(r[r.length]=t);if(ga)for(n=ba.length-1;n>=0;)Re(t=ba[n],e)&&!_a(r,t)&&(r[r.length]=t),n-=1;return r})):Ce((function(e){return Object(e)!==e?[]:Object.keys(e)})),Ea=Ce((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function Oa(e,t,n,r){if(pa(e,t))return!0;var o=Ea(e);if(o!==Ea(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":Ne(e))!==(void 0===t?"undefined":Ne(t))||!pa(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!pa(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&Le(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&Le(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=Sa(e);if(a.length!==Sa(t).length)return!1;var u=n.concat([e]),s=r.concat([t]);for(i=a.length-1;i>=0;){var c=a[i];if(!Re(c,t)||!Oa(t[c],e[c],u,s))return!1;i-=1}return!0}var xa=Te((function(e,t){return Oa(e,t,[],[])})),ka=xa;function Aa(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?Aa(e[u],t,n,!0):e[u];return o};switch(Ea(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var Pa=Ce((function(e){return null!=e&&"function"==typeof e.clone?e.clone():Aa(e,[],[],!0)})),ja=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Da=Ce((function(e){return!!ja(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),Ca=Da,Ta=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Ia=Te((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,s,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Ma=Ia,Ra="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Na=Fe((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Ta(e)}(e)),Ca(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return Ue(e,t,n,"fantasy-land/reduce");if(null!=n[Ra])return Be(e,t,n[Ra]());if("function"==typeof n.next)return Be(e,t,n);if("function"==typeof n.reduce)return Ue(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),La=Fe((function(e,t,n){var r,o={};for(r in t)Re(r,t)&&(o[r]=Re(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)Re(r,n)&&!Re(r,o)&&(o[r]=n[r]);return o})),Fa=La,Ba=Fe((function e(t,n,r){return Fa((function(n,r,o){return Ge(r)&&Ge(o)?e(t,r,o):t(n,r,o)}),n,r)})),Ua=Ba,Ga=Te((function(e,t){return Ua((function(e,t,n){return n}),e,t)})),Ka=je((function(e){return Array.isArray(e)}),"must be an array"),Va=je((function(e){return"boolean"==typeof e}),"must be a boolean"),za=je((function(e){return"number"==typeof e}),"must be a number"),Ha=je((function(e){return"string"==typeof e}),"must be a string"),qa=je((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Wa=je((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Ya=(0,Jo.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),$a=(0,Jo.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});$a.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Ja=(0,Jo.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Qa=(0,Jo.createGlobalStore)("config-implementer-tools",{config:{}});function Xa(e){return e.hasOwnProperty("_default")?qe(He({},e),{_value:e._default,_source:"default"}):ft(e)?Object.keys(e).reduce((function(t,n){return t[n]=Xa(e[n]),t}),{}):{}}function Za(e,t){return ft(e)?Object.keys(e).reduce((function(n,r){return n[r]=Za(e[r],t),n}),{}):{_value:e,_source:t}}function eu(e,t,n){st(n,e._type,t),ft(t)?e._type===la.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s];ut(e._elements,c,"".concat(n,".").concat(s))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||ut(e,t,n):e._type===la.Array&&function(e,t,n){if(st(n,la.Array,t)){if(lt(e._elements))for(var r=0;r<t.length;r++)eu(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;st("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}}(e,t,n)}function tu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&ct(n,e._validators,t),ft(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e._type===la.Object&&e._elements?tu(e._elements,c,l):tu(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)tu(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}Je(Ya.getState(),$a.getState()),Ya.subscribe((function(e){return Je(e,$a.getState())})),$a.subscribe((function(e){return Je(Ya.getState(),e)})),Xe(Ya.getState(),$a.getState()),Ya.subscribe((function(e){return Xe(e,$a.getState())})),$a.subscribe((function(e){return Xe(Ya.getState(),e)})),Qe(Ya.getState(),$a.getState()),Ya.subscribe((function(e){return Qe(e,$a.getState())})),$a.subscribe((function(e){return Qe(Ya.getState(),e)})),Ze(Ya.getState(),Ja.getState(),$a.getState()),Ya.subscribe((function(e){Ze(e,Ja.getState(),$a.getState())})),Ja.subscribe((function(e){Ze(Ya.getState(),e,$a.getState())})),$a.subscribe((function(e){Ze(Ya.getState(),Ja.getState(),e)}));var nu=function(e,t){var n=Pa(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=a.value,r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&lt(i))if(o._type===la.Array&&Array.isArray(r)){var u=r.map((function(e){return nu(i,e)}));n[t]=u}else if(o._type===la.Object){var s=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;r[h]=nu(i,r[h])}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}else if(ft(o)){var p=null!=r?r:{};ft(p)&&(n[t]=nu(o,p))}},s=Object.keys(e)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n},ru=new Set,ou={"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:la.Object,_default:{},_validators:[je((function(e){return Object.keys(e).every((function(e){return/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}))}),(function(e){var t=Object.keys(e).filter((function(e){return!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}));return"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: ".concat(t.join(", "),".")}))]}},iu=He({"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:la.Array,_default:[]}}},ou),au=D(863),uu=D(570),su=D(103),cu=D(925),lu=function(e,t){return e===t||e!=e&&t!=t},fu=function(e,t){for(var n=e.length;n--;)if(lu(e[n][0],t))return n;return-1},du=Array.prototype.splice;ht.prototype.clear=function(){this.__data__=[],this.size=0},ht.prototype.delete=function(e){var t=this.__data__,n=fu(t,e);return!(n<0||(n==t.length-1?t.pop():du.call(t,n,1),--this.size,0))},ht.prototype.get=function(e){var t=this.__data__,n=fu(t,e);return n<0?void 0:t[n][1]},ht.prototype.has=function(e){return fu(this.__data__,e)>-1},ht.prototype.set=function(e,t){var n=this.__data__,r=fu(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var hu,pu=ht,yu="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,vu="object"==typeof self&&self&&self.Object===Object&&self,mu=yu||vu||Function("return this")(),gu=mu.Symbol,bu=Object.prototype,wu=bu.hasOwnProperty,_u=bu.toString,Su=gu?gu.toStringTag:void 0,Eu=Object.prototype.toString,Ou=gu?gu.toStringTag:void 0,xu=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ou&&Ou in Object(e)?function(e){var t=wu.call(e,Su),n=e[Su];try{e[Su]=void 0;var r=!0}catch(e){}var o=_u.call(e);return r&&(t?e[Su]=n:delete e[Su]),o}(e):function(e){return Eu.call(e)}(e)},ku=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":y(t);return null!=e&&("object"==n||"function"==n)},Au=function(e){if(!ku(e))return!1;var t=xu(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Pu=mu["__core-js_shared__"],ju=(hu=/[^.]+$/.exec(Pu&&Pu.keys&&Pu.keys.IE_PROTO||""))?"Symbol(src)_1."+hu:"",Du=Function.prototype.toString,Cu=function(e){if(null!=e){try{return Du.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Tu=/^\[object .+?Constructor\]$/,Iu=Function.prototype,Mu=Object.prototype,Ru=Iu.toString,Nu=Mu.hasOwnProperty,Lu=RegExp("^"+Ru.call(Nu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fu=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ku(e)||(t=e,ju&&ju in t))&&(Au(e)?Lu:Tu).test(Cu(e));var t}(n)?n:void 0},Bu=Fu(mu,"Map"),Uu=Fu(Object,"create"),Gu=Object.prototype.hasOwnProperty,Ku=Object.prototype.hasOwnProperty;pt.prototype.clear=function(){this.__data__=Uu?Uu(null):{},this.size=0},pt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},pt.prototype.get=function(e){var t=this.__data__;if(Uu){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Gu.call(t,e)?t[e]:void 0},pt.prototype.has=function(e){var t=this.__data__;return Uu?void 0!==t[e]:Ku.call(t,e)},pt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Uu&&void 0===t?"__lodash_hash_undefined__":t,this};var Vu=pt,zu=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":void 0===r?"undefined":y(r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};yt.prototype.clear=function(){this.size=0,this.__data__={hash:new Vu,map:new(Bu||pu),string:new Vu}},yt.prototype.delete=function(e){var t=zu(this,e).delete(e);return this.size-=t?1:0,t},yt.prototype.get=function(e){return zu(this,e).get(e)},yt.prototype.has=function(e){return zu(this,e).has(e)},yt.prototype.set=function(e,t){var n=zu(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Hu=yt;vt.prototype.clear=function(){this.__data__=new pu,this.size=0},vt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vt.prototype.get=function(e){return this.__data__.get(e)},vt.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.set=function(e,t){var n,r,o=this.__data__;if(n=o,null!=(r=pu)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):l(n,r)){var i=o.__data__;if(!Bu||i.length<199)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new Hu(i)}return o.set(e,t),this.size=o.size,this};var qu=vt;mt.prototype.add=mt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},mt.prototype.has=function(e){return this.__data__.has(e)};var Wu=mt,Yu=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},$u=function(e,t){return e.has(t)},Ju=function(e,t,n,r,o,i){var a=1&n,u=e.length,s=t.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,h=2&n?new Wu:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var p=e[f],y=t[f];if(r)var v=a?r(y,p,f,t,e,i):r(p,y,f,e,t,i);if(void 0!==v){if(v)continue;d=!1;break}if(h){if(!Yu(t,(function(e,t){if(!$u(h,t)&&(p===e||o(p,e,n,r,i)))return h.push(t)}))){d=!1;break}}else if(p!==y&&!o(p,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Qu=mu.Uint8Array,Xu=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Zu=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},es=gu?gu.prototype:void 0,ts=es?es.valueOf:void 0,ns=Array.isArray,rs=Object.prototype.propertyIsEnumerable,os=Object.getOwnPropertySymbols,is=os?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(os(e),(function(t){return rs.call(e,t)})))}:function(){return[]},as=function(e){return null!=e&&"object"==typeof e},us=function(e){return as(e)&&"[object Arguments]"==xu(e)},ss=Object.prototype,cs=ss.hasOwnProperty,ls=ss.propertyIsEnumerable,fs=us(function(){return arguments}())?us:function(e){return as(e)&&cs.call(e,"callee")&&!ls.call(e,"callee")},ds=fs,hs=t&&!t.nodeType&&t,ps=hs&&e&&!e.nodeType&&e,ys=ps&&ps.exports===hs?mu.Buffer:void 0,vs=(ys?ys.isBuffer:void 0)||function(){return!1},ms=/^(?:0|[1-9]\d*)$/,gs=function(e,t){var n,r=void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":y(n);return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ms.test(e))&&e>-1&&e%1==0&&e<t},bs=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ws={};ws["[object Float32Array]"]=ws["[object Float64Array]"]=ws["[object Int8Array]"]=ws["[object Int16Array]"]=ws["[object Int32Array]"]=ws["[object Uint8Array]"]=ws["[object Uint8ClampedArray]"]=ws["[object Uint16Array]"]=ws["[object Uint32Array]"]=!0,ws["[object Arguments]"]=ws["[object Array]"]=ws["[object ArrayBuffer]"]=ws["[object Boolean]"]=ws["[object DataView]"]=ws["[object Date]"]=ws["[object Error]"]=ws["[object Function]"]=ws["[object Map]"]=ws["[object Number]"]=ws["[object Object]"]=ws["[object RegExp]"]=ws["[object Set]"]=ws["[object String]"]=ws["[object WeakMap]"]=!1;var _s,Ss=t&&!t.nodeType&&t,Es=Ss&&e&&!e.nodeType&&e,Os=Es&&Es.exports===Ss&&yu.process,xs=function(){try{return Es&&Es.require&&Es.require("util").types||Os&&Os.binding&&Os.binding("util")}catch(e){}}(),ks=xs&&xs.isTypedArray,As=ks?(_s=ks,function(e){return _s(e)}):function(e){return as(e)&&bs(e.length)&&!!ws[xu(e)]},Ps=Object.prototype.hasOwnProperty,js=Object.prototype,Ds=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Cs=Object.prototype.hasOwnProperty,Ts=function(e){return null!=(t=e)&&bs(t.length)&&!Au(t)?function(e,t){var n=ns(e),r=!n&&ds(e),o=!n&&!r&&vs(e),i=!n&&!r&&!o&&As(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!Ps.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gs(c,s))||u.push(c);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||js))return Ds(e);var t,n,r=[];for(var o in Object(e))Cs.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Is=function(e){return function(e,t,n){var r=t(e);return ns(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ts,is)},Ms=Object.prototype.hasOwnProperty,Rs=Fu(mu,"DataView"),Ns=Fu(mu,"Promise"),Ls=Fu(mu,"Set"),Fs=Fu(mu,"WeakMap"),Bs="[object Map]",Us="[object Promise]",Gs="[object Set]",Ks="[object WeakMap]",Vs="[object DataView]",zs=Cu(Rs),Hs=Cu(Bu),qs=Cu(Ns),Ws=Cu(Ls),Ys=Cu(Fs),$s=xu;(Rs&&$s(new Rs(new ArrayBuffer(1)))!=Vs||Bu&&$s(new Bu)!=Bs||Ns&&$s(Ns.resolve())!=Us||Ls&&$s(new Ls)!=Gs||Fs&&$s(new Fs)!=Ks)&&($s=function(e){var t=xu(e),n="[object Object]"==t?e.constructor:void 0,r=n?Cu(n):"";if(r)switch(r){case zs:return Vs;case Hs:return Bs;case qs:return Us;case Ws:return Gs;case Ys:return Ks}return t});var Js=$s,Qs="[object Arguments]",Xs="[object Array]",Zs="[object Object]",ec=Object.prototype.hasOwnProperty,tc=function e(t,n,r,o,i){return t===n||(null==t||null==n||!as(t)&&!as(n)?t!=t&&n!=n:function(e,t,n,r,o,i){var a=ns(e),u=ns(t),s=a?Xs:Js(e),c=u?Xs:Js(t),l=(s=s==Qs?Zs:s)==Zs,f=(c=c==Qs?Zs:c)==Zs,d=s==c;if(d&&vs(e)){if(!vs(t))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new qu),a||As(e)?Ju(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Qu(e),new Qu(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return lu(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=Xu;case"[object Set]":var s=1&r;if(u||(u=Zu),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Ju(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(ts)return ts.call(e)==ts.call(t)}return!1}(e,t,s,n,r,o,i);if(!(1&n)){var h=l&&ec.call(e,"__wrapped__"),p=f&&ec.call(t,"__wrapped__");if(h||p){var y=h?e.value():e,v=p?t.value():t;return i||(i=new qu),o(y,v,n,r,i)}}return!!d&&(i||(i=new qu),function(e,t,n,r,o,i){var a=1&n,u=Is(e),s=u.length;if(s!=Is(t).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in t:Ms.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++c<s;){var y=e[l=u[c]],v=t[l];if(r)var m=a?r(v,y,l,t,e,i):r(y,v,l,e,t,i);if(!(void 0===m?y===v||o(y,v,n,r,i):m)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&gt(g,g)&&"function"==typeof b&&gt(b,b)||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}(t,n,r,o,e,i))},nc=function(e,t){return tc(e,t)},rc=(0,Jo.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),oc=function(){return(0,Jo.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};bt(rc.getState()),rc.subscribe(bt),(0,Jo.createGlobalStore)("modalRegistry",{modals:{}}),(0,Jo.createGlobalStore)("workspaceRegistrations",{workspaces:{}}),new Set,oc();var ic=oc(),ac=(0,Jo.getGlobalStore)("extensions",{slots:{}}),uc=(0,Jr.getExtensionSlotsConfigStore)(),sc=(0,Jr.getExtensionsConfigStore)();ic.subscribe((function(e){xt(e,uc.getState(),sc.getState(),uu.featureFlagsStore.getState(),na.sessionStore.getState())})),uc.subscribe((function(e){xt(ic.getState(),e,sc.getState(),uu.featureFlagsStore.getState(),na.sessionStore.getState())})),sc.subscribe((function(e){xt(ic.getState(),uc.getState(),e,uu.featureFlagsStore.getState(),na.sessionStore.getState())})),uu.featureFlagsStore.subscribe((function(e){xt(ic.getState(),uc.getState(),sc.getState(),e,na.sessionStore.getState())})),na.sessionStore.subscribe((function(e){xt(ic.getState(),uc.getState(),sc.getState(),uu.featureFlagsStore.getState(),e)})),kt(),(0,su.subscribeConnectivityChanged)(kt);var cc={flags:function(){var e={},t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(localStorage)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(a.startsWith("openmrs:feature-flag:")){var u=a.replace("openmrs:feature-flag:",""),s=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(u))||"{}");e[u]=Tt({enabled:"true"===localStorage.getItem(a)},s)}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}()};(0,Jo.getGlobalStore)("feature-flags",cc).subscribe((function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e.flags)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=It(o.value,2),u=a[0],s=a[1];localStorage.setItem("openmrs:feature-flag:".concat(u),s.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(u),JSON.stringify({label:s.label,description:s.description}))}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}));var lc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,fc=Object.keys,dc=Array.isArray;"undefined"==typeof Promise||lc.Promise||(lc.Promise=Promise);var hc=Object.getPrototypeOf,pc={}.hasOwnProperty,yc=Object.defineProperty,vc=Object.getOwnPropertyDescriptor;function mc(e,t){var n;return vc(e,t)||(n=hc(e))&&mc(n,t)}var gc=[].slice;function bc(e,t){if(Rt(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=bc(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:bc(u,t.substr(a+1))}}function wc(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){Gt("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)wc(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?dc(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var s=e[a];s&&Rt(e,a)||(s=e[a]={}),wc(s,u,n)}}else void 0===n?dc(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var _c=[].concat,Sc="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Ht([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return lc[e]})),Ec=Sc.map((function(e){return lc[e]}));Vt(Sc,(function(e){return[e,!0]}));var Oc=null;function xc(e){if(!e||"object"!=typeof e)return e;var t=Oc&&Oc.get(e);if(t)return t;if(dc(e)){t=[],Oc&&Oc.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(xc(e[n]))}else if(Ec.indexOf(e.constructor)>=0)t=e;else{var o=hc(e);for(var i in t=o===Object.prototype?{}:Object.create(o),Oc&&Oc.set(e,t),e)Rt(e,i)&&(t[i]=xc(e[i]))}return t}var kc={}.toString,Ac="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Pc="symbol"==(void 0===Ac?"undefined":y(Ac))?function(e){var t;return null!=e&&(t=e[Ac])&&t.apply(e)}:function(){return null},jc={},Dc="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},Cc="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),Tc=function(){return!0},Ic=!new Error("").stack;function Mc(){if(Ic)try{throw Mc.arguments,new Error}catch(e){return e}return new Error}var Rc=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Nc=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Rc),Lc={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"};Ft(Qt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Jt(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Ft(Zt).from(Qt),Ft(en).from(Qt);var Fc=Nc.reduce((function(e,t){return e[t]=t+"Error",e}),{}),Bc=Qt,Uc=Nc.reduce((function(e,t){var n=function(e,n){this._e=Mc(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=Lc[t]||r,this.inner=null)},r=t+"Error";return Ft(n).from(Bc),e[t]=n,e}),{});Uc.Syntax=SyntaxError,Uc.Type=TypeError,Uc.Range=RangeError;var Gc=Rc.reduce((function(e,t){return e[t+"Error"]=Uc[t],e}),{}),Kc=Nc.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Uc[t]),e}),{});Kc.ModifyError=Zt,Kc.DexieError=Qt,Kc.BulkError=en;var Vc={},zc=h("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,hc(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,hc(t),e]}(),3),Hc=zc[0],qc=zc[1],Wc=zc[2],Yc=qc&&qc.then,$c=Hc&&Hc.constructor,Jc=!!Wc,Qc=!1,Xc=Wc?function(){Wc.then(gn)}:lc.setImmediate?setImmediate.bind(null,gn):lc.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){gn(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(gn,0)},Zc=function(e,t){sl.push([e,t]),tl&&(Xc(),tl=!1)},el=!0,tl=!0,nl=[],rl=[],ol=null,il=nn,al={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Nn,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Nn(e[0],e[1])}catch(e){}}))}},ul=al,sl=[],cl=0,ll=[],fl={get:function(){var e=function(e,r){var o=this,i=!t.global&&(t!==ul||n!==gl),a=i&&!kn(),u=new fn((function(n,u){yn(o,new dn(Mn(e,t,i,a),Mn(r,t,i,a),n,u,t))}));return Cc&&mn(u,this),u},t=ul,n=gl;return e.prototype=Vc,e},set:function(e){Lt(this,"then",e&&e.prototype===Vc?fl:{get:function(){return e},set:fl.set})}};function dl(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&bn();t&&"function"==typeof t.then?dl(e,(function(e,n){l(t,fn)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,pn(e)),n&&wn()}}),hn.bind(null,e))}catch(t){hn(e,t)}}function hl(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Jt(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return Cc&&((r=Jt(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&hl(e._prev,t,n)),t}Nt(fn.prototype,{then:fl,_then:function(e,t){yn(this,new dn(null,null,e,t,ul))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return l(e,t)?n(e):Sn(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):Sn(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),Sn(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Qc=!0;var e=hl(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Qc=!1}}},timeout:function(e,t){var n=this;return e<1/0?new fn((function(r,o){var i=setTimeout((function(){return o(new Uc.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Lt(fn.prototype,Symbol.toStringTag,"Dexie.Promise"),al.env=Cn(),Nt(fn,{all:function(){var e=Yt.apply(null,arguments).map(An);return new fn((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return fn.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(l(e,fn))return e;if(e&&"function"==typeof e.then)return new fn((function(t,n){e.then(t,n)}));var t=new fn(Vc,!0,e);return mn(t,ol),t},reject:Sn,race:function(){var e=Yt.apply(null,arguments).map(An);return new fn((function(t,n){e.map((function(e){return fn.resolve(e).then(t,n)}))}))},PSD:{get:function(){return ul},set:function(e){return ul=e}},totalEchoes:{get:function(){return gl}},newPSD:On,usePSD:Tn,scheduler:{get:function(){return Zc},set:function(e){Zc=e}},rejectionMapper:{get:function(){return il},set:function(e){il=e}},follow:function(e,t){return new fn((function(n,r){return On((function(t,n){var r=ul;r.unhandleds=[],r.onunhandled=n,r.finalize=on((function(){var e=this;!function(e){ll.push((function t(){e(),ll.splice(ll.indexOf(t),1)})),++cl,Zc((function(){0==--cl&&_n()}),[])}((function(){0===e.unhandleds.length?t():n(e.unhandleds[0])}))}),r.finalize),e()}),t,n,r)}))}}),$c&&($c.allSettled&&Lt(fn,"allSettled",(function(){var e=Yt.apply(null,arguments).map(An);return new fn((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return fn.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),$c.any&&"undefined"!=typeof AggregateError&&Lt(fn,"any",(function(){var e=Yt.apply(null,arguments).map(An);return new fn((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return fn.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var pl={awaits:0,echoes:0,id:0},yl=0,vl=[],ml=0,gl=0,bl=0;-1===(""+Yc).indexOf("[native code]")&&(xn=kn=tn);var wl=fn.reject;function _l(e,t,n,r){if(e.idbdb&&(e._state.openComplete||ul.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Fc.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return _l(e,t,n,r)}))):wl(o)}return o._promise(t,(function(e,t){return On((function(){return ul.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return wl(new Uc.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return wl(new Uc.DatabaseClosed);e.open().catch(tn)}return e._state.dbReadyPromise.then((function(){return _l(e,t,n,r)}))}var Sl=String.fromCharCode(65535),El="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ol=[],xl="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),kl=xl,Al=xl,Pl=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},jl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},Dl=function(){function e(){a(this,e)}return s(e,[{key:"_trans",value:function(e,t,n){var r=function(e,n,r){if(!r.schema[i])throw new Uc.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)},o=this._tx||ul.trans,i=this.name,a=bn();try{return o&&o.db===this.db?o===ul.trans?o._promise(e,r,n):On((function(){return o._promise(e,r,n)}),{trans:o,transless:ul.transless||ul}):_l(this.db,e,[this.name],r)}finally{a&&wn()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){var t=function(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}};if("string"==typeof e)return new this.db.WhereClause(this,e);if(dc(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=fc(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&n.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return n.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==Sl)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&Cc&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,a=h(n.reduce((function(n,r){var i=h(n,2),a=i[0],u=i[1],s=o[r],c=e[r];return[a||s,a||!s?Ln(u,s&&s.multi?function(e){var n=bc(e,r);return dc(n)&&n.some((function(e){return t(c,e)}))}:function(e){return t(c,bc(e,r))}):u]}),[null,null]),2),u=a[0],s=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(s):r?this.filter(s):this.where(n).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,dc(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(Rt(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){Mt(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Fn(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?fn.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{wc(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||dc(e))return this.where(":id").equals(e).modify(t);var n=bc(e,this.schema.primKey.keyPath);if(void 0===n)return wl(new Uc.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?fc(t).forEach((function(n){wc(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Fn(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?fn.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{wc(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?fn.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:jl})})).then((function(e){return e.numFailures?fn.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new Uc.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Uc.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Fn(u)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new en("".concat(r.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new Uc.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Uc.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Fn(u)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new en("".concat(r.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new en("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function Cl(e,t){try{var n=Yn(e),r=Yn(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}($n(e),$n(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=Cl(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var Tl=function(){function e(){a(this,e)}return s(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,wl.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,wl.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=Ln(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return qn(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&Mt(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return qn(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Gn(n,!0))return r.count({trans:e,query:{index:zn(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return qn(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=function(e,t){var n=a(e,i),r=a(t,i);return n<r?-u:n>r?u:0},r=e.split(".").reverse(),o=r[0],i=r.length-1;function a(e,t){return t?a(e[r[t]],t-1):e[o]}var u="next"===this._ctx.dir?1:-1;return this.toArray((function(e){return e.sort(n)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Gn(n,!0)&&n.limit>0){var r=n.valueMapper,o=zn(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return qn(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Gn(t)?Vn(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):Vn(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Vn(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return Kn(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return Kn(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Ln(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Gn(t,!0)&&t.limit>0)return this._read((function(e){var n=zn(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Kn(this._ctx,(function(e){var t=e.primaryKey.toString(),r=Rt(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=fc(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];bc(t,o)!==u&&(wc(t,o,u),n=!0)}return n}}var u=n.table.core,s=u.schema.primaryKey,c=s.outbound,l=s.extractKey,f=t.db._options.modifyChunkSize||200,d=[],h=0,p=[],y=function(e,t){var n=t.failures,r=t.numFailures;h+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,s=fc(n)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;d.push(n[c])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var s=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+s),cache:"immutable"}).then((function(d){for(var h=[],p=[],v=c?[]:null,m=[],g=0;g<s;++g){var b=d[g],w={value:qt(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):c||0===Cl(l(b),l(w.value))?(p.push(w.value),c&&v.push(t[a+g])):(m.push(t[a+g]),h.push(w.value)))}var _=Gn(n)&&n.limit===1/0&&("function"!=typeof e||e===Il)&&{index:n.index,range:n.range};return Promise.resolve(h.length>0&&u.mutate({trans:r,type:"add",values:h}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);y(h.length,e)}))).then((function(){return(p.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:v,values:p,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return y(p.length,e)}))})).then((function(){return(m.length>0||_&&e===Il)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return y(m.length,e)}))})).then((function(){return t.length>a+s&&i(a+f)}))}))};return i(0).then((function(){if(d.length>0)throw new Zt("Error modifying one or more objects",d,h,p);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Gn(e)&&(e.isPrimKey&&!Al||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new Zt("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(Il)}}]),e}(),Il=function(e,t){return t.value=null},Ml=function(){function e(){a(this,e)}return s(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Zn(this):new this.Collection(this,(function(){return nr(e,t,!n,!r)}))}catch(e){return Xn(this,El)}}},{key:"equals",value:function(e){return null==e?Xn(this,El):new this.Collection(this,(function(){return rr(e)}))}},{key:"above",value:function(e){return null==e?Xn(this,El):new this.Collection(this,(function(){return nr(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Xn(this,El):new this.Collection(this,(function(){return nr(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Xn(this,El):new this.Collection(this,(function(){return nr(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Xn(this,El):new this.Collection(this,(function(){return nr(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Xn(this,"String expected."):this.between(e,e+Sl,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):tr(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],Sl)}},{key:"equalsIgnoreCase",value:function(e){return tr(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=Yt.apply(jc,arguments);return 0===e.length?Zn(this):tr(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=Yt.apply(jc,arguments);return 0===e.length?Zn(this):tr(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,Sl)}},{key:"anyOf",value:function(){var e=this,t=Yt.apply(jc,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Xn(this,El)}if(0===t.length)return Zn(this);var r=new this.Collection(this,(function(){return nr(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=Yt.apply(jc,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Xn(this,El)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=function(e,t){return d(e[0],t[0])},o=this._cmp,i=this._ascending,a=this._descending,u=this._min,s=this._max;if(0===e.length)return Zn(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Xn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Uc.InvalidArgument);var c,l=!t||!1!==t.includeLowers,f=t&&!0===t.includeUppers,d=i;try{c=e.reduce((function(e,t){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(o(t[0],i[1])<0&&o(t[1],i[0])>0){i[0]=u(i[0],t[0]),i[1]=s(i[1],t[1]);break}}return n===r&&e.push(t),e}),[]),c.sort(r)}catch(e){return Xn(this,El)}var h=0,p=f?function(e){return i(e,c[h][1])>0}:function(e){return i(e,c[h][1])>=0},y=l?function(e){return a(e,c[h][0])>0}:function(e){return a(e,c[h][0])>=0},v=p,m=new this.Collection(this,(function(){return nr(c[0][0],c[c.length-1][1],!l,!f)}));return m._ondirectionchange=function(e){"next"===e?(v=p,d=i):(v=y,d=a),c.sort(r)},m._addAlgorithm((function(e,t,r){for(var o=e.key;v(o);)if(++h===c.length)return t(r),!1;return!!function(e){return!p(e)&&!y(e)}(o)||(0===n._cmp(o,c[h][1])||0===n._cmp(o,c[h][0])||t((function(){d===i?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),m}},{key:"startsWithAnyOf",value:function(){var e=Yt.apply(jc,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Zn(this):this.inAnyRange(e.map((function(e){return[e,e+Sl]}))):Xn(this,"startsWithAnyOf() only works with strings")}}]),e}(),Rl=Bn(null,"storagemutated"),Nl=function(){function e(){a(this,e)}return s(e,[{key:"_lock",value:function(){return Gt(!ul.global),++this._reculock,1!==this._reculock||ul.global||(ul.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(Gt(!ul.global),0==--this._reculock)for(ul.global||(ul.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Tn(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&ul.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(Gt(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Uc.DatabaseClosed(r);case"MissingAPIError":throw new Uc.MissingAPI(r.message,r);default:throw new Uc.OpenFailed(r)}if(!this.active)throw new Uc.TransactionInactive;return Gt(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=En((function(n){ir(n),t._reject(e.error)})),e.onabort=En((function(n){ir(n),t.active&&t._reject(new Uc.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=En((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&Rl.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return wl(new Uc.ReadOnly("Transaction is readonly"));if(!this.active)return wl(new Uc.TransactionInactive);if(this._locked())return new fn((function(o,i){r._blockedFuncs.push([function(){r._promise(e,t,n).then(o,i)},ul])}));if(n)return On((function(){var e=new fn((function(e,n){r._lock();var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return e.finally((function(){return r._unlock()})),e._lib=!0,e}));var o=new fn((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=fn.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new fn((function(e,r){n.then((function(n){return t._waitingQueue.push(En(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(En(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Uc.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(Rt(t,e))return t[e];var n=this.schema[e];if(!n)throw new Uc.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),Ll=function(e){try{return e.only([[]]),Ll=function(){return[[]]},[[]]}catch(e){return Ll=function(){return Sl},Sl}},Fl=0,Bl=function(){function e(){a(this,e)}return s(e,[{key:"_parseStoresSpec",value:function(e,t){fc(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return ar(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),dc(r),0===t)})),o=r.shift();if(o.multi)throw new Uc.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new Uc.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Uc.Schema("Index must have a name and cannot be an empty string")})),t[n]=sr(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?Mt(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){Mt(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,pr(t,[t._allTables,t,t.Transaction.prototype]),hr(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],fc(o),o),t._storeNames=fc(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=ln(this._cfg.contentUpgrade||tn,e),this}}]),e}();function Ul(e,t,n,r,o){return fn.resolve().then((function(){var i=ul.transless||ul,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Fc.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return Ul(e,t,n,null,o)}))):wl(r)}var s,c=Dc(o);c&&xn();var l=fn.follow((function(){if(s=o.call(a,a))if(c){var e=kn.bind(null,null);s.then(e,e)}else"function"==typeof s.next&&"function"==typeof s.throw&&(s=xr(s))}),u);return(s&&"function"==typeof s.then?fn.resolve(s).then((function(e){return a.active?e:wl(new Uc.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return s}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),wl(e)}))}))}var Gl={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return d(f({},e),{table:function(t){var n=function(t){var n,r,o=t.query.index;return o.isVirtual?d(f({},t),{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:Ar(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:Ar(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t},r=e.table(t),o=r.schema,i={},a=[];function u(e,t,n){var r=fr(e),o=i[r]=i[r]||[],s=null==e?0:"string"==typeof e?1:e.length,c=t>0,l=d(f({},n),{isVirtual:c,keyTail:t,keyLength:s,extractKey:cr(e),unique:!c&&n.unique});return o.push(l),l.isPrimaryKey||a.push(l),s>1&&u(2===s?e[0]:e.slice(0,s-1),t+1,n),o.sort((function(e,t){return e.keyTail-t.keyTail})),l}var s=u(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[s];var c=!0,l=!1,h=void 0;try{for(var p,y=o.indexes[Symbol.iterator]();!(c=(p=y.next()).done);c=!0){var v=p.value;u(v.keyPath,0,v)}}catch(e){l=!0,h=e}finally{try{c||null==y.return||y.return()}finally{if(l)throw h}}var m=d(f({},r),{schema:d(f({},o),{primaryKey:s,indexes:a,getIndexByKeyPath:function(e){var t=i[fr(e)];return t&&t[0]}}),count:function(e){return r.count(n(e))},query:function(e){return r.query(n(e))},openCursor:function(t){var o=t.query.index,i=o.keyTail,a=o.isVirtual,u=o.keyLength;return a?r.openCursor(n(t)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(Ar(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?n.continue(n.key.slice(0,u).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(Ar(t,e.MAX_KEY,i),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===u?e[0]:e.slice(0,u)}},value:{get:function(){return n.value}}});return r}(n)})):r.openCursor(t)}});return m}})}};function Kl(e,t,n,r){return n=n||{},r=r||"",fc(e).forEach((function(o){if(Rt(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=Wt(i);u!==Wt(a)?n[r+o]=t[o]:"Object"===u?Kl(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),fc(t).forEach((function(o){Rt(e,o)||(n[r+o]=t[o])})),n}var Vl={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return d(f({},e),{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=d(f({},n),{mutate:function(e){var o=function(e){var t=ul.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?d(f({},e),{keys:o}):f({},e)).type&&(e.values=p(e.values)),e.keys&&(e.keys=p(e.keys)),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((function(i){var a=o.map((function(n,o){var a=i[o],l={onerror:null,onsuccess:null};if("delete"===e.type)u.fire.call(l,n,a,t);else if("add"===e.type||void 0===a){var f=s.fire.call(l,n,e.values[o],t);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||wc(e.values[o],r.keyPath,n))}else{var d=Kl(a,e.values[o]),h=c.fire.call(l,d,n,a,t);if(h){var p=e.values[o];Object.keys(h).forEach((function(e){Rt(p,e)?p[e]=h[e]:wc(p,e,h[e])}))}}return l}));return n.mutate(e).then((function(t){for(var n=t.failures,r=t.results,u=t.numFailures,s=t.lastResult,c=0;c<o.length;++c){var l=r?r[c]:o[c],f=a[c];null==l?f.onerror&&f.onerror(n[c]):f.onsuccess&&f.onsuccess("put"===e.type&&i[c]?e.values[c]:l)}return{failures:n,results:r,numFailures:u,lastResult:s}})).catch((function(e){return a.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))},i=ul.trans,a=i.table(t).hook,u=a.deleting,s=a.creating,c=a.updating;switch(e.type){case"add":if(s.fire===tn)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"put":if(s.fire===tn&&c.fire===tn)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"delete":if(u.fire===tn)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"deleteRange":if(u.fire===tn)break;return i._promise("readwrite",(function(){return function(e){return l(e.trans,e.range,1e4)}(e)}),!0)}return n.mutate(e);function l(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:l(e,d(f({},t),{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},zl={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return d(f({},n),{getMany:function(e){if(!e.cache)return n.getMany(e);var t=Pr(e.keys,e.trans._cache,"clone"===e.cache);return t?fn.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?qt(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},Hl=function(e,t){if(!this){var n=new Hl;return e&&"d"in e&&Mt(n,e),n}Mt(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function ql(e,t,n){var r=Cl(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(jr(e))return Mt(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(Cl(n,e.from)<0)return o?ql(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Tr(e);if(Cl(t,e.to)>0)return i?ql(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Tr(e);Cl(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Cl(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&Dr(e,o),i&&a&&Dr(e,i)}}Nt(Hl.prototype,c({add:function(e){return Dr(this,e),this},addKey:function(e){return ql(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return ql(t,e,e)})),this}},Ac,(function(){return Cr(this)})));var Wl,Yl={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Hl(e.MIN_KEY,e.MAX_KEY);return d(f({},e),{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,s=a.outbound,c=d(f({},o),{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),s=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new Hl)},c=s(""),l=s(":dels"),f=e.type,d=h("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),p=d[0],y=d[1],v=e.trans._cache;return o.mutate(e).then((function(e){if(dc(p)){"delete"!==f&&(p=e.results),c.addKeys(p);var t=Pr(p,v);t||"add"===f||l.addKeys(p),(t||y)&&function(e,t,n,r){t.indexes.forEach((function(t){var o=function(e){return null!=e?t.extractKey(e):null},i=e(t.name||""),a=function(e){return t.multiEntry&&dc(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(n||r).forEach((function(e,t){var i=n&&o(n[t]),u=r&&o(r[t]);0!==Cl(i,u)&&(null!=i&&a(i),null!=u&&a(u))}))}))}(s,i,t,y)}else if(p){var r={from:p.lower,to:p.upper};l.add(r),c.add(r)}else c.add(n),l.add(n),i.indexes.forEach((function(e){return s(e.name).add(n)}));return e}))}}),l=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new Hl(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},p={get:function(e){return[a,new Hl(e.key)]},getMany:function(e){return[a,(new Hl).addKeys(e.keys)]},count:l,query:l,openCursor:l};return fc(p).forEach((function(e){c[e]=function(i){var a=ul.subscr;if(a){var c=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new Hl)},l=c(""),y=c(":dels"),v=h(p[e](i),2),m=v[0],g=v[1];if(c(m.name||"").add(g),!m.isPrimaryKey){if("count"!==e){var b="query"===e&&s&&i.values&&o.query(d(f({},i),{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(s&&i.values)return b.then((function(e){var n=e.result;return l.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?l.addKeys(n):y.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return y.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return y.addKey(e),e}},value:{get:function(){return o&&l.addKey(r.primaryKey),r.value}}})}return t}))}y.add(n)}}return o[e].apply(this,arguments)}})),c}})}},$l=function(){function e(t,n){var r=this;a(this,e),this._middlewares={},this.verno=0;var o=e.dependencies;this._options=n=f({addons:e.addons,autoOpen:!0,indexedDB:o.indexedDB,IDBKeyRange:o.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var i=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:tn,dbReadyPromise:null,cancelOpen:tn,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new fn((function(e){s.dbReadyResolve=e})),s.openCanceller=new fn((function(e,t){s.cancelOpen=t})),this._state=s,this.name=t,this.on=Bn(this,"populate","blocked","versionchange","close",{ready:[ln,tn]}),this.on.ready.subscribe=Ut(this.on.ready.subscribe,(function(t){return function(n,o){e.vip((function(){var e=r._state;if(e.openComplete)e.dbOpenError||fn.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var i=r;o||t((function e(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,Un(Tl.prototype,(function(e,t){this.db=u;var n=jl,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==nn?a:null}}))),this.Table=function(e){return Un(Dl.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Bn(null,{creating:[an,tn],reading:[rn,nn],updating:[sn,tn],deleting:[un,tn]})}))}(this),this.Transaction=function(e){return Un(Nl.prototype,(function(t,n,r,o,i){var a=this;this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Bn(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 fn((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),wl(e)}))}))}(this),this.Version=function(e){return Un(Bl.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Un(Ml.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};var o=e._deps.indexedDB;if(!o)throw new Uc.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(e,t){return o.cmp(t,e)},this._max=function(e,t){return o.cmp(e,t)>0?e:t},this._min=function(e,t){return o.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=Ll(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){r.on("blocked").fire(e),Ol.filter((function(e){return e.name===r.name&&e!==r&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Gl),this.use(Vl),this.use(Yl),this.use(zl),this.vip=Object.create(this,{_vip:{value:!0}}),i.forEach((function(e){return e(r)}))}return s(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new Uc.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Uc.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(yr),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||ul.letThrough||this._vip)?e():new fn((function(e,n){if(t._state.openComplete)return n(new Uc.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new Uc.DatabaseClosed);t.open().catch(tn)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=function(){if(n.openCanceller!==o)throw new Uc.DatabaseClosed("db.open() was cancelled")},n=e._state,r=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?wl(n.dbOpenError):e}));Cc&&(n.openCanceller._stackHolder=Mc()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,a=null,u=!1;return fn.race([o,("undefined"==typeof navigator?fn.resolve():Or()).then((function(){return new fn((function(o,i){if(t(),!r)throw new Uc.MissingAPI;var s=e.name,c=n.autoSchema?r.open(s):r.open(s,Math.round(10*e.verno));if(!c)throw new Uc.MissingAPI;c.onerror=or(i),c.onblocked=En(e._fireOnBlocked),c.onupgradeneeded=En((function(t){if(a=c.transaction,n.autoSchema&&!e._options.allowEmptyDB){c.onerror=ir,a.abort(),c.result.close();var o=r.deleteDatabase(s);o.onsuccess=o.onerror=En((function(){i(new Uc.NoSuchDatabase("Database ".concat(s," doesnt exist")))}))}else{a.onerror=or(i);var l=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;u=l<1,e._novip.idbdb=c.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=ul.transless||ul;On((function(){ul.trans=i,ul.transless=u,0===t?(fc(o).forEach((function(e){mr(n,e,o[e].primKey,o[e].indexes)})),dr(e,n),fn.follow((function(){return e.on.populate.fire(i)})).catch(a)):function(e,t,n,r){var o=e._novip,i=[],a=o._versions,u=o._dbSchema=br(0,o.idbdb,r),s=!1;return a.filter((function(e){return e._cfg.version>=t})).forEach((function(e){i.push((function(){var i=u,a=e._cfg.dbschema;wr(o,i,r),wr(o,a,r),u=o._dbSchema=a;var c=vr(i,a);c.add.forEach((function(e){mr(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new Uc.Upgrade("Not yet support for changing primary key");var t=r.objectStore(e.name);e.add.forEach((function(e){return gr(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),gr(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=e._cfg.contentUpgrade;if(l&&e._cfg.version>t){dr(o,r),n._memoizedTables={},s=!0;var f=zt(a);c.del.forEach((function(e){f[e]=i[e]})),pr(o,[o.Transaction.prototype]),hr(o,[o.Transaction.prototype],fc(f),f),n.schema=f;var d,h=Dc(l);h&&xn();var p=fn.follow((function(){if((d=l(n))&&h){var e=kn.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?fn.resolve(d):p.then((function(){return d}))}})),i.push((function(t){s&&kl||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(n){return null==e[n]&&t.db.deleteObjectStore(n)}))}(e._cfg.dbschema,t),pr(o,[o.Transaction.prototype]),hr(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function e(){return i.length?fn.resolve(i.shift()(n.idbtrans)).then(e):fn.resolve()}().then((function(){var e,t;t=r,fc(e=u).forEach((function(n){t.db.objectStoreNames.contains(n)||mr(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,l/10,a,i)}}),i),c.onsuccess=En((function(){a=null;var t,r=e._novip.idbdb=c.result,i=Bt(r.objectStoreNames);if(i.length>0)try{var l=r.transaction(1===(t=i).length?t[0]:t,"readonly");n.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=br(0,t,n);r._storeNames=Bt(t.objectStoreNames,0),hr(r,[r._allTables],fc(o),o)}(e,r,l):(wr(e,e._dbSchema,l),function(e,t){var n=vr(br(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((function(e){return e.add.length||e.change.length})))}(e,l)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),dr(e,l)}catch(e){}Ol.push(e),r.onversionchange=En((function(t){n.vcFired=!0,e.on("versionchange").fire(t)})),r.onclose=En((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!Sr(n)&&"__dbnames"!==t&&_r(n,r).put({name:t}).catch(tn)}(e._deps,s),o()}),i)}))}))]).then((function(){return t(),n.onReadyBeingFired=[],fn.resolve(Er((function(){return e.on.ready.fire(e.vip)}))).then((function t(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ln,tn);return n.onReadyBeingFired=[],fn.resolve(Er((function(){return r(e.vip)}))).then(t)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return e})).catch((function(t){n.dbOpenError=t;try{a&&a.abort()}catch(e){}return o===n.openCanceller&&e._close(),wl(t)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=Ol.indexOf(this);if(t>=0&&Ol.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new fn((function(t){e.dbReadyResolve=t})),e.openCanceller=new fn((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Uc.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new fn((function(r,o){var i=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=En((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!Sr(n)&&"__dbnames"!==t&&_r(n,r).delete(t).catch(tn)}(e._deps,e.name),r()})),t.onerror=or(o),t.onblocked=e._fireOnBlocked};if(t)throw new Uc.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return fc(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=kr.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=ul.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=l(e,r.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Uc.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new Uc.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new Uc.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):wl(e)}var s=Ul.bind(null,this,i,a,o,n);return o?o._promise(i,s,"lock"):ul.trans?Tn(ul.transless,(function(){return r._whenReady(s)})):this._whenReady(s)}},{key:"table",value:function(e){if(!Rt(this._allTables,e))throw new Uc.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),Jl="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Ql=function(){function e(t){a(this,e),this._subscribe=t}return s(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:Jl,value:function(){return this}}]),e}();try{Wl={indexedDB:lc.indexedDB||lc.mozIndexedDB||lc.webkitIndexedDB||lc.msIndexedDB,IDBKeyRange:lc.IDBKeyRange||lc.webkitIDBKeyRange}}catch(po){Wl={indexedDB:null,IDBKeyRange:null}}var Xl=$l;Nt(Xl,d(f({},Kc),{delete:function(e){return new Xl(e,{addons:[]}).delete()},exists:function(e){return new Xl(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return Sr(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):_r(t,n).toCollection().primaryKeys()}(Xl.dependencies).then(e)}catch(e){return wl(new Uc.MissingAPI)}},defineClass:function(){return function(e){Mt(this,e)}},ignoreTransaction:function(e){return ul.trans?Tn(ul.transless,e):e()},vip:Er,async:function(e){return function(){try{var t=xr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:fn.resolve(t)}catch(e){return wl(e)}}},spawn:function(e,t,n){try{var r=xr(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:fn.resolve(r)}catch(e){return wl(e)}},currentTransaction:{get:function(){return ul.trans||null}},waitFor:function(e,t){var n=fn.resolve("function"==typeof e?Xl.ignoreTransaction(e):e).timeout(t||6e4);return ul.trans?ul.trans.waitFor(n):n},Promise:fn,debug:{get:function(){return Cc},set:function(e){$t(e,"dexie"===e?function(){return!0}:Pl)}},derive:Ft,extend:Mt,props:Nt,override:Ut,Events:Bn,on:Rl,liveQuery:function(e){return new Ql((function(t){var n=function(){return fc(a).some((function(e){return i[e]&&function(e,t){var n=Cr(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=Cr(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(Cl(u.from,o.to)<=0&&Cl(u.to,o.from)>=0)return!0;Cl(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=Dc(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,Rl.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var s=!1,c=!1,l=function(e){Mr(i,e),n()&&f()},f=function(){if(!s&&!o){i={};var d={},h=function(t){r&&xn();var n=function(){return On(e,{subscr:t,trans:null})},o=ul.trans?Tn(ul.transless,n):n();return r&&o.then(kn,kn),o}(d);c||(Rl("storagemutated",l),c=!0),s=!0,Promise.resolve(h).then((function(e){s=!1,o||(n()?f():(i={},a=d,t.next&&t.next(e)))}),(function(e){s=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:Mr,getByKeyPath:bc,setByKeyPath:wc,delByKeyPath:function(e,t){"string"==typeof t?wc(e,t,void 0):"length"in t&&[].map.call(t,(function(t){wc(e,t,void 0)}))},shallowClone:zt,deepClone:qt,getObjectDiff:Kl,cmp:Cl,asap:Kt,minKey:-1/0,addons:[],connections:Ol,errnames:Fc,dependencies:Wl,semVer:"3.2.3",version:"3.2.3".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),Xl.maxKey=Ll(Xl.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Rl("storagemutated",(function(e){var t;Zl||(xl?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),Zl=!0,dispatchEvent(t),Zl=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;Zl||Rr(t)})));var Zl=!1;if("undefined"!=typeof BroadcastChannel){var ef=new BroadcastChannel("x-storagemutated-1");"function"==typeof ef.unref&&ef.unref(),Rl("storagemutated",(function(e){Zl||ef.postMessage(e)})),ef.onmessage=function(e){e.data&&Rr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Rl("storagemutated",(function(e){try{Zl||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&p(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Rr(t.changedParts)}}));var tf=self.document&&navigator.serviceWorker;tf&&tf.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Rr(t.changedParts)}))}function nf(e){return nf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},nf(e)}function rf(e,t){return rf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},rf(e,t)}fn.rejectionMapper=function(e,t){if(!e||l(e,Qt)||l(e,TypeError)||l(e,SyntaxError)||!e.name||!Gc[e.name])return e;var n=new Gc[e.name](t||e.message,e);return"stack"in e&&Lt(n,"stack",{get:function(){return this.inner.stack}}),n},$t(Cc,Pl);var of=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rf(e,t)}(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nf(e);if(t){var o=nf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":y(n))&&"function"!=typeof t?Nr(e):t;var n}(this,n)}}(n);function n(){var e;return function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")}(this,n),Lr(Nr(e=t.call(this,"EsmOffline")),"syncQueue",void 0),Lr(Nr(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}($l);(0,Jo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});try{self["workbox:window:6.5.4"]&&_()}catch(yo){}try{self["workbox:core:6.5.4"]&&_()}catch(yo){}var af=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},uf=function(e,t){this.type=e,Object.assign(this,t)},sf={type:"SKIP_WAITING"};!function(e){var t,n,r=function(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new af,r.en=new af,r.on=new af,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!Ur(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new uf(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new uf("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new uf("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return Gr(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new uf("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return Vr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),Gr(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&Ur(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new uf("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?Vr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return Gr(this.getSW(),(function(t){return Fr(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Fr(this.fn.waiting,sf)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&Ur(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(t,n){try{var r=Gr(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}((function(){return Gr(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,o)}(function(){var e=function(){this.Pn=new Map},t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Br(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),new of,(0,Jo.createGlobalStore)("offline-synchronization",{}),ro.default.createContext({moduleName:"",featureName:""}),na.openmrsFetch,Yr((0,Qo.getExtensionInternalStore)()),Yr((0,Qo.getExtensionStore)());var cf=D(701),lf=D.n(cf);ni.default.extend(lf());var ff=ro.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},df={dedupe:!0};ai.defineProperty(Hi,"defaultValue",{value:Ki});var hf=Qi((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,s=n.revalidateOnMount,c=n.revalidateIfStale,l=n.refreshInterval,d=n.refreshWhenHidden,y=n.refreshWhenOffline,v=n.keepPreviousData,g=h(hi.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=h(Ti(e),2),O=E[0],x=E[1],k=(0,ro.useRef)(!1),A=(0,ro.useRef)(!1),P=(0,ro.useRef)(O),j=(0,ro.useRef)(t),D=(0,ro.useRef)(n),C=function(){return D.current},T=function(){return C().isVisible()&&C().isOnline()},I=h(bi(r,O),4),M=I[0],R=I[1],N=I[2],L=I[3],F=(0,ro.useRef)({}).current,B=ui(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!ui(e[r]))return!1;if(!o($,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,ro.useMemo)((function(){var e=!!O&&!!t&&(ui(s)?!C().isPaused()&&!a&&(!!ui(c)||c):s),n=function(t){var n=ci(t);return delete n._k,e?f({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),K=(0,ri.useSyncExternalStore)((0,ro.useCallback)((function(e){return N(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),V=!k.current,z=b[O]&&b[O].length>0,H=K.data,q=ui(H)?B:H,W=K.error,Y=(0,ro.useRef)(q),$=v?ui(H)?Y.current:H:q,J=!(z&&!ui(W))&&(V&&!ui(s)?s:!C().isPaused()&&(a?!ui(q)&&c:ui(q)||c)),Q=!!(O&&t&&V&&J),X=ui(K.isValidating)?Q:K.isValidating,Z=ui(K.isLoading)?Q:K.isLoading,ee=(0,ro.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,l,f,d,p,y,v,g,S,E,D;return m(this,(function(m){switch(m.label){case 0:if(t=j.current,!O||!t||A.current||C().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return ki?!A.current&&O===P.current&&k.current:O===P.current},l={isValidating:!1,isLoading:!1},f=function(){R(l)},d=function(){var e=_[O];e&&e[1]===i&&delete _[O]},p={isValidating:!0},ui(M().data)&&(p.isLoading=!0),m.label=1;case 1:return m.trys.push([1,3,,4]),s&&(R(p),n.loadingTimeout&&ui(M().data)&&setTimeout((function(){a&&c()&&C().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),Mi()]),y=h(_[O],2),r=y[0],i=y[1],[4,r];case 2:return r=m.sent(),s&&setTimeout(d,n.dedupingInterval),_[O]&&_[O][1]===i?(l.error=ii,v=w[O],!ui(v)&&(i<=v[0]||i<=v[1]||0===v[1])?[2,(f(),s&&c()&&C().onDiscarded(O),!1)]:(g=M().data,l.data=o(g,r)?g:r,s&&c()&&C().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&C().onDiscarded(O),!1)];case 3:return S=m.sent(),d(),E=C(),D=E.shouldRetryOnError,E.isPaused()||(l.error=S,s&&c()&&(E.onError(S,O,E),(!0===D||si(D)&&D(S))&&(C().revalidateOnFocus&&C().revalidateOnReconnect&&!T()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,f(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,ro.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ri.apply(void 0,[r,P.current].concat(p(t)))}),[]);if(ji((function(){j.current=t,D.current=n,ui(H)||(Y.current=H)})),ji((function(){if(O){var e=ee.bind(ii,df),t=0,n=Xi(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();C().revalidateOnFocus&&o>t&&T()&&(t=o+C().focusThrottleInterval,e())}else if(1==n)C().revalidateOnReconnect&&T()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return A.current=!1,P.current=O,k.current=!0,R({_k:x}),J&&(ui(q)||Ai?e():Pi(e)),function(){A.current=!0,n()}}}),[O]),ji((function(){var e,t=function(){var t=si(l)?l(M().data):l;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!d&&!C().isVisible()||!y&&!C().isOnline()?t():ee(df).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[l,d,y,O]),(0,ro.useDebugValue)($),a&&ui(q)&&O){if(!ki&&Ai)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,D.current=n,A.current=!1;var ne=S[O];if(!ui(ne)){var re=te(ne);ff(re)}if(!ui(W))throw W;var oe=ee(df);ui($)||(oe.status="fulfilled",oe.value=!0),ff(oe)}return{mutate:te,get data(){return F.data=!0,$},get error(){return F.error=!0,W},get isValidating(){return F.isValidating=!0,X},get isLoading(){return F.isLoading=!0,Z}}}));Zi(hf,(function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}}));var pf=ro.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},yf={dedupe:!0};ai.defineProperty(Hi,"defaultValue",{value:Ki});var vf=Qi((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,s=n.revalidateOnMount,c=n.revalidateIfStale,l=n.refreshInterval,d=n.refreshWhenHidden,y=n.refreshWhenOffline,v=n.keepPreviousData,g=h(hi.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=h(Ti(e),2),O=E[0],x=E[1],k=(0,ro.useRef)(!1),A=(0,ro.useRef)(!1),P=(0,ro.useRef)(O),j=(0,ro.useRef)(t),D=(0,ro.useRef)(n),C=function(){return D.current},T=function(){return C().isVisible()&&C().isOnline()},I=h(bi(r,O),4),M=I[0],R=I[1],N=I[2],L=I[3],F=(0,ro.useRef)({}).current,B=ui(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!ui(e[r]))return!1;if(!o($,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,ro.useMemo)((function(){var e=!!O&&!!t&&(ui(s)?!C().isPaused()&&!a&&(!!ui(c)||c):s),n=function(t){var n=ci(t);return delete n._k,e?f({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),K=(0,ri.useSyncExternalStore)((0,ro.useCallback)((function(e){return N(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),V=!k.current,z=b[O]&&b[O].length>0,H=K.data,q=ui(H)?B:H,W=K.error,Y=(0,ro.useRef)(q),$=v?ui(H)?Y.current:H:q,J=!(z&&!ui(W))&&(V&&!ui(s)?s:!C().isPaused()&&(a?!ui(q)&&c:ui(q)||c)),Q=!!(O&&t&&V&&J),X=ui(K.isValidating)?Q:K.isValidating,Z=ui(K.isLoading)?Q:K.isLoading,ee=(0,ro.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,l,f,d,p,y,v,g,S,E,D;return m(this,(function(m){switch(m.label){case 0:if(t=j.current,!O||!t||A.current||C().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return ki?!A.current&&O===P.current&&k.current:O===P.current},l={isValidating:!1,isLoading:!1},f=function(){R(l)},d=function(){var e=_[O];e&&e[1]===i&&delete _[O]},p={isValidating:!0},ui(M().data)&&(p.isLoading=!0),m.label=1;case 1:return m.trys.push([1,3,,4]),s&&(R(p),n.loadingTimeout&&ui(M().data)&&setTimeout((function(){a&&c()&&C().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),Mi()]),y=h(_[O],2),r=y[0],i=y[1],[4,r];case 2:return r=m.sent(),s&&setTimeout(d,n.dedupingInterval),_[O]&&_[O][1]===i?(l.error=ii,v=w[O],!ui(v)&&(i<=v[0]||i<=v[1]||0===v[1])?[2,(f(),s&&c()&&C().onDiscarded(O),!1)]:(g=M().data,l.data=o(g,r)?g:r,s&&c()&&C().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&C().onDiscarded(O),!1)];case 3:return S=m.sent(),d(),E=C(),D=E.shouldRetryOnError,E.isPaused()||(l.error=S,s&&c()&&(E.onError(S,O,E),(!0===D||si(D)&&D(S))&&(C().revalidateOnFocus&&C().revalidateOnReconnect&&!T()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,f(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,ro.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ri.apply(void 0,[r,P.current].concat(p(t)))}),[]);if(ji((function(){j.current=t,D.current=n,ui(H)||(Y.current=H)})),ji((function(){if(O){var e=ee.bind(ii,yf),t=0,n=Xi(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();C().revalidateOnFocus&&o>t&&T()&&(t=o+C().focusThrottleInterval,e())}else if(1==n)C().revalidateOnReconnect&&T()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return A.current=!1,P.current=O,k.current=!0,R({_k:x}),J&&(ui(q)||Ai?e():Pi(e)),function(){A.current=!0,n()}}}),[O]),ji((function(){var e,t=function(){var t=si(l)?l(M().data):l;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!d&&!C().isVisible()||!y&&!C().isOnline()?t():ee(yf).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[l,d,y,O]),(0,ro.useDebugValue)($),a&&ui(q)&&O){if(!ki&&Ai)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,D.current=n,A.current=!1;var ne=S[O];if(!ui(ne)){var re=te(ne);pf(re)}if(!ui(W))throw W;var oe=ee(yf);ui($)||(oe.status="fulfilled",oe.value=!0),pf(oe)}return{mutate:te,get data(){return F.data=!0,$},get error(){return F.error=!0,W},get isValidating(){return F.isValidating=!0,X},get isLoading(){return F.isLoading=!0,Z}}})),mf=Promise.resolve();Zi(vf,(function(e){return function(t,n,r){var o,a=(0,ro.useRef)(!1),u=r.cache,s=r.initialSize,c=void 0===s?1:s,l=r.revalidateAll,p=void 0!==l&&l,y=r.persistSize,v=void 0!==y&&y,b=r.revalidateFirstPage,w=void 0===b||b,_=r.revalidateOnMount,S=void 0!==_&&_,E=r.parallel,O=void 0!==E&&E,x=h(hi.get(Ui),4)[3];try{o=function(e){return Ti(e?e(0,null):null)[0]}(t),o&&(o=qi+o)}catch(e){}var k=h(bi(u,o),3),A=k[0],P=k[1],j=k[2],D=(0,ro.useCallback)((function(){return ui(A()._l)?c:A()._l}),[u,o,c]);(0,ri.useSyncExternalStore)((0,ro.useCallback)((function(e){return o?j(o,(function(){e()})):function(){}}),[u,o]),D,D);var C=(0,ro.useCallback)((function(){var e=A()._l;return ui(e)?c:e}),[o,c]),T=(0,ro.useRef)(C());ji((function(){a.current?o&&P({_l:v?T.current:C()}):a.current=!0}),[o,u]);var I=S&&!a.current,M=e(o,function(){var e=i((function(e){var o,a,s,c,l,f,d,y,v,b,_;return m(this,(function(S){switch(S.label){case 0:o=function(e){var o,l,f,d,g,_,S,E,k;return m(this,(function(A){switch(A.label){case 0:return o=h(Ti(t(e,O?null:b)),2),l=o[0],f=o[1],l?(d=h(bi(u,l),2),g=d[0],_=d[1],S=g().data,E=p||a||ui(S)||w&&!e&&!ui(y)||I||y&&!ui(y[e])&&!r.compare(y[e],S),n&&("function"==typeof s?s(S,f):E)?(k=function(){var t=i((function(){var t;return m(this,(function(r){switch(r.label){case 0:return l in x?(t=x[l],delete x[l],[4,t]):[3,2];case 1:return S=r.sent(),[3,4];case 2:return[4,n(f)];case 3:S=r.sent(),r.label=4;case 4:return _({data:S,_k:f}),c[e]=S,[2]}}))}));return function(){return t.apply(this,arguments)}}(),O?(v.push(k),[3,3]):[3,1]):[3,4]):[2,"break"];case 1:return[4,k()];case 2:A.sent(),A.label=3;case 3:return[3,5];case 4:c[e]=S,A.label=5;case 5:return O||(b=S),[2]}}))},a=A()._i,s=A()._r,P({_r:ii}),c=[],l=C(),f=h(bi(u,e),1),d=f[0],y=d().data,v=[],b=null,_=0,S.label=1;case 1:return _<l?[5,g(o(_))]:[3,4];case 2:if("break"===S.sent())return[3,4];S.label=3;case 3:return++_,[3,1];case 4:return O?[4,Promise.all(v.map((function(e){return e()})))]:[3,6];case 5:S.sent(),S.label=6;case 6:return[2,(P({_i:ii}),c)]}}))}));return function(t){return e.apply(this,arguments)}}(),r),R=(0,ro.useCallback)((function(e,t){var n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return o?(r&&(ui(e)?P({_i:!0,_r:n.revalidate}):P({_i:!1,_r:n.revalidate})),arguments.length?M.mutate(e,d(f({},n),{revalidate:r})):M.mutate()):mf}),[o,u]),N=(0,ro.useCallback)((function(e){if(!o)return mf;var n,r=h(bi(u,o),2)[1];if(si(e)?n=e(C()):"number"==typeof e&&(n=e),"number"!=typeof n)return mf;r({_l:n}),T.current=n;for(var i=[],a=h(bi(u,o),1)[0],s=null,c=0;c<n;++c){var l=h(Ti(t(c,s)),1)[0],f=h(bi(u,l),1)[0],d=l?f().data:ii;if(ui(d))return R(a().data);i.push(d),s=d}return R(i)}),[o,u,R,C]);return{size:C(),setSize:N,mutate:R,get data(){return M.data},get error(){return M.error},get isValidating(){return M.isValidating},get isLoading(){return M.isLoading}}}}));var gf={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=gf)}),1e3),bf=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$r(e,t,n[t])}))}return e}({},{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"}),wf=null!=(wf={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",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",unknown:"Unknown"})?wf:{},Object.getOwnPropertyDescriptors?Object.defineProperties(bf,Object.getOwnPropertyDescriptors(wf)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(wf)).forEach((function(e){Object.defineProperty(bf,e,Object.getOwnPropertyDescriptor(wf,e))}));var bf,wf,_f,Sf=D(64);(Sf.default.default||Sf.default).on("initialized",(function(){window.i18next.loadNamespaces(["core"])})),(0,Jr.defineConfigSchema)("@openmrs/esm-styleguide",no),_f=function(e,t){document.documentElement.style.setProperty(e,t)},(0,Jr.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(_f("--brand-01",e.config["Brand color #1"]),_f("--brand-02",e.config["Brand color #2"]),_f("--brand-03",e.config["Brand color #3"]))})),r("omrs-logo-full-color",Qr),r("omrs-logo-full-mono",Qr),r("omrs-logo-full-grey",Qr),r("omrs-logo-partial-color",Xr),r("omrs-logo-partial-mono",Xr),r("omrs-logo-partial-grey",Xr),r("omrs-logo-icon-color",Zr),r("omrs-logo-icon-mono",Zr),r("omrs-logo-icon-grey",Zr),r("omrs-logo-white",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 119"><path fill="var(--logo-white)" fill-rule="evenodd" d="M40.29 40.328a27.76 27.76 0 0 1 19.688-8.154c7.669 0 14.613 3.102 19.647 8.116l.02-18.54A42.84 42.84 0 0 0 59.978 17c-7.089 0-13.813 1.93-19.709 4.968zM79.645 79.671a27.74 27.74 0 0 1-19.684 8.154c-7.67 0-14.614-3.101-19.651-8.116l-.02 18.54A42.86 42.86 0 0 0 59.96 103a42.8 42.8 0 0 0 19.672-4.751z" clip-rule="evenodd"/><path fill="var(--logo-grey)" fill-rule="evenodd" d="M40.328 79.696c-5.038-5.037-8.154-11.995-8.154-19.685 0-7.669 3.102-14.612 8.116-19.65l-18.54-.02A42.85 42.85 0 0 0 17 60.012a42.8 42.8 0 0 0 4.752 19.672zM79.634 40.289a27.75 27.75 0 0 1 8.154 19.688 27.74 27.74 0 0 1-8.117 19.646l18.542.02a42.84 42.84 0 0 0 4.749-19.666c0-7.09-1.714-13.779-4.751-19.675z" clip-rule="evenodd"/><path fill="var(--logo-white)" fill-rule="evenodd" d="M156.184 60.003c0-8.749-6.118-15.777-15.025-15.777-8.909 0-15.025 7.028-15.025 15.776s6.116 15.78 15.025 15.78c8.907 0 15.025-7.031 15.025-15.78m-34.881 0c0-11.483 8.318-19.96 19.856-19.96 11.536 0 19.855 8.478 19.855 19.96 0 11.484-8.319 19.964-19.855 19.964-11.538 0-19.856-8.48-19.856-19.964M179.514 75.54c5.507 0 9.05-4.14 9.05-9.482s-3.543-9.483-9.05-9.483c-5.505 0-9.046 4.142-9.046 9.483s3.541 9.482 9.046 9.482M166.22 53.306h4.248v3.704h.11c2.344-2.725 5.449-4.36 9.154-4.36 8.014 0 13.408 5.67 13.408 13.408 0 7.63-5.613 13.406-12.752 13.406-4.58 0-8.231-2.29-9.81-5.178h-.11V90.87h-4.248zM217.773 63.768c-.163-4.305-3-7.193-7.686-7.193-4.685 0-7.79 2.888-8.335 7.193zm3.653 10.412c-3.001 3.868-6.596 5.284-11.339 5.284-8.01 0-12.914-5.993-12.914-13.406 0-7.901 5.559-13.407 13.08-13.407 7.196 0 12.096 4.906 12.096 13.354v1.362h-20.597c.325 4.413 3.704 8.173 8.335 8.173 3.65 0 6.105-1.307 8.12-3.868zM227.854 59.357c0-2.347-.216-4.361-.216-6.05h4.031c0 1.362.11 2.776.11 4.194h.11c1.144-2.505 4.306-4.85 8.5-4.85 6.705 0 9.699 4.252 9.699 10.41v15.748h-4.248v-15.31c0-4.253-1.856-6.924-5.833-6.924-5.503 0-7.903 3.979-7.903 9.811V78.81h-4.25zM259.211 41.009h6.708L278.8 70.79h.107l12.982-29.782h6.549v37.99h-4.506V47.124h-.106L280.192 79h-2.738l-13.629-31.875h-.107V79h-4.507zM312.392 57.752h4.023c4.992 0 11.487 0 11.487-6.282 0-5.47-4.776-6.276-9.177-6.276h-6.333zm-4.506-16.744h9.711c7.352 0 15.132 1.072 15.132 10.462 0 5.527-3.594 9.125-9.495 10.037L334.018 79h-5.525l-10.304-17.063h-5.797V79h-4.506zM358.123 47.713c-1.506-2.414-4.187-3.487-6.926-3.487-3.973 0-8.1 1.88-8.1 6.385 0 3.49 1.931 5.047 7.994 6.98 5.903 1.878 11.377 3.809 11.377 11.267 0 7.567-6.495 11.11-13.36 11.11-4.402 0-9.125-1.45-11.7-5.262l3.862-3.165c1.61 2.794 4.83 4.24 8.105 4.24 3.862 0 8.263-2.253 8.263-6.601 0-4.669-3.165-5.474-9.928-7.728-5.366-1.771-9.442-4.134-9.442-10.463 0-7.298 6.277-10.945 12.929-10.945 4.241 0 7.836 1.178 10.625 4.45z" clip-rule="evenodd"/></svg>'),r("omrs-icon-activity",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M6 14.5a.5.5 0 0 1-.46-.31L3.165 8.5H1v-1h2.5a.5.5 0 0 1 .46.31L6 12.64l4.03-10.815a.5.5 0 0 1 .47-.325.5.5 0 0 1 .465.34L12.86 7.5H15v1h-2.5a.5.5 0 0 1-.475-.34L10.5 3.5 6.47 14.175A.5.5 0 0 1 6 14.5"/></svg>'),r("omrs-icon-add",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8.5 7.5V4h-1v3.5H4v1h3.5V12h1V8.5H12v-1z"/></svg>'),r("omrs-icon-arrow-down",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M12.295 8.295 8.5 12.085V2h-1v10.085l-3.795-3.79L3 9l5 5 5-5z"/></svg>'),r("omrs-icon-arrow-left",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m7 13 .705-.705L3.915 8.5H14v-1H3.915l3.79-3.795L7 3 2 8z"/></svg>'),r("omrs-icon-arrow-right",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m9 3-.715.696 3.79 3.804H2v1h10.075l-3.79 3.787L9 13l5-5z"/></svg>'),r("omrs-icon-arrow-up",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 2 3 7l.705.705L7.5 3.915V14h1V3.915l3.795 3.79L13 7z"/></svg>'),r("omrs-icon-baby",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 5.667A1.833 1.833 0 1 0 8 2a1.833 1.833 0 0 0 0 3.667m1.667 1.845a19 19 0 0 0 1.826-.369.667.667 0 1 0-.32-1.294c-1.27.314-2.229.455-3.17.452-.945-.004-1.905-.153-3.184-.454a.667.667 0 1 0-.305 1.298c.658.155 1.253.275 1.82.358v.83h3.333zM8.893 10.66c.584-.26.774-.802.774-1.013V9H6.333v.647c0 .21.19.753.774 1.013.067.03.142.067.21.1l.039.02a4 4 0 0 0 .244.114q.253.107.4.106.147.001.4-.106a5 5 0 0 0 .244-.114l.04-.02m.21-.1c-.068.03-.143.067-.21.1zM6.812 11.286a1.8 1.8 0 0 1-.818-.72c-.518.45-.802 1.017-.802 1.764 0 .298.063.745.229 1.107.17.371.397.563.685.563.31 0 .57-.236.57-.54 0-.136-.057-.264-.147-.454l-.006-.013c-.082-.172-.19-.399-.19-.663 0-.29.142-.596.31-.844q.08-.119.169-.2m2.376-.001a1.8 1.8 0 0 0 .818-.719c.518.45.802 1.017.802 1.764 0 .298-.063.745-.229 1.107-.17.371-.397.563-.685.563-.31 0-.57-.236-.57-.54 0-.136.057-.264.147-.454l.006-.013c.082-.172.19-.399.19-.663 0-.29-.142-.596-.31-.844a1.2 1.2 0 0 0-.169-.2z"/></svg>'),r("omrs-icon-calendar-heat-map",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 2h-2V1h-1v1H6V1H5v1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1M3 3h2v1h1V3h4v1h1V3h2v2H3zm0 3h2.5v3H3zm6.5 7h-3v-3h3zm0-4h-3V6h3zm1 4v-3H13v3z"/></svg>'),r("omrs-icon-calendar",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 2h-2V1h-1v1H6V1H5v1H3c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1m0 11H3V6h10zm0-8H3V3h2v1h1V3h4v1h1V3h2z"/></svg>'),r("omrs-icon-caret-down",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m12 6-4 5-4-5z"/></svg>'),r("omrs-icon-caret-left",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10 12 5 8l5-4z"/></svg>'),r("omrs-icon-caret-right",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m6 4 5 4-5 4z"/></svg>'),r("omrs-icon-caret-up",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m4 10 4-5 4 5z"/></svg>'),r("omrs-icon-chart-average",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11.5 12c-1.8 0-2.515-2.088-3.206-4.107C7.638 5.979 6.96 4 5.5 4a1.72 1.72 0 0 0-1.527 1.16l-.947-.318C3.05 4.767 3.66 3 5.5 3c2.175 0 3.006 2.427 3.74 4.569C9.844 9.333 10.415 11 11.5 11a1.72 1.72 0 0 0 1.527-1.16l.947.318C13.95 10.233 13.34 12 11.5 12"/><path d="M2 14V8.5h1v-1H2V1H1v13a1 1 0 0 0 1 1h13v-1z"/><path d="M5 7.5H4v1h1zM7 7.5H6v1h1zM11 7.5h-1v1h1zM13 7.5h-1v1h1zM15 7.5h-1v1h1z"/></svg>'),r("omrs-icon-checkmark-filled",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1m-1 9.795-2.5-2.5.795-.795L7 9.205 10.705 5.5l.798.793z"/></svg>'),r("omrs-icon-checkmark-outline",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m7 10.707-2.5-2.5.707-.707L7 9.293 10.793 5.5l.707.707z"/><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1m0 13A6 6 0 1 1 8 2a6 6 0 0 1 0 12"/></svg>'),r("omrs-icon-chemistry",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13.616 11.81 10 6.836V2h1V1H5v1h1v4.837L2.384 11.81A2.009 2.009 0 0 0 4.01 15h7.982a2.01 2.01 0 0 0 1.625-3.19M7 7.162V2h2v5.163L10.336 9H5.664zM11.99 14H4.01a1.01 1.01 0 0 1-.817-1.603L4.936 10h6.128l1.743 2.397A1.011 1.011 0 0 1 11.991 14"/></svg>'),r("omrs-icon-chevron-down",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 11 3 6l.7-.7L8 9.6l4.3-4.3.7.7z"/></svg>'),r("omrs-icon-chevron-left",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m5 8 5-5 .7.7L6.4 8l4.3 4.3-.7.7z"/></svg>'),r("omrs-icon-chevron-right",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m11 8-5 5-.7-.7L9.6 8 5.3 3.7 6 3z"/></svg>'),r("omrs-icon-chevron-up",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m8 5 5 5-.7.7L8 6.4l-4.3 4.3L3 10z"/></svg>'),r("omrs-icon-close",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z"/></svg>'),r("omrs-icon-close-filled",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7m2.7 10.5L8 8.8l-2.7 2.7-.8-.8L7.2 8 4.5 5.3l.8-.8L8 7.2l2.7-2.7.8.8L8.8 8l2.7 2.7z"/></svg>'),r("omrs-icon-close-outline",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7m0 13c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6"/><path d="M10.7 11.5 8 8.8l-2.7 2.7-.8-.8L7.2 8 4.5 5.3l.8-.8L8 7.2l2.7-2.7.8.8L8.8 8l2.7 2.7z"/></svg>'),r("omrs-icon-document",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m12.85 4.65-3.5-3.5C9.25 1.05 9.15 1 9 1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h8c.55 0 1-.45 1-1V5c0-.15-.05-.25-.15-.35M9 2.2 11.8 5H9zM12 14H4V2h4v3c0 .55.45 1 1 1h3z"/><path d="M11 11H5v1h6zM11 8H5v1h6z"/></svg>'),r("omrs-icon-document-attachment",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 15H5.5a1 1 0 0 1-1-1v-3h1v3H13V3H8.5V2H13a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1"/><path d="M12 5H8.5v1H12zM12 7.5H8v1h4zM12 10H7.5v1H12zM4.5 9.5A2.503 2.503 0 0 1 2 7V1.5h1V7a1.5 1.5 0 0 0 3 0V2.5a.5.5 0 1 0-1 0v5H4v-5a1.5 1.5 0 0 1 3 0V7a2.503 2.503 0 0 1-2.5 2.5"/></svg>'),r("omrs-icon-download",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 12v2H3v-2H2v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2zM13 7l-.705-.705-3.795 3.79V1h-1v9.085l-3.795-3.79L3 7l5 5z"/></svg>'),r("omrs-icon-edit",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15 13H1v1h14zM12.7 4.5c.4-.4.4-1 0-1.4l-1.8-1.8c-.4-.4-1-.4-1.4 0L2 8.8V12h3.2zM10.2 2 12 3.8l-1.5 1.5-1.8-1.8zM3 11V9.2l5-5L9.8 6l-5 5z"/></svg>'),r("omrs-icon-event-schedule",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10.5 15a4 4 0 1 1 0-8 4 4 0 0 1 0 8m0-7a3 3 0 1 0 0 6 3 3 0 0 0 0-6"/><path d="M11.295 12.5 10 11.205V9h1v1.795l1 1z"/><path d="M14 3a1 1 0 0 0-1-1h-2V1h-1v1H6V1H5v1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h2v-1H3V3h2v1h1V3h4v1h1V3h2v3h1z"/></svg>'),r("omrs-icon-events",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 7h-1v1h1a1.5 1.5 0 0 1 1.5 1.5v2h1v-2A2.503 2.503 0 0 0 13 7M12 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M11.5 15h-1v-1A1.5 1.5 0 0 0 9 12.5H7A1.5 1.5 0 0 0 5.5 14v1h-1v-1A2.503 2.503 0 0 1 7 11.5h2a2.503 2.503 0 0 1 2.5 2.5zM8 6.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4 7H3A2.503 2.503 0 0 0 .5 9.5v2h1v-2A1.5 1.5 0 0 1 3 8h1zM4 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"/></svg>'),r("omrs-icon-gender-female",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M8.5 9.965a4 4 0 1 0-1 0V11H5v1h2.5v2h1v-2H11v-1H8.5zM5 6a3 3 0 1 1 6 0 3 3 0 0 1-6 0"/></svg>'),r("omrs-icon-gender-male",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M9 2v1h3.293L8.449 6.844a4.014 4.014 0 1 0 .707.707L13 3.707V7h1V2zM6 13a3 3 0 1 1 0-6 3 3 0 0 1 0 6"/></svg>'),r("omrs-icon-gender-other",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M11 1v1h2.293l-3.2 3.2a3.47 3.47 0 0 0-4.185 0l-.7-.7L6.5 3.207 5.793 2.5 4.5 3.793 2.707 2H5V1H1v4h1V2.707L3.793 4.5 2.5 5.793l.707.707L4.5 5.207l.7.7a3.49 3.49 0 0 0 2.3 5.553v1.04h-2v1h2V15h1v-1.5h2v-1h-2v-1.04a3.49 3.49 0 0 0 2.3-5.552L14 2.707V5h1V1zm-3 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5"/></svg>'),r("omrs-icon-gender-unknown",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M8 12a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M8.5 9.5h-1v-2h1a1 1 0 0 0 0-2h-1a1 1 0 0 0-1 1v.25h-1V6.5a2 2 0 0 1 2-2h1a2 2 0 1 1 0 4z"/><path d="M8 15a1.04 1.04 0 0 1-.737-.305L1.305 8.737a1.043 1.043 0 0 1 0-1.474l5.958-5.958a1.043 1.043 0 0 1 1.474 0l5.958 5.958a1.043 1.043 0 0 1 0 1.474l-5.958 5.958A1.04 1.04 0 0 1 8 15M8 2a.04.04 0 0 0-.03.012L2.012 7.97a.04.04 0 0 0 0 .06l5.958 5.958a.04.04 0 0 0 .06 0l5.958-5.958a.04.04 0 0 0 0-.06L8.03 2.012A.04.04 0 0 0 8 2"/></svg>'),r("omrs-icon-generic-order-type",'<svg xmlns="http://www.w3.org/2000/svg" id="icon" viewBox="0 0 32 32"><defs><style>.cls-2{stroke-width:0}</style></defs><path d="M28.59 20.59 22 27.18l-2.59-2.59L18 26l4 4 8-8zM10 20h6v2h-6zM10 16h8v2h-8z" class="cls-2"/><path d="M8 4h8v6c0 1.1.9 2 2 2h6v6h2v-8c0-.3-.1-.5-.3-.7l-7-7c-.2-.2-.4-.3-.7-.3H8c-1.1 0-2 .9-2 2v24c0 1.1.9 2 2 2h7v-2H8zm10 .4 5.6 5.6H18z" class="cls-2"/><rect id="_Transparent_Rectangle_" data-name="&amp;lt;Transparent Rectangle&amp;gt;" style="fill:none;stroke-width:0"/></svg>'),r("omrs-icon-group",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15.5 15h-1v-1.5A1.5 1.5 0 0 0 13 12h-2a1.5 1.5 0 0 0-1.5 1.5V15h-1v-1.5A2.5 2.5 0 0 1 11 11h2a2.5 2.5 0 0 1 2.5 2.5zM12 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M7.5 11h-1V9.5A1.5 1.5 0 0 0 5 8H3a1.5 1.5 0 0 0-1.5 1.5V11h-1V9.5A2.5 2.5 0 0 1 3 7h2a2.5 2.5 0 0 1 2.5 2.5zM4 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"/></svg>'),r("omrs-icon-group-access",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M4 9.5H3v-1A1.5 1.5 0 0 1 4.5 7H7v1H4.5a.5.5 0 0 0-.5.5zM6 6.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2M10 10a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2M13 13h-1v-1a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v1H7v-1a1.5 1.5 0 0 1 1.5-1.5h3A1.5 1.5 0 0 1 13 12z"/><path d="M4 15H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h2v1H2v12h2zM14 15h-2v-1h2V2h-2V1h2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1"/></svg>'),r("omrs-icon-hospital-bed",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M12.5 8h-4a1 1 0 0 0-1 1v3H2V7H1v8h1v-2h12v2h1v-4.5A2.503 2.503 0 0 0 12.5 8m1.5 4H8.5V9h4a1.5 1.5 0 0 1 1.5 1.5z"/><path d="M4.75 8.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m0-1a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5M10.5 3h-2V1h-1v2h-2v1h2v2h1V4h2z"/></svg>'),r("omrs-icon-image-medical",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 3v10H3V3zm0-1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1"/><path d="M11 8V7H8.5V6H10V5H8.5V4h-1v1H6v1h1.5v1H5v1h2.5v1H5v1h2.5v1H6v1h4v-1H8.5v-1H11V9H8.5V8z"/></svg>'),r("omrs-icon-information",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8.5 11V7h-2v1h1v3H6v1h4v-1zM8 4a.75.75 0 1 0 0 1.5A.75.75 0 0 0 8 4"/><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2"/></svg>'),r("omrs-icon-information-filled",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1m0 3a.75.75 0 1 1 0 1.5A.75.75 0 0 1 8 4m2 8.063H6v-1.126h1.438V8.063H6.5V6.937h2.063v4H10z"/></svg>'),r("omrs-icon-information-square",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8.5 11V7h-2v1h1v3H6v1h4v-1zM8 4a.75.75 0 1 0 0 1.5A.75.75 0 0 0 8 4"/><path d="M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1M3 3v10h10V3z"/></svg>'),r("omrs-icon-inventory-management",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11.5 12h-2v2h2zM15 12h-2v2h2zM11.5 8.5h-2v2h2zM15 8.5h-2v2h2z"/><path d="M8.5 12H2V5h12v2.5h1V5a1 1 0 0 0-1-1h-3V2a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h6.5zM6 2h4v2H6z"/></svg>'),r("omrs-icon-lab-order",'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#E8DAFF" d="M24 0H0v24h24z"/><path fill="#6929C4" d="M17.616 15.81 14 10.836V6h1V5H9v1h1v4.837L6.384 15.81A2.01 2.01 0 0 0 8.01 19h7.982a2.01 2.01 0 0 0 1.625-3.19M11 11.162V6h2v5.163L14.336 13H9.664zM15.99 18H8.01a1.01 1.01 0 0 1-.817-1.603L8.936 14h6.128l1.743 2.397A1.01 1.01 0 0 1 15.991 18"/></svg>'),r("omrs-icon-list-checked",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15 4H8v1h7zM3 5.295 1.705 4 1 4.705l2 2 4-4L6.295 2zM15 11H8v1h7zM3 12.295 1.705 11 1 11.705l2 2 4-4L6.295 9z"/></svg>'),r("omrs-icon-location",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 9a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5m0-4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3"/><path d="m8 15-4.218-4.974-.174-.226A5.44 5.44 0 0 1 2.5 6.5a5.5 5.5 0 1 1 11 0 5.44 5.44 0 0 1-1.107 3.299h-.001s-.15.198-.172.225zM4.406 9.198s.117.154.144.187L8 13.454l3.455-4.075.14-.183A4.45 4.45 0 0 0 12.5 6.5a4.5 4.5 0 1 0-9 0 4.45 4.45 0 0 0 .906 2.698"/></svg>'),r("omrs-icon-maximize",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10 1v1h3.293L9 6.291 9.707 7 14 2.707V6h1V1zM7 9.708 6.296 9 2 13.293V10H1v5h5v-1H2.707z"/></svg>'),r("omrs-icon-medication",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M12 1H4a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v9a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V5a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1M5 7h1.5v5H5zm6 7H5v-1h2.5V6H5V5h6zM4 4V2h8v2z"/></svg>'),r("omrs-icon-message-queue",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M14 14H2a1 1 0 0 1-1-1v-2.5h1V13h12v-2.5h1V13a1 1 0 0 1-1 1"/><path d="M12.5 10.5h-9v1h9zM12.5 8h-9v1h9zM12.5 5.5h-9v1h9zM12.5 3h-9v1h9z"/></svg>'),r("omrs-icon-microscope",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M12.697 12a3.94 3.94 0 0 0-.835-4.284 1.96 1.96 0 0 0-.542-2.207l1.388-1.388a1 1 0 0 0 0-1.415l-1.415-1.414a1 1 0 0 0-1.414 0L3.293 7.88a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0L8.51 8.319a1.966 1.966 0 0 0 2.757.217A2.97 2.97 0 0 1 11.589 12H8v2H2v1h12v-3zm-7.283-2L4 8.586l.94-.94L6.353 9.06zM8 7q0 .19.038.376l-.977.977L5.646 6.94 10.586 2l1.415 1.414-1.625 1.625A1.99 1.99 0 0 0 8 7m2 1a1 1 0 1 1 0-2 1 1 0 0 1 0 2m3 6H9v-1h4z"/></svg>'),r("omrs-icon-money",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15 11H1v1h14zM15 13H1v1h14zM12 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2M4 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2"/><path d="M14 10H2a1.003 1.003 0 0 1-1-1V3a1.003 1.003 0 0 1 1-1h12a1.003 1.003 0 0 1 1 1v6a1 1 0 0 1-1 1m0-7H2v6h12z"/></svg>'),r("omrs-icon-mother",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11.022 7.123a.83.83 0 0 0-.878-.445l-4.417.725c-.367.06-.683.291-.852.622l-1.451 2.859a.83.83 0 0 0 .068.866l1.91 2.633a.833.833 0 0 0 1.35-.979l-.564-.776a.67.67 0 0 1 .358-.46l1.077-.531-1.077-.53a.67.67 0 0 1-.372-.598V9.192a.667.667 0 0 1 1.333 0v.902l1.92.945a.667.667 0 0 1 .206 1.04l.007-.003-.418.576a.833.833 0 1 0 1.35.979l1.91-2.633a.83.83 0 0 0 .068-.867zm.311 2.377A1.167 1.167 0 1 1 9 9.5a1.167 1.167 0 0 1 2.333 0M10.333 3.667a2.333 2.333 0 1 1-4.666 0 2.333 2.333 0 0 1 4.666 0"/></svg>'),r("omrs-icon-movement",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m12 10-.705.705 1.79 1.795H5a2 2 0 1 1 0-4h6a3 3 0 0 0 0-6H2.915L4.705.705 4 0 1 3l3 3 .705-.705L2.915 3.5H11a2 2 0 0 1 0 4H5a3 3 0 1 0 0 6h8.085l-1.79 1.795L12 16l3-3z"/></svg>'),r("omrs-icon-overflow-menu--horizontal",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M4 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2M8 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2M12 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'),r("omrs-icon-overflow-menu--vertical",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 5a1 1 0 1 0 0-2 1 1 0 0 0 0 2M8 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'),r("omrs-icon-pedestrian-family",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10 15H8.5a1 1 0 0 1-1-1v-2.5h1V14H10v-2.5h1v-2a.5.5 0 0 0-.5-.5H6.14l-1-3H2a.5.5 0 0 0-.5.5v3h1V14h2v-3.5h1V14a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-3.5a1 1 0 0 1-1-1v-3A1.5 1.5 0 0 1 2 5h3.14a1 1 0 0 1 .948.684L6.86 8h3.64A1.5 1.5 0 0 1 12 9.5v2a1 1 0 0 1-1 1V14a1 1 0 0 1-1 1M14 15h-1V9.5h1.5v-3A.5.5 0 0 0 14 6h-2V5h2a1.5 1.5 0 0 1 1.5 1.5v3a1 1 0 0 1-1 1H14zM3.5 4.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2M12.5 4.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2"/><path d="M9.25 7.5a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5m0-2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5"/></svg>'),r("omrs-icon-pen",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13.654 3.053 15 1.707 14.293 1l-1.346 1.346L12.4 1.8a.967.967 0 0 0-1.4 0l-9 9V14h3.2l9-9a.967.967 0 0 0 0-1.4zM4.8 13H3v-1.8l8.7-8.7 1.8 1.8zM8.293 2 4.5 5.793l.707.707L9 2.707z"/></svg>'),r("omrs-icon-printer",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M14 4.5h-1.5v-3h-9v3H2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h1.5v3h9v-3H14a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1m-9.5-2h7v2h-7zm7 11h-7v-5h7zm2.5-3h-1.5v-3h-9v3H2v-5h12z"/></svg>'),r("omrs-icon-programs",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M15 15h-1v-1a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v1H9v-1c0-.827.673-1.5 1.5-1.5h3c.827 0 1.5.673 1.5 1.5zM12 12c-1.103 0-2-.897-2-2s.897-2 2-2 2 .897 2 2-.897 2-2 2m0-3a1.001 1.001 0 0 0 0 2 1.001 1.001 0 0 0 0-2M5 10H4v1h1zM9 10H6v1h3zM5 8H4v1h1zM9 8H6v1h3zM5 6H4v1h1zM9 6H6v1h3z"/><path d="M10.5 2.5H9V2c0-.552-.449-1-1-1H5c-.551 0-1 .448-1 1v.5H2.5c-.551 0-1 .449-1 1V13c0 .552.449 1 1 1H7v-1H2.5V3.5H4v1h5v-1h1.5V7h1V3.5c0-.551-.449-1-1-1M8 3.5H5V2h3z"/></svg>'),r("omrs-icon-renew",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M6 5H3.39A5.5 5.5 0 0 1 13.5 8h1A6.5 6.5 0 0 0 3 3.84V2H2v4h4zM10 11h2.61A5.5 5.5 0 0 1 2.5 8h-1A6.5 6.5 0 0 0 13 12.16V14h1v-4h-4z"/></svg>'),r("omrs-icon-password",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10.5 1a4.5 4.5 0 0 0-4.306 5.806L1 12v3h3l5.194-5.194A4.5 4.5 0 1 0 10.5 1m0 8c-.344 0-.687-.051-1.016-.151l-.573-.174-2.015 2.014L6.207 10l-.707.707.69.69-.794.792-.689-.689-.707.707.69.69L3.585 14H2v-1.586L7.325 7.09l-.174-.573A3.5 3.5 0 1 1 10.5 9"/><path d="M11 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'),r("omrs-icon-report",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M9 9H5v1h4zM11 6.5H5v1h6zM7.5 11.5H5v1h2.5z"/><path d="M12.5 2.5H11V2a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v.5H3.5a1 1 0 0 0-1 1V14a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V3.5a1 1 0 0 0-1-1M6 2h4v2H6zm6.5 12h-9V3.5H5V5h6V3.5h1.5z"/></svg>'),r("omrs-icon-reset",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#161616" d="M9 14a6 6 0 1 0-6-6v3.1L1.2 9.3l-.7.7 3 3 3-3-.7-.7L4 11.1V8a5 5 0 1 1 5 5z"/></svg>'),r("omrs-icon-search",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m14.5 13.793-3.776-3.776a5.508 5.508 0 1 0-.707.707l3.776 3.776zM2 6.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0"/></svg>'),r("omrs-icon-save",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#161616" d="m13.855 4.645-2.5-2.5A.5.5 0 0 0 11 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5a.5.5 0 0 0-.145-.355M6 3h4v2H6zm4 10H6V9h4zm1 0V9a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v4H3V3h2v2a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V3.205l2 2V13z"/></svg>'),r("omrs-icon-shopping-cart",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M5 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2M12 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2M14 3.5H2.91L2.5 1.4A.5.5 0 0 0 2 1H0v1h1.59l1.91 9.6a.5.5 0 0 0 .5.4h9v-1H4.41L4 9h9a.5.5 0 0 0 .5-.39l1-4.5a.5.5 0 0 0-.5-.61M12.6 8H3.81l-.7-3.5h10.265z"/></svg>'),r("omrs-icon-shopping-cart--arrow-down",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M5 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2M12 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2M2.49 1.402A.5.5 0 0 0 2 1H0v1h1.59l1.92 9.598A.5.5 0 0 0 4 12h9v-1H4.41l-.4-2H13a.5.5 0 0 0 .488-.392L14.622 3.5h-1.024L12.6 8H3.81z"/><path d="M10.793 3.293 9 5.086V1H8v4.086L6.207 3.293 5.5 4l3 3 3-3z"/></svg>'),r("omrs-icon-sticky-note-add",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11.5 1h-1v2h-2v1h2v2h1V4h2V3h-2z"/><path d="M7.5 2h-4a1.003 1.003 0 0 0-1 1v10a1.003 1.003 0 0 0 1 1h6a.45.45 0 0 0 .35-.15l3.5-3.5a.45.45 0 0 0 .15-.35V7h-1v2h-3a1.003 1.003 0 0 0-1 1v3h-5V3h4zm4.8 8-2.8 2.8V10z"/></svg>'),r("omrs-icon-switcher",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M9 2H7v2h2zM4 2H2v2h2zM14 2h-2v2h2zM9 7H7v2h2zM4 7H2v2h2zM14 7h-2v2h2zM9 12H7v2h2zM4 12H2v2h2zM14 12h-2v2h2z"/></svg>'),r("omrs-icon-syringe",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill-rule="evenodd" d="M.155 3.143a.528.528 0 0 0 .747.748l.374-.374 1.867 1.868L1.65 6.879a.528.528 0 1 0 .747.747l.747-.747 6.351 6.351a2.64 2.64 0 0 0 2.833.592l.53.53c.276.276.668.367 1.02.273l1.221 1.22a.528.528 0 1 0 .747-.747l-1.22-1.22a1.06 1.06 0 0 0-.274-1.021l-.53-.53a2.64 2.64 0 0 0-.59-2.833l-6.352-6.35.747-.748a.528.528 0 1 0-.747-.747L5.385 3.143 3.517 1.275l.374-.373a.528.528 0 0 0-.748-.747zm4.584.646L2.872 1.92l-.95.95L3.788 4.74zm1.494 0L3.79 6.233l2.012 2.012 2.444-2.444zm.315 5.203 1.12 1.121.85-.849a.528.528 0 1 1 .747.748l-.85.848.748.747.849-.848a.528.528 0 1 1 .747.747l-.849.848.23.23c.501.502 1.234.63 1.855.387l.976-.976a1.73 1.73 0 0 0-.387-1.855L8.992 6.548zm7.17 4.525-.013-.014-.376-.377a3 3 0 0 1-.203.203l.376.376q.008.008.015.013a.53.53 0 0 1 .2-.201" clip-rule="evenodd"/></svg>'),r("omrs-icon-table-of-contents",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11 3H2v1h9zM11 6H2v1h9zM11 9H2v1h9zM11 12H2v1h9zM14 3h-1v1h1zM14 6h-1v1h1zM14 9h-1v1h1zM14 12h-1v1h1z"/></svg>'),r("omrs-icon-table",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M14.5 2.5a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1zm-1 0v2h-11v-2zm0 11h-11v-2h11zm0-3h-11v-2h11zm0-3h-11v-2h11z"/></svg>'),r("omrs-icon-time",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2"/><path d="M10.295 11 7.5 8.205V3.5h1v4.29l2.5 2.505z"/></svg>'),r("omrs-icon-tools",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M6.05 1a4.9 4.9 0 0 0-2.7.8L6.55 5a1.05 1.05 0 0 1 .1 1.5 1.05 1.05 0 0 1-1.5-.1l-3.3-3.2A4.9 4.9 0 0 0 1 6.05a5.07 5.07 0 0 0 5.05 5.05c.438.002.874-.048 1.3-.15l3.35 3.35a2.51 2.51 0 1 0 3.55-3.55L10.9 7.4q.153-.641.15-1.3a5 5 0 0 0-5-5.1m4 5.05c0 .355-.051.709-.15 1.05l-.15.55.4.4 3.35 3.35a1.44 1.44 0 0 1 .45 1.05 1.36 1.36 0 0 1-.45 1.05 1.45 1.45 0 0 1-2.1 0l-3.35-3.35-.4-.4-.55.15c-.341.099-.695.15-1.05.15A4.14 4.14 0 0 1 3.2 8.9 3.82 3.82 0 0 1 2 6.05c0-.372.051-.742.15-1.1l2.2 2.2a2.07 2.07 0 0 0 2.95.1 2.07 2.07 0 0 0-.1-2.95L5 2.1c.323-.102.66-.153 1-.15A4.14 4.14 0 0 1 8.85 3.1a4.25 4.25 0 0 1 1.2 2.95"/></svg>'),r("omrs-icon-translate",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13.925 14.5H15L12 7h-1.175l-3 7.5H8.9l.8-2h3.425zm-3.825-3 1.31-3.28 1.315 3.28zM9 3.5v-1H5.5V1h-1v1.5H1v1h5.37a7.36 7.36 0 0 1-1.595 3.09A6.8 6.8 0 0 1 3.63 4.5H2.58a8.2 8.2 0 0 0 1.5 2.79A8.4 8.4 0 0 1 1.5 9l.375.93A9.2 9.2 0 0 0 4.765 8a8.5 8.5 0 0 0 2.88 1.92L8 9a7.2 7.2 0 0 1-2.56-1.685A8.8 8.8 0 0 0 7.4 3.5z"/></svg>'),r("omrs-icon-trash-can",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M7 6H6v6h1zM10 6H9v6h1z"/><path d="M2 3v1h1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4h1V3zm2 11V4h8v10zM10 1H6v1h4z"/></svg>'),r("omrs-icon-tree-view--alt",'<svg xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M11.5 4.502h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v.5h-5v-.5a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-.5h2v10a1 1 0 0 0 1 1h2v.5a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v.5h-2v-4.5h2v.5a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v.5h-2v-4.5h2v.5a1 1 0 0 0 1 1m0-3h3v2h-3zm-7 2h-3v-2h3zm7 9h3v2h-3zm0-5.5h3v2h-3z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>'),r("omrs-icon-user-avatar",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 4a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"/><path d="M8 1a7 7 0 1 0 7 7 7.01 7.01 0 0 0-7-7M5 13.188V12.5A1.5 1.5 0 0 1 6.5 11h3a1.5 1.5 0 0 1 1.5 1.5v.688a5.95 5.95 0 0 1-6 0m6.996-.725A2.5 2.5 0 0 0 9.5 10h-3a2.5 2.5 0 0 0-2.496 2.463 6 6 0 1 1 7.992 0"/></svg>'),r("omrs-icon-user-follow",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M16 7h-2V5h-1v2h-2v1h2v2h1V8h2zM6 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5m0-1a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7M11 15h-1v-2.5A2.5 2.5 0 0 0 7.5 10h-3A2.5 2.5 0 0 0 2 12.5V15H1v-2.5A3.5 3.5 0 0 1 4.5 9h3a3.5 3.5 0 0 1 3.5 3.5z"/></svg>'),r("omrs-icon-user-xray",'<svg xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M15.5 1.5h-7A.5.5 0 0 0 8 2v6.5a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5V2a.5.5 0 0 0-.5-.5m-1.5 3h-1.5V6H14v1h-1.5v1h-1V7H10V6h1.5V4.5H10v-1h1.5v-1h1v1H14zM7.5 15h-1v-2A1.473 1.473 0 0 0 5 11.5H3A1.474 1.474 0 0 0 1.5 13v2h-1v-2A2.475 2.475 0 0 1 3 10.5h2A2.476 2.476 0 0 1 7.5 13zM4 5.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>'),r("omrs-icon-user",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5m0-1a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7M13 15h-1v-2.5A2.5 2.5 0 0 0 9.5 10h-3A2.5 2.5 0 0 0 4 12.5V15H3v-2.5A3.5 3.5 0 0 1 6.5 9h3a3.5 3.5 0 0 1 3.5 3.5z"/></svg>'),r("omrs-icon-view-off",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m2.62 11.255.715-.71A7 7 0 0 1 1.535 8C2.55 5.465 5.35 3.5 8 3.5a6.2 6.2 0 0 1 2 .36l.775-.78A7.4 7.4 0 0 0 8 2.5 8.35 8.35 0 0 0 .53 7.83a.5.5 0 0 0 0 .34 8 8 0 0 0 2.09 3.085"/><path d="M6 7.865a2 2 0 0 1 1.85-1.85l.905-.91A3 3 0 0 0 5.09 8.77zM15.47 7.83a8.2 8.2 0 0 0-2.87-3.72L15 1.705 14.295 1 1 14.295l.705.705 2.55-2.55A7.65 7.65 0 0 0 8 13.5a8.35 8.35 0 0 0 7.47-5.33.5.5 0 0 0 0-.34M10 8a2 2 0 0 1-3 1.72L9.72 7A2 2 0 0 1 10 8m-2 4.5a6.5 6.5 0 0 1-3-.79l1.27-1.27a3 3 0 0 0 4.175-4.175L11.88 4.83A7.27 7.27 0 0 1 14.465 8C13.45 10.535 10.65 12.5 8 12.5"/></svg>'),r("omrs-icon-view",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15.47 7.83A8.34 8.34 0 0 0 8 2.5 8.35 8.35 0 0 0 .53 7.83a.5.5 0 0 0 0 .34A8.35 8.35 0 0 0 8 13.5a8.35 8.35 0 0 0 7.47-5.33.5.5 0 0 0 0-.34M8 12.5c-2.65 0-5.45-1.965-6.465-4.5C2.55 5.465 5.35 3.5 8 3.5s5.45 1.965 6.465 4.5C13.45 10.535 10.65 12.5 8 12.5"/><path d="M8 5a3 3 0 1 0 0 6 3 3 0 0 0 0-6m0 5a2 2 0 1 1 0-4 2 2 0 0 1 0 4"/></svg>'),r("omrs-icon-warning",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1m0 13A6 6 0 1 1 8 2a6 6 0 0 1 0 12"/><path d="M8.5 4h-1v5.5h1zM8 11a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5"/></svg>'),r("omrs-pict-home",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M61.48 62H18.52c-.29 0-.52-.23-.52-.52V28.54c0-.29.23-.52.52-.52h30.99v-9.5c0-.29.23-.52.52-.52h11.46c.28 0 .52.23.52.52v42.96c0 .28-.23.52-.52.52z"/><path fill="#7BBCB9" d="M39.63 51.97h-6.85v8.99h6.85zM56.41 52.89h-1.03v-2.87h1.03zM48.54 52.89h-1.03v-2.87h1.03zM24.9 50.02h-1.03v2.86h1.03zM56.41 47.16h-1.03v-2.87h1.03zM48.54 47.16h-1.03v-2.87h1.03zM40.66 44.29h-1.03v2.86h1.03zM32.78 44.29h-1.03v2.86h1.03zM24.9 44.29h-1.03v2.86h1.03zM56.41 41.43h-1.03v-2.86h1.03zM48.54 41.43h-1.03v-2.86h1.03zM40.66 38.57h-1.03v2.86h1.03zM32.78 38.57h-1.03v2.86h1.03zM24.9 38.57h-1.03v2.86h1.03zM56.41 35.7h-1.03v-2.86h1.03zM48.54 35.7h-1.03v-2.86h1.03zM40.66 32.84h-1.03v2.86h1.03zM32.78 32.84h-1.03v2.86h1.03zM24.9 32.84h-1.03v2.86h1.03zM56.41 26.39h-1.03v-2.35h-2.35v-1.03h2.35v-2.35h1.03v2.35h2.35v1.03h-2.35z"/></svg>'),r("omrs-pict-laboratory",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M49.579 55.196h3.66c1.15-2.11 1.76-4.5 1.76-6.93 0-5.11-2.69-9.81-7.06-12.42a5.09 5.09 0 0 1-4.38 2.48c-.86 0-1.67-.21-2.39-.59l-5.02 8.7a.59.59 0 0 1-.81.22l-2.09-1.21-.91 1.58 2.09 1.21c.14.08.23.21.27.36s.02.31-.06.45l-1.5 2.6c-.16.28-.52.38-.81.22l-7.81-4.51a.6.6 0 0 1-.22-.81l1.5-2.6a.59.59 0 0 1 .81-.22l2.09 1.21.91-1.58-2.09-1.21a.58.58 0 0 1-.27-.36.6.6 0 0 1 .06-.45l15.05-26.04a.6.6 0 0 1 .81-.22l7.81 4.51a.59.59 0 0 1 .22.81l-4.92 8.51c1.44.9 2.39 2.5 2.39 4.32 0 .53-.08 1.05-.24 1.54 4.79 2.8 7.75 7.93 7.75 13.5 0 2.41-.56 4.78-1.61 6.93h4.03"/><path fill="#7BBCB9" d="m25.629 46.626 6.79 3.92.91-1.58-4.7-2.71s-.02 0-.02-.01l-2.07-1.2z"/><path fill="#CEE6E5" d="m30.539 45.986.78.45.92-1.58-1.58-.92-.92 1.59z"/><path fill="#7BBCB9" d="M41.399 36.496a3.93 3.93 0 0 0 5.75-1.67c0-.02.02-.04.03-.06a3.926 3.926 0 0 0-3.61-5.46c-2.16 0-3.92 1.76-3.92 3.92 0 1.29.62 2.43 1.58 3.14.01 0 .03.01.05.02.05.03.09.06.13.1z"/><path fill="#CEE6E5" d="M53.659 55.196h4.03c.33 0 .59.26.59.59v9.02c0 .33-.26.59-.59.59h-36.09c-.24 0-.45-.14-.55-.37s-.04-.47.13-.64l6.02-6.01a.6.6 0 0 1 .42-.17h20.46v-2.42c0-.33.26-.59.59-.59h3.66"/></svg>'),r("omrs-pict-patient-lists",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" fill-rule="evenodd" d="M34.824 27.412c.659-.473.879-1.41.784-2.353C35.703 21.133 32.502 18 28.55 18s-7.153 3.133-7.059 7.059c-.094 2.802 1.647 5.26 3.922 6.275C20.11 32.699 16 37.538 16 43.099v11.765h21.961V27.412zM63.06 54.864V43.099c0-5.561-4.11-10.415-9.412-11.765 2.274-1.015 4.016-3.473 3.922-6.275.094-3.926-3.106-7.059-7.06-7.059-3.952 0-7.152 3.133-7.058 7.059-.094.944.11 1.88.784 2.353h-3.137v27.452z" clip-rule="evenodd"/><path fill="#7BBCB9" fill-rule="evenodd" d="M28.55 61.138v-11.52c0-5.806 4.11-10.66 9.647-11.934-2.51-1.09-4.251-3.548-4.251-6.405 0-3.87 3.2-7.004 7.153-7.004s7.153 3.133 7.153 7.004c0 2.857-1.741 5.314-4.251 6.405 5.537 1.29 9.647 6.128 9.647 11.934v11.52" clip-rule="evenodd"/></svg>'),r("omrs-pict-appointments",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M59.73 22.18H19.85c-.28 0-.51.23-.51.51v38.45c0 .28.23.51.51.51h39.88c.28 0 .51-.23.51-.51V22.7c0-.28-.23-.51-.51-.51z"/><path fill="#7BBCB9" d="M54.03 46.4h-11.4a.51.51 0 0 0-.51.51v5.7c0 .282.228.51.51.51h11.4a.51.51 0 0 0 .51-.51v-5.7a.51.51 0 0 0-.51-.51M36.94 46.4h-11.4a.51.51 0 0 0-.51.51v5.7c0 .282.228.51.51.51h11.4a.51.51 0 0 0 .51-.51v-5.7a.51.51 0 0 0-.51-.51M54.03 33.58h-11.4a.51.51 0 0 0-.51.51v5.7c0 .282.228.51.51.51h11.4a.51.51 0 0 0 .51-.51v-5.7a.51.51 0 0 0-.51-.51M36.94 33.58h-11.4a.51.51 0 0 0-.51.51v5.7c0 .282.228.51.51.51h11.4a.51.51 0 0 0 .51-.51v-5.7a.51.51 0 0 0-.51-.51M49.76 27.48c-1.07 0-1.94-.87-1.94-1.94v-5.69c0-1.07.87-1.94 1.94-1.94s1.94.87 1.94 1.94v5.7c0 1.07-.87 1.94-1.94 1.94zM29.82 27.48c-1.07 0-1.94-.87-1.94-1.94v-5.69c0-1.07.87-1.94 1.94-1.94s1.94.87 1.94 1.94v5.7c0 1.07-.87 1.94-1.94 1.94z"/><path fill="#CEE6E5" d="M45.48 22.18H34.09v1.03h11.39z"/></svg>'),r("omrs-pict-service-queues",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" fill-rule="evenodd" d="M34.824 27.412c.659-.473.879-1.41.784-2.353C35.703 21.133 32.502 18 28.55 18s-7.153 3.133-7.059 7.059c-.094 2.802 1.647 5.26 3.922 6.275C20.11 32.699 16 37.538 16 43.099v11.765h21.961V27.412zM63.06 54.864V43.099c0-5.561-4.11-10.415-9.412-11.765 2.274-1.015 4.016-3.473 3.922-6.275.094-3.926-3.106-7.059-7.06-7.059-3.952 0-7.152 3.133-7.058 7.059-.094.944.11 1.88.784 2.353h-3.137v27.452z" clip-rule="evenodd"/><path fill="#7BBCB9" fill-rule="evenodd" d="M28.55 61.138v-11.52c0-5.806 4.11-10.66 9.647-11.934-2.51-1.09-4.251-3.548-4.251-6.405 0-3.87 3.2-7.004 7.153-7.004s7.153 3.133 7.153 7.004c0 2.857-1.741 5.314-4.251 6.405 5.537 1.29 9.647 6.128 9.647 11.934v11.52" clip-rule="evenodd"/></svg>'),r("omrs-pict-registration",'<svg xmlns="http://www.w3.org/2000/svg"><path fill="#CEE6E5" d="M53.975 60.797H24.762a.525.525 0 0 1-.525-.524V23.762c0-.295.24-.525.525-.525h11.154v-6.773c0-.295.24-.524.524-.524h5.845c.295 0 .525.24.525.524v6.773h11.154c.295 0 .524.24.524.525v36.51c0 .296-.24.525-.524.525z"/><path fill="#7BBCB9" d="M40.57 55.367H30.344v1.05H40.57zM47.868 52.45H30.344v1.05h17.524zM42.242 40.04a5.73 5.73 0 0 0 2.83-4.927 5.726 5.726 0 0 0-5.715-5.714 5.726 5.726 0 0 0-5.713 5.714 5.7 5.7 0 0 0 2.84 4.927c-4.25 1.278-7.265 5.145-7.265 9.417h20.298c0-4.272-3.026-8.14-7.265-9.417zM54.5 65.462h4.096v-4.38c0-.154.12-.285.284-.285h4.38V56.7h-4.38a.28.28 0 0 1-.284-.284v-4.38h-4.097v4.38c0 .153-.12.284-.284.284h-4.38v4.097h4.38c.153 0 .284.12.284.284z"/></svg>'),r("omrs-pict-in-patient",'<svg xmlns="http://www.w3.org/2000/svg"><path fill="#CEE6E5" fill-rule="evenodd" d="M59.32 49.84h.09c2.94 0 5.33-2.4 5.33-5.37 0-2.01-1.09-3.76-2.71-4.68V22.77c0-1.5-1.21-2.71-2.71-2.71H51.2c-.75 0-1.35-.61-1.35-1.35V16h-2.71v2.71c0 1.77 1.13 3.27 2.71 3.83v1.58H48.5c-.75 0-1.35.61-1.35 1.35v8.12c0 .75.61 1.35 1.35 1.35h5.41c.75 0 1.35-.61 1.35-1.35v-8.12c0-.75-.61-1.35-1.35-1.35h-1.35v-1.35h6.77V39.1H35.11c-.11 0-.22-.04-.29-.12l-.5-.5.5-.5c1.99-1.99 2-5.22 0-7.22l-2.44-2.44a5.11 5.11 0 0 0-7.22 0l-.95.95a5.36 5.36 0 0 0-5.27 1.38 5.45 5.45 0 0 0 0 7.68l1.13 1.14V53.9H16v2.71h48.73V53.9h-5.41zm-2.71 4.06H22.77V42.2l7.14 7.19c.29.29.67.45 1.08.45h25.62z" clip-rule="evenodd"/><path fill="#7BBCB9" fill-rule="evenodd" d="m26.59 30.71 5.81 5.85.49-.49c.94-.94.94-2.45 0-3.39l-2.44-2.44a2.39 2.39 0 0 0-3.39 0z" clip-rule="evenodd"/><path fill="#7BBCB9" d="M24.65 63.79a4 4 0 1 0 0-8 4 4 0 0 0 0 8M56.61 63.79a4 4 0 1 0 0-8 4 4 0 0 0 0 8M53.5 23.92h-4.48a2.03 2.03 0 0 0-2.03 2.03v7.02A2.03 2.03 0 0 0 49.02 35h4.48a2.03 2.03 0 0 0 2.03-2.03v-7.02a2.03 2.03 0 0 0-2.03-2.03"/></svg>'),r("omrs-pict-pharmacy",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M12 32.495c0 14.115 11.434 25.549 25.55 25.549 14.115 0 25.549-11.434 25.549-25.55z"/><path fill="#7BBCB9" d="M52.11 32.495 63.724 20.88a5.193 5.193 0 0 0 0-7.354 5.193 5.193 0 0 0-7.354 0L37.4 32.495h14.708"/></svg>')}(),function(){"use strict";D.r(C)}(),C}())}}}))},5095:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{V:()=>me,t:()=>ve});var o,i,a=(o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}({},{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"}),i=null!=(i={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",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",unknown:"Unknown"})?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(i)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))})),o);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function p(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},_=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,e),this.init(t,n)}return l(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||w,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,b(b({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),S=function(){function e(){s(this,e),this.observers={}}return l(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function E(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function O(e){return null==e?"":""+e}function x(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function k(e,t,n){var r=x(e,t,Object);r.obj[r.k]=n}function A(e,t){var n=x(e,t),r=n.obj,o=n.k;if(r)return r[o]}function P(e,t,n){var r=A(e,n);return void 0!==r?r:A(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function D(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var C={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function T(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return C[e]})):e}var I="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,M=[" ",",","?","!",";"];function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function L(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,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 a=2,u=r.slice(i,i+a).join(n),s=o[u];void 0===s&&r.length>i+a;)a++,s=o[u=r.slice(i,i+a).join(n)];if(void 0===s)return;if(null===s)return null;if(t.endsWith(u)){if("string"==typeof s)return s;if(u&&"string"==typeof s[u])return s[u]}var c=r.slice(i+a).join(n);return c?L(s,c,n):void 0}o=o[r[i]]}return o}}var F=function(e){h(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=y(t);if(n){var o=y(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p(this,e)});function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s(this,o),t=r.call(this),I&&S.call(f(t)),t.data=e||{},t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return l(o,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var u=A(this.data,a);return u||!i||"string"!=typeof n?u:L(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),k(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var u=A(this.data,a)||{};r?j(u,n,o):u=N(N({},u),n),k(this.data,a,u),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?N(N({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),o}(S),B={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}};function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K={},V=function(e){h(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=y(t);if(n){var o=y(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p(this,e)});function o(e){var t,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,o),t=r.call(this),I&&S.call(f(t)),n=e,i=f(t),["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){n[e]&&(i[e]=n[e])})),t.options=a,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=_.create("translator"),t}return l(o,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=M.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:o};var s=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,n){var r=this;if("object"!==u(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),c=s.key,l=s.namespaces,f=l[l.length-1],d=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return i?(y.res="".concat(f).concat(p).concat(c),y):"".concat(f).concat(p).concat(c)}return i?(y.res=c,y):c}var y=this.resolve(e,t),v=y&&y.res,m=y&&y.usedKey||c,g=y&&y.exactUsedKey||c,b=Object.prototype.toString.apply(v),w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject;if(_&&v&&"string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,v,G(G({},t),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return i?(y.res=S,y):S}if(a){var E="[object Array]"===b,O=E?[]:{},x=E?g:m;for(var k in v)if(Object.prototype.hasOwnProperty.call(v,k)){var A="".concat(x).concat(a).concat(k);O[k]=this.translate(A,G(G({},t),{joinArrays:!1,ns:l})),O[k]===A&&(O[k]=v[k])}v=O}}else if(_&&"string"==typeof w&&"[object Array]"===b)(v=v.join(w))&&(v=this.extendTranslation(v,e,t,n));else{var P=!1,j=!1,D=void 0!==t.count&&"string"!=typeof t.count,C=o.hasDefaultValue(t),T=D?this.pluralResolver.getSuffix(d,t.count,t):"",I=t["defaultValue".concat(T)]||t.defaultValue;!this.isValidLookup(v)&&C&&(P=!0,v=I),this.isValidLookup(v)||(j=!0,v=c);var M=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:v,R=C&&I!==v&&this.options.updateMissing;if(j||P||R){if(this.logger.log(R?"updateKey":"missingKey",d,f,c,R?I:v),a){var N=this.resolve(c,G(G({},t),{},{keySeparator:!1}));N&&N.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=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var B=0;B<F.length;B++)L.push(F[B]);else"all"===this.options.saveMissingTo?L=this.languageUtils.toResolveHierarchy(t.lng||this.language):L.push(t.lng||this.language);var U=function(e,n,o){var i=C&&o!==v?o:M;r.options.missingKeyHandler?r.options.missingKeyHandler(e,f,n,i,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,f,n,i,R,t),r.emit("missingKey",e,f,n,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?L.forEach((function(e){r.pluralResolver.getSuffixes(e,t).forEach((function(n){U([e],c+n,t["defaultValue".concat(n)]||I)}))})):U(L,c,I))}v=this.extendTranslation(v,e,t,y,n),j&&v===c&&this.options.appendNamespaceToMissingKey&&(v="".concat(f,":").concat(c)),(j||P)&&this.options.parseMissingKeyHandler&&(v="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(f,":").concat(c):c,P?v:void 0):this.options.parseMissingKeyHandler(v))}return i?(y.res=v,y):v}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,G(G({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(G(G({},n),{interpolation:G(G({},this.options.interpolation),n.interpolation)}));var a,u="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(u){var s=e.match(this.interpolator.nestingRegexp);a=s&&s.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=G(G({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),u){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,d="string"==typeof f?[f]:f;return null!=e&&d&&d.length&&!1!==n.applyPostProcessor&&(e=B.handle(d,e,t,this.options&&this.options.postProcessPassResolved?G({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var s=a.extractFromKey(e,u),c=s.key;n=c;var l=s.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==u.count&&"string"!=typeof u.count,d=f&&!u.ordinal&&0===u.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==u.context&&("string"==typeof u.context||"number"==typeof u.context)&&""!==u.context,p=u.lngs?u.lngs:a.languageUtils.toResolveHierarchy(u.lng||a.language,u.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!K["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(K["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.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!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,s=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(s,c,n,e,u);else{var l;f&&(l=a.pluralResolver.getSuffix(n,u.count,u));var p="".concat(a.options.pluralSeparator,"zero");if(f&&(s.push(c+l),d&&s.push(c+p)),h){var y="".concat(c).concat(a.options.contextSeparator).concat(u.context);s.push(y),f&&(s.push(y+l),d&&s.push(y+p))}}for(;i=s.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,u))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),o}(S);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var H=function(){function e(t){s(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=_.create("languageUtils")}return l(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=z(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=z(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=z(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),q=[{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}],W={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Y=["v1","v2","v3"],$={zero:0,one:1,two:2,few:3,many:4,other:5},J=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,e),this.languageUtils=t,this.options=r,this.logger=_.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={},q.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:W[e.fc]}}))})),n)}return l(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return $[e]-$[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.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===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!Y.includes(this.options.compatibilityJSON)}}]),e}();function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.logger=_.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return l(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:T,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?D(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?D(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?D(t.nestingPrefix):t.nestingPrefixEscaped||D("$t("),this.nestingSuffix=t.nestingSuffix?D(t.nestingSuffix):t.nestingSuffixEscaped||D(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,u=this,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(u.formatSeparator)<0){var o=P(t,s,e);return u.alwaysFormat?u.format(o,void 0,n,X(X(X({},r),t),{},{interpolationkey:e})):o}var i=e.split(u.formatSeparator),a=i.shift().trim(),c=i.join(u.formatSeparator).trim();return u.format(P(t,s,a),c,n,X(X(X({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?c(u.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof f){var s=f(e,o,r);i="string"==typeof s?s:""}else if(r&&r.hasOwnProperty(n))i="";else{if(d){i=o[0];continue}u.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||u.useRawValueToEscape||(i=O(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=u.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=X({},i);function u(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var i=(o=this.interpolate(o,a)).match(/'/g),u=o.match(/"/g);(i&&i.length%2==0&&!u||u.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=X(X({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var s=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),s=l,c=!0}if((r=t(u.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=O(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=s.reduce((function(e,t){return o.format(e,t,i.lng,X(X({},i),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}}var re=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.logger=_.create("formatter"),this.options=t,this.formats={number:ne((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:ne((function(e,t){var n=new Intl.NumberFormat(e,te(te({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:ne((function(e,t){var n=new Intl.DateTimeFormat(e,te({},t));return function(e){return n.format(e)}})),relativetime:ne((function(e,t){var n=new Intl.RelativeTimeFormat(e,te({},t));return function(e){return n.format(e,t.range||"day")}})),list:ne((function(e,t){var n=new Intl.ListFormat(e,te({},t));return function(e){return n.format(e)}}))},this.init(t)}return l(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=ne(t)}},{key:"format",value:function(e,t,n,r){var o=this;return t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=function(e){if(Array.isArray(e))return e}(i=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}var i}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,u=i.formatOptions;if(o.formats[a]){var s=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=c.locale||c.lng||r.locale||r.lng||n;s=o.formats[a](e,l,te(te(te({},u),r),c))}catch(e){o.logger.warn(e)}return s}return o.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=function(e){h(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=y(t);if(n){var o=y(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p(this,e)});function o(e,t,n){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s(this,o),i=r.call(this),I&&S.call(f(i)),i.backend=e,i.store=t,i.services=n,i.languageUtils=n.languageUtils,i.options=a,i.logger=_.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,a.backend,a),i}return l(o,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},u={},s={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var u="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[u]=2:o.state[u]<0||(1===o.state[u]?void 0===a[u]&&(a[u]=!0):(o.state[u]=1,r=!1,void 0===a[u]&&(a[u]=!0),void 0===i[u]&&(i[u]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(u[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(s)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,u,s,c,l;r=n.loaded,u=i,(c=(s=x(r,[o],Object)).obj)[l=s.k]=c[l]||[],c[l].push(u),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[n](e,t,(function(u,s){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)}u&&s&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(u,s)}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,ie(ie({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),o}(S);function ue(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function le(){}var fe=function(e){h(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=y(t);if(n){var o=y(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p(this,e)});function o(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(s(this,o),e=r.call(this),I&&S.call(f(e)),e.options=ue(n),e.services={},e.logger=_,e.modules={external:[]},t=f(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),p(e,f(e));setTimeout((function(){e.init(n,i)}),0)}return e}return l(o,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.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(e){var t={};if("object"===u(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===u(e[2])||"object"===u(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=ce(ce(ce({},r),this.options),ue(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ce(ce({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?_.init(o(this.modules.logger),this.options):_.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=re);var a=new H(this.options);this.store=new F(this.options.resources,this.options);var s=this.services;s.logger=_,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new J(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new Z(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new ae(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new V(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=le),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(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=E(),f=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=E();return e||(e=this.languages),t||(t=this.options.ns),n||(n=le),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&B.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=E();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,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)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==u(o)){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];i=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=ce({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||n||e.keyPrefix;var l=r.options.keySeparator||".",f=i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(t):t;return r.t(f,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var u=n.precheck(this,a);if(void 0!==u)return u}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=E();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=E();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le,r=ce(ce(ce({},this.options),t),{isClone:!0}),i=new o(r);return void 0===t.debug&&void 0===t.prefix||(i.logger=i.logger.clone(t)),["store","services","language"].forEach((function(t){i[t]=e[t]})),i.services=ce({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new V(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(r,n),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),o}(S);v(fe,"createInstance",(function(){return new fe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var de=fe.createInstance();de.createInstance=fe.createInstance,de.createInstance,de.init,de.loadResources,de.reloadResources,de.use,de.changeLanguage,de.getFixedT,de.t,de.exists,de.setDefaultNamespace,de.hasLoadedNamespace,de.loadNamespaces,de.loadLanguages;const he=de;function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye=he.default||he;function ve(e,t,n,r){return ye.t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pe(e,t,n[t])}))}return e}({ns:e,defaultValue:n},r))}function me(e,t,n){return a[e]?ve("core",e,null!=t?t:a[e],n):(console.error("O3 Core Translations does not provide key '".concat(e,"'. The key itself is being rendered as text.")),e)}ye.on("initialized",(function(){window.i18next.loadNamespaces(["core"])}))},3441:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e,t,n){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}},o(e,t,n||e)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function u(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function s(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function h(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}System.register(["dayjs"],(function(e,n){var c={};return{setters:[function(e){c.default=e.default}],execute:function(){e(function(){var e={6893:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(2712).__exportStar(n(715),t)},2943:function(e,t,n){"use strict";var r=function(e){return Intl.getCanonicalLocales(e)},o=function(e,t){var n=t.zoneNames,r=t.uppercaseLinks,o=e.toUpperCase(),i=n.reduce((function(e,t){return e[t.toUpperCase()]=t,e}),{}),a=r[o]||i[o];return"Etc/UTC"===a||"Etc/GMT"===a?"UTC":a},i=function(e){if("symbol"==(void 0===e?"undefined":d(e)))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},a=function(e){if(void 0===e)return NaN;if(null===e)return 0;if("boolean"==typeof e)return e?1:0;if("number"==typeof e)return e;if("symbol"==(void 0===e?"undefined":d(e))||"bigint"==(void 0===e?"undefined":d(e)))throw new TypeError("Cannot convert symbol/bigint to number");return Number(e)},s=function(e){return isFinite(e)?Math.abs(e)>8640000000000001?NaN:function(e){var t=a(e);if(isNaN(t)||l(t,-0))return 0;if(isFinite(t))return t;var n=Math.floor(Math.abs(t));return t<0&&(n=-n),l(n,-0)?0:n}(e):NaN},c=function(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)},l=function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},f=function(e){return new Array(e)},h=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":"symbol"==(void 0===e?"undefined":d(e))?"Symbol":"bigint"==(void 0===e?"undefined":d(e))?"BigInt":void 0},y=function(e,t){return e-Math.floor(e/t)*t},v=function(e){return Math.floor(e/xe)},m=function(e){return y(v(e)+4,7)},g=function(e){return Date.UTC(e,0)/xe},b=function(e){return Date.UTC(e,0)},w=function(e){return new Date(e).getUTCFullYear()},_=function(e){return e%4!=0?365:e%100!=0?366:e%400!=0?365:366},S=function(e){return v(e)-g(w(e))},E=function(e){return 365===_(w(e))?0:1},O=function(e){var t=S(e),n=E(e);if(t>=0&&t<31)return 0;if(t<59+n)return 1;if(t<90+n)return 2;if(t<120+n)return 3;if(t<151+n)return 4;if(t<181+n)return 5;if(t<212+n)return 6;if(t<243+n)return 7;if(t<273+n)return 8;if(t<304+n)return 9;if(t<334+n)return 10;if(t<365+n)return 11;throw new Error("Invalid time")},x=function(e){var t=S(e),n=O(e),r=E(e);if(0===n)return t+1;if(1===n)return t-30;if(2===n)return t-58-r;if(3===n)return t-89-r;if(4===n)return t-119-r;if(5===n)return t-150-r;if(6===n)return t-180-r;if(7===n)return t-211-r;if(8===n)return t-242-r;if(9===n)return t-272-r;if(10===n)return t-303-r;if(11===n)return t-333-r;throw new Error("Invalid time")},k=function(e){return y(Math.floor(e/Ce),ke)},A=function(e){return y(Math.floor(e/De),Ae)},P=function(e){return y(Math.floor(e/je),Pe)},j=function(e,t,n){if("function"!=typeof e)return!1;if(null==n?void 0:n.boundTargetFunction)return u(t,null==n?void 0:n.boundTargetFunction);if("object"!=typeof t)return!1;var r=e.prototype;if("object"!=typeof r)throw new TypeError("OrdinaryHasInstance called on an object with an invalid prototype property.");return Object.prototype.isPrototypeOf.call(r,t)},D=function(e){return y(e,je)},C=function(e){return void 0===e?Object.create(null):c(e)},T=function(e,t,n,r){if(void 0===e)return r;var o=Number(e);if(isNaN(o)||o<t||o>n)throw new RangeError("".concat(o," is outside of range [").concat(t,", ").concat(n,"]"));return Math.floor(o)},I=function(e,t,n,r,o){return T(e[t],n,r,o)},M=function(e,t,n,r,o){if("object"!=typeof e)throw new TypeError("Options must be an object");var a=e[t];if(void 0!==a){if("boolean"!==n&&"string"!==n)throw new TypeError("invalid type");if("boolean"===n&&(a=Boolean(a)),"string"===n&&(a=i(a)),void 0!==r&&!r.filter((function(e){return e==a})).length)throw new RangeError("".concat(a," is not within ").concat(r.join(", ")));return a}return o},R=function(e){if(void 0===e)return Object.create(null);if("object"==typeof e)return e;throw new TypeError("Options must be an object")},N=function(e,t,n,r,o,a){var u=e[t];if(void 0===u)return a;if(!0===u)return r;if(!1===Boolean(u))return o;if("true"===(u=i(u))||"false"===u)return a;if(-1===(n||[]).indexOf(u))throw new RangeError("Invalid value ".concat(u));return u},L=function(e){return e.slice(e.indexOf("-")+1)},F=function(e){return Ie.indexOf(e)>-1},B=function(e,t){var n=t.zoneNamesFromData,r=t.uppercaseLinks,o=e.toUpperCase(),i=new Set,a=new Set;return n.map((function(e){return e.toUpperCase()})).forEach((function(e){return i.add(e)})),Object.keys(r).forEach((function(e){a.add(e.toUpperCase()),i.add(r[e].toUpperCase())})),i.has(o)||a.has(o)},U=function(e){return 3===(e=e.replace(/([a-z])/g,(function(e,t){return t.toUpperCase()}))).length&&!Me.test(e)},G=function(e){if(F(e=e.replace(/([A-Z])/g,(function(e,t){return t.toLowerCase()}))))return!0;var t=e.split("-per-");if(2!==t.length)return!1;var n=t[0],r=t[1];return!(!F(n)||!F(r))},K=function(e,t,n,r){if(e===t)return t;if(void 0===r)throw new Error("unsignedRoundingMode is mandatory");if("zero"===r)return t;if("infinity"===r)return n;var o=e-t,i=n-e;if(o<i)return t;if(i<o)return n;if(o!==i)throw new Error("Unexpected error");if("half-zero"===r)return t;if("half-infinity"===r)return n;if("half-even"!==r)throw new Error("Unexpected value for unsignedRoundingMode: ".concat(r));return 0==t/(n-t)%2?t:n},V=function(e){return e},z=function(e){return Math.floor(Math.log(e)*Math.LOG10E)},H=function(e,t){if("function"==typeof e.repeat)return e.repeat(t);for(var n=new Array(t),r=0;r<n.length;r++)n[r]=e;return n.join("")},q=function(e,t,n,r){e.get(t)||e.set(t,Object.create(null)),e.get(t)[n]=r},W=function(e,t,n){for(var r=0,o=Object.keys(n);r<o.length;r++){var i=o[r];q(e,t,i,n[i])}},Y=function(e,t,n){return $(e,t,n)[n]},$=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.get(t);if(!o)throw new TypeError("".concat(t," InternalSlot has not been initialized"));return n.reduce((function(e,t){return e[t]=o[t],e}),Object.create(null))},J=function(e){return"literal"===e.type},Q=function(e,t,n){var r=n.value;Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})},X=function(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n})},Z=function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)},ee=function(e,t,n){var r=(0,n.getInternalSlots)(e),o=r.notation,i=r.dataLocaleData,a=r.numberingSystem;switch(o){case"standard":return 0;case"scientific":return t;case"engineering":return 3*Math.floor(t/3);default:var u=r.compactDisplay,s=r.style,c=r.currencyDisplay,l=void 0;if("currency"===s&&"name"!==c)l=(i.numbers.currency[a]||i.numbers.currency[i.numbers.nu[0]]).short;else{var f=i.numbers.decimal[a]||i.numbers.decimal[i.numbers.nu[0]];l="long"===u?f.long:f.short}if(!l)return 0;var d=String(Math.pow(10,t)),h=Object.keys(l);if(d<h[0])return 0;if(d>h[h.length-1])return h[h.length-1].length-1;var p=h.indexOf(d);if(-1===p)return 0;var y=h[p];return"0"===l[y].other?0:y.length-l[y].other.match(/0+/)[0].length}},te=function(e,t,n){var r,o,i,a,u=n;if(0===e)r=H("0",u),o=0,i=0;else{var s=e.toString(),c=s.indexOf("e"),l=s.split("e"),f=l[0],d=l[1],h=f.replace(".","");if(c>=0&&h.length<=u)o=+d,r=h+H("0",u-h.length),i=e;else{var p=(o=z(e))-u+1,y=Math.round(m(e,p));m(y,u-1)>=10&&(o+=1,y=Math.floor(y/10)),r=y.toString(),i=m(y,u-1-o)}}if(o>=u-1?(r+=H("0",o-u+1),a=o+1):o>=0?(r="".concat(r.slice(0,o+1),".").concat(r.slice(o+1)),a=o+1):(r="0.".concat(H("0",-o-1)).concat(r),a=1),r.indexOf(".")>=0&&n>t){for(var v=n-t;v>0&&"0"===r[r.length-1];)r=r.slice(0,-1),v--;"."===r[r.length-1]&&(r=r.slice(0,-1))}return{formattedString:r,roundedNumber:i,integerDigitsCount:a};function m(e,t){return t<0?e*Math.pow(10,-t):e/Math.pow(10,t)}},ne=function(e,t,n){var r,o,i=n,a=Math.round(e*Math.pow(10,i)),u=a/Math.pow(10,i);if(a<1e21)r=a.toString();else{var s=(r=a.toString()).split("e"),c=s[0],l=s[1];r=c.replace(".",""),r+=H("0",Math.max(+l-r.length+1,0))}if(0!==i){var f=r.length;f<=i&&(r=H("0",i+1-f)+r,f=i+1);var d=r.slice(0,f-i),h=r.slice(f-i);r="".concat(d,".").concat(h),o=d.length}else o=r.length;for(var p=n-t;p>0&&"0"===r[r.length-1];)r=r.slice(0,-1),p--;return"."===r[r.length-1]&&(r=r.slice(0,-1)),{formattedString:r,roundedNumber:u,integerDigitsCount:o}},re=function(e,t){var n,r=t<0||l(t,-0);switch(r&&(t=-t),e.roundingType){case"significantDigits":n=te(t,e.minimumSignificantDigits,e.maximumSignificantDigits);break;case"fractionDigits":n=ne(t,e.minimumFractionDigits,e.maximumFractionDigits);break;default:(n=te(t,1,2)).integerDigitsCount>1&&(n=ne(t,0,0))}t=n.roundedNumber;var o=n.formattedString,i=n.integerDigitsCount,a=e.minimumIntegerDigits;return i<a&&(o=H("0",a-i)+o),r&&(t=-t),{roundedNumber:t,formattedString:o}},oe=function(e,t,n){var r=n.getInternalSlots;if(0===t)return[0,0];t<0&&(t=-t);var o=z(t),i=ee(e,o,{getInternalSlots:r});t=i<0?t*Math.pow(10,-i):t/Math.pow(10,i);var a=re(r(e),t);return 0===a.roundedNumber||z(a.roundedNumber)===o-i?[i,o]:[ee(e,o+1,{getInternalSlots:r}),o+1]},ie=function(e,t){var n=t.currencyDigitsData;return h(n,e)?n[e]:2},ae=function(e,t,n){var r=(0,n.getInternalSlots)(e),o=r.dataLocaleData.numbers.symbols[r.numberingSystem].approximatelySign;return t.push({type:"approximatelySign",value:o}),t},ue=function(e,t,n,r){var o,i,a=e.sign,u=e.exponent,s=e.magnitude,c=r.notation,l=r.style,f=r.numberingSystem,d=t.numbers.nu[0],h=null;if("compact"===c&&s&&(h=function(e,t,n,r,o,i,a){var u,s,c=e.roundedNumber,l=e.sign,f=e.magnitude,d=String(Math.pow(10,f)),h=n.numbers.nu[0];if("currency"===r&&"name"!==i){var p=null===(u=((y=n.numbers.currency)[a]||y[h]).short)||void 0===u?void 0:u[d];if(!p)return null;s=le(t,c,p)}else{var y,v=((y=n.numbers.decimal)[a]||y[h])[o][d];if(!v)return null;s=le(t,c,v)}return"0"===s?null:s=ce(s,l).replace(/([^\s;\-\+\d¤]+)/g,"{c:$1}").replace(/0+/,"0")}(e,n,t,l,r.compactDisplay,r.currencyDisplay,f)),"currency"===l&&"name"!==r.currencyDisplay){var p=t.currencies[r.currency];if(p)switch(r.currencyDisplay){case"code":o=r.currency;break;case"symbol":o=p.symbol;break;default:o=p.narrow}else o=r.currency}i=h||("decimal"===l||"unit"===l||"currency"===l&&"name"===r.currencyDisplay?ce((t.numbers.decimal[f]||t.numbers.decimal[d]).standard,a):ce("currency"===l?(v=t.numbers.currency[f]||t.numbers.currency[d])[r.currencySign]:t.numbers.percent[f]||t.numbers.percent[d],a));var y=Be.exec(i)[0];if(i=i.replace(Be,"{0}").replace(/'(.)'/g,"$1"),"currency"===l&&"name"!==r.currencyDisplay){var v,m=(v=t.numbers.currency[f]||t.numbers.currency[d]).currencySpacing.afterInsertBetween;m&&!Fe.test(o)&&(i=i.replace("¤{0}","¤".concat(m,"{0}")));var g=v.currencySpacing.beforeInsertBetween;g&&!Le.test(o)&&(i=i.replace("{0}¤","{0}".concat(g,"¤")))}for(var b=i.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g),w=[],_=t.numbers.symbols[f]||t.numbers.symbols[d],S=0,E=b;S<E.length;S++)if(K=E[S])switch(K){case"{0}":w.push.apply(w,se(_,e,c,u,f,!h&&Boolean(r.useGrouping),y,l));break;case"-":w.push({type:"minusSign",value:_.minusSign});break;case"+":w.push({type:"plusSign",value:_.plusSign});break;case"%":w.push({type:"percentSign",value:_.percentSign});break;case"¤":w.push({type:"currency",value:o});break;default:/^\{c:/.test(K)?w.push({type:"compact",value:K.substring(3,K.length-1)}):w.push({type:"literal",value:K})}switch(l){case"currency":if("name"===r.currencyDisplay){var O,x=(t.numbers.currency[f]||t.numbers.currency[d]).unitPattern,k=t.currencies[r.currency];O=k?le(n,e.roundedNumber*Math.pow(10,u),k.displayName):r.currency;for(var A=[],P=0,j=x.split(/(\{[01]\})/g);P<j.length;P++)switch(K=j[P]){case"{0}":A.push.apply(A,w);break;case"{1}":A.push({type:"currency",value:O});break;default:K&&A.push({type:"literal",value:K})}return A}return w;case"unit":var D=r.unit,C=r.unitDisplay,T=t.units.simple[D];if(x=void 0,T)x=le(n,e.roundedNumber*Math.pow(10,u),t.units.simple[D][C]);else{var I=D.split("-per-"),M=I[0],R=I[1];T=t.units.simple[M];var N=le(n,e.roundedNumber*Math.pow(10,u),t.units.simple[M][C]),L=t.units.simple[R].perUnit[C];if(L)x=L.replace("{0}",N);else{var F=t.units.compound.per[C],B=le(n,1,t.units.simple[R][C]);x=x=F.replace("{0}",N).replace("{1}",B.replace("{0}",""))}}A=[];for(var U=0,G=x.split(/(\s*\{0\}\s*)/);U<G.length;U++){var K=G[U],V=/^(\s*)\{0\}(\s*)$/.exec(K);V?(V[1]&&A.push({type:"literal",value:V[1]}),A.push.apply(A,w),V[2]&&A.push({type:"literal",value:V[2]})):K&&A.push({type:"unit",value:K})}return A;default:return w}},se=function(e,t,n,r,o,i,a,u){var s=[],c=t.formattedString,l=t.roundedNumber;if(isNaN(l))return[{type:"nan",value:c}];if(!isFinite(l))return[{type:"infinity",value:c}];var f=Ne[o];f&&(c=c.replace(/\d/g,(function(e){return f[+e]||e})));var d,h,p=c.indexOf(".");if(p>0?(d=c.slice(0,p),h=c.slice(p+1)):d=c,i&&("compact"!==n||l>=1e4)){var y="currency"===u&&null!=e.currencyGroup?e.currencyGroup:e.group,v=[],m=a.split(".")[0].split(","),g=3,b=3;m.length>1&&(g=m[m.length-1].length),m.length>2&&(b=m[m.length-2].length);var w=d.length-g;if(w>0){for(v.push(d.slice(w,w+g)),w-=b;w>0;w-=b)v.push(d.slice(w,w+b));v.push(d.slice(0,w+b))}else v.push(d);for(;v.length>0;){var _=v.pop();s.push({type:"integer",value:_}),v.length>0&&s.push({type:"group",value:y})}}else s.push({type:"integer",value:d});if(void 0!==h){var S="currency"===u&&null!=e.currencyDecimal?e.currencyDecimal:e.decimal;s.push({type:"decimal",value:S},{type:"fraction",value:h})}if(("scientific"===n||"engineering"===n)&&isFinite(l)){s.push({type:"exponentSeparator",value:e.exponential}),r<0&&(s.push({type:"exponentMinusSign",value:e.minusSign}),r=-r);var E=ne(r,0,0);s.push({type:"exponentInteger",value:E.formattedString})}return s},ce=function(e,t){e.indexOf(";")<0&&(e="".concat(e,";-").concat(e));var n=e.split(";"),r=n[0],o=n[1];switch(t){case 0:return r;case-1:return o;default:return o.indexOf("-")>=0?o.replace(/-/g,"+"):"+".concat(r)}},le=function(e,t,n){return n[e.select(t)]||n.other},fe=function(e,t,n){var r,o,i,a=n.getInternalSlots,u=a(e),s=u.pl,c=u.dataLocaleData,f=u.numberingSystem,d=c.numbers.symbols[f]||c.numbers.symbols[c.numbers.nu[0]],h=0,p=0;if(isNaN(t))o=d.nan;else if(t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)o=d.infinity;else{if(!l(t,-0)){if(!isFinite(t))throw new Error("Input must be a mathematical value");"percent"==u.style&&(t*=100),p=(r=oe(e,t,{getInternalSlots:a}))[0],h=r[1],t=p<0?t*Math.pow(10,-p):t/Math.pow(10,p)}var y=re(u,t);o=y.formattedString,t=y.roundedNumber}switch(u.signDisplay){case"never":i=0;break;case"auto":i=l(t,0)||t>0||isNaN(t)?0:-1;break;case"always":i=l(t,0)||t>0||isNaN(t)?1:-1;break;default:i=0===t||isNaN(t)?0:t>0?1:-1}return ue({roundedNumber:t,formattedString:o,exponent:p,magnitude:h,sign:i},u.dataLocaleData,s,u)},de=function(e,t,n,r){var o=r.getInternalSlots;if(isNaN(t)||isNaN(n))throw new RangeError("Input must be a number");var i=[],a=fe(e,t,{getInternalSlots:o}),u=fe(e,n,{getInternalSlots:o});if(a===u)return ae(e,a,{getInternalSlots:o});for(var s=0,c=a;s<c.length;s++)c[s].source="startRange";i=i.concat(a);var l=o(e),f=l.dataLocaleData.numbers.symbols[l.numberingSystem];i.push({type:"literal",value:f.rangeSign,source:"shared"});for(var d=0,h=u;d<h.length;d++)h[d].source="endRange";return i.concat(u)},he=function(e,t,n,r){return de(e,t,n,{getInternalSlots:r.getInternalSlots}).map((function(e){return e.value})).join("")},pe=function(e,t,n,r){return de(e,t,n,{getInternalSlots:r.getInternalSlots}).map((function(e,t){return{type:e.type,value:e.value,source:e.source,result:t.toString()}}))},ye=function(e,t,n){for(var r=fe(e,t,n),o=f(0),i=0,a=r;i<a.length;i++){var u=a[i];o.push({type:u.type,value:u.value})}return o},ve=function(e,t){return t?Ue[e]:Ge[e]},me=function(e,t,n,r,o){var i=I(t,"minimumIntegerDigits",1,21,1),a=t.minimumFractionDigits,u=t.maximumFractionDigits,s=t.minimumSignificantDigits,c=t.maximumSignificantDigits;e.minimumIntegerDigits=i;var l=M(t,"roundingPriority","string",["auto","morePrecision","lessPrecision"],"auto"),f=void 0!==s||void 0!==c,d=void 0!==a||void 0!==u,h=!0,p=!0;if("auto"===l&&(h=f,(f||!d&&"compact"===o)&&(p=!1)),h&&(f?(s=T(s,1,21,1),c=T(c,s,21,21),e.minimumSignificantDigits=s,e.maximumSignificantDigits=c):(e.minimumSignificantDigits=1,e.maximumSignificantDigits=21)),p)if(d){if(a=T(a,0,20,void 0),u=T(u,0,20,void 0),void 0===a)a=Math.min(n,u);else if(void 0===u)u=Math.max(r,a);else if(a>u)throw new RangeError("Invalid range, ".concat(a," > ").concat(u));e.minimumFractionDigits=a,e.maximumFractionDigits=u}else e.minimumFractionDigits=n,e.maximumFractionDigits=r;h||p?e.roundingType="morePrecision"===l?"morePrecision":"lessPrecision"===l?"lessPrecision":f?"significantDigits":"fractionDigits":(e.roundingType="morePrecision",e.minimumFractionDigits=0,e.maximumFractionDigits=0,e.minimumSignificantDigits=1,e.maximumSignificantDigits=2)},ge=function(e,t,n){void 0===t&&(t=Object.create(null));var r=(0,n.getInternalSlots)(e),o=M(t,"style","string",["decimal","percent","currency","unit"],"decimal");r.style=o;var i=M(t,"currency","string",void 0,void 0);if(void 0!==i&&!U(i))throw RangeError("Malformed currency code");if("currency"===o&&void 0===i)throw TypeError("currency cannot be undefined");var a=M(t,"currencyDisplay","string",["code","symbol","narrowSymbol","name"],"symbol"),u=M(t,"currencySign","string",["standard","accounting"],"standard"),s=M(t,"unit","string",void 0,void 0);if(void 0!==s&&!G(s))throw RangeError("Invalid unit argument for Intl.NumberFormat()");if("unit"===o&&void 0===s)throw TypeError("unit cannot be undefined");var c=M(t,"unitDisplay","string",["short","narrow","long"],"short");"currency"===o&&(r.currency=i.toUpperCase(),r.currencyDisplay=a,r.currencySign=u),"unit"===o&&(r.unit=s,r.unitDisplay=c)},be=function(e,t,n,o){var i=o.getInternalSlots,a=o.localeData,u=o.availableLocales,s=o.numberingSystemNames,c=o.getDefaultLocale,l=o.currencyDigitsData,f=r(t),d=C(n),h=Object.create(null),p=M(d,"localeMatcher","string",["lookup","best fit"],"best fit");h.localeMatcher=p;var y=M(d,"numberingSystem","string",void 0,void 0);if(void 0!==y&&s.indexOf(y)<0)throw RangeError("Invalid numberingSystems: ".concat(y));h.nu=y;var v=(0,Ke.ResolveLocale)(Array.from(u),f,h,["nu"],a,c),m=a[v.dataLocale];Z(!!m,"Missing locale data for ".concat(v.dataLocale));var g=i(e);g.locale=v.locale,g.dataLocale=v.dataLocale,g.numberingSystem=v.nu,g.dataLocaleData=m,ge(e,d,{getInternalSlots:i});var b,w,_=g.style;if("currency"===_){var S=ie(g.currency,{currencyDigitsData:l});b=S,w=S}else b=0,w="percent"===_?0:3;var E=M(d,"notation","string",["standard","scientific","engineering","compact"],"standard");g.notation=E,me(g,d,b,w,E);var O=I(d,"roundingIncrement",1,5e3,1);if(-1===Ve.indexOf(O))throw new RangeError("Invalid rounding increment value: ".concat(O,".\nValid values are ").concat(Ve,"."));if(1!==O&&"fractionDigits"!==g.roundingType)throw new TypeError("For roundingIncrement > 1 only fractionDigits is a valid roundingType");if(1!==O&&g.maximumFractionDigits!==g.minimumFractionDigits)throw new RangeError("With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.");g.roundingIncrement=O;var x=M(d,"trailingZeroDisplay","string",["auto","stripIfInteger"],"auto");g.trailingZeroDisplay=x;var k=M(d,"compactDisplay","string",["short","long"],"short"),A="auto";return"compact"===E&&(g.compactDisplay=k,A="min2"),g.useGrouping=N(d,"useGrouping",["min2","auto","always"],"always",!1,A),g.signDisplay=M(d,"signDisplay","string",["auto","never","always","exceptZero","negative"],"auto"),g.roundingMode=M(d,"roundingMode","string",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],"halfExpand"),e},we=function(e){for(var t=[],n=e.indexOf("{"),r=0,o=0,i=e.length;n<e.length&&n>-1;)Z((r=e.indexOf("}",n))>n,"Invalid pattern ".concat(e)),n>o&&t.push({type:"literal",value:e.substring(o,n)}),t.push({type:e.substring(n+1,r),value:void 0}),o=r+1,n=e.indexOf("{",o);return o<i&&t.push({type:"literal",value:e.substring(o,i)}),t},_e=function(e,t,n){return void 0!==n&&M(n=c(n),"localeMatcher","string",["lookup","best fit"],"best fit"),(0,Ke.LookupSupportedLocales)(Array.from(e),t)},Se=function(e){return"MISSING_LOCALE_DATA"===e.type};n.r(t),n.d(t,{ApplyUnsignedRoundingMode:function(){return K},ArrayCreate:function(){return f},CanonicalizeLocaleList:function(){return r},CanonicalizeTimeZoneName:function(){return o},CoerceOptionsToObject:function(){return C},CollapseNumberRange:function(){return V},ComputeExponent:function(){return oe},ComputeExponentForMagnitude:function(){return ee},CurrencyDigits:function(){return ie},DateFromTime:function(){return x},Day:function(){return v},DayFromYear:function(){return g},DayWithinYear:function(){return S},DaysInYear:function(){return _},FormatApproximately:function(){return ae},FormatNumericRange:function(){return he},FormatNumericRangeToParts:function(){return pe},FormatNumericToParts:function(){return ye},FormatNumericToString:function(){return re},GetNumberOption:function(){return I},GetOption:function(){return M},GetOptionsObject:function(){return R},GetStringOrBooleanOption:function(){return N},GetUnsignedRoundingMode:function(){return ve},HasOwnProperty:function(){return h},HourFromTime:function(){return k},InLeapYear:function(){return E},InitializeNumberFormat:function(){return be},IsSanctionedSimpleUnitIdentifier:function(){return F},IsValidTimeZoneName:function(){return B},IsWellFormedCurrencyCode:function(){return U},IsWellFormedUnitIdentifier:function(){return G},MinFromTime:function(){return A},MonthFromTime:function(){return O},OrdinaryHasInstance:function(){return j},PartitionNumberPattern:function(){return fe},PartitionNumberRangePattern:function(){return de},PartitionPattern:function(){return we},RangePatternType:function(){return Ee},SANCTIONED_UNITS:function(){return Te},SIMPLE_UNITS:function(){return Ie},SameValue:function(){return l},SecFromTime:function(){return P},SetNumberFormatDigitOptions:function(){return me},SetNumberFormatUnitOptions:function(){return ge},SupportedLocales:function(){return _e},TimeClip:function(){return s},TimeFromYear:function(){return b},ToNumber:function(){return a},ToObject:function(){return c},ToRawFixed:function(){return ne},ToRawPrecision:function(){return te},ToString:function(){return i},Type:function(){return p},WeekDay:function(){return m},YearFromTime:function(){return w},_formatToParts:function(){return ue},createDataProperty:function(){return X},defineProperty:function(){return Q},getInternalSlot:function(){return Y},getMagnitude:function(){return z},getMultiInternalSlots:function(){return $},invariant:function(){return Z},isLiteralPart:function(){return J},isMissingLocaleDataError:function(){return Se},msFromTime:function(){return D},removeUnitNamespace:function(){return L},setInternalSlot:function(){return q},setMultiInternalSlots:function(){return W}});var Ee,Oe,xe=864e5,ke=24,Ae=60,Pe=60,je=1e3,De=je*Pe,Ce=De*Ae,Te=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"],Ie=Te.map(L),Me=/[^A-Z]/,Re=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/,Ne={adlm:["𞥐","𞥑","𞥒","𞥓","𞥔","𞥕","𞥖","𞥗","𞥘","𞥙"],ahom:["𑜰","𑜱","𑜲","𑜳","𑜴","𑜵","𑜶","𑜷","𑜸","𑜹"],arab:["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],arabext:["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],bali:["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],beng:["০","১","২","৩","৪","৫","৬","৭","৮","৯"],bhks:["𑱐","𑱑","𑱒","𑱓","𑱔","𑱕","𑱖","𑱗","𑱘","𑱙"],brah:["𑁦","𑁧","𑁨","𑁩","𑁪","𑁫","𑁬","𑁭","𑁮","𑁯"],cakm:["𑄶","𑄷","𑄸","𑄹","𑄺","𑄻","𑄼","𑄽","𑄾","𑄿"],cham:["꩐","꩑","꩒","꩓","꩔","꩕","꩖","꩗","꩘","꩙"],deva:["०","१","२","३","४","५","६","७","८","९"],diak:["𑥐","𑥑","𑥒","𑥓","𑥔","𑥕","𑥖","𑥗","𑥘","𑥙"],fullwide:["0","1","2","3","4","5","6","7","8","9"],gong:["𑶠","𑶡","𑶢","𑶣","𑶤","𑶥","𑶦","𑶧","𑶨","𑶩"],gonm:["𑵐","𑵑","𑵒","𑵓","𑵔","𑵕","𑵖","𑵗","𑵘","𑵙"],gujr:["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],guru:["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],hanidec:["〇","一","二","三","四","五","六","七","八","九"],hmng:["𖭐","𖭑","𖭒","𖭓","𖭔","𖭕","𖭖","𖭗","𖭘","𖭙"],hmnp:["𞅀","𞅁","𞅂","𞅃","𞅄","𞅅","𞅆","𞅇","𞅈","𞅉"],java:["꧐","꧑","꧒","꧓","꧔","꧕","꧖","꧗","꧘","꧙"],kali:["꤀","꤁","꤂","꤃","꤄","꤅","꤆","꤇","꤈","꤉"],khmr:["០","១","២","៣","៤","៥","៦","៧","៨","៩"],knda:["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],lana:["᪀","᪁","᪂","᪃","᪄","᪅","᪆","᪇","᪈","᪉"],lanatham:["᪐","᪑","᪒","᪓","᪔","᪕","᪖","᪗","᪘","᪙"],laoo:["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],lepc:["᪐","᪑","᪒","᪓","᪔","᪕","᪖","᪗","᪘","᪙"],limb:["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],mathbold:["𝟎","𝟏","𝟐","𝟑","𝟒","𝟓","𝟔","𝟕","𝟖","𝟗"],mathdbl:["𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"],mathmono:["𝟶","𝟷","𝟸","𝟹","𝟺","𝟻","𝟼","𝟽","𝟾","𝟿"],mathsanb:["𝟬","𝟭","𝟮","𝟯","𝟰","𝟱","𝟲","𝟳","𝟴","𝟵"],mathsans:["𝟢","𝟣","𝟤","𝟥","𝟦","𝟧","𝟨","𝟩","𝟪","𝟫"],mlym:["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],modi:["𑙐","𑙑","𑙒","𑙓","𑙔","𑙕","𑙖","𑙗","𑙘","𑙙"],mong:["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],mroo:["𖩠","𖩡","𖩢","𖩣","𖩤","𖩥","𖩦","𖩧","𖩨","𖩩"],mtei:["꯰","꯱","꯲","꯳","꯴","꯵","꯶","꯷","꯸","꯹"],mymr:["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],mymrshan:["႐","႑","႒","႓","႔","႕","႖","႗","႘","႙"],mymrtlng:["꧰","꧱","꧲","꧳","꧴","꧵","꧶","꧷","꧸","꧹"],newa:["𑑐","𑑑","𑑒","𑑓","𑑔","𑑕","𑑖","𑑗","𑑘","𑑙"],nkoo:["߀","߁","߂","߃","߄","߅","߆","߇","߈","߉"],olck:["᱐","᱑","᱒","᱓","᱔","᱕","᱖","᱗","᱘","᱙"],orya:["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],osma:["𐒠","𐒡","𐒢","𐒣","𐒤","𐒥","𐒦","𐒧","𐒨","𐒩"],rohg:["𐴰","𐴱","𐴲","𐴳","𐴴","𐴵","𐴶","𐴷","𐴸","𐴹"],saur:["꣐","꣑","꣒","꣓","꣔","꣕","꣖","꣗","꣘","꣙"],segment:["🯰","🯱","🯲","🯳","🯴","🯵","🯶","🯷","🯸","🯹"],shrd:["𑇐","𑇑","𑇒","𑇓","𑇔","𑇕","𑇖","𑇗","𑇘","𑇙"],sind:["𑋰","𑋱","𑋲","𑋳","𑋴","𑋵","𑋶","𑋷","𑋸","𑋹"],sinh:["෦","෧","෨","෩","෪","෫","෬","෭","෮","෯"],sora:["𑃰","𑃱","𑃲","𑃳","𑃴","𑃵","𑃶","𑃷","𑃸","𑃹"],sund:["᮰","᮱","᮲","᮳","᮴","᮵","᮶","᮷","᮸","᮹"],takr:["𑛀","𑛁","𑛂","𑛃","𑛄","𑛅","𑛆","𑛇","𑛈","𑛉"],talu:["᧐","᧑","᧒","᧓","᧔","᧕","᧖","᧗","᧘","᧙"],tamldec:["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],telu:["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],thai:["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],tibt:["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"],tirh:["𑓐","𑓑","𑓒","𑓓","𑓔","𑓕","𑓖","𑓗","𑓘","𑓙"],vaii:["ᘠ","ᘡ","ᘢ","ᘣ","ᘤ","ᘥ","ᘦ","ᘧ","ᘨ","ᘩ"],wara:["𑣠","𑣡","𑣢","𑣣","𑣤","𑣥","𑣦","𑣧","𑣨","𑣩"],wcho:["𞋰","𞋱","𞋲","𞋳","𞋴","𞋵","𞋶","𞋷","𞋸","𞋹"]},Le=new RegExp("^".concat(Re.source)),Fe=new RegExp("".concat(Re.source,"$")),Be=/[#0](?:[\.,][#0]+)*/g,Ue={ceil:"zero",floor:"infinity",expand:"infinity",trunc:"zero",halfCeil:"half-zero",halfFloor:"half-infinity",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"},Ge={ceil:"infinity",floor:"zero",expand:"infinity",trunc:"zero",halfCeil:"half-infinity",halfFloor:"half-zero",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"},Ke=n(3367),Ve=[1,2,5,10,20,25,50,100,200,250,500,1e3,2e3],ze=n(2712);Oe=Error,(0,ze.__extends)((function(){var e=null!==Oe&&Oe.apply(this,arguments)||this;return e.type="MISSING_LOCALE_DATA",e}),Oe),function(e){e.startRange="startRange",e.shared="shared",e.endRange="endRange"}(Ee||(Ee={}))},6979:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationRecordSign=void 0;var r=n(2552);t.DurationRecordSign=function(e){for(var t=0,n=r.TABLE_1;t<n.length;t++){var o=n[t];if(e[o]<0)return-1;if(e[o]>0)return 1}return 0}},7332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetDurationUnitOptions=void 0;var r=n(2943);t.GetDurationUnitOptions=function(e,t,n,o,i,a){var u=(0,r.GetOption)(t,e,"string",o,void 0),s="always";void 0===u&&("digital"===n?("hours"!==e&&"minutes"!==e&&"seconds"!==e&&(s="auto"),u=i):(s="auto",u="numeric"===a||"2-digit"===a?"numeric":n));var c="".concat(e,"Display"),l=(0,r.GetOption)(t,c,"string",["always","auto"],s);if("numeric"===a||"2-digit"===a){if("numeric"!==u&&"2-digit"!==u)throw new RangeError("Can't mix numeric and non-numeric styles");if("minutes"!==e&&"seconds"!==e||(u="2-digit"),"numeric"===u&&"always"===l&&("milliseconds"===e||"microseconds"===e||"nanoseconds"===e))throw new RangeError("Can't display milliseconds, microseconds, or nanoseconds in numeric format")}return{style:u,display:l}}},1076:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsValidDurationRecord=void 0;var r=n(2943),o=n(2552),i=n(6979);t.IsValidDurationRecord=function(e){for(var t=(0,i.DurationRecordSign)(e),n=0,a=o.TABLE_1;n<a.length;n++){var u=a[n],s=e[u];if((0,r.invariant)(isFinite(Number(s)),"".concat(u," is not finite")),s<0&&t>0)return!1;if(s>0&&t<0)return!1}return!0}},984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartitionDurationFormatPattern=void 0;var r=n(2943),o=n(2552),i=n(715),a=n(6732);t.PartitionDurationFormatPattern=function(e,t){var n=[],u=!1,s=!1,c=(0,a.getInternalSlots)(e),l=c.dataLocale,f=i.DurationFormat.localeData[l];if(!f)throw new TypeError("Invalid locale");for(var d=c.numberingSystem,h=f.digitalFormat[d],p=function(e){var r=o.TABLE_2[e],i=t[r.valueField],a=c[r.styleSlot],l=c[r.displaySlot],f=r.unit,d=r.numberFormatUnit,p=Object.create(null);if("seconds"!==f&&"milliseconds"!==f&&"microseconds"!==f||"numeric"===("seconds"===f?c.milliseconds:"milliseconds"===f?c.microseconds:c.nanoseconds)&&(i+="seconds"===f?t.milliseconds/1e3+t.microseconds/1e6+t.nanoseconds/1e9:"milliseconds"===f?t.microseconds/1e3+t.nanoseconds/1e6:t.nanoseconds/1e3,void 0===c.fractionalDigits?(p.maximumFractionDigits=9,p.minimumFractionDigits=0):(p.maximumFractionDigits=c.fractionalDigits,p.minimumFractionDigits=c.fractionalDigits),p.roundingMode="trunc",u=!0),0!==i||"auto"!==l){p.numberingSystem=c.numberingSystem,"2-digit"===a&&(p.minimumIntegerDigits=2),"2-digit"!==a&&"numeric"!==a&&(p.style="unit",p.unit=d,p.unitDisplay=a);var y,v=new Intl.NumberFormat(c.locale,p);s?(y=n[n.length-1]).push({type:"literal",value:h}):y=[],v.formatToParts(i).forEach((function(e){var t=e.type,n=e.value;y.push({type:t,value:n,unit:d})})),s||("2-digit"!==a&&"numeric"!==a||(s=!0),n.push(y))}else s=!1},y=0;y<o.TABLE_2.length&&!u;y++)p(y);var v=Object.create(null);v.type="unit";var m=c.style;"digital"===m&&(m="short"),v.style=m;for(var g=new Intl.ListFormat(c.locale,v),b=[],w=0,_=n;w<_.length;w++){for(var S="",E=0,O=_[w];E<O.length;E++)S+=I=O[E].value;b.push(S)}for(var x=g.formatToParts(b),k=0,A=n.length,P=[],j=0,D=x;j<D.length;j++){var C=D[j],T=C.type,I=C.value;if("element"===T){(0,r.invariant)(k<A,"Index out of bounds");for(var M=0,R=n[k];M<R.length;M++){var N=R[M];P.push(N)}k++}else(0,r.invariant)("literal"===T,"Type must be literal"),P.push({type:"literal",value:I})}return P}},8905:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToDurationRecord=void 0;var r=n(1076),o=n(1370);t.ToDurationRecord=function(e){if("object"!=typeof e){if("string"==typeof e)throw new RangeError("Invalid duration format");throw new TypeError("Invalid duration")}var t={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};if(void 0!==e.days&&(t.days=(0,o.ToIntegerIfIntegral)(e.days)),void 0!==e.hours&&(t.hours=(0,o.ToIntegerIfIntegral)(e.hours)),void 0!==e.microseconds&&(t.microseconds=(0,o.ToIntegerIfIntegral)(e.microseconds)),void 0!==e.milliseconds&&(t.milliseconds=(0,o.ToIntegerIfIntegral)(e.milliseconds)),void 0!==e.minutes&&(t.minutes=(0,o.ToIntegerIfIntegral)(e.minutes)),void 0!==e.months&&(t.months=(0,o.ToIntegerIfIntegral)(e.months)),void 0!==e.nanoseconds&&(t.nanoseconds=(0,o.ToIntegerIfIntegral)(e.nanoseconds)),void 0!==e.seconds&&(t.seconds=(0,o.ToIntegerIfIntegral)(e.seconds)),void 0!==e.weeks&&(t.weeks=(0,o.ToIntegerIfIntegral)(e.weeks)),void 0!==e.years&&(t.years=(0,o.ToIntegerIfIntegral)(e.years)),void 0===e.years&&void 0===e.months&&void 0===e.weeks&&void 0===e.days&&void 0===e.hours&&void 0===e.minutes&&void 0===e.seconds&&void 0===e.milliseconds&&void 0===e.microseconds&&void 0===e.nanoseconds)throw new TypeError("Invalid duration format");if(!(0,r.IsValidDurationRecord)(t))throw new RangeError("Invalid duration format");return t}},1370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToIntegerIfIntegral=void 0;var r=n(2943);t.ToIntegerIfIntegral=function(e){var t=(0,r.ToNumber)(e);if(!Number.isInteger(t))throw new RangeError("".concat(e," is not an integer"));return t}},2552:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TABLE_2=t.TABLE_1=void 0,t.TABLE_1=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"],t.TABLE_2=[{valueField:"years",styleSlot:"years",displaySlot:"yearsDisplay",unit:"years",numberFormatUnit:"year"},{valueField:"months",styleSlot:"months",displaySlot:"monthsDisplay",unit:"months",numberFormatUnit:"month"},{valueField:"weeks",styleSlot:"weeks",displaySlot:"weeksDisplay",unit:"weeks",numberFormatUnit:"week"},{valueField:"days",styleSlot:"days",displaySlot:"daysDisplay",unit:"days",numberFormatUnit:"day"},{valueField:"hours",styleSlot:"hours",displaySlot:"hoursDisplay",unit:"hours",numberFormatUnit:"hour"},{valueField:"minutes",styleSlot:"minutes",displaySlot:"minutesDisplay",unit:"minutes",numberFormatUnit:"minute"},{valueField:"seconds",styleSlot:"seconds",displaySlot:"secondsDisplay",unit:"seconds",numberFormatUnit:"second"},{valueField:"milliseconds",styleSlot:"milliseconds",displaySlot:"millisecondsDisplay",unit:"milliseconds",numberFormatUnit:"millisecond"},{valueField:"microseconds",styleSlot:"microseconds",displaySlot:"microsecondsDisplay",unit:"microseconds",numberFormatUnit:"microsecond"},{valueField:"nanoseconds",styleSlot:"nanoseconds",displaySlot:"nanosecondsDisplay",unit:"nanoseconds",numberFormatUnit:"nanosecond"}]},715:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationFormat=void 0;var r=n(2943),o=n(3367),i=n(7332),a=n(984),s=n(8905),c=n(6732),l=n(743),f=n(2052),d=["locale","style","years","yearsDisplay","months","monthsDisplay","weeks","weeksDisplay","days","daysDisplay","hours","hoursDisplay","minutes","minutesDisplay","seconds","secondsDisplay","milliseconds","millisecondsDisplay","microseconds","microsecondsDisplay","nanoseconds","nanosecondsDisplay","numberingSystem","fractionalDigits"],h=[{styleSlot:"years",displaySlot:"yearsDisplay",unit:"years",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"months",displaySlot:"monthsDisplay",unit:"months",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"weeks",displaySlot:"weeksDisplay",unit:"weeks",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"days",displaySlot:"daysDisplay",unit:"days",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"hours",displaySlot:"hoursDisplay",unit:"hours",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"minutes",displaySlot:"minutesDisplay",unit:"minutes",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"seconds",displaySlot:"secondsDisplay",unit:"seconds",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"milliseconds",displaySlot:"millisecondsDisplay",unit:"milliseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"},{styleSlot:"microseconds",displaySlot:"microsecondsDisplay",unit:"microseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"},{styleSlot:"nanoseconds",displaySlot:"nanosecondsDisplay",unit:"nanoseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"}],p=function(){function e(t,n){if(!(this&&u(this,e)?this.constructor:void 0))throw new TypeError("Intl.DurationFormat must be called with 'new'");var a=(0,r.CanonicalizeLocaleList)(t),s=Object.create(null),f=void 0===n?Object.create(null):(0,r.ToObject)(n),d=(0,r.GetOption)(f,"localeMatcher","string",["best fit","lookup"],"best fit"),p=(0,r.GetOption)(f,"numberingSystem","string",void 0,void 0);if(void 0!==p&&l.numberingSystemNames.indexOf(p)<0)throw RangeError("Invalid numberingSystems: ".concat(p));s.nu=p,s.localeMatcher=d;var y=e.localeData,v=e.availableLocales,m=(0,o.ResolveLocale)(v,a,s,["nu"],y,e.getDefaultLocale),g=m.locale,b=(0,c.getInternalSlots)(this);b.initializedDurationFormat=!0,b.locale=g,b.numberingSystem=m.nu;var w=(0,r.GetOption)(f,"style","string",["long","short","narrow","digital"],"short");b.style=w,b.dataLocale=m.dataLocale;var _="";h.forEach((function(e){var t=e.styleSlot,n=e.displaySlot,r=e.unit,o=e.values,a=e.digitalDefault,u=(0,i.GetDurationUnitOptions)(r,f,w,o,a,_);b[t]=u.style,b[n]=u.display,"hours"!==r&&"minutes"!==r&&"seconds"!==r&&"milliseconds"!==r&&"microseconds"!==r||(_=u.style)})),b.fractionalDigits=(0,r.GetNumberOption)(f,"fractionalDigits",0,9,void 0)}return e.prototype.resolvedOptions=function(){if("object"!=typeof this||!(0,r.OrdinaryHasInstance)(e,this))throw TypeError("Method Intl.DurationFormat.prototype.resolvedOptions called on incompatible receiver");for(var t=(0,c.getInternalSlots)(this),n={},o=0,i=d;o<i.length;o++){var a=i[o],u=t[a];"fractionalDigits"===a?void 0!==u&&(u=Number(u)):(0,r.invariant)(void 0!==u,"Missing internal slot ".concat(a)),n[a]=u}return n},e.prototype.formatToParts=function(e){if(void 0===(0,c.getInternalSlots)(this).initializedDurationFormat)throw new TypeError("Error uninitialized locale");for(var t=(0,s.ToDurationRecord)(e),n=[],r=0,o=(0,a.PartitionDurationFormatPattern)(this,t);r<o.length;r++){var i=o[r],u=i.type,l=i.unit,f={type:u,value:i.value};l&&(f.unit=l),n.push(f)}return n},e.prototype.format=function(e){if(void 0===(0,c.getInternalSlots)(this).initializedDurationFormat)throw new TypeError("Error uninitialized locale");for(var t=(0,s.ToDurationRecord)(e),n="",r=0,o=(0,a.PartitionDurationFormatPattern)(this,t);r<o.length;r++)n+=o[r].value;return n},e.supportedLocalesOf=function(t,n){return(0,r.SupportedLocales)(e.availableLocales,(0,r.CanonicalizeLocaleList)(t),n)},e.__defaultLocale="en",e.availableLocales=new Set,e.localeData=Object.keys(f.TIME_SEPARATORS.localeData).reduce((function(t,n){e.availableLocales.add(n);var r=f.TIME_SEPARATORS.localeData[n].nu;return t[n]={nu:r,digitalFormat:f.TIME_SEPARATORS.localeData[n].separator||r.reduce((function(e,t){return e[t]=f.TIME_SEPARATORS.default,e}),{})},t}),{}),e.getDefaultLocale=function(){return e.__defaultLocale},e.polyfilled=!0,e}();t.DurationFormat=p},6732:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInternalSlots=void 0;var n=new WeakMap;t.getInternalSlots=function(e){var t=n.get(e);return t||(t=Object.create(null),n.set(e,t)),t}},743:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberingSystemNames=void 0,t.numberingSystemNames=["adlm","ahom","arab","arabext","armn","armnlow","bali","beng","bhks","brah","cakm","cham","cyrl","deva","diak","ethi","fullwide","geor","gong","gonm","grek","greklow","gujr","guru","hanidays","hanidec","hans","hansfin","hant","hantfin","hebr","hmng","hmnp","java","jpan","jpanfin","jpanyear","kali","kawi","khmr","knda","lana","lanatham","laoo","latn","lepc","limb","mathbold","mathdbl","mathmono","mathsanb","mathsans","mlym","modi","mong","mroo","mtei","mymr","mymrshan","mymrtlng","nagm","newa","nkoo","olck","orya","osma","rohg","roman","romanlow","saur","segment","shrd","sind","sinh","sora","sund","takr","talu","taml","tamldec","telu","thai","tibt","tirh","tnsa","vaii","wara","wcho"]},2052:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TIME_SEPARATORS=void 0,t.TIME_SEPARATORS={default:":",localeData:{aa:{nu:["latn"]},"aa-DJ":{nu:["latn"]},"aa-ER":{nu:["latn"]},ab:{nu:["latn"]},af:{nu:["latn"]},"af-NA":{nu:["latn"]},agq:{nu:["latn"]},ak:{nu:["latn"]},am:{nu:["latn"]},an:{nu:["latn"]},ann:{nu:["latn"]},apc:{nu:["latn"]},ar:{nu:["arab","latn"]},"ar-AE":{nu:["latn","latn"]},"ar-BH":{nu:["arab","latn"]},"ar-DJ":{nu:["arab","latn"]},"ar-DZ":{nu:["latn","latn"]},"ar-EG":{nu:["arab","latn"]},"ar-EH":{nu:["latn","latn"]},"ar-ER":{nu:["arab","latn"]},"ar-IL":{nu:["arab","latn"]},"ar-IQ":{nu:["arab","latn"]},"ar-JO":{nu:["arab","latn"]},"ar-KM":{nu:["arab","latn"]},"ar-KW":{nu:["arab","latn"]},"ar-LB":{nu:["arab","latn"]},"ar-LY":{nu:["latn","latn"]},"ar-MA":{nu:["latn","latn"]},"ar-MR":{nu:["arab","latn"]},"ar-OM":{nu:["arab","latn"]},"ar-PS":{nu:["arab","latn"]},"ar-QA":{nu:["arab","latn"]},"ar-SA":{nu:["arab","latn"]},"ar-SD":{nu:["arab","latn"]},"ar-SO":{nu:["arab","latn"]},"ar-SS":{nu:["arab","latn"]},"ar-SY":{nu:["arab","latn"]},"ar-TD":{nu:["arab","latn"]},"ar-TN":{nu:["latn","latn"]},"ar-YE":{nu:["arab","latn"]},arn:{nu:["latn"]},as:{nu:["beng"]},asa:{nu:["latn"]},ast:{nu:["latn"]},az:{nu:["latn"]},"az-Arab":{nu:["arabext"]},"az-Arab-IQ":{nu:["arabext"]},"az-Arab-TR":{nu:["arabext"]},"az-Cyrl":{nu:["latn"]},"az-Latn":{nu:["latn"]},ba:{nu:["latn"]},bal:{nu:["latn"]},"bal-Arab":{nu:["latn"]},"bal-Latn":{nu:["latn"]},bas:{nu:["latn"]},be:{nu:["latn"]},"be-tarask":{nu:["latn"]},bem:{nu:["latn"]},bez:{nu:["latn"]},bg:{nu:["latn"]},bgc:{nu:["deva"]},bgn:{nu:["arabext"]},"bgn-AE":{nu:["arabext"]},"bgn-AF":{nu:["arabext"]},"bgn-IR":{nu:["arabext"]},"bgn-OM":{nu:["arabext"]},bho:{nu:["deva"]},blt:{nu:["latn"]},bm:{nu:["latn"]},"bm-Nkoo":{nu:["latn"]},bn:{nu:["beng"]},"bn-IN":{nu:["beng"]},bo:{nu:["latn"]},"bo-IN":{nu:["latn"]},br:{nu:["latn"]},brx:{nu:["latn"]},bs:{nu:["latn"]},"bs-Cyrl":{nu:["latn"]},"bs-Latn":{nu:["latn"]},bss:{nu:["latn"]},byn:{nu:["latn"]},ca:{nu:["latn"]},"ca-AD":{nu:["latn"]},"ca-ES-valencia":{nu:["latn"]},"ca-FR":{nu:["latn"]},"ca-IT":{nu:["latn"]},cad:{nu:["latn"]},cch:{nu:["latn"]},ccp:{nu:["cakm"]},"ccp-IN":{nu:["cakm"]},ce:{nu:["latn"]},ceb:{nu:["latn"]},cgg:{nu:["latn"]},cho:{nu:["latn"]},chr:{nu:["latn"]},cic:{nu:["latn"]},ckb:{nu:["arab"]},"ckb-IR":{nu:["arab"]},co:{nu:["latn"]},cs:{nu:["latn"]},cu:{nu:["latn"]},cv:{nu:["latn"]},cy:{nu:["latn"]},da:{nu:["latn"],separator:{latn:"."}},"da-GL":{nu:["latn"],separator:{latn:"."}},dav:{nu:["latn"]},de:{nu:["latn"]},"de-AT":{nu:["latn"]},"de-BE":{nu:["latn"]},"de-CH":{nu:["latn"]},"de-IT":{nu:["latn"]},"de-LI":{nu:["latn"]},"de-LU":{nu:["latn"]},dje:{nu:["latn"]},doi:{nu:["latn"]},dsb:{nu:["latn"]},dua:{nu:["latn"]},dv:{nu:["latn"]},dyo:{nu:["latn"]},dz:{nu:["tibt"]},ebu:{nu:["latn"]},ee:{nu:["latn"]},"ee-TG":{nu:["latn"]},el:{nu:["latn"]},"el-CY":{nu:["latn"]},"el-polyton":{nu:["latn"]},en:{nu:["latn"]},"en-001":{nu:["latn"]},"en-150":{nu:["latn"]},"en-AE":{nu:["latn"]},"en-AG":{nu:["latn"]},"en-AI":{nu:["latn"]},"en-AS":{nu:["latn"]},"en-AT":{nu:["latn"]},"en-AU":{nu:["latn"]},"en-BB":{nu:["latn"]},"en-BE":{nu:["latn"]},"en-BI":{nu:["latn"]},"en-BM":{nu:["latn"]},"en-BS":{nu:["latn"]},"en-BW":{nu:["latn"]},"en-BZ":{nu:["latn"]},"en-CA":{nu:["latn"]},"en-CC":{nu:["latn"]},"en-CH":{nu:["latn"]},"en-CK":{nu:["latn"]},"en-CM":{nu:["latn"]},"en-CX":{nu:["latn"]},"en-CY":{nu:["latn"]},"en-DE":{nu:["latn"]},"en-DG":{nu:["latn"]},"en-DK":{nu:["latn"],separator:{latn:"."}},"en-DM":{nu:["latn"]},"en-Dsrt":{nu:["latn"]},"en-ER":{nu:["latn"]},"en-FI":{nu:["latn"],separator:{latn:"."}},"en-FJ":{nu:["latn"]},"en-FK":{nu:["latn"]},"en-FM":{nu:["latn"]},"en-GB":{nu:["latn"]},"en-GD":{nu:["latn"]},"en-GG":{nu:["latn"]},"en-GH":{nu:["latn"]},"en-GI":{nu:["latn"]},"en-GM":{nu:["latn"]},"en-GU":{nu:["latn"]},"en-GY":{nu:["latn"]},"en-HK":{nu:["latn"]},"en-IE":{nu:["latn"]},"en-IL":{nu:["latn"]},"en-IM":{nu:["latn"]},"en-IN":{nu:["latn"]},"en-IO":{nu:["latn"]},"en-JE":{nu:["latn"]},"en-JM":{nu:["latn"]},"en-KE":{nu:["latn"]},"en-KI":{nu:["latn"]},"en-KN":{nu:["latn"]},"en-KY":{nu:["latn"]},"en-LC":{nu:["latn"]},"en-LR":{nu:["latn"]},"en-LS":{nu:["latn"]},"en-MG":{nu:["latn"]},"en-MH":{nu:["latn"]},"en-MO":{nu:["latn"]},"en-MP":{nu:["latn"]},"en-MS":{nu:["latn"]},"en-MT":{nu:["latn"]},"en-MU":{nu:["latn"]},"en-MV":{nu:["latn"]},"en-MW":{nu:["latn"]},"en-MY":{nu:["latn"]},"en-NA":{nu:["latn"]},"en-NF":{nu:["latn"]},"en-NG":{nu:["latn"]},"en-NL":{nu:["latn"]},"en-NR":{nu:["latn"]},"en-NU":{nu:["latn"]},"en-NZ":{nu:["latn"]},"en-PG":{nu:["latn"]},"en-PH":{nu:["latn"]},"en-PK":{nu:["latn"]},"en-PN":{nu:["latn"]},"en-PR":{nu:["latn"]},"en-PW":{nu:["latn"]},"en-RW":{nu:["latn"]},"en-SB":{nu:["latn"]},"en-SC":{nu:["latn"]},"en-SD":{nu:["latn"]},"en-SE":{nu:["latn"]},"en-SG":{nu:["latn"]},"en-SH":{nu:["latn"]},"en-SI":{nu:["latn"]},"en-SL":{nu:["latn"]},"en-SS":{nu:["latn"]},"en-SX":{nu:["latn"]},"en-SZ":{nu:["latn"]},"en-Shaw":{nu:["latn"]},"en-TC":{nu:["latn"]},"en-TK":{nu:["latn"]},"en-TO":{nu:["latn"]},"en-TT":{nu:["latn"]},"en-TV":{nu:["latn"]},"en-TZ":{nu:["latn"]},"en-UG":{nu:["latn"]},"en-UM":{nu:["latn"]},"en-VC":{nu:["latn"]},"en-VG":{nu:["latn"]},"en-VI":{nu:["latn"]},"en-VU":{nu:["latn"]},"en-WS":{nu:["latn"]},"en-ZA":{nu:["latn"]},"en-ZM":{nu:["latn"]},"en-ZW":{nu:["latn"]},eo:{nu:["latn"]},es:{nu:["latn"]},"es-419":{nu:["latn"]},"es-AR":{nu:["latn"]},"es-BO":{nu:["latn"]},"es-BR":{nu:["latn"]},"es-BZ":{nu:["latn"]},"es-CL":{nu:["latn"]},"es-CO":{nu:["latn"]},"es-CR":{nu:["latn"]},"es-CU":{nu:["latn"]},"es-DO":{nu:["latn"]},"es-EA":{nu:["latn"]},"es-EC":{nu:["latn"]},"es-GQ":{nu:["latn"]},"es-GT":{nu:["latn"]},"es-HN":{nu:["latn"]},"es-IC":{nu:["latn"]},"es-MX":{nu:["latn"]},"es-NI":{nu:["latn"]},"es-PA":{nu:["latn"]},"es-PE":{nu:["latn"]},"es-PH":{nu:["latn"]},"es-PR":{nu:["latn"]},"es-PY":{nu:["latn"]},"es-SV":{nu:["latn"]},"es-US":{nu:["latn"]},"es-UY":{nu:["latn"]},"es-VE":{nu:["latn"]},et:{nu:["latn"]},eu:{nu:["latn"]},ewo:{nu:["latn"]},fa:{nu:["arabext"]},"fa-AF":{nu:["arabext"]},ff:{nu:["latn"]},"ff-Adlm":{nu:["adlm"]},"ff-Adlm-BF":{nu:["adlm"]},"ff-Adlm-CM":{nu:["adlm"]},"ff-Adlm-GH":{nu:["adlm"]},"ff-Adlm-GM":{nu:["adlm"]},"ff-Adlm-GW":{nu:["adlm"]},"ff-Adlm-LR":{nu:["adlm"]},"ff-Adlm-MR":{nu:["adlm"]},"ff-Adlm-NE":{nu:["adlm"]},"ff-Adlm-NG":{nu:["adlm"]},"ff-Adlm-SL":{nu:["adlm"]},"ff-Adlm-SN":{nu:["adlm"]},"ff-Latn":{nu:["latn"]},"ff-Latn-BF":{nu:["latn"]},"ff-Latn-CM":{nu:["latn"]},"ff-Latn-GH":{nu:["latn"]},"ff-Latn-GM":{nu:["latn"]},"ff-Latn-GN":{nu:["latn"]},"ff-Latn-GW":{nu:["latn"]},"ff-Latn-LR":{nu:["latn"]},"ff-Latn-MR":{nu:["latn"]},"ff-Latn-NE":{nu:["latn"]},"ff-Latn-NG":{nu:["latn"]},"ff-Latn-SL":{nu:["latn"]},fi:{nu:["latn"],separator:{latn:"."}},fil:{nu:["latn"]},fo:{nu:["latn"]},"fo-DK":{nu:["latn"]},fr:{nu:["latn"]},"fr-BE":{nu:["latn"]},"fr-BF":{nu:["latn"]},"fr-BI":{nu:["latn"]},"fr-BJ":{nu:["latn"]},"fr-BL":{nu:["latn"]},"fr-CA":{nu:["latn"]},"fr-CD":{nu:["latn"]},"fr-CF":{nu:["latn"]},"fr-CG":{nu:["latn"]},"fr-CH":{nu:["latn"]},"fr-CI":{nu:["latn"]},"fr-CM":{nu:["latn"]},"fr-DJ":{nu:["latn"]},"fr-DZ":{nu:["latn"]},"fr-GA":{nu:["latn"]},"fr-GF":{nu:["latn"]},"fr-GN":{nu:["latn"]},"fr-GP":{nu:["latn"]},"fr-GQ":{nu:["latn"]},"fr-HT":{nu:["latn"]},"fr-KM":{nu:["latn"]},"fr-LU":{nu:["latn"]},"fr-MA":{nu:["latn"]},"fr-MC":{nu:["latn"]},"fr-MF":{nu:["latn"]},"fr-MG":{nu:["latn"]},"fr-ML":{nu:["latn"]},"fr-MQ":{nu:["latn"]},"fr-MR":{nu:["latn"]},"fr-MU":{nu:["latn"]},"fr-NC":{nu:["latn"]},"fr-NE":{nu:["latn"]},"fr-PF":{nu:["latn"]},"fr-PM":{nu:["latn"]},"fr-RE":{nu:["latn"]},"fr-RW":{nu:["latn"]},"fr-SC":{nu:["latn"]},"fr-SN":{nu:["latn"]},"fr-SY":{nu:["latn"]},"fr-TD":{nu:["latn"]},"fr-TG":{nu:["latn"]},"fr-TN":{nu:["latn"]},"fr-VU":{nu:["latn"]},"fr-WF":{nu:["latn"]},"fr-YT":{nu:["latn"]},frr:{nu:["latn"]},fur:{nu:["latn"]},fy:{nu:["latn"]},ga:{nu:["latn"]},"ga-GB":{nu:["latn"]},gaa:{nu:["latn"]},gd:{nu:["latn"]},gez:{nu:["latn"]},"gez-ER":{nu:["latn"]},gl:{nu:["latn"]},gn:{nu:["latn"]},gsw:{nu:["latn"]},"gsw-FR":{nu:["latn"]},"gsw-LI":{nu:["latn"]},gu:{nu:["latn"]},guz:{nu:["latn"]},gv:{nu:["latn"]},ha:{nu:["latn"]},"ha-Arab":{nu:["latn"]},"ha-Arab-SD":{nu:["latn"]},"ha-GH":{nu:["latn"]},"ha-NE":{nu:["latn"]},haw:{nu:["latn"]},he:{nu:["latn"]},hi:{nu:["latn"]},"hi-Latn":{nu:["latn"]},hnj:{nu:["hmnp","latn"]},"hnj-Hmnp":{nu:["hmnp","latn"]},hr:{nu:["latn"]},"hr-BA":{nu:["latn"]},hsb:{nu:["latn"]},hu:{nu:["latn"]},hy:{nu:["latn"]},ia:{nu:["latn"]},id:{nu:["latn"],separator:{latn:"."}},ig:{nu:["latn"]},ii:{nu:["latn"]},io:{nu:["latn"]},is:{nu:["latn"]},it:{nu:["latn"]},"it-CH":{nu:["latn"]},"it-SM":{nu:["latn"]},"it-VA":{nu:["latn"]},iu:{nu:["latn"]},"iu-Latn":{nu:["latn"]},ja:{nu:["latn"]},jbo:{nu:["latn"]},jgo:{nu:["latn"]},jmc:{nu:["latn"]},jv:{nu:["latn"]},ka:{nu:["latn"]},kab:{nu:["latn"]},kaj:{nu:["latn"]},kam:{nu:["latn"]},kcg:{nu:["latn"]},kde:{nu:["latn"]},kea:{nu:["latn"]},ken:{nu:["latn"]},kgp:{nu:["latn"]},khq:{nu:["latn"]},ki:{nu:["latn"]},kk:{nu:["latn"]},kkj:{nu:["latn"]},kl:{nu:["latn"]},kln:{nu:["latn"]},km:{nu:["latn"]},kn:{nu:["latn"]},ko:{nu:["latn"]},"ko-KP":{nu:["latn"]},kok:{nu:["latn"]},kpe:{nu:["latn"]},"kpe-GN":{nu:["latn"]},ks:{nu:["arabext"]},"ks-Arab":{nu:["arabext"]},"ks-Deva":{nu:["latn"]},ksb:{nu:["latn"]},ksf:{nu:["latn"]},ksh:{nu:["latn"]},ku:{nu:["latn"]},kw:{nu:["latn"]},ky:{nu:["latn"]},la:{nu:["latn"]},lag:{nu:["latn"]},lb:{nu:["latn"]},lg:{nu:["latn"]},lij:{nu:["latn"]},lkt:{nu:["latn"]},lmo:{nu:["latn"]},ln:{nu:["latn"]},"ln-AO":{nu:["latn"]},"ln-CF":{nu:["latn"]},"ln-CG":{nu:["latn"]},lo:{nu:["latn"]},lrc:{nu:["arabext"]},"lrc-IQ":{nu:["arabext"]},lt:{nu:["latn"]},lu:{nu:["latn"]},luo:{nu:["latn"]},luy:{nu:["latn"]},lv:{nu:["latn"]},mai:{nu:["latn"]},mas:{nu:["latn"]},"mas-TZ":{nu:["latn"]},mdf:{nu:["latn"]},mer:{nu:["latn"]},mfe:{nu:["latn"]},mg:{nu:["latn"]},mgh:{nu:["latn"]},mgo:{nu:["latn"]},mi:{nu:["latn"]},mk:{nu:["latn"]},ml:{nu:["latn"]},mn:{nu:["latn"]},"mn-Mong":{nu:["latn"]},"mn-Mong-MN":{nu:["latn"]},mni:{nu:["beng"]},"mni-Beng":{nu:["beng"]},"mni-Mtei":{nu:["mtei"]},moh:{nu:["latn"]},mr:{nu:["deva"]},ms:{nu:["latn"]},"ms-Arab":{nu:["latn"]},"ms-Arab-BN":{nu:["latn"]},"ms-BN":{nu:["latn"]},"ms-ID":{nu:["latn"],separator:{latn:"."}},"ms-SG":{nu:["latn"]},mt:{nu:["latn"]},mua:{nu:["latn"]},mus:{nu:["latn"]},my:{nu:["mymr"]},myv:{nu:["latn"]},mzn:{nu:["arabext"]},naq:{nu:["latn"]},nb:{nu:["latn"]},"nb-SJ":{nu:["latn"]},nd:{nu:["latn"]},nds:{nu:["latn"]},"nds-NL":{nu:["latn"]},ne:{nu:["deva"]},"ne-IN":{nu:["deva"]},nl:{nu:["latn"]},"nl-AW":{nu:["latn"]},"nl-BE":{nu:["latn"]},"nl-BQ":{nu:["latn"]},"nl-CW":{nu:["latn"]},"nl-SR":{nu:["latn"]},"nl-SX":{nu:["latn"]},nmg:{nu:["latn"]},nn:{nu:["latn"]},nnh:{nu:["latn"]},no:{nu:["latn"]},nqo:{nu:["nkoo"]},nr:{nu:["latn"]},nso:{nu:["latn"]},nus:{nu:["latn"]},nv:{nu:["latn"]},ny:{nu:["latn"]},nyn:{nu:["latn"]},oc:{nu:["latn"]},"oc-ES":{nu:["latn"]},om:{nu:["latn"]},"om-KE":{nu:["latn"]},or:{nu:["latn"]},os:{nu:["latn"]},"os-RU":{nu:["latn"]},osa:{nu:["latn"]},pa:{nu:["latn"]},"pa-Arab":{nu:["arabext"]},"pa-Guru":{nu:["latn"]},pap:{nu:["latn"]},"pap-AW":{nu:["latn"]},pcm:{nu:["latn"]},pis:{nu:["latn"]},pl:{nu:["latn"]},prg:{nu:["latn"]},ps:{nu:["arabext"]},"ps-PK":{nu:["arabext"]},pt:{nu:["latn"]},"pt-AO":{nu:["latn"]},"pt-CH":{nu:["latn"]},"pt-CV":{nu:["latn"]},"pt-GQ":{nu:["latn"]},"pt-GW":{nu:["latn"]},"pt-LU":{nu:["latn"]},"pt-MO":{nu:["latn"]},"pt-MZ":{nu:["latn"]},"pt-PT":{nu:["latn"]},"pt-ST":{nu:["latn"]},"pt-TL":{nu:["latn"]},qu:{nu:["latn"]},"qu-BO":{nu:["latn"]},"qu-EC":{nu:["latn"]},quc:{nu:["latn"]},raj:{nu:["deva"]},rhg:{nu:["latn"]},"rhg-Rohg":{nu:["latn"]},"rhg-Rohg-BD":{nu:["latn"]},rif:{nu:["latn"]},rm:{nu:["latn"]},rn:{nu:["latn"]},ro:{nu:["latn"]},"ro-MD":{nu:["latn"]},rof:{nu:["latn"]},ru:{nu:["latn"]},"ru-BY":{nu:["latn"]},"ru-KG":{nu:["latn"]},"ru-KZ":{nu:["latn"]},"ru-MD":{nu:["latn"]},"ru-UA":{nu:["latn"]},rw:{nu:["latn"]},rwk:{nu:["latn"]},sa:{nu:["deva"]},sah:{nu:["latn"]},saq:{nu:["latn"]},sat:{nu:["olck"]},"sat-Deva":{nu:["deva"]},"sat-Olck":{nu:["olck"]},sbp:{nu:["latn"]},sc:{nu:["latn"]},scn:{nu:["latn"]},sd:{nu:["arab"]},"sd-Arab":{nu:["arab"]},"sd-Deva":{nu:["latn"]},sdh:{nu:["arab"]},"sdh-IQ":{nu:["arab"]},se:{nu:["latn"]},"se-FI":{nu:["latn"]},"se-SE":{nu:["latn"]},seh:{nu:["latn"]},ses:{nu:["latn"]},sg:{nu:["latn"]},shi:{nu:["latn"]},"shi-Latn":{nu:["latn"]},"shi-Tfng":{nu:["latn"]},shn:{nu:["latn"]},"shn-TH":{nu:["latn"]},si:{nu:["latn"],separator:{latn:"."}},sid:{nu:["latn"]},sk:{nu:["latn"]},sl:{nu:["latn"]},sma:{nu:["latn"]},"sma-NO":{nu:["latn"]},smj:{nu:["latn"]},"smj-NO":{nu:["latn"]},smn:{nu:["latn"],separator:{latn:"."}},sms:{nu:["latn"]},sn:{nu:["latn"]},so:{nu:["latn"]},"so-DJ":{nu:["latn"]},"so-ET":{nu:["latn"]},"so-KE":{nu:["latn"]},sq:{nu:["latn"]},"sq-MK":{nu:["latn"]},"sq-XK":{nu:["latn"]},sr:{nu:["latn"]},"sr-Cyrl":{nu:["latn"]},"sr-Cyrl-BA":{nu:["latn"]},"sr-Cyrl-ME":{nu:["latn"]},"sr-Cyrl-XK":{nu:["latn"]},"sr-Latn":{nu:["latn"]},"sr-Latn-BA":{nu:["latn"]},"sr-Latn-ME":{nu:["latn"]},"sr-Latn-XK":{nu:["latn"]},ss:{nu:["latn"]},"ss-SZ":{nu:["latn"]},ssy:{nu:["latn"]},st:{nu:["latn"]},"st-LS":{nu:["latn"]},su:{nu:["latn"],separator:{latn:"."}},"su-Latn":{nu:["latn"],separator:{latn:"."}},sv:{nu:["latn"]},"sv-AX":{nu:["latn"]},"sv-FI":{nu:["latn"],separator:{latn:"."}},sw:{nu:["latn"]},"sw-CD":{nu:["latn"]},"sw-KE":{nu:["latn"]},"sw-UG":{nu:["latn"]},syr:{nu:["latn"]},"syr-SY":{nu:["latn"]},szl:{nu:["latn"]},ta:{nu:["latn"]},"ta-LK":{nu:["latn"]},"ta-MY":{nu:["latn"]},"ta-SG":{nu:["latn"]},te:{nu:["latn"]},teo:{nu:["latn"]},"teo-KE":{nu:["latn"]},tg:{nu:["latn"]},th:{nu:["latn"]},ti:{nu:["latn"]},"ti-ER":{nu:["latn"]},tig:{nu:["latn"]},tk:{nu:["latn"]},tn:{nu:["latn"]},"tn-BW":{nu:["latn"]},to:{nu:["latn"]},tok:{nu:["latn"]},tpi:{nu:["latn"]},tr:{nu:["latn"]},"tr-CY":{nu:["latn"]},trv:{nu:["latn"]},trw:{nu:["latn"]},ts:{nu:["latn"]},tt:{nu:["latn"]},twq:{nu:["latn"]},tzm:{nu:["latn"]},ug:{nu:["latn"]},uk:{nu:["latn"]},und:{nu:["latn"]},ur:{nu:["latn"]},"ur-IN":{nu:["arabext"],separator:{arabext:"٫"}},uz:{nu:["latn"]},"uz-Arab":{nu:["arabext"]},"uz-Cyrl":{nu:["latn"]},"uz-Latn":{nu:["latn"]},vai:{nu:["latn"]},"vai-Latn":{nu:["latn"]},"vai-Vaii":{nu:["latn"]},ve:{nu:["latn"]},vec:{nu:["latn"]},vi:{nu:["latn"]},vo:{nu:["latn"]},vun:{nu:["latn"]},wa:{nu:["latn"]},wae:{nu:["latn"]},wal:{nu:["latn"]},wbp:{nu:["latn"]},wo:{nu:["latn"]},xh:{nu:["latn"]},xog:{nu:["latn"]},yav:{nu:["latn"]},yi:{nu:["latn"]},yo:{nu:["latn"]},"yo-BJ":{nu:["latn"]},yrl:{nu:["latn"]},"yrl-CO":{nu:["latn"]},"yrl-VE":{nu:["latn"]},yue:{nu:["latn"]},"yue-Hans":{nu:["latn"]},"yue-Hant":{nu:["latn"]},zgh:{nu:["latn"]},zh:{nu:["latn"]},"zh-Hans":{nu:["latn"]},"zh-Hans-HK":{nu:["latn"]},"zh-Hans-MO":{nu:["latn"]},"zh-Hans-SG":{nu:["latn"]},"zh-Hant":{nu:["latn"]},"zh-Hant-HK":{nu:["latn"]},"zh-Hant-MO":{nu:["latn"]},zu:{nu:["latn"]}}}},3367:function(e,t,n){"use strict";var r=function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)},o=function(e,t,n){var r=t.split("-"),o=r[0],i=r[1],a=r[2],u=!0;if(a&&"$"===a[0]){var s="!"!==a[1],c=(s?n[a.slice(1)]:n[a.slice(2)]).map((function(e){return m[e]||[e]})).reduce((function(e,t){return(0,y.__spreadArray)((0,y.__spreadArray)([],e,!0),t,!0)}),[]);u&&(u=!(c.indexOf(e.region||"")>1!=s))}else u&&(u=!e.region||"*"===a||a===e.region);return u&&(u=!e.script||"*"===i||i===e.script),u&&(u=!e.language||"*"===o||o===e.language),u},i=function(e){return[e.language,e.script,e.region].filter(Boolean).join("-")},a=function(e,t,n){for(var r=0,a=n.matches;r<a.length;r++){var u=a[r],s=o(e,u.desired,n.matchVariables)&&o(t,u.supported,n.matchVariables);if(u.oneway||s||(s=o(e,u.supported,n.matchVariables)&&o(t,u.desired,n.matchVariables)),s){var c=10*u.distance;return n.paradigmLocales.indexOf(i(e))>-1!=n.paradigmLocales.indexOf(i(t))>-1?c-1:c}}throw new Error("No matching distance found")},u=function(e,t,n){var r,o,i=[],u=t.reduce((function(e,t){var n=t.replace(g,"");return i.push(n),e[n]=t,e}),{}),s=function(e,t,n){void 0===n&&(n=b);var r=1/0,o={matchedDesiredLocale:"",distances:{}};return e.forEach((function(e,n){o.distances[e]||(o.distances[e]={}),t.forEach((function(t){var i=function(e,t){var n=new Intl.Locale(e).maximize(),r=new Intl.Locale(t).maximize(),o={language:n.language,script:n.script||"",region:n.region||""},i={language:r.language,script:r.script||"",region:r.region||""},u=0,s=function(){var e,t;if(!p){var n=null===(t=null===(e=v.supplemental.languageMatching["written-new"][0])||void 0===e?void 0:e.paradigmLocales)||void 0===t?void 0:t._locales.split(" "),r=v.supplemental.languageMatching["written-new"].slice(1,5),o=v.supplemental.languageMatching["written-new"].slice(5).map((function(e){var t=Object.keys(e)[0],n=e[t];return{supported:t,desired:n._desired,distance:+n._distance,oneway:"true"===n.oneway}}),{});p={matches:o,matchVariables:r.reduce((function(e,t){var n=Object.keys(t)[0],r=t[n];return e[n.slice(1)]=r._value.split("+"),e}),{}),paradigmLocales:(0,y.__spreadArray)((0,y.__spreadArray)([],n,!0),n.map((function(e){return new Intl.Locale(e.replace(/_/g,"-")).maximize().toString()})),!0)}}return p}();return o.language!==i.language&&(u+=a({language:n.language,script:"",region:""},{language:r.language,script:"",region:""},s)),o.script!==i.script&&(u+=a({language:n.language,script:o.script,region:""},{language:r.language,script:o.script,region:""},s)),o.region!==i.region&&(u+=a(o,i,s)),u}(e,t)+0+40*n;o.distances[e][t]=i,i<r&&(r=i,o.matchedDesiredLocale=e,o.matchedSupportedLocale=t)}))})),r>=n&&(o.matchedDesiredLocale=void 0,o.matchedSupportedLocale=void 0),o}(i,e);return s.matchedSupportedLocale&&s.matchedDesiredLocale&&(r=s.matchedSupportedLocale,o=u[s.matchedDesiredLocale].slice(s.matchedDesiredLocale.length)||void 0),r?{locale:r,extension:o}:{locale:n()}},s=function(e,t){for(var n=t;;){if(e.indexOf(n)>-1)return n;var r=n.lastIndexOf("-");if(!~r)return;r>=2&&"-"===n[r-2]&&(r-=2),n=n.slice(0,r)}},c=function(e,t){r(2===t.length,"key must have 2 elements");var n=e.length,o="-".concat(t,"-"),i=e.indexOf(o);if(-1!==i){for(var a=i+4,u=a,s=a,c=!1;!c;){var l=e.indexOf("-",s);2==(-1===l?n-s:l-s)?c=!0:-1===l?(u=n,c=!0):(u=l,s=l+1)}return e.slice(a,u)}if(o="-".concat(t),-1!==(i=e.indexOf(o))&&i+3===n)return""},l=function(e,t,n,o,i,a){var l;l="lookup"===n.localeMatcher?function(e,t,n){for(var r={locale:""},o=0,i=t;o<i.length;o++){var a=i[o],u=a.replace(g,""),c=s(e,u);if(c)return r.locale=c,a!==u&&(r.extension=a.slice(u.length,a.length)),r}return r.locale=n(),r}(Array.from(e),t,a):u(Array.from(e),t,a);for(var f=l.locale,h={locale:"",dataLocale:f},p="-u",y=0,v=o;y<v.length;y++){var m=v[y];r(f in i,"Missing locale data for ".concat(f));var b=i[f];r("object"==typeof b&&null!==b,"locale data ".concat(m," must be an object"));var w=b[m];r(Array.isArray(w),"keyLocaleData for ".concat(m," must be an array"));var _=w[0];r("string"==typeof _||null===_,"value must be string or null but got ".concat(void 0===_?"undefined":d(_)," in key ").concat(m));var S="";if(l.extension){var E=c(l.extension,m);void 0!==E&&(""!==E?~w.indexOf(E)&&(_=E,S="-".concat(m,"-").concat(_)):~E.indexOf("true")&&(_="true",S="-".concat(m)))}if(m in n){var O=n[m];r("string"==typeof O||null==O,"optionsValue must be String, Undefined or Null"),~w.indexOf(O)&&O!==_&&(_=O,S="")}h[m]=_,p+=S}if(p.length>2){var x=f.indexOf("-x-");if(-1===x)f+=p;else{var k=f.slice(0,x),A=f.slice(x,f.length);f=k+p+A}f=Intl.getCanonicalLocales(f)[0]}return h.locale=f,h},f=function(e,t){for(var n=[],r=0,o=t;r<o.length;r++){var i=s(e,o[r].replace(g,""));i&&n.push(i)}return n},h=function(e,t,n,r){return l(t,(o=e,Intl.getCanonicalLocales(o)),{localeMatcher:(null==r?void 0:r.algorithm)||"best fit"},[],{},(function(){return n})).locale;var o};n.r(t),n.d(t,{LookupSupportedLocales:function(){return f},ResolveLocale:function(){return l},match:function(){return h}});var p,y=n(2712),v={supplemental:{languageMatching:{"written-new":[{paradigmLocales:{_locales:"en en_GB es es_419 pt_BR pt_PT"}},{$enUS:{_value:"AS+CA+GU+MH+MP+PH+PR+UM+US+VI"}},{$cnsar:{_value:"HK+MO"}},{$americas:{_value:"019"}},{$maghreb:{_value:"MA+DZ+TN+LY+MR+EH"}},{no:{_desired:"nb",_distance:"1"}},{bs:{_desired:"hr",_distance:"4"}},{bs:{_desired:"sh",_distance:"4"}},{hr:{_desired:"sh",_distance:"4"}},{sr:{_desired:"sh",_distance:"4"}},{aa:{_desired:"ssy",_distance:"4"}},{de:{_desired:"gsw",_distance:"4",_oneway:"true"}},{de:{_desired:"lb",_distance:"4",_oneway:"true"}},{no:{_desired:"da",_distance:"8"}},{nb:{_desired:"da",_distance:"8"}},{ru:{_desired:"ab",_distance:"30",_oneway:"true"}},{en:{_desired:"ach",_distance:"30",_oneway:"true"}},{nl:{_desired:"af",_distance:"20",_oneway:"true"}},{en:{_desired:"ak",_distance:"30",_oneway:"true"}},{en:{_desired:"am",_distance:"30",_oneway:"true"}},{es:{_desired:"ay",_distance:"20",_oneway:"true"}},{ru:{_desired:"az",_distance:"30",_oneway:"true"}},{ur:{_desired:"bal",_distance:"20",_oneway:"true"}},{ru:{_desired:"be",_distance:"20",_oneway:"true"}},{en:{_desired:"bem",_distance:"30",_oneway:"true"}},{hi:{_desired:"bh",_distance:"30",_oneway:"true"}},{en:{_desired:"bn",_distance:"30",_oneway:"true"}},{zh:{_desired:"bo",_distance:"20",_oneway:"true"}},{fr:{_desired:"br",_distance:"20",_oneway:"true"}},{es:{_desired:"ca",_distance:"20",_oneway:"true"}},{fil:{_desired:"ceb",_distance:"30",_oneway:"true"}},{en:{_desired:"chr",_distance:"20",_oneway:"true"}},{ar:{_desired:"ckb",_distance:"30",_oneway:"true"}},{fr:{_desired:"co",_distance:"20",_oneway:"true"}},{fr:{_desired:"crs",_distance:"20",_oneway:"true"}},{sk:{_desired:"cs",_distance:"20"}},{en:{_desired:"cy",_distance:"20",_oneway:"true"}},{en:{_desired:"ee",_distance:"30",_oneway:"true"}},{en:{_desired:"eo",_distance:"30",_oneway:"true"}},{es:{_desired:"eu",_distance:"20",_oneway:"true"}},{da:{_desired:"fo",_distance:"20",_oneway:"true"}},{nl:{_desired:"fy",_distance:"20",_oneway:"true"}},{en:{_desired:"ga",_distance:"20",_oneway:"true"}},{en:{_desired:"gaa",_distance:"30",_oneway:"true"}},{en:{_desired:"gd",_distance:"20",_oneway:"true"}},{es:{_desired:"gl",_distance:"20",_oneway:"true"}},{es:{_desired:"gn",_distance:"20",_oneway:"true"}},{hi:{_desired:"gu",_distance:"30",_oneway:"true"}},{en:{_desired:"ha",_distance:"30",_oneway:"true"}},{en:{_desired:"haw",_distance:"20",_oneway:"true"}},{fr:{_desired:"ht",_distance:"20",_oneway:"true"}},{ru:{_desired:"hy",_distance:"30",_oneway:"true"}},{en:{_desired:"ia",_distance:"30",_oneway:"true"}},{en:{_desired:"ig",_distance:"30",_oneway:"true"}},{en:{_desired:"is",_distance:"20",_oneway:"true"}},{id:{_desired:"jv",_distance:"20",_oneway:"true"}},{en:{_desired:"ka",_distance:"30",_oneway:"true"}},{fr:{_desired:"kg",_distance:"30",_oneway:"true"}},{ru:{_desired:"kk",_distance:"30",_oneway:"true"}},{en:{_desired:"km",_distance:"30",_oneway:"true"}},{en:{_desired:"kn",_distance:"30",_oneway:"true"}},{en:{_desired:"kri",_distance:"30",_oneway:"true"}},{tr:{_desired:"ku",_distance:"30",_oneway:"true"}},{ru:{_desired:"ky",_distance:"30",_oneway:"true"}},{it:{_desired:"la",_distance:"20",_oneway:"true"}},{en:{_desired:"lg",_distance:"30",_oneway:"true"}},{fr:{_desired:"ln",_distance:"30",_oneway:"true"}},{en:{_desired:"lo",_distance:"30",_oneway:"true"}},{en:{_desired:"loz",_distance:"30",_oneway:"true"}},{fr:{_desired:"lua",_distance:"30",_oneway:"true"}},{hi:{_desired:"mai",_distance:"20",_oneway:"true"}},{en:{_desired:"mfe",_distance:"30",_oneway:"true"}},{fr:{_desired:"mg",_distance:"30",_oneway:"true"}},{en:{_desired:"mi",_distance:"20",_oneway:"true"}},{en:{_desired:"ml",_distance:"30",_oneway:"true"}},{ru:{_desired:"mn",_distance:"30",_oneway:"true"}},{hi:{_desired:"mr",_distance:"30",_oneway:"true"}},{id:{_desired:"ms",_distance:"30",_oneway:"true"}},{en:{_desired:"mt",_distance:"30",_oneway:"true"}},{en:{_desired:"my",_distance:"30",_oneway:"true"}},{en:{_desired:"ne",_distance:"30",_oneway:"true"}},{nb:{_desired:"nn",_distance:"20"}},{no:{_desired:"nn",_distance:"20"}},{en:{_desired:"nso",_distance:"30",_oneway:"true"}},{en:{_desired:"ny",_distance:"30",_oneway:"true"}},{en:{_desired:"nyn",_distance:"30",_oneway:"true"}},{fr:{_desired:"oc",_distance:"20",_oneway:"true"}},{en:{_desired:"om",_distance:"30",_oneway:"true"}},{en:{_desired:"or",_distance:"30",_oneway:"true"}},{en:{_desired:"pa",_distance:"30",_oneway:"true"}},{en:{_desired:"pcm",_distance:"20",_oneway:"true"}},{en:{_desired:"ps",_distance:"30",_oneway:"true"}},{es:{_desired:"qu",_distance:"30",_oneway:"true"}},{de:{_desired:"rm",_distance:"20",_oneway:"true"}},{en:{_desired:"rn",_distance:"30",_oneway:"true"}},{fr:{_desired:"rw",_distance:"30",_oneway:"true"}},{hi:{_desired:"sa",_distance:"30",_oneway:"true"}},{en:{_desired:"sd",_distance:"30",_oneway:"true"}},{en:{_desired:"si",_distance:"30",_oneway:"true"}},{en:{_desired:"sn",_distance:"30",_oneway:"true"}},{en:{_desired:"so",_distance:"30",_oneway:"true"}},{en:{_desired:"sq",_distance:"30",_oneway:"true"}},{en:{_desired:"st",_distance:"30",_oneway:"true"}},{id:{_desired:"su",_distance:"20",_oneway:"true"}},{en:{_desired:"sw",_distance:"30",_oneway:"true"}},{en:{_desired:"ta",_distance:"30",_oneway:"true"}},{en:{_desired:"te",_distance:"30",_oneway:"true"}},{ru:{_desired:"tg",_distance:"30",_oneway:"true"}},{en:{_desired:"ti",_distance:"30",_oneway:"true"}},{ru:{_desired:"tk",_distance:"30",_oneway:"true"}},{en:{_desired:"tlh",_distance:"30",_oneway:"true"}},{en:{_desired:"tn",_distance:"30",_oneway:"true"}},{en:{_desired:"to",_distance:"30",_oneway:"true"}},{ru:{_desired:"tt",_distance:"30",_oneway:"true"}},{en:{_desired:"tum",_distance:"30",_oneway:"true"}},{zh:{_desired:"ug",_distance:"20",_oneway:"true"}},{ru:{_desired:"uk",_distance:"20",_oneway:"true"}},{en:{_desired:"ur",_distance:"30",_oneway:"true"}},{ru:{_desired:"uz",_distance:"30",_oneway:"true"}},{fr:{_desired:"wo",_distance:"30",_oneway:"true"}},{en:{_desired:"xh",_distance:"30",_oneway:"true"}},{en:{_desired:"yi",_distance:"30",_oneway:"true"}},{en:{_desired:"yo",_distance:"30",_oneway:"true"}},{zh:{_desired:"za",_distance:"20",_oneway:"true"}},{en:{_desired:"zu",_distance:"30",_oneway:"true"}},{ar:{_desired:"aao",_distance:"10",_oneway:"true"}},{ar:{_desired:"abh",_distance:"10",_oneway:"true"}},{ar:{_desired:"abv",_distance:"10",_oneway:"true"}},{ar:{_desired:"acm",_distance:"10",_oneway:"true"}},{ar:{_desired:"acq",_distance:"10",_oneway:"true"}},{ar:{_desired:"acw",_distance:"10",_oneway:"true"}},{ar:{_desired:"acx",_distance:"10",_oneway:"true"}},{ar:{_desired:"acy",_distance:"10",_oneway:"true"}},{ar:{_desired:"adf",_distance:"10",_oneway:"true"}},{ar:{_desired:"aeb",_distance:"10",_oneway:"true"}},{ar:{_desired:"aec",_distance:"10",_oneway:"true"}},{ar:{_desired:"afb",_distance:"10",_oneway:"true"}},{ar:{_desired:"ajp",_distance:"10",_oneway:"true"}},{ar:{_desired:"apc",_distance:"10",_oneway:"true"}},{ar:{_desired:"apd",_distance:"10",_oneway:"true"}},{ar:{_desired:"arq",_distance:"10",_oneway:"true"}},{ar:{_desired:"ars",_distance:"10",_oneway:"true"}},{ar:{_desired:"ary",_distance:"10",_oneway:"true"}},{ar:{_desired:"arz",_distance:"10",_oneway:"true"}},{ar:{_desired:"auz",_distance:"10",_oneway:"true"}},{ar:{_desired:"avl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayh",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayn",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayp",_distance:"10",_oneway:"true"}},{ar:{_desired:"bbz",_distance:"10",_oneway:"true"}},{ar:{_desired:"pga",_distance:"10",_oneway:"true"}},{ar:{_desired:"shu",_distance:"10",_oneway:"true"}},{ar:{_desired:"ssh",_distance:"10",_oneway:"true"}},{az:{_desired:"azb",_distance:"10",_oneway:"true"}},{et:{_desired:"vro",_distance:"10",_oneway:"true"}},{ff:{_desired:"ffm",_distance:"10",_oneway:"true"}},{ff:{_desired:"fub",_distance:"10",_oneway:"true"}},{ff:{_desired:"fue",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuf",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuh",_distance:"10",_oneway:"true"}},{ff:{_desired:"fui",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuq",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuv",_distance:"10",_oneway:"true"}},{gn:{_desired:"gnw",_distance:"10",_oneway:"true"}},{gn:{_desired:"gui",_distance:"10",_oneway:"true"}},{gn:{_desired:"gun",_distance:"10",_oneway:"true"}},{gn:{_desired:"nhd",_distance:"10",_oneway:"true"}},{iu:{_desired:"ikt",_distance:"10",_oneway:"true"}},{kln:{_desired:"enb",_distance:"10",_oneway:"true"}},{kln:{_desired:"eyo",_distance:"10",_oneway:"true"}},{kln:{_desired:"niq",_distance:"10",_oneway:"true"}},{kln:{_desired:"oki",_distance:"10",_oneway:"true"}},{kln:{_desired:"pko",_distance:"10",_oneway:"true"}},{kln:{_desired:"sgc",_distance:"10",_oneway:"true"}},{kln:{_desired:"tec",_distance:"10",_oneway:"true"}},{kln:{_desired:"tuy",_distance:"10",_oneway:"true"}},{kok:{_desired:"gom",_distance:"10",_oneway:"true"}},{kpe:{_desired:"gkp",_distance:"10",_oneway:"true"}},{luy:{_desired:"ida",_distance:"10",_oneway:"true"}},{luy:{_desired:"lkb",_distance:"10",_oneway:"true"}},{luy:{_desired:"lko",_distance:"10",_oneway:"true"}},{luy:{_desired:"lks",_distance:"10",_oneway:"true"}},{luy:{_desired:"lri",_distance:"10",_oneway:"true"}},{luy:{_desired:"lrm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lsm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lto",_distance:"10",_oneway:"true"}},{luy:{_desired:"lts",_distance:"10",_oneway:"true"}},{luy:{_desired:"lwg",_distance:"10",_oneway:"true"}},{luy:{_desired:"nle",_distance:"10",_oneway:"true"}},{luy:{_desired:"nyd",_distance:"10",_oneway:"true"}},{luy:{_desired:"rag",_distance:"10",_oneway:"true"}},{lv:{_desired:"ltg",_distance:"10",_oneway:"true"}},{mg:{_desired:"bhr",_distance:"10",_oneway:"true"}},{mg:{_desired:"bjq",_distance:"10",_oneway:"true"}},{mg:{_desired:"bmm",_distance:"10",_oneway:"true"}},{mg:{_desired:"bzc",_distance:"10",_oneway:"true"}},{mg:{_desired:"msh",_distance:"10",_oneway:"true"}},{mg:{_desired:"skg",_distance:"10",_oneway:"true"}},{mg:{_desired:"tdx",_distance:"10",_oneway:"true"}},{mg:{_desired:"tkg",_distance:"10",_oneway:"true"}},{mg:{_desired:"txy",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmv",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmw",_distance:"10",_oneway:"true"}},{mn:{_desired:"mvf",_distance:"10",_oneway:"true"}},{ms:{_desired:"bjn",_distance:"10",_oneway:"true"}},{ms:{_desired:"btj",_distance:"10",_oneway:"true"}},{ms:{_desired:"bve",_distance:"10",_oneway:"true"}},{ms:{_desired:"bvu",_distance:"10",_oneway:"true"}},{ms:{_desired:"coa",_distance:"10",_oneway:"true"}},{ms:{_desired:"dup",_distance:"10",_oneway:"true"}},{ms:{_desired:"hji",_distance:"10",_oneway:"true"}},{ms:{_desired:"id",_distance:"10",_oneway:"true"}},{ms:{_desired:"jak",_distance:"10",_oneway:"true"}},{ms:{_desired:"jax",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvb",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvr",_distance:"10",_oneway:"true"}},{ms:{_desired:"kxd",_distance:"10",_oneway:"true"}},{ms:{_desired:"lce",_distance:"10",_oneway:"true"}},{ms:{_desired:"lcf",_distance:"10",_oneway:"true"}},{ms:{_desired:"liw",_distance:"10",_oneway:"true"}},{ms:{_desired:"max",_distance:"10",_oneway:"true"}},{ms:{_desired:"meo",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfa",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfb",_distance:"10",_oneway:"true"}},{ms:{_desired:"min",_distance:"10",_oneway:"true"}},{ms:{_desired:"mqg",_distance:"10",_oneway:"true"}},{ms:{_desired:"msi",_distance:"10",_oneway:"true"}},{ms:{_desired:"mui",_distance:"10",_oneway:"true"}},{ms:{_desired:"orn",_distance:"10",_oneway:"true"}},{ms:{_desired:"ors",_distance:"10",_oneway:"true"}},{ms:{_desired:"pel",_distance:"10",_oneway:"true"}},{ms:{_desired:"pse",_distance:"10",_oneway:"true"}},{ms:{_desired:"tmw",_distance:"10",_oneway:"true"}},{ms:{_desired:"urk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkt",_distance:"10",_oneway:"true"}},{ms:{_desired:"xmm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zlm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zmi",_distance:"10",_oneway:"true"}},{ne:{_desired:"dty",_distance:"10",_oneway:"true"}},{om:{_desired:"gax",_distance:"10",_oneway:"true"}},{om:{_desired:"hae",_distance:"10",_oneway:"true"}},{om:{_desired:"orc",_distance:"10",_oneway:"true"}},{or:{_desired:"spv",_distance:"10",_oneway:"true"}},{ps:{_desired:"pbt",_distance:"10",_oneway:"true"}},{ps:{_desired:"pst",_distance:"10",_oneway:"true"}},{qu:{_desired:"qub",_distance:"10",_oneway:"true"}},{qu:{_desired:"qud",_distance:"10",_oneway:"true"}},{qu:{_desired:"quf",_distance:"10",_oneway:"true"}},{qu:{_desired:"qug",_distance:"10",_oneway:"true"}},{qu:{_desired:"quh",_distance:"10",_oneway:"true"}},{qu:{_desired:"quk",_distance:"10",_oneway:"true"}},{qu:{_desired:"qul",_distance:"10",_oneway:"true"}},{qu:{_desired:"qup",_distance:"10",_oneway:"true"}},{qu:{_desired:"qur",_distance:"10",_oneway:"true"}},{qu:{_desired:"qus",_distance:"10",_oneway:"true"}},{qu:{_desired:"quw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qux",_distance:"10",_oneway:"true"}},{qu:{_desired:"quy",_distance:"10",_oneway:"true"}},{qu:{_desired:"qva",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qve",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvi",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvj",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvm",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvs",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvz",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qws",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxr",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxt",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxu",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxw",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdc",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdn",_distance:"10",_oneway:"true"}},{sc:{_desired:"sro",_distance:"10",_oneway:"true"}},{sq:{_desired:"aae",_distance:"10",_oneway:"true"}},{sq:{_desired:"aat",_distance:"10",_oneway:"true"}},{sq:{_desired:"aln",_distance:"10",_oneway:"true"}},{syr:{_desired:"aii",_distance:"10",_oneway:"true"}},{uz:{_desired:"uzs",_distance:"10",_oneway:"true"}},{yi:{_desired:"yih",_distance:"10",_oneway:"true"}},{zh:{_desired:"cdo",_distance:"10",_oneway:"true"}},{zh:{_desired:"cjy",_distance:"10",_oneway:"true"}},{zh:{_desired:"cpx",_distance:"10",_oneway:"true"}},{zh:{_desired:"czh",_distance:"10",_oneway:"true"}},{zh:{_desired:"czo",_distance:"10",_oneway:"true"}},{zh:{_desired:"gan",_distance:"10",_oneway:"true"}},{zh:{_desired:"hak",_distance:"10",_oneway:"true"}},{zh:{_desired:"hsn",_distance:"10",_oneway:"true"}},{zh:{_desired:"lzh",_distance:"10",_oneway:"true"}},{zh:{_desired:"mnp",_distance:"10",_oneway:"true"}},{zh:{_desired:"nan",_distance:"10",_oneway:"true"}},{zh:{_desired:"wuu",_distance:"10",_oneway:"true"}},{zh:{_desired:"yue",_distance:"10",_oneway:"true"}},{"*":{_desired:"*",_distance:"80"}},{"en-Latn":{_desired:"am-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"az-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"bn-Beng",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"bo-Tibt",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"hy-Armn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ka-Geor",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"km-Khmr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"kn-Knda",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"lo-Laoo",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ml-Mlym",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"my-Mymr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ne-Deva",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"or-Orya",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"pa-Guru",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ps-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"sd-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"si-Sinh",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ta-Taml",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"te-Telu",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ti-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"tk-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ur-Arab",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"uz-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"yi-Hebr",_distance:"10",_oneway:"true"}},{"sr-Cyrl":{_desired:"sr-Latn",_distance:"5"}},{"zh-Hans":{_desired:"za-Latn",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"zh-Hant":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"ar-Arab":{_desired:"ar-Latn",_distance:"20",_oneway:"true"}},{"bn-Beng":{_desired:"bn-Latn",_distance:"20",_oneway:"true"}},{"gu-Gujr":{_desired:"gu-Latn",_distance:"20",_oneway:"true"}},{"hi-Deva":{_desired:"hi-Latn",_distance:"20",_oneway:"true"}},{"kn-Knda":{_desired:"kn-Latn",_distance:"20",_oneway:"true"}},{"ml-Mlym":{_desired:"ml-Latn",_distance:"20",_oneway:"true"}},{"mr-Deva":{_desired:"mr-Latn",_distance:"20",_oneway:"true"}},{"ta-Taml":{_desired:"ta-Latn",_distance:"20",_oneway:"true"}},{"te-Telu":{_desired:"te-Latn",_distance:"20",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Latn",_distance:"20",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Latn",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hani",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hrkt",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hani",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hang",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"ko-Hang":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"*-*":{_desired:"*-*",_distance:"50"}},{"ar-*-$maghreb":{_desired:"ar-*-$maghreb",_distance:"4"}},{"ar-*-$!maghreb":{_desired:"ar-*-$!maghreb",_distance:"4"}},{"ar-*-*":{_desired:"ar-*-*",_distance:"5"}},{"en-*-$enUS":{_desired:"en-*-$enUS",_distance:"4"}},{"en-*-GB":{_desired:"en-*-$!enUS",_distance:"3"}},{"en-*-$!enUS":{_desired:"en-*-$!enUS",_distance:"4"}},{"en-*-*":{_desired:"en-*-*",_distance:"5"}},{"es-*-$americas":{_desired:"es-*-$americas",_distance:"4"}},{"es-*-$!americas":{_desired:"es-*-$!americas",_distance:"4"}},{"es-*-*":{_desired:"es-*-*",_distance:"5"}},{"pt-*-$americas":{_desired:"pt-*-$americas",_distance:"4"}},{"pt-*-$!americas":{_desired:"pt-*-$!americas",_distance:"4"}},{"pt-*-*":{_desired:"pt-*-*",_distance:"5"}},{"zh-Hant-$cnsar":{_desired:"zh-Hant-$cnsar",_distance:"4"}},{"zh-Hant-$!cnsar":{_desired:"zh-Hant-$!cnsar",_distance:"4"}},{"zh-Hant-*":{_desired:"zh-Hant-*",_distance:"5"}},{"*-*-*":{_desired:"*-*-*",_distance:"4"}}]}}},m={"001":["001","001-status-grouping","002","005","009","011","013","014","015","017","018","019","021","029","030","034","035","039","053","054","057","061","142","143","145","150","151","154","155","AC","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CQ","CR","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","QO","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UN","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"002":["002","002-status-grouping","011","014","015","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EA","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","IC","IO","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SD","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TN","TZ","UG","YT","ZA","ZM","ZW"],"003":["003","013","021","029","AG","AI","AW","BB","BL","BM","BQ","BS","BZ","CA","CR","CU","CW","DM","DO","GD","GL","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PM","PR","SV","SX","TC","TT","US","VC","VG","VI"],"005":["005","AR","BO","BR","BV","CL","CO","EC","FK","GF","GS","GY","PE","PY","SR","UY","VE"],"009":["009","053","054","057","061","AC","AQ","AS","AU","CC","CK","CP","CX","DG","FJ","FM","GU","HM","KI","MH","MP","NC","NF","NR","NU","NZ","PF","PG","PN","PW","QO","SB","TA","TK","TO","TV","UM","VU","WF","WS"],"011":["011","BF","BJ","CI","CV","GH","GM","GN","GW","LR","ML","MR","NE","NG","SH","SL","SN","TG"],"013":["013","BZ","CR","GT","HN","MX","NI","PA","SV"],"014":["014","BI","DJ","ER","ET","IO","KE","KM","MG","MU","MW","MZ","RE","RW","SC","SO","SS","TF","TZ","UG","YT","ZM","ZW"],"015":["015","DZ","EA","EG","EH","IC","LY","MA","SD","TN"],"017":["017","AO","CD","CF","CG","CM","GA","GQ","ST","TD"],"018":["018","BW","LS","NA","SZ","ZA"],"019":["003","005","013","019","019-status-grouping","021","029","419","AG","AI","AR","AW","BB","BL","BM","BO","BQ","BR","BS","BV","BZ","CA","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GL","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PM","PR","PY","SR","SV","SX","TC","TT","US","UY","VC","VE","VG","VI"],"021":["021","BM","CA","GL","PM","US"],"029":["029","AG","AI","AW","BB","BL","BQ","BS","CU","CW","DM","DO","GD","GP","HT","JM","KN","KY","LC","MF","MQ","MS","PR","SX","TC","TT","VC","VG","VI"],"030":["030","CN","HK","JP","KP","KR","MN","MO","TW"],"034":["034","AF","BD","BT","IN","IR","LK","MV","NP","PK"],"035":["035","BN","ID","KH","LA","MM","MY","PH","SG","TH","TL","VN"],"039":["039","AD","AL","BA","ES","GI","GR","HR","IT","ME","MK","MT","PT","RS","SI","SM","VA","XK"],"053":["053","AU","CC","CX","HM","NF","NZ"],"054":["054","FJ","NC","PG","SB","VU"],"057":["057","FM","GU","KI","MH","MP","NR","PW","UM"],"061":["061","AS","CK","NU","PF","PN","TK","TO","TV","WF","WS"],142:["030","034","035","142","143","145","AE","AF","AM","AZ","BD","BH","BN","BT","CN","CY","GE","HK","ID","IL","IN","IQ","IR","JO","JP","KG","KH","KP","KR","KW","KZ","LA","LB","LK","MM","MN","MO","MV","MY","NP","OM","PH","PK","PS","QA","SA","SG","SY","TH","TJ","TL","TM","TR","TW","UZ","VN","YE"],143:["143","KG","KZ","TJ","TM","UZ"],145:["145","AE","AM","AZ","BH","CY","GE","IL","IQ","JO","KW","LB","OM","PS","QA","SA","SY","TR","YE"],150:["039","150","151","154","155","AD","AL","AT","AX","BA","BE","BG","BY","CH","CQ","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GG","GI","GR","HR","HU","IE","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SJ","SK","SM","UA","VA","XK"],151:["151","BG","BY","CZ","HU","MD","PL","RO","RU","SK","UA"],154:["154","AX","CQ","DK","EE","FI","FO","GB","GG","IE","IM","IS","JE","LT","LV","NO","SE","SJ"],155:["155","AT","BE","CH","DE","FR","LI","LU","MC","NL"],202:["011","014","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","ER","ET","GA","GH","GM","GN","GQ","GW","IO","KE","KM","LR","LS","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TZ","UG","YT","ZA","ZM","ZW"],419:["005","013","029","419","AG","AI","AR","AW","BB","BL","BO","BQ","BR","BS","BV","BZ","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PR","PY","SR","SV","SX","TC","TT","UY","VC","VE","VG","VI"],EU:["AT","BE","BG","CY","CZ","DE","DK","EE","ES","EU","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"],EZ:["AT","BE","CY","DE","EE","ES","EZ","FI","FR","GR","IE","IT","LT","LU","LV","MT","NL","PT","SI","SK"],QO:["AC","AQ","CP","DG","QO","TA"],UN:["AD","AE","AF","AG","AL","AM","AO","AR","AT","AU","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CD","CF","CG","CH","CI","CL","CM","CN","CO","CR","CU","CV","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FM","FR","GA","GB","GD","GE","GH","GM","GN","GQ","GR","GT","GW","GY","HN","HR","HT","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MR","MT","MU","MV","MW","MX","MY","MZ","NA","NE","NG","NI","NL","NO","NP","NR","NZ","OM","PA","PE","PG","PH","PK","PL","PT","PW","PY","QA","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SI","SK","SL","SM","SN","SO","SR","SS","ST","SV","SY","SZ","TD","TG","TH","TJ","TL","TM","TN","TO","TR","TT","TV","TZ","UA","UG","UN","US","UY","UZ","VC","VE","VN","VU","WS","YE","ZA","ZM","ZW"]},g=/-u(?:-[0-9a-z]{2,8})+/gi,b=838},4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},9014:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),u.call(this,e)};var s=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+s,e)).$offset=a,u.$x.$localOffset=s}else u=this.utc();return u};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),o=i(e).local();return d.call(r,o,t,n)}}}()},2257:function(e,n,o){var i=Symbol("SemVer ANY"),a=function(){"use strict";function e(n,r){if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),u(n,e)){if(n.loose===!!r.loose)return n;n=n.value}d("comparator",n,r),this.options=r,this.loose=!!r.loose,this.parse(n),this.semver===i?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}return r(e,[{key:"parse",value:function(e){var t=this.options.loose?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new h(n[2],this.options.loose):this.semver=i}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(d("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeof e)try{e=new h(e,this.options)}catch(e){return!1}return f(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!u(t,e))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new p(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new p(this.value,n).test(t.semver);var r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),i=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=f(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),c=f(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||o||i&&a||s||c}}],[{key:"ANY",get:function(){return i}}]),e}();e.exports=a;var s=o(5765),c=s.re,l=s.t,f=o(7539),d=o(4225),h=o(6376),p=o(6902)},6902:function(e,n,o){var i=function(){"use strict";function e(n,r){var o=this;if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),u(n,e))return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new e(n.raw,r);if(u(n,a))return this.raw=n.value,this.set=[[n]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n,this.set=n.split(/\s*\|\|\s*/).map((function(e){return o.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(n));this.format()}return r(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,n=this.options.loose;e=e.trim();var r=n?f[d.HYPHENRANGELOOSE]:f[d.HYPHENRANGE];e=e.replace(r,A(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(f[d.COMPARATORTRIM],h),s("comparator trim",e,f[d.COMPARATORTRIM]),e=(e=(e=e.replace(f[d.TILDETRIM],p)).replace(f[d.CARETTRIM],y)).split(/\s+/).join(" ");var o=n?f[d.COMPARATORLOOSE]:f[d.COMPARATOR];return e.split(" ").map((function(e){return m(e,t.options)})).join(" ").split(/\s+/).map((function(e){return k(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(o)}:function(){return!0}).map((function(e){return new a(e,t.options)}))}},{key:"intersects",value:function(t,n){if(!u(t,e))throw new TypeError("a Range is required");return this.set.some((function(e){return v(e,n)&&t.set.some((function(t){return v(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}]),e}();e.exports=i;var a=o(2257),s=o(4225),c=o(6376),l=o(5765),f=l.re,d=l.t,h=l.comparatorTrimReplace,p=l.tildeTrimReplace,y=l.caretTrimReplace,v=function(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n},m=function(e,t){return s("comp",e,t),e=_(e,t),s("caret",e),e=b(e,t),s("tildes",e),e=E(e,t),s("xrange",e),e=x(e,t),s("stars",e),e},g=function(e){return!e||"x"===e.toLowerCase()||"*"===e},b=function(e,t){return e.trim().split(/\s+/).map((function(e){return w(e,t)})).join(" ")},w=function(e,t){var n=t.loose?f[d.TILDELOOSE]:f[d.TILDE];return e.replace(n,(function(t,n,r,o,i){var a;return s("tilde",e,t,n,r,o,i),g(n)?a="":g(r)?a=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):g(o)?a=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):i?(s("replaceTilde pr",i),a=">=".concat(n,".").concat(r,".").concat(o,"-").concat(i," <").concat(n,".").concat(+r+1,".0-0")):a=">=".concat(n,".").concat(r,".").concat(o," <").concat(n,".").concat(+r+1,".0-0"),s("tilde return",a),a}))},_=function(e,t){return e.trim().split(/\s+/).map((function(e){return S(e,t)})).join(" ")},S=function(e,t){s("caret",e,t);var n=t.loose?f[d.CARETLOOSE]:f[d.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(function(t,n,o,i,a){var u;return s("caret",e,t,n,o,i,a),g(n)?u="":g(o)?u=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):g(i)?u="0"===n?">=".concat(n,".").concat(o,".0").concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".0").concat(r," <").concat(+n+1,".0.0-0"):a?(s("replaceCaret pr",a),u="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(+n+1,".0.0-0")):(s("no pr"),u="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i," <").concat(+n+1,".0.0-0")),s("caret return",u),u}))},E=function(e,t){return s("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return O(e,t)})).join(" ")},O=function(e,t){e=e.trim();var n=t.loose?f[d.XRANGELOOSE]:f[d.XRANGE];return e.replace(n,(function(n,r,o,i,a,u){s("xRange",e,n,r,o,i,a,u);var c=g(o),l=c||g(i),f=l||g(a),d=f;return"="===r&&d&&(r=""),u=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(i=0),a=0,">"===r?(r=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(u="-0"),n="".concat(r+o,".").concat(i,".").concat(a).concat(u)):l?n=">=".concat(o,".0.0").concat(u," <").concat(+o+1,".0.0-0"):f&&(n=">=".concat(o,".").concat(i,".0").concat(u," <").concat(o,".").concat(+i+1,".0-0")),s("xRange return",n),n}))},x=function(e,t){return s("replaceStars",e,t),e.trim().replace(f[d.STAR],"")},k=function(e,t){return s("replaceGTE0",e,t),e.trim().replace(f[t.includePrerelease?d.GTE0PRE:d.GTE0],"")},A=function(e){return function(t,n,r,o,i,a,u,s,c,l,f,d,h){return"".concat(n=g(r)?"":g(o)?">=".concat(r,".0.0").concat(e?"-0":""):g(i)?">=".concat(r,".").concat(o,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":"")," ").concat(s=g(c)?"":g(l)?"<".concat(+c+1,".0.0-0"):g(f)?"<".concat(c,".").concat(+l+1,".0-0"):d?"<=".concat(c,".").concat(l,".").concat(f,"-").concat(d):e?"<".concat(c,".").concat(l,".").concat(+f+1,"-0"):"<=".concat(s)).trim()}},P=function(e,t,n){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var o=0;o<e.length;o++)if(s(e[o].semver),e[o].semver!==a.ANY&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},6376:function(e,n,o){var i=o(4225),a=o(3295),s=a.MAX_LENGTH,c=a.MAX_SAFE_INTEGER,l=o(5765),f=l.re,d=l.t,h=o(6742).compareIdentifiers,p=function(){"use strict";function e(n,r){if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),u(n,e)){if(n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease)return n;n=n.version}else if("string"!=typeof n)throw new TypeError("Invalid Version: ".concat(n));if(n.length>s)throw new TypeError("version is longer than ".concat(s," characters"));i("SemVer",n,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;var o=n.trim().match(r.loose?f[d.LOOSE]:f[d.FULL]);if(!o)throw new TypeError("Invalid Version: ".concat(n));if(this.raw=n,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>c||this.major<0)throw new TypeError("Invalid major version");if(this.minor>c||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>c||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<c)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}return r(e,[{key:"format",value:function(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}},{key:"toString",value:function(){return this.version}},{key:"compare",value:function(t){if(i("SemVer.compare",this.version,this.options,t),!u(t,e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}},{key:"compareMain",value:function(t){return u(t,e)||(t=new e(t,this.options)),h(this.major,t.major)||h(this.minor,t.minor)||h(this.patch,t.patch)}},{key:"comparePre",value:function(t){if(u(t,e)||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var n=0;do{var r=this.prerelease[n],o=t.prerelease[n];if(i("prerelease compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return h(r,o)}while(++n)}},{key:"compareBuild",value:function(t){u(t,e)||(t=new e(t,this.options));var n=0;do{var r=this.build[n],o=t.build[n];if(i("prerelease compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return h(r,o)}while(++n)}},{key:"inc",value:function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}();e.exports=p},3507:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:function(e,t,n){var r=n(8718),o=n(1194),i=n(1312),a=n(5903),u=n(1544),s=n(2056);e.exports=function(e,t,n,c){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return a(e,n,c);case"<":return u(e,n,c);case"<=":return s(e,n,c);default:throw new TypeError("Invalid operator: ".concat(t))}}},9038:function(e,t,n){var r=n(6376),o=n(3959),i=n(5765),a=i.re,s=i.t;e.exports=function(e,t){if(u(e,r))return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var i;(i=a[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&i.index+i[0].length===n.index+n[0].length||(n=i),a[s.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;a[s.COERCERTL].lastIndex=-1}else n=e.match(a[s.COERCE]);return null===n?null:o("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)}},8880:function(e,t,n){var r=n(6376);e.exports=function(e,t,n){var o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},7880:function(e,t,n){var r=n(6269);e.exports=function(e,t){return r(e,t,!0)}},6269:function(e,t,n){var r=n(6376);e.exports=function(e,t,n){return new r(e,n).compare(new r(t,n))}},2378:function(e,t,n){var r=n(3959),o=n(8718);e.exports=function(e,t){if(o(e,t))return null;var n=r(e),i=r(t),a=n.prerelease.length||i.prerelease.length,u=a?"pre":"",s=a?"prerelease":"";for(var c in n)if(("major"===c||"minor"===c||"patch"===c)&&n[c]!==i[c])return u+c;return s}},8718:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return 0===r(e,t,n)}},1312:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)>0}},5903:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)>=0}},253:function(e,t,n){var r=n(6376);e.exports=function(e,t,n,o){"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},1544:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)<0}},2056:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)<=0}},8679:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).major}},7789:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).minor}},1194:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return 0!==r(e,t,n)}},3959:function(e,t,n){var r=n(3295).MAX_LENGTH,o=n(5765),i=o.re,a=o.t,s=n(6376);e.exports=function(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),u(e,s))return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?i[a.LOOSE]:i[a.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},2358:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).patch}},7559:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9795:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(t,e,n)}},3657:function(e,t,n){var r=n(8880);e.exports=function(e,t){return e.sort((function(e,n){return r(n,e,t)}))}},5712:function(e,t,n){var r=n(6902);e.exports=function(e,t,n){try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},1100:function(e,t,n){var r=n(8880);e.exports=function(e,t){return e.sort((function(e,n){return r(e,n,t)}))}},6397:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e,t);return n?n.version:null}},1249:function(e,t,n){var r=n(5765);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(3295).SEMVER_SPEC_VERSION,SemVer:n(6376),compareIdentifiers:n(6742).compareIdentifiers,rcompareIdentifiers:n(6742).rcompareIdentifiers,parse:n(3959),valid:n(6397),clean:n(3507),inc:n(253),diff:n(2378),major:n(8679),minor:n(7789),patch:n(2358),prerelease:n(7559),compare:n(6269),rcompare:n(9795),compareLoose:n(7880),compareBuild:n(8880),sort:n(1100),rsort:n(3657),gt:n(1312),lt:n(1544),eq:n(8718),neq:n(1194),gte:n(5903),lte:n(2056),cmp:n(7539),coerce:n(9038),Comparator:n(2257),Range:n(6902),satisfies:n(5712),toComparators:n(1042),maxSatisfying:n(5775),minSatisfying:n(1657),minVersion:n(5316),validRange:n(9042),outside:n(6826),gtr:n(7606),ltr:n(32),intersects:n(2937),simplifyRange:n(7908),subset:n(799)}},3295:function(e){var t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4225:function(e){var t,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=console).error.apply(t,["SEMVER"].concat(f(n)))}:function(){};e.exports=n},6742:function(e){var t=/^[0-9]+$/,n=function(e,n){var r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:function(e,t){return n(t,e)}}},5765:function(e,t,n){var r=n(3295).MAX_SAFE_COMPONENT_LENGTH,o=n(4225),i=(t=e.exports={}).re=[],a=t.src=[],u=t.t={},s=0,c=function(e,t,n){var r=s++;o(r,t),u[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION","(".concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")")),c("MAINVERSIONLOOSE","(".concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")")),c("PRERELEASEIDENTIFIER","(?:".concat(a[u.NUMERICIDENTIFIER],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),c("PRERELEASEIDENTIFIERLOOSE","(?:".concat(a[u.NUMERICIDENTIFIERLOOSE],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),c("PRERELEASE","(?:-(".concat(a[u.PRERELEASEIDENTIFIER],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIER],")*))")),c("PRERELEASELOOSE","(?:-?(".concat(a[u.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIERLOOSE],")*))")),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD","(?:\\+(".concat(a[u.BUILDIDENTIFIER],"(?:\\.").concat(a[u.BUILDIDENTIFIER],")*))")),c("FULLPLAIN","v?".concat(a[u.MAINVERSION]).concat(a[u.PRERELEASE],"?").concat(a[u.BUILD],"?")),c("FULL","^".concat(a[u.FULLPLAIN],"$")),c("LOOSEPLAIN","[v=\\s]*".concat(a[u.MAINVERSIONLOOSE]).concat(a[u.PRERELEASELOOSE],"?").concat(a[u.BUILD],"?")),c("LOOSE","^".concat(a[u.LOOSEPLAIN],"$")),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE","".concat(a[u.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),c("XRANGEIDENTIFIER","".concat(a[u.NUMERICIDENTIFIER],"|x|X|\\*")),c("XRANGEPLAIN","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:").concat(a[u.PRERELEASE],")?").concat(a[u.BUILD],"?)?)?")),c("XRANGEPLAINLOOSE","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:").concat(a[u.PRERELEASELOOSE],")?").concat(a[u.BUILD],"?)?)?")),c("XRANGE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAIN],"$")),c("XRANGELOOSE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAINLOOSE],"$")),c("COERCE","(^|[^\\d])(\\d{1,".concat(r,"})(?:\\.(\\d{1,").concat(r,"}))?(?:\\.(\\d{1,").concat(r,"}))?(?:$|[^\\d])")),c("COERCERTL",a[u.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM","(\\s*)".concat(a[u.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",c("TILDE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAIN],"$")),c("TILDELOOSE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAINLOOSE],"$")),c("LONECARET","(?:\\^)"),c("CARETTRIM","(\\s*)".concat(a[u.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",c("CARET","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAIN],"$")),c("CARETLOOSE","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAINLOOSE],"$")),c("COMPARATORLOOSE","^".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],")$|^$")),c("COMPARATOR","^".concat(a[u.GTLT],"\\s*(").concat(a[u.FULLPLAIN],")$|^$")),c("COMPARATORTRIM","(\\s*)".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],"|").concat(a[u.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE","^\\s*(".concat(a[u.XRANGEPLAIN],")\\s+-\\s+(").concat(a[u.XRANGEPLAIN],")\\s*$")),c("HYPHENRANGELOOSE","^\\s*(".concat(a[u.XRANGEPLAINLOOSE],")\\s+-\\s+(").concat(a[u.XRANGEPLAINLOOSE],")\\s*$")),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},7606:function(e,t,n){var r=n(6826);e.exports=function(e,t,n){return r(e,t,">",n)}},2937:function(e,t,n){var r=n(6902);e.exports=function(e,t,n){return e=new r(e,n),t=new r(t,n),e.intersects(t)}},32:function(e,t,n){var r=n(6826);e.exports=function(e,t,n){return r(e,t,"<",n)}},5775:function(e,t,n){var r=n(6376),o=n(6902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&-1!==a.compare(e)||(a=new r(i=e,n)))})),i}},1657:function(e,t,n){var r=n(6376),o=n(6902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&1!==a.compare(e)||(a=new r(i=e,n)))})),i}},5316:function(e,t,n){var r=n(6376),o=n(6902),i=n(1312);e.exports=function(e,t){e=new o(e,t);var n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(var a=0;a<e.set.length;++a)e.set[a].forEach((function(e){var t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!i(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}}));return n&&e.test(n)?n:null}},6826:function(e,t,n){var r=n(6376),o=n(2257),i=o.ANY,a=n(6902),u=n(5712),s=n(1312),c=n(1544),l=n(2056),f=n(5903);e.exports=function(e,t,n,h){var p,y,v,m,g,b=function(n){var r=t.set[n],a=null,u=null;return r.forEach((function(e){e.semver===i&&(e=new o(">=0.0.0")),a=a||e,u=u||e,p(e.semver,a.semver,h)?a=e:v(e.semver,u.semver,h)&&(u=e)})),a.operator===m||a.operator===g?{v:!1}:u.operator&&u.operator!==m||!y(e,u.semver)?u.operator===g&&v(e,u.semver)?{v:!1}:void 0:{v:!1}};switch(e=new r(e,h),t=new a(t,h),n){case">":p=s,y=l,v=c,m=">",g=">=";break;case"<":p=c,y=f,v=s,m="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(e,t,h))return!1;for(var w=0;w<t.set.length;++w){var _=b(w);if("object"===d(_))return _.v}return!0}},7908:function(e,t,n){var r=n(5712),o=n(6269);e.exports=function(e,t,n){var i=[],a=null,u=null,s=e.sort((function(e,t){return o(e,t,n)})),c=!0,f=!1,d=void 0;try{for(var h,p=s[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var y=h.value;r(y,t,n)?(u=y,a||(a=y)):(u&&i.push([a,u]),u=null,a=null)}}catch(e){f=!0,d=e}finally{try{c||null==p.return||p.return()}finally{if(f)throw d}}a&&i.push([a,null]);var v=[],m=!0,g=!1,b=void 0;try{for(var w,_=i[Symbol.iterator]();!(m=(w=_.next()).done);m=!0){var S=l(w.value,2),E=S[0],O=S[1];E===O?v.push(E):O||E!==s[0]?O?E===s[0]?v.push("<=".concat(O)):v.push("".concat(E," - ").concat(O)):v.push(">=".concat(E)):v.push("*")}}catch(e){g=!0,b=e}finally{try{m||null==_.return||_.return()}finally{if(g)throw b}}var x=v.join(" || "),k="string"==typeof t.raw?t.raw:String(t);return x.length<k.length?x:t}},799:function(e,t,n){var r=n(6902),o=n(2257).ANY,i=n(5712),a=n(6269),u=function(e,t,n){if(1===e.length&&e[0].semver===o)return 1===t.length&&t[0].semver===o;var r,u,l,f,d,h=new Set,p=!0,y=!1,v=void 0;try{for(var m,g=e[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var b=m.value;">"===b.operator||">="===b.operator?r=s(r,b,n):"<"===b.operator||"<="===b.operator?u=c(u,b,n):h.add(b.semver)}}catch(e){y=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(y)throw v}}if(h.size>1)return null;if(r&&u){if((l=a(r.semver,u.semver,n))>0)return null;if(0===l&&(">="!==r.operator||"<="!==u.operator))return null}var w=!0,_=!1,S=void 0;try{for(var E,O=h[Symbol.iterator]();!(w=(E=O.next()).done);w=!0){var x=E.value;if(r&&!i(x,String(r),n))return null;if(u&&!i(x,String(u),n))return null;var k=!0,A=!1,P=void 0;try{for(var j,D=t[Symbol.iterator]();!(k=(j=D.next()).done);k=!0){var C=j.value;if(!i(x,String(C),n))return!1}}catch(e){A=!0,P=e}finally{try{k||null==D.return||D.return()}finally{if(A)throw P}}return!0}}catch(e){_=!0,S=e}finally{try{w||null==O.return||O.return()}finally{if(_)throw S}}var T=!0,I=!1,M=void 0;try{for(var R,N=t[Symbol.iterator]();!(T=(R=N.next()).done);T=!0){var L=R.value;if(d=d||">"===L.operator||">="===L.operator,f=f||"<"===L.operator||"<="===L.operator,r)if(">"===L.operator||">="===L.operator){if(s(r,L,n)===L)return!1}else if(">="===r.operator&&!i(r.semver,String(L),n))return!1;if(u)if("<"===L.operator||"<="===L.operator){if(c(u,L,n)===L)return!1}else if("<="===u.operator&&!i(u.semver,String(L),n))return!1;if(!L.operator&&(u||r)&&0!==l)return!1}}catch(e){I=!0,M=e}finally{try{T||null==N.return||N.return()}finally{if(I)throw M}}return!(r&&f&&!u&&0!==l||u&&d&&!r&&0!==l)},s=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t,n){e=new r(e,n),t=new r(t,n);var o=!1,i=!0,a=!1,s=void 0;try{e:for(var c,l=e.set[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var f=c.value,d=!0,h=!1,p=void 0;try{for(var y,v=t.set[Symbol.iterator]();!(d=(y=v.next()).done);d=!0){var m=y.value,g=u(f,m,n);if(o=o||null!==g,g)continue e}}catch(e){h=!0,p=e}finally{try{d||null==v.return||v.return()}finally{if(h)throw p}}if(o)return!1}}catch(e){a=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}return!0}},1042:function(e,t,n){var r=n(6902);e.exports=function(e,t){return new r(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}},9042:function(e,t,n){var r=n(6902);e.exports=function(e,t){try{return new r(e,t).range||"*"}catch(e){return null}}},9688:function(e){"use strict";e.exports=c},2712:function(e,t,n){"use strict";var r=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}I(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},i=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},a=function(e,t){return function(n,r){t(n,r,e)}},s=function(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var u,s=r.kind,c="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?r.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var p={};for(var y in r)p[y]="access"===y?{}:r[y];for(var y in r.access)p.access[y]=r.access[y];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,n[h])("accessor"===s?{get:f.get,set:f.set}:f[c],p);if("accessor"===s){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(u=a(v.get))&&(f.get=u),(u=a(v.set))&&(f.set=u),(u=a(v.init))&&o.unshift(u)}else(u=a(v))&&("field"===s?o.unshift(u):f[c]=u)}l&&Object.defineProperty(l,r.name,f),d=!0},c=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0},l=function(e){return"symbol"==(void 0===e?"undefined":d(e))?e:"".concat(e)},f=function(e,t,n){return"symbol"==(void 0===t?"undefined":d(t))&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},h=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},p=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,u(t,n)?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},y=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},v=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||R(t,e,n)},m=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},g=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},b=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e},w=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},S=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{u((n=o[e](t)).value,N)?Promise.resolve(n.value.v).then(c,l):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}},E=function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:N(e[r](t)),done:!1}:o?o(t):t}:o}},O=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=m(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}},x=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&R(t,e,n);return L(t,e),t},A=function(e){return e&&e.__esModule?e:{default:e}},P=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},j=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},D=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},C=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t},T=function(e){function t(t){e.error=e.hasError?new F(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var o=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(o).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()};n.r(t),n.d(t,{__addDisposableResource:function(){return C},__assign:function(){return M},__asyncDelegator:function(){return E},__asyncGenerator:function(){return S},__asyncValues:function(){return O},__await:function(){return N},__awaiter:function(){return p},__classPrivateFieldGet:function(){return P},__classPrivateFieldIn:function(){return D},__classPrivateFieldSet:function(){return j},__createBinding:function(){return R},__decorate:function(){return i},__disposeResources:function(){return T},__esDecorate:function(){return s},__exportStar:function(){return v},__extends:function(){return r},__generator:function(){return y},__importDefault:function(){return A},__importStar:function(){return k},__makeTemplateObject:function(){return x},__metadata:function(){return h},__param:function(){return a},__propKey:function(){return l},__read:function(){return g},__rest:function(){return o},__runInitializers:function(){return c},__setFunctionName:function(){return f},__spread:function(){return b},__spreadArray:function(){return _},__spreadArrays:function(){return w},__values:function(){return m},default:function(){return B}});var I=function(e,t){return I=Object.setPrototypeOf||u({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},I(e,t)},M=function(){return M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},M.apply(this,arguments)},R=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function N(e){return u(this,N)?(this.v=e,this):new N(e)}var L=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},F="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r},B={__extends:r,__assign:M,__rest:o,__decorate:i,__param:a,__metadata:h,__awaiter:p,__generator:y,__createBinding:R,__exportStar:v,__values:m,__read:g,__spread:b,__spreadArrays:w,__spreadArray:_,__await:N,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:O,__makeTemplateObject:x,__importStar:k,__importDefault:A,__classPrivateFieldGet:P,__classPrivateFieldSet:j,__classPrivateFieldIn:D,__addDisposableResource:C,__disposeResources:T}}},n={};function h(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t].call(o.exports,o,o.exports,h),o.exports}h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return function(){"use strict";var e=function(e,t){var r=e.copy(),o="hour"in r?function(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,function(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=w(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=w(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=w(e.minute,60);var t=Math.floor(e.hour/24);return e.hour=w(e.hour,24),t}(e)}(r,t):0;n(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,c(r),v(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=o,function(e){for(;e.day<1;)e.month--,c(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,c(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);var i=r.calendar.getYearsInEra(r);if(r.year>i){var a,u,s=null===(a=(u=r.calendar).isInverseEra)||void 0===a?void 0:a.call(u,r);r.year=i,r.month=s?1:r.calendar.getMonthsInYear(r),r.day=s?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);var l=r.calendar.getMonthsInYear(r);return r.month>l&&(r.month=l,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r},n=function(e,t){var n,r;(null===(n=(r=e.calendar).isInverseEra)||void 0===n?void 0:n.call(r,e))&&(t=-t),e.year+=t},c=function(e){for(;e.month<1;)n(e,-1),e.month+=e.calendar.getMonthsInYear(e);for(var t=0;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,n(e,1)},v=function(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))},m=function(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),v(e)},g=function(t,n){return e(t,function(e){var t={};for(var n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}(n))},b=function(e,t){var n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),m(n),n},w=function(e,t){var n=e%t;return n<0&&(n+=t),n},_=function(e,t,n,r){var o=e.copy();switch(t){case"era":var i=e.calendar.getEras(),a=i.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=S(a,n,0,i.length-1,null==r?void 0:r.round),o.era=i[a],m(o);break;case"year":var u,s;(null===(u=(s=o.calendar).isInverseEra)||void 0===u?void 0:u.call(s,o))&&(n=-n),o.year=S(e.year,n,-1/0,9999,null==r?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=S(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":o.day=S(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),m(o),o},S=function(e,t,n,r){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4]){(e+=Math.sign(t))<n&&(e=r);var o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e},E=function(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)},O=function(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond},x=function(){return null==Ye&&(Ye=(new Intl.DateTimeFormat).resolvedOptions().timeZone),Ye},k=function(e,t){return e-t*Math.floor(e/t)},A=function(e,t,n,r){var o=(t=j(e,t))-1,i=-2;return n<=2?i=0:P(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)},P=function(e){return e%4==0&&(e%100!=0||e%400==0)},j=function(e,t){return"BC"===e?1-t:t},D=function(e){var t="AD";return e<=0&&(t="BC",e=1-e),[t,e]},C=function(e){var t=U(e,new Xe);return"".concat(String(t.year).padStart(4,"0"),"-").concat(String(t.month).padStart(2,"0"),"-").concat(String(t.day).padStart(2,"0"))},T=function(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)},I=function(e){var t,n="object"==typeof e[0]?e.shift():new Xe;if("string"==typeof e[0])t=e.shift();else{var r=n.getEras();t=r[r.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]},M=function(e){return R(j((e=U(e,new Xe)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)},R=function(e,t,n,r,o,i,a){var u=new Date;return u.setUTCHours(r,o,i,a),u.setUTCFullYear(e,t-1,n),u.getTime()},N=function(e,t){if("UTC"===t)return 0;if(e>0&&t===x())return-6e4*new Date(e).getTimezoneOffset();var n=L(e,t),r=n.year,o=n.month,i=n.day,a=n.hour,u=n.minute,s=n.second;return R(r,o,i,a,u,s,0)-1e3*Math.floor(e/1e3)},L=function(e,t){var n=rt.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),rt.set(t,n));var r=n.formatToParts(new Date(e)),o={},i=!0,a=!1,u=void 0;try{for(var s,c=r[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;"literal"!==l.type&&(o[l.type]=l.value)}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}return{year:"BC"===o.era||"B"===o.era?1-o.year:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}},F=function(e,t){return new Date(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compatible",r=B(e);if("UTC"===t)return M(r);if(t===x()&&"compatible"===n){r=U(r,new Xe);var o=new Date,i=j(r.era,r.year);return o.setFullYear(i,r.month-1,r.day),o.setHours(r.hour,r.minute,r.second,r.millisecond),o.getTime()}var a=M(r),u=N(a-ot,t),s=N(a+ot,t),c=function(e,t,n,r){return(n===r?[n]:[n,r]).filter((function(n){return function(e,t,n){var r=L(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}(e,t,n)}))}(r,t,a-u,a-s);if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(a-u,a-s);case"compatible":case"later":return Math.max(a-u,a-s);case"reject":throw new RangeError("No such absolute time found")}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compatible"))},B=function(e,t){var n,r,o=0,i=0,a=0,u=0;if("timeZone"in e)o=(n=e).hour,i=n.minute,a=n.second,u=n.millisecond;else if("hour"in e&&!t)return e;return t&&(o=(r=t).hour,i=r.minute,a=r.second,u=r.millisecond),new nt(e.calendar,e.era,e.year,e.month,e.day,o,i,a,u)},U=function(e,t){if(e.calendar.identifier===t.identifier)return e;var n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,m(r),r},G=function(e){var t=l(D(e.year+-543),2),n=t[0],r=t[1];return new et(n,r,e.month,e.day)},K=function(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1},V=function(e,t){var n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-K(e,n,1,1))/30);return[n,r,t+1-K(e,n,r,1)]},z=function(e){return Math.floor(e%4/3)},H=function(e,t){return t%13!=0?30:z(e)+5},q=function(e){return k(7*e+1,19)<7},W=function(e){var t=Math.floor((235*e-234)/19),n=12084+13753*t,r=29*t+Math.floor(n/25920);return k(3*(r+1),7)<3&&(r+=1),r},Y=function(e){return W(e)+function(e){var t=W(e-1),n=W(e);return W(e+1)-n==356?2:n-t==382?1:0}(e)},$=function(e){return Y(e+1)-Y(e)},J=function(e,t){if(t>=6&&!q(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;var n=function(e){var t=$(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?q(e)?30:0:30},Q=function(e,t,n,r){return r+Math.ceil(29.5*(n-1))+354*(t-1)+Math.floor((3+11*t)/30)+e-1},X=function(e,t,n){var r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+Q(t,r,1,1)))/29.5)+1),i=n-Q(t,r,o,1)+1;return new et(e,r,o,i)},Z=function(e){return(14+11*e)%30<11},ee=function(e){return bt+Je[e-mt]},te=function(e,t){var n=1<<11-(t-1);return $e[e-mt]&n?30:29},ne=function(e,t){for(var n=ee(e),r=1;r<t;r++)n+=te(e,r);return n},re=function(e){return Je[e+1-mt]-Je[e-mt]},oe=function(e){var t=Et.findIndex((function(t){var n=l(t,3),r=n[0],o=n[1],i=n[2];return e.year<r||e.year===r&&e.month<o||e.year===r&&e.month===o&&e.day<i}));return-1===t?Et.length-1:0===t?0:t-1},ie=function(e){var t=xt[kt.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new et(e.year+t,e.month,e.day)},ae=function(e){if(1===e.year){var t=kt.indexOf(e.era);return Et[t]}},ue=function(e){return"minguo"===e.era?e.year+Dt:1-e.year+Dt},se=function(e){var t=e-Dt;return t>0?["minguo",t]:["before_minguo",1-t]},ce=function(e){var t=l(D(ue(e)),2),n=t[0],r=t[1];return new et(n,r,e.month,e.day)},le=function(e,t){var n=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return function(e,t){return t.get?t.get.call(e):t.value}(e,n)},fe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},de=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fe(e,t,n[t])}))}return e},he=function(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&(0,We.default)(e,Nt).isValid()},pe=function(e){return(0,We.default)(e).isToday()},ye=function(e){return he(e)?(0,We.default)(e,Nt).toDate():null},ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,We.default)(e);return t&&(n=n.utc()),n.format(Nt)},me=function(e){return(0,We.default)(e).format("HH:mm")},ge=function(e){return We.default.utc(e).format("HH:mm A")},be=function(e){return _e(e,"DD - MMM - YYYY")},we=function(e){return _e(e,"DD-MMM")},_e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,We.default)(e).format(t)},Se=function(e){return(0,We.default)(e).toDate()},Ee=function(e,t){Bt.register(e,t)},Oe=function(e){var t,n,r=null!=e?e:Pe();return Bt.getCalendar((t=r,(null!=(n=Intl.Locale)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):u(t,n))?r:new Intl.Locale(r)))},xe=function(e,t){var n,r,o=null!==(n=null==t?void 0:t.locale)&&void 0!==n?n:Pe(),i=new Intl.Locale(o),a=de({},Lt,{noToday:"am"===i.language},t),u=a.calendar,s=a.mode,c=a.time,l=a.day,f=a.month,d=a.year,h=a.noToday,p=a.numberingSystem,y={calendar:null!=u?u:Oe(i),year:d?"numeric":void 0,month:f?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},v=(0,We.default)(e).isToday();if(v&&!h)r=(r=new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(o)+r.slice(1);else{"en"===i.language&&(o="en-GB");var m=new Intl.DateTimeFormat(o,y).formatToParts(e);("en"===i.language||"am"===i.language)&&"standard"==s&&d&&l&&(m=m.map(Ut("-"))),"wide"==s&&(m=m.map(Ut(" — "))),"ethiopic"===y.calendar&&(m=m.filter((function(e,t,n){return!("era"===e.type||"literal"===e.type&&t<n.length-1&&"era"===n[t+1].type)}))),r=m.map((function(e){return e.value})).join("")}return(!0===c||v&&"for today"===c)&&(r+=", ".concat(ke(e))),r},ke=function(e){return e.toLocaleTimeString(Pe(),{hour:"2-digit",minute:"2-digit"})},Ae=function(e,t){return xe(e,(n=de({},t),r=null!=(r={time:!0})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n));var n,r},Pe=function(){var e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e},je=function(e,t){var n=Oe("string"==typeof t?new Intl.Locale(t):t);return n?U(e,function(e){switch(e){case"buddhist":return new it;case"ethiopic":return new ct;case"ethioaa":return new lt;case"coptic":return new ft;case"hebrew":return new ht;case"indian":return new pt;case"islamic-civil":return new wt;case"islamic-tbla":return new _t;case"islamic-umalqura":return new St;case"japanese":return new At;case"persian":return new jt;case"roc":return new Ct;default:return new Xe}}(n)):e},De=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,We.default)();if(null==e)return null;var n=(0,We.default)(t),r=(0,We.default)(e),o=n.diff(r,"hours"),i=n.diff(r,"days"),a=n.diff(r,"weeks"),u=n.diff(r,"months"),s=n.diff(r,"years"),c={},l=Pe();if(o<2){var f=n.diff(r,"minutes");c.minutes=f}else if(i<2)c.hours=o;else if(a<4)c.days=i;else if(s<1){var d=n.subtract(a,"weeks").diff(r,"days");c.weeks=a,c.days=d}else if(s<2){var h=n.subtract(u,"months").diff(r,"days");c.months=u,c.days=h}else if(s<18){var p=n.subtract(s,"year").diff(r,"months");c.years=s,c.months=p}else c.years=s;return new Gt.DurationFormat(l,{style:"short",localeMatcher:"lookup"}).format(c)},Ce=function(e){return!window.offlineEnabled||(null!=e?e:navigator.onLine)},Te=function(e){return Me(Ne(e,"usual","official"))},Ie=function(e){return Te(e)},Me=function(e){var t;return e?null!==(t=e.text)&&void 0!==t?t:function(e){var t,n=null!==(t=e.given)&&void 0!==t?t:[];return(e.family?n.concat(e.family):n).join(" ")}(e):""},Re=function(e){return Me(e)},Ne=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];0==n.length&&(n=["usual"]);var o,i=!0,a=!1,u=void 0;try{for(var s,c=function(){var t,n=s.value,r=null===(t=e.name)||void 0===t?void 0:t.find((function(e){return function(e,t){return e.use?e.use===t:"usual"===t}(e,n)}));if(r)return{v:r}},l=n[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var f=c();if("object"==((o=f)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":void 0===o?"undefined":d(o)))return f.v}}catch(e){a=!0,u=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw u}}},Le=function(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t))return!1;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(t);return r.length===o.length&&r.every((function(n){return e[n]===t[n]}))},Fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.localStorage;try{return e.getItem("test"),!0}catch(e){return!1}},Be=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ue=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split("."))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Be(e,3);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Be(e,3):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)},Ge=function(e,t){var n=function(e){var t=e.indexOf("-");if(t>=0){var n=Ue(e.slice(0,t)),r=e.slice(t+1);return"".concat(n,"-").concat(r)}return Ue(e)}(t);return Vt.satisfies(n,e,{includePrerelease:!0})},Ke=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ve=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ke(i,r,o,a,u,"next",e)}function u(e){Ke(i,r,o,a,u,"throw",e)}a(void 0)}))}},ze=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},He=function(e){return zt.apply(this,arguments)},qe=function(e){return Ht.apply(this,arguments)};h.r(y),h.d(y,{age:function(){return De},canAccessStorage:function(){return Fe},convertToLocaleCalendar:function(){return je},displayName:function(){return Ie},formatDate:function(){return xe},formatDatetime:function(){return Ae},formatPatientName:function(){return Me},formatTime:function(){return ke},formattedName:function(){return Re},getDefaultCalendar:function(){return Oe},getDefaultsFromConfigSchema:function(){return Kt},getLocale:function(){return Pe},getPatientName:function(){return Te},isOmrsDateStrict:function(){return he},isOmrsDateToday:function(){return pe},isOnline:function(){return Ce},isVersionSatisfied:function(){return Ge},parseDate:function(){return Se},registerDefaultCalendar:function(){return Ee},retry:function(){return He},selectPreferredName:function(){return Ne},shallowEqual:function(){return Le},toDateObjectStrict:function(){return ye},toOmrsDateFormat:function(){return _e},toOmrsDayDateFormat:function(){return be},toOmrsIsoString:function(){return ve},toOmrsTimeString:function(){return ge},toOmrsTimeString24:function(){return me},toOmrsYearlessDateFormat:function(){return we}});var We=h(9688),Ye=null;new Map;var $e,Je,Qe={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Xe=function(){function e(){t(this,e),this.identifier="gregory"}return r(e,[{key:"fromJulianDay",value:function(e){var t=e,n=t-1721426,r=Math.floor(n/146097),o=k(n,146097),i=Math.floor(o/36524),a=k(o,36524),u=Math.floor(a/1461),s=k(a,1461),c=Math.floor(s/365),f=l(D(400*r+100*i+4*u+c+(4!==i&&4!==c?1:0)),2),d=f[0],h=f[1],p=t-A(d,h,1,1),y=2;t<A(d,h,3,1)?y=0:P(h)&&(y=1);var v=Math.floor((12*(p+y)+373)/367),m=t-A(d,h,v,1)+1;return new et(d,h,v,m)}},{key:"toJulianDay",value:function(e){return A(e.era,e.year,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){return Qe[P(e.year)?"leapyear":"standard"][e.month-1]}},{key:"getMonthsInYear",value:function(e){return 12}},{key:"getDaysInYear",value:function(e){return P(e.year)?366:365}},{key:"getYearsInEra",value:function(e){return 9999}},{key:"getEras",value:function(){return["BC","AD"]}},{key:"isInverseEra",value:function(e){return"BC"===e.era}},{key:"balanceDate",value:function(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}}]),e}(),Ze=new WeakMap,et=function(){function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t(this,n),T(this,Ze,{writable:!0,value:void 0});var i=l(I(r),5),a=i[0],u=i[1],s=i[2],c=i[3],f=i[4];this.calendar=a,this.era=u,this.year=s,this.month=c,this.day=f,m(this)}return r(n,[{key:"copy",value:function(){return this.era?new n(this.calendar,this.era,this.year,this.month,this.day):new n(this.calendar,this.year,this.month,this.day)}},{key:"add",value:function(t){return e(this,t)}},{key:"subtract",value:function(e){return g(this,e)}},{key:"set",value:function(e){return b(this,e)}},{key:"cycle",value:function(e,t,n){return _(this,e,t,n)}},{key:"toDate",value:function(e){return F(this,e)}},{key:"toString",value:function(){return C(this)}},{key:"compare",value:function(e){return E(this,e)}}]),n}(),tt=new WeakMap,nt=function(){function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t(this,n),T(this,tt,{writable:!0,value:void 0});var i=l(I(r),5),a=i[0],u=i[1],s=i[2],c=i[3],f=i[4];this.calendar=a,this.era=u,this.year=s,this.month=c,this.day=f,this.hour=r.shift()||0,this.minute=r.shift()||0,this.second=r.shift()||0,this.millisecond=r.shift()||0,m(this)}return r(n,[{key:"copy",value:function(){return this.era?new n(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new n(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}},{key:"add",value:function(t){return e(this,t)}},{key:"subtract",value:function(e){return g(this,e)}},{key:"set",value:function(e){return b(function(e,t){var n,r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),(n=r).millisecond=Math.max(0,Math.min(n.millisecond,1e3)),n.second=Math.max(0,Math.min(n.second,59)),n.minute=Math.max(0,Math.min(n.minute,59)),n.hour=Math.max(0,Math.min(n.hour,23)),r}(this,e),e)}},{key:"cycle",value:function(e,t,n){switch(e){case"era":case"year":case"month":case"day":return _(this,e,t,n);default:return function(e,t,n,r){var o=e.copy();switch(t){case"hour":var i=e.hour,a=0,u=23;if(12===(null==r?void 0:r.hourCycle)){var s=i>=12;a=s?12:0,u=s?23:11}o.hour=S(i,n,a,u,null==r?void 0:r.round);break;case"minute":o.minute=S(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":o.second=S(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":o.millisecond=S(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return o}(this,e,t,n)}}},{key:"toDate",value:function(e,t){return F(this,e,t)}},{key:"toString",value:function(){return"".concat(C(this),"T").concat((e=this,"".concat(String(e.hour).padStart(2,"0"),":").concat(String(e.minute).padStart(2,"0"),":").concat(String(e.second).padStart(2,"0")).concat(e.millisecond?String(e.millisecond/1e3).slice(1):"")));var e}},{key:"compare",value:function(e){var t=E(this,e);return 0===t?function(e,t){return O(e)-O(t)}(this,B(e)):t}}]),n}(),rt=new Map,ot=864e5,it=function(e){a(u,e);var n=p(u);function u(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i;return t(this,u),(i=n.call.apply(n,[this].concat(f(r)))).identifier="buddhist",s(i)}return r(u,[{key:"fromJulianDay",value:function(e){var t=o(i(u.prototype),"fromJulianDay",this).call(this,e),n=j(t.era,t.year);return new et(this,n- -543,t.month,t.day)}},{key:"toJulianDay",value:function(e){return o(i(u.prototype),"toJulianDay",this).call(this,G(e))}},{key:"getEras",value:function(){return["BE"]}},{key:"getDaysInMonth",value:function(e){return o(i(u.prototype),"getDaysInMonth",this).call(this,G(e))}},{key:"balanceDate",value:function(){}}]),u}(Xe),at=1723856,ut=1824665,st=5500,ct=function(){function e(){t(this,e),this.identifier="ethiopic"}return r(e,[{key:"fromJulianDay",value:function(e){var t=l(V(at,e),3),n=t[0],r=t[1],o=t[2],i="AM";return n<=0&&(i="AA",n+=st),new et(this,i,n,r,o)}},{key:"toJulianDay",value:function(e){var t=e.year;return"AA"===e.era&&(t-=st),K(at,t,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){return H(e.year,e.month)}},{key:"getMonthsInYear",value:function(){return 13}},{key:"getDaysInYear",value:function(e){return 365+z(e.year)}},{key:"getYearsInEra",value:function(e){return"AA"===e.era?9999:9991}},{key:"getEras",value:function(){return["AA","AM"]}}]),e}(),lt=function(e){a(o,e);var n=p(o);function o(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var a;return t(this,o),(a=n.call.apply(n,[this].concat(f(r)))).identifier="ethioaa",s(a)}return r(o,[{key:"fromJulianDay",value:function(e){var t=l(V(at,e),3),n=t[0],r=t[1],o=t[2];return new et(this,"AA",n+=st,r,o)}},{key:"getEras",value:function(){return["AA"]}},{key:"getYearsInEra",value:function(){return 9999}}]),o}(ct),ft=function(e){a(o,e);var n=p(o);function o(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var a;return t(this,o),(a=n.call.apply(n,[this].concat(f(r)))).identifier="coptic",s(a)}return r(o,[{key:"fromJulianDay",value:function(e){var t=l(V(ut,e),3),n=t[0],r=t[1],o=t[2],i="CE";return n<=0&&(i="BCE",n=1-n),new et(this,i,n,r,o)}},{key:"toJulianDay",value:function(e){var t=e.year;return"BCE"===e.era&&(t=1-t),K(ut,t,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){var t=e.year;return"BCE"===e.era&&(t=1-t),H(t,e.month)}},{key:"isInverseEra",value:function(e){return"BCE"===e.era}},{key:"balanceDate",value:function(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}},{key:"getEras",value:function(){return["BCE","CE"]}},{key:"getYearsInEra",value:function(e){return"BCE"===e.era?9999:9715}}]),o}(ct),dt=347997,ht=function(){function e(){t(this,e),this.identifier="hebrew"}return r(e,[{key:"fromJulianDay",value:function(e){for(var t=e-dt,n=25920*t/765433,r=Math.floor((19*n+234)/235)+1,o=Y(r),i=Math.floor(t-o);i<1;)r--,o=Y(r),i=Math.floor(t-o);for(var a=1,u=0;u<i;)u+=J(r,a),a++;return a--,u-=J(r,a),new et(this,r,a,i-u)}},{key:"toJulianDay",value:function(e){for(var t=Y(e.year),n=1;n<e.month;n++)t+=J(e.year,n);return t+e.day+dt}},{key:"getDaysInMonth",value:function(e){return J(e.year,e.month)}},{key:"getMonthsInYear",value:function(e){return q(e.year)?13:12}},{key:"getDaysInYear",value:function(e){return $(e.year)}},{key:"getYearsInEra",value:function(){return 9999}},{key:"getEras",value:function(){return["AM"]}},{key:"balanceYearMonth",value:function(e,t){t.year!==e.year&&(q(t.year)&&!q(e.year)&&t.month>6?e.month--:!q(t.year)&&q(e.year)&&t.month>6&&e.month++)}}]),e}(),pt=function(e){a(u,e);var n=p(u);function u(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i;return t(this,u),(i=n.call.apply(n,[this].concat(f(r)))).identifier="indian",s(i)}return r(u,[{key:"fromJulianDay",value:function(e){var t,n,r,a=o(i(u.prototype),"fromJulianDay",this).call(this,e),s=a.year-78,c=e-A(a.era,a.year,1,1);if(c<80?(s--,c+=155+(t=P(a.year-1)?31:30)+90+10):(t=P(a.year)?31:30,c-=80),c<t)n=1,r=c+1;else{var l=c-t;l<155?(n=Math.floor(l/31)+2,r=l%31+1):(l-=155,n=Math.floor(l/30)+7,r=l%30+1)}return new et(this,s,n,r)}},{key:"toJulianDay",value:function(e){var t,n,r=e.year+78,o=l(D(r),2),i=o[0],a=o[1];return P(a)?(t=31,n=A(i,a,3,21)):(t=30,n=A(i,a,3,22)),1===e.month?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=30*(e.month-7)),n+=e.day-1)}},{key:"getDaysInMonth",value:function(e){return 1===e.month&&P(e.year+78)||e.month>=2&&e.month<=6?31:30}},{key:"getYearsInEra",value:function(){return 9919}},{key:"getEras",value:function(){return["saka"]}},{key:"balanceDate",value:function(){}}]),u}(Xe),yt=1948440,vt=1948439,mt=1300,gt=1600,bt=460322,wt=function(){function e(){t(this,e),this.identifier="islamic-civil"}return r(e,[{key:"fromJulianDay",value:function(e){return X(this,yt,e)}},{key:"toJulianDay",value:function(e){return Q(yt,e.year,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){var t=29+e.month%2;return 12===e.month&&Z(e.year)&&t++,t}},{key:"getMonthsInYear",value:function(){return 12}},{key:"getDaysInYear",value:function(e){return Z(e.year)?355:354}},{key:"getYearsInEra",value:function(){return 9665}},{key:"getEras",value:function(){return["AH"]}}]),e}(),_t=function(e){a(o,e);var n=p(o);function o(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var a;return t(this,o),(a=n.call.apply(n,[this].concat(f(r)))).identifier="islamic-tbla",s(a)}return r(o,[{key:"fromJulianDay",value:function(e){return X(this,vt,e)}},{key:"toJulianDay",value:function(e){return Q(vt,e.year,e.month,e.day)}}]),o}(wt),St=function(e){a(u,e);var n=p(u);function u(){var e;if(t(this,u),(e=n.call(this)).identifier="islamic-umalqura",$e||($e=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),(function(e){return e.charCodeAt(0)})).buffer)),!Je){Je=new Uint32Array(gt-mt+1);for(var r=0,o=mt;o<=gt;o++){Je[o-mt]=r;for(var i=1;i<=12;i++)r+=te(o,i)}}return s(e)}return r(u,[{key:"fromJulianDay",value:function(e){var t=e-yt,n=ee(mt),r=ee(gt);if(t<n||t>r)return o(i(u.prototype),"fromJulianDay",this).call(this,e);for(var a=mt-1,s=1,c=1;c>0;){a++,c=t-ee(a)+1;var l=re(a);if(c===l){s=12;break}if(c<l){var f=te(a,s);for(s=1;c>f;)c-=f,s++,f=te(a,s);break}}return new et(this,a,s,t-ne(a,s)+1)}},{key:"toJulianDay",value:function(e){return e.year<mt||e.year>gt?o(i(u.prototype),"toJulianDay",this).call(this,e):yt+ne(e.year,e.month)+(e.day-1)}},{key:"getDaysInMonth",value:function(e){return e.year<mt||e.year>gt?o(i(u.prototype),"getDaysInMonth",this).call(this,e):te(e.year,e.month)}},{key:"getDaysInYear",value:function(e){return e.year<mt||e.year>gt?o(i(u.prototype),"getDaysInYear",this).call(this,e):re(e.year)}}]),u}(wt),Et=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],Ot=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],xt=[1867,1911,1925,1988,2018],kt=["meiji","taisho","showa","heisei","reiwa"],At=function(e){a(u,e);var n=p(u);function u(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i;return t(this,u),(i=n.call.apply(n,[this].concat(f(r)))).identifier="japanese",s(i)}return r(u,[{key:"fromJulianDay",value:function(e){var t=o(i(u.prototype),"fromJulianDay",this).call(this,e),n=oe(t);return new et(this,kt[n],t.year-xt[n],t.month,t.day)}},{key:"toJulianDay",value:function(e){return o(i(u.prototype),"toJulianDay",this).call(this,ie(e))}},{key:"balanceDate",value:function(e){var t=ie(e),n=oe(t);kt[n]!==e.era&&(e.era=kt[n],e.year=t.year-xt[n]),this.constrainDate(e)}},{key:"constrainDate",value:function(e){var t=kt.indexOf(e.era),n=Ot[t];if(null!=n){var r=l(n,3),o=r[0],i=r[1],a=r[2],u=o-xt[t];e.year=Math.max(1,Math.min(u,e.year)),e.year===u&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){var s=l(Et[t],3),c=s[1],f=s[2];e.month=Math.max(c,e.month),e.month===c&&(e.day=Math.max(f,e.day))}}},{key:"getEras",value:function(){return kt}},{key:"getYearsInEra",value:function(e){var t=kt.indexOf(e.era),n=Et[t],r=Et[t+1];if(null==r)return 9999-n[0]+1;var o=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}},{key:"getDaysInMonth",value:function(e){return o(i(u.prototype),"getDaysInMonth",this).call(this,ie(e))}},{key:"getMinimumMonthInYear",value:function(e){var t=ae(e);return t?t[1]:1}},{key:"getMinimumDayInMonth",value:function(e){var t=ae(e);return t&&e.month===t[1]?t[2]:1}}]),u}(Xe),Pt=[0,31,62,93,124,155,186,216,246,276,306,336],jt=function(){function e(){t(this,e),this.identifier="persian"}return r(e,[{key:"fromJulianDay",value:function(e){var t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30);return new et(this,n,o+1,r-Pt[o]+1)}},{key:"toJulianDay",value:function(e){var t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return(t+=Pt[e.month-1])+e.day}},{key:"getMonthsInYear",value:function(){return 12}},{key:"getDaysInMonth",value:function(e){return e.month<=6?31:e.month<=11||k(25*e.year+11,33)<8?30:29}},{key:"getEras",value:function(){return["AP"]}},{key:"getYearsInEra",value:function(){return 9377}}]),e}(),Dt=1911,Ct=function(e){a(u,e);var n=p(u);function u(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i;return t(this,u),(i=n.call.apply(n,[this].concat(f(r)))).identifier="roc",s(i)}return r(u,[{key:"fromJulianDay",value:function(e){var t=o(i(u.prototype),"fromJulianDay",this).call(this,e),n=j(t.era,t.year),r=l(se(n),2),a=r[0],s=r[1];return new et(this,a,s,t.month,t.day)}},{key:"toJulianDay",value:function(e){return o(i(u.prototype),"toJulianDay",this).call(this,ce(e))}},{key:"getEras",value:function(){return["before_minguo","minguo"]}},{key:"balanceDate",value:function(e){var t=l(se(ue(e)),2),n=t[0],r=t[1];e.era=n,e.year=r}},{key:"isInverseEra",value:function(e){return"before_minguo"===e.era}},{key:"getDaysInMonth",value:function(e){return o(i(u.prototype),"getDaysInMonth",this).call(this,ce(e))}},{key:"getYearsInEra",value:function(e){return"before_minguo"===e.era?9999:9999-Dt}}]),u}(Xe),Tt=h(9014),It=h.n(Tt),Mt=h(4332),Rt=h.n(Mt);We.default.extend(It()),We.default.extend(Rt());var Nt="YYYY-MM-DDTHH:mm:ss.SSSZZ",Lt={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1},Ft=new WeakMap,Bt=new(function(){function e(){var t,n;!function(e,t){if(!u(e,t))throw new TypeError("Cannot call a class as a function")}(this,e),t=Ft,n={writable:!0,value:new Map},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(this,t),t.set(this,n),le(this,Ft).set("am","ethiopic")}var t;return(t=[{key:"register",value:function(e,t){le(this,Ft).set(e,t)}},{key:"getCalendar",value:function(e){if(Boolean(e)){if(e.calendar)return e.calendar;if(e.region){var t="".concat(e.language,"-").concat(e.region);if(le(this,Ft).has(t))return le(this,Ft).get(t)}if(e.language&&le(this,Ft).has(e.language))return le(this,Ft).get(e.language);var n=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return le(this,Ft).set("".concat(e.language).concat(e.region?"-".concat(e.region):""),n),n}}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}()),Ut=function(e){return function(t,n,r){return"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e}}},Gt=h(6893);function Kt(e){var t,n={},r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value;if(e[s].hasOwnProperty("_default"))n[s]=e[s]._default;else{if(s.startsWith("_"))continue;(t=e[s])&&t.constructor===Object?n[s]=Kt(e[s]):n[s]=e[s]}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}var Vt=h(1249);function zt(){return zt=Ve((function(e){var t,n,r,o,i,a,u,s=arguments;return ze(this,(function(c){switch(c.label){case 0:n=(t=s.length>1&&void 0!==s[1]?s[1]:{}).shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return function(e,t){return e<=5}(e)},r=null!=r?r:function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e+1:e;return t*Math.pow(2,n)}(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,qe(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return u=c.sent(),null==o||o(u,i),a=u,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),zt.apply(this,arguments)}function Ht(){return(Ht=Ve((function(e){return ze(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}}(),y}())}}}))}}]);