@kenyaemr/esm-ward-app 8.5.4-pre.96 → 8.5.4

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 (671) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/dist/1033.js +1 -0
  3. package/dist/1033.js.map +1 -0
  4. package/dist/1364.js +1 -0
  5. package/dist/1364.js.map +1 -0
  6. package/dist/1480.js +1 -0
  7. package/dist/1480.js.map +1 -0
  8. package/dist/1613.css +1 -0
  9. package/dist/1613.css.map +1 -0
  10. package/dist/1613.js +1 -0
  11. package/dist/1613.js.map +1 -0
  12. package/dist/1646.js +1 -0
  13. package/dist/1646.js.map +1 -0
  14. package/dist/1744.js +1 -0
  15. package/dist/1744.js.map +1 -0
  16. package/dist/1869.js +1 -0
  17. package/dist/1869.js.map +1 -0
  18. package/dist/1877.js +1 -0
  19. package/dist/1877.js.map +1 -0
  20. package/dist/193.js +1 -0
  21. package/dist/193.js.map +1 -0
  22. package/dist/1992.css +1 -0
  23. package/dist/1992.css.map +1 -0
  24. package/dist/1992.js +1 -0
  25. package/dist/1992.js.map +1 -0
  26. package/dist/2007.js +1 -0
  27. package/dist/2007.js.map +1 -0
  28. package/dist/2101.css +1 -0
  29. package/dist/2101.css.map +1 -0
  30. package/dist/2101.js +1 -0
  31. package/dist/2101.js.map +1 -0
  32. package/dist/2304.js +1 -0
  33. package/dist/2304.js.map +1 -0
  34. package/dist/2317.js +1 -0
  35. package/dist/2317.js.map +1 -0
  36. package/dist/2326.css +1 -0
  37. package/dist/2326.css.map +1 -0
  38. package/dist/2326.js +1 -0
  39. package/dist/2326.js.map +1 -0
  40. package/dist/2416.js +1 -0
  41. package/dist/2416.js.map +1 -0
  42. package/dist/2446.css +1 -0
  43. package/dist/2446.css.map +1 -0
  44. package/dist/2446.js +1 -0
  45. package/dist/2446.js.map +1 -0
  46. package/dist/2724.css +1 -0
  47. package/dist/2724.css.map +1 -0
  48. package/dist/2724.js +1 -0
  49. package/dist/2724.js.map +1 -0
  50. package/dist/2764.js +1 -0
  51. package/dist/2764.js.map +1 -0
  52. package/dist/282.js +1 -0
  53. package/dist/282.js.map +1 -0
  54. package/dist/2881.js +1 -0
  55. package/dist/2881.js.map +1 -0
  56. package/dist/297.js +1 -0
  57. package/dist/297.js.map +1 -0
  58. package/dist/2988.js +1 -0
  59. package/dist/2988.js.map +1 -0
  60. package/dist/3012.css +1 -0
  61. package/dist/3012.css.map +1 -0
  62. package/dist/3012.js +43 -0
  63. package/dist/3012.js.map +1 -0
  64. package/dist/3253.css +1 -0
  65. package/dist/3253.css.map +1 -0
  66. package/dist/3253.js +1 -0
  67. package/dist/3253.js.map +1 -0
  68. package/dist/3276.css +1 -0
  69. package/dist/3276.css.map +1 -0
  70. package/dist/3276.js +1 -0
  71. package/dist/3276.js.map +1 -0
  72. package/dist/3378.js +1 -0
  73. package/dist/3378.js.map +1 -0
  74. package/dist/3428.css +1 -0
  75. package/dist/3428.css.map +1 -0
  76. package/dist/3428.js +1 -0
  77. package/dist/3428.js.map +1 -0
  78. package/dist/3446.css +1 -0
  79. package/dist/3446.css.map +1 -0
  80. package/dist/3446.js +1 -0
  81. package/dist/3446.js.map +1 -0
  82. package/dist/3720.js +1 -0
  83. package/dist/3720.js.map +1 -0
  84. package/dist/3824.js +1 -0
  85. package/dist/3824.js.map +1 -0
  86. package/dist/3877.js +1 -0
  87. package/dist/3877.js.map +1 -0
  88. package/dist/3963.js +1 -0
  89. package/dist/3963.js.map +1 -0
  90. package/dist/3989.js +1 -0
  91. package/dist/3989.js.map +1 -0
  92. package/dist/4106.js +1 -0
  93. package/dist/4106.js.map +1 -0
  94. package/dist/4111.js +1 -0
  95. package/dist/4111.js.map +1 -0
  96. package/dist/4145.js +1 -0
  97. package/dist/4145.js.map +1 -0
  98. package/dist/4162.js +1 -0
  99. package/dist/4162.js.map +1 -0
  100. package/dist/4266.css +1 -0
  101. package/dist/4266.css.map +1 -0
  102. package/dist/4266.js +1 -0
  103. package/dist/4266.js.map +1 -0
  104. package/dist/4304.js +1 -0
  105. package/dist/4304.js.map +1 -0
  106. package/dist/434.js +1 -0
  107. package/dist/434.js.map +1 -0
  108. package/dist/4348.js +1 -0
  109. package/dist/4348.js.map +1 -0
  110. package/dist/4383.js +1 -0
  111. package/dist/4383.js.map +1 -0
  112. package/dist/4658.js +1 -0
  113. package/dist/4658.js.map +1 -0
  114. package/dist/466.js +1 -0
  115. package/dist/466.js.map +1 -0
  116. package/dist/4777.js +1 -0
  117. package/dist/4777.js.map +1 -0
  118. package/dist/4847.css +1 -0
  119. package/dist/4847.css.map +1 -0
  120. package/dist/4847.js +1 -0
  121. package/dist/4847.js.map +1 -0
  122. package/dist/4883.css +1 -0
  123. package/dist/4883.css.map +1 -0
  124. package/dist/4883.js +1 -0
  125. package/dist/4883.js.map +1 -0
  126. package/dist/502.js +1 -0
  127. package/dist/502.js.map +1 -0
  128. package/dist/5050.css +1 -0
  129. package/dist/5050.css.map +1 -0
  130. package/dist/5050.js +1 -0
  131. package/dist/5050.js.map +1 -0
  132. package/dist/5060.css +1 -0
  133. package/dist/5060.css.map +1 -0
  134. package/dist/5060.js +1 -0
  135. package/dist/5060.js.map +1 -0
  136. package/dist/5117.js +1 -0
  137. package/dist/5117.js.map +1 -0
  138. package/dist/5132.js +1 -0
  139. package/dist/5132.js.map +1 -0
  140. package/dist/5145.js +1 -0
  141. package/dist/5145.js.map +1 -0
  142. package/dist/5181.js +1 -0
  143. package/dist/5181.js.map +1 -0
  144. package/dist/5460.css +1 -0
  145. package/dist/5460.css.map +1 -0
  146. package/dist/5460.js +1 -0
  147. package/dist/5460.js.map +1 -0
  148. package/dist/5493.css +1 -0
  149. package/dist/5493.css.map +1 -0
  150. package/dist/5493.js +1 -0
  151. package/dist/5493.js.map +1 -0
  152. package/dist/5503.js +1 -0
  153. package/dist/5503.js.map +1 -0
  154. package/dist/5576.js +1 -0
  155. package/dist/5576.js.map +1 -0
  156. package/dist/5591.css +1 -0
  157. package/dist/5591.css.map +1 -0
  158. package/dist/5591.js +1 -0
  159. package/dist/5591.js.map +1 -0
  160. package/dist/5644.js +1 -0
  161. package/dist/5644.js.map +1 -0
  162. package/dist/5650.js +1 -0
  163. package/dist/5650.js.map +1 -0
  164. package/dist/5697.js +1 -0
  165. package/dist/5697.js.map +1 -0
  166. package/dist/5862.css +1 -0
  167. package/dist/5862.css.map +1 -0
  168. package/dist/5862.js +1 -0
  169. package/dist/5862.js.map +1 -0
  170. package/dist/5940.js +1 -0
  171. package/dist/5940.js.map +1 -0
  172. package/dist/5976.js +1 -0
  173. package/dist/5976.js.map +1 -0
  174. package/dist/6047.js +1 -0
  175. package/dist/6047.js.map +1 -0
  176. package/dist/6079.css +1 -0
  177. package/dist/6079.css.map +1 -0
  178. package/dist/6079.js +1 -0
  179. package/dist/6079.js.map +1 -0
  180. package/dist/6126.js +1 -0
  181. package/dist/6126.js.map +1 -0
  182. package/dist/6196.js +1 -0
  183. package/dist/6196.js.map +1 -0
  184. package/dist/6358.js +1 -0
  185. package/dist/6358.js.map +1 -0
  186. package/dist/636.js +1 -0
  187. package/dist/636.js.map +1 -0
  188. package/dist/6371.js +1 -0
  189. package/dist/6371.js.map +1 -0
  190. package/dist/6377.js +1 -0
  191. package/dist/6377.js.map +1 -0
  192. package/dist/6380.css +1 -0
  193. package/dist/6380.css.map +1 -0
  194. package/dist/6380.js +1 -0
  195. package/dist/6380.js.map +1 -0
  196. package/dist/6444.js +1 -0
  197. package/dist/6444.js.map +1 -0
  198. package/dist/6482.css +1 -0
  199. package/dist/6482.css.map +1 -0
  200. package/dist/6482.js +1 -0
  201. package/dist/6482.js.map +1 -0
  202. package/dist/6508.js +1 -0
  203. package/dist/6508.js.map +1 -0
  204. package/dist/6703.css +1 -0
  205. package/dist/6703.css.map +1 -0
  206. package/dist/6703.js +1 -0
  207. package/dist/6703.js.map +1 -0
  208. package/dist/6724.js +1 -0
  209. package/dist/6724.js.map +1 -0
  210. package/dist/689.js +1 -0
  211. package/dist/689.js.map +1 -0
  212. package/dist/6904.js +1 -0
  213. package/dist/6904.js.map +1 -0
  214. package/dist/7045.js +1 -0
  215. package/dist/7045.js.map +1 -0
  216. package/dist/7175.js +1 -0
  217. package/dist/7175.js.map +1 -0
  218. package/dist/7240.css +1 -0
  219. package/dist/7240.css.map +1 -0
  220. package/dist/7240.js +1 -0
  221. package/dist/7240.js.map +1 -0
  222. package/dist/7683.js +1 -0
  223. package/dist/7683.js.map +1 -0
  224. package/dist/7742.js +1 -0
  225. package/dist/7742.js.map +1 -0
  226. package/dist/7849.js +1 -0
  227. package/dist/7849.js.map +1 -0
  228. package/dist/7891.css +1 -0
  229. package/dist/7891.css.map +1 -0
  230. package/dist/7891.js +1 -0
  231. package/dist/7891.js.map +1 -0
  232. package/dist/7912.js +1 -0
  233. package/dist/7912.js.map +1 -0
  234. package/dist/7984.js +1 -0
  235. package/dist/7984.js.map +1 -0
  236. package/dist/8202.js +20 -0
  237. package/dist/8202.js.map +1 -0
  238. package/dist/8302.css +1 -0
  239. package/dist/8302.css.map +1 -0
  240. package/dist/8302.js +1 -0
  241. package/dist/8302.js.map +1 -0
  242. package/dist/8358.js +1 -0
  243. package/dist/8358.js.map +1 -0
  244. package/dist/8359.js +1 -0
  245. package/dist/8359.js.map +1 -0
  246. package/dist/8448.css +1 -0
  247. package/dist/8448.css.map +1 -0
  248. package/dist/8448.js +1 -0
  249. package/dist/8448.js.map +1 -0
  250. package/dist/8502.js +1 -0
  251. package/dist/8502.js.map +1 -0
  252. package/dist/8695.js +1 -0
  253. package/dist/8695.js.map +1 -0
  254. package/dist/8923.css +1 -0
  255. package/dist/8923.css.map +1 -0
  256. package/dist/8923.js +24 -0
  257. package/dist/8923.js.map +1 -0
  258. package/dist/8990.js +1 -0
  259. package/dist/8990.js.map +1 -0
  260. package/dist/9011.js +1 -0
  261. package/dist/9011.js.map +1 -0
  262. package/dist/903.js +1 -0
  263. package/dist/903.js.map +1 -0
  264. package/dist/9049.js +1 -0
  265. package/dist/9049.js.map +1 -0
  266. package/dist/9061.js +1 -0
  267. package/dist/9061.js.map +1 -0
  268. package/dist/9072.js +1 -0
  269. package/dist/9072.js.map +1 -0
  270. package/dist/9080.css +1 -0
  271. package/dist/9080.css.map +1 -0
  272. package/dist/9080.js +1 -0
  273. package/dist/9080.js.map +1 -0
  274. package/dist/9124.css +1 -0
  275. package/dist/9124.css.map +1 -0
  276. package/dist/9124.js +1 -0
  277. package/dist/9124.js.map +1 -0
  278. package/dist/9143.js +1 -0
  279. package/dist/9143.js.map +1 -0
  280. package/dist/9301.js +1 -0
  281. package/dist/9301.js.map +1 -0
  282. package/dist/9309.css +1 -0
  283. package/dist/9309.css.map +1 -0
  284. package/dist/9427.js +1 -0
  285. package/dist/9427.js.map +1 -0
  286. package/dist/9456.css +1 -0
  287. package/dist/9456.css.map +1 -0
  288. package/dist/9456.js +1 -0
  289. package/dist/9456.js.map +1 -0
  290. package/dist/9712.js +1 -0
  291. package/dist/9712.js.map +1 -0
  292. package/dist/9771.js +1 -0
  293. package/dist/9771.js.map +1 -0
  294. package/dist/9806.js +1 -0
  295. package/dist/9806.js.map +1 -0
  296. package/dist/9875.css +1 -0
  297. package/dist/9875.css.map +1 -0
  298. package/dist/9875.js +60 -0
  299. package/dist/9875.js.map +1 -0
  300. package/dist/9926.css +1 -0
  301. package/dist/9926.css.map +1 -0
  302. package/dist/9926.js +1 -0
  303. package/dist/9926.js.map +1 -0
  304. package/dist/9976.css +1 -0
  305. package/dist/9976.css.map +1 -0
  306. package/dist/9976.js +1 -0
  307. package/dist/9976.js.map +1 -0
  308. package/dist/kenyaemr-esm-ward-app.js +3 -5
  309. package/dist/kenyaemr-esm-ward-app.js.buildmanifest.json +1137 -943
  310. package/dist/kenyaemr-esm-ward-app.js.map +1 -1
  311. package/dist/routes.json +1 -1
  312. package/package.json +5 -4
  313. package/rspack.config.js +3 -1
  314. package/src/autosuggest/autosuggest.component.tsx +203 -0
  315. package/src/autosuggest/autosuggest.scss +75 -0
  316. package/src/autosuggest/patient-search-info.component.tsx +40 -0
  317. package/src/autosuggest/patient-search-info.scss +37 -0
  318. package/src/autosuggest/search-empty-state.component.tsx +27 -0
  319. package/src/autosuggest/search-empty-state.scss +18 -0
  320. package/src/billing/create-bill.resource.ts +147 -0
  321. package/src/billing/create-bill.scss +122 -0
  322. package/src/billing/create-bill.workspace.tsx +468 -0
  323. package/src/config-schema.ts +224 -5
  324. package/src/declarations.d.ts +1 -0
  325. package/src/discharge-printouts/discharge-printout.preview-modal.scss +21 -0
  326. package/src/discharge-printouts/discharge-printout.preview-modal.tsx +67 -21
  327. package/src/discharge-printouts/discharge-printout.resource.ts +100 -45
  328. package/src/discharge-printouts/discharge-printouts.scss +9 -1
  329. package/src/discharge-printouts/discharge-summary.tsx +76 -50
  330. package/src/discharge-printouts/investigations-and-procedures.scss +48 -0
  331. package/src/discharge-printouts/investigrations-and-procedures.components.tsx +134 -0
  332. package/src/discharge-printouts/lab-results.tsx +1 -2
  333. package/src/discharge-printouts/use-print-preview.ts +35 -0
  334. package/src/hooks/critical-care-ward.utils.ts +136 -0
  335. package/src/hooks/use-patient-summary.tsx +101 -0
  336. package/src/hooks/useCriticalCareWardTab.ts +94 -0
  337. package/src/hooks/useEbolaIsolationSuspects.test.ts +24 -0
  338. package/src/hooks/useEbolaIsolationSuspects.ts +51 -0
  339. package/src/hooks/useFacilityRegistry.ts +32 -0
  340. package/src/hooks/useIpdDischargeEncounter.ts +3 -0
  341. package/src/hooks/useIsIsolationWard.ts +51 -0
  342. package/src/hooks/useSelectableWards.ts +72 -0
  343. package/src/hooks/useSummaryMetrics.ts +14 -4
  344. package/src/hooks/useWardPatientGrouping.ts +4 -4
  345. package/src/in-patient/admission-request.component.tsx +1 -1
  346. package/src/in-patient/bloodTransfusion/blood-transfusion-dashboard.component.tsx +15 -0
  347. package/src/in-patient/bloodTransfusion/components/blood-transfusion-chart.component.tsx +635 -0
  348. package/src/in-patient/bloodTransfusion/components/blood-transfusion-form.component.tsx +849 -0
  349. package/src/in-patient/bloodTransfusion/components/blood-transfusion.scss +741 -0
  350. package/src/in-patient/bloodTransfusion/components/provider-search.component.tsx +111 -0
  351. package/src/in-patient/bloodTransfusion/components/provider-search.scss +49 -0
  352. package/src/in-patient/bloodTransfusion/components/transfusion-time-picker.component.tsx +231 -0
  353. package/src/in-patient/bloodTransfusion/components/transfusion-time-picker.scss +142 -0
  354. package/src/in-patient/bloodTransfusion/config/blood-transfusion.defaults.ts +164 -0
  355. package/src/in-patient/bloodTransfusion/resources/blood-transfusion.resource.ts +238 -0
  356. package/src/in-patient/bloodTransfusion/resources/openmrs-encounter-search.ts +41 -0
  357. package/src/in-patient/bloodTransfusion/resources/provider.resource.ts +30 -0
  358. package/src/in-patient/bloodTransfusion/resources/resolve-encounter-type.ts +135 -0
  359. package/src/in-patient/bloodTransfusion/types/blood-transfusion.types.ts +90 -0
  360. package/src/in-patient/bloodTransfusion/utils/blood-transfusion-obs.mapper.ts +404 -0
  361. package/src/in-patient/bloodTransfusion/utils/blood-transfusion.utils.ts +356 -0
  362. package/src/in-patient/bloodTransfusion/utils/encounter-datetime.utils.ts +27 -0
  363. package/src/in-patient/bloodTransfusion/utils/openmrs-concept-metadata.ts +512 -0
  364. package/src/in-patient/bloodTransfusion/utils/openmrs-concept.utils.ts +41 -0
  365. package/src/in-patient/bloodTransfusion/utils/openmrs-error.utils.ts +79 -0
  366. package/src/in-patient/bloodTransfusion/utils/timezone.utils.ts +159 -0
  367. package/src/in-patient/bloodTransfusion/utils/variant-class.utils.ts +11 -0
  368. package/src/in-patient/ebola/case-followup-day-picker.component.tsx +217 -0
  369. package/src/in-patient/ebola/case-followup.component.test.tsx +373 -0
  370. package/src/in-patient/ebola/case-followup.component.tsx +569 -0
  371. package/src/in-patient/ebola/case-followup.resource.test.ts +205 -0
  372. package/src/in-patient/ebola/case-followup.resource.ts +509 -0
  373. package/src/in-patient/ebola/case-followup.scss +506 -0
  374. package/src/in-patient/ebola/case-followup.utils.test.ts +414 -0
  375. package/src/in-patient/ebola/case-followup.utils.ts +725 -0
  376. package/src/in-patient/ebola/case-identification-finding/case-identification-finding.component.test.tsx +88 -0
  377. package/src/in-patient/ebola/case-identification-finding/case-identification-finding.component.tsx +208 -0
  378. package/src/in-patient/ebola/case-identification-finding/case-identification-finding.resource.ts +32 -0
  379. package/src/in-patient/ebola/case-identification-finding/case-identification-finding.scss +39 -0
  380. package/src/in-patient/ebola/contact-list/add-contact-form.workspace.tsx +465 -0
  381. package/src/in-patient/ebola/contact-list/adresshierarchy.component.tsx +32 -0
  382. package/src/in-patient/ebola/contact-list/contact-list-form.scss +29 -0
  383. package/src/in-patient/ebola/contact-list/contact-list.resource.tsx +371 -0
  384. package/src/in-patient/ebola/contact-list/contact-list.types.ts +41 -0
  385. package/src/in-patient/ebola/contact-list/contact-listing.component.tsx +179 -0
  386. package/src/in-patient/ebola/contact-list/contact-listing.scss +15 -0
  387. package/src/in-patient/ebola/contact-list/contact-tracing-history.component.tsx +159 -0
  388. package/src/in-patient/ebola/contact-list/contact-tracing.resource.tsx +125 -0
  389. package/src/in-patient/ebola/contact-list/relationship-type.component.tsx +31 -0
  390. package/src/in-patient/ebola/contact-list/use-contact-mapping.ts +247 -0
  391. package/src/in-patient/ebola/index.ts +20 -0
  392. package/src/in-patient/in-patient.resource.tsx +0 -32
  393. package/src/in-patient/inpatient-detail-view.component.tsx +20 -5
  394. package/src/in-patient/inpatient-forms.component.tsx +2 -2
  395. package/src/in-patient/inpatient-tabs.component.tsx +29 -79
  396. package/src/in-patient/inpatient.scss +5 -0
  397. package/src/in-patient/labourCareGuide/alert-rules.ts +4 -5
  398. package/src/in-patient/labourCareGuide/components/summary-of-labour-section.component.tsx +408 -0
  399. package/src/in-patient/labourCareGuide/constants/admission-form.constants.ts +3 -0
  400. package/src/in-patient/labourCareGuide/constants/summary-of-labour.constants.ts +102 -0
  401. package/src/in-patient/labourCareGuide/forms/admission-details-form.component.tsx +58 -7
  402. package/src/in-patient/labourCareGuide/forms/baby-form.component.tsx +18 -3
  403. package/src/in-patient/labourCareGuide/forms/index.ts +1 -0
  404. package/src/in-patient/labourCareGuide/forms/labour-care-guide-forms.component.tsx +54 -1
  405. package/src/in-patient/labourCareGuide/forms/lcg-session-correction-wizard.component.tsx +122 -75
  406. package/src/in-patient/labourCareGuide/forms/shared-decision-making-form.component.tsx +229 -227
  407. package/src/in-patient/labourCareGuide/forms/summary-of-labour-form.component.tsx +887 -0
  408. package/src/in-patient/labourCareGuide/forms/time-picker-dropdown.component.tsx +47 -62
  409. package/src/in-patient/labourCareGuide/forms/time-picker-dropdown.scss +3 -2
  410. package/src/in-patient/labourCareGuide/forms/vital-range-limits.test.tsx +140 -0
  411. package/src/in-patient/labourCareGuide/forms/woman-form.component.tsx +23 -3
  412. package/src/in-patient/labourCareGuide/graphs/baby.component.tsx +1 -1
  413. package/src/in-patient/labourCareGuide/hooks/use-lcg-data.ts +47 -2
  414. package/src/in-patient/labourCareGuide/labour-care-guide-header.component.tsx +17 -3
  415. package/src/in-patient/labourCareGuide/labour-care-guide.component.tsx +378 -59
  416. package/src/in-patient/labourCareGuide/labour-care-guide.scss +209 -0
  417. package/src/in-patient/labourCareGuide/maternity-inpatient-form.workspace.tsx +75 -0
  418. package/src/in-patient/labourCareGuide/partography-data-form.scss +121 -40
  419. package/src/in-patient/labourCareGuide/partography.resource.ts +21 -88
  420. package/src/in-patient/labourCareGuide/resources/admission-details.resource.ts +10 -10
  421. package/src/in-patient/labourCareGuide/resources/baby.resource.ts +35 -12
  422. package/src/in-patient/labourCareGuide/resources/labour-progress.resource.ts +9 -6
  423. package/src/in-patient/labourCareGuide/resources/labour-time-set-select-setup.resource.ts +7 -6
  424. package/src/in-patient/labourCareGuide/resources/lcg-encounter-fetch.ts +98 -0
  425. package/src/in-patient/labourCareGuide/resources/lcg-session-correction.resource.ts +24 -13
  426. package/src/in-patient/labourCareGuide/resources/medication.resource.ts +6 -5
  427. package/src/in-patient/labourCareGuide/resources/shared-decision-making.resource.ts +6 -4
  428. package/src/in-patient/labourCareGuide/resources/summary-of-labour.resource.ts +472 -0
  429. package/src/in-patient/labourCareGuide/resources/supportive-care.resource.ts +13 -9
  430. package/src/in-patient/labourCareGuide/summary-of-labour-prefill.utils.ts +436 -0
  431. package/src/in-patient/labourCareGuide/time-slot-utils.ts +33 -4
  432. package/src/in-patient/labourCareGuide/types/concept-uuids.constants.ts +1 -0
  433. package/src/in-patient/labourCareGuide/types/index.ts +21 -6
  434. package/src/in-patient/partograph.component.tsx +1 -13
  435. package/src/in-patient/time-ago.ts +34 -0
  436. package/src/in-patient/treatmentChart/nursing-cardex-plan.resource.ts +111 -20
  437. package/src/in-patient/treatmentChart/nursing-cardex-plan.workspace.scss +30 -0
  438. package/src/in-patient/treatmentChart/nursing-cardex-plan.workspace.tsx +223 -25
  439. package/src/in-patient/treatmentChart/nursing-treatment-sheet.resource.ts +90 -0
  440. package/src/in-patient/treatmentChart/nursing-treatment-sheet.utils.test.ts +272 -0
  441. package/src/in-patient/treatmentChart/nursing-treatment-sheet.utils.ts +169 -0
  442. package/src/in-patient/treatmentChart/use-nursing-cardex-form-schema.ts +2 -14
  443. package/src/index.ts +17 -0
  444. package/src/routes.json +78 -2
  445. package/src/types/index.ts +3 -3
  446. package/src/ward-patients/admitted-patients.tsx +61 -56
  447. package/src/ward-patients/awaiting-admission-patients.tsx +70 -52
  448. package/src/ward-patients/discharge-in-patients.tsx +102 -48
  449. package/src/ward-patients/discharge-patient-action.component.tsx +80 -0
  450. package/src/ward-patients/discharge-patients.tsx +73 -62
  451. package/src/ward-patients/ebola-awaiting-admission-patients.tsx +213 -0
  452. package/src/ward-patients/patient-cells.scss +13 -0
  453. package/src/ward-patients/patient-cells.tsx +75 -19
  454. package/src/ward-patients/table-state-components.tsx +48 -3
  455. package/src/ward-patients/unassigned-patient.scss +9 -0
  456. package/src/ward-patients/unassigned-patients.tsx +215 -0
  457. package/src/ward-patients/ward-patient.scss +121 -15
  458. package/src/ward-patients/ward-patients-slots.ts +12 -0
  459. package/src/ward-patients/ward-patients-table.test.tsx +65 -17
  460. package/src/ward-patients/ward-patients-table.tsx +90 -23
  461. package/src/ward-view/_ward-theme.scss +16 -0
  462. package/src/ward-view/default-ward/default-ward-view.component.tsx +40 -8
  463. package/src/ward-view/linelist-wards/Filters.tsx +27 -13
  464. package/src/ward-view/linelist-wards/Header.tsx +28 -14
  465. package/src/ward-view/linelist-wards/Metrics.tsx +52 -11
  466. package/src/ward-view/linelist-wards/linelist-wards.scss +169 -17
  467. package/src/ward-view/materal-ward/ward-switch.scss +66 -0
  468. package/src/ward-view/ward-switch.modal.tsx +74 -35
  469. package/src/ward-view/ward-view-content-wrapper.tsx +46 -18
  470. package/src/ward-view/ward-view-ui.store.ts +53 -0
  471. package/src/ward-view/ward-view.resource.ts +5 -5
  472. package/src/ward-view/ward-view.scss +96 -8
  473. package/src/ward-workspace/admission-request-workspace/admission-requests-workspace.test.tsx +3 -1
  474. package/src/ward-workspace/admit-patient-button.component.tsx +24 -2
  475. package/src/ward-workspace/admit-patient-button.test.tsx +131 -0
  476. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.test.tsx +34 -0
  477. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.workspace.tsx +7 -187
  478. package/src/ward-workspace/admit-patient-form-workspace/facility-bed-capacity-notification.component.tsx +41 -0
  479. package/src/ward-workspace/admit-patient-form-workspace/patient-admission.resources.ts +0 -49
  480. package/src/ward-workspace/create-admission-encounter/create-admission-encounter.test.tsx +3 -1
  481. package/src/ward-workspace/kenya-emr-patient-discharge/patient-discharge.resource.tsx +25 -23
  482. package/src/ward-workspace/kenya-emr-patient-discharge/patient-discharge.workspace.tsx +24 -10
  483. package/translations/am.json +7 -1
  484. package/translations/en.json +223 -25
  485. package/translations/fr.json +169 -26
  486. package/translations/sw.json +7 -1
  487. package/dist/1084.js +0 -1
  488. package/dist/1084.js.map +0 -1
  489. package/dist/1189.js +0 -1
  490. package/dist/1189.js.map +0 -1
  491. package/dist/12.js +0 -17
  492. package/dist/12.js.map +0 -1
  493. package/dist/126.js +0 -1
  494. package/dist/1308.js +0 -1
  495. package/dist/1308.js.map +0 -1
  496. package/dist/1374.js +0 -1
  497. package/dist/1374.js.map +0 -1
  498. package/dist/1387.js +0 -1
  499. package/dist/1387.js.map +0 -1
  500. package/dist/15.js +0 -1
  501. package/dist/1564.js +0 -1
  502. package/dist/1567.js +0 -1
  503. package/dist/1567.js.map +0 -1
  504. package/dist/1739.js +0 -1
  505. package/dist/1739.js.map +0 -1
  506. package/dist/1845.js +0 -1
  507. package/dist/1972.js +0 -1
  508. package/dist/1972.js.map +0 -1
  509. package/dist/2016.js +0 -1
  510. package/dist/2016.js.map +0 -1
  511. package/dist/2117.js +0 -1
  512. package/dist/2117.js.map +0 -1
  513. package/dist/215.js +0 -1
  514. package/dist/2178.js +0 -1
  515. package/dist/239.js +0 -1
  516. package/dist/239.js.map +0 -1
  517. package/dist/2486.js +0 -1
  518. package/dist/2486.js.map +0 -1
  519. package/dist/2512.js +0 -1
  520. package/dist/2512.js.map +0 -1
  521. package/dist/2566.js +0 -1
  522. package/dist/2710.js +0 -1
  523. package/dist/2710.js.map +0 -1
  524. package/dist/2759.js +0 -1
  525. package/dist/2823.js +0 -15
  526. package/dist/2823.js.map +0 -1
  527. package/dist/3089.js +0 -1
  528. package/dist/3089.js.map +0 -1
  529. package/dist/3230.js +0 -1
  530. package/dist/3261.js +0 -1
  531. package/dist/3261.js.map +0 -1
  532. package/dist/3321.js +0 -1
  533. package/dist/3321.js.map +0 -1
  534. package/dist/3350.js +0 -1
  535. package/dist/3399.js +0 -1
  536. package/dist/3399.js.map +0 -1
  537. package/dist/3441.js +0 -1
  538. package/dist/3547.js +0 -1
  539. package/dist/3547.js.map +0 -1
  540. package/dist/3548.js +0 -1
  541. package/dist/3548.js.map +0 -1
  542. package/dist/3565.js +0 -1
  543. package/dist/3571.js +0 -1
  544. package/dist/3571.js.map +0 -1
  545. package/dist/364.js +0 -1
  546. package/dist/364.js.map +0 -1
  547. package/dist/3746.js +0 -1
  548. package/dist/3837.js +0 -1
  549. package/dist/3837.js.map +0 -1
  550. package/dist/3925.js +0 -1
  551. package/dist/3946.js +0 -1
  552. package/dist/400.js +0 -1
  553. package/dist/400.js.map +0 -1
  554. package/dist/401.js +0 -1
  555. package/dist/401.js.map +0 -1
  556. package/dist/4206.js +0 -1
  557. package/dist/4206.js.map +0 -1
  558. package/dist/4480.js +0 -1
  559. package/dist/4480.js.map +0 -1
  560. package/dist/4635.js +0 -1
  561. package/dist/4635.js.map +0 -1
  562. package/dist/4684.js +0 -1
  563. package/dist/4684.js.map +0 -1
  564. package/dist/4735.js +0 -1
  565. package/dist/4735.js.map +0 -1
  566. package/dist/4744.js +0 -1
  567. package/dist/4744.js.map +0 -1
  568. package/dist/4894.js +0 -1
  569. package/dist/4970.js +0 -1
  570. package/dist/4970.js.map +0 -1
  571. package/dist/5069.js +0 -1
  572. package/dist/5069.js.map +0 -1
  573. package/dist/5090.js +0 -1
  574. package/dist/5090.js.map +0 -1
  575. package/dist/5130.js +0 -1
  576. package/dist/5187.js +0 -1
  577. package/dist/5411.js +0 -1
  578. package/dist/5411.js.map +0 -1
  579. package/dist/5441.js +0 -1
  580. package/dist/5441.js.map +0 -1
  581. package/dist/5463.js +0 -1
  582. package/dist/5463.js.map +0 -1
  583. package/dist/5491.js +0 -1
  584. package/dist/5491.js.map +0 -1
  585. package/dist/5496.js +0 -1
  586. package/dist/5496.js.map +0 -1
  587. package/dist/5595.js +0 -1
  588. package/dist/5659.js +0 -1
  589. package/dist/5659.js.map +0 -1
  590. package/dist/5706.js +0 -1
  591. package/dist/5706.js.map +0 -1
  592. package/dist/5930.js +0 -1
  593. package/dist/5930.js.map +0 -1
  594. package/dist/5961.js +0 -1
  595. package/dist/6061.js +0 -1
  596. package/dist/6061.js.map +0 -1
  597. package/dist/6133.js +0 -1
  598. package/dist/6180.js +0 -1
  599. package/dist/6180.js.map +0 -1
  600. package/dist/6296.js +0 -1
  601. package/dist/6296.js.map +0 -1
  602. package/dist/6322.js +0 -1
  603. package/dist/6322.js.map +0 -1
  604. package/dist/6455.js +0 -1
  605. package/dist/6455.js.map +0 -1
  606. package/dist/6456.js +0 -1
  607. package/dist/6466.js +0 -1
  608. package/dist/6613.js +0 -1
  609. package/dist/6783.js +0 -1
  610. package/dist/6925.js +0 -1
  611. package/dist/6925.js.map +0 -1
  612. package/dist/7091.js +0 -1
  613. package/dist/7091.js.map +0 -1
  614. package/dist/7263.js +0 -1
  615. package/dist/7263.js.map +0 -1
  616. package/dist/7348.js +0 -1
  617. package/dist/7431.js +0 -1
  618. package/dist/7431.js.map +0 -1
  619. package/dist/7543.js +0 -1
  620. package/dist/7607.js +0 -1
  621. package/dist/772.js +0 -1
  622. package/dist/775.js +0 -1
  623. package/dist/775.js.map +0 -1
  624. package/dist/7783.js +0 -1
  625. package/dist/7783.js.map +0 -1
  626. package/dist/7844.js +0 -1
  627. package/dist/7844.js.map +0 -1
  628. package/dist/7965.js +0 -1
  629. package/dist/7965.js.map +0 -1
  630. package/dist/8171.js +0 -1
  631. package/dist/8171.js.map +0 -1
  632. package/dist/8488.js +0 -1
  633. package/dist/8488.js.map +0 -1
  634. package/dist/8660.js +0 -1
  635. package/dist/8660.js.map +0 -1
  636. package/dist/8727.js +0 -1
  637. package/dist/8736.js +0 -1
  638. package/dist/8736.js.map +0 -1
  639. package/dist/8847.js +0 -1
  640. package/dist/9009.js +0 -1
  641. package/dist/9009.js.map +0 -1
  642. package/dist/9015.js +0 -1
  643. package/dist/906.js +0 -1
  644. package/dist/9065.js +0 -1
  645. package/dist/9182.js +0 -1
  646. package/dist/9314.js +0 -1
  647. package/dist/9314.js.map +0 -1
  648. package/dist/9339.js +0 -1
  649. package/dist/9361.js +0 -1
  650. package/dist/9361.js.map +0 -1
  651. package/dist/9453.js +0 -1
  652. package/dist/9535.js +0 -22
  653. package/dist/9535.js.map +0 -1
  654. package/dist/9610.js +0 -1
  655. package/dist/9610.js.map +0 -1
  656. package/dist/9668.js +0 -1
  657. package/dist/9668.js.map +0 -1
  658. package/dist/9727.js +0 -1
  659. package/dist/9727.js.map +0 -1
  660. package/dist/9734.js +0 -1
  661. package/dist/9734.js.map +0 -1
  662. package/dist/9833.js +0 -1
  663. package/dist/9833.js.map +0 -1
  664. package/dist/9848.js +0 -1
  665. package/dist/9848.js.map +0 -1
  666. package/dist/9876.js +0 -1
  667. package/dist/9876.js.map +0 -1
  668. package/dist/9920.js +0 -1
  669. package/dist/9938.js +0 -1
  670. package/dist/main.js +0 -5
  671. package/dist/main.js.map +0 -1
package/dist/3012.js ADDED
@@ -0,0 +1,43 @@
1
+ (globalThis.webpackChunk_kenyaemr_esm_ward_app=globalThis.webpackChunk_kenyaemr_esm_ward_app||[]).push([["3012"],{85602(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},44397(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var a=o?r.utc():r();Object.keys(t).forEach(function(e){var r;i["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,p=i.second||0,f=i.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,p,f)):new Date(l,u,s,c,d,p,f)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},57657(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=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 l.call(this)};var u=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n;if(0===a)return this.utc(o);var s=this.clone();if(o)return s.$offset=a,s.$u=!1,s;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l,s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.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 d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var n=this.local(),o=i(e).local();return p.call(n,o,t,r)}}}()},89710(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,i,a,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,i)):void 0!==i&&(l[r]=i));return l}},35570(e,t,r){!function(t){"use strict";var n=r(19109);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var i=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=i.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},51812(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});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,r,n=e.r,o=e.g,i=e.b,a=Math.max(n/=255,o/=255,i/=255),s=Math.min(n,o,i),l=(a+s)/2;if(a===s)t=r=0;else{var u=a-s;switch(r=l>.5?u/(2-a-s):u/(a+s),a){case n:t=(o-i)/u+6*(o<i);break;case o:t=(i-n)/u+2;break;case i:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;r=t(u,l,i+1/3),n=t(u,l,i),o=t(u,l,i-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},19109(e,t,r){"use strict";var n=r(89710),o=r(51812),i=r(32742),a=r(83153),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function p(e){return e%2==0?"#ddd":"#222"}function f(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,r,n,o){var i=y(n),a=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=f(o[1]),fill:s=p(o[1])},e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+n,r],scale:[1,1]})}function b(e,t,r,n,o){var i=f(o),a=p(o),s=y(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},h.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=f(o),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=f(i=c(this.hash,t)),e=p(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=f(i=c(this.hash,r)),t=p(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,n={fill:p(o),opacity:r},this.svg.group(n).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(n).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:p(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,r)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=f(n=c(this.hash,39-t)),e=p(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":r}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=f(o=c(this.hash,e)),n={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,r),t=f(n=c(this.hash,39-e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,r),e+=1},h.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,r,n,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,r=f(i=c(this.hash,t+1)),e=p(i),n=i+5,this.svg.rect(0,a,"100%",n,{opacity:r,fill:e}),a+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=f(i=c(this.hash,t+1)),e=p(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=f(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:p(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},32742(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,p=t,f=r,h=n,m=o;for(u=0;u<80;u++){u<20?(s=h^p&(f^h),l=0x5a827999):u<40?(s=p^f^h,l=0x6ed9eba1):u<60?(s=p&f|h&(p|f),l=0x8f1bbcdc):(s=p^f^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=f,f=p<<30|p>>>2,p=d,d=y}for(u=0,e=e+d|0,t=t+p|0,r=r+f|0,n=n+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},83153(e,t,r){"use strict";var n=r(89710),o=r(57338);function i(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,r,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},57338(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};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("")}},82034(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:p=!0}=t,f=[],h="",m=0;!function e(c){if(Array.isArray(c)){for(let t of c)e(t);return}let d="object"==typeof c?c:function(e,t={}){let{encodePath:i=r}=t,l=[...e],u=0;return new a(function t(r){let a=[],c="";function d(){c&&(a.push({type:"text",value:i(c)}),c="")}for(;u<l.length;){let i=l[u++];if(i===r)return d(),a;if("\\"===i){if(u===l.length)throw new s(`Unexpected end after \\ at index ${u}`,e);c+=l[u++];continue}if(":"===i||"*"===i){let t=":"===i?"param":"wildcard",r="";if(n.test(l[u]))do r+=l[u++];while(o.test(l[u]));else if('"'===l[u]){let t=u;for(;u<l.length;){if('"'===l[++u]){u++,t=0;break}"\\"===l[u]&&u++,r+=l[u]}if(t)throw new s(`Unterminated quote at index ${t}`,e)}if(!r)throw new s(`Missing parameter name at index ${u}`,e);d(),a.push({type:t,name:r});continue}if("{"===i){d(),a.push({type:"group",tokens:t("}")});continue}if("}"===i||"("===i||")"===i||"["===i||"]"===i||"+"===i||"?"===i||"!"===i)throw new s(`Unexpected ${i} at index ${u-1}`,e);c+=i}if(r)throw new s(`Unexpected end at index ${u}, expected ${r}`,e);return d(),a}(""),e)}(c,t);!function e(t,r,n,o){for(;r<t.length;){let i=t[r++];if("group"===i.type){let a=n.length;e(i.tokens,0,n,n=>e(t,r,n,o)),n.length=a;continue}n.push(i)}o(n)}(d.tokens,0,[],e=>{if(m>=256)throw new s("Too many path combinations",d.originalPath);m>0&&(h+="|"),h+=function(e,t,r,n){let o="",a="",u="",c=0,d=0,p=0;for(;p<e.length;){let f=e[p++];if("text"===f.type){o+=i(f.value),a+=f.value,2===c&&(u+=f.value),f.value.includes(t)&&(d=0);continue}if("param"===f.type||"wildcard"===f.type){if(c&&!a)throw new s(`Missing text before "${f.name}" ${f.type}`,n);"param"===f.type?(o+=2&d?`(${l(t,a)}+)`:!function(r,n){for(;r<e.length;){let o=e[r++];if(o.type===n)return!0;if("text"===o.type&&o.value.includes(t))break}return!1}(p,"wildcard")?1&d?`(${l(t,a)}+|${i(a)})`:`(${l(t,"")}+)`:`(${l(t,function(t){let r="";for(;t<e.length;){let n=e[t++];if("text"!==n.type)break;r+=n.value}return r}(p))}+)`,d|=c=1):(o+=2&d?`(${l(a,"")}+)`:u?`(${l(u,"")}+|${l(t,"")}+)`:"([^]+)",u="",d|=c=2),r.push(f),a="";continue}throw TypeError(`Unknown token type: ${f.type}`)}return o}(e,u,f,d.originalPath),m++})}(e);let y=`^(?:${h})`;return p&&(y+="(?:"+i(u)+"$)?"),{regexp:new RegExp(y+=c?"$":"(?="+i(u)+"|$)",d?"":"i"),keys:f}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u;function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class a{constructor(e,t){this.tokens=e,this.originalPath=t}}class s extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}function l(e,t){return t.length>e.length?l(t,e):(e===t&&(t=""),t.length>1)?`(?:(?!${i(e)}|${i(t)})[^])`:e.length>1?`(?:(?!${i(e)})[^${i(t)}])`:`[^${i(e+t)}]`}},25873(e,t,r){"use strict";var n=r(43144);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},38513(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(21016);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},8791(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(18860);t.BehaviorSubject=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},1359(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(77759).Subscriber)},4942(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(34914),i=r(47986),a=r(11673);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C",t.Notification=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},95092(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(21226),o=r(67595),i=r(46713),a=r(27928),s=r(5319);function l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=l(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=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:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},74143(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5319),o=r(59468);t.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},89152(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(77759).Subscriber)},20328(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(63792),s=r(21016),l=r(24654),u=r(18860),c=r(43716);t.ReplaySubject=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},94688(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},71077(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(95092),a=r(77759),s=r(21016),l=r(18860),u=r(43716),c=r(58636),d=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var p=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new f(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);t.Subject=p;var f=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(p);t.AnonymousSubject=f},43716(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(21016).Subscription)},77759(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(84864),a=r(74143),s=r(21016),l=r(58636),u=r(5319),c=r(59468),d=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!r){i.destination=a.empty;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,r,n,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var p=function(e){function t(t,r,n,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=n,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=p},21016(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(80743),o=r(6727),i=r(84864),a=r(11806);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,p=c.length;++d<p;){var f=c[d];if(o.isObject(f))try{f.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},5319(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},75901(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(95092),s=r(41727);t.SimpleInnerSubscriber=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var r;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{r=s.subscribeTo(e)(t)}catch(e){t.error(e)}return r}}},27432(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var a=r(71077),s=r(95092),l=r(77759),u=r(21016),c=r(85203),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new f(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(l.Subscriber)},17563(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(95092),a=r(73766),s=r(19673);t.SubscribeOnObservable=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=r,o.scheduler=n,(!s.isNumeric(r)||r<0)&&(o.delayTime=0),n&&"function"==typeof n.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=a.asap),new t(e,r,n)},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r))},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e})},t}(i.Observable)},92413(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(23935),a=r(80743),s=r(89152),l=r(87778),u=r(67446),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return i.isScheduler(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),u.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(l.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=p},99623(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(47986),o=r(60208);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(n.of.apply(void 0,e))}},26691(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(85295),i=r(34914);t.defer=function(e){return new n.Observable(function(t){var r;try{r=e()}catch(e){t.error(e);return}return(r?o.from(r):i.empty()).subscribe(t)})}},34914(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092);t.EMPTY=new n.Observable(function(e){return e.complete()}),t.empty=function(e){var r;return e?(r=e,new n.Observable(function(e){return r.schedule(function(){return e.complete()})})):t.EMPTY}},85295(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(41727),i=r(67670);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof n.Observable?e:new n.Observable(o.subscribeTo(e))}},67446(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(422),i=r(85791);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new n.Observable(o.subscribeToArray(e))}},33395(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(23935),i=r(80980),a=r(67446);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1/0,s=null,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof l&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},47986(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23935),o=r(67446),i=r(85791);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return n.isScheduler(r)?(e.pop(),i.scheduleArray(e,r)):o.fromArray(e)}},57894(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(80743),a=r(67446),s=r(89152),l=r(87778);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=l.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},11673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new n.Observable(t?function(r){return t.schedule(o,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}},27954(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(86735),i=r(19673),a=r(23935);function s(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}t.timer=function(e,t,r){void 0===e&&(e=0);var l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:l,subscriber:t})})}},85356(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(67446),a=r(80743),s=r(77759),l=r(78258),u=r(75901);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),i.fromArray(e,void 0).lift(new c(r))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new f(e)):"function"==typeof e[l.iterator]?t.push(new p(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var p=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),f=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},18780(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},13441(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86735),o=r(18780),i=r(27954);t.auditTime=function(e,t){return void 0===t&&(t=n.async),o.audit(function(){return i.timer(e,t)})}},11853(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(n))),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},77650(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},94360(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(86735),a=r(77759),s=r(23935);t.bufferTime=function(e){var t=arguments.length,r=i.async;s.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new l(e,n,o,r))}};var l=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(f,r,{subscriber:a,context:s})),a.add(i.schedule(p,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function p(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,o=e.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(f,r,{subscriber:n,context:i})),this.schedule(e,t))}function f(e){var t=e.subscriber,r=e.context;t.closeContext(r)}},43381(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(21016),a=r(87778),s=r(89152);t.bufferToggle=function(e,t){return function(r){return r.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},51069(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(21016),a=r(75901);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},85916(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.catchError=function(e){return function(t){var r=new a(e),n=t.lift(r);return r.caught=n}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.selector=r,o.caught=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var n=new i.SimpleInnerSubscriber(this);this.add(n);var o=i.innerSubscribe(r,n);o!==n&&this.add(o)}},t}(i.SimpleOuterSubscriber)},90239(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(92413);t.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},79397(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(80743),o=r(92413),i=r(85295);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},66255(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(99623);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},60208(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(80980);t.concatAll=function(){return n.mergeAll(1)}},92209(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(60781);t.concatMap=function(e,t){return n.mergeMap(e,t,1)}},83232(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(92209);t.concatMapTo=function(e,t){return n.concatMap(function(){return e},t)}},85476(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},59768(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},92661(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(86735);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},90952(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},17436(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(86735),a=r(66740),s=r(77759),l=r(4942);t.delay=function(e,t){void 0===t&&(t=i.async);var r=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new u(r,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},41136(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(95092),s=r(89152),l=r(87778);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=l.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new p(e,this.source))},t}(a.Observable),p=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},56051(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},85343(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.distinct=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=r,o.values=new Set,n&&o.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){r.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},88179(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.distinctUntilChanged=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=n,o.hasKey=!1,"function"==typeof r&&(o.compare=r),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},43670(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(88179);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}},57366(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2519),o=r(64629),i=r(8347),a=r(90952),s=r(85624);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(l){return l.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},61650(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(99623),o=r(47986);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},92472(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.every=function(e,t){return function(r){return r.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.source=o,i.index=0,i.thisArg=n||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},65893(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},29219(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(89233),a=r(85295),s=r(75901);t.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},76527(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,n<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,o=e.index;t.subscribeToProjection(r,n,o)},t.prototype._next=function(e){var r=this.destination;if(r.closed)return void this._complete();var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var o=(0,this.project)(e,n);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:n})):this.subscribeToProjection(o,e,n)}catch(e){r.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},64629(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.filter=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},4349(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(21016);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.callback))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},32376(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(r){return r.lift(new a(e,r,!1,t))}};var a=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},8674(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32376);t.findIndex=function(e,t){return function(r){return r.lift(new n.FindValueOperator(e,r,!0,t))}}},77089(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62637),o=r(64629),i=r(85624),a=r(90952),s=r(8347),l=r(78522);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},36217(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(21016),s=r(95092),l=r(71077);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new u(e,t,r,n))}};var u=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,n.set(t,o);var i=new p(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new p(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,r,n){var o=e.call(this,r)||this;return o.key=t,o.group=r,o.parent=n,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),p=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new f(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=p;var f=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},76024(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},87362(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},6047(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(62637),o=r(64629),i=r(96696),a=r(8347),s=r(90952),l=r(78522);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},89233(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.map=function(e,t){return function(r){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},27296(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},75434(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(4942);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},57001(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71929);t.max=function(e){return n.reduce("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},14779(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(33395);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},80980(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(60781),o=r(78522);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(o.identity,e)}},60781(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(89233),a=r(85295),s=r(75901);function l(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(l(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new u(e,r))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},62988(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(60781);t.mergeMapTo=function(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},86430(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i.acc=n,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t)}catch(e){return r.error(e)}this.active++,this._innerSub(n)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=i.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},21547(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71929);t.min=function(e){return n.reduce("function"==typeof e?function(t,r){return 0>e(t,r)?t:r}:function(e,t){return e<t?e:t})}},49529(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(27432);t.multicast=function(e,t){return function(r){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return r.lift(new o(i,t));var i,a=Object.create(r,n.connectableObservableDescriptor);return a.source=r,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),o=r(n).subscribe(e);return o.add(t.subscribe(n)),o},e}();t.MulticastOperator=o},24654(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(4942);t.observeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},45276(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(85295),a=r(80743),s=r(75901);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},98155(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},27337(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(64103),o=r(64629);t.partition=function(e,t){return function(r){return[o.filter(e,t)(r),o.filter(n.not(e,t))(r)]}}},86050(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(89233);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw Error("list of properties cannot be empty.");return function(t){var o,i;return n.map((o=e,i=r,function(e){for(var t=e,r=0;r<i;r++){var n=null!=t?t[o[r]]:void 0;if(void 0===n)return;t=n}return t}))(t)}}},96904(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71077),o=r(49529);t.publish=function(e){return e?o.multicast(function(){return new n.Subject},e):o.multicast(new n.Subject)}},82334(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8791),o=r(49529);t.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},20232(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(38513),o=r(49529);t.publishLast=function(){return function(e){return o.multicast(new n.AsyncSubject)(e)}}},24355(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20328),o=r(49529);t.publishReplay=function(e,t,r,i){r&&"function"!=typeof r&&(i=r);var a="function"==typeof r?r:void 0,s=new n.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},89646(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(80743),o=r(57894);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},71929(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(85002),o=r(96696),i=r(90952),a=r(27928);t.reduce=function(e,t){return arguments.length>=2?function(r){return a.pipe(n.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(r)}:function(t){return a.pipe(n.scan(function(t,r,n){return e(t,r,n+1)}),o.takeLast(1))(t)}}},85203(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(i.Subscriber)},30068(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(34914);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.count,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},58440(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(75901);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,t))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},39933(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},53325(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(75901);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},27677(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=t.subscribe(r);return n.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r))),n},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},88360(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(86735);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(u,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},85002(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.scan=function(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=n,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},54332(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.sequenceEqual=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.compareTo=r,o.comparator=n,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(r.subscribe(new l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},49184(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49529),o=r(85203),i=r(71077);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(n.multicast(a)(e))}}},91451(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20328);t.shareReplay=function(e,t,r){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){var t,r,i,a,s,l,u,c,d,p,f,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,p=0,f=!1,h=!1,function(e){var t;p++,!r||f?(f=!1,t=(r=new n.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){f=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){p--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===p&&(i.unsubscribe(),i=void 0,r=void 0)})}))}}},76003(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(62637);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},67124(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},31444(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(2519);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new l(e,this._skipCount))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},51026(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var o=new i.SimpleInnerSubscriber(n);n.add(o),n.innerSubscription=o;var a=i.innerSubscribe(r,o);return a!==o&&(n.add(a),n.innerSubscription=a),n}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},79159(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},89155(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(99623),o=r(23935);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},30162(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17563);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new n.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},21324(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20917),o=r(78522);t.switchAll=function(){return n.switchMap(o.identity)}},20917(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(89233),a=r(85295),s=r(75901);t.switchMap=function e(t,r){return"function"==typeof r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},35428(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20917);t.switchMapTo=function(e,t){return t?n.switchMap(function(){return e},t):n.switchMap(function(){return e})}},85624(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(2519),s=r(34914);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},96696(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(2519),s=r(34914);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},41534(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},5179(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.inclusive=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(e){r.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var r=this.destination;t?r.next(e):(this.inclusive&&r.next(e),r.complete())},t}(i.Subscriber)},68022(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(53912),s=r(84864);t.tap=function(e,t,r){return function(n){return n.lift(new l(e,t,r))}};var l=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},15019(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(75901);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!r.leading,!!r.trailing))}};var a=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=r,i._leading=n,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},7406(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(86735),s=r(15019);t.throttleTime=function(e,t,r){return void 0===t&&(t=a.async),void 0===r&&(r=s.defaultThrottleConfig),function(n){return n.lift(new l(e,t,r.leading,r.trailing))}};var l=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},8347(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(62637),a=r(77759);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},61115(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86735),o=r(85002),i=r(26691),a=r(89233);t.timeInterval=function(e){return void 0===e&&(e=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,r=e.last;return new s(e.value,t-r)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},82784(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86735),o=r(31027),i=r(35816),a=r(11673);t.timeout=function(e,t){return void 0===t&&(t=n.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},35816(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(86735),a=r(66740),s=r(75901);t.timeoutWith=function(e,t,r){return void 0===r&&(r=i.async),function(n){var o=a.isDate(e),i=o?e-r.now():Math.abs(e);return n.lift(new l(i,o,t,r))}};var l=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},20367(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86735),o=r(89233);t.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},89133(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71929);function o(e,t,r){return 0===r?[t]:(e.push(t),e)}t.toArray=function(){return n.reduce(o,[])}},22363(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(75901);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var r=new l(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},32216(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(77759),a=r(71077);t.windowCount=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-n+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),r.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},93886(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(86735),s=r(77759),l=r(19673),u=r(23935);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(n=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),p=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==n&&n>=0?(a.add(i.schedule(m,r,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,n,{windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:i}))):a.add(i.schedule(f,r,{subscriber:a,window:s,windowTimeSpan:r})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var o=t[n];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function f(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function h(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,o=e.windowCreationInterval,i=r.openWindow(),a={action:this,subscription:null};a.subscription=n.schedule(m,t,{subscriber:r,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}},83903(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(21016),s=r(89152),l=r(87778);t.windowToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var p=l.subscribeToResult(this,s,d);p.closed?this.closeWindow(this.contexts.length-1):(p.context=d,c.add(p)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},27539(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(71077),a=r(89152),s=r(87778);t.windowWhen=function(e){return function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},76788(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(89152),a=r(87778);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;return"function"==typeof e[e.length-1]&&(r=e.pop()),t.lift(new s(e,r))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.observables,this.project))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=r[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},64868(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(85356);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},85517(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(85356);t.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},85791(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(21016);t.scheduleArray=function(e,t){return new n.Observable(function(r){var n=new o.Subscription,i=0;return n.add(t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||n.add(this.schedule()))})),n})}},34178(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(21016),i=r(78258);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new n.Observable(function(r){var n,a=new o.Subscription;return a.add(function(){n&&"function"==typeof n.return&&n.return()}),a.add(t.schedule(function(){n=e[i.iterator](),a.add(t.schedule(function(){if(!r.closed){try{var e,t,o=n.next();e=o.value,t=o.done}catch(e){r.error(e);return}t?r.complete():(r.next(e),this.schedule())}}))})),a})}},12873(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(21016),i=r(46713);t.scheduleObservable=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){var o=e[i.observable]();n.add(o.subscribe({next:function(e){n.add(t.schedule(function(){return r.next(e)}))},error:function(e){n.add(t.schedule(function(){return r.error(e)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}},91039(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95092),o=r(21016);t.schedulePromise=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete()}))}))},function(e){n.add(t.schedule(function(){return r.error(e)}))})})),n})}},67670(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12873),o=r(91039),i=r(85791),a=r(34178),s=r(67606),l=r(94215),u=r(90624),c=r(74442);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},55169(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,r){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(21016).Subscription)},82900(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(42839);t.AsapAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0)?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(i.Immediate.clearImmediate(r),t.scheduled=void 0)},t}(r(70469).AsyncAction)},3069(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(r(25646).AsyncScheduler)},70469(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(r(55169).Action)},25646(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(94688);t.AsyncScheduler=function(e){function t(r,n){void 0===n&&(n=i.Scheduler.now);var o=e.call(this,r,function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(r,n,o){return(void 0===n&&(n=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t,r=this.actions;if(this.active)return void r.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this.active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},58538(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.schedule=function(t,r){return(void 0===r&&(r=0),r>0)?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(70469).AsyncAction)},78831(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(r(25646).AsyncScheduler)},73766(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(82900);t.asapScheduler=new(r(3069)).AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},86735(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70469);t.asyncScheduler=new(r(25646)).AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},63792(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(58538);t.queueScheduler=new(r(78831)).QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},78258(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=r,t.iterator=r(),t.$$iterator=t.iterator},46713(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},58636(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},2519(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},62637(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},42839(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,n=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},18860(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},31027(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},11806(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},21226(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(77759);t.canReportError=function(e){for(;e;){var t=e,r=t.closed,o=t.destination,i=t.isStopped;if(r||i)return!1;e=o&&o instanceof n.Subscriber?o:null}return!0}},59468(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},78522(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},80743(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},90624(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},66740(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},84864(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},67606(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46713);t.isInteropObservable=function(e){return e&&"function"==typeof e[n.observable]}},74442(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(78258);t.isIterable=function(e){return e&&"function"==typeof e[n.iterator]}},19673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(80743);t.isNumeric=function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0}},6727(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},94215(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},23935(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},53912(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},64103(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}},27928(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(78522);function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},41727(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(422),o=r(63266),i=r(47429),a=r(13394),s=r(90624),l=r(94215),u=r(6727),c=r(78258),d=r(46713);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return n.subscribeToArray(e);if(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},422(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}}},47429(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(78258);t.subscribeToIterable=function(e){return function(t){for(var r=e[n.iterator]();;){var o=void 0;try{o=r.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof r.return&&t.add(function(){r.return&&r.return()}),t}}},13394(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46713);t.subscribeToObservable=function(e){return function(t){var r=e[n.observable]();if("function"==typeof r.subscribe)return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},63266(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(59468);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,n.hostReportError),t}}},87778(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1359),o=r(41727),i=r(95092);t.subscribeToResult=function(e,t,r,a,s){if(void 0===s&&(s=new n.InnerSubscriber(e,r,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},67595(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(77759),o=r(58636),i=r(74143);t.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(i.empty)}},99549(e,t,r){"use strict";r(18780).audit,r(13441).auditTime,r(11853).buffer,r(77650).bufferCount,r(94360).bufferTime,r(43381).bufferToggle,r(51069).bufferWhen,r(85916).catchError,r(90239).combineAll,r(79397).combineLatest,r(66255).concat,r(60208).concatAll,r(92209).concatMap,r(83232).concatMapTo,r(85476).count,r(59768).debounce,r(92661).debounceTime,r(90952).defaultIfEmpty,r(17436).delay,r(41136).delayWhen,r(56051).dematerialize,r(85343).distinct,r(88179).distinctUntilChanged,r(43670).distinctUntilKeyChanged,r(57366).elementAt,r(61650).endWith,r(92472).every,r(65893).exhaust,r(29219).exhaustMap,r(76527).expand,r(64629).filter,r(4349).finalize,r(32376).find,r(8674).findIndex,r(77089).first,r(36217).groupBy,r(76024).ignoreElements,r(87362).isEmpty,r(6047).last,t.map=r(89233).map,r(27296).mapTo,r(75434).materialize,r(57001).max,r(14779).merge,r(80980).mergeAll;var n=r(60781);n.mergeMap,n.flatMap,r(62988).mergeMapTo,r(86430).mergeScan,r(21547).min,r(49529).multicast,r(24654).observeOn,r(45276).onErrorResumeNext,r(98155).pairwise,r(27337).partition,r(86050).pluck,r(96904).publish,r(82334).publishBehavior,r(20232).publishLast,r(24355).publishReplay,r(89646).race,r(71929).reduce,r(30068).repeat,r(58440).repeatWhen,r(39933).retry,r(53325).retryWhen,r(85203).refCount,r(27677).sample,r(88360).sampleTime,r(85002).scan,r(54332).sequenceEqual,r(49184).share,r(91451).shareReplay,r(76003).single,r(67124).skip,r(31444).skipLast,r(51026).skipUntil,r(79159).skipWhile,r(89155).startWith,r(30162).subscribeOn,r(21324).switchAll,r(20917).switchMap,r(35428).switchMapTo,t.take=r(85624).take,r(96696).takeLast,r(41534).takeUntil,r(5179).takeWhile,r(68022).tap,r(15019).throttle,r(7406).throttleTime,r(8347).throwIfEmpty,r(61115).timeInterval,r(82784).timeout,r(35816).timeoutWith,r(20367).timestamp,r(89133).toArray,r(22363).window,r(32216).windowCount,r(93886).windowTime,r(83903).windowToggle,r(27539).windowWhen,r(76788).withLatestFrom,r(64868).zip,r(85517).zipAll},51565(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=i(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let i=r(13990),{safeRe:a,t:s}=r(72841),l=r(54004),u=r(41361),c=r(24517),d=r(37476)},37476(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!v(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&w(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(b,"");let t=((this.options.includePrerelease&&y)|(this.options.loose&&g))+":"+e,r=i.get(t);if(r)return r;let n=this.options.loose,o=n?c[p.HYPHENRANGELOOSE]:c[p.HYPHENRANGE];l("hyphen replace",e=e.replace(o,A(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[p.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[p.TILDETRIM],h)),l("caret trim",e=e.replace(c[p.CARETTRIM],m));let a=e.split(" ").map(e=>E(e,this.options)).join(" ").split(/\s+/).map(e=>R(e,this.options));n&&(a=a.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[p.COMPARATORLOOSE])))),l("range list",a);let u=new Map;for(let e of a.map(e=>new s(e,this.options))){if(v(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let d=[...u.values()];return i.set(t,d),d}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>x(r,t)&&e.set.some(e=>x(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(N(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let i=new(r(58953)),a=r(13990),s=r(51565),l=r(41361),u=r(24517),{safeRe:c,src:d,t:p,comparatorTrimReplace:f,tildeTrimReplace:h,caretTrimReplace:m}=r(72841),{FLAG_INCLUDE_PRERELEASE:y,FLAG_LOOSE:g}=r(79543),b=RegExp(d[p.BUILD],"g"),v=e=>"<0.0.0-0"===e.value,w=e=>""===e.value,x=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},E=(e,t)=>(l("comp",e=e.replace(c[p.BUILD],""),t),l("caret",e=P(e,t)),l("tildes",e=O(e,t)),l("xrange",e=C(e,t)),l("stars",e=T(e,t)),e),S=e=>!e||"x"===e.toLowerCase()||"*"===e,O=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{let r=t.loose?c[p.TILDELOOSE]:c[p.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let s;return l("tilde",e,t,r,o,i,a),S(r)?s="":S(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:S(i)?s=`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:a?(l("replaceTilde pr",a),s=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`):s=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,l("tilde return",s),s})},P=(e,t)=>e.trim().split(/\s+/).map(e=>k(e,t)).join(" "),k=(e,t)=>{l("caret",e,t);let r=t.loose?c[p.CARETLOOSE]:c[p.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let s;return l("caret",e,t,r,o,i,a),S(r)?s="":S(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:S(i)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(l("replaceCaret pr",a),s="0"===r?"0"===o?`>=${r}.${o}.${i}-${a} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${a} <${+r+1}.0.0-0`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${i} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),l("caret return",s),s})},C=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>j(e,t)).join(" ")),j=(e,t)=>{e=e.trim();let r=t.loose?c[p.XRANGELOOSE]:c[p.XRANGE];return e.replace(r,(r,n,o,i,a,s)=>{let u,c,d;if(l("xRange",e,r,n,o,i,a,s),u=o,c=i,d=a,S(u)&&!S(c)||S(c)&&d&&!S(d))return e;let p=S(o),f=p||S(i),h=f||S(a);return"="===n&&h&&(n=""),s=t.includePrerelease?"-0":"",p?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(f&&(i=0),a=0,">"===n?(n=">=",f?(o=+o+1,i=0):i=+i+1,a=0):"<="===n&&(n="<",f?o=+o+1:i=+i+1),"<"===n&&(s="-0"),r=`${n+o}.${i}.${a}${s}`):f?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:h&&(r=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),l("xRange return",r),r})},T=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[p.STAR],"")),R=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),A=e=>(t,r,n,o,i,a,s,l,u,c,d,p)=>(r=S(n)?"":S(o)?`>=${n}.0.0${e?"-0":""}`:S(i)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,l=S(u)?"":S(c)?`<${+u+1}.0.0-0`:S(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),N=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},24517(e,t,r){"use strict";let n=r(41361),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(79543),{safeRe:a,t:s}=r(72841),l=r(13990),{compareIdentifiers:u}=r(93806);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return u(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?a[s.PRERELEASELOOSE]:a[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),((e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let t=0;t<r.length;t++)if(0!==u(e[t],r[t]))return!1;return!0})(this.prerelease,t)?isNaN(this.prerelease[t.split(".").length])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},92281(e,t,r){"use strict";let n=r(93955);e.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},54004(e,t,r){"use strict";let n=r(28848),o=r(28220),i=r(89761),a=r(72386),s=r(51262),l=r(89639);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return i(e,r,u);case">=":return a(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},56783(e,t,r){"use strict";let n=r(24517),o=r(93955),{safeRe:i,t:a}=r(72841);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n,o=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL];for(;(n=o.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),o.lastIndex=n.index+n[1].length+n[2].length;o.lastIndex=-1}else r=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);if(null===r)return null;let s=r[2],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${s}.${l}.${u}${c}${d}`,t)}},6106(e,t,r){"use strict";let n=r(24517);e.exports=(e,t,r)=>{let o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},52132(e,t,r){"use strict";let n=r(87851);e.exports=(e,t)=>n(e,t,!0)},87851(e,t,r){"use strict";let n=r(24517);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},73269(e,t,r){"use strict";let n=r(93955);e.exports=(e,t)=>{let r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;let a=i>0,s=a?r:o,l=a?o:r,u=!!s.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}let c=u?"pre":"";return r.major!==o.major?c+"major":r.minor!==o.minor?c+"minor":r.patch!==o.patch?c+"patch":"prerelease"}},28848(e,t,r){"use strict";let n=r(87851);e.exports=(e,t,r)=>0===n(e,t,r)},89761(e,t,r){"use strict";let n=r(87851);e.exports=(e,t,r)=>n(e,t,r)>0},72386(e,t,r){"use strict";let n=r(87851);e.exports=(e,t,r)=>n(e,t,r)>=0},38868(e,t,r){"use strict";let n=r(24517);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},51262(e,t,r){"use strict";let n=r(87851);e.exports=(e,t,r)=>0>n(e,t,r)},89639(e,t,r){"use strict";let n=r(87851);e.exports=(e,t,r)=>0>=n(e,t,r)},26381(e,t,r){"use strict";let n=r(24517);e.exports=(e,t)=>new n(e,t).major},31353(e,t,r){"use strict";let n=r(24517);e.exports=(e,t)=>new n(e,t).minor},28220(e,t,r){"use strict";let n=r(87851);e.exports=(e,t,r)=>0!==n(e,t,r)},93955(e,t,r){"use strict";let n=r(24517);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},96082(e,t,r){"use strict";let n=r(24517);e.exports=(e,t)=>new n(e,t).patch},69428(e,t,r){"use strict";let n=r(93955);e.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},87555(e,t,r){"use strict";let n=r(87851);e.exports=(e,t,r)=>n(t,e,r)},93810(e,t,r){"use strict";let n=r(6106);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},27229(e,t,r){"use strict";let n=r(37476);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},34042(e,t,r){"use strict";let n=r(6106);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},78668(e,t,r){"use strict";let n=r(93955),o=r(79543),i=r(24517),a=e=>e.startsWith("pre");e.exports=(e,t,r)=>{let s,l;if(!o.RELEASE_TYPES.includes(t))return null;let u=(s=e,l=r,n(s instanceof i?s.version:s,l));return u&&((e,t)=>{if(a(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0}return e.format()})(u,t)}},28474(e,t,r){"use strict";let n=r(93955);e.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}},2722(e,t,r){"use strict";let n=r(72841),o=r(79543),i=r(24517),a=r(93806),s=r(93955),l=r(28474),u=r(92281),c=r(38868),d=r(73269),p=r(26381),f=r(31353),h=r(96082),m=r(69428),y=r(87851),g=r(87555),b=r(52132),v=r(6106),w=r(34042),x=r(93810),E=r(89761),S=r(51262),O=r(28848),D=r(28220),P=r(72386),k=r(89639),C=r(54004),j=r(56783),T=r(78668),R=r(51565),A=r(37476),N=r(27229),M=r(26364),I=r(55039),$=r(55357),L=r(71280),F=r(37403),B=r(58854),V=r(27226),U=r(37183),W=r(18623);e.exports={parse:s,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:b,compareBuild:v,sort:w,rsort:x,gt:E,lt:S,eq:O,neq:D,gte:P,lte:k,cmp:C,coerce:j,truncate:T,Comparator:R,Range:A,satisfies:N,toComparators:M,maxSatisfying:I,minSatisfying:$,minVersion:L,validRange:F,outside:B,gtr:V,ltr:U,intersects:W,simplifyRange:r(76486),subset:r(40583),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},79543(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},41361(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},93806(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},58953(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},13990(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},72841(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=r(79543),a=r(41361),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[f,o]],m=(e,t,r)=>{let n=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=p++;a(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},27226(e,t,r){"use strict";let n=r(58854);e.exports=(e,t,r)=>n(e,t,">",r)},18623(e,t,r){"use strict";let n=r(37476);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},37183(e,t,r){"use strict";let n=r(58854);e.exports=(e,t,r)=>n(e,t,"<",r)},55039(e,t,r){"use strict";let n=r(24517),o=r(37476);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||-1===a.compare(e))&&(a=new n(i=e,r))}),i}},55357(e,t,r){"use strict";let n=r(24517),o=r(37476);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||1===a.compare(e))&&(a=new n(i=e,r))}),i}},71280(e,t,r){"use strict";let n=r(24517),o=r(37476),i=r(89761);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let o=e.set[t],a=null;o.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||i(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||i(r,a))&&(r=a)}return r&&e.test(r)?r:null}},58854(e,t,r){"use strict";let n=r(24517),o=r(51565),{ANY:i}=o,a=r(37476),s=r(27229),l=r(89761),u=r(51262),c=r(89639),d=r(72386);e.exports=(e,t,r,p)=>{let f,h,m,y,g;switch(e=new n(e,p),t=new a(t,p),r){case">":f=l,h=c,m=u,y=">",g=">=";break;case"<":f=u,h=d,m=l,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))return!1;for(let r=0;r<t.set.length;++r){let n=t.set[r],a=null,s=null;if(n.forEach(e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,f(e.semver,a.semver,p)?a=e:m(e.semver,s.semver,p)&&(s=e)}),a.operator===y||a.operator===g||(!s.operator||s.operator===y)&&h(e,s.semver)||s.operator===g&&m(e,s.semver))return!1}return!0}},76486(e,t,r){"use strict";let n=r(27229),o=r(87851);e.exports=(e,t,r)=>{let i=[],a=null,s=null,l=e.sort((e,t)=>o(e,t,r));for(let e of l)n(e,t,r)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let u=[];for(let[e,t]of i)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},40583(e,t,r){"use strict";let n=r(37476),o=r(51565),{ANY:i}=o,a=r(27229),s=r(87851),l=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],c=(e,t,r)=>{let n,o,c,f,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===i)if(1===t.length&&t[0].semver===i)return!0;else e=r.includePrerelease?l:u;if(1===t.length&&t[0].semver===i)if(r.includePrerelease)return!0;else t=u;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=d(n,t,r):"<"===t.operator||"<="===t.operator?o=p(o,t,r):g.add(t.semver);if(g.size>1)return null;if(n&&o&&((c=s(n.semver,o.semver,r))>0||0===c&&(">="!==n.operator||"<="!==o.operator)))return null;for(let e of g){if(n&&!a(e,String(n),r)||o&&!a(e,String(o),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let b=!!o&&!r.includePrerelease&&!!o.semver.prerelease.length&&o.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(b&&1===b.prerelease.length&&"<"===o.operator&&0===b.prerelease[0]&&(b=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,n){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if((f=d(n,e,r))===e&&f!==n)return!1}else if(">="===n.operator&&!e.test(n.semver))return!1}if(o){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if((h=p(o,e,r))===e&&h!==o)return!1}else if("<="===o.operator&&!e.test(o.semver))return!1}if(!e.operator&&(o||n)&&0!==c)return!1}return(!n||!m||!!o||0===c)&&(!o||!y||!!n||0===c)&&!v&&!b&&!0},d=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(let n of e.set){for(let e of t.set){let t=c(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},26364(e,t,r){"use strict";let n=r(37476);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},37403(e,t,r){"use strict";let n=r(37476);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},96488(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},55152(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},30414(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(62362);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},24586(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(62362);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},5405(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},62362(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(17545);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},17545(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>n})},77445(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).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)?n(e,t):void 0}}r.d(t,{A:()=>o})},71295(e,t,r){"use strict";let n,o,i,a,s,l,u,c,d,p,f,h;r.r(t),r.d(t,{GenderUnknownIcon:()=>ys,evaluateAsNumber:()=>dH,getImportMapOverrideMap:()=>ab,StockManagementPictogram:()=>PP,ChemistryIcon:()=>mQ,BabyIcon:()=>mU,DashboardExtension:()=>gs,openmrsComponentDecorator:()=>f3,tryRegisterExtension:()=>ml,pictogramIds:()=>Pr,ActivityIcon:()=>mI,compile:()=>dY,removeRouteMapOverride:()=>aq,checkStatus:()=>pa,TableBatchActions:()=>mO,getAsyncLifecycle:()=>f5,subscribeOpenmrsEvent:()=>df,dispatchConnectivityChanged:()=>y,PasswordIcon:()=>yT,Assessment2Pictogram:()=>Pa,CloseIcon:()=>m4,setupRouteMapOverrides:()=>aJ,getWorkspaceGroupRegistration:()=>fr,registerWorkspace:()=>p9,useFeatureFlag:()=>hP,reset:()=>pQ,LabOrderIcon:()=>yg,VisitMode:()=>dO,offlineUuidPrefix:()=>cQ,useLocations:()=>hG,getLifecycle:()=>f4,formatDatetime:()=>Ob,getVisitsForPatient:()=>dA,subscribeConnectivity:()=>b,formatPartialDate:()=>Oh,CustomOverflowMenu:()=>mR,LocationIcon:()=>yv,GroupIcon:()=>yu,canBeginEditSynchronizationItemsOfType:()=>cH,VisitStatus:()=>dD,createUseStore:()=>fk,getCurrentImportMap:()=>aj,getSessionLocation:()=>o7,usePatient:()=>h0,useRenderableExtensions:()=>h2,getOpenedWindowIndexByWorkspace:()=>fa,checkStatusFor:()=>ps,clearHistory:()=>oV,clearConfigErrors:()=>r1,formatTime:()=>Og,isDevEnabled:()=>it,setLeftNav:()=>p1,syncOfflinePatientData:()=>dl,closeWorkspaceGroup2:()=>kF,getCurrentRouteMap:()=>aW,ConfigurableLink:()=>f_,sessionStore:()=>oX,subscribeSnackbarShown:()=>N,getDynamicOfflineDataEntriesFor:()=>c6,getLoggedInUser:()=>o6,GenderMaleIcon:()=>yi,getExtensionSlotConfigFromStore:()=>rs,evaluateAsNumberAsync:()=>dz,putDynamicOfflineDataFor:()=>c9,getImportMapDefaultMap:()=>ay,unregisterExtensionRendering:()=>pb,implementerToolsConfigStore:()=>r_,Type:()=>t3,InPatientPictogram:()=>Py,cleanupObsoleteFeatureFlags:()=>pe,showSnackbar:()=>PV,PatientBannerActionsMenu:()=>D5,PatientSearchPictogram:()=>Pw,DocumentAttachmentIcon:()=>m9,Snackbar:()=>PI,CardiologyPictogram:()=>Pl,ImageMedicalIcon:()=>yp,ActionableNotificationComponent:()=>Dx,DiagnosisTags:()=>O8,iconIds:()=>mM,PatientsPictogram:()=>P_,interpolateUrl:()=>oA,setupHistory:()=>oL,subscribeToastShown:()=>A,detachAll:()=>pq,convertToLocaleCalendar:()=>Ov,DocumentIcon:()=>m7,configInternalStore:()=>rt,ActionMenuButton2:()=>k1,setupDynamicOfflineDataHandler:()=>c4,makeUrl:()=>oq,oneOf:()=>r9,selectPreferredName:()=>DG,launchWorkspaceGroup:()=>function e(t,r){let n=fr(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,l=function(){return P7}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?PY(n?.name,()=>{e(t,r)}):kt(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),ka(t,o),i?.(),s&&PJ(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>dr,MobileCheckIcon:()=>yO,createErrorHandler:()=>I,openmrsObservableFetch:()=>oZ,parseDate:()=>Ol,getAttachmentByUuid:()=>aQ,LeftNavMenu:()=>Di,getExtensionRegistration:()=>pK,ShoppingCartAddItemIcon:()=>go,ReferralOrderIcon:()=>y$,ReportIcon:()=>yF,dispatchToastShown:()=>j,getImportMapNextPageMap:()=>ag,registerExtension:()=>pH,setupOfflineSync:()=>cq,DownloadIcon:()=>m8,useConnectivity:()=>hb,provide:()=>rN,getSynchronizationItemsFor:()=>cB,ShoppingCartArrowDownIcon:()=>yz,featureFlagsStore:()=>d9,promptBeforeClosing:()=>P0,removeDynamicOfflineDataFor:()=>de,jsep:()=>dI,GeriatricsPictogram:()=>Ph,SearchIcon:()=>yU,reportError:()=>M,slugify:()=>aP,isOmrsDateToday:()=>Oi,getExtensionStore:()=>pv,BloodBankPictogram:()=>Ps,TriagePictogram:()=>PC,Workspace2:()=>kY,refetchCurrentUser:()=>o3,CheckmarkOutlineIcon:()=>mX,registerExtensionSlot:()=>pX,AllergiesIcon:()=>ge,ArrowDownIcon:()=>mL,useOpenmrsInfinite:()=>hI,getExtensionConfigFromExtensionSlotStore:()=>rd,OpenmrsDatePicker:()=>O7,getExtensionConfigFromStore:()=>rc,getDynamicOfflineDataEntries:()=>c5,getLocaleDisplayName:()=>SN,messageOmrsServiceWorker:()=>su,navigate:()=>oM,launchWorkspace2:()=>kB,getGroupByWindowName:()=>fi,CustomOverflowMenuItem:()=>mA,isUrl:()=>r7,CaretDownIcon:()=>mH,ArrowLeftIcon:()=>mF,FacilityPictogram:()=>Pf,ViewOffIcon:()=>y7,setCurrentOfflineMode:()=>sg,updateInternalExtensionStore:()=>pp,dispatchActionableNotificationShown:()=>k,resetRouteMapOverrides:()=>aY,formatDurationBetween:()=>OP,defaultVisitCustomRepresentation:()=>dP,getBreadcrumbsFor:()=>ns,useOpenmrsPagination:()=>hC,Pagination:()=>DU,CheckmarkFilledIcon:()=>mJ,clearCurrentUser:()=>o4,showModal:()=>Dv,ChevronUpIcon:()=>m3,saveVisit:()=>dT,useAttachments:()=>hp,Pictogram:()=>PN,useExtensionSlot:()=>fN,ChevronDownIcon:()=>m0,OpenmrsDateRangePicker:()=>O9,deleteAttachmentPermanently:()=>a2,getVisitTypes:()=>db,OverflowMenuHorizontalIcon:()=>yC,EventScheduleIcon:()=>yr,getSessionStore:()=>o1,ActionMenu:()=>kC,ProcedureOrderIcon:()=>yM,preloadImport:()=>aC,registerWorkspaceWindows2:()=>fl,useOnVisible:()=>hY,setSessionLocation:()=>o9,userHasAccess:()=>o5,ChartAverageIcon:()=>mY,getFeatureFlag:()=>pt,UserAvatarIcon:()=>y3,renderExtension:()=>fg,useFhirInfinite:()=>hV,toVisitTypeObject:()=>dg,useSession:()=>h3,EmergencyDepartmentPictogram:()=>Pp,Notification:()=>Dw,dispatchSnackbarShown:()=>C,getSynchronizationItem:()=>cK,navigateAndLaunchWorkspace:()=>PX,omrsOfflineCachingStrategyHttpHeaderName:()=>sl,formatDate:()=>Om,workspace2StoreActions:()=>kW,SwitcherIcon:()=>yK,esmStyleGuideSchema:()=>mx,getImportMapDisabledOverrides:()=>av,useAssignedExtensionIds:()=>hc,CaretRightIcon:()=>mG,evaluateAsType:()=>dG,PageHeader:()=>DB,TranslateIcon:()=>yQ,setUserProperties:()=>o8,MovementIcon:()=>yk,renderInlineNotifications:()=>DT,subscribePrecacheStaticDependencies:()=>x,PaymentsDeskPictogram:()=>Px,usePrimaryIdentifierCode:()=>h1,dispatchPrecacheStaticDependencies:()=>w,getCurrentUser:()=>o0,useLayoutType:()=>hW,XrayPictogram:()=>Pj,CaretUpIcon:()=>mq,renderActionableNotifications:()=>DA,OpenmrsAppContext:()=>hi,setupModals:()=>Db,omrsOfflineResponseBodyHttpHeaderName:()=>sa,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(Cu(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;Cu(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>J,recordConfigDerivationError:()=>rv,useAbortController:()=>hs,Extension:()=>fx,getFhirServerPaginationHandlers:()=>hA,useConnectedExtensions:()=>hg,registerApp:()=>mc,queueSynchronizationItemFor:()=>cL,HospitalBedIcon:()=>yd,useExtensionInternalStore:()=>hS,configExtensionStore:()=>rn,getSynchronizationItems:()=>cU,getExtensionSlotsConfigStore:()=>ri,registerExtensionRendering:()=>pg,RenderIfValueIsTruthy:()=>ha,registerFeatureFlag:()=>d8,useFhirFetchAll:()=>hB,restBaseUrl:()=>oH,CalendarHeatMapIcon:()=>mW,getWorkspaceRegistration:()=>ft,isImportMapOverrideDisabled:()=>aw,resetConfigSystem:()=>r2,getFullSynchronizationItems:()=>cW,getExtensionInternalStore:()=>pc,registerGlobalStore:()=>Y,runSynchronization:()=>cM,evaluateAsBoolean:()=>dW,PatientBannerPatientInfo:()=>D3,addRouteMapOverride:()=>aG,getDefaultCalendar:()=>Op,SettingsIcon:()=>yW,DrugOrderIcon:()=>ye,isOnline:()=>po,ProgramsIcon:()=>yI,useAssignedExtensions:()=>fA,CloseFilledIcon:()=>m5,canAccessStorage:()=>Cl,registerDefaultCalendar:()=>Od,TreeViewAltIcon:()=>y1,OverflowMenuVerticalIcon:()=>yj,clearConfigDerivationError:()=>rw,getConfigStore:()=>ro,registerWorkspaceGroup:()=>p8,InformationSquareIcon:()=>ym,EmptyCard:()=>Dr,ChevronLeftIcon:()=>m1,RadiologyIcon:()=>gn,useCandidateExtensions:()=>hd,renderToasts:()=>Pz,isDesktop:()=>hK,integrateBreakpoints:()=>mm,RegistrationPictogram:()=>PO,CardHeader:()=>mv,getExtensionRegistrationFrom:()=>pW,InformationIcon:()=>yf,TrashCanIcon:()=>y0,useShallowStableValue:()=>fE,useOpenmrsSWR:()=>hZ,Assessment1Pictogram:()=>Pi,finishRegisteringAllApps:()=>md,importDynamic:()=>ak,useFhirPagination:()=>hR,useVisitContextStore:()=>mt,ArrowUpIcon:()=>mV,showActionableNotification:()=>DN,getDynamicOfflineDataHandlers:()=>c3,useForceUpdate:()=>hk,updateWorkspaceWindowState:()=>P8,useVisit:()=>mr,PatientBannerPatientIdentifiers:()=>DQ,WorkspaceNotification:()=>kv,TransferPictogram:()=>Pk,usePagination:()=>hJ,Breakpoint:()=>mp,PatientBannerToggleContactDetailsButton:()=>k2,CloseOutlineIcon:()=>m6,ObstetricsPictogram:()=>Pv,parseDateInput:()=>O_,getConfig:()=>rI,attach:()=>pz,getLocale:()=>SM,ActionMenuButton:()=>kd,isUrlWithTemplateParameters:()=>r6,useEmrConfiguration:()=>hE,useLeftNav:()=>hH,ToolsIcon:()=>yX,ErrorState:()=>Dn,detach:()=>pG,setCurrentVisit:()=>dj,registerOmrsServiceWorker:()=>so,ConditionsIcon:()=>gr,SaveIcon:()=>yV,activateOfflineCapability:()=>sb,useWorkspaces:()=>kr,resetWorkspaceStore:()=>ki,useConfig:()=>hy,validator:()=>t4,CalendarIcon:()=>mK,getHistory:()=>oF,StickyNoteAddIcon:()=>yG,useWorkspace2Store:()=>kK,getPatientName:()=>DW,getVisitStore:()=>dC,getCoreTranslation:()=>ao,registerModuleWithConfigSystem:()=>rj,isOfflineUuid:()=>c1,registerModuleLoad:()=>rT,getBreadcrumbs:()=>no,extractVariableNames:()=>d5,getOfflineSynchronizationStore:()=>cN,translateFrom:()=>an,EditIcon:()=>yt,useStoreWithActions:()=>fP,getCandidateExtensions:()=>pJ,putDynamicOfflineData:()=>c7,shallowEqual:()=>L,subscribeNotificationShown:()=>T,MaximizeIcon:()=>y_,promptForClosingWorkspaces:()=>kU,WarningIcon:()=>y8,closeAllWorkspaces:()=>kt,fhirBaseUrl:()=>oz,matchLocale:()=>Cs,registerBreadcrumb:()=>nr,usePatientPhoto:()=>D9,EventsIcon:()=>yn,createGlobalStore:()=>q,workspaceStore:()=>P7,getCurrentOfflineMode:()=>sy,subscribeToFeatureFlag:()=>pr,useExtensionStore:()=>hD,closeWorkspace:()=>P4,createAttachment:()=>a1,useLeftNavStore:()=>hz,TableIcon:()=>yZ,Icon:()=>ga,InformationFilledIcon:()=>yh,getCurrentPageMap:()=>am,LaboratoryPictogram:()=>Pg,temporaryConfigStore:()=>rr,getPromptBeforeClosingFcn:()=>P1,toDateObjectStrict:()=>Oa,defineConfigSchema:()=>rC,filterBreadcrumbs:()=>na,invalidateImplementerToolsConfig:()=>rg,PatientBannerContactDetails:()=>k9,getAssignedExtensions:()=>pZ,PatientPhoto:()=>Pt,MaterialOrderIcon:()=>yw,MicroscopeIcon:()=>yS,scheduleRecomputation:()=>pS,PharmacyPictogram:()=>PE,AttachmentIcon:()=>gt,MoneyIcon:()=>yD,getAttachments:()=>a0,getFullSynchronizationItemsFor:()=>cV,PageHeaderContent:()=>DV,MedicationIcon:()=>yx,PrinterIcon:()=>yN,getWorkspaceGroupStore:()=>ka,PatientListsPictogram:()=>PR,useAppContext:()=>hl,isOpenmrsRoutes:()=>aA,AppointmentsAltPictogram:()=>Po,GenericOrderTypeIcon:()=>yl,batchExtensionUpdates:()=>px,useExtensionSlotStore:()=>fT,ViewIcon:()=>y9,formattedName:()=>Dz,sessionEndpoint:()=>oG,duration:()=>OO,resetImportMapOverrides:()=>aE,TableOfContentsIcon:()=>yY,CaretLeftIcon:()=>mz,getTranslationOverrides:()=>r$,isVersionSatisfied:()=>Cp,EmptyCardIllustration:()=>Dt,PenIcon:()=>yA,getWorkspaceStore:()=>P9,registerOfflinePatientHandler:()=>ds,setupImportMapOverrides:()=>aD,showToast:()=>PG,useDefineAppContext:()=>ho,validators:()=>r8,getGlobalStore:()=>Z,useOnClickOutside:()=>hq,getWindowByWorkspaceName:()=>fo,ArrowRightIcon:()=>mB,loadLifeCycles:()=>mi,registerBreadcrumbs:()=>nn,MotherIcon:()=>yP,fetchCurrentPatient:()=>dc,Toast:()=>PU,MessageQueueIcon:()=>yE,TwoFactorAuthenticationIcon:()=>y2,Pharmacy2Pictogram:()=>PS,goBackInHistory:()=>oB,GroupAccessIcon:()=>yc,getExtensionRenderingsStore:()=>pd,setImplementerToolsConfigRecomputer:()=>ry,getAsyncExtensionLifecycle:()=>f7,setupApiModule:()=>io,renderLoadingSpinner:()=>k8,WorkspaceContainer:()=>kj,showNotification:()=>DR,queueSynchronizationItem:()=>cF,getModalRegistration:()=>p5,ListCheckedIcon:()=>yb,ResponsiveWrapper:()=>PM,GynaecologyPictogram:()=>Pm,ShoppingCartIcon:()=>yH,getRouteMapNextPageMap:()=>aH,updateVisit:()=>dR,backendDependencies:()=>ir,MaybePictogram:()=>PA,beginEditSynchronizationItem:()=>cz,createParcelMounter:()=>fm,getStartedVisit:()=>dN,omrsOfflineResponseStatusHttpHeaderName:()=>ss,isOpenmrsAppRoutes:()=>aR,openmrsFetch:()=>oY,HomePictogram:()=>PT,DentistryPictogram:()=>Pc,ServiceQueuesPictogram:()=>PD,toLanguageTag:()=>SA,launchWorkspace:()=>PJ,setFeatureFlag:()=>pn,useStore:()=>fD,DigitalTrustPictogram:()=>Pd,NumericObservation:()=>DL,attachmentUrl:()=>aX,interpolateString:()=>oN,inRange:()=>r5,useExtensionSlotMeta:()=>hO,AppointmentsPictogram:()=>Pn,renderSnackbars:()=>PB,getRegisteredWorkspace2Names:()=>kz,toLocationObject:()=>dm,ChartLineIcon:()=>mZ,UserHasAccess:()=>h4,evaluateAsBooleanAsync:()=>dK,changeWorkspaceContext:()=>P5,createDashboard:()=>gl,getLocations:()=>dy,getOfflineDb:()=>cj,canCloseWorkspaceWithoutPrompting:()=>Pq,getExtensionsConfigStore:()=>rl,getRouteMapDefaultMap:()=>aK,age:()=>DY,syncAllDynamicOfflineData:()=>dt,isOmrsDateStrict:()=>Oo,registerWorkspaceGroups2:()=>fs,usePaginationInfo:()=>hX,evaluateAsync:()=>dU,useOpenmrsFetchAll:()=>hL,removeImportMapOverride:()=>ax,showWorkspacePrompts:()=>kn,useVisitTypes:()=>mn,ageAsDuration:()=>Dq,removeDynamicOfflineData:()=>c8,getExtensionNameFromId:()=>pU,deleteSynchronizationItem:()=>cG,renderParcel:()=>fh,useWorkspace2Context:()=>kH,ResetIcon:()=>yB,RenewIcon:()=>yL,subscribeActionableNotificationShown:()=>R,ErrorCard:()=>Do,GenderFemaleIcon:()=>yo,enableImportMapOverride:()=>aS,getOfflinePatientDataStore:()=>da,retry:()=>Cf,ComponentContext:()=>fw,ExtensionSlot:()=>fI,getOmrsServiceWorker:()=>si,addImportMapOverride:()=>a_,subscribeConnectivityChanged:()=>g,unsetLeftNav:()=>p2,MaybeIcon:()=>gi,useCustomOverflowMenu:()=>mT,PedestrianFamilyIcon:()=>yR,generateOfflineUuid:()=>c0,cancelPrompt:()=>P2,CtScanPictogram:()=>Pu,dispatchNotificationShown:()=>P,leftNavStore:()=>p0,OpenmrsFetchError:()=>oJ,UserFollowIcon:()=>y4,launchWorkspaceGroup2:()=>kL,ChevronRightIcon:()=>m2,UserXrayIcon:()=>y5,GenderOtherIcon:()=>ya,formatDuration:()=>Ow,toOmrsIsoString:()=>Os,Labs2Pictogram:()=>Pb,workspace2Store:()=>fn,setUserLanguage:()=>o2,useBodyScrollLock:()=>hf,getExtensionConfig:()=>ru,SyringeIcon:()=>yq,LocationPicker:()=>Da,useDebounce:()=>hv,TimeIcon:()=>yJ,getExtensionSlotConfig:()=>ra,AddIcon:()=>m$,getRouteMapOverrideMap:()=>az,processConfig:()=>rL,InventoryManagementIcon:()=>yy,registerWorkspaces2:()=>fu,UserIcon:()=>y6,formatPatientName:()=>DH,fireOpenmrsEvent:()=>dp,registerModal:()=>p4,registerTranslationNamespace:()=>rR,displayName:()=>DK,evaluate:()=>dV,defineExtensionConfigSchema:()=>rA,renderWorkspaceWindowsAndMenu:()=>Ci,getSyncLifecycle:()=>f6,evaluateAsTypeAsync:()=>dq});let m="openmrs:connectivity-changed";function y(e){window.dispatchEvent(new CustomEvent(m,{detail:{online:e}}))}function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function b(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let v="openmrs:precache-static-dependencies";function w(e={}){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}let E="openmrs:notification-shown",S="openmrs:actionable-notification-shown",O="openmrs:toast-shown",D="openmrs:snack-bar-shown";function P(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function k(e){window.dispatchEvent(new CustomEvent(S,{detail:e}))}function C(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function j(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function T(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function R(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function M(e){let t=$(e);setTimeout(()=>{throw t})}function I(){let e=Error();return t=>{let r=$(t);r.stack+=`
2
+ Async stacktrace:
3
+ ${e.stack}`,M(t)}}function $(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function L(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function F(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e){return console.error("Unexpected error: ",e),j({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),j({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})};let B=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>B(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>B(t)(e)}}},V=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,o,i);return i},U=e=>e?V(e):V;function W(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let K={},H=Symbol.for("openmrs.esm-state.instanceCount"),z=globalThis,G=(z[H]??0)+1;function q(e,t,r="none"){let n=K[e];if(n)return n.active?W()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=X(e,t,r);return K[e]={value:n,active:!0},n}}function Y(e,t){let r=K[e];return r?(r.active?W()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(K[e]={value:t,active:!0},t)}function Z(e,t,r="none"){let n=K[e];if(!n){let n=X(e,t??{},r);return K[e]={value:n,active:!1},n}return n.value}function J(...e){let[t,r,n]=e,o=void 0===n?r:n,i=void 0===n?e=>e:r,a=i(t.getState());return o(a),t.subscribe(e=>{let t=i(e);L(a,t)||(a=t,o(t))})}function X(e,t,r){return"sessionStorage"===r?U()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let i,a,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set;try{i=s.getStorage()}catch(e){}if(!i)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=B(s.serialize),p=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>i.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},f=o.setState;o.setState=(e,t)=>{f(e,t),p()};let h=e((...e)=>{r(...e),p()},n,o),m=()=>{var e;if(!i)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return B(i.getItem.bind(i))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return e.state;else{if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(a=s.merge(e,null!=(t=n())?t:h),!0),p()}).then(()=>{null==t||t(a,void 0),l=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(i=e.getStorage())},clearStorage:()=>{null==i||i.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h};return(r,n,o)=>{let i,a={storage:F(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=a.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=a.partialize({...n()});return c.setItem(a.name,{state:e,version:a.version})},p=o.setState;o.setState=(e,t)=>{p(e,t),d()};let f=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>f;let h=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:f)});let o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=n())?e:f))||void 0;return B(c.getItem.bind(c))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate)return[!0,a.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,s]=e;if(r(i=a.merge(s,null!=(t=n())?t:f),!0),o)return d()}).then(()=>{null==o||o(i,void 0),i=n(),s=!0,u.forEach(e=>e(i))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},a.skipHydration||h(),i||f}})(()=>t,{name:e,storage:F(()=>sessionStorage)})):U()(()=>t)}z[H]=G,G>1&&!W()&&console.error(`Detected ${G} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=K)},1e3);let Q=function(e){return void 0===e};var ee,et,er,en,eo,ei,ea,es,el,eu=function(e,t){return(eu=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function ec(e,t){function r(){this.constructor=e}eu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function ed(e){return"function"==typeof e}var ep=!1,ef={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value&&Error().stack,ep=value},get useDeprecatedSynchronousErrorHandling(){return ep}};function eh(e){setTimeout(function(){throw e},0)}var em={closed:!0,next:function(e){},error:function(e){if(ef.useDeprecatedSynchronousErrorHandling)throw e;eh(e)},complete:function(){}},ey=Array.isArray||function(e){return e&&"number"==typeof e.length},eg=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),eb=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,n=this._ctorUnsubscribe,o=this._unsubscribe,i=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var a=0;a<r.length;++a)r[a].remove(this);if(ed(o)){n&&(this._unsubscribe=void 0);try{o.call(this)}catch(t){e=t instanceof eg?ev(t.errors):[t]}}if(ey(i))for(var a=-1,s=i.length;++a<s;){var l=i[a];if(null!==l&&"object"==typeof l)try{l.unsubscribe()}catch(t){e=e||[],t instanceof eg?e=e.concat(ev(t.errors)):e.push(t)}}if(e)throw new eg(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}();function ev(e){return e.reduce(function(e,t){return e.concat(t instanceof eg?t.errors:t)},[])}var ew="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),e_=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=em;break;case 1:if(!r){i.destination=em;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new ex(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new ex(i,r,n,o)}return i}return ec(t,e),t.prototype[ew]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(eb),ex=function(e){function t(t,r,n,o){var i,a=e.call(this)||this;a._parentSubscriber=t;var s=a;return ed(r)?i=r:r&&(i=r.next,n=r.error,o=r.complete,r!==em&&(ed((s=Object.create(r)).unsubscribe)&&a.add(s.unsubscribe.bind(s)),s.unsubscribe=a.unsubscribe.bind(a))),a._context=s,a._next=i,a._error=n,a._complete=o,a}return ec(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;ef.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=ef.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):eh(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;eh(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};ef.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),ef.useDeprecatedSynchronousErrorHandling)throw e;eh(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!ef.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(ef.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return eh(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(e_),eE="function"==typeof Symbol&&Symbol.observable||"@@observable",eS=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,o=function(e,t,r){if(e){if(e instanceof e_)return e;if(e[ew])return e[ew]()}return e||t||r?new e_(e,t,r):new e_(em)}(e,t,r);if(n?o.add(n.call(o,this.source)):o.add(this.source||ef.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),ef.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){ef.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,r=t.closed,n=t.destination,o=t.isStopped;if(r||o)return!1;e=n&&n instanceof e_?n:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=eO(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[eE]=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===e.length?function(e){return e}:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=eO(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function eO(e){if(e||(e=ef.Promise||Promise),!e)throw Error("no Promise impl found");return e}var eD=r(77361),eP=r(34878),ek=r(47313),eC=Object.prototype,ej=Function.prototype.toString,eT=eC.hasOwnProperty,eR=ej.call(Object);let eA=function(e){if(!(0,ek.A)(e)||"[object Object]"!=(0,eD.A)(e))return!1;var t=(0,eP.A)(e);if(null===t)return!0;var r=eT.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ej.call(r)==eR};var eN=r(21050),eM=r(99271),eI=r(26979);let e$=function(e,t,r){(void 0===r||(0,eI.A)(e[t],r))&&(void 0!==r||t in e)||(0,eM.A)(e,t,r)},eL=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};var eF=r(39600),eB="object"==typeof exports&&exports&&!exports.nodeType&&exports,eV=eB&&"object"==typeof module&&module&&!module.nodeType&&module,eU=eV&&eV.exports===eB?eF.A.Buffer:void 0,eW=eU?eU.allocUnsafe:void 0;let eK=function(e,t){if(t)return e.slice();var r=e.length,n=eW?eW(r):new e.constructor(r);return e.copy(n),n};var eH=r(97913);let ez=function(e){var t=new e.constructor(e.byteLength);return new eH.A(t).set(new eH.A(e)),t},eG=function(e,t){var r=t?ez(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},eq=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var eY=r(97942),eZ=Object.create,eJ=function(){function e(){}return function(t){if(!(0,eY.A)(t))return{};if(eZ)return eZ(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),eX=r(71140);let eQ=function(e){return"function"!=typeof e.constructor||(0,eX.A)(e)?{}:eJ((0,eP.A)(e))};var e0=r(86770),e1=r(96956),e2=r(31475),e3=r(11917),e4=r(50405),e5=r(60480);let e6=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var e7=r(76124);let e9=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),o?(0,eM.A)(r,s,l):(0,e7.A)(r,s,l)}return r};var e8=r(25894);let te=function(e,t,r,n,o,i,a){var s=e6(e,r),l=e6(t,r),u=a.get(l);if(u)return void e$(e,r,u);var c=i?i(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var p=(0,e1.A)(l),f=!p&&(0,e3.A)(l),h=!p&&!f&&(0,e5.A)(l);(c=l,p||f||h)?(0,e1.A)(s)?c=s:(0,ek.A)(s)&&(0,e2.A)(s)?c=eq(s):f?(d=!1,c=eK(l,!0)):h?(d=!1,c=eG(l,!0)):c=[]:eA(l)||(0,e0.A)(l)?(c=s,(0,e0.A)(s))?c=e9(s,(0,e8.A)(s)):(!(0,eY.A)(s)||(0,e4.A)(s))&&(c=eQ(l)):d=!1}d&&(a.set(l,c),o(c,l,n,i,a),a.delete(l)),e$(e,r,c)},tt=function e(t,r,n,o,i){t!==r&&eL(r,function(a,s){if(i||(i=new eN.A),(0,eY.A)(a))te(t,r,s,n,e,o,i);else{var l=o?o(e6(t,s),a,s+"",t,r,i):void 0;void 0===l&&(l=a),e$(t,s,l)}},e8.A)};var tr=r(14151);let tn=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)};var to=Math.max;let ti=function(e,t,r){return t=to(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=to(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),tn(e,this,s)}};var ta=r(61758),ts=ta.A?function(e,t){return(0,ta.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tr.A,tl=Date.now,tu=(ee=0,et=0,function(){var e=tl(),t=16-(e-et);if(et=e,t>0){if(++ee>=800)return arguments[0]}else ee=0;return ts.apply(void 0,arguments)}),tc=r(85378);let td=function(e,t,r){if(!(0,eY.A)(r))return!1;var n=typeof t;return("number"==n?!!((0,e2.A)(r)&&(0,tc.A)(t,r.length)):"string"==n&&t in r)&&(0,eI.A)(r[t],e)},tp=function(e){var t;return tu(ti(t=function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&td(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t},void 0,tr.A),t+"")};var tf=tp(function(e,t,r,n){tt(e,t,r,n)}),th=r(33981);let tm=function(e,t){return(0,th.A)(e,t)};var ty=r(65133);let tg=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var tb=r(7817),tv=r(26157),tw=r(36430),t_=r(2475),tx=r(7096),tE=r(92728),tS=Object.prototype.hasOwnProperty;let tO=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&tS.call(e,"index")&&(r.index=e.index,r.input=e.input),r},tD=function(e,t){var r=t?ez(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var tP=/\w*$/;let tk=function(e){var t=new e.constructor(e.source,tP.exec(e));return t.lastIndex=e.lastIndex,t};var tC=r(83516),tj=tC.A?tC.A.prototype:void 0,tT=tj?tj.valueOf:void 0;let tR=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return ez(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return tD(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return eG(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return tk(e);case"[object Symbol]":return tT?Object(tT.call(e)):{}}};var tA=r(58126),tN=r(10248),tM=tN.A&&tN.A.isMap,tI=tM?(0,tA.A)(tM):function(e){return(0,ek.A)(e)&&"[object Map]"==(0,tE.A)(e)},t$=tN.A&&tN.A.isSet,tL=t$?(0,tA.A)(t$):function(e){return(0,ek.A)(e)&&"[object Set]"==(0,tE.A)(e)},tF="[object Arguments]",tB="[object Function]",tV="[object Object]",tU={};tU[tF]=tU["[object Array]"]=tU["[object ArrayBuffer]"]=tU["[object DataView]"]=tU["[object Boolean]"]=tU["[object Date]"]=tU["[object Float32Array]"]=tU["[object Float64Array]"]=tU["[object Int8Array]"]=tU["[object Int16Array]"]=tU["[object Int32Array]"]=tU["[object Map]"]=tU["[object Number]"]=tU[tV]=tU["[object RegExp]"]=tU["[object Set]"]=tU["[object String]"]=tU["[object Symbol]"]=tU["[object Uint8Array]"]=tU["[object Uint8ClampedArray]"]=tU["[object Uint16Array]"]=tU["[object Uint32Array]"]=!0,tU["[object Error]"]=tU[tB]=tU["[object WeakMap]"]=!1;let tW=function e(t,r,n,o,i,a){var s,l=1&r,u=2&r,c=4&r;if(n&&(s=i?n(t,o,i,a):n(t)),void 0!==s)return s;if(!(0,eY.A)(t))return t;var d=(0,e1.A)(t);if(d){if(s=tO(t),!l)return eq(t,s)}else{var p,f,h,m,y=(0,tE.A)(t),g=y==tB||"[object GeneratorFunction]"==y;if((0,e3.A)(t))return eK(t,l);if(y==tV||y==tF||g&&!i){if(s=u||g?{}:eQ(t),!l)return u?(f=(p=s)&&e9(t,(0,e8.A)(t),p),e9(t,(0,tw.A)(t),f)):(m=(h=s)&&e9(t,(0,tb.A)(t),h),e9(t,(0,tv.A)(t),m))}else{if(!tU[y])return i?t:{};s=tR(t,y,l)}}a||(a=new eN.A);var b=a.get(t);if(b)return b;a.set(t,s),tL(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,a))}):tI(t)&&t.forEach(function(o,i){s.set(i,e(o,r,n,i,t,a))});var v=c?u?tx.A:t_.A:u?e8.A:tb.A,w=d?void 0:v(t);return tg(w||t,function(o,i){w&&(o=t[i=o]),(0,e7.A)(s,i,e(o,r,n,i,t,a))}),s};var tK=r(77390),tH=r(14441),tz=r(55841);let tG=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i};var tq=r(9322),tY=Object.prototype.hasOwnProperty;let tZ=function(e,t){t=(0,tK.A)(t,e);var r,n=-1,o=t.length;if(!o)return!0;for(;++n<o;){var i=(0,tq.A)(t[n]);if("__proto__"===i&&!tY.call(e,"__proto__")||("constructor"===i||"prototype"===i)&&n<o-1)return!1}var a=(r=t).length<2?e:(0,tz.A)(e,tG(r,0,-1));return null==a||delete a[(0,tq.A)((0,tH.A)(t))]},tJ=function(e){return eA(e)?void 0:e};var tX=r(53271),tQ=tC.A?tC.A.isConcatSpreadable:void 0;let t0=function(e){return(0,e1.A)(e)||(0,e0.A)(e)||!!(tQ&&e&&e[tQ])},t1=function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=t0),i||(i=[]);++a<s;){var l=t[a];r>0&&n(l)?r>1?e(l,r-1,n,o,i):(0,tX.A)(i,l):o||(i[i.length]=l)}return i};var t2=tu(ti(er=function(e,t){var r={};if(null==e)return r;var n=!1;t=(0,ty.A)(t,function(t){return t=(0,tK.A)(t,e),n||(n=t.length>1),t}),e9(e,(0,tx.A)(e),r),n&&(r=tW(r,7,tJ));for(var o=t.length;o--;)tZ(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?t1(e,1):[]}),er+""),t3=((en={}).Array="Array",en.Boolean="Boolean",en.ConceptUuid="ConceptUuid",en.Number="Number",en.Object="Object",en.String="String",en.UUID="UUID",en.PersonAttributeTypeUuid="PersonAttributeTypeUuid",en.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",en);function t4(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let t5=t4(e=>Array.isArray(e),"must be an array"),t6=t4(e=>"boolean"==typeof e,"must be a boolean"),t7=t4(e=>"number"==typeof e,"must be a number"),t9=t4(e=>"string"==typeof e,"must be a string"),t8=t4(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),re=t4(e=>/^[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"),rt=q("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),rr=q("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});rr.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let rn=q("config-store-of-extension-state",{mountedExtensions:[]});function ro(e){return Z(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function ri(){return Z("config-extension-slots",{slots:{}})}function ra(e){return rs(ri().getState(),e)}function rs(e,t){return e.slots[t]??{loaded:!1,config:{}}}function rl(){return Z("config-extensions",{configs:{}})}function ru(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw Error("Attempted to call `getExtensionConfig()` with invalid argument");let r=rl(),n=r=>r.configs[e]?.[t];return{getInitialState:()=>n(r.getInitialState()),getState:()=>n(r.getState())??{loaded:!1,config:null},subscribe:e=>r.subscribe((t,r)=>{let o=n(t),i=n(r);L(o,i)||e(o,i)})}}function rc(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function rd(e,t,r){return e.configure?.[r]??null}let rp=U()(()=>({config:{}})),rf=0,rh=!0,rm=!1;function ry(e){n=e}function rg(){rh=!0,rf>0&&rb()}function rb(){if(rh&&n&&!rm){rm=!0,rh=!1;try{n()}catch(e){rh=!0,rv(e),console.error("Failed to derive the implementer tools config",e)}finally{rm=!1}}}function rv(e){rp.setState({derivationError:e instanceof Error?e.message:String(e)})}function rw(){rp.getState().derivationError&&rp.setState({derivationError:void 0})}let r_=Y("config-implementer-tools",{...rp,getState:()=>(0===rf&&rb(),rp.getState()),setState:(...e)=>(rh=!1,rp.setState(...e)),subscribe(e){rf++,rb();let t=rp.subscribe(e),r=!1;return()=>{!r&&(r=!0,rf--),t()}}});function rx(e,t){if(Array.isArray(t))return t}function rE(e,t){return tf({},e,t,rx)}let rS=[];function rO(){let e=rt.getState(),t=rr.getState(),r=rn.getState();!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=ro(r),i=e.schemas[r],a=!!e.moduleLoaded[r],s=rk.get(r);if(s&&s.schema===i&&s.moduleLoaded===a&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=a?function(e,t,r){let n=t.schemas[e],o=rK(e,rU(t,r));rz(n,o,e);let i=rZ(n,o);return rG(n,i,e),delete i.extensionSlots,i}(r,e,t):function(e,t,r){let n=rZ(r4,rK(e,rU(t,r)));return rG(r4,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:a,config:o},rk.set(r,{schema:i,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&tm(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=rH(rU(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&r0(n,o+`' contains invalid keys '${i.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||r0(n,o+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||r0(n,o+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||r0(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!rX(e.configure)&&r0(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let i={},a={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))i[t]=r,r.configure&&(a[t]??(a[t]=[])).push(r.configure);for(let[e,t]of Object.entries(a)){let r=1===t.length?t[0]:rH(t);i[e].configure!==r&&(i[e]={...i[e],configure:r})}return i}(e,t);(function(e){let t=ri(),r=t.getState().slots,n={},o=!1;for(let[t,i]of Object.entries(e)){let e=r[t];e?.loaded&&tm(e.config,i)?n[t]=e:(n[t]={loaded:!0,config:i},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),function(e,t,r,n){let o=rl(),i=o.getState().configs,a={},s=!1,l=0;for(let o of t.mountedExtensions){let t=function(e,t,r,n,o,i,a){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=rF.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===i.config)return c.config;let d=l?s:t,p=rU(o,i),f=a?.configure?.[n]??{},h=rK(e,p),m=h?.extensionSlots?.[r]?.configure?.[n]??{},y=rH([rK(d,p),f,m]),g=l??o.schemas[t];rz(g,y,d);let b=rZ(g,y);return rG(g,b,d),delete b.extensionSlots,rF.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:i.config,config:b}),b}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,r,n[o.slotName]),u=i[o.slotName]?.[o.extensionId],c=u?.loaded&&tm(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),a[o.slotName]||(a[o.slotName]={}),a[o.slotName][o.extensionId]=c,l++}for(let[e,t]of Object.entries(a)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(a[e]=r)}s||(s=Object.keys(i).length!==Object.keys(a).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&o.setState({configs:a})}(e,r,t,n),rg()}function rD(){n=()=>{var e,t;let r,n;return e=rt.getState(),t=rr.getState(),r=r_.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=rV.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:rX(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(tW(n,5));rV.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let i={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),a=n.map(([,e])=>e),s=rB.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===a[t])){i[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=rE(l,function e(t,r){return rX(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),rB.set(e,{annotatedSchema:t,configSlices:o,sources:a,result:l}),i[e]=l}return i}(e,t)},void(tm(r.config,n.config)||r_.setState(n))},rO(),rS.push(rt.subscribe(rP),rr.subscribe(rP),rn.subscribe(rP))}function rP(){rw();try{rO()}catch(e){rv(e),console.error("Failed to recompute the configuration",e)}}rD();let rk=new Map;function rC(e,t){rW(e,t);let r=rE(t,r4);rt.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function rj(e){rt.setState(t=>({...t,schemas:{...t.schemas,[e]:r4}}))}function rT(e){rt.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function rR(e){rt.setState(t=>({...t,schemas:{...t.schemas,[e]:r3}}))}function rA(e,t){rW(e,t);let r=rE(t,r4);rt.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),rt.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function rN(e,t="provided"){rt.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function rM(e,t,r){return new Promise(n=>{let o,i=!1;function a(e){!i&&t(e)&&(i=!0,n(r(e)),o?.())}a(e.getState()),i||(o=e.subscribe(a))})}function rI(e){return rM(ro(e),e=>!!(e.loaded&&e.config),e=>t2(e.config,["Display conditions","Translation overrides"]))}function r$(e,t,r){let n=[rM(ro(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(rM(ru(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function rL(e,t,r){rz(e,t,r);let n=rZ(e,t);return rG(e,n,r),n}let rF=new Map,rB=new Map,rV=new Map;function rU(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function rW(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let i=r+(r&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!rX(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${n}`);continue}a.hasOwnProperty("_default")||rW(e,a,i);let s=a._elements;if(rJ(s)&&rW(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${n}.
4
+
5
+ If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=a._type;l&&!Object.values(t3).includes(l)&&console.error(`${e} has invalid type for key '${i}' ${n}.
6
+
7
+ If you're the maintainer: the allowed types are ${Object.values(t3).join(", ")}. Received '${l}'`),Object.keys(a).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!r.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${n}.
8
+
9
+ If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&l&&![t3.Array,t3.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${i}'. ${n}.
10
+
11
+ If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function rK(e,t){return rH(t.map(({[e]:t})=>t).filter(e=>!!e))}function rH(e){return e.reduce((e,t)=>tf(e,t,rx),{})}function rz(e,t,r=""){for(let n of Object.keys(t)){let o=t[n],i=r+"."+n,a=e[n];if(!e.hasOwnProperty(n)){("extensionSlots"!==n||""===r)&&r0(i,`Unknown config key '${i}' provided. Ignoring.`);continue}(function e(t,r,n){rq(n,t._type,r),rX(r)?t._type===t3.Object?function(t,r,n){if(t._elements)for(let o of Object.keys(r)){let i=r[o];e(t._elements,i,`${n}.${o}`)}}(t,r,n):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||rz(t,r,n):t._type===t3.Array&&function(t,r,n){if(rq(n,t3.Array,r)){if(rJ(t._elements))for(let o=0;o<r.length;o++)e(t._elements,r[o],`${n}[${o}]`);for(let e=0;e<r.length;e++)rq(`${n}[${e}]`,t._elements?._type,r[e])}}(t,r,n)})(a,o,i)}}function rG(e,t,r=""){if(e){if(t!==e._default&&rY(r,e._validators,t),rX(t))for(let n of Object.keys(t)){let o=t[n],i=r+"."+n,a=e[n];e._type===t3.Object&&e._elements?rG(e._elements,o,i):rG(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let n=0;n<t.length;n++)rG(e._elements,t[n],`${r}[${n}]`)}}function rq(e,t,r){return!t||rY(e,[{Array:t5,Boolean:t6,ConceptUuid:re,Number:t7,Object:t8,String:t9,UUID:re,PersonAttributeTypeUuid:re,PatientIdentifierTypeUuid:re}[t]],r)}function rY(e,t,r){let n=!0;if(t)try{for(let o of t){let t=o(r);if("string"==typeof t){let o="object"==typeof r?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${r} for ${e}: ${t}`;r0(e,o),n=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
12
+ ${t}`)}return n}let rZ=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=o._default);let e=o._elements;if(n&&rJ(e)){if(o._type===t3.Array&&Array.isArray(n)){let o=n.map(t=>rZ(e,t));r[t]=o}else if(o._type===t3.Object)for(let t of Object.keys(n))n[t]=rZ(e,n[t])}}else if(rX(o)){let e=n??{};rX(e)&&(r[t]=rZ(o,e))}}return r};function rJ(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function rX(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let rQ=new Set;function r0(e,t){let r=`${e}:::${t}`;rQ||(rQ=new Set),rQ.has(r)||(console.error(t),rQ.add(r))}function r1(e){e?rQ.forEach(t=>{t.startsWith(e)&&rQ.delete(t)}):rQ.clear()}function r2(){rS.forEach(e=>e()),rS.length=0,rk.clear(),rF.clear(),rV.clear(),rB.clear(),rD()}let r3={"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:t3.Object,_default:{},_validators:[t4(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[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: ${t.join(", ")}.`})]}},r4={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:t3.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:t3.String,_default:void 0}},...r3},r5=(e,t)=>t4(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),r6=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return t4(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},r7=r6([]),r9=e=>t4(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),r8={inRange:r5,isUrl:r7,isUrlWithTemplateParameters:r6,oneOf:r9};var ne=r(82034);let nt=q("breadcrumbs",[]);function nr(e){return nn([e])}function nn(e){let t=[...no(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,ne.pathToRegexp)(e.matcher).regexp:(0,ne.pathToRegexp)(e.path).regexp,settings:e}))];nt.setState(t,!0)}function no(){return nt.getState()}function ni(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=ni(e,r.join("/"));if(t)return t}}(e,t)}function na(e,t){if(e.length>0){let r=ni(e,t);if(r){let t=[r],n=ni(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=ni(e,n.settings.parent);return t.reverse()}}return[]}function ns(e){return na(no(),e)}var nl=Object.freeze({__proto__:null,get start(){return oR},get ensureJQuerySupport(){return os},get setBootstrapMaxTime(){return nX},get setMountMaxTime(){return nQ},get setUnmountMaxTime(){return n0},get setUnloadMaxTime(){return n1},get registerApplication(){return ob},get unregisterApplication(){return ow},get getMountedApps(){return oh},get getAppStatus(){return oy},get unloadApplication(){return o_},get checkActivityFunctions(){return ov},get getAppNames(){return om},get pathToActiveWhen(){return oS},get navigateToUrl(){return n9},get patchHistoryApi(){return oo},get triggerAppChange(){return ok},get addErrorHandler(){return nf},get removeErrorHandler(){return nh},get mountRootParcel(){return nG},get NOT_LOADED(){return ng},get LOADING_SOURCE_CODE(){return nb},get NOT_BOOTSTRAPPED(){return nv},get BOOTSTRAPPING(){return nw},get NOT_MOUNTED(){return n_},get MOUNTING(){return nx},get UPDATING(){return nS},get LOAD_ERROR(){return nP},get MOUNTED(){return nE},get UNLOADING(){return nD},get UNMOUNTING(){return nO},get SKIP_BECAUSE_BROKEN(){return nk}}),nu=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,nc=!function(){try{var e=new nu("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}:nu;let nd=[];function np(e,t,r){let n=ny(e,t,r);nd.length?nd.forEach(e=>e(n)):setTimeout(()=>{throw n})}function nf(e){if("function"!=typeof e)throw Error(nm(28,!1));nd.push(e)}function nh(e){if("function"!=typeof e)throw Error(nm(29,!1));let t=!1;return nd=nd.filter(r=>{let n=r===e;return t=t||n,!n}),t}function nm(e,t,...r){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function ny(e,t,r){let n,o=`${nA(t)} '${nT(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(nm(30,!1,t.status,nT(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=nT(t),t.status=r,n}let ng="NOT_LOADED",nb="LOADING_SOURCE_CODE",nv="NOT_BOOTSTRAPPED",nw="BOOTSTRAPPING",n_="NOT_MOUNTED",nx="MOUNTING",nE="MOUNTED",nS="UPDATING",nO="UNMOUNTING",nD="UNLOADING",nP="LOAD_ERROR",nk="SKIP_BECAUSE_BROKEN";function nC(e){return e.status===nE}function nj(e){try{return e.activeWhen(window.location)}catch(t){return np(t,e,nk),!1}}function nT(e){return e.name}function nR(e){return!!e.unmountThisParcel}function nA(e){return nR(e)?"parcel":"application"}function nN(){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 nM(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function nI(e){return e&&("function"==typeof e||Array.isArray(e)&&!nM(e,e=>"function"!=typeof e))}function n$(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=nA(e),o=nT(e);return function(e){return r.reduce((r,i,a)=>r.then(()=>{let r=i(e);return nL(r)?r:Promise.reject(nm(15,!1,n,o,t,a))}),Promise.resolve())}}function nL(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let nF=[];function nB(e,t){return Promise.resolve().then(()=>e.status!==nv?e:(e.status=nw,e.bootstrap?n2(e,"bootstrap").then(r).catch(r=>{if(t)throw ny(r,e,nk);return np(r,e,nk),e}):Promise.resolve().then(r)));function r(){return e.status=n_,e}}function nV(e,t){return Promise.resolve().then(()=>{if(e.status!==nE)return e;return e.status=nO,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(r,n=>r().then(()=>{let r=Error(n.message);if(t)throw ny(r,e,nk);np(r,e,nk)})).then(()=>e);function r(){return n2(e,"unmount").then(()=>{e.status=n_},r=>{if(t)throw ny(r,e,nk);np(r,e,nk)})}})}let nU=!1,nW=!1;function nK(e,t){return Promise.resolve().then(()=>e.status!==n_?e:(nU||(window.dispatchEvent(new nc("single-spa:before-first-mount")),nU=!0),e.status=nx,n2(e,"mount").then(()=>(e.status=nE,nW||(window.dispatchEvent(new nc("single-spa:first-mount")),nW=!0),e)).catch(r=>{return e.status=nE,nV(e,!0).then(n,n);function n(){if(t)throw ny(r,e,nk);return np(r,e,nk),e}})))}let nH=0,nz={parcels:{}};function nG(){return nq.apply(nz,arguments)}function nq(e,t){let r,n,o,i=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(nm(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(nm(3,!1,typeof e.name));let a=nH++,s=e.name||`parcel-${a}`;if("object"!=typeof t)throw Error(nm(4,!1,s,typeof t));if(!t.domElement)throw Error(nm(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:a,parcels:{},status:l?nb:nv,customProps:t,parentName:nT(i),unmountThisParcel:()=>f.then(()=>{if(c.status!==nE)throw Error(nm(6,!1,s,c.status));return nV(c,!0)}).then(e=>(c.parentName&&delete i.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=nk,o(e),e})};i.parcels[a]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(nm(7,!1));let p=(d=d.then(e=>{if(!e)throw Error(nm(8,!1));if(s=e.name||`parcel-${a}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!nI(e.bootstrap))throw Error(nm(9,!1,s));if(!nI(e.mount))throw Error(nm(10,!1,s));if(!nI(e.unmount))throw Error(nm(11,!1,s));if(e.update&&!nI(e.update))throw Error(nm(12,!1,s));let t=n$(e,"bootstrap"),n=n$(e,"mount"),o=n$(e,"unmount");c.status=nv,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=n3(e.timeouts),e.update&&(c.update=n$(e,"update"),r.update=function(e){return c.customProps=e,nY(Promise.resolve().then(()=>{if(c.status!==nE)throw Error(nm(32,!1,nT(c)));return c.status=nS,n2(c,"update").then(()=>(c.status=nE,c)).catch(e=>{throw ny(e,c,nk)})}))})})).then(()=>nB(c,!0)),f=p.then(()=>nK(c,!0)),h=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>nY(Promise.resolve().then(()=>{if(c.status!==n_)throw Error(nm(13,!1,s,c.status));return i.parcels[a]=c,nK(c)})),unmount:()=>nY(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:nY(d),bootstrapPromise:nY(p),mountPromise:nY(f),unmountPromise:nY(h)}}function nY(e){return e.then(()=>null)}function nZ(e){let t=nT(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(nm(40,!1),t,r));let n=nN({},r,{name:t,mountParcel:nq.bind(e),singleSpa:nl});return nR(e)&&(n.unmountSelf=e.unmountThisParcel),n}let nJ={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 nX(e,t,r){if("number"!=typeof e||e<=0)throw Error(nm(16,!1));nJ.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function nQ(e,t,r){if("number"!=typeof e||e<=0)throw Error(nm(17,!1));nJ.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function n0(e,t,r){if("number"!=typeof e||e<=0)throw Error(nm(18,!1));nJ.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function n1(e,t,r){if("number"!=typeof e||e<=0)throw Error(nm(19,!1));nJ.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function n2(e,t){let r=e.timeouts[t],n=r.warningMillis,o=nA(e);return new Promise((i,a)=>{let s=!1,l=!1;e[t](nZ(e)).then(e=>{s=!0,i(e)}).catch(e=>{s=!0,a(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=nm(31,!1,t,o,nT(e),r.millis);function c(e){s||(!0===e?(l=!0,r.dieOnTimeout?a(Error(u)):console.error(u)):!l&&(console.warn(u),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function n3(e){let t={};for(let r in nJ)t[r]=nN({},nJ[r],e&&e[r]||{});return t}function n4(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==ng&&e.status!==nP?e:(e.status=nb,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(nZ(e));if(!nL(n))throw r=!0,Error(nm(33,!1,nT(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!nI(t.bootstrap)&&(n=35),nI(t.mount)||(n=36),nI(t.unmount)||(n=37);let o=nA(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(nm(n,!1,o,nT(e),r),t),np(void 0,e,nk),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=nN({},e.devtools.overlays,t.devtools.overlays)),e.status=nv,e.bootstrap=n$(t,"bootstrap"),e.mount=n$(t,"mount"),e.unmount=n$(t,"unmount"),e.unload=n$(t,"unload"),e.timeouts=n3(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=nk:(n=nP,e.loadErrorTime=(new Date).getTime()),np(t,e,n),e}))})}let n5="u">typeof window,n6={hashchange:[],popstate:[]},n7=["hashchange","popstate"];function n9(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(nm(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=oi(window.location.href),n=oi(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function n8(e){if(e){let t=e[0].type;n7.indexOf(t)>=0&&n6[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function oe(){oC([],arguments)}function ot(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),i=window.location.href;return o&&r===i||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch(t){(r=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let or=null,on=!1;function oo(e){if(on)throw Error(nm(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,on=!0,or=window.history.replaceState,window.addEventListener("hashchange",oe),window.addEventListener("popstate",oe);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&n7.indexOf(e)>=0)||nM(n6[e],e=>e===r))return t.apply(this,arguments);n6[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&n7.indexOf(e)>=0&&(n6[e]=n6[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=ot(window.history.pushState,"pushState"),window.history.replaceState=ot(or,"replaceState")}function oi(e){let t=document.createElement("a");return t.href=e,t}n5&&(window.singleSpaNavigate?console.warn(nm(41,!1)):window.singleSpaNavigate=n9);let oa=!1;function os(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!oa){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return ol.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return ol.call(this,r,window.removeEventListener,e,t,arguments)},oa=!0}}function ol(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{n7.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let ou={};function oc(e){return Promise.resolve().then(()=>{let t=ou[nT(e)];if(!t)return e;if(e.status===ng)return od(e,t),e;if(e.status===nD)return t.promise.then(()=>e);if(e.status!==n_&&e.status!==nP)return e;let r=e.status===nP?Promise.resolve():n2(e,"unload");return e.status=nD,r.then(()=>(od(e,t),e)).catch(r=>(delete ou[nT(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,np(r,e,nk),t.reject(r),e))})}function od(e,t){delete ou[nT(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=ng,t.resolve()}function op(e,t,r,n){ou[nT(e)]={app:e,resolve:r,reject:n},Object.defineProperty(ou[nT(e)],"promise",{get:t})}let of=[];function oh(){return of.filter(nC).map(nT)}function om(){return of.map(nT)}function oy(e){let t=nM(of,t=>nT(t)===e);return t?t.status:null}let og=!1;function ob(e,t,r,n){var o,i;let a,s,l=(a={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(nm(39,!1));let t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(nm(38,!1,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(nm(20,!1));let n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(nm(24,!1));if(!oE(e.customProps))throw Error(nm(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(nm(20,!1));if(!t)throw Error(nm(23,!1));if("function"!=typeof r)throw Error(nm(24,!1));if(!oE(n))throw Error(nm(22,!1))}(e,t,r,n),a.name=e,a.loadApp=t,a.activeWhen=r,a.customProps=n),a.loadApp="function"!=typeof(o=a.loadApp)?()=>Promise.resolve(o):o,a.customProps=a.customProps||{},s=(s=Array.isArray(i=a.activeWhen)?i:[i]).map(e=>"function"==typeof e?e:oS(e)),a.activeWhen=e=>s.some(t=>t(e)),a);if(oT||og||(og=!0,setTimeout(()=>{oT||console.warn(nm(1,!1))},5e3)),-1!==om().indexOf(l.name))throw Error(nm(21,!1,l.name));of.push(nN({loadErrorTime:null,status:ng,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),n5&&(os(),oC())}function ov(e=window.location){return of.filter(t=>t.activeWhen(e)).map(nT)}function ow(e){if(0===of.filter(t=>nT(t)===e).length)throw Error(nm(25,!1,e));return(n5?o_(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=of.map(nT).indexOf(e);of.splice(t,1)})}function o_(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(nm(26,!1));let r=nM(of,t=>nT(t)===e);if(!r)throw Error(nm(27,!1,e));let n=ou[nT(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{op(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,ox(r,n.resolve,n.reject)):e=new Promise((t,n)=>{op(r,()=>e,t,n),ox(r,t,n)}),e}}function ox(e,t,r){Promise.resolve().then(()=>{if(nM(ov(),t=>t===nT(e)))return ok()}).then(()=>nV(e).then(oc).then(()=>{t(),setTimeout(()=>{oC()})})).catch(r)}function oE(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function oS(e,t){let r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let r=e[t],o=n&&"/"===r;(!n&&":"===r||o)&&i(t)}return i(e.length),RegExp(o,"i");function i(i){let a=e.slice(r,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":a,i===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let oO=!1,oD=[],oP=n5&&window.location.href;function ok(){return oC()}function oC(e=[],t,r=!1){let n,o,i,a,s;if(oO)return new Promise((e,r)=>{oD.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],i=[],a=[],s=(new Date).getTime(),of.forEach(e=>{let t=e.status!==nk&&nj(e);switch(e.status){case nP:t&&s-e.loadErrorTime>=200&&i.push(e);break;case ng:case nb:t&&i.push(e);break;case nv:case n_:!t&&ou[nT(e)]?n.push(e):t&&a.push(e);break;case nE:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:i,appsToMount:a}),p,f=[],h=oP,m=oP=window.location.href;return oT?(oO=!0,p=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===p.length?"before-no-app-change":"before-app-change",v(!0)),w("before-routing-event",v(!0,{cancelNavigation:y})),Promise.all(f).then(r=>{if(r.some(e=>e))return or.call(window.history,history.state,"",h.substring(location.origin.length)),oP=location.href,oO=!1,oC(e,t,!0);let n=l.map(oc),o=Promise.all(u.map(nV).map(e=>e.then(oc)).concat(n));o.then(()=>{w("before-mount-routing-event",v(!0))},e=>{throw e});let i=c.map(e=>n4(e).then(e=>oj(e,o))),a=d.filter(e=>0>c.indexOf(e)).map(e=>oj(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(i.concat(a)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(g).then(()=>{},e=>{throw e})))})))):(p=c,Promise.resolve().then(()=>Promise.all(c.map(n4)).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})));function y(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);f.push(t.catch(e=>(console.warn(Error(nm(42,!1))),console.warn(e),!1)))}function g(){let t=oh();e.forEach(e=>e.resolve(t));try{w(0===p.length?"no-app-change":"app-change",v()),w("routing-event",v())}catch(e){setTimeout(()=>{throw e})}if(oO=!1,oD.length>0){let e=oD;oD=[],oC(e)}return t}function b(){r||(e.forEach(e=>{n8(e.eventArguments)}),n8(t))}function v(e=!1,r){let n={},o={[nE]:[],[n_]:[],[ng]:[],[nk]:[]};e?(c.concat(d).forEach((e,t)=>{a(e,nE)}),l.forEach(e=>{a(e,ng)}),u.forEach(e=>{a(e,n_)})):p.forEach(e=>{a(e)});let i={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:p.length,originalEvent:null==t?void 0:t[0],oldUrl:h,newUrl:m}};return r&&nN(i.detail,r),i;function a(e,t){let r=nT(e);t=t||oy(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new nc(`single-spa:${e}`,t))}}function oj(e,t){return nj(e)?nB(e).then(e=>t.then(()=>nj(e)?nK(e):e)):t.then(()=>e)}let oT=!1;function oR(e){oT=!0,n5&&(oo(e),oC())}function oA(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,"");return oN(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t}).replace(/^\/\//,"/")}function oN(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function oM({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=oA(e,t).replace(window.location.origin,"");n.startsWith(r)?n9(n):window.location.assign(n)}n5&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...of]},reroute:oC,NOT_LOADED:ng,toLoadPromise:n4,toBootstrapPromise:nB,unregisterApplication:ow,getProfilerData:function(){return nF}});let oI="openmrs:history";function o$(e){let t=JSON.parse(sessionStorage.getItem(oI)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(oI,JSON.stringify(t))}function oL(){0===JSON.parse(sessionStorage.getItem(oI)??"[]").length&&document.referrer&&o$(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=oF();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(oI,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?oB({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&o$(window.location.href)})}function oF(){return JSON.parse(sessionStorage.getItem(oI)??"[]")}function oB({toUrl:e}){let t=oF(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);oM({to:t[r]}),sessionStorage.setItem(oI,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function oV(){sessionStorage.removeItem(oI)}let oU="${openmrsSpaBase}/login",oW={redirectAuthFailure:{enabled:{_type:t3.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:t3.String,_default:oU,_validators:[r8.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:t3.Array,_default:[401],_elements:{_type:t3.Number,_validators:[r8.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:t3.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:t3.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function oK(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let oH="/ws/rest/v1",oz="/ws/fhir2/R4",oG=`${oH}/session`;function oq(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function oY(e,t={}){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.");let r=oq(e);if(t.headers||(t.headers={}),eA(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(oH)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(oz)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let n=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:o}=await rI("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(r===oq(oG)||204===e.status)&&oM({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}return r===oq(oG)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(oV(),oM({to:t.url||e.headers.get("location")||oU}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let o=t;try{o=JSON.parse(t)}catch(e){}throw new oJ(r,e,o,n)},t=>{throw new oJ(r,e,null,n)})})}function oZ(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let r=new AbortController;return t.signal=r.signal,new eS(n=>{let o=!1;return oY(e,t).then(e=>{o=!0,n.next(e),n.complete()},e=>{o=!0,n.error(e)}),()=>{o||r.abort()}})}class oJ extends Error{constructor(e,t,r,n){super(),oK(this,"response",void 0),oK(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
13
+ ${n.stack}
14
+ Stacktrace for incoming response:
15
+ ${this.stack}`}}let oX=q("session",{loaded:!1,session:null}),oQ=0;function o0(e={includeAuthStatus:!0}){return(oQ<Date.now()-6e4||!oX.getState().loaded)&&o3(),new eS(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(oX.getState()),oX.subscribe(r)})}function o1(){return(oQ<Date.now()-6e4||!oX.getState().loaded)&&o3(),oX}function o2(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function o3(e,t){oQ=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),ie(oY(oG,{headers:r}))}function o4(){oX.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function o5(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!Q(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!Q(n.privileges.find(t=>e===t.display))):(Q(r)||console.error(`Could not understand privileges "${r}"`),!0))||!Q(t.roles.find(e=>"System Developer"===e.display))}function o6(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(oX.getState()),e||(t=oX.subscribe(n))})}function o7(){return new Promise((e,t)=>{o0().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function o9(e,t){return ie(oY(oG,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function o8(e,t,r){return r||(r=new AbortController),await oY(`${oH}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),o3()}function ie(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},oX.setState(n),t(n)):(n={loaded:!1,session:null},oX.setState(n),r(n))}).catch(e=>{M(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};oX.setState(t),r(t)})})}function it(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}oX.subscribe(e=>{e.loaded&&e.session&&o2(e.session)});let ir={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function io(){rC("@openmrs/esm-api",oW),o3()}let ii={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",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",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.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",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.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var ia=r(17545),is=r(55152),il=r(30414);function iu(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ic(e,t){return(ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function id(e,t){if("function"!=typeof t&&null!==t)throw 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&&ic(e,t)}function ip(e,t){if(t&&("object"==(0,ia.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return iu(e)}function ih(e){return(ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var im=r(24586),iy=r(96488),ig=r(77445),ib=r(5405);function iv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iv(Object(r),!0).forEach(function(t){(0,im.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var i_={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)}},ix=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,is.A)(this,e),this.init(t,r)}return(0,il.A)(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||i_,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=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,iw(iw({},{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}()),iE=function(){function e(){(0,is.A)(this,e),this.observers={}}return(0,il.A)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function iS(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function iO(e){return null==e?"":""+e}function iD(e,t,r){function n(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=n(i.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:n(i.shift())}}function iP(e,t,r){var n=iD(e,t,Object);n.obj[n.k]=r}function ik(e,t){var r=iD(e,t),n=r.obj,o=r.k;if(n)return n[o]}function iC(e,t,r){var n=ik(e,r);return void 0!==n?n:ik(t,r)}function ij(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var iT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function iR(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return iT[e]}):e}var iA="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,iN=[" ",",","?","!",";"];function iM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iM(Object(r),!0).forEach(function(t){(0,im.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var i$=function(e){id(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||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=ih(n);return e=t?Reflect.construct(r,arguments,ih(this).constructor):r.apply(this,arguments),ip(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,is.A)(this,n),t=r.call(this),iA&&iE.call(iu(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,il.A)(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&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,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=ik(this.data,a);return s||!i||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),i=t,a=0;a<o.length;++a){if(!i||"string"==typeof i[o[a]]&&a+1<o.length)return;if(void 0===i[o[a]]){for(var s=2,l=o.slice(a,a+s).join(n),u=i[l];void 0===u&&o.length>a+s;)s++,u=i[l=o.slice(a,a+s).join(n)];if(void 0===u)return;if(null===u)return null;if(r.endsWith(l)){if("string"==typeof u)return u;if(l&&"string"==typeof u[l])return u[l]}var c=o.slice(a+s).join(n);if(c)return e(u,c,n);return}i=i[o[a]]}return i}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){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];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),iP(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);var s=ik(this.data,a)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=iI(iI({},s),r),iP(this.data,a,s),i.silent||this.emit("added",e,t,r)}},{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)?iI(iI({},{}),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}}]),n}(iE),iL={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach(function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))}),t}};function iF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iF(Object(r),!0).forEach(function(t){(0,im.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iF(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iV={},iU=function(e){id(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||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=ih(n);return e=t?Reflect.construct(r,arguments,ih(this).constructor):r.apply(this,arguments),ip(this,e)});function n(e){var t,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,is.A)(this,n),i=r.call(this),iA&&iE.call(iu(i)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=iu(i),t.forEach(function(t){e[t]&&(o[t]=e[t])}),i.options=a,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=ix.create("translator"),i}return(0,il.A)(n,[{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 r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=iN.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,r,n);if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==(0,ia.A)(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),l=s.key,u=s.namespaces,c=u[u.length-1],d=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var f=t.nsSeparator||this.options.nsSeparator;return i?(h.res="".concat(c).concat(f).concat(l),h):"".concat(c).concat(f).concat(l)}return i?(h.res=l,h):l}var h=this.resolve(e,t),m=h&&h.res,y=h&&h.usedKey||l,g=h&&h.exactUsedKey||l,b=Object.prototype.toString.apply(m),v=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(w&&m&&x&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(b)&&("string"!=typeof v||"[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 E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,m,iB(iB({},t),{},{ns:u})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return i?(h.res=E,h):E}if(a){var S="[object Array]"===b,O=S?[]:{},D=S?g:y;for(var P in m)if(Object.prototype.hasOwnProperty.call(m,P)){var k="".concat(D).concat(a).concat(P);O[P]=this.translate(k,iB(iB({},t),{joinArrays:!1,ns:u})),O[P]===k&&(O[P]=m[P])}m=O}}else if(w&&"string"==typeof v&&"[object Array]"===b)(m=m.join(v))&&(m=this.extendTranslation(m,e,t,r));else{var C=!1,j=!1,T=void 0!==t.count&&"string"!=typeof t.count,R=n.hasDefaultValue(t),A=T?this.pluralResolver.getSuffix(d,t.count,t):"",N=t["defaultValue".concat(A)]||t.defaultValue;!this.isValidLookup(m)&&R&&(C=!0,m=N),this.isValidLookup(m)||(j=!0,m=l);var M=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:m,I=R&&N!==m&&this.options.updateMissing;if(j||C||I){if(this.logger.log(I?"updateKey":"missingKey",d,c,l,I?N:m),a){var $=this.resolve(l,iB(iB({},t),{},{keySeparator:!1}));$&&$.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 V=function(e,r,n){var i=R&&n!==m?n:M;o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,r,i,I,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,r,i,I,t),o.emit("missingKey",e,c,r,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?L.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){V([e],l+r,t["defaultValue".concat(r)]||N)})}):V(L,l,N))}m=this.extendTranslation(m,e,t,h,r),j&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(c,":").concat(l)),(j||C)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(l):l,C?m:void 0):this.options.parseMissingKeyHandler(m))}return i?(h.res=m,h):m}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,iB(iB({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(iB(iB({},r),{interpolation:iB(iB({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var u=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(u=iB(iB({},this.options.interpolation.defaultVariables),u)),e=this.interpolator.interpolate(e,u,r.lng||this.language,r),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,p="string"==typeof d?[d]:d;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=iL.handle(p,e,t,this.options&&this.options.postProcessPassResolved?iB({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),u=l.key;r=u;var c=l.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,p=d&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),f=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach(function(e){a.isValidLookup(t)||(i=e,!iV["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(iV["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(h.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!!!")),h.forEach(function(r){if(!a.isValidLookup(t)){o=r;var i,l=[u];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(l,u,r,e,s);else{d&&(c=a.pluralResolver.getSuffix(r,s.count,s));var c,h="".concat(a.options.pluralSeparator,"zero");if(d&&(l.push(u+c),p&&l.push(u+h)),f){var m="".concat(u).concat(a.options.contextSeparator).concat(s.context);l.push(m),d&&(l.push(m+c),p&&l.push(m+h))}}for(;i=l.pop();)a.isValidLookup(t)||(n=i,t=a.getResource(r,e,i,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,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,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(iE);function iW(e){return e.charAt(0).toUpperCase()+e.slice(1)}var iK=function(){function e(t){(0,is.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ix.create("languageUtils")}return(0,il.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))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"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=iW(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=iW(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=iW(r[2].toLowerCase()))),r.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,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))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 r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.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)),n.forEach(function(e){0>o.indexOf(e)&&i(r.formatLanguageCode(e))}),o}}]),e}(),iH=[{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}],iz={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)))},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:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},iG=["v1","v2","v3"],iq={zero:0,one:1,two:2,few:3,many:4,other:5},iY=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,is.A)(this,e),this.languageUtils=t,this.options=n,this.logger=ix.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<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=(r={},iH.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:iz[e.fc]}})}),r)}return(0,il.A)(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]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return iq[e]-iq[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return r.options.prepend&&o.toString()?r.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&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!iG.includes(this.options.compatibilityJSON)}}]),e}();function iZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iJ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iZ(Object(r),!0).forEach(function(t){(0,im.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iX=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,is.A)(this,e),this.logger=ix.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,il.A)(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:iR,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?ij(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?ij(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?ij(t.nestingPrefix):t.nestingPrefixEscaped||ij("$t("),this.nestingSuffix=t.nestingSuffix?ij(t.nestingSuffix):t.nestingSuffixEscaped||ij(")"),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=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(0>e.indexOf(s.formatSeparator)){var o=iC(t,l,e);return s.alwaysFormat?s.format(o,void 0,r,iJ(iJ(iJ({},n),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),u=i.join(s.formatSeparator).trim();return s.format(iC(t,l,a),u,r,iJ(iJ(iJ({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.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 r=o[1].trim();if(void 0===(i=c(r)))if("function"==typeof d){var l=d(e,o,n);i="string"==typeof l?l:""}else if(n&&n.hasOwnProperty(r))i="";else if(p){i=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i="";else"string"==typeof i||s.useRawValueToEscape||(i=iO(i));var u=t.safeValue(i);if(e=e.replace(o[0],u),p?(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 r,n,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=iJ({},i);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=iJ(iJ({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=c.shift(),l=c,u=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=iO(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),u&&(n=l.reduce(function(e,t){return o.format(e,t,i.lng,iJ(iJ({},i),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function iQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iQ(Object(r),!0).forEach(function(t){(0,im.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iQ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i1(e){var t={};return function(r,n,o){var i=n+JSON.stringify(o),a=t[i];return a||(a=e(n,o),t[i]=a),a(r)}}var i2=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,is.A)(this,e),this.logger=ix.create("formatter"),this.options=t,this.formats={number:i1(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:i1(function(e,t){var r=new Intl.NumberFormat(e,i0(i0({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:i1(function(e,t){var r=new Intl.DateTimeFormat(e,i0({},t));return function(e){return r.format(e)}}),relativetime:i1(function(e,t){var r=new Intl.RelativeTimeFormat(e,i0({},t));return function(e){return r.format(e,t.range||"day")}}),list:i1(function(e,t){var r=new Intl.ListFormat(e,i0({},t));return function(e){return r.format(e)}})},this.init(t)}return(0,il.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=i1(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=(t=e.split(":"),(0,iy.A)(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||(0,ig.A)(t)||(0,ib.A)()),o=n[0],i=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=i),"false"===i&&(r[o.trim()]=!1),"true"===i&&(r[o.trim()]=!0),isNaN(i)||(r[o.trim()]=parseInt(i,10))}})}return{formatName:t,formatOptions:r}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var l=e;try{var u=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},c=u.locale||u.lng||n.locale||n.lng||r;l=o.formats[a](e,c,i0(i0(i0({},s),n),u))}catch(e){o.logger.warn(e)}return l}return o.logger.warn("there was no format function for ".concat(a)),e},e)}}]),e}();function i3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i3(Object(r),!0).forEach(function(t){(0,im.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i3(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var i5=function(e){id(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||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=ih(n);return e=t?Reflect.construct(r,arguments,ih(this).constructor):r.apply(this,arguments),ip(this,e)});function n(e,t,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,is.A)(this,n),i=r.call(this),iA&&iE.call(iu(i)),i.backend=e,i.store=t,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=ix.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(o,a.backend,a),i}return(0,il.A)(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i={},a={},s={},l={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===l[t]&&(l[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(r){var n,s,l,u;n=r.loaded,(l=(s=iD(n,[o],Object)).obj)[u=s.k]=l[u]||[],l[u].push(i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=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:r,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[r](e,t,function(s,l){if(n.readingCalls--,n.waitingReads.length>0){var u=n.waitingReads.shift();n.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}s&&l&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*i,a)},i):a(s,l)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=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,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,n,a)})}},{key:"saveMissing",value:function(e,t,r,n,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(r,'" 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==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,i4(i4({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(iE);function i6(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&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function i7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i7(Object(r),!0).forEach(function(t){(0,im.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i7(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i8(){}var ae=function(e){id(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||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=ih(n);return e=t?Reflect.construct(r,arguments,ih(this).constructor):r.apply(this,arguments),ip(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if((0,is.A)(this,n),t=r.call(this),iA&&iE.call(iu(t)),t.options=i6(o),t.services={},t.logger=ix,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=iu(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),i&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,i),ip(t,iu(t));setTimeout(function(){t.init(o,i)},0)}return t}return(0,il.A)(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={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"===(0,ia.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,ia.A)(e[2])||"object"===(0,ia.A)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){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=i9(i9(i9({},n),this.options),i6(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=i9(i9({},n.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){this.modules.logger?ix.init(o(this.modules.logger),this.options):ix.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"u">typeof Intl&&(i=i2);var i,a=new iK(this.options);this.store=new i$(this.options.resources,this.options);var s=this.services;s.logger=ix,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new iY(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i&&(!this.options.interpolation.format||this.options.interpolation.format===n.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 iX(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new i5(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),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 iU(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=i8),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[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 r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var u=iS(),c=function(){var t=function(t,n){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),u.resolve(n),r(t,n)};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?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i8,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>i.indexOf(e)&&i.push(e)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return a(e)}),this.options.preload&&this.options.preload.forEach(function(e){return a(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=iS();return e||(e=this.languages),t||(t=this.options.ns),r||(r=i8),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw 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&&iL.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 r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=iS();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(e,i){i?(o(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},a=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==(0,ia.A)(o)){for(var i,a=arguments.length,s=Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];i=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=i9({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||r||e.keyPrefix;var u=n.options.keySeparator||".",c=i.keyPrefix?"".concat(i.keyPrefix).concat(u).concat(t):t;return n.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,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,r=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 n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=iS();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=iS();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(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]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i8,o=i9(i9(i9({},this.options),t),{isClone:!0}),i=new n(o);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=i9({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new iU(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))}),i.init(o,r),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}}}]),n}(iE);(0,im.A)(ae,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ae(e,t)});var at=ae.createInstance();at.createInstance=ae.createInstance,at.createInstance,at.init,at.loadResources,at.reloadResources,at.use,at.changeLanguage,at.getFixedT,at.t,at.exists,at.setDefaultNamespace,at.hasLoadedNamespace,at.loadNamespaces,at.loadLanguages;let ar=at.default||at;function an(e,t,r,n){return ar.t(t,{ns:e,defaultValue:r,...n})}function ao(e,t,r){return ii[e]?an("core",e,t??ii[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}ar.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let ai="import-map-override:",aa="import-map-overrides-disabled",as="import-map-overrides:change",al=!1,au=null,ac=null;async function ad(){return ac??(ac=ap().then(({map:e,complete:t})=>(t||(ac=null),e))),ac}async function ap(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:af(t),complete:r}}function af(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function ah(){let e={};try{let t=av();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(ai)){let r=n.slice(ai.length);if(!t.includes(r)){let t=localStorage.getItem(n);t&&(e[r]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function am(){let e=await ad();return al?af([e,au??ah()]):e}async function ay(){return ad()}async function ag(){return al?af([await ad(),ah()]):ad()}function ab(e){if(!al)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(ai)){let t=localStorage.getItem(r);t&&(e[r.slice(ai.length)]=t)}}return{imports:e}}return ah()}function av(){if(!al)return[];try{let e=localStorage.getItem(aa);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function aw(e){return!!al&&av().includes(e)}function a_(e,t){if(!al)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(ai+e,t),window.dispatchEvent(new CustomEvent(as))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function ax(e){if(!al)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(ai+e);let t=av().filter(t=>t!==e);t.length>0?localStorage.setItem(aa,JSON.stringify(t)):localStorage.removeItem(aa),window.dispatchEvent(new CustomEvent(as))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function aE(){if(!al)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(ai)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(aa),window.dispatchEvent(new CustomEvent(as))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function aS(e){if(!al)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=av().filter(t=>t!==e);t.length>0?localStorage.setItem(aa,JSON.stringify(t)):localStorage.removeItem(aa),window.dispatchEvent(new CustomEvent(as))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let aO=!1;function aD(){!aO&&(aO=!0,(al="development"===window.spaEnv)&&(au=ah()))}function aP(e){return e.replace(/[\/\-@]/g,"_")}async function ak(e,t="./start",n){var o;let i,a=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([aC(e,n?.importMap),new Promise((t,r)=>{i=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=a)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},a)})]),i&&clearTimeout(i);let s=aP(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(r.S.default);let u=(await l.get(t))();if("object"!=typeof u||null===u){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return u}async function aC(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let r=aP(e);if(!window[r]){let r=t??await aj();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in ab().imports;try{return await function(e){var t;let r=(t=window)[aT]??(t[aT]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let i=new Promise((t,n)=>{let i=setTimeout(()=>{console.error(`The script at ${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);function a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){a(),t()}function l(t){a(),r.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),n(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,i),i}(n)}catch(e){return o&&j({kind:"error",title:ao("scriptLoadingFailed","Error: Script failed to load"),description:ao("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:n}),actionButtonLabel:ao("resetOverrides","Reset overrides"),onActionButtonClick(){aE(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function aj(){return am()}let aT=Symbol.for("__openmrs_script_loading");function aR(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function aA(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&aR(t))}let aN="openmrs-routes:",aM="openmrs-routes:change",aI=!1,a$=null,aL=null;async function aF(){return aL??(aL=aB().then(({map:e,complete:t})=>(t||(aL=null),e))),aL}async function aB(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{let e;if(o.src){let t=await fetch(o.src);if(!t.ok)throw Error(`Request for ${o.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else o.textContent&&(e=JSON.parse(o.textContent));e&&aA(e)&&t.push(e)}catch(e){r=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${n}`,e)}}return{map:aV(t),complete:r}}function aV(e){let t={routes:{}};for(let r of e)r&&"object"==typeof r&&!Array.isArray(r)&&(Object.assign(t.routes,r.routes),void 0===t.version&&void 0!==r.version&&(t.version=r.version));return t}async function aU(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);if(r?.startsWith(aN)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(aN.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(aR(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(aR(n))return{moduleName:e,routes:n};throw Error(`${r} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===r.status?e.routes[r.value.moduleName]=r.value.routes:console.warn("[route-maps] Failed to load route override",r.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function aW(){let e=await aF();return aI?aV([e,a$??await aU()]):e}async function aK(){return aF()}async function aH(){return aI?aV([await aF(),await aU()]):aF()}function az(){if(!aI)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(aN)){let t=localStorage.getItem(r);t&&(e[r.slice(aN.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function aG(e,t){if(!aI)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(aN+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!aR(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(aN+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(aN+e,JSON.stringify(t.toString()));else{if(!aR(t))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t);localStorage.setItem(aN+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(aM))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function aq(e){if(!aI)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(aN+e),window.dispatchEvent(new CustomEvent(aM))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function aY(){if(!aI)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(aN)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(aM))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let aZ=null;function aJ(){return aZ||(aZ=(aI="development"===window.spaEnv)?aU().then(e=>{a$=e}):Promise.resolve())}let aX=`${oH}/attachment`;function aQ(e,t){return oY(`${aX}/${e}`,{signal:t.signal})}function a0(e,t,r){return oY(`${aX}?patient=${e}&includeEncounterless=${t}`,{signal:r.signal})}async function a1(e,t){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),oY(`${aX}`,{method:"POST",body:r})}function a2(e,t){return oY(`${aX}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function a3(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function a4(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var a6=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function a7(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var a9=function(e,t){this.type=e,Object.assign(this,t)};function a8(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function se(){}var st={type:"SKIP_WAITING"};function sr(e,t){if(!t)return e&&e.then?e.then(se):Promise.resolve()}var sn=function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new a6,n.en=new a6,n.on=new a6,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!a7(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new a9(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new a9("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new a9("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return a8(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new a9("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=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)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return sr(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),a8(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&a7(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new a9("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?sr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return a8(this.getSW(),function(t){return a3(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&a3(this.fn.waiting,st)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&a7(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return a8(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)}},r=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],a4(t.prototype,r),n&&a4(t,n),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return a5(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a5(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).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}());function so(e,t){if(void 0!==p)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),p;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let r=new sn(e,t);return p=r.register().then(()=>r.controlling.then(()=>r))}function si(){return p??Promise.resolve(void 0)}let sa="x-omrs-offline-response-body",ss="x-omrs-offline-response-status",sl="x-omrs-offline-caching-strategy";async function su(e){let t=await si();return t?await t.messageSW(e):{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."}}async function sc(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function sd(){return!window.indexedDB}async function sp(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function sf(){return await sp()||await sd()||await sc()}let sh="openmrs3:offline-mode",sm="unavailable";function sy(){return{current:sm,notAvailable:"unavailable"===sm,active:"on"===sm}}function sg(e){"unavailable"!==sm&&"unavailable"!==e&&(localStorage.setItem(sh,"on"===e?"active":"disabled"),sm=e)}async function sb(){await sf()||(sm="active"===localStorage.getItem(sh)?"on":"off"),navigator.onLine}let sv="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,sw=Object.keys,s_=Array.isArray;function sx(e,t){return"object"!=typeof t||sw(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||sv.Promise||(sv.Promise=Promise);let sE=Object.getPrototypeOf,sS={}.hasOwnProperty;function sO(e,t){return sS.call(e,t)}function sD(e,t){"function"==typeof t&&(t=t(sE(e))),("u"<typeof Reflect?sw:Reflect.ownKeys)(t).forEach(r=>{sk(e,r,t[r])})}let sP=Object.defineProperty;function sk(e,t,r,n){sP(e,t,sx(r&&sO(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function sC(e){return{from:function(t){return e.prototype=Object.create(t.prototype),sk(e.prototype,"constructor",e),{extend:sD.bind(null,e.prototype)}}}}let sj=Object.getOwnPropertyDescriptor;function sT(e,t){let r;return sj(e,t)||(r=sE(e))&&sT(r,t)}let sR=[].slice;function sA(e,t,r){return sR.call(e,t,r)}function sN(e,t){return t(e)}function sM(e){if(!e)throw Error("Assertion Failed")}function sI(e){sv.setImmediate?setImmediate(e):setTimeout(e,0)}function s$(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function sL(e,t){if("string"==typeof t&&sO(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=sL(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:sL(s,t.substr(a+1))}}function sF(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){sM("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)sF(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?s_(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&sO(e,a)||(l=e[a]={}),sF(l,s,r)}}else void 0===r?s_(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function sB(e){var t={};for(var r in e)sO(e,r)&&(t[r]=e[r]);return t}let sV=[].concat;function sU(e){return sV.apply([],e)}let sW="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(sU([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>sv[e]),sK=sW.map(e=>sv[e]);s$(sW,e=>[e,!0]);let sH=null;function sz(e){sH="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=sH&&sH.get(t);if(r)return r;if(s_(t)){r=[],sH&&sH.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(sK.indexOf(t.constructor)>=0)r=t;else{let n=sE(t);for(var i in r=n===Object.prototype?{}:Object.create(n),sH&&sH.set(t,r),t)sO(t,i)&&(r[i]=e(t[i]))}return r}(e);return sH=null,t}let{toString:sG}={};function sq(e){return sG.call(e).slice(8,-1)}let sY="u">typeof Symbol?Symbol.iterator:"@@iterator",sZ="symbol"==typeof sY?function(e){var t;return null!=e&&(t=e[sY])&&t.apply(e)}:function(){return null},sJ={};function sX(e){var t,r,n,o;if(1==arguments.length){if(s_(e))return e.slice();if(this===sJ&&"string"==typeof e)return[e];if(o=sZ(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let sQ="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var s0="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),s1=()=>!0;let s2=!Error("").stack;function s3(){if(s2)try{throw s3.arguments,Error()}catch(e){return e}return Error()}function s4(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(s1).map(e=>"\n"+e).join("")):""}var s5=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],s6=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(s5),s7={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function s9(e,t){this._e=s3(),this.name=e,this.message=t}function s8(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function le(e,t,r,n){this._e=s3(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=s8(e,t)}function lt(e,t){this._e=s3(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=s8(e,t)}sC(s9).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+s4(this._e,2))}},toString:function(){return this.name+": "+this.message}}),sC(le).from(s9),sC(lt).from(s9);var lr=s6.reduce((e,t)=>(e[t]=t+"Error",e),{}),ln=s6.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=s3(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=s7[t]||r,this.inner=null)}return sC(n).from(s9),e[t]=n,e},{});ln.Syntax=SyntaxError,ln.Type=TypeError,ln.Range=RangeError;var lo=s5.reduce((e,t)=>(e[t+"Error"]=ln[t],e),{}),li=s6.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ln[t]),e),{});function la(){}function ls(e){return e}function ll(e,t){return null==e||e===ls?t:function(r){return t(e(r))}}function lu(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function lc(e,t){return e===la?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?lu(n,this.onsuccess):n),o&&(this.onerror=this.onerror?lu(o,this.onerror):o),void 0!==i?i:r}}function ld(e,t){return e===la?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?lu(r,this.onsuccess):r),n&&(this.onerror=this.onerror?lu(n,this.onerror):n)}}function lp(e,t){return e===la?t:function(r){var n=e.apply(this,arguments);sx(r,n);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?lu(o,this.onsuccess):o),i&&(this.onerror=this.onerror?lu(i,this.onerror):i),void 0===n?void 0===a?void 0:a:sx(n,a)}}function lf(e,t){return e===la?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function lh(e,t){return e===la?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}li.ModifyError=le,li.DexieError=s9,li.BulkError=lt;var lm={};let[ly,lg,lb]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,sE(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,sE(t),e]})(),lv=lg&&lg.then,lw=ly&&ly.constructor,l_=!!lb;var lx=!1,lE=lb?()=>{lb.then(lK)}:sv.setImmediate?setImmediate.bind(null,lK):sv.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{lK(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(lK,0)},lS=function(e,t){lA.push([e,t]),lD&&(lE(),lD=!1)},lO=!0,lD=!0,lP=[],lk=[],lC=null,lj=ls,lT={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:uo,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{uo(e[0],e[1])}catch(e){}})}},lR=lT,lA=[],lN=0,lM=[];function lI(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=la,this._lib=!1;var t=this._PSD=lR;if(s0&&(this._stackHolder=s3(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==lm)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&lF(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&lH();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof lI?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,lB(t)),n&&lz()}},lF.bind(null,t))}catch(e){lF(t,e)}}(this,e)}let l$={get:function(){var e=lR,t=l0;function r(r,n){var o=!e.global&&(e!==lR||t!==l0);let i=o&&!l4();var a=new lI((t,a)=>{lV(this,new lL(ut(r,e,o,i),ut(n,e,o,i),t,a,e))});return s0&&lW(a,this),a}return r.prototype=lm,r},set:function(e){sk(this,"then",e&&e.prototype===lm?l$:{get:function(){return e},set:l$.set})}};function lL(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function lF(e,t){if(lk.push(t),null===e._state){var r=e._lib&&lH();t=lj(t),e._state=!1,e._value=t,s0&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=sT(t,"stack");t._promise=e,sk(t,"stack",{get:()=>lx?r&&(r.get?r.get.apply(t):r.value):e.stack})}),lP.some(t=>t._value===e._value)||lP.push(e),lB(e),r&&lz()}}function lB(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)lV(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===lN&&(++lN,lS(()=>{0==--lN&&lG()},[]))}function lV(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++lN,lS(lU,[r,e,t])}else e._listeners.push(t)}function lU(e,t,r){try{lC=t;var n,o=t._value;t._state?n=e(o):(lk.length&&(lk=[]),n=e(o),-1===lk.indexOf(o)&&function(e){for(var t=lP.length;t;)if(lP[--t]._value===e._value)return void lP.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{lC=null,0==--lN&&lG(),--r.psd.ref||r.psd.finalize()}}function lW(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function lK(){lH()&&lz()}function lH(){var e=lO;return lO=!1,lD=!1,e}function lz(){var e,t,r;do for(;lA.length>0;)for(e=lA,lA=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(lA.length>0);lO=!0,lD=!0}function lG(){var e=lP;lP=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=lM.slice(0),r=t.length;r;)t[--r]()}function lq(e){return new lI(lm,!1,e)}function lY(e,t){var r=lR;return function(){var n=lH(),o=lR;try{return l9(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{l9(o,!1),n&&lz()}}}sD(lI.prototype,{then:l$,_then:function(e,t){lV(this,new lL(null,null,e,t,lR))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):lq(e)):this.then(null,e=>e&&e.name===t?r(e):lq(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),lq(t)))},stack:{get:function(){if(this._stack)return this._stack;try{lx=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=s4(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return s0&&((o=s4(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{lx=!1}}},timeout:function(e,t){return e<1/0?new lI((r,n)=>{var o=setTimeout(()=>n(new ln.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&sk(lI.prototype,Symbol.toStringTag,"Dexie.Promise"),lT.env=l8(),sD(lI,{all:function(){var e=sX.apply(null,arguments).map(l5);return new lI(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>lI.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof lI)return e;if(e&&"function"==typeof e.then)return new lI((t,r)=>{e.then(t,r)});var t=new lI(lm,!0,e);return lW(t,lC),t},reject:lq,race:function(){var e=sX.apply(null,arguments).map(l5);return new lI((t,r)=>{e.map(e=>lI.resolve(e).then(t,r))})},PSD:{get:()=>lR,set:e=>lR=e},totalEchoes:{get:()=>l0},newPSD:l2,usePSD:ue,scheduler:{get:()=>lS,set:e=>{lS=e}},rejectionMapper:{get:()=>lj,set:e=>{lj=e}},follow:(e,t)=>new lI((r,n)=>l2((t,r)=>{var n=lR;n.unhandleds=[],n.onunhandled=r,n.finalize=lu(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},lM.push(function t(){e(),lM.splice(lM.indexOf(t),1)}),++lN,lS(()=>{0==--lN&&lG()},[])},n.finalize),e()},t,r,n))}),lw&&(lw.allSettled&&sk(lI,"allSettled",function(){let e=sX.apply(null,arguments).map(l5);return new lI(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>lI.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),lw.any&&"u">typeof AggregateError&&sk(lI,"any",function(){let e=sX.apply(null,arguments).map(l5);return new lI((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>lI.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let lZ={awaits:0,echoes:0,id:0};var lJ=0,lX=[],lQ=0,l0=0,l1=0;function l2(e,t,r,n){var o=lR,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++l1;var a=lT.env;i.env=l_?{Promise:lI,PromiseProp:{value:lI,configurable:!0,writable:!0},all:lI.all,race:lI.race,allSettled:lI.allSettled,any:lI.any,resolve:lI.resolve,reject:lI.reject,nthen:ur(a.nthen,i),gthen:ur(a.gthen,i)}:{},t&&sx(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=ue(i,e,r,n);return 0===i.ref&&i.finalize(),s}function l3(){return lZ.id||(lZ.id=++lJ),++lZ.awaits,lZ.echoes+=100,lZ.id}function l4(){return!!lZ.awaits&&(0==--lZ.awaits&&(lZ.id=0),lZ.echoes=100*lZ.awaits,!0)}function l5(e){return lZ.echoes&&e&&e.constructor===lw?(l3(),e.then(e=>(l4(),e),e=>(l4(),ui(e)))):e}function l6(e){++l0,lZ.echoes&&0!=--lZ.echoes||(lZ.echoes=lZ.id=0),lX.push(lR),l9(e,!0)}function l7(){var e=lX[lX.length-1];lX.pop(),l9(e,!1)}function l9(e,t){var r,n=lR;if((t?!lZ.echoes||lQ++&&e===lR:!lQ||--lQ&&e===lR)||(r=t?l6.bind(null,e):l7,lv.call(ly,r)),e!==lR&&(lR=e,n===lT&&(lT.env=l8()),l_)){var o=lT.env.Promise,i=e.env;lg.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(sv,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function l8(){var e=sv.Promise;return l_?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(sv,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:lg.then,gthen:e.prototype.then}:{}}function ue(e,t,r,n,o){var i=lR;try{return l9(e,!0),t(r,n,o)}finally{l9(i,!1)}}function ut(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=lR;r&&l3(),l9(t,!0);try{return e.apply(this,arguments)}finally{l9(i,!1),n&&(o=l4,lv.call(ly,o))}}}function ur(e,t){return function(r,n){return e.call(this,ut(r,t),ut(n,t))}}-1===(""+lv).indexOf("[native code]")&&(l3=l4=la);let un="unhandledrejection";function uo(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(sv.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(un,!0,!0),sx(n,o)):sv.CustomEvent&&sx(n=new CustomEvent(un,{detail:o}),o),n&&sv.dispatchEvent&&(dispatchEvent(n),!sv.PromiseRejectionEvent&&sv.onunhandledrejection))try{sv.onunhandledrejection(n)}catch(e){}s0&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var ui=lI.reject;let ua="3.2.7",us=String.fromCharCode(65535),ul=-1/0,uu="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",uc="String expected.",ud=[],up="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),uf=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),uh="__dbnames",um="readonly",uy="readwrite";function ug(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let ub={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function uv(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=sz(t))[e],t)}class uw{_trans(e,t,r){let n=this._tx||lR.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new ln.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=lH();try{return n&&n.db===this.db?n===lR.trans?n._promise(e,i,r):l2(()=>n._promise(e,i,r),{trans:n,transless:lR.transless||lR}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||lR.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===lr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):ui(i)}return i._promise(r,(e,t)=>l2(()=>(lR.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return ui(new ln.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return ui(new ln.DatabaseClosed);t.open().catch(la)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&lz()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(s_(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=sw(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(r&&this.db._maxKey!==us){let n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map(t=>e[t]))}!r&&s0&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?ug(r,a&&a.multi?e=>{let t=sL(e,o);return s_(t)&&t.some(e=>i(s,e))}:e=>i(s,sL(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,s_(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(sO(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){sx(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=uv(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?lI.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{sF(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||s_(e))return this.where(":id").equals(e).modify(t);{let r=sL(e,this.schema.primKey.keyPath);if(void 0===r)return ui(new ln.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?sw(t).forEach(r=>{sF(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=uv(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?lI.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{sF(e,n,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?lI.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:ub})).then(e=>e.numFailures?lI.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new ln.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new ln.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(uv(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new lt(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new ln.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new ln.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(uv(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new lt(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new lt(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function u_(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"!=typeof e){n||(n=lf),o||(o=la);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=n(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter(function(t){return t!==e}),a.fire=a.subscribers.reduce(n,o)}};return t[e]=r[e]=a,a}sw(e).forEach(function(t){var r=e[t];if(s_(r))i(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new ln.InvalidArgument("Invalid event config");var n=i(t,ls,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){sI(function(){e.apply(null,t)})})})}})}}function ux(e,t){return sC(t).from({prototype:e}),t}function uE(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function uS(e,t){e.filter=ug(e.filter,t)}function uO(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>ug(n(),t()):t,e.justLimit=r&&!n}function uD(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new ln.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function uP(e,t,r){let n=uD(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function uk(e,t,r,n){let o=e.replayFilter?ug(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),sO(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),uC(uP(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return uC(uP(e,n,r),ug(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function uC(e,t,r,n){var o=lY(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=la},t=>{e.fail(t),r=la})||o(e.value,e,e=>r=e),r()})})}function uj(e,t){try{let r=uT(e),n=uT(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(uR(e),uR(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=uj(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function uT(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=sq(e);return"ArrayBuffer"===r?"binary":r}function uR(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class uA{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,ui.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,ui.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=ug(t.algorithm,e)}_iterate(e,t){return uk(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&sx(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>uk(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(uE(t,!0))return r.count({trans:e,query:{index:uD(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return uk(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&uE(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=uD(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return uk(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,uE(t)?uO(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):uO(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),uO(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return uS(this._ctx,function(r,n,o){return!e(r.value)||(n(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return uS(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=ug(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.key,r)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&uE(t,!0)&&t.limit>0)return this._read(e=>{var r=uD(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return uS(this._ctx,function(e){var t=e.primaryKey.toString(),n=sO(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=sw(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];sL(t,a)!==s&&(sF(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,p=[],f=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,sw(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(p=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=p[e],r={value:sz(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?g.push(o[c+e]):s||0===uj(l(t),l(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(r.value)))}let b=uE(t)&&t.limit===1/0&&("function"!=typeof e||e===uN)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);f(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(m.length,e))).then(()=>(g.length>0||b&&e===uN)&&a.mutate({trans:r,type:"delete",keys:g,criteria:b}).then(e=>f(g.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new le("Error modifying one or more objects",c,d,p);return o.length})})})}delete(){var e=this._ctx,t=e.range;return uE(e)&&(e.isPrimKey&&!up||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new le("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(uN)}}let uN=(e,t)=>t.value=null;function uM(e,t){return e<t?-1:+(e!==t)}function uI(e,t){return e>t?-1:+(e!==t)}function u$(e,t,r){var n=e instanceof uU?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function uL(e){return new e.Collection(e,()=>uV("")).limit(0)}function uF(e,t,r,n){var o,i,a,s,l,u,c,d=r.length;if(!r.every(e=>"string"==typeof e))return u$(e,uc);function p(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?uM:uI;var t=r.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":n}p("next");var f=new e.Collection(e,()=>uB(s[0],l[d-1]+n));f._ondirectionchange=function(e){p(e)};var h=0;return f._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,l,h))return!0;for(var f=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==n[l])return 0>o(e[l],r[l])?e.substr(0,l)+r[l]+r.substr(l+1):0>o(e[l],n[l])?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,p,s[m],l[m],a,u);null===y&&null===f?h=m+1:(null===f||a(f,y)>0)&&(f=y)}return r(null!==f?function(){e.continue(f+c)}:n),!1}),f}function uB(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function uV(e){return{type:1,lower:e,upper:e}}class uU{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?uL(this):new this.Collection(this,()=>uB(e,t,!r,!n))}catch(e){return u$(this,uu)}}equals(e){return null==e?u$(this,uu):new this.Collection(this,()=>uV(e))}above(e){return null==e?u$(this,uu):new this.Collection(this,()=>uB(e,void 0,!0))}aboveOrEqual(e){return null==e?u$(this,uu):new this.Collection(this,()=>uB(e,void 0,!1))}below(e){return null==e?u$(this,uu):new this.Collection(this,()=>uB(void 0,e,!1,!0))}belowOrEqual(e){return null==e?u$(this,uu):new this.Collection(this,()=>uB(void 0,e))}startsWith(e){return"string"!=typeof e?u$(this,uc):this.between(e,e+us,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):uF(this,(e,t)=>0===e.indexOf(t[0]),[e],us)}equalsIgnoreCase(e){return uF(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=sX.apply(sJ,arguments);return 0===e.length?uL(this):uF(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=sX.apply(sJ,arguments);return 0===e.length?uL(this):uF(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,us)}anyOf(){let e=sX.apply(sJ,arguments),t=this._cmp;try{e.sort(t)}catch(e){return u$(this,uu)}if(0===e.length)return uL(this);let r=new this.Collection(this,()=>uB(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[ul,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=sX.apply(sJ,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return u$(this,uu)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[ul,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return uL(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return u$(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ln.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=n;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return u$(this,uu)}let p=0,f=l?e=>n(e,u[p][1])>0:e=>n(e,u[p][1])>=0,h=s?e=>o(e,u[p][0])>0:e=>o(e,u[p][0])>=0,m=f,y=new this.Collection(this,()=>uB(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=f,c=n):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++p===u.length)return t(r),!1;return!!(!f(o)&&!h(o))||(0===this._cmp(o,u[p][1])||0===this._cmp(o,u[p][0])||t(()=>{c===n?e.continue(u[p][0]):e.continue(u[p][1])}),!1)}),y}startsWithAnyOf(){let e=sX.apply(sJ,arguments);return e.every(e=>"string"==typeof e)?0===e.length?uL(this):this.inAnyRange(e.map(e=>[e,e+us])):u$(this,"startsWithAnyOf() only works with strings")}}function uW(e){return lY(function(t){return uK(t),e(t.target.error),!1})}function uK(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let uH="storagemutated",uz="x-storagemutated-1",uG=u_(null,uH);class uq{_lock(){return sM(!lR.global),++this._reculock,1!==this._reculock||lR.global||(lR.lockOwnerFor=this),this}_unlock(){if(sM(!lR.global),0==--this._reculock)for(lR.global||(lR.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{ue(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&lR.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(sM(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new ln.DatabaseClosed(r);case"MissingAPIError":throw new ln.MissingAPI(r.message,r);default:throw new ln.OpenFailed(r)}if(!this.active)throw new ln.TransactionInactive;return sM(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=lY(t=>{uK(t),this._reject(e.error)}),e.onabort=lY(t=>{uK(t),this.active&&this._reject(new ln.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=lY(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&uG.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return ui(new ln.ReadOnly("Transaction is readonly"));if(!this.active)return ui(new ln.TransactionInactive);if(this._locked())return new lI((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},lR])});if(r)return l2(()=>{var e=new lI((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new lI((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=lI.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new lI((e,n)=>{r.then(r=>t._waitingQueue.push(lY(e.bind(null,r))),e=>t._waitingQueue.push(lY(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ln.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(sO(t,e))return t[e];let r=this.schema[e];if(!r)throw new ln.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function uY(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+uZ(t)}}function uZ(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function uJ(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:s$(r,e=>[e.name,e])}}let uX=e=>{try{return e.only([[]]),uX=()=>[[]],[[]]}catch(e){return uX=()=>us,us}};function uQ(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>sL(t,e):t=>sL(t,e)}function u0(e){return[].slice.call(e)}let u1=0;function u2(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function u3({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=u0(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=s_(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:uQ(t)},indexes:u0(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:s_(o),keyPath:o,unique:r,multiEntry:n,extractKey:uQ(o)};return i[u2(o)]=a,a}),getIndexByKeyPath:e=>i[u2(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[u2(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,l)=>{let u;s=lY(s);let c=e.objectStore(t),d=null==c.keyPath,p="put"===r||"add"===r;if(!p&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:f}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,uK(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=p?d?[i,n]:[i,null]:[n,null];if(p)for(let n=0;n<f;++n)h.push(u=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),u.onerror=g;else for(let t=0;t<f;++t)h.push(u=c[r](e[t])),u.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{g(e),b(e)},u.onsuccess=b})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=lY(n);let i=e.objectStore(t),a=r.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&n(s)},p=uW(o);for(let e=0;e<a;++e)null!=r[e]&&((l=i.get(r[e]))._pos=e,l.onsuccess=d,l.onerror=p,++u);0===u&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=lY(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=uW(o)}),query:e=>new Promise((r,n)=>{r=lY(r);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:p}=u,f=i.objectStore(t),h=d.isPrimaryKey?f:f.index(d.name),m=o(p);if(0===l)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=uW(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?r({result:o}):void i.continue()):r({result:o})},t.onerror=uW(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,l)=>{s=lY(s);let{index:u,range:c}=n,d=e.objectStore(t),p=u.isPrimaryKey?d:d.index(u.name),f=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in p?p.openKeyCursor(o(c),f):p.openCursor(o(c),f);h.onerror=uW(l),h.onsuccess=lY(t=>{let r=h.result;if(!r)return void s(null);r.___id=++u1,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=lY(l),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=lY(e),h.onerror=uW(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=lY(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},l)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),l=n.isPrimaryKey?s:s.index(n.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=lY(t=>e(t.target.result)),c.onerror=uW(a)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:uX(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function u4({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=sT(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?sk(t,r,{get(){return this.table(r)},set(e){sP(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function u5({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function u6(e,t){return e._cfg.version-t._cfg.version}function u7(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||up)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}else e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function u9(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>u8(o,e)),o}function u8(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function ce(e,t,r){let n={};return sA(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=uY(uZ(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=uY(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=uJ(e,i,a)}),n}function ct({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+sA(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&sv.WorkerGlobalScope&&sv instanceof sv.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class cr{_parseStoresSpec(e,t){sw(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return uY(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),s_(n),0===t)}),o=n.shift();if(o.multi)throw new ln.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new ln.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ln.Schema("Index must have a name and cannot be an empty string")}),t[r]=uJ(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?sx(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{sx(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,u5(t,[t._allTables,t,t.Transaction.prototype]),u4(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],sw(o),o),t._storeNames=sw(o),this}upgrade(e){return this._cfg.contentUpgrade=lh(this._cfg.contentUpgrade||la,e),this}}function cn(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new cx(uh,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function co(e){return e&&"function"==typeof e.databases}function ci(e){return l2(function(){return lR.letThrough=!0,e()})}function ca(e){var t=t=>e.next(t),r=o(t),n=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(r,n):s_(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function cs(e,t,r){var n=arguments.length;if(n<2)throw new ln.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,sU(o),r]}function cl(e,t,r){let n=s_(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let cu={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=u2(e),s=o[n]=o[n]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...r,isVirtual:u,keyTail:t,keyLength:l,extractKey:uQ(e),unique:!u&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function l(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:cl(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:cl(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[u2(e)];return t&&t[0]}},count:e=>r.count(l(e)),query:e=>r.query(l(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(l(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(cl(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(cl(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function cc(e,t,r,n){return r=r||{},n=n||"",sw(e).forEach(o=>{if(sO(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=sq(i);e!==sq(a)?r[n+o]=t[o]:"Object"===e?cc(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),sw(t).forEach(o=>{sO(e,o)||(r[n+o]=t[o])}),r}let cd={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=lR.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===la)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===la&&s.fire===la)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===la)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===la)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>l({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function l(e){var t,o;let l=lR.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((r,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,r,e.values[o],l);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||sF(e.values[o],n.keyPath,r))}else{let t=cc(u,e.values[o]),n=s.fire.call(c,t,r,u,l);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{sO(t,e)?t[e]=n[e]:sF(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=n?n[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function cp(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===uj(t.keys[o],e[i])&&(n.push(r?sz(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let cf={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=cp(e.keys,e.trans._cache,"clone"===e.cache);return t?lI.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?sz(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function ch(e){return!("from"in e)}let cm=function(e,t){if(!this){let t=new cm;return e&&"d"in e&&sx(t,e),t}sx(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function cy(e,t,r){let n=uj(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(ch(e))return sx(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>uj(r,e.from))return o?cy(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},cv(e);if(uj(t,e.to)>0)return i?cy(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},cv(e);0>uj(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),uj(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&cg(e,o),i&&a&&cg(e,i)}function cg(e,t){ch(t)||function e(t,{from:r,to:n,l:o,r:i}){cy(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function cb(e){let t=ch(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>uj(e,t.n.from);)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,!r||0>=uj(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function cv(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=cw(r)}e.d=cw(e)}function cw({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}sD(cm.prototype,{add(e){return cg(this,e),this},addKey(e){return cy(this,e,e),this},addKeys(e){return e.forEach(e=>cy(this,e,e)),this},[sY](){return cb(this)}});let c_={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new cm(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new cm)},u=l(""),c=l(":dels"),{type:d}=e,[p,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(s_(p)){"delete"!==d&&(p=e.results),u.addKeys(p);let t=cp(p,h);t||"add"===d||c.addKeys(p),(t||f)&&i.indexes.forEach(function(e){let r=l(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&s_(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||f).forEach((e,r)=>{let i=t&&n(t[r]),a=f&&n(f[r]);0!==uj(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(p){let e={from:p.lower,to:p.upper};c.add(e),u.add(e)}else u.add(r),c.add(r),i.indexes.forEach(e=>l(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new cm(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new cm(e.key)],getMany:e=>[a,(new cm).addKeys(e.keys)],count:c,query:c,openCursor:c};return sw(d).forEach(e=>{u[e]=function(i){let{subscr:a}=lR;if(a){let u=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new cm)},c=u(""),p=u(":dels"),[f,h]=d[e](i);if(u(f.name||"").add(h),!f.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):p.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(p.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return p.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}p.add(r)}}return o[e].apply(this,arguments)}}),u}}}};class cx{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=cx.dependencies;this._options=t={addons:cx.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:la,dbReadyPromise:null,cancelOpen:la,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new lI(e=>{i.dbReadyResolve=e}),i.openCanceller=new lI((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=u_(this,"populate","blocked","versionchange","close",{ready:[lh,la]}),this.on.ready.subscribe=sN(this.on.ready.subscribe,e=>(t,r)=>{cx.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||lI.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,ux(uA.prototype,function(e,t){this.db=r;let n=ub,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==ls?s:null}})),this.Table=function(e){return ux(uw.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:u_(null,{creating:[lc,la],reading:[ll,ls],updating:[lp,la],deleting:[ld,la]})})}(this),this.Transaction=function(e){return ux(uq.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=u_(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 lI((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),ui(e)})})}(this),this.Version=function(e){return ux(cr.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return ux(uU.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new ln.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=uX(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),ud.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(cu),this.use(cd),this.use(c_),this.use(cf),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new ln.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ln.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(u6),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||lR.letThrough||this._vip)?e():new lI((e,t)=>{if(this._state.openComplete)return t(new ln.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ln.DatabaseClosed);this.open().catch(la)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?ui(r.dbOpenError):e);s0&&(r.openCanceller._stackHolder=s3()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new ln.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,l=!1,u=()=>new lI((t,o)=>{if(i(),!n)throw new ln.MissingAPI;let a=e.name,u=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!u)throw new ln.MissingAPI;u.onerror=uW(o),u.onblocked=lY(e._fireOnBlocked),u.onupgradeneeded=lY(t=>{if(s=u.transaction,r.autoSchema&&!e._options.allowEmptyDB){u.onerror=uK,s.abort(),u.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=lY(()=>{o(new ln.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,p;s.onerror=uW(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),p=lR.transless||lR,l2(()=>{lR.trans=n,lR.transless=p,0===i?(sw(r).forEach(e=>{u9(c,e,r[e].primKey,r[e].indexes)}),u3(e,c),lI.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=ce(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;ct(e,o,n),ct(e,l,n),a=e._dbSchema=l;let u=u7(o,l);u.add.forEach(e=>{u9(n,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new ln.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>u8(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),u8(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;u3(e,n),r._memoizedTables={},s=!0;let i=sB(l);u.del.forEach(e=>{i[e]=o[e]}),u5(e,[e.Transaction.prototype]),u4(e,[e.Transaction.prototype],sw(i),i),r.schema=i;let a=sQ(c);a&&l3();let d=lI.follow(()=>{if((t=c(r))&&a){var e=l4.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?lI.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&up||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),u5(e,[e.Transaction.prototype]),u4(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?lI.resolve(o.shift()(r.idbtrans)).then(e):lI.resolve()})().then(()=>{var e;sw(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||u9(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),u.onsuccess=lY(()=>{s=null;let n=e._novip.idbdb=u.result,o=sA(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=ce(0,t,r);e._storeNames=sA(t.objectStoreNames,0),u4(e,[e._allTables],sw(n),n)}(e,n,i):(ct(e,e._dbSchema,i),((t=u7(ce(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),u3(e,i)}catch(e){}ud.push(e),n.onversionchange=lY(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=lY(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},r){co(e)||r===uh||cn(e,t).put({name:r}).catch(la)}(e._deps,a),t()},o)}).catch(e=>e&&"UnknownError"===e.name&&r.PR1398_maxLoop>0?(r.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),u()):lI.reject(e));return lI.race([o,("u"<typeof navigator?lI.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(u)]).then(()=>(i(),r.onReadyBeingFired=[],lI.resolve(ci(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(lh,la);return r.onReadyBeingFired=[],lI.resolve(ci(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),ui(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=ud.indexOf(this);if(t>=0&&ud.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new lI(t=>{e.dbReadyResolve=t}),e.openCanceller=new lI((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ln.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new lI((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=lY(()=>{!function({indexedDB:e,IDBKeyRange:t},r){co(e)||r===uh||cn(e,t).delete(r).catch(la)}(this._deps,this.name),r()}),e.onerror=uW(n),e.onblocked=this._fireOnBlocked};if(e)throw new ln.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return sw(this._allTables).map(e=>this._allTables[e])}transaction(){let e=cs.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=lR.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===um)n=um;else{if("rw"!=e&&e!=uy)throw new ln.InvalidArgument("Invalid transaction mode: "+e);n=uy}if(i){if(i.mode===um&&n===uy){if(!a)throw new ln.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new ln.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):ui(e)}let s=(function e(t,r,n,o,i){return lI.resolve().then(()=>{let a,s=lR.transless||lR,l=t._createTransaction(r,n,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===lr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):ui(o)}let u=sQ(i);u&&l3();let c=lI.follow(()=>{if(a=i.call(l,l))if(u){var e=l4.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=ca(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?lI.resolve(a).then(e=>l.active?e:ui(new ln.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),ui(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):lR.trans?ue(lR.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!sO(this._allTables,e))throw new ln.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let cE="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class cS{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[cE](){return this}}function cO(e,t){return sw(t).forEach(r=>{cg(e[r]||(e[r]=new cm),t[r])}),e}try{i={indexedDB:sv.indexedDB||sv.mozIndexedDB||sv.webkitIndexedDB||sv.msIndexedDB,IDBKeyRange:sv.IDBKeyRange||sv.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function cD(e){let t=cP;try{cP=!0,uG.storagemutated.fire(e)}finally{cP=t}}sD(cx,{...li,delete:e=>new cx(e,{addons:[]}).delete(),exists:e=>new cx(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return co(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==uh)):cn(e,t).toCollection().primaryKeys()})(cx.dependencies).then(e)}catch(e){return ui(new ln.MissingAPI)}},defineClass:()=>function(e){sx(this,e)},ignoreTransaction:e=>lR.trans?ue(lR.transless,e):e(),vip:ci,async:function(e){return function(){try{var t=ca(e.apply(this,arguments));return t&&"function"==typeof t.then?t:lI.resolve(t)}catch(e){return ui(e)}}},spawn:function(e,t,r){try{var n=ca(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:lI.resolve(n)}catch(e){return ui(e)}},currentTransaction:{get:()=>lR.trans||null},waitFor:function(e,t){let r=lI.resolve("function"==typeof e?cx.ignoreTransaction(e):e).timeout(t||6e4);return lR.trans?lR.trans.waitFor(r):r},Promise:lI,debug:{get:()=>s0,set:e=>{s0=e,s1="dexie"===e?()=>!0:uf}},derive:sC,extend:sx,props:sD,override:sN,Events:u_,on:uG,liveQuery:function(e){let t,r=!1,n=new cS(n=>{let o=sQ(e),i=!1,a={},s={},l={get closed(){return i},unsubscribe:()=>{i=!0,uG.storagemutated.unsubscribe(p)}};n.start&&n.start(l);let u=!1,c=!1;function d(){return sw(s).some(e=>a[e]&&function(e,t){let r=cb(t),n=r.next();if(n.done)return!1;let o=n.value,i=cb(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=uj(s.from,o.to)&&uj(s.to,o.from)>=0)return!0;0>uj(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(a[e],s[e]))}let p=e=>{cO(a,e),d()&&f()},f=()=>{let h,m;if(u||i)return;a={};let y={},g=(o&&l3(),h=()=>l2(e,{subscr:y,trans:null}),m=lR.trans?ue(lR.transless,h):h(),o&&m.then(l4,l4),m);c||(uG(uH,p),c=!0),u=!0,Promise.resolve(g).then(e=>{r=!0,t=e,u=!1,i||(d()?f():(a={},s=y,n.next&&n.next(e)))},e=>{u=!1,r=!1,n.error&&n.error(e),l.unsubscribe()})};return f(),l});return n.hasValue=()=>r,n.getValue=()=>t,n},extendObservabilitySet:cO,getByKeyPath:sL,setByKeyPath:sF,delByKeyPath:function(e,t){"string"==typeof t?sF(e,t,void 0):"length"in t&&[].map.call(t,function(t){sF(e,t,void 0)})},shallowClone:sB,deepClone:sz,getObjectDiff:cc,cmp:uj,asap:sI,minKey:ul,addons:[],connections:ud,errnames:lr,dependencies:i,semVer:ua,version:ua.split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),cx.maxKey=uX(cx.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(uG(uH,e=>{if(!cP){let t;up?(t=document.createEvent("CustomEvent")).initCustomEvent(uz,!0,!0,e):t=new CustomEvent(uz,{detail:e}),cP=!0,dispatchEvent(t),cP=!1}}),addEventListener(uz,({detail:e})=>{cP||cD(e)}));let cP=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(uz);"function"==typeof e.unref&&e.unref(),uG(uH,t=>{cP||e.postMessage(t)}),e.onmessage=e=>{e.data&&cD(e.data)}}else if("u">typeof self&&"u">typeof navigator){uG(uH,e=>{try{cP||("u">typeof localStorage&&localStorage.setItem(uz,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:uz,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===uz){let t=JSON.parse(e.newValue);t&&cD(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===uz&&cD(e.changedParts)})}function ck(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}lI.rejectionMapper=function(e,t){if(!e||e instanceof s9||e instanceof TypeError||e instanceof SyntaxError||!e.name||!lo[e.name])return e;var r=new lo[e.name](t||e.message,e);return"stack"in e&&sk(r,"stack",{get:function(){return this.inner.stack}}),r},s1=uf;class cC extends cx{constructor(){super("EsmOffline"),ck(this,"syncQueue",void 0),ck(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function cj(){return new cC}let cT=new cC,cR={},cA=q("offline-synchronization",{});function cN(){return cA}async function cM(){if(cA.getState().synchronization)return;let e=await cT.syncQueue.count(),t={},r=Object.entries(cR),n=r.length,o={},i=new AbortController,a=()=>{let e=cA.getState().synchronization;cA.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{cA.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<n&&r.length>0;e++)for(let e=r.length;e--;){let[n,s]=r[e],l=s.dependsOn.map(e=>t[e]);l.every(Boolean)&&(o[n]={},await Promise.all(l),t[n]=cI(s,o,i,a),r.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{cA.setState({synchronization:void 0})}}async function cI({type:e,dependsOn:t,process:r},n,o,i){let a=[],s=[],l=await c$();await cT.syncQueue.where({type:e,userId:l}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let u=0;u<a.length;u++){let[c,d,{id:p,dependencies:f=[]}]=a[u];try{let i=await r(d,{abort:o,index:u,items:s,userId:l,dependencies:f.map(({id:e,type:r})=>t.includes(r)?n[r][e]:void 0)});void 0!==p&&(n[e][p]=i),await cT.syncQueue.delete(c)}catch(e){await cT.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function c$(){let e=await o6();return e?.uuid||"*"}async function cL(e,t,r,n){let o=n&&n.id;return void 0!==o&&await cT.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(cx.errnames.DatabaseClosed),await cT.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(cx.errnames.DatabaseClosed,()=>-1)}async function cF(e,t,r){let n=await c$();return await cL(n,e,t,r)}async function cB(e,t){return(await cV(e,t)).map(e=>e.content)}async function cV(e,t){return await cT.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(cx.errnames.DatabaseClosed,()=>[])}async function cU(e){let t=await c$();return await cB(t,e)}async function cW(e){let t=await c$();return await cV(t,e)}async function cK(e){return await cT.syncQueue.get(e).catch(cx.errnames.DatabaseClosed,()=>void 0)}function cH(e){return!!cR[e]?.options.onBeginEditSyncItem}async function cz(e){let t=await cK(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=cR[t.type]?.options.onBeginEditSyncItem;if(!r)throw Error(`A sync item with the ID ${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 "${t.type}" supports editing items.`);r(t)}async function cG(e){await cT.syncQueue.delete(e).catch(cx.errnames.DatabaseClosed)}function cq(e,t,r,n={}){cR[e]={type:e,dependsOn:t,process:r,options:n}}let cY="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cZ=new Uint8Array(16),cJ=[];for(let e=0;e<256;++e)cJ.push((e+256).toString(16).slice(1));let cX=function(e,t,r){if(cY&&!t&&!e)return cY();let n=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(cZ)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return cJ[e[t+0]]+cJ[e[t+1]]+cJ[e[t+2]]+cJ[e[t+3]]+"-"+cJ[e[t+4]]+cJ[e[t+5]]+"-"+cJ[e[t+6]]+cJ[e[t+7]]+"-"+cJ[e[t+8]]+cJ[e[t+9]]+"-"+cJ[e[t+10]]+cJ[e[t+11]]+cJ[e[t+12]]+cJ[e[t+13]]+cJ[e[t+14]]+cJ[e[t+15]]}(n)},cQ="OFFLINE+";function c0(){return cQ+cX()}function c1(e){return e.startsWith(cQ)}let c2={};function c3(){return Object.values(c2)}function c4(e){c2[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${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.`),c2[e.id]=e}async function c5(e){let t=await dn();return await c6(t,e)}async function c6(e,t){let r=new cC;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(cx.errnames.DatabaseClosed,()=>[])}async function c7(e,t){let r=await dn();return await c9(r,e,t)}async function c9(e,t,r){let n=new cC,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(cx.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(cx.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(cx.errnames.DatabaseClosed)}async function c8(e,t){let r=await dn();return await de(r,e,t)}async function de(e,t,r){let n=new cC,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(cx.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(cx.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(cx.errnames.DatabaseClosed))}async function dt(e,t){let r=await c5(e);await Promise.all(r.map(async e=>dr(e.type,e.identifier,t)))}async function dr(e,t,r){await c7(e,t);let n=new cC,o=await dn(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(cx.errnames.DatabaseClosed,()=>void 0),a=c3().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(cx.errnames.DatabaseClosed)}async function dn(){let e=(await o6()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let di=q("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function da(){return du(),di}function ds(e,t){du(),c4({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function dl(e){du(),await dr("patient",e)}function du(){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.")}async function dc(e,t,r=!0){if(e){let n=null,[o,i]=await Promise.all([oY(`${oz}/Patient/${e}`,t).catch(e=>n=e),r?dd(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(n)throw n}return null}async function dd(e){let t=(await cU("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function dp(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function df(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}var dh=r(99549);function dm(e){return{uuid:e.uuid,display:e.display}}function dy(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return oZ(`${oH}/location${n?"?"+n:""}`).pipe((0,dh.map)(e=>e.data.results.map(dm))).pipe((0,dh.take)(1))}function dg(e){return{uuid:e.uuid,display:e.display,name:e.name}}function db(){return oZ(`${oH}/visittype`).pipe((0,dh.map)(e=>e.data.results.map(dg))).pipe((0,dh.take)(1))}var dv=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),dw=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return ec(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(eb),d_=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return ec(t,e),t}(e_),dx=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return ec(t,e),t.prototype[ew]=function(){return new d_(this)},t.prototype.lift=function(e){var t=new dE(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new dv;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new dv;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new dv;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new dv},t.prototype._subscribe=function(e){if(this.closed)throw new dv;return this.hasError?(e.error(this.thrownError),eb.EMPTY):this.isStopped?(e.complete(),eb.EMPTY):(this.observers.push(e),new dw(this,e))},t.prototype.asObservable=function(){var e=new eS;return e.source=this,e},t.create=function(e,t){return new dE(e,t)},t}(eS),dE=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return ec(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):eb.EMPTY},t}(dx),dS=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return ec(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new dv},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(dx),dO=((eo={}).NEWVISIT="startVisit",eo.EDITVISIT="editVisit",eo.LOADING="loadingVisit",eo),dD=((ei={}).NOTSTARTED="notStarted",ei.ONGOING="ongoing",ei);let dP="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))",dk=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function dC(){return Z("visit",dk)}function dj(e,t){dC().setState({patientUuid:e,manuallySetVisitUuid:t})}function dT(e,t){return oY(`${oH}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function dR(e,t,r){return oY(`${oH}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function dA(e,t,r){return oY(`${oH}/visit?patient=${e}&v=${r??dP}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}dC().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let dN=new dS(null);class dM{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+dM.version}static addUnaryOp(e){return dM.max_unop_len=Math.max(e.length,dM.max_unop_len),dM.unary_ops[e]=1,dM}static addBinaryOp(e,t,r){return dM.max_binop_len=Math.max(e.length,dM.max_binop_len),dM.binary_ops[e]=t,r?dM.right_associative.add(e):dM.right_associative.delete(e),dM}static addIdentifierChar(e){return dM.additional_identifier_chars.add(e),dM}static addLiteral(e,t){return dM.literals[e]=t,dM}static removeUnaryOp(e){return delete dM.unary_ops[e],e.length===dM.max_unop_len&&(dM.max_unop_len=dM.getMaxKeyLen(dM.unary_ops)),dM}static removeAllUnaryOps(){return dM.unary_ops={},dM.max_unop_len=0,dM}static removeIdentifierChar(e){return dM.additional_identifier_chars.delete(e),dM}static removeBinaryOp(e){return delete dM.binary_ops[e],e.length===dM.max_binop_len&&(dM.max_binop_len=dM.getMaxKeyLen(dM.binary_ops)),dM.right_associative.delete(e),dM}static removeAllBinaryOps(){return dM.binary_ops={},dM.max_binop_len=0,dM}static removeLiteral(e){return delete dM.literals[e],dM}static removeAllLiterals(){return dM.literals={},dM}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new dM(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return dM.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!dM.binary_ops[String.fromCharCode(e)]||dM.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return dM.isIdentifierStart(e)||dM.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(dM.hooks[e]){let r={context:this,node:t};return dM.hooks.run(e,r),r.node}return t}searchHook(e){if(dM.hooks[e]){let t={context:this};return dM.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===dM.SPACE_CODE||e===dM.TAB_CODE||e===dM.LF_CODE||e===dM.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:dM.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===dM.SEMCOL_CODE||r===dM.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,dM.max_binop_len),t=e.length;for(;t>0;){if(dM.binary_ops.hasOwnProperty(e)&&(!dM.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!dM.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,i,a,s,l;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:dM.binaryPrecedence(t),right_a:dM.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[i,o,a];t=this.gobbleBinaryOp();){if(0===(r=dM.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:dM.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)a=n.pop(),t=n.pop().value,i=n.pop(),e={type:dM.BINARY_EXP,operator:t,left:i,right:a},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:dM.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,dM.isDecimalDigit(e)||e===dM.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===dM.SQUOTE_CODE||e===dM.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===dM.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,dM.max_unop_len)).length;r>0;){if(dM.unary_ops.hasOwnProperty(t)&&(!dM.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!dM.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:dM.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}dM.isIdentifierStart(e)?(n=this.gobbleIdentifier(),dM.literals.hasOwnProperty(n.name)?n={type:dM.LITERAL,value:dM.literals[n.name],raw:n.name}:n.name===dM.this_str&&(n={type:dM.THIS_EXP})):e===dM.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===dM.PERIOD_CODE||t===dM.OBRACK_CODE||t===dM.OPAREN_CODE||t===dM.QUMARK_CODE;){let r;if(t===dM.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==dM.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===dM.OBRACK_CODE?((e={type:dM.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==dM.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===dM.OPAREN_CODE?e={type:dM.CALL_EXP,arguments:this.gobbleArguments(dM.CPAREN_CODE),callee:e}:(t===dM.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:dM.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;dM.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===dM.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);dM.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));dM.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);dM.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,dM.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===dM.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===dM.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:dM.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:dM.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(dM.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,dM.isIdentifierPart(e))this.index++;else break;return{type:dM.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===dM.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===dM.COMMA_CODE){if(this.index++,++n!==t.length){if(e===dM.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===dM.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==dM.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(dM.CPAREN_CODE);if(this.code===dM.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:dM.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:dM.ARRAY_EXP,elements:this.gobbleArguments(dM.CBRACK_CODE)}}}Object.assign(dM,{hooks:new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(dM),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),dM.max_unop_len=dM.getMaxKeyLen(dM.unary_ops),dM.max_binop_len=dM.getMaxKeyLen(dM.binary_ops);let dI=e=>new dM(e).parse(),d$=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(dM).filter(e=>!d$.includes(e)&&void 0===dI[e]).forEach(e=>{dI[e]=dM[e]}),dI.Jsep=dM,dI.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let dL="ArrowFunctionExpression",dF={Array,Boolean,Symbol,Infinity,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)}},dB={...dF,Promise};function dV(e,t={}){return dG(e,t,dZ)}async function dU(e,t={}){return dq(e,t,dZ)}function dW(e,t={}){return dG(e,t,dJ)}function dK(e,t={}){return dq(e,t,dJ)}function dH(e,t={}){return dG(e,t,dX)}function dz(e,t={}){return dq(e,t,dX)}function dG(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=d1(t,dF),o=dQ("string"==typeof e?dI(e):e,n);if(r(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function dq(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=d1(t,dB);return Promise.resolve(dQ("string"==typeof e?dI(e):e,n)).then(t=>{if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function dY(e){return dI(e)}function dZ(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function dJ(e){return"boolean"==typeof e}function dX(e){return"number"==typeof e}function dQ(e,t){switch(e.type){case"UnaryExpression":var r,n,o,i,a,s,l,u,c,d,p,f,h=e,m=t;let y=dQ(h.argument,m);switch(h.operator){case"+":return+y;case"-":return-y;case"~":return~y;case"!":return!y;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var g=e,b=t;let v=dQ(g.left,b),w=dQ(g.right,b);switch(g.operator){case"+":return v+w;case"-":return v-w;case"*":return v*w;case"/":return v/w;case"%":return v%w;case"**":return v**w;case"==":return v==w;case"===":return v===w;case"!=":return v!=w;case"!==":return v!==w;case">":return v>w;case">=":return v>=w;case"<":return v<w;case"<=":return v<=w;case"in":return v in w;case"&&":return v&&w;case"||":return v||w;case"??":return v??w;default:throw`Expression evaluator does not support operator '${g.operator}' operator`}case"ConditionalExpression":return r=e,n=t,dQ(r.test,n)?dQ(r.consequent,n):dQ(r.alternate,n);case"CallExpression":var x=e,E=t;let S=x.arguments?.map(d2(E)),O=dQ(x.callee,E);if(O){if("function"!=typeof O)throw`${d4(x.callee)} is not a function`}else throw`No function named ${d4(x.callee)} is defined in this context`;return O(...S);case"ArrowFunctionExpression":let D;return o=e,i=t,D=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<D.length)throw`Required argument(s) ${D.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(D.reduce((t,r,n)=>{let o=e[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return dQ(o.body,i.addVariables(t))}).bind(i.thisObj??null);case"MemberExpression":return function(e,t){let r,n=dQ(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":{let r=d0(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":{let r=d0(e.property,t);throw TypeError(`TypeError: cannot read properties of undefined (reading '${r}')`)}default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}let o=n;if("string"==typeof n)o=String.prototype;else if("number"==typeof n)o=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw`VisitMemberExpression does not support member access on type ${typeof n}`;switch(t.thisObj=o,e.property.type){case"Identifier":case"MemberExpression":r=dQ(e.property,t);break;default:{let o=dQ(e.property,t);if(void 0===o)throw{type:"Illegal property access",message:"No property was supplied to the property access"};d3(o),r=n[o]}}return"function"==typeof r?r.bind(n):r}(e,t);case"ArrayExpression":return a=e,s=t,a.elements?.map(d2(s));case"SequenceExpression":let P;return l=e,u=t,(P=l.expressions.map(d2(u)))[P.length-1];case"NewExpression":var k=e,C=t;if(k.callee&&"Identifier"===k.callee.type){let e=k.arguments?.map(d2(C));switch(k.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${k.callee.name}`}}if(k.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return d3((c=e).value),c.value;case"Identifier":var j=e,T=t;d3(j.name);let R=T.thisObj;if(R&&("object"==typeof R||"function"==typeof R)&&j.name in R){let e=R[j.name];return d3(e),e}if(T.variables&&j.name in T.variables){let e=T.variables[j.name];return d3(e),e}return j.name in T.globals?T.globals[j.name]:void 0;case"TemplateLiteral":let A,N;return d=e,p=t,A=d.expressions?.map(d2(p))??[],(N=d.quasis?.map(d2(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+A.join("")+N.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(f=e).cooked,tail:f.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function d0(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return d0(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function d1(e,t){let r={thisObj:void 0,variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}function d2(e){return function(t){return null===t?null:dQ(t,e)}}function d3(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function d4(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function d5(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...dB},isLocalExpression:!1,variables:new Set};return d6("string"==typeof e?dI(e):e,t),[...t.variables]}function d6(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,d6(n.argument,o);case"BinaryExpression":return i=e,a=t,[d6(i.left,a),d6(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[d6(s.consequent,l),d6(s.test,l),d6(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=d6(u.callee,c),u.arguments?.map(d7(c)),r;case"ArrowFunctionExpression":var n,o,i,a,s,l,u,c,d,p,f,h,m,y,g,b,v,w,x=e,E=t;let S={...E};S.isLocalExpression=!0;let O=x.params?.map(d7(S))??[],D=d6(x.body,S)??[];if(D&&Array.isArray(D))for(let e of D)O.includes(e)||E.variables.add(e);return;case"MemberExpression":let P;return d=e,p=t,d6(d.object,p),void((P={...p}).isLocalExpression=!0,d6(d.property,P));case"ArrayExpression":return f=e,h=t,void f.elements?.map(d7(h));case"SequenceExpression":return m=e,y=t,void m.expressions?.map(d7(y));case"NewExpression":return g=e,b=t,void g.arguments?.map(d7(b));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,C=t;if(!(k.name in C.globals))if(C.isLocalExpression)return k.name;else C.variables.add(k.name);return;case"TemplateLiteral":return v=e,w=t,void(v.expressions?.map(d7(w)),v.quasis?.map(d7(w)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function d7(e){return function(t){return null===t?null:d6(t,e)}}dI.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:dL,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=dL,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),dI.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),dI.plugins.register({name:"numbers",init(e){function t(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}function r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let i=this.char;("e"===i||"E"===i)&&(n+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(a===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,i,a;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;o=this.code,i=u,95===o||i.some(([e,t])=>o>=e&&o<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(c,"x"===(a=l)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),dI.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{n=new RegExp(o,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),dI.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),dI.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=a}else n+=a,o+=a}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),dI.addBinaryOp("in",7),dI.addBinaryOp("??",1);let d9=Z("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function d8(e,t,r){d9.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function pe(){let e=d9.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let r=t.replace("openmrs:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${r}`))})}function pt(e){return d9.getState().flags[e].enabled}function pr(e,t){d9.subscribe(r=>{t(r.flags[e].enabled)})}function pn(e,t){d9.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}function po(e){return!window.offlineEnabled||(e??navigator.onLine)}d9.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});var pi=tp(function(e,t,r){tt(e,t,r)});function pa(e=!0,t=!1){return ps(po(),e,t)}function ps(e,t=!0,r=!1){return!!(e?t:r)}let pl=q("extensionsInternal",{slots:{},extensions:{}}),pu=q("extensionRenderings",{renderings:new Map}),pc=()=>Z("extensionsInternal",{slots:{},extensions:{}}),pd=()=>Z("extensionRenderings",{renderings:new Map});function pp(e){let t=pl.getState(),r=e(t);r!==t&&pl.setState(r)}let pf=null,ph=null;function pm(){let e=pu.getState();return pf&&e===ph||(pf=new Map(e.renderings),ph=e,function(e){for(let t of(pO.clear(),e.values()))pP(t,1);pD=!0}(pf)),pf}function py(e){ph={renderings:e},pu.setState(ph,!0)}function pg(e){let t=pm();t.has(e.renderingId)||(t.set(e.renderingId,e),pP(e,1),py(t))}function pb(e){let t=pm(),r=t.get(e);r&&(t.delete(e),pP(r,-1),py(t))}let pv=()=>Z("extensions",{slots:{}}),pw=0,p_=new Set;function px(e){pw++;try{return e()}finally{if(0==--pw&&p_.size>0){let e=Array.from(p_);for(let t of(p_.clear(),e))pE(t)}}}function pE(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function pS(e){pw>0?p_.add(e):pE(e)}let pO=new Map,pD=!1;function pP(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=pO.get(r);if(!n){if(t<0)return;pO.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),pD=!0;return}n.count+=t,n.count<1&&(pO.delete(r),pD=!0)}function pk(){var e,t;if(pm(),!pD)return;pD=!1;let r=Array.from(pO.values(),({record:e})=>e);r.sort(pC),e=rn.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===pC(e,t[r]))||rn.setState({mountedExtensions:r})}function pC(e,t){return pj(e.slotName,t.slotName)||pj(e.extensionId,t.extensionId)||pj(e.slotModuleName,t.slotModuleName)||pj(e.extensionModuleName,t.extensionModuleName)}function pj(e,t){return e===t?0:e<t?-1:1}pk(),pu.subscribe(()=>pS(pk));let pT=pc(),pR=pv(),pA=ri(),pN=rl(),pM=new Set,pI=!1;function p$(e){if(null===e)pM=null;else if(null!==pM)for(let t of e)pM.add(t);pS(pL)}function pL(){if(!pI){pI=!0;try{for(let e=1;;e++){let t=pM;if(null!==t&&0===t.size)return;pM=new Set;try{!function(e,t,r,n,o,i=null){let a=pR.getState().slots,s={},l=!1,u=po(),c=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,d]of Object.entries(e.slots)){let p=a[n];if(p&&i&&!i.has(n)){s[n]=p;continue}let{config:f}=rs(t,d.name),h=function(e,t,r,n,o,i,a){let s=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:i}=pT.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>pY(e,o,i[pU(e)]?.order,t)-pY(r,o,i[pU(r)]?.order,t))}(r,t.slots[e].attachedIds),l=[];for(let u of s){let{config:s}=rc(n,e,u),c=rd(r,e,u),d=c?pi({},s,c):s,p=pU(u),f=t.extensions[p];if(f){let e=d?.["Display conditions"]?.privileges??f.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!o5(e,a.user))||f.featureFlag&&!o.includes(f.featureFlag)||window.offlineEnabled&&!ps(i,f.online,f.offline))continue;l.push({id:u,name:p,moduleName:f.moduleName,config:d,featureFlag:f.featureFlag,meta:f.meta,online:d?.["Display conditions"]?.online??f.online??!0,offline:d?.["Display conditions"]?.offline??f.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||f.displayExpression})}}return l}(n,e,f,r,c,u,o.session);p&&p.moduleName===d.moduleName&&tm(p.candidateExtensions,h)?s[n]=p:(s[n]={moduleName:d.moduleName,candidateExtensions:h},l=!0)}(l||Object.keys(a).length!==Object.keys(s).length)&&pR.setState({slots:s})}(pT.getState(),pA.getState(),pN.getState(),d9.getState(),oX.getState(),t)}catch(e){throw pM=null===t||null===pM?null:new Set([...t,...pM]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{pI=!1}}}function pF(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function pB(){p$(null)}function pV(e,t){return{moduleName:t,name:e,attachedIds:[]}}function pU(e){let[t]=e.split("#");return t}function pW(e,t){let r=pU(t);return e.extensions[r]}function pK(e){return pW(pT.getState(),e)}pT.subscribe((e,t)=>{p$(e.extensions!==t.extensions?null:pF(e.slots,t.slots))}),pA.subscribe((e,t)=>{p$(pF(e.slots,t.slots))}),pN.subscribe((e,t)=>{p$(pF(e.configs,t.configs))}),d9.subscribe(()=>p$(null)),oX.subscribe(()=>p$(null)),pB(),g(pB);let pH=e=>pp(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function pz(e,t){pp(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...pV(e),attachedIds:[t]}}}})}function pG(e,t){pp(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function pq(e){pp(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function pY(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function pZ(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!dW(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(pJ(e),t,oX.getState().session,e)}function pJ(e){return pR.getState().slots[e]?.candidateExtensions??[]}let pX=(e,t)=>pT.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=pV(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),pQ=()=>{pM=null,pp(()=>({slots:{},extensions:{}})),pd().setState({renderings:new Map}),pR.setState({slots:{}})},p0=q("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function p1({name:e,basePath:t,mode:r,componentContext:n,state:o}){p0.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function p2(e){p0.getState().slotName===e&&p0.setState(p0.getInitialState(),!0)}let p3=q("modalRegistry",{modals:{}});function p4(e){p3.setState(t=>(t.modals[e.name]=e,t))}function p5(e){let t=p3.getState().modals[e];if(!t){let r=pK(e);r&&(t={name:e,load:r.load,moduleName:r.moduleName},console.warn(`Modal ${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.`),p4(t))}return t}let p6=q("workspaceRegistrations",{workspaces:{}}),p7=q("workspaceGroups",{workspaceGroups:{}});function p9(e){p6.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function p8(e){p7.setState(t=>{let r=t.workspaceGroups[e.name];return r?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...r,members:Array.from(new Set([...r.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let fe=new Set;function ft(e){let t=p6.getState().workspaces;if(t[e])return t[e];{let t=pK(e);if(t){var r;let n;return fe.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),fe.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?an(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function fr(e){let t=p7.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let fn=q("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function fo(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=fn.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function fi(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=fn.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function fa(e){let{openedWindows:t}=fn.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function fs(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=fn.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace group ${r.name} more than once`);n[r.name]={...r,moduleName:e}}fn.setState({registeredGroupsByName:n})}function fl(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=fn.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace window ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}fn.setState({registeredWindowsByName:n})}function fu(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=fn.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}fn.setState({registeredWorkspacesByName:n})}let fc=0,fd=null,fp={bootstrap:15e3,mount:15e3,unmount:15e3};function ff(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(fp).filter(t=>e[t]).map(n=>{var o,i;let a,s;return[n,(o=e[n],i=fp[n],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${i} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function fh(e,t){var r,n;let o,i,a,s,l,u=await (fd??(fd=new Promise((e,t)=>{nG({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),nG))),fd),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>ff(e,r)):ff(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),l=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function fm(){return fy}function fy(e,t){let r,n=fh(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function fg(e,t,r,n,o=e=>e,i={}){let a=pU(n),s=pK(n),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:u,moduleName:c,online:d,offline:p,load:f}=s;if(pa(d,p)){let s,d=fc++,p=`${t}/${n}-${d}`;e.dataset.extensionRenderingId=p;let h=e=>{try{pb(p)}catch(t){console.error(e,t)}};try{pg({renderingId:p,extensionName:a,extensionModuleName:c,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{s=await f()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await fh(o({...s,name:`${t}/${a}-${d}`}),{...i,_meta:u,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${n}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${n}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${n}' failed to unmount also failed`)})}}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return l}var fb=r(38602),fv=r.n(fb);let fw=(0,fb.createContext)({moduleName:"",featureName:""});function f_({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,fb.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),fv().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),oM({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:oA(e,t),...o},n)}let fx=({state:e,children:t,...r})=>{let{extension:n}=(0,fb.useContext)(fw),o=(0,fb.useRef)(null),i=(0,fb.useRef)(Promise.resolve()),a=(0,fb.useRef)(!1),s=(0,fb.useRef)(!1),l=(0,fb.useRef)(e),u=(0,fb.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,fb.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,fb.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,fg(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,fb.useEffect)(()=>(a.current=!1,()=>{a.current=!0,u(o.current)}),[]),(0,fb.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?fv().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function fE(e){let t=(0,fb.useRef)(e);return L(t.current,e)||(t.current=e),t.current}function fS(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let fO=e=>e;function fD(e,t=fO,r){let n=(0,fb.useCallback)(t=>e.subscribe(t),[e]),o=(0,fb.useCallback)(()=>t(e.getState()),[e,t]),i=(0,fb.useSyncExternalStore)(n,o,o),a=(0,fb.useMemo)(()=>r?fS(e,r):null,[e,r]);return(0,fb.useMemo)(()=>a?{...i,...a}:i,[i,a])}function fP(e,t){return fD(e,fO,t)}function fk(e){return function(t){let r=(0,fb.useCallback)(t=>e.subscribe(t),[]),n=(0,fb.useCallback)(()=>e.getState(),[]),o=(0,fb.useSyncExternalStore)(r,n,n),i=(0,fb.useMemo)(()=>t?fS(e,t):null,[t]);return(0,fb.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let fC=[];Object.freeze(fC);let fj={candidateExtensions:fC};Object.freeze(fj);let fT=e=>{let t=(0,fb.useCallback)(t=>t.slots?.[e]??fj,[e]);return fD(pv(),t)},fR=e=>e.session;function fA(e,t){let{candidateExtensions:r}=fT(e),n=fD(oX,fR),o=fE(t);return(0,fb.useMemo)(()=>pZ(e,o),[e,o,n,r])}function fN(e,t){let{moduleName:r}=(0,fb.useContext)(fw);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,fb.useEffect)(()=>{pX(r,e)},[r,e]),{extensions:fA(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function fM(e){return e}function fI({name:e,extensionSlotName:t,select:r=fM,children:n,state:o,style:i,...a}){if(n&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,l=(0,fb.useRef)(null),{extensions:u,extensionSlotModuleName:c}=fN(s,o),d=(0,fb.useMemo)(()=>r(u),[r,u]),p=(0,fb.useMemo)(()=>{if("function"==typeof n&&!fv().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return fv().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>fv().createElement(fw.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c}}},p?.[t]??("function"!=typeof n?n:null)??fv().createElement(fx,{state:o}))))}var f$=r(25873);function fL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function fF(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fL(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fL(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function fB(e){return(fB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fV(e){return(fV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fU(e,t){var r;if("function"!=typeof(r=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 r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,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(fV(r)));return function(){var e=r(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(fV(e)));return e}}var fW=null;try{fW=require("react").createContext()}catch(e){}var fK={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function fH(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function fz(e,t){return new Promise(function(r,n){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,i=fZ(e,t,function(){r(this)}),a=fU(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,i=t[r];if("function"!=typeof i)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(n),a;case"hydrateRoot":return i(o,n);default:return i(n,o),null}}({elementToRender:i,domElement:a,reactDom:fY(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function fG(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():fY(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function fq(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=fZ(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var i=fU(e,t)();fY(e).render(n,i)}})}function fY(e){return e.ReactDOMClient||e.ReactDOM}function fZ(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=fW?e.React.createElement(fW.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,fF(fF({},t),{},{mountFinished:r,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)}var fJ=r(75614),fX=r(71123),fQ=r(23896);let f0={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},f1=new Map;(0,fQ.initCache)(f1);let f2={errorRetryCount:3,fetcher:oY,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof oJ){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>f1};function f3(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},f0,e),r={...f2,...t.swrConfig};return function(e){var n,o,i,a,s;return i=o=class extends(n=fv().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return fv().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=fv().createElement(fb.Suspense,{fallback:null},fv().createElement(fX.BE,{value:r},fv().createElement(fw.Provider,{value:this.state.config},t.disableTranslations?fv().createElement(e,this.props):fv().createElement(fJ.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},fv().createElement(e,this.props)))));return t.strictMode&&fv().StrictMode?fv().createElement(fv().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}}function f4(e,t){return function(e){if("object"!==fB(e))throw Error("single-spa-react requires a configuration object");var t,r=fF(fF({},fK),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!fW&&r.React.createContext&&(fW=r.React.createContext()),r.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}(r);var n={bootstrap:fH.bind(null,r),mount:fz.bind(null,r),unmount:fG.bind(null,r)};return r.parcelCanUpdate&&(n.update=fq.bind(null,r)),n}({React:fv(),ReactDOMClient:f$,rootComponent:f3(t)(e)})}function f5(e,t){return()=>e().then(({default:e})=>f4(e,t))}function f6(e,t){return()=>Promise.resolve(f4(e,t))}let f7=f5,f9=U()(()=>({}));Y("openmrs-app-context",f9);let f8={};function he(e,t=e=>e){let r=f9.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function ht(e,t){f9.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function hr(e){return null===e?null:Object.freeze(Object.assign({},e))}let hn=new Map;function ho(e,t){let r=(0,fb.useRef)(t??{}),n=(0,fb.useRef)(t=>ht(e,t)),o=(0,fb.useRef)(Symbol());return(0,fb.useEffect)(()=>{let r=t??{},n=o.current;return null===he(e)?!function(e,t=f8){f9.setState(r=>{if(e in r)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},r,{[e]:t===f8?{}:t})})}(e,r):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),ht(e,()=>r)),hn.set(e,n),()=>{hn.get(e)===n&&(f9.setState(t=>(e in t&&delete t[e],t)),hn.delete(e))}},[e]),(0,fb.useEffect)(()=>{let n=t??{};L(r.current,n)||(ht(e,()=>n),r.current=n)},[t]),n.current}function hi({namespace:e,value:t}){return ho(e,t),null}let ha=({children:e,value:t,fallback:r})=>t?fv().createElement(fv().Fragment,null,e):r?fv().createElement(fv().Fragment,null,r):null;function hs(){let e=(0,fb.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,fb.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function hl(e,t=e=>e??{}){let[r,n]=(0,fb.useState)(()=>{if(hu(e))return;let r=he(e);if(null!==r)return t?t(r):r});return(0,fb.useEffect)(()=>{if(hu(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,fb.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>L(e,r)?e:r)})(hr(o=he(e))),f9.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(hr(n)))})},[e,t]),r}function hu(e){return"string"!=typeof e||0===e.trim().length}function hc(e){let t=fA(e);return(0,fb.useMemo)(()=>t.map(e=>e.id),[t])}function hd(e){return fT(e).candidateExtensions}function hp(e,t){let{data:r,error:n,mutate:o,isLoading:i,isValidating:a}=(0,fX.Ay)(`${aX}?patient=${e}&includeEncounterless=${t}`,oY);return(0,fb.useMemo)(()=>({isLoading:i,data:r?.data.results??[],error:n,mutate:o,isValidating:a}),[r,n,i,a,o])}function hf(e){(0,fb.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let hh={},hm=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
+ Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function hy(e){let{moduleName:t,extension:r}=(0,fb.useContext)(fw),n=e?.externalModuleName??t;if(!n&&!r)throw Error(hm);let o=function(e){let t=(0,fb.useMemo)(()=>ro(e),[e]),r=function(e){let[t,r]=(0,fb.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,fb.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw hh[e]||(hh[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),hh[e];return r}(n),i=function(e){let t=(0,fb.useMemo)(rl,[]),r=function(e,t){let[r,n]=(0,fb.useState)(t?()=>{let r=rc(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,fb.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=rc(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!tm(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!hh[r]&&t&&(hh[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=rc(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),hh[r]}return r||{}}(r);return(0,fb.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...i},[n,e?.externalModuleName,o,i])}let hg=fA;function hb(){let[e,t]=(0,fb.useState)(po());return(0,fb.useEffect)(()=>g(({online:e})=>t(e)),[]),e}function hv(e,t=300){let[r,n]=(0,fb.useState)(e);return(0,fb.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var hw=r(41356),h_=r.n(hw);let hx=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function hE(){let e=`${oH}/emrapi/configuration?v=${hx}`,t=h_()(e,oY);return(0,fb.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}let hS=fk(pc());function hO(e){let t=fA(e);return(0,fb.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let hD=fk(pv());function hP(e){let{flags:t}=fD(d9);return t[e]?.enabled??!1}function hk(){let[,e]=(0,fb.useState)(0);return(0,fb.useCallback)(()=>{e(e=>e+1)},[])}function hC(e,t,r={}){return hT(e,t,hj,r)}let hj={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(oq(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function hT(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??oY,[d,p]=(0,fb.useState)(1),f=(0,fb.useRef)(NaN),h=(0,fb.useRef)(NaN),m=(0,fb.useRef)(d),y=(0,fb.useRef)(!1),g=(0,fb.useRef)(!1),b=e?.toString()??"",[v,w]=(0,fb.useState)(b);b!==v&&(w(b),p(1),m.current=1,f.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,E=(0,fb.useMemo)(()=>o(e,t,x),[e,t,x]),{data:S,...O}=(l?h_():fX.Ay)(E,c,u);S?.data&&(f.current=i(S?.data),h.current=a(S?.data),y.current=!0);let D=Math.ceil(f.current/t),P=(0,fb.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(f.current/t);!y.current||Number.isNaN(r)||e<=r?(m.current=e,p(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,fb.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(f.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(f.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),m.current=e,p(e))},[d,t,b,S]);let k=(0,fb.useCallback)(()=>{P(m.current+1)},[P]),C=(0,fb.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(S?.data),totalPages:D,totalCount:f.current,currentPage:d,currentPageSize:h.current,paginated:D>1,showNextButton:d<D,showPreviousButton:d>1,goTo:P,goToNext:k,goToPrevious:C,...O}}function hR(e,t,r={}){return hT(e,t,hA(),r)}function hA(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(oq(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var hN=r(94522),hM=r.n(hN);function hI(e,t={}){return h$(e,hj,t)}function h$(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:i,getTotalCount:a,getData:s}=t,l=r.fetcher??oY,u=(0,fb.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:p,...f}=hM()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{p((c?.length??0)+1)},nextUri:h,...f}}function hL(e,t={}){return hF(e,hj,t)}function hF(e,t,r={}){let n=h$(e,t,r),{hasMore:o,error:i,data:a,loadMore:s,isLoading:l,nextUri:u}=n;return((0,fb.useEffect)(()=>{o&&!i&&s()},[o,u]),r.partialData)?n:{...n,data:o||i?void 0:a,isLoading:l||o}}function hB(e,t={}){return hF(e,hA(),t)}function hV(e,t={}){return h$(e,hA(),t)}function hU(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function hW(){let[e,t]=(0,fb.useState)(hU);return(0,fb.useEffect)(()=>{let e=()=>{t(hU())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let hK=e=>"small-desktop"===e||"large-desktop"===e;function hH(e){let t=(0,fb.useContext)(fw);(0,fb.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),p1(e),()=>{p2(e.name)}),[t,e])}function hz(){return fD(p0)}function hG(e=null,t=null){let[r,n]=(0,fb.useState)([]);return(0,fb.useEffect)(()=>{let r=dy(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function hq(e,t=!0){let r=(0,fb.useRef)(null);return(0,fb.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function hY(e){let t=(0,fb.useRef)();return(0,fb.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function hZ(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:i}=t,a=hs(),s=(0,fb.useMemo)(()=>n?.signal??r?.signal??a.signal,[r?.signal,n?.signal,a.signal]),l=(0,fb.useCallback)(e=>oY(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw 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 ${e}.`)}(e,o),{...n,signal:s}),[s,n,o]);return(0,fX.Ay)(e,l,i)}function hJ(e=[],t=10){let[r,n]=(0,fb.useState)(1),o=(0,fb.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let i=Math.min(Math.max(1,r),o),a=(0,fb.useMemo)(()=>{let r=(i-1)*t,n=(i+0)*t;return e.slice(r,n)},[e,i,t]),s=(0,fb.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,fb.useCallback)(()=>{n(e=>e+1)},[]),u=(0,fb.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,fb.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:l,goToPrevious:u}),[a,o,e.length,t,i,s,l,u])}function hX(e,t,r,n){return{pageSizes:(0,fb.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,fb.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function hQ(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function h0(e){let[t,r]=(0,fb.useState)(e??hQ()),{data:n,error:o,isValidating:i}=(0,fX.Ay)(t?["patient",t]:null,()=>dc(t,{}));return(0,fb.useEffect)(()=>{let e=()=>{let e=hQ();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,fb.useMemo)(()=>({isLoading:i&&!o&&!n,patient:n,patientUuid:t,error:o}),[i,o,n,t])}function h1(){let e=`${oH}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=(0,fX.Ay)(e,oY);return(0,fb.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function h2(e){let{extensions:t,extensionSlotModuleName:r}=fN(e);return e?t.map(t=>({state:n})=>fv().createElement(fw.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r}}},fv().createElement(fx,{state:n}))):[]}function h3(){let e=(0,fb.useRef)(),[t,r]=(0,fb.useState)(null),n=null;if(!t){if(s){let e=o1().getState();e.loaded&&(n=e.session)}else s=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(o1().getState()),n||(e.current=o1().subscribe(r))});if(n)r(n);else throw s}(0,fb.useEffect)(()=>(e.current||(e.current=o1().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)if(s)throw console.warn("useSession is in an unexpected state. Attempting to recover."),s;else throw Error("useSession is in an invalid state.");return o}let h4=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,fb.useState)(null);return((0,fb.useEffect)(()=>{let e=o0({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),n&&o5(e,n))?fv().createElement(fv().Fragment,null,r):t?fv().createElement(fv().Fragment,null,t):null};var h5=r(23464),h6=r.n(h5),h7=r(85602);let h9=new Map;function h8(){for(let e of Array.from(h9.values()))e()}let me={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function mt(e){let t=(0,fb.useId)();return(0,fb.useEffect)(()=>{if(e)return h9.set(t,e),()=>{h9.delete(t)}},[t,e]),{...fP(dC(),me),mutateVisit:h8}}function mr(e,t=dP){let r=(0,fb.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:i}=mt((0,fb.useCallback)(()=>r.current?.(),[])),a=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${a}?v=${t}`,{data:u,error:c,mutate:d,isValidating:p}=(0,fX.Ay)(e?`${oH}/visit${s}`:null,oY),{data:f,error:h,mutate:m,isValidating:y}=(0,fX.Ay)(e&&a?`${oH}/visit${l}`:null,oY),g=(0,fb.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),b=(0,fb.useMemo)(()=>a&&f?f.data:null,[f,a]),v=(0,fb.useRef)(null);(0,fb.useEffect)(()=>{!p&&g&&n===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,p,y,n]);let w=(0,fb.useCallback)(()=>{d(),m()},[d,m]);(0,fb.useEffect)(()=>{r.current=w},[w]);let x=!!(!u||a&&!f),E=!!(a?h:c);return{error:c||h,mutate:w,isValidating:p||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!E}}function mn(){let[e,t]=(0,fb.useState)([]);return(0,fb.useEffect)(()=>{let e=db().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}h5.extend(h7);let mo=new Map;async function mi(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,i=n?t.substring(r+1):t,a=await ak(o);return a&&Object.hasOwn(a,i)&&"function"==typeof a[i]?ms(o,a).then(()=>a[i]()):(a?a&&Object.hasOwn(a,i)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${i}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),ma)}let ma={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function ms(e,t){if(e in mo)await mo[e];else{let r=t??await ak(e);await (mo[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{rT(e),t(null)}).catch(n)}rT(e),t(null)}))}}function ml(e,t){let r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
17
+ registered. To fix this, ensure that you define the "name" field inside the
18
+ extension definition.`,t);t.slots&&t.slot&&console.warn(`The extension ${r} from ${e} declares both a 'slots' property and
19
+ a 'slot' property. Only the 'slots' property will be honored.`);let n=t.slots?t.slots:t.slot?[t.slot]:[];if(!t.component)return void console.error(`The extension ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
20
+ To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let o of(pH({name:r,load:()=>mi(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:t.online??!0,offline:t.offline??!1,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),n))pz(o,r)}let mu=[];function mc(e,t){px(()=>(function(e,t){if(e&&t&&"object"==typeof t){rj(e);let r=t.extensions??[],n=t.modals??[],o=t.workspaces??[],i=t.workspaceGroups??[],a=t.featureFlags??[],s=t.workspaceGroups2??[],l=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?mu.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?ml(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let r;(r=t.name)?t.component?p4({name:r,moduleName:e,load:()=>mi(e,t.component)}):console.error(`The modal ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
21
+ To fix this, ensure that you define a 'component' field inside the modal definition.`,t):console.error(`A modal definition in ${e} is missing an name and thus cannot be
22
+ registered. To fix this, ensure that you define the "name" field inside the
23
+ modal definition.`,t)}else console.warn(`A modal for ${e} could not be registered as it does not appear to have the required properties`,t)}),o.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){let r=t.name;if(!r)return console.error(`A workspace definition in ${e} is missing a name and thus cannot be registered.
24
+ To fix this, ensure that you define the "name" field inside the workspace definition.`,t);let n=t.title;if(!n)return console.error(`A workspace definition in ${e} is missing a title and thus cannot be registered.
25
+ To fix this, ensure that you define the "title" field inside the workspace definition.`,t);if(!t.component)return console.error(`The workspace ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
26
+ To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let o of(p9({name:r,title:n,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>mi(e,t.component)}),t.groups||[]))p8({name:o,members:[r]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let r;(r=t.name)?p8({name:r,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
27
+ To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),fs(e,s);for(let t of(fl(e,l),l))t.icon&&ml(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});fu(e,u),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?d8(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
28
+ To fix this, ensure that you define the "description" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
29
+ To fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
30
+ To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function md(){mu.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of mu){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",i=document.getElementById(o),a=`single-spa-application:${n}`;if(i){let e=document.createElement("div");e.id=a,i?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===r?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
+ To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?ob(e,()=>mi(t.appName,t.component),function(e,{online:t,offline:r,featureFlag:n}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&r)&&(!n||!!pt(n))&&e(o):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?oS(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(n,t)}}let mp={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function mf(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<mp.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>mp.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>mp.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<mp.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<mp.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<mp.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>mp.SMALL_DESKTOP_MAX)}let mh=!1;function mm(){mh||(window.addEventListener("resize",mf),mf(),mh=!0)}var my=r(31085),mg=r(53373),mb=r.n(mg);function mv({title:e,children:t}){let r="tablet"===hW();return(0,my.jsxs)("div",{className:mb()({"-esm-ward__card-header-module__tabletHeader___xhRSy":r,"-esm-ward__card-header-module__desktopHeader___aPTXc":!r}),children:[(0,my.jsx)("h4",{children:e}),t]})}let mw=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],m_={primaryColor:{_type:t3.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[r8.oneOf(mw)]},secondaryColor:{_type:t3.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[r8.oneOf(mw)]}},mx={"Brand color #1":{_default:"#005d5d",_type:t3.String},"Brand color #2":{_default:"#004144",_type:t3.String},"Brand color #3":{_default:"#007d79",_type:t3.String},excludePatientIdentifierCodeTypes:{uuids:{_type:t3.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:t3.UUID}}},implementationName:{_type:t3.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:t3.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:t3.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:[r8.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:t3.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:t3.String}},diagnosisTags:m_};var mE=r(38097);let mS={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},mO=e=>(0,my.jsx)(mE.GGC,{translateWithId:(e,t)=>{let r=mS[e];return r?ao(r,e,t):e},...e}),mD="-esm-ward__custom-overflow-menu-module__container___QIBvW",mP="-esm-ward__custom-overflow-menu-module__menu___ZppPo",mk="-esm-ward__custom-overflow-menu-module__show___8rVUu",mC="-esm-ward__custom-overflow-menu-module__overflowMenuButton___0VKUu",mj=(0,fb.createContext)(null);function mT(){let e=(0,fb.useContext)(mj);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function mR({menuTitle:e,children:t}){let[r,n]=fv().useState(!1),o=hq(()=>n(!1),r),i="tablet"===hW(),a=(0,fb.useCallback)(()=>n(e=>!e),[]),s=(0,fb.useRef)(null),l=(0,fb.useRef)(null),u=(0,fb.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,fb.useCallback)(()=>{n(!1),s.current?.focus()},[]),f=(0,fb.useMemo)(()=>({closeMenu:p}),[p]),h=(0,fb.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),p())},[p,r]),m=fb.Children.toArray(t);(0,fb.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,fb.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),g=m.map((e,t)=>(0,fb.isValidElement)(e)?(0,fb.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:y,index:t}):e);return(0,my.jsxs)("div",{"data-overflow-menu":!0,className:mb()("cds--overflow-menu",mD),ref:o,children:[(0,my.jsx)("button",{className:mb()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},mC),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,my.jsxs)("div",{className:mb()("cds--overflow-menu-options","cds--overflow-menu--flip",mP,{[mk]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,my.jsx)("ul",{className:mb()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,my.jsx)(mj.Provider,{value:f,children:g})}),(0,my.jsx)("span",{})]})]})}function mA(e){let t=(0,fb.useContext)(mj);return(0,my.jsx)(mE.XSD,{...e,closeMenu:t?.closeMenu})}var mN=r(61907);let mM=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],mI=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),m$=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-add",iconProps:e})})),mL=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),mF=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),mB=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),mV=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),mU=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),mW=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),mK=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),mH=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),mz=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),mG=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),mq=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),mY=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),mZ=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),mJ=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),mX=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),mQ=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),m0=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),m1=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),m2=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),m3=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),m4=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-close",iconProps:e})})),m5=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),m6=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),m7=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-document",iconProps:e})})),m9=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),m8=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-download",iconProps:e})})),ye=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),yt=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),yr=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),yn=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-events",iconProps:e})})),yo=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),yi=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),ya=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),ys=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),yl=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),yu=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-group",iconProps:e})})),yc=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),yd=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),yp=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),yf=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-information",iconProps:e})})),yh=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),ym=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),yy=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),yg=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),yb=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),yv=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-location",iconProps:e})})),yw=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),y_=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),yx=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),yE=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),yS=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),yO=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),yD=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-money",iconProps:e})})),yP=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),yk=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),yC=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),yj=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),yT=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-password",iconProps:e})})),yR=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),yA=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),yN=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),yM=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),yI=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),y$=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),yL=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),yF=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-report",iconProps:e})})),yB=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),yV=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-save",iconProps:e})})),yU=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-search",iconProps:e})})),yW=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),yK=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),yH=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),yz=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),yG=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),yq=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),yY=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),yZ=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-table",iconProps:e})})),yJ=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-time",iconProps:e})})),yX=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),yQ=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),y0=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),y1=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),y2=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),y3=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),y4=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),y5=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),y6=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-user",iconProps:e})})),y7=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),y9=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-view",iconProps:e})})),y8=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(ga,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),ge=y8,gt=m9,gr=yb,gn=yp,go=yz,gi=(0,fb.memo)((0,fb.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,fb.useRef)(e?document.getElementById(e):void 0);return(0,fb.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,my.jsx)(ha,{value:o.current,fallback:t,children:(0,my.jsx)(ga,{ref:n,icon:e,iconProps:r})})})),ga=(0,fb.memo)((0,fb.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,fb.useRef)(null);return(0,fb.useImperativeHandle)(r,()=>a.current),(0,fb.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,my.jsx)("svg",{ref:a,className:mb()("omrs-icon","-esm-ward__icons-module__icon___uq4qr",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,my.jsx)("use",{href:`#${e}`})})})),gs=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,fJ.useTranslation)(),i=(0,mN.useLocation)(),a=(0,fb.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,my.jsx)("div",{children:(0,my.jsx)(f_,{className:mb()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,my.jsxs)("span",{className:"-esm-ward__dashboard-module__menu___WbY42",children:[(0,my.jsx)(gi,{icon:n,className:"-esm-ward__dashboard-module__icon___L-hKL",size:16}),(0,my.jsx)("span",{children:o(t)})]})})},e)};function gl(e){return function({basePath:t}){return(0,my.jsx)(mN.BrowserRouter,{children:(0,my.jsx)(gs,{basePath:t,...e})})}}function gu(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let gc="u">typeof document?fv().useLayoutEffect:()=>{},gd={prefix:String(Math.round(1e10*Math.random())),current:0},gp=fv().createContext(gd),gf=fv().createContext(!1),gh=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),gm="function"==typeof fv().useId?function(e){let t=fv().useId(),[r]=(0,fb.useState)(gv()),n=r?"react-aria":`react-aria${gd.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,fb.useContext)(gp),r=function(e=!1){let t=(0,fb.useContext)(gp),r=(0,fb.useRef)(null);if(null===r.current&&!e){let e=fv().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let r=gh.get(e);null==r?gh.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,gh.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function gy(){return!1}function gg(){return!0}function gb(e){return()=>{}}function gv(){return"function"==typeof fv().useSyncExternalStore?fv().useSyncExternalStore(gb,gy,gg):(0,fb.useContext)(gf)}let gw=!!("u">typeof window&&window.document&&window.document.createElement),g_=new Map;"u">typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{g_.delete(e)}));let gx=new WeakMap;function gE(e){let[t,r]=(0,fb.useState)(e),n=(0,fb.useRef)(null),o=gm(t),i=(0,fb.useRef)(null),a=gx.get(i);if(l&&a!==o&&(null!=a&&l.unregister(i),l.register(i,o,i),gx.set(i,o)),gw){let e=g_.get(o);e&&!e.includes(n)?e.push(n):g_.set(o,[n])}return gc(()=>()=>{l&&(l.unregister(i),gx.delete(i)),g_.delete(o)},[o]),(0,fb.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function gS(e=[]){let t=gE(),[r,n]=function(e){let[t,r]=(0,fb.useState)(e),n=(0,fb.useRef)(t),o=(0,fb.useRef)(null),i=(0,fb.useRef)(()=>{if(!o.current)return;let e=o.current.next();if(e.done){o.current=null;return}n.current===e.value?i.current():r(e.value)});return gc(()=>{n.current=t,o.current&&i.current()}),[t,(0,fb.useCallback)(e=>{o.current=e(n.current),i.current()},[i])]}(t),o=(0,fb.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return gc(o,[t,o,...e]),r}function gO(...e){return 1===e.length&&e[0]?e[0]:t=>{let r=!1,n=e.map(e=>{let n=gD(e,t);return r||="function"==typeof n,n});if(r)return()=>{n.forEach((t,r)=>{"function"==typeof t?t():gD(e[r],null)})}}}function gD(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}let gP=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function gk(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=gu(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=gP(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=g_.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=g_.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):"ref"===e&&r&&o?t.ref=gO(r,o):t[e]=void 0!==o?o:r}}return t}function gC(e){let t=(0,fb.useRef)(null),r=(0,fb.useRef)(void 0),n=(0,fb.useCallback)(t=>{if("function"==typeof e){let r=e(t);return()=>{"function"==typeof r?r():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,fb.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,r.current&&(r.current(),r.current=void 0),null!=value&&(r.current=n(value))}}),[n])}let gj=Symbol("default");function gT({values:e,children:t}){for(let[r,n]of e)t=fv().createElement(r.Provider,{value:n},t);return t}function gR(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s,render:l}=e;return(0,fb.useMemo)(()=>{let e,u,c;return e="function"==typeof t?t({...s,defaultClassName:o}):t,u="function"==typeof r?r({...s,defaultStyle:a||{}}):r,c="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:u||a?{...a,...u}:void 0,children:c??i,"data-rac":"",render:l?e=>l(e,s):void 0}},[t,r,n,o,i,a,s,l])}function gA(e,t){let r=(0,fb.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||gj;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function gN(e,t,r){let{ref:n,...o}=gA(r,e.slot)||{},i=gC((0,fb.useMemo)(()=>gO(t,n),[t,n])),a=gk(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function gM(e=!0){let[t,r]=(0,fb.useState)(e),n=(0,fb.useRef)(!1),o=(0,fb.useCallback)(e=>{n.current=!0,r(!!e)},[]);return gc(()=>{n.current||r(!1)},[]),[o,t]}function gI(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}function g$(e,t,r){let{render:n,...o}=t,i=(0,fb.useRef)(null),a=(0,fb.useMemo)(()=>gO(r,i),[r,i]);gc(()=>{},[e,n]);let s={...o,ref:a};return n?n(s,void 0):fv().createElement(e,s)}let gL={},gF=new Proxy({},{get(e,t){if("string"!=typeof t)return;let r=gL[t];return r||(r=(0,fb.forwardRef)(g$.bind(null,t)),gL[t]=r),r}}),gB=(0,fb.createContext)(null),gV=null;function gU(e,t="assertive",r=7e3){gV?gV.announce(e,t,r):(gV=new gW,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?gV.announce(e,t,r):setTimeout(()=>{gV?.isAttached()&&gV?.announce(e,t,r)},100))}class gW{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){if(!this.node)return;let n=document.createElement("div");"object"==typeof e?(n.setAttribute("role","img"),n.setAttribute("aria-labelledby",e["aria-labelledby"])):n.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(n):this.politeLog?.appendChild(n),""!==e&&setTimeout(()=>{n.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}let gK=new Set(["id"]),gH=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),gz=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),gG=new Set(["dir","lang","hidden","inert","translate"]),gq=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),gY=/^(data-.*)$/;function gZ(e,t={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:a}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(gK.has(t)||r&&gH.has(t)||n&&gz.has(t)||o&&gG.has(t)||i&&(gq.has(t)||t.endsWith("Capture")&&gq.has(t.slice(0,-7)))||a?.has(t)||gY.test(t))&&(s[t]=e[t]);return s}function gJ(e){if(function(){if(null==gX){gX=!1;try{document.createElement("div").focus({get preventScroll(){return gX=!0,!0}})}catch{}}return gX}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let gX=null,gQ=e=>{var t,r;return"object"==typeof(t=e)&&null!=t&&"window"in t&&t.window===t?e.document:g1(r=e)&&9===r.nodeType?e:e?.ownerDocument??("u">typeof document?document:void 0)},g0=e=>{let t=gQ(e);return t?.defaultView??("u">typeof window?window:void 0)};function g1(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&"number"==typeof e.nodeType}function g2(e,t,r,n){if(null==r||null==e)return()=>{};let o=Array.isArray(e)?e:[e];for(let e of o)e.addEventListener(t,r,n);return()=>{for(let e of o)e.removeEventListener(t,r,n)}}function g3(e,t,r,n){if(null==e)return()=>{};let o=[];for(let i of Array.isArray(e)?e:[e]){let e=i.style.getPropertyValue(t),a=i.style.getPropertyPriority(t);i.style.setProperty(t,r,n),o.unshift(()=>{e?i.style.setProperty(t,e,a):i.style.removeProperty(t)})}return()=>{for(let e of o)e()}}function g4(e,t){return!!t&&!!e&&e.contains(t)}function g5(e){return e.target}function g6(e,t){if(null===t)return[];let r=[t=t??g0(e)];return r}function g7(e){if(!e)return!1;let t=e.getRootNode(),r=g0(e);if(!(t instanceof r.Document||t instanceof r.ShadowRoot))return!1;let n=t.activeElement;return null!=n&&e.contains(n)}let g9="u">typeof Element&&"checkVisibility"in Element.prototype;function g8(e,t){return g9?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=g0(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=g0(e),{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||g8(e.parentElement,e))}let be=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],bt=be.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";be.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let br=be.join(':not([hidden]):not([tabindex="-1"]),');function bn(e,t){return e.matches(bt)&&!bi(e)&&(t?.skipVisibilityCheck||g8(e))}function bo(e){return e.matches(br)&&g8(e)&&!bi(e)}function bi(e){let t=e;for(;null!=t;){if(t instanceof g0(t).HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function ba(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function bs(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function bl(e){let t=(0,fb.useRef)({isFocused:!1,observer:null});return gc(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,fb.useCallback)(r=>{let n=g5(r);(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&(t.current.isFocused=!0,n.addEventListener("focusout",r=>{if(t.current.isFocused=!1,n.disabled){let t=ba(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();n.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let bu=!1;function bc(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function bd(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function bp(e){let t=null;return()=>(null==t&&(t=e()),t)}let bf=bp(function(){return bd(/^Mac/i)}),bh=bp(function(){return bd(/^iPhone/i)}),bm=bp(function(){return bd(/^iPad/i)||bf()&&navigator.maxTouchPoints>1}),by=bp(function(){return bh()||bm()});bp(function(){return bf()||by()});let bg=bp(function(){return bc(/AppleWebKit/i)&&(by()||!bb())});bp(function(){return bg()&&!bb()&&!bw()});let bb=bp(function(){return bc(/Chrome|CriOS|CrMo/i)}),bv=bp(function(){return bc(/Android/i)}),bw=bp(function(){return bc(/(Firefox|FxiOS)/i)});function b_(e){return""===e.pointerType&&!!e.isTrusted||(bv()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function bx(e,t,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}=t;!bg()&&bw()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(bf()?n=!0:o=!0);let s=bg()&&bf()&&!bm()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});bx.isOpening=r,gJ(e),e.dispatchEvent(s),bx.isOpening=!1}bx.isOpening=!1;let bE=null,bS=new Set,bO=new Map,bD=!1,bP=!1,bk={Tab:!0,Escape:!0};function bC(e,t){for(let r of bS)r(e,t)}function bj(e){bD=!0,bx.isOpening||e.metaKey||!bf()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(bE="keyboard",bC("keyboard",e))}function bT(e){bE="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(bD=!0,bC("pointer",e))}function bR(e){!bx.isOpening&&b_(e)&&(bD=!0,bE="virtual")}function bA(e){if(bu)return;let t=g5(e),r=g0(t),n=gQ(t);if(t===r){bP=!0;return}t!==n&&e.isTrusted&&(bD||bP||(bE="virtual",bC("virtual",e)),bD=!1,bP=!1)}function bN(){bu||(bD=!1,bP=!0)}function bM(e){if("u"<typeof window||"u"<typeof document)return;let t=g0(e),r=gQ(e);if(bO.get(t))return;let n=t.HTMLElement.prototype.focus;Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){bD=!0,n.apply(this,arguments)}}),r.addEventListener("keydown",bj,!0),r.addEventListener("keyup",bj,!0),r.addEventListener("click",bR,!0),t.addEventListener("focus",bA,!0),t.addEventListener("blur",bN,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",bT,!0),r.addEventListener("pointermove",bT,!0),r.addEventListener("pointerup",bT,!0)),t.addEventListener("beforeunload",()=>{bI(e)},{once:!0}),bO.set(t,{focus:n})}let bI=(e,t)=>{let r=g0(e),n=gQ(e);t&&n.removeEventListener("DOMContentLoaded",t),bO.has(r)&&(Reflect.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:bO.get(r).focus}),n.removeEventListener("keydown",bj,!0),n.removeEventListener("keyup",bj,!0),n.removeEventListener("click",bR,!0),r.removeEventListener("focus",bA,!0),r.removeEventListener("blur",bN,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",bT,!0),n.removeEventListener("pointermove",bT,!0),n.removeEventListener("pointerup",bT,!0)),bO.delete(r))};function b$(){return"pointer"!==bE}"u">typeof document&&("loading"!==(f=gQ(void 0)).readyState?bM(void 0):f.addEventListener("DOMContentLoaded",()=>{bM(void 0)}));let bL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),bF=new Map,bB=new Set;function bV(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{let n=g5(r);if(!e(r)||!n)return;let o=bF.get(n);if(o&&(o.delete(r.propertyName),0===o.size&&(n.removeEventListener("transitioncancel",t),bF.delete(n)),0===bF.size)){for(let e of bB)e();bB.clear()}};document.body.addEventListener("transitionrun",r=>{let n=g5(r);if(!e(r)||!n)return;let o=bF.get(n);o||(o=new Set,bF.set(n,o),n.addEventListener("transitioncancel",t,{once:!0})),o.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function bU(e){requestAnimationFrame(()=>{for(let[e]of bF)"isConnected"in e&&!e.isConnected&&bF.delete(e);0===bF.size?e():bB.add(e)})}function bW(e){if(!e.isConnected)return;let t=gQ(e);if("virtual"===bE){let r=((e=document)=>e.activeElement)(t);bU(()=>{let n=((e=document)=>e.activeElement)(t);(n===r||n===t.body)&&e.isConnected&&gJ(e)})}else gJ(e)}function bK(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,fb.useCallback)(e=>{if(g5(e)===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=bl(i),s=(0,fb.useCallback)(e=>{let t=g5(e),n=gQ(t),i=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();t===e.currentTarget&&t===i&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function bH(e){if(e)return t=>{let r=!0;e({...t,preventDefault(){t.preventDefault()},isDefaultPrevented:()=>t.isDefaultPrevented(),stopPropagation(){r=!0},continuePropagation(){r=!1,"function"==typeof t.continuePropagation&&t.continuePropagation()},isPropagationStopped:()=>r}),r&&!("function"==typeof t.isPropagationStopped&&t.isPropagationStopped())&&t.stopPropagation()}}"u">typeof document&&("loading"!==document.readyState?bV():document.addEventListener("DOMContentLoaded",bV));let bz=new Set(["shift","alt","control","meta","mod"]),bG=["Alt","Control","Meta","Shift"];function bq(e){return bG.filter(t=>e.has(t))}function bY(e){return e.toLowerCase()}let bZ={space:" ",esc:"escape",del:"delete",ins:"insert",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",pageup:"pageup",pagedown:"pagedown"};function bJ(e){let t,r,{shortcuts:n,allowRepeats:o=!1,allowComposing:i=!1}=e;if(n){let a=function(e){let t=new Map;for(let[r,n]of Object.entries(e)){let e=function(e){let t=e.split("+").reduce((e,t)=>{let r=t.toLowerCase();return bz.has(r)?"shift"===r?e.shift=!0:"alt"===r?e.alt=!0:"control"===r?e.ctrl=!0:"meta"===r?e.meta=!0:"mod"===r&&(e.mod=!0):e.key=t,e},{shift:!1,alt:!1,ctrl:!1,meta:!1,mod:!1,key:""});if(""===t.key)throw Error(`Invalid keyboard shortcut: "${e}". Must include exactly one non-modifier key (e.g. "a", "Enter", "ArrowDown"). Combine any of Shift, Alt, Ctrl, Meta, and Mod.`);return t}(r);t.set(function(e){let t,r,n,o=bq((t=new Set,e.alt&&t.add("Alt"),e.shift&&t.add("Shift"),e.ctrl&&t.add("Control"),e.meta&&t.add("Meta"),e.mod&&t.add(bf()?"Meta":"Control"),t)),i=null!=(n=bZ[r=bY(e.key)])?n:r;return o.length>0?`${o.join("+")}+${i}`:i}(e),n)}return e=>{let r,n,o,i=(n=bq((r=new Set,e.altKey&&r.add("Alt"),e.ctrlKey&&r.add("Control"),e.metaKey&&r.add("Meta"),e.shiftKey&&r.add("Shift"),r)),o=bY(e.key),(n.length>0?`${n.join("+")}+`:"")+o),a=t.get(i),s=a?.(e);void 0===s&&void 0!==a?s={shouldContinuePropagation:!1,shouldPreventDefault:!0}:"boolean"==typeof s&&(s={shouldContinuePropagation:!s,shouldPreventDefault:s}),s?.shouldPreventDefault&&e.preventDefault(),(!a||s?.shouldContinuePropagation)&&e.continuePropagation()}}(n),s=bH(e=>{!g4(e.currentTarget,g5(e))||e.nativeEvent?.repeat&&!o||e.nativeEvent?.isComposing&&!i?e.continuePropagation():a(e)}),l=bH(e=>{!g4(e.currentTarget,g5(e))||e.nativeEvent?.repeat&&!o||e.nativeEvent?.isComposing,e.continuePropagation()});t=e.onKeyDown?gu(e.onKeyDown,s):s,r=e.onKeyUp?gu(e.onKeyUp,l):l}else t=bH(e.onKeyDown),r=bH(e.onKeyUp);return{keyboardProps:e.isDisabled?{}:{onKeyDown:t,onKeyUp:r}}}function bX(e,t){gc(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}let bQ=fv().createContext(null);function b0(e,t){let{focusProps:r}=bK(e),{keyboardProps:n}=bJ(e),o=gk(r,n),i=function(e){let t=(0,fb.useContext)(bQ)||{};bX(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,fb.useRef)(e.autoFocus);(0,fb.useEffect)(()=>{s.current&&t.current&&bW(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:gk({...o,tabIndex:l},a)}}fv().forwardRef(function(e,t){let{children:r,...n}=e,o=gC(t),i={...n,ref:o};return fv().createElement(bQ.Provider,{value:i},r)});let b1="default",b2="",b3=new WeakMap;function b4(e){if(by()&&bg())"disabled"===b1&&(b1="restoring",setTimeout(()=>{bU(()=>{if("restoring"===b1){let t=gQ(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=b2||""),b2="",b1="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&b3.has(e)){let t=b3.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),b3.delete(e)}}let b5=new WeakMap;function b6(e){let t=gQ(e),r=b5.get(t);return void 0!==(r??=function(e,t){let r,n=g0(t),o=gQ(t);if(null==o||null==n)return;let i=`meta[name="${CSS.escape(e)}"], meta[property="${CSS.escape(e)}"]`,a=o.querySelector(i);return a&&a instanceof n.HTMLMetaElement&&("csp-nonce"===e&&a.nonce&&(r??=a.nonce||void 0),a.content&&(r??=a.content||void 0)),"csp-nonce"===e&&(r??=n.__webpack_nonce__||globalThis.__webpack_nonce__||void 0),r}("csp-nonce",t))&&b5.set(t,r),r}let b7=fv().createContext({register:()=>{}});b7.displayName="PressResponderContext";let b9=fv().useInsertionEffect??gc;function b8(e){let t=(0,fb.useRef)(null);return b9(()=>{t.current=e},[e]),(0,fb.useCallback)((...e)=>{let r=t.current;return r?.(...e)},[])}function ve(){let e=(0,fb.useRef)(new Map),t=(0,fb.useCallback)((t,r,n,o)=>{let i=o?.once?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,fb.useCallback)((t,r,n,o)=>{let i=e.current.get(n)?.fn||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,fb.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,fb.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var vt=r(43144);class vr{#e;constructor(e,t,r,n){this.#e=!0;let o=n?.target??r.currentTarget;const i=o?.getBoundingClientRect();let a,s=0,l,u=null;null!=r.clientX&&null!=r.clientY&&(l=r.clientX,u=r.clientY),i&&(null!=l&&null!=u?(a=l-i.left,s=u-i.top):(a=i.width/2,s=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=s,this.key=r.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let vn=Symbol("linkClicked"),vo="react-aria-pressable-style",vi="data-react-aria-pressable";function va(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...f}=function(e){let t=(0,fb.useContext)(b7);if(t){let{register:r,ref:n,...o}=t;e=gk(o,e),r()}return bX(t,e.ref),e}(e),[h,m]=(0,fb.useState)(!1),y=(0,fb.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=ve(),v=(0,fb.useCallback)((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new vr("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i},[s,n,r]),w=(0,fb.useCallback)((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new vr("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new vr("press",n,e);t(r),l&&=r.shouldStopPropagation}return a.isTriggeringEvent=!1,l},[s,o,r,t]),x=b8(w),E=b8((0,fb.useCallback)((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new vr("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0},[s,i])),S=(0,fb.useCallback)(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(vu(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||b4(t.target),t.disposables))r();t.disposables=[]}},[d,b,w]),O=b8(S);(0,fb.useEffect)(()=>{s&&y.current.isPressed&&O({currentTarget:y.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[s]);let D=(0,fb.useCallback)(e=>{c&&S(e)},[c,S]),P=(0,fb.useCallback)(e=>{s||a?.(e)},[s,a]),k=(0,fb.useCallback)((e,t)=>{if(!s&&a){let r=new MouseEvent("click",e);bs(r,t),a(ba(r))}},[s,a]),C=(0,fb.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(vl(t.nativeEvent,t.currentTarget)&&g4(t.currentTarget,g5(t))){vc(g5(t),t.key)&&t.preventDefault();let n=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",n=v(t,"keyboard"));let o=t.currentTarget;g(gQ(t.currentTarget),"keyup",gu(t=>{vl(t,o)&&!t.repeat&&g4(o,g5(t))&&e.target&&E(vu(e.target,t),"keyboard")},r),!0),n&&t.stopPropagation(),t.metaKey&&bf()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||g4(t.currentTarget,g5(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!bx.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||b_(t.nativeEvent))){let e=v(t,"virtual"),n=E(t,"virtual"),o=x(t,"virtual");P(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual",o=E(vu(t.currentTarget,t),n),i=x(vu(t.currentTarget,t),n,!0);r=o&&i,e.isOverTarget=!1,P(t),O(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{if(e.isPressed&&e.target&&vl(t,e.target)){vc(g5(t),t.key)&&t.preventDefault();let r=g5(t),n=g4(e.target,r);x(vu(e.target,t),"keyboard",n),n&&k(t,e.target),b(),"Enter"!==t.key&&vs(e.target)&&g4(e.target,r)&&!t[vn]&&(t[vn]=!0,bx(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!g4(t.currentTarget,g5(t)))return;if(o=t.nativeEvent,!bv()&&0===o.width&&0===o.height||bv()&&1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(by()&&bg()){if("default"===b1){let t=gQ(e);b2=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}b1="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";b3.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=g5(t);"releasePointerCapture"in o&&("hasPointerCapture"in o?o.hasPointerCapture(t.pointerId)&&o.releasePointerCapture(t.pointerId):o.releasePointerCapture(t.pointerId)),g(gQ(t.currentTarget),"pointerup",r,!1),g(gQ(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(g4(t.currentTarget,g5(t))&&0===t.button){if(u){let r=function(e){for(var t;e&&!bn(e,{skipVisibilityCheck:!0});)e=e.parentElement;let r=((e=document)=>e.activeElement)(g0(e).document);if(!r||r===e)return;let n=e?.getRootNode(),o=null!=n&&g1(t=n)&&11===t.nodeType&&"host"in t?n:g0(e),i=t=>t===e||null!=t&&g4(e,t),a=e=>e===r||null!=r&&null!=e&&g4(r,e);bu=!0;let s=!1,l=e=>{(a(g5(e))||s)&&e.stopImmediatePropagation()},u=t=>{(a(g5(t))||s)&&(t.stopImmediatePropagation(),e||s||(s=!0,gJ(r),p()))},c=e=>{(i(g5(e))||s)&&e.stopImmediatePropagation()},d=e=>{(i(g5(e))||s)&&(e.stopImmediatePropagation(),s||(s=!0,gJ(r),p()))};o.addEventListener("blur",l,!0),o.addEventListener("focusout",u,!0),o.addEventListener("focusin",d,!0),o.addEventListener("focus",c,!0);let p=()=>{cancelAnimationFrame(f),o.removeEventListener("blur",l,!0),o.removeEventListener("focusout",u,!0),o.removeEventListener("focusin",d,!0),o.removeEventListener("focus",c,!0),bu=!1,s=!1},f=requestAnimationFrame(p);return p}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{g4(t.currentTarget,g5(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||E(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(vu(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(vu(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(g4(e.target,g5(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?O(t):(gJ(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else O(t);e.isOverTarget=!1}},n=e=>{O(e)};t.onDragStart=e=>{g4(e.currentTarget,g5(e))&&O(e)}}return t},[g,s,u,b,d,D,v,P,k]);return(0,fb.useEffect)(()=>{if(!p)return;let e=gQ(p.current);if(!e||!e.head||e.getElementById(vo))return;let t=e.createElement("style");t.id=vo;let r=b6(e);r&&(t.nonce=r),t.textContent=`
33
+ @layer {
34
+ [${vi}] {
35
+ touch-action: pan-x pan-y pinch-zoom;
36
+ }
37
+ }
38
+ `.trim(),e.head.prepend(t)},[p]),(0,fb.useEffect)(()=>{let e=y.current;return()=>{for(let t of(d||b4(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:gk(f,C,{[vi]:!0})}}function vs(e){return"A"===e.tagName&&e.hasAttribute("href")}function vl(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof g0(t).HTMLInputElement&&!vp(t,r)||t instanceof g0(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&vs(t))&&"Enter"!==r)}function vu(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n,key:t.key}}function vc(e,t){return(!bf()||"Enter"!==t)&&(e instanceof HTMLInputElement?("Enter"!==t||"checkbox"!==e.type&&"radio"!==e.type)&&!vp(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!vs(e)))}let vd=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function vp(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:vd.has(e.type)}"u">typeof HTMLTemplateElement&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}}));let vf=(0,fb.createContext)(!1);function vh(e){let t=(t,r)=>(0,fb.useContext)(vf)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,fb.forwardRef)(t)}function vm(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,fb.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=ve(),l=(0,fb.useCallback)(e=>{g4(e.currentTarget,g5(e))&&i.current.isFocusWithin&&!g4(e.currentTarget,e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),u=bl(l),c=(0,fb.useCallback)(e=>{if(!g4(e.currentTarget,g5(e)))return;let t=g5(e),r=gQ(t),s=((e=document)=>e.activeElement)(r);if(!i.current.isFocusWithin&&s===t){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let t=e.currentTarget;a(r,"focus",e=>{let n=g5(e);if(i.current.isFocusWithin&&!g4(t,n)){let e=new r.defaultView.FocusEvent("blur",{relatedTarget:n});bs(e,t),l(ba(e))}},{capture:!0})}},[n,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function vy(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,fb.useRef)({isFocused:!1,isFocusVisible:r||b$()}),[a,s]=(0,fb.useState)(!1),[l,u]=(0,fb.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,fb.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,fb.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=b$(),s(e),c()},[c]);t={enabled:a,isTextInput:n},bM(),(0,fb.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,r)=>{var n;let o,a,s,l,u,d,p,f;n=!!t?.isTextInput,a=gQ(o=r?g5(r):void 0),l=void 0!==(s=g0(o))?s.HTMLInputElement:HTMLInputElement,u=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,p=void 0!==s?s.KeyboardEvent:KeyboardEvent,f=((e=document)=>e.activeElement)(a),(n=n||f instanceof l&&!bL.has(f.type)||f instanceof u||f instanceof d&&f.isContentEditable)&&"keyboard"===e&&r instanceof p&&!bk[r.key]||(e=>{i.current.isFocusVisible=e,c()})(b$())};return bS.add(e),()=>{bS.delete(e)}},[n,a]);let{focusProps:p}=bK({isDisabled:o,onFocusChange:d}),{focusWithinProps:f}=vm({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?f:p}}let vg=!1,vb=0;function vv(e){"touch"===e.pointerType&&(vg=!0,setTimeout(()=>{vg=!1},500))}function vw(){let e=gQ(null);if(void 0!==e)return 0===vb&&"u">typeof PointerEvent&&e.addEventListener("pointerup",vv),vb++,()=>{!(--vb>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",vv)}}function v_(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,fb.useState)(!1),s=(0,fb.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,fb.useEffect)(vw,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=ve(),{hoverProps:c,triggerHoverEnd:d}=(0,fb.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{vg&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!g4(n.currentTarget,g5(n)))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(gQ(g5(n)),"pointerover",t=>{s.isHovered&&s.target&&!g4(s.target,g5(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&g4(t.currentTarget,g5(t))&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,fb.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}let vx=(0,fb.createContext)({}),vE=vh(function(e,t){[e,t]=gN(e,t,vx);let r=e,{isPending:n}=r,{buttonProps:o,isPressed:i}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:f,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==n||o?void 0:f,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:g,isPressed:b}=va({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:p,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=b0(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=gk(v,g,gZ(e,{labelable:!0}));return{isPressed:b,buttonProps:gk(r,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t);o=function(e,t){if(t){for(let t in e)t.startsWith("on")&&!vS.test(t)&&(e[t]=void 0);e.href=void 0,e.target=void 0}return e}(o,n);let{focusProps:a,isFocused:s,isFocusVisible:l}=vy(e),{hoverProps:u,isHovered:c}=v_({...e,isDisabled:e.isDisabled||n}),d={isHovered:c,isPressed:(r.isPressed||i)&&!n,isFocused:s,isFocusVisible:l,isDisabled:e.isDisabled||!1,isPending:n??!1},p=gR({...e,values:d,defaultClassName:"react-aria-Button"}),f=gE(o.id),h=gE(),m=o["aria-labelledby"];n&&(m?m=`${m} ${h}`:o["aria-label"]&&(m=`${f} ${h}`));let y=(0,fb.useRef)(n);(0,fb.useEffect)(()=>{let e={"aria-labelledby":m||f};!y.current&&s&&n?gU(e,"assertive"):y.current&&s&&!n&&gU(e,"assertive"),y.current=n},[n,s,m,f]);let g=gZ(e,{global:!0});return delete g.onClick,fv().createElement(gF.button,{...gk(g,p,o,a,u),type:"submit"===o.type&&n?"button":o.type,id:f,ref:t,"aria-labelledby":m,slot:e.slot||void 0,"aria-disabled":n?"true":o["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":c||void 0,"data-focused":s||void 0,"data-pending":n||void 0,"data-focus-visible":l||void 0},fv().createElement(gB.Provider,{value:{id:h}},p.children))}),vS=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/,vO=(0,fb.createContext)({}),vD=(0,fb.createContext)({}),vP=vh(function(e,t){[e,t]=gN(e,t,vD);let{elementType:r="span",...n}=e,o=gF[r];return fv().createElement(o,{className:"react-aria-Text",...n,ref:t})});var vk={};function vC(e,t){let r=(0,fb.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}vk={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let vj=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),vT=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function vR(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return vj.has(t.script)}let t=e.split("-")[0];return vT.has(t)}let vA=Symbol.for("react-aria.i18n.locale");function vN(){let e="u">typeof window&&window[vA]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:vR(e)?"rtl":"ltr"}}let vM=vN(),vI=new Set;function v$(){for(let e of(vM=vN(),vI))e(vM)}function vL(){let e=gv(),[t,r]=(0,fb.useState)(vM);return((0,fb.useEffect)(()=>(0===vI.size&&window.addEventListener("languagechange",v$),vI.add(r),()=>{vI.delete(r),0===vI.size&&window.removeEventListener("languagechange",v$)}),[]),e)?{locale:"u">typeof window&&window[vA]||"en-US",direction:"ltr"}:t}let vF=fv().createContext(null);function vB(e){let{locale:t,children:r}=e,n=fv().useMemo(()=>({locale:t,direction:vR(t)?"rtl":"ltr"}),[t]);return fv().createElement(vF.Provider,{value:n},r)}function vV(e){let{children:t}=e,r=vL();return fv().createElement(vF.Provider,{value:r},t)}function vU(e){let{locale:t,children:r}=e;return t?fv().createElement(vB,{locale:t,children:r}):fv().createElement(vV,{children:r})}function vW(){let e=vL();return(0,fb.useContext)(vF)||e}let vK=new Map;class vH{constructor(e,t={}){this.formatter=vG(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==vY&&(vY="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),vY&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=vG(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}}let vz={true:{ja:"h11"},false:{}};function vG(e,t={}){if("boolean"==typeof t.hour12&&(null==vq&&(vq="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),vq)){let r=vz[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=r??n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(vK.has(r))return vK.get(r);let n=new Intl.DateTimeFormat(e,t);return vK.set(r,n),n}let vq=null,vY=null;function vZ(e){e=vC(e??{},vJ);let{locale:t}=vW();return(0,fb.useMemo)(()=>new vH(t,e),[t,e])}function vJ(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}let vX=Symbol.for("react-aria.i18n.locale"),vQ=Symbol.for("react-aria.i18n.strings");class v0{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]),i=function(e){if(Intl.Locale)return new Intl.Locale(e).script}(e);if(i&&t[`${o}-${i}`])return t[`${o}-${i}`];if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[vX];if(void 0===h){let e=window[vQ];if(!e)return null;for(let r in h={},e)h[r]=new v0({[t]:e[r]},t)}let r=h?.[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}let v1=new Map,v2=new Map;class v3{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,i=v1.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),v1.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=v2.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),v2.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}}let v4=new WeakMap;function v5(e,t){let r;return t&&v0.getGlobalDictionaryForPackage(t)||((r=v4.get(e))||(r=new v0(e),v4.set(e,r)),r)}function v6(e,t){let{locale:r}=vW(),n=v5(e,t);return(0,fb.useMemo)(()=>new v3(r,n),[r,n])}function v7(e,t){return e-t*Math.floor(e/t)}function v9(e,t,r,n){let o=(t=we(e,t))-1,i=-2;return r<=2?i=0:v8(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function v8(e){return e%4==0&&(e%100!=0||e%400==0)}function we(e,t){return"BC"===e?1-t:t}function wt(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let wr={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]};class wn{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=v7(t,146097),o=Math.floor(n/36524),i=v7(n,36524),a=Math.floor(i/1461),s=Math.floor(v7(i,1461)/365),[l,u]=wt(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-v9(l,u,1,1),d=2;e<v9(l,u,3,1)?d=0:v8(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),f=e-v9(l,u,p,1)+1;return new wk(l,u,p,f)}toJulianDay(e){return v9(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return wr[v8(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return v8(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function wo(e,t){let r=e.copy(),n="hour"in r?wh(r,t):0;wi(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wa(r),ws(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,wa(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wa(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){let e=r.calendar.isInverseEra?.(r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let i=r.calendar.getMonthsInYear(r);return r.month>i&&(r.month=i,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function wi(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function wa(e){for(;e.month<1;)wi(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,wi(e,1)}function ws(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))}function wl(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),ws(e)}function wu(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function wc(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),wl(r),r}function wd(e,t){let 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),wp(r),r}function wp(e){e.millisecond=Math.max(0,Math.min(e.millisecond,999)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function wf(e,t){let r=e%t;return r<0&&(r+=t),r}function wh(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=wf(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=wf(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=wf(e.minute,60),r=Math.floor(e.hour/24),e.hour=wf(e.hour,24),r}function wm(e,t){let r=e.copy();return wh(r,t),r}function wy(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=wb(i,r,0,t.length-1,n?.round),o.era=t[i],wl(o);break}case"year":o.calendar.isInverseEra?.(o)&&(r=-r),o.year=wb(e.year,r,-1/0,9999,n?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=wb(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":o.day=wb(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),wl(o),o}function wg(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if(n?.hourCycle===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=wb(t,r,i,a,n?.round);break}case"minute":o.minute=wb(e.minute,r,0,59,n?.round);break;case"second":o.second=wb(e.second,r,0,59,n?.round);break;case"millisecond":o.millisecond=wb(e.millisecond,r,0,999,n?.round);break;default:throw Error("Unsupported field "+t)}return o}function wb(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function wv(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?w$(wo(wV(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):wR(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),wU(wF(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}let ww=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,w_=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,wx=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function wE(e,t,r){let n=Number(e);if(n<t||n>r)throw RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function wS(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function wO(e){let t,r=wU(e,new wn);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function wD(e){return`${wO(e)}T${wS(e)}`}function wP(e){let t,r="object"==typeof e[0]?e.shift():new wn;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}class wk{#t;constructor(...e){let[t,r,n,o,i]=wP(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,wl(this)}copy(){return this.era?new wk(this.calendar,this.era,this.year,this.month,this.day):new wk(this.calendar,this.year,this.month,this.day)}add(e){return wo(this,e)}subtract(e){return wo(this,wu(e))}set(e){return wc(this,e)}cycle(e,t,r){return wy(this,e,t,r)}toDate(e){return wL(this,e)}toString(){return wO(this)}compare(e){return wX(this,e)}}class wC{#t;constructor(e=0,t=0,r=0,n=0){this.hour=e,this.minute=t,this.second=r,this.millisecond=n,wp(this)}copy(){return new wC(this.hour,this.minute,this.second,this.millisecond)}add(e){return wm(this,e)}subtract(e){return wm(this,wu(e))}set(e){return wd(this,e)}cycle(e,t,r){return wg(this,e,t,r)}toString(){return wS(this)}compare(e){var t,r;return t=this,r=e,wQ(t)-wQ(r)}}class wj{#t;constructor(...e){let[t,r,n,o,i]=wP(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,wl(this)}copy(){return this.era?new wj(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new wj(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return wo(this,e)}subtract(e){return wo(this,wu(e))}set(e){return wc(wd(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return wy(this,e,t,r);default:return wg(this,e,t,r)}}toDate(e,t){return wL(this,e,t)}toString(){return wD(this)}compare(e){var t,r;let n=wX(this,e);return 0===n?(t=this,r=wV(e),wQ(t)-wQ(r)):n}}class wT{#t;constructor(...e){let[t,r,n,o,i]=wP(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,wl(this)}copy(){return this.era?new wT(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new wT(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return wv(this,e)}subtract(e){return wv(this,wu(e))}set(e,t){let r,n;return 0===(n=wd(wc(r=wV(this),e),e)).compare(r)?this:wU(wF(w$(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if(n?.hourCycle===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let i=wV(e),a=wU(wd(i,{hour:t}),new wn),s=[w$(a,e.timeZone,"earlier"),w$(a,e.timeZone,"later")].filter(t=>wF(t,e.timeZone).day===a.day)[0],l=wU(wd(i,{hour:o}),new wn),u=[w$(l,e.timeZone,"earlier"),w$(l,e.timeZone,"later")].filter(t=>wF(t,e.timeZone).day===l.day).pop(),c=wR(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return wU(wF(c=36e5*wb(d,r,Math.floor(s/36e5),Math.floor(u/36e5),n?.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return wg(e,t,r,n);case"era":case"year":case"month":case"day":return wU(wF(w$(wy(wV(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(wR(e)-e.offset)}toString(){var e;let t,r,n,o,i;return`${wD(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=Math.floor(e%36e5/6e4),o=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`,0!==o&&(i+=`:${String(o).padStart(2,"0")}`),i}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){var t,r;return this.toDate().getTime()-(t=e,r=this.timeZone,t instanceof wT?t.timeZone===r?t:wW(t,r):wF(w$(t,r,void 0),r)).toDate().getTime()}}function wR(e){return wA(we((e=wU(e,new wn)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function wA(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function wN(e,t){if("UTC"===t)return 0;if(e>0&&t===w1())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=wI(e,t);return wA(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let wM=new Map;function wI(e,t){let r=wM.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),wM.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function w$(e,t,r="compatible"){var n,o,i;let a=wV(e);if("UTC"===t)return wR(a);if(t===w1()&&"compatible"===r){a=wU(a,new wn);let e=new Date,t=we(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=wR(a),l=wN(s-864e5,t),u=wN(s+864e5,t),c=(n=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=wI(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function wL(e,t,r="compatible"){return new Date(w$(e,t,r))}function wF(e,t){let r=wN(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new wT(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function wB(e){return new wk(e.calendar,e.era,e.year,e.month,e.day)}function wV(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new wj(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function wU(e,t){if(wG(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,wl(n),n}function wW(e,t){return wU(wF(wR(e)-e.offset,t),e.calendar)}let wK={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function wH(e,t){return t=wU(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function wz(e,t){return wG(e.calendar,t.calendar)&&wH(e,t)}function wG(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let wq={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function wY(e,t,r){let n=Math.ceil(e.calendar.toJulianDay(e)+1-(r?wq[r]:function(e){let t=w6.get(e);if(!t){if(Intl.Locale){let r=new Intl.Locale(e);if("getWeekInfo"in r&&(t=r.getWeekInfo()))return w6.set(e,t),t.firstDay}let r=function(e){if(Intl.Locale){let t=w5.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&w5.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let r=e.split("-fw-")[1].split("-")[0];t="mon"===r?{firstDay:1}:"tue"===r?{firstDay:2}:"wed"===r?{firstDay:3}:"thu"===r?{firstDay:4}:"fri"===r?{firstDay:5}:"sat"===r?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:r&&wK[r]||0};w6.set(e,t)}return t.firstDay}(t)))%7;return n<0&&(n+=7),n}function wZ(e){return wF(Date.now(),e)}function wJ(e){return wB(wZ(e))}function wX(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function wQ(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let w0=null;function w1(){return null==w0&&(w0=new Intl.DateTimeFormat().resolvedOptions().timeZone),w0}function w2(e){return e.subtract({days:e.day-1})}function w3(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function w4(e,t,r){let n=wY(e,t,r);return e.subtract({days:n})}let w5=new Map,w6=new Map;function w7(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function w9(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function w8(e){return e&&e.__esModule?e.default:e}let _e=new WeakMap;function _t(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function _r(e,t,r,n){let o=v6(w8(vk),"@react-aria/calendar"),i=_t(e)||_t(t),a=vZ({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=vZ({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,fb.useMemo)(()=>{if(wH(e,w2(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),wH(t,w3(e)))return a.format(i.toDate(r));if(wH(t,w3(t)))return n?_n(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?_n(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function _n(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function _o(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=gE(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function _i(e,t){let r=(0,fb.useRef)(!0),n=(0,fb.useRef)(null),o=b8(e);(0,fb.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,fb.useEffect)(()=>{let e=n.current;r.current?r.current=!1:(!e||t.some((t,r)=>!Object.is(t,e[r])))&&o(),n.current=t},t)}function _a(e,t){var r;let n=v6((r=vk)&&r.__esModule?r.default:r,"@react-aria/calendar"),o=gZ(e),i=_r(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=_r(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);_i(()=>{t.isFocused||gU(a)},[a]);let s=function(e){let t,r,n=v6(w8(vk),"@react-aria/calendar");"highlightedRange"in e?{start:t,end:r}=e.highlightedRange||{}:(t=Array.isArray(e.value)?e.value[0]:e.value??void 0,r=Array.isArray(e.value)?e.value.at(-1):e.value??void 0);let o=vZ({weekday:"long",month:"long",year:"numeric",day:"numeric",era:_t(t)||_t(r),timeZone:e.timeZone}),{locale:i}=vW(),a=(0,fb.useMemo)(()=>new Intl.ListFormat(i),[i]),s="anchorDate"in e?e.anchorDate:null;return(0,fb.useMemo)(()=>{if(!s&&t&&r){if(wH(t,r)){let r=o.format(t.toDate(e.timeZone));return n.format("selectedDateDescription",{date:r})}else if("highlightedRange"in e){let i=_n(o,n,t,r,e.timeZone);return n.format("selectedRangeDescription",{dateRange:i})}else if(Array.isArray(e.value)){let t=e.value.map(t=>o.format(t.toDate(e.timeZone))),r=a.format(t);return n.format("selectedDateDescription",{date:r})}}return""},[t,r,s,e,n,o,a])}(t);_i(()=>{s&&gU(s,"polite",4e3)},[s]);let l=gS([!!e.errorMessage,e.isInvalid,e.validationState]);_e.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:l,selectedDateDescription:s});let[u,c]=(0,fb.useState)(!1),d=e.isDisabled||t.isNextVisibleRangeInvalid();d&&u&&(c(!1),t.setFocused(!0));let[p,f]=(0,fb.useState)(!1),h=e.isDisabled||t.isPreviousVisibleRangeInvalid();return h&&p&&(f(!1),t.setFocused(!0)),{calendarProps:gk(o,_o({id:e.id,"aria-label":[e["aria-label"],a].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format("next"),isDisabled:d,onFocusChange:c},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format("previous"),isDisabled:h,onFocusChange:f},errorMessageProps:{id:l},title:i}}function _s(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return e===n&&"hidden"!==r.overflow&&(o=!0),o&&t&&(o=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),o}function _l(e,t){let r=e;for(_s(r,t)&&(r=r.parentElement);r&&!_s(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function _u(e,t){let r=[],n=document.scrollingElement||document.documentElement;for(;e&&(_s(e,t)&&r.push(e),e!==n);)e=e.parentElement;return r}function _c(e,t,r={}){if(e===t)return;let n=t.getBoundingClientRect();!function(e,t,r,n={}){let{block:o="nearest",inline:i="nearest"}=n,a=e.scrollTop,s=e.scrollLeft,l=e.getBoundingClientRect(),u=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,p=e===d,f=e===d?0:l.top,h=e===d?e.clientHeight:l.bottom,m=e===d?0:l.left,y=e===d?e.clientWidth:l.right,g=parseFloat(u.scrollMarginTop)||0,b=parseFloat(u.scrollMarginBottom)||0,v=parseFloat(u.scrollMarginLeft)||0,w=parseFloat(u.scrollMarginRight)||0,x=parseFloat(c.scrollPaddingTop)||0,E=parseFloat(c.scrollPaddingBottom)||0,S=parseFloat(c.scrollPaddingLeft)||0,O=parseFloat(c.scrollPaddingRight)||0,D=parseFloat(c.borderTopWidth)||0,P=parseFloat(c.borderBottomWidth)||0,k=parseFloat(c.borderLeftWidth)||0,C=parseFloat(c.borderRightWidth)||0,j=r.top-g,T=r.bottom+b,R=r.left-v,A=r.right+w,N=e===d?0:k+C,M=e===d?0:D+P,I=e===d?0:e.offsetWidth-e.clientWidth-N,$=e===d?0:e.offsetHeight-e.clientHeight-M,L=f+(p?0:D)+x,F=h-(p?0:P)-E-$,B=m+(p?0:k)+S,V=y-(p?0:C)-O;by()&&bg()||"ltr"===c.direction?V-=I:"rtl"===c.direction&&(B+=I);let U=j<L||T>F,W=R<B||A>V;if(U&&"start"===o)a+=j-L;else if(U&&"center"===o)a+=(j+T)/2-(L+F)/2;else if(U&&"end"===o)a+=T-F;else if(U&&"nearest"===o){let e=j-L,t=T-F;a+=Math.abs(e)<=Math.abs(t)?e:t}if(W&&"start"===i)s+=R-B;else if(W&&"center"===i)s+=(R+A)/2-(B+V)/2;else if(W&&"end"===i)s+=A-V;else if(W&&"nearest"===i){let e=R-B,t=A-V;s+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:s,top:a})}(e,t,n,r)}function _d(e,t={}){let{containingElement:r}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:n}=e.getBoundingClientRect(),o=_u(e,!0);for(let t of o)_c(t,e);let{left:i,top:a}=e.getBoundingClientRect();if(Math.abs(t-i)>1||Math.abs(n-a)>1){for(let e of o=r?_u(r,!0):[])_c(e,r,{block:"center",inline:"center"});for(let t of _u(e,!0))_c(t,e)}}else{let{left:t,top:n}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:o,top:i}=e.getBoundingClientRect();(Math.abs(t-o)>1||Math.abs(n-i)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let _p=0,_f=new Map;function _h(e){let[t,r]=(0,fb.useState)();return gc(()=>{if(!e)return;let t=_f.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${_p++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},_f.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),_f.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function _m(e,t,r,n){let o=b8(r),i=null==r;(0,fb.useEffect)(()=>{if(!i&&null!=e.current)return g2(e.current,t,o,n)},[e,t,n,i])}class _y extends wn{fromJulianDay(e){let t=super.fromJulianDay(e);return new wk(this,we(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(_g(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(_g(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function _g(e){let[t,r]=wt(e.year+-543);return new wk(t,r,e.month,e.day)}function _b(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function _v(e,t){let r=Math.floor(4*(t-e)/1461);t>=_b(e,r+1,1,1)&&r++;let n=1+Math.floor((t-_b(e,r,1,1))/30),o=t+1-_b(e,r,n,1);return[r,n,o]}function _w(e){return Math.floor(e%4/3)}function __(e,t){return t%13!=0?30:_w(e)+5}class _x{fromJulianDay(e){let[t,r,n]=_v(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new wk(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),_b(1723856,t,e.month,e.day)}getDaysInMonth(e){return __(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+_w(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class _E extends _x{fromJulianDay(e){let[t,r,n]=_v(1723856,e);return new wk(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class _S extends _x{fromJulianDay(e){let[t,r,n]=_v(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new wk(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),_b(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),__(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let _O=765433;function _D(e){return 7>v7(7*e+1,19)}function _P(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>v7(3*(r+1),7)&&(r+=1),r}function _k(e){let t,r;return _P(e)+(t=_P(e-1),r=_P(e),_P(e+1)-r==356?2:+(r-t==382))}function _C(e){return _k(e+1)-_k(e)}function _j(e,t){if(t>=6&&!_D(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=_C(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!_D(e):30}class _T{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/_O*19+234)/235)+1,n=_k(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=_k(--r)));let i=1,a=0;for(;a<o;)a+=_j(r,i),i++;let s=o-(a-=_j(r,--i));return new wk(this,r,i,s)}toJulianDay(e){let t=_k(e.year);for(let r=1;r<e.month;r++)t+=_j(e.year,r);return t+e.day+347997}getDaysInMonth(e){return _j(e.year,e.month)}getMonthsInYear(e){return _D(e.year)?13:12}getDaysInYear(e){return _C(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(_D(t.year)&&!_D(e.year)&&t.month>6?e.month--:!_D(t.year)&&_D(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class _R extends wn{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-v9(o.era,o.year,1,1);if(a<80?(i--,a+=(t=v8(o.year-1)?31:30)+155+90+10):(t=v8(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new wk(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=wt(e.year+78);return(v8(o)?(t=31,r=v9(n,o,3,21)):(t=30,r=v9(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&v8(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function _A(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function _N(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+_A(t,n,1,1)))/29.5)+1),i=r-_A(t,n,o,1)+1;return new wk(e,n,o,i)}function _M(e){return(14+11*e)%30<11}class _I{fromJulianDay(e){return _N(this,1948440,e)}toJulianDay(e){return _A(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&_M(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return _M(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class _$ extends _I{fromJulianDay(e){return _N(this,1948439,e)}toJulianDay(e){return _A(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function _L(e){return 460322+c[e-1300]}function _F(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function _B(e,t){let r=_L(e);for(let n=1;n<t;n++)r+=_F(e,n);return r}function _V(e){return c[e+1-1300]-c[e-1300]}class _U extends _I{constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let r=1;r<=12;r++)e+=_F(t,r)}}}fromJulianDay(e){let t=e-1948440,r=_L(1300),n=_L(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-_L(++e)+1;let o=_V(e);if(n===o){r=12;break}if(n<o){let t=_F(e,r);for(r=1;n>t;)n-=t,t=_F(e,++r);break}}return new wk(this,e,r,t-_B(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+_B(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):_F(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):_V(e.year)}}let _W=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],_K=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],_H=[1867,1911,1925,1988,2018],_z=["meiji","taisho","showa","heisei","reiwa"];function _G(e){let t=_W.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?_W.length-1:0===t?0:t-1}function _q(e){let t=_H[_z.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new wk(e.year+t,e.month,e.day)}class _Y extends wn{fromJulianDay(e){let t=super.fromJulianDay(e),r=_G(t);return new wk(this,_z[r],t.year-_H[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(_q(e))}balanceDate(e){let t=_q(e),r=_G(t);_z[r]!==e.era&&(e.era=_z[r],e.year=t.year-_H[r]),this.constrainDate(e)}constrainDate(e){let t=_z.indexOf(e.era),r=_K[t];if(null!=r){let[n,o,i]=r,a=n-_H[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=_W[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return _z}getYearsInEra(e){let t=_z.indexOf(e.era),r=_W[t],n=_W[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(_q(e))}getMinimumMonthInYear(e){let t=_Z(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=_Z(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function _Z(e){if(1===e.year)return _W[_z.indexOf(e.era)]}let _J=[0,31,62,93,124,155,186,216,246,276,306,336];class _X{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),i=n-_J[o]+1;return new wk(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=_J[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>v7(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function _Q(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function _0(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class _1 extends wn{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=_0(we(t.era,t.year));return new wk(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(_2(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=_0(_Q(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(_2(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function _2(e){let[t,r]=wt(_Q(e));return new wk(t,r,e.month,e.day)}function _3(e){switch(e){case"buddhist":return new _y;case"ethiopic":return new _x;case"ethioaa":return new _E;case"coptic":return new _S;case"hebrew":return new _T;case"indian":return new _R;case"islamic-civil":return new _I;case"islamic-tbla":return new _$;case"islamic-umalqura":return new _U;case"japanese":return new _Y;case"persian":return new _X;case"roc":return new _1;default:return new wn}}function _4(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function _5(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=_6(e,t,r).subtract(i);return _9(e,a,t,r,n,o)}function _6(e,t,r,n,o){let i=e;if(t.years)i=w2(e.subtract({months:e.month-1}));else t.months?i=w2(e):(t.weeks||t.days&&t.days>7)&&(i=w4(e,r));return _9(e,i,t,r,n,o)}function _7(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=_6(e,t,r).subtract(i);return _9(e,a,t,r,n,o)}function _9(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=w9(t,_6(wB(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=w7(t,_7(wB(i),r,n));e&&(t=e)}return t}function _8(e,t,r){if(t){let r=w9(e,wB(t));r&&(e=r)}if(r){let t=w7(e,wB(r));t&&(e=t)}return e}function xe(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let xt="u">typeof document?fv().useInsertionEffect??fv().useLayoutEffect:()=>{};function xr(e,t,r){let[n,o]=(0,fb.useState)(e||t),i=(0,fb.useRef)(n),a=(0,fb.useRef)(void 0!==e),s=void 0!==e;(0,fb.useEffect)(()=>{a.current,a.current=s},[s]);let l=s?e:n;xt(()=>{i.current=l});let[,u]=(0,fb.useReducer)(()=>({}),{});return[l,(0,fb.useCallback)((e,...t)=>{let n="function"==typeof e?e(i.current):e;Object.is(i.current,n)||(i.current=n,o(n),u(),r?.(n,...t))},[r])]}function xn(e){let t=(0,fb.useMemo)(()=>new vH(e.locale),[e.locale]),r=(0,fb.useMemo)(()=>t.resolvedOptions(),[t]),{locale:n,createCalendar:o,visibleDuration:i={months:1},minValue:a,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible",selectionMode:d="single",firstDayOfWeek:p,weeksInMonth:f}=e,h=(0,fb.useMemo)(()=>o(r.calendar),[o,r.calendar]),[m,y]=xr(e.value,e.defaultValue??null,e.onChange),g=(0,fb.useMemo)(()=>Array.isArray(m)?m.map(e=>wU(wB(e),h)):m?wU(wB(m),h):null,[m,h]),b=(0,fb.useMemo)(()=>{let e=Array.isArray(m)?m[0]:m;return e&&"timeZone"in e?e.timeZone:r.timeZone},[m,r.timeZone]),[v,w]=xr((0,fb.useMemo)(()=>e.focusedValue?_8(wU(wB(e.focusedValue),h),a,s):void 0,[e.focusedValue,h,a,s]),(0,fb.useMemo)(()=>e.defaultFocusedValue?_8(wU(wB(e.defaultFocusedValue),h),a,s):g?_8(Array.isArray(g)?g[0]:g,a,s):_8(wU(wJ(b),h),a,s),[e.defaultFocusedValue,g,b,h,a,s]),e.onFocusChange),x=()=>{switch(l){case"start":return _6(v,i,n,a,s);case"end":return _7(v,i,n,a,s);default:return _5(v,i,n,a,s)}},[E,S]=(0,fb.useState)(x),[O,D]=(0,fb.useState)(e.autoFocus||!1),[P,k]=(0,fb.useState)(i);i!==P&&(i.days!==P.days||i.weeks!==P.weeks||i.months!==P.months||i.years!==P.years)&&(k(i),S(x()));let C=(0,fb.useMemo)(()=>{let e={...i};return e.days?e.days--:e.days=-1,E.add(e)},[E,i]),[j,T]=(0,fb.useState)(h);if(!wG(h,j)){let e=wU(v,h);S(_5(e,i,n,a,s)),w(e),T(h)}function R(e){w(e=_8(e,a,s))}function A(e){let t=_8(e,a,s),r=a??w7(t,E),n=xe(t,r,u);if(!n)return null;let o=Array.isArray(m)?m[0]:m,i=wU(n,o?.calendar||new wn);return o&&"hour"in o?o.set(i):i}function N(t){if(!e.isDisabled&&!e.isReadOnly){if(null===t)return void y("multiple"===d?[]:null);if(Array.isArray(t))y(t.map(A).filter(Boolean));else{let e=A(t);e&&y(e)}}}_4(v,a,s)?w(_8(v,a,s)):0>v.compare(E)?S(_7(v,i,n,a,s)):v.compare(C)>0&&S(_6(v,i,n,a,s));let M=(0,fb.useMemo)(()=>!!g&&(Array.isArray(g)?g.some(e=>u?.(e)||_4(e,a,s)):u?.(g)||_4(g,a,s)),[g,u,a,s]),I=e.isInvalid||"invalid"===e.validationState||M,$=(0,fb.useMemo)(()=>"visible"===c?i:xo(i),[c,i]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:g,setValue:N,selectionMode:d,visibleDuration:i,visibleRange:{start:E,end:C},minValue:a,maxValue:s,focusedDate:v,timeZone:b,validationState:I?"invalid":null,isValueInvalid:I,setFocusedDate(e){R(e)},focusNextDay(){R(v.add({days:1}))},focusPreviousDay(){R(v.subtract({days:1}))},focusNextRow(){i.days?this.focusNextPage():(i.weeks||i.months||i.years)&&R(v.add({weeks:1}))},focusPreviousRow(){i.days?this.focusPreviousPage():(i.weeks||i.months||i.years)&&R(v.subtract({weeks:1}))},focusNextPage(){let e=E.add($);w(_8(v.add($),a,s)),S(_6(_9(v,e,$,n,a,s),$,n))},focusPreviousPage(){let e=E.subtract($);w(_8(v.subtract($),a,s)),S(_6(_9(v,e,$,n,a,s),$,n))},focusSectionStart(){i.days?R(E):i.weeks?R(w4(v,n)):(i.months||i.years)&&R(w2(v))},focusSectionEnd(){i.days?R(C):i.weeks?R(w4(v,n,void 0).add({days:6})):(i.months||i.years)&&R(w3(v))},focusNextSection(e){e||i.days?i.days?this.focusNextPage():i.weeks?R(v.add({months:1})):(i.months||i.years)&&R(v.add({years:1})):R(v.add(xo(i)))},focusPreviousSection(e){e||i.days?i.days?this.focusPreviousPage():i.weeks?R(v.subtract({months:1})):(i.months||i.years)&&R(v.subtract({years:1})):R(v.subtract(xo(i)))},selectFocusedDate(){u&&u(v)||this.selectDate(v)},selectDate(t){if(!e.isDisabled&&!e.isReadOnly)if("multiple"===d&&null!=t){let e=A(t);if(!e)return;let r=[];Array.isArray(m)?r=m:null!=m&&(r=[m]);let n=r.findIndex(t=>wH(t,e));y(n>=0?r.slice(0,n).concat(r.slice(n+1)):[...r,e])}else N(t)},isFocused:O,setFocused:D,isInvalid:e=>_4(e,a,s),isSelected(e){return!(!g||this.isCellDisabled(e)||this.isCellUnavailable(e))&&(Array.isArray(g)?g.some(t=>wH(t,e)):wH(e,g))},isCellFocused:e=>O&&v&&wH(e,v),isCellDisabled(t){return e.isDisabled||0>t.compare(E)||t.compare(C)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=E.subtract({days:1});return wH(e,E)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=C.add({days:1});return wH(e,C)||this.isInvalid(e)},getDatesInWeek(e,t=E){let r=t.add({weeks:e}),o=[],a=i.days&&i.days<7?i.days:7;if(7===a){let e=wY(r=w4(r,n,p),n,p);for(let t=0;t<e;t++)o.push(null)}for(;o.length<a;){o.push(r);let e=r.add({days:1});if(wH(r,e))break;r=e}for(;o.length<a;)o.push(null);return o},getWeeksInMonth(e=E){let t,r=f||(t=e.calendar.getDaysInMonth(e),Math.ceil((wY(w2(e),n,p)+t)/7));return(i.weeks||i.days)&&(r=i.weeks??0,i.days&&(r+=Math.ceil(i.days/7))),r}}}function xo(e){let t={...e};for(let r in e)t[r]=1;return t}function xi(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:wB(e),end:wB(t)}):null}function xa(e,t){return(e=wU(e,t?.calendar||new wn),t&&"hour"in t)?t.set(e):e}function xs(e,t,r,n){let o=e.add({days:n}),i=e.subtract(r),a=e.add(r);for(;(n<0?o.compare(i)>=0:0>=o.compare(a))&&!t(o);)o=o.add({days:n});if(t(o))return o.add({days:-n})}let xl={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function xu(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,fb.useState)(!1),{focusWithinProps:i}=vm({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,fb.useMemo)(()=>n?t:t?{...xl,...t}:xl,[n]);return{visuallyHiddenProps:{...i,style:a}}}function xc(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=xu(e);return fv().createElement(r,gk(i,a),t)}let xd=(0,fb.createContext)(null),xp=(0,fb.createContext)(null),xf=(0,fb.createContext)(null),xh=(0,fb.createContext)(null),xm=(0,fb.forwardRef)(function(e,t){[e,t]=gN(e,t,xd);let{locale:r}=vW(),n=xn({...e,locale:r,createCalendar:e.createCalendar||_3}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=_a(e,n),u=gR({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"}),c=gZ(e,{global:!0});return fv().createElement(gF.div,{...gk(c,u,o),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},fv().createElement(gT,{values:[[vx,{slots:{previous:i,next:a}}],[vO,{"aria-hidden":!0,level:2,children:l}],[xf,n],[xd,e],[vD,{slots:{errorMessage:s}}]]},fv().createElement(xc,null,fv().createElement("h2",null,o["aria-label"])),u.children,fv().createElement(xc,null,fv().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),xy=(0,fb.forwardRef)(function(e,t){[e,t]=gN(e,t,xp);let{locale:r}=vW(),n=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=xr(t,r||null,n),[p,f]=(0,fb.useState)(null),h="center";if(c&&c.start&&c.end){let e=_5(wB(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,fb.useMemo)(()=>{let t=e.isDateUnavailable;if(t)return e=>t(e,p)},[e.isDateUnavailable,p]),y=(0,fb.useCallback)(t=>t&&m&&!e.allowsNonContiguousRanges?{start:xs(t,m,a,-1),end:xs(t,m,a,1)}:null,[m,a,e.allowsNonContiguousRanges]),g=(0,fb.useMemo)(()=>y(p),[y,p]),b=(0,fb.useMemo)(()=>w9(s,g?.start),[s,g]),v=(0,fb.useMemo)(()=>w7(l,g?.end),[l,g]),w=xn({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:e.selectionAlignment||h,isDateUnavailable:m}),x=p?xi(p,w.focusedDate):c&&xi(c.start,c.end),E=t=>{if(e.isReadOnly)return;let r=xe(_8(t,b,v),w.visibleRange.start,m);if(r)if(p){let e=xi(p,r);e&&d({start:xa(e.start,c?.start),end:xa(e.end,c?.end)}),f(null)}else f(r)},[S,O]=(0,fb.useState)(!1),D=(0,fb.useMemo)(()=>!!c&&!p&&(!!(m&&(m(c.start)||m(c.end)))||_4(c.start,s,l)||_4(c.end,s,l)),[m,c,p,s,l]),P=e.isInvalid||"invalid"===e.validationState||D;return{...w,value:c,setValue:d,anchorDate:p,setAnchorDate:f,highlightedRange:x,validationState:P?"invalid":null,isValueInvalid:P,selectFocusedDate(){w.isCellUnavailable(w.focusedDate)||E(w.focusedDate)},commitSelection(){E(w.focusedDate)},selectDate:E,highlightDate(e){p&&w.setFocusedDate(e)},isSelected:e=>!!(x&&e.compare(x.start)>=0&&0>=e.compare(x.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||_4(e,g?.start,g?.end),isDragging:S,setDragging:O,clearSelection(){f(null),d(null)},focusNearestAvailableDate(e){let t=y(e),r=e=>this.isInvalid(e)||_4(e,t?.start,t?.end),n=e.add({days:1});r(n)&&(n=e.subtract({days:1})),r(n)||(this.setFocusedDate(n),this.setFocused(!0))}}}({...e,locale:r,createCalendar:e.createCalendar||_3}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=function(e,t,r){let{commitBehavior:n="select",...o}=e,i=_a(o,t),a=(0,fb.useRef)(!1),s=(0,fb.useRef)("u">typeof window?window:null);_m(s,"pointerdown",e=>{a.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.commitSelection()};return _m(s,"pointerup",e=>{if(a.current){a.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let o=g5(e);r.current&&g7(r.current)&&(!g4(r.current,o)||!o.closest('button, [role="button"]'))&&l[n]()}),i.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&g4(r.current,e.relatedTarget)||!t.anchorDate||l[n]())},_m(r,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),i}(e,n,t),u=gR({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"}),c=gZ(e,{global:!0});return fv().createElement(gF.div,{...gk(u,c,o),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},fv().createElement(gT,{values:[[vx,{slots:{previous:i,next:a}}],[vO,{"aria-hidden":!0,level:2,children:l}],[xh,n],[xp,e],[vD,{slots:{errorMessage:s}}]]},fv().createElement(xc,null,fv().createElement("h2",null,o["aria-label"])),u.children,fv().createElement(xc,null,fv().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),xg=(0,fb.createContext)(null),xb=(0,fb.forwardRef)(function(e,t){let r=(0,fb.useContext)(xf),n=(0,fb.useContext)(xh),o=gA(xd),i=gA(xp),a=r??n,s=a.visibleRange.start;e.offset&&(s=s.add(e.offset));let l=o?.firstDayOfWeek??i?.firstDayOfWeek,{gridProps:u,headerProps:c,weekDays:d,weeksInMonth:p}=function(e,t){let{startDate:r=t.visibleRange.start,endDate:n=t.visibleRange.end,firstDayOfWeek:o}=e,{direction:i}=vW(),{keyboardProps:a}=bJ({shortcuts:{End:()=>{t.focusSectionEnd()},Home:()=>{t.focusSectionStart()},Escape:()=>("setAnchorDate"in t&&t.setAnchorDate(null),!1)}}),{keyboardProps:s}=bJ({shortcuts:{Enter:()=>{t.selectFocusedDate()}," ":()=>{t.selectFocusedDate()},PageUp:()=>{t.focusPreviousSection()},"Shift+PageUp":()=>{t.focusPreviousSection(!0)},PageDown:()=>{t.focusNextSection()},"Shift+PageDown":()=>{t.focusNextSection(!0)},ArrowLeft:()=>{"rtl"===i?t.focusNextDay():t.focusPreviousDay()},ArrowUp:()=>{t.focusPreviousRow()},ArrowRight:()=>{"rtl"===i?t.focusPreviousDay():t.focusNextDay()},ArrowDown:()=>{t.focusNextRow()}},allowRepeats:!0}),l=_r(r,n,t.timeZone,!0),{ariaLabel:u,ariaLabelledBy:c}=_e.get(t),d=_o({"aria-label":[u,l].filter(Boolean).join(", "),"aria-labelledby":c}),p=vZ({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=vW(),h=(0,fb.useMemo)(()=>{let e=t.visibleDuration.days&&t.visibleDuration.days<7,n=e?r:w4(wJ(t.timeZone),f,o);return[...Array(e?t.visibleDuration.days:7).keys()].map(e=>{let r=n.add({days:e}).toDate(t.timeZone);return p.format(r)})},[f,t.timeZone,p,o,r,t.visibleDuration.days]),m=t.getWeeksInMonth(r);return{gridProps:gk(d,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||"multiple"===t.selectionMode||void 0,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)},a,s),headerProps:{"aria-hidden":!0},weekDays:h,weeksInMonth:m}}({startDate:s,endDate:w3(s),weekdayStyle:e.weekdayStyle,firstDayOfWeek:l},a),f=gZ(e,{global:!0});return fv().createElement(xg.Provider,{value:{headerProps:c,weekDays:d,startDate:s,weeksInMonth:p}},fv().createElement(gF.table,{render:e.render,...gk(f,u),ref:t,style:e.style,cellPadding:0,className:e.className??"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:fv().createElement(fv().Fragment,null,fv().createElement(xv,null,e=>fv().createElement(xw,null,e)),fv().createElement(x_,null,e.children))))}),xv=(0,fb.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,fb.useContext)(xg),s=gZ(e,{global:!0});return fv().createElement(gF.thead,{render:e.render,...gk(s,i),ref:t,style:n,className:o??"react-aria-CalendarGridHeader"},fv().createElement("tr",null,a.map((e,t)=>fv().cloneElement(r(e),{key:t}))))}),xw=(0,fb.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=gZ(e,{global:!0});return fv().createElement(gF.th,{render:e.render,...i,ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),x_=(0,fb.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,fb.useContext)(xf),a=(0,fb.useContext)(xh),s=i??a,{startDate:l,weeksInMonth:u}=(0,fb.useContext)(xg),c=gZ(e,{global:!0});return fv().createElement(gF.tbody,{render:e.render,...c,ref:t,style:n,className:o??"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>fv().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?fv().cloneElement(r(e),{key:t}):fv().createElement("td",{key:t})))))}),xx=(0,fb.forwardRef)(function({date:e,...t},r){var n,o;let i=(0,fb.useContext)(xf),a=(0,fb.useContext)(xh),s=i??a,{startDate:l}=(0,fb.useContext)(xg)??{startDate:s.visibleRange.start},u=!s.visibleDuration.days&&!s.visibleDuration.weeks&&(n=l,o=wU(o=e,n.calendar),n=w2(n),o=w2(o),n.era!==o.era||n.year!==o.year||n.month!==o.month),c=wH(e,wJ(s.timeZone)),d=(0,fb.useRef)(null),{cellProps:p,buttonProps:f,...h}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=_e.get(t),u=v6((n=vk)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=vZ({weekday:"long",day:"numeric",month:"long",year:"numeric",era:_t(i),timeZone:t.timeZone}),d=t.isCellFocused(i)&&!e.isOutsideMonth;a=a||t.isCellDisabled(i)||!!e.isOutsideMonth;let p=t.isCellUnavailable(i),f=!a&&!p,h=t.isSelected(i)&&f,m=!1;t.isValueInvalid&&("highlightedRange"in t?m=!t.anchorDate&&null!=t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):Array.isArray(t.value)?m=t.value.some(e=>wH(e,i)):t.value&&(m=wH(t.value,i))),m&&!a&&(h=!0),i=vC(i,wz);let y=(0,fb.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=wH(i,wJ(t.timeZone)),b=(0,fb.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(wH(i,t.value.start)||wH(i,t.value.end))&&(e=l+", "),e+=c.format(y),g?e=u.format(h?"todayDateSelected":"todayDate",{date:e}):h&&(e=u.format("dateSelected",{date:e})),t.minValue&&wH(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&wH(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,h,g,i,t,l]),v="";"anchorDate"in t&&d&&!t.isReadOnly&&f&&(v=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=_h(v),x=(0,fb.useRef)(!1),E=(0,fb.useRef)(!1),S=(0,fb.useRef)(void 0),{pressProps:O,isPressed:D}=va({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(i),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(wH(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),E.current=!0;return}else if(wH(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),E.current=!0;return}}let r=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?S.current=setTimeout(r,200):r()}},onPressEnd(){E.current=!1,x.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0))},onPressUp(e){!t.isReadOnly&&("anchorDate"in t&&S.current&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)),"anchorDate"in t&&(E.current?t.setAnchorDate(i):t.anchorDate&&!x.current?(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)):"keyboard"!==e.pointerType||t.anchorDate?"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)):(t.selectDate(i),t.focusNearestAvailableDate(i))))}});a||(o=wH(i,t.focusedDate)?0:-1),(0,fb.useEffect)(()=>{d&&r.current&&(gJ(r.current),"pointer"!==bE&&((e=document)=>e.activeElement)()===r.current&&_d(r.current,{containingElement:_l(r.current)}))},[d,r]);let P=vZ({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),k=(0,fb.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!f||void 0,"aria-selected":h||void 0,"aria-invalid":m||void 0},buttonProps:gk(O,{onFocus(){a||(t.setFocusedDate(i),t.setFocused(!0))},tabIndex:o,role:"button","aria-disabled":!f||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&f&&t.highlightDate(i)},onPointerDown(e){let t=g5(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:D,isFocused:d,isSelected:h,isDisabled:a,isUnavailable:p,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:k}}({date:e,isOutsideMonth:u},s,d),{hoverProps:m,isHovered:y}=v_({...t,isDisabled:h.isDisabled||h.isUnavailable}),{focusProps:g,isFocusVisible:b}=vy();b&&=h.isFocused;let v=!1,w=!1;"highlightedRange"in s&&s.highlightedRange&&(v=wH(e,s.highlightedRange.start),w=wH(e,s.highlightedRange.end));let x=gR({...t,defaultChildren:h.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:y,isOutsideMonth:u,isFocusVisible:b,isSelectionStart:v,isSelectionEnd:w,isToday:c,...h}}),E={"data-focused":h.isFocused||void 0,"data-hovered":y||void 0,"data-pressed":h.isPressed||void 0,"data-unavailable":h.isUnavailable||void 0,"data-disabled":h.isDisabled||void 0,"data-focus-visible":b||void 0,"data-outside-visible-range":h.isOutsideVisibleRange||void 0,"data-outside-month":u||void 0,"data-selected":h.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":h.isInvalid||void 0,"data-today":c||void 0},S=gZ(t,{global:!0});return fv().createElement("td",{...p,ref:r},fv().createElement(gF.div,{...gk(S,f,g,m,E,x),ref:d}))}),xE=(0,fb.createContext)({}),xS=(0,fb.forwardRef)(function(e,t){[e,t]=gN(e,t,xE);let{isDisabled:r,isInvalid:n,isReadOnly:o,onHoverStart:i,onHoverChange:a,onHoverEnd:s,...l}=e;r??=!!e["aria-disabled"]&&"false"!==e["aria-disabled"],n??=!!e["aria-invalid"]&&"false"!==e["aria-invalid"];let{hoverProps:u,isHovered:c}=v_({onHoverStart:i,onHoverChange:a,onHoverEnd:s,isDisabled:r}),{isFocused:d,isFocusVisible:p,focusProps:f}=vy({within:!0}),h=gR({...e,values:{isHovered:c,isFocusWithin:d,isFocusVisible:p,isDisabled:r,isInvalid:n},defaultClassName:"react-aria-Group"});return fv().createElement(gF.div,{...gk(l,f,u),...h,ref:t,role:e.role??"group",slot:e.slot??void 0,"data-focus-within":d||void 0,"data-hovered":c||void 0,"data-focus-visible":p||void 0,"data-disabled":r||void 0,"data-invalid":n||void 0,"data-readonly":o||void 0},h.children)}),xO=(0,fb.createContext)({}),xD=vh(function(e,t){[e,t]=gN(e,t,xO);let{hoverProps:r,isHovered:n}=v_({...e,isDisabled:e.disabled}),{isFocused:o,isFocusVisible:i,focusProps:a}=vy({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=gR({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return fv().createElement(gF.input,{...gk((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});function xP(e,t,r,n){return e.createTreeWalker(t,r,n)}let xk=fv().createContext(null),xC="react-aria-focus-scope-restore",xj=null;function xT(e){var t,r,n,o,i,a,s,l,u,c;let d,p,f,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,fb.useRef)(null),w=(0,fb.useRef)(null),x=(0,fb.useRef)([]),{parentNode:E}=(0,fb.useContext)(xk)||{},S=(0,fb.useMemo)(()=>new xz({scopeRef:x}),[x]);gc(()=>{let e=E||xG.root;if(xG.getTreeNode(e.scopeRef)&&xj&&!xI(xj,e.scopeRef)){let t=xG.getTreeNode(xj);t&&(e=t)}e.addChild(S),xG.addNode(S)},[S,E]),gc(()=>{let e=xG.getTreeNode(x);e&&(e.contain=!!y)},[y]),gc(()=>{let e=v.current?.nextSibling,t=[],r=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(xC,r),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(xC,r)}},[m]),gc(()=>{if(r||n)return;let e=t.current,o=gQ(e?e[0]:void 0),i=e=>{let r=g5(e);xN(r,t.current)?xj=t:xM(r)||(xj=null)};return o.addEventListener("focusin",i,!1),e?.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),e?.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=g,n=y]),o=x,i=y,d=(0,fb.useRef)(void 0),p=(0,fb.useRef)(void 0),gc(()=>{let e=o.current;if(!i){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=gQ(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!xA(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!xN(r,n))return;let i=xU(xR(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&(x$(a,!0),a instanceof g0(a).HTMLInputElement&&a.select())},n=e=>{(!xj||xI(xj,o))&&xN(g5(e),o.current)?(xj=o,d.current=g5(e)):xA(o)&&!xM(g5(e),o)?d.current?x$(d.current):xj&&xj.current&&xF(xj.current):xA(o)&&(d.current=g5(e))},a=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let r=bE,n=("virtual"===r||null===r)&&bv()&&bb(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&xA(o)&&!xM(i,o)){xj=o;let t=g5(e);t&&t.isConnected?(d.current=t,x$(d.current)):xj.current&&xF(xj.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),e?.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1)),e?.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),gc(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),a=x,s=g,l=y,f=(0,fb.useRef)("u">typeof document?((e=document)=>e.activeElement)(gQ(a.current?a.current[0]:void 0)):null),gc(()=>{let e=a.current,t=gQ(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!xj||xI(xj,a))&&xN(((e=document)=>e.activeElement)(t),a.current)&&(xj=a)};return t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1))}},[a,l]),gc(()=>{let e=gQ(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!xA(a)||t.isComposing)return;let r=e.activeElement;if(!xM(r,a)||!xB(a))return;let n=xG.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=xU(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!xM(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(xM(s,a));(t.preventDefault(),t.stopPropagation(),s)?x$(s,!0):xM(o)?x$(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),gc(()=>{let e=gQ(a.current?a.current[0]:void 0);if(!s)return;let t=xG.getTreeNode(a);if(t)return t.nodeToRestore=f.current??void 0,()=>{let t=xG.getTreeNode(a);if(!t)return;let r=t.nodeToRestore,n=((e=document)=>e.activeElement)(e);if(s&&r&&(n&&xM(n,a)||n===e.body&&xB(a))){let t=xG.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(a);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void xV(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(a);e;){if(e.scopeRef&&e.scopeRef.current&&xG.getTreeNode(e.scopeRef)){let t=xL(e.scopeRef.current,!0);if(t)return void xV(t)}e=e.parent}}})}}},[a,s]),u=x,c=b,h=fv().useRef(c),(0,fb.useEffect)(()=>{h.current&&(xj=u,!xN(((e=document)=>e.activeElement)(gQ(u.current?u.current[0]:void 0)),xj.current)&&u.current&&xF(u.current)),h.current=!1},[u]),(0,fb.useEffect)(()=>{let e=((e=document)=>e.activeElement)(gQ(x.current?x.current[0]:void 0)),t=null;if(xN(e,x.current)){for(let r of xG.traverse())r.scopeRef&&xN(e,r.scopeRef.current)&&(t=r);t===xG.getTreeNode(x)&&(xj=t.scopeRef)}},[x]),gc(()=>()=>{let e=xG.getTreeNode(x)?.parent?.scopeRef??null;(x===xj||xI(x,xj))&&(!e||xG.getTreeNode(e))&&(xj=e),xG.removeTreeNode(x)},[x]);let O=(0,fb.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(gQ(r[0]??void 0)),l=r[0].previousElementSibling,u=xU(xR(r),{tabbable:o,accept:a},r);u.currentNode=xN(s,r)?s:l;let c=u.nextNode();return!c&&i&&(u.currentNode=l,c=u.nextNode()),c&&x$(c,!0),c},focusPrevious(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(gQ(r[0]??void 0)),l=r[r.length-1].nextElementSibling,u=xU(xR(r),{tabbable:o,accept:a},r);u.currentNode=xN(s,r)?s:l;let c=u.previousNode();return!c&&i&&(u.currentNode=l,c=u.previousNode()),c&&x$(c,!0),c},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=xU(xR(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&x$(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=xU(xR(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&x$(a,!0),a}}},[]),D=(0,fb.useMemo)(()=>({focusManager:O,parentNode:S}),[S,O]);return fv().createElement(xk.Provider,{value:D},fv().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,fv().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function xR(e){return e[0].parentElement}function xA(e){let t=xG.getTreeNode(xj);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function xN(e,t){return!!e&&!!t&&t.some(t=>g4(t,e))}function xM(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of xG.traverse(xG.getTreeNode(t)))if(r&&xN(e,r.current))return!0;return!1}function xI(e,t){let r=xG.getTreeNode(t)?.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function x$(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{bW(e)}catch{}}function xL(e,t=!0){let r=e[0].previousElementSibling,n=xR(e),o=xU(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=xU(n=xR(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function xF(e,t=!0){x$(xL(e,t))}function xB(e){let t=xG.getTreeNode(xj);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function xV(e){e.dispatchEvent(new CustomEvent(xC,{bubbles:!0,cancelable:!0}))&&x$(e)}function xU(e,t,r){let n=t?.tabbable?bo:bn,o=gQ(e?.nodeType===Node.ELEMENT_NODE?e:null),i=xP(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>g4(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(gQ(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),r=g0(e);return t instanceof r.RadioNodeList?Array.from(t).filter(e=>e instanceof r.HTMLInputElement):t instanceof r.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===i.currentNode.tagName&&"radio"===i.currentNode.type&&i.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:n(e)&&(!r||xN(e,r))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(i.currentNode=t.from),i}function xW(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(gQ(n)),u=xU(n,{tabbable:i,accept:s});g4(n,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=n,c=u.nextNode()),c&&x$(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(gQ(n)),u=xU(n,{tabbable:i,accept:s});if(g4(n,l))u.currentNode=l;else{let e=xK(u);return e&&x$(e,!0),e??null}let c=u.previousNode();if(!c&&a){u.currentNode=n;let e=xK(u);if(!e)return null;c=e}return c&&x$(c,!0),c??null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=xU(n,{tabbable:o,accept:i}).nextNode();return a&&x$(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=xK(xU(n,{tabbable:o,accept:i}));return a&&x$(a,!0),a??null}}}function xK(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class xH{constructor(){this.fastMap=new Map,this.root=new xz({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(t??null);if(!n)return;let o=new xz({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&xN(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new xH;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class xz{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let xG=new xH;var xq={};function xY(e,t,r){let{direction:n}=vW(),o=(0,fb.useMemo)(()=>xW(t),[t]),{keyboardProps:i}=bJ({shortcuts:{"Alt+ArrowDown":()=>"setOpen"in e&&void e.setOpen(!0),"Alt+ArrowUp":()=>"setOpen"in e&&void e.setOpen(!0),ArrowLeft:e=>{if(r)return!1;if("rtl"!==n)return void o.focusPrevious();if(t.current){let r=g5(e),n=xZ(t.current,r.getBoundingClientRect().left,-1);if(n)return void n.focus()}return!1},ArrowRight:e=>{if(r)return!1;if("rtl"!==n)return void o.focusNext();if(t.current){let r=g5(e),n=xZ(t.current,r.getBoundingClientRect().left,1);if(n)return void n.focus()}return!1}},allowRepeats:!0}),a=()=>{if(!t.current)return;let e=window.event?g5(window.event):null,r=xU(t.current,{tabbable:!0});if(e&&(r.currentNode=e,e=r.previousNode()),!e){let t;do(t=r.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=r.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:s}=va({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&a()}});return gk(s,i)}function xZ(e,t,r){let n=xU(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function xJ(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=gE(t);let a=gE(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:_o({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=gS([!!t,!!r,n,o]),l=gS([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=gk(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function xX(e,t,r){let n=b8(e=>{r&&!e.defaultPrevented&&r(t)});(0,fb.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",n),()=>{t?.removeEventListener("reset",n)}},[e])}function xQ(e,t,r){let{validationBehavior:n,focus:o}=e;gc(()=>{if("native"===n&&r?.current&&"setCustomValidity"in r.current&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=(0,fb.useRef)(!1),a=b8(()=>{i.current||t.resetValidation()}),s=b8(e=>{t.displayValidation.isInvalid||t.commitValidation();let n=r?.current?.form;!e.defaultPrevented&&r&&n&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(r.validity?.valid===!1)return r}return null}(n)===r.current&&(o?o():r.current?.focus(),bE="keyboard",bC("keyboard",null));e.preventDefault()}),l=b8(()=>{t.commitValidation()});(0,fb.useEffect)(()=>{let e=r?.current;if(!e)return;let t=e.form,n=t?.reset;return t&&(t.reset=()=>{i.current=!window.event||"message"===window.event.type&&g5(window.event)instanceof MessagePort,n?.call(t),i.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),t?.addEventListener("reset",a),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),t?.removeEventListener("reset",a),t&&(t.reset=n)}},[r,n])}xq={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let x0=new WeakMap,x1="__reactAriaDateFieldRole",x2="__reactAriaDateFieldFocusManager";function x3(e,t,r){var n;let o,{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=xJ({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),p=(0,fb.useRef)(null),{focusWithinProps:f}=vm({...e,onFocusWithin(r){p.current=t.value,e.onFocus?.(r)},onBlurWithin:r=>{t.confirmPlaceholder(),t.value!==p.current&&t.commitValidation(),e.onBlur?.(r)},onFocusWithinChange:e.onFocusChange}),h=v6((n=xq)&&n.__esModule?n.default:n,"@react-aria/datepicker"),m="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",g=_h(t.value?h.format(m,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[x1]?u["aria-describedby"]:[g["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=e[x2],w=(0,fb.useMemo)(()=>v||xW(r),[v,r]),x=xY(t,r,"presentation"===e[x1]);x0.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:w});let E=(0,fb.useRef)(e.autoFocus);o="presentation"===e[x1]?{role:"presentation"}:gk(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,fb.useEffect)(()=>{E.current&&w.focusFirst(),E.current=!1},[w]),xX(e.inputRef,t.defaultValue,t.setValue),xQ({...e,focus(){w.focusFirst()}},t,e.inputRef);let S={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(S.type="text",S.hidden=!0,S.required=e.isRequired,S.onChange=()=>{});let O=gZ(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:gk(O,o,x,f,{onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,style:{unicodeBidi:"isolate"}}),inputProps:S,descriptionProps:c,errorMessageProps:d,isInvalid:i,validationErrors:a,validationDetails:s}}var x4={};x4={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let x5={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},x6={...x5,customError:!0,valid:!1},x7={isInvalid:!1,validationDetails:x5,validationErrors:[]},x9=(0,fb.createContext)({}),x8="__reactAriaFormValidationState";function Ee(e){if(e[x8]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[x8];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||="invalid"===r);let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:x6}:null,u=(0,fb.useMemo)(()=>a&&null!=o?Er(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return Et(r)}return[]}(a,o)):null,[a,o]);i?.validationDetails.valid&&(i=void 0);let c=(0,fb.useContext)(x9),d=(0,fb.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>Et(c[e])):Et(c[n]):[],[c,n]),[p,f]=(0,fb.useState)(c),[h,m]=(0,fb.useState)(!1);c!==p&&(f(c),m(!1));let y=(0,fb.useMemo)(()=>Er(h?[]:d),[h,d]),g=(0,fb.useRef)(x7),[b,v]=(0,fb.useState)(x7),w=(0,fb.useRef)(x7),[x,E]=(0,fb.useState)(!1);return(0,fb.useEffect)(()=>{if(!x)return;E(!1);let e=u||i||g.current;En(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:l||y||u||i||x7,displayValidation:"native"===s?l||y||b:l||y||u||i||b,updateValidation(e){"aria"!==s||En(b,e)?g.current=e:v(e)},resetValidation(){En(x7,w.current)||(w.current=x7,v(x7)),"native"===s&&E(!1),m(!0)},commitValidation(){"native"===s&&E(!0),m(!0)}}}(e)}function Et(e){return e?Array.isArray(e)?e:[e]:[]}function Er(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:x6}:null}function En(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function Eo(...e){let t=new Set,r=!1,n={...x5};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||=o.isInvalid,n)n[e]||=o.validationDetails[e]}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let Ei=new v0((ea=x4)&&ea.__esModule?ea.default:ea);function Ea(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function Es(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&n?.(e)||!1,l=i||a||s,u=[];if(l){let e=Ea(),n=new v3(e,v0.getGlobalDictionaryForPackage("@react-stately/datepicker")||Ei),l=new vH(e,Ec({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let El={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},Eu={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function Ec(e,t){e={...t.shouldForceLeadingZeros?Eu:El,...e};let r=t.granularity||"minute",n=Object.keys(e),o=n.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=n.indexOf(r);if(i<0&&(i=2),o>i)throw Error("maxGranularity must be greater than granularity");let a=n.slice(o,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(a.hour12=12===t.hourCycle),a.timeZone=t.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&t.timeZone&&!t.hideTimeZone&&(a.timeZoneName="short"),t.showEra&&0===o&&(a.era="short"),a}function Ed(e){return e&&"hour"in e?e:new wC}function Ep(e,t){return null===e?null:e?wU(e,t):void 0}function Ef(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,fb.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let Eh=new v0({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},"sr-Latn":{year:"gggg",month:"mm",day:"dd"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");class Em{constructor(e,t,r){if(this.era=r?.era??null,this.calendar=e,this.year=r?.year??null,this.month=r?.month??null,this.day=r?.day??null,this.hour=r?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=r?.minute??null,this.second=r?.second??null,this.millisecond=r?.millisecond??null,this.offset="offset"in(r??{})?r.offset:null,null!=this.hour){let[e,r]=Eg(this.hour,t);this.dayPeriod=e,this.hour=r}}copy(){let e=new Em(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,r]=Eg(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===r}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,r){let n=this.copy();return n[e]=t,"hour"===e&&null==n.dayPeriod&&"hour"in r&&(n.dayPeriod=Eg(r.hour,this.hourCycle)[0]),"year"===e&&null==n.era&&(n.era=r.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(n.offset=null),n}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,r,n){let o=this.copy();if(null==o[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in r){let[e,t]=Eg(r.hour,this.hourCycle);o.dayPeriod=e,o.hour=t}else o[e]=r[e];return"year"===e&&null==o.era&&(o.era=r.era),o}switch(e){case"era":{let e=this.calendar.getEras(),r=e.indexOf(o.era);r=Ey(r,t,0,e.length-1),o.era=e[r];break}case"year":{let n=new wk(this.calendar,this.era??r.era,this.year??r.year,this.month??1,this.day??1);o.era=(n=n.cycle(e,t,{round:"year"===e})).era,o.year=n.year;break}case"month":o.month=Ey(o.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=Ey(o.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=n.some(e=>["year","month","day"].includes(e));if("timeZone"in r&&(!e||null!=o.year&&null!=o.month&&null!=o.day)){let e=this.toValue(r),[n,i]=Eg((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);o.hour=i,o.dayPeriod=n,o.offset=e.offset}else{let e=o.hour??0,n=this.getSegmentLimits("hour");o.hour=Ey(e,t,n.minValue,n.maxValue),null==o.dayPeriod&&"hour"in r&&(o.dayPeriod=Eg(r.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=Ey(o.dayPeriod??0,t,0,1);break;case"minute":o.minute=Ey(o.minute??0,t,0,59,!0);break;case"second":o.second=Ey(o.second??0,t,0,59,!0)}return o}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,r){switch(r){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let r=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in r&&null!=this.offset&&r.offset!==this.offset&&(r=r.add({milliseconds:r.offset-this.offset})),r}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function Ey(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function Eg(e,t){let r=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":r=null;break;case"h24":e+=1,r=null}return[r,e]}var Eb=r(19264);let Ev={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},Ew={year:5,month:2,day:7,hour:2,minute:15,second:15},E_={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function Ex(e){let{locale:t,createCalendar:r,hideTimeZone:n,isDisabled:o=!1,isReadOnly:i=!1,isRequired:a=!1,minValue:s,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,p]=Ef(c,e.granularity),f=p||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[h,m]=(0,fb.useMemo)(()=>{let n=new vH(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[r(n.calendar),n.hourCycle]},[t,e.hourCycle,r]),[y,g]=xr(e.value,e.defaultValue??null,e.onChange),[b]=(0,fb.useState)(y),v=(0,fb.useMemo)(()=>Ep(y,h)??null,[y,h]),[w,x]=(0,fb.useState)(()=>new Em(h,m,v)),E="gregory"===h.identifier&&"BC"===w.era,S=(0,fb.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:p,hideTimeZone:n,hourCycle:e.hourCycle,showEra:E,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,p,n,E]),O=(0,fb.useMemo)(()=>Ec({},S),[S]),D=(0,fb.useMemo)(()=>new vH(t,O),[t,O]),P=(0,fb.useMemo)(()=>D.resolvedOptions(),[D]),k=(0,fb.useMemo)(()=>(function(e,t,r,n){if(e)return Ep(e,r);let o=wU(wZ(n??w1()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?wB(o):n?o:wV(o)})(e.placeholderValue,d,h,p),[e.placeholderValue,d,h,p]),C=(0,fb.useMemo)(()=>{let t="h11"===m||"h12"===m,r=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],n=r.indexOf(e.maxGranularity||"era"),o=r.indexOf("hour"===d&&t?"dayPeriod":d);return r.slice(n,o+1)},[e.maxGranularity,d,m]),[j,T]=(0,fb.useState)(v),[R,A]=(0,fb.useState)(h),[N,M]=(0,fb.useState)(m);v===j&&m===N&&wG(h,R)||(w=new Em(h,m,v),T(v),A(h),M(m),x(w));let I=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof Em&&t.isCleared(C))x(new Em(h,m,v)),g(null);else if(t instanceof Em){if(t.isComplete(C)){let e=t.toValue(v??k);if(t.validate(e,C)){let t=wU(e,c?.calendar||new wn);if(!y||0!==t.compare(y)){x(new Em(h,m,v)),g(t);return}}}x(t)}else t=wU(t,c?.calendar||new wn),x(new Em(h,m,v)),g(t)},$=(0,fb.useMemo)(()=>w.toValue(v??k).toDate(f),[w,f,v,k]),L=(0,fb.useMemo)(()=>(function(e,t,r,n,o,i,a){let s=["hour","minute","second"],l=r.formatToParts(e),u=new(0,Eb.K)(i,{useGrouping:!1}),c=new(0,Eb.K)(i,{useGrouping:!1,minimumIntegerDigits:2});for(let e of l)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let r=t[e.type]??0;"2-digit"===n[e.type]?e.value=c.format(r):e.value=u.format(r)}let d=[];for(let e of l){var p;let r=E_[e.type]||e.type,n=Ev[r];"era"===r&&1===o.getEras().length&&(n=!1);let l=Ev[r]&&null==t[e.type],u=Ev[r]?(p=e.value,"era"===r||"dayPeriod"===r?p:"year"===r||"month"===r||"day"===r?Eh.getStringForLocale(r,i):"––"):null,c={type:r,text:l?u:e.value,...t.getSegmentLimits(r),isPlaceholder:l,placeholder:u,isEditable:n};"hour"===r?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),r===a&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(r)&&r===a?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})($,w,D,P,h,t,d),[$,D,P,w,h,t,d]),F=(e,t)=>{I(w.cycle(e,t,k,C))},B=(0,fb.useMemo)(()=>Es(y,s,l,u,S),[y,s,l,u,S]),V=Ee({...e,value:y,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:v,defaultValue:e.defaultValue??b,dateValue:$,calendar:h,setValue:I,segments:L,dateFormatter:D,validationState:W,isInvalid:U,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:o,isReadOnly:i,isRequired:a,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,Ew[e]||1)},decrementPage(e){F(e,-(Ew[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===m?11:w.getSegmentLimits(e).maxValue;I(w.set(e,t,k))},decrementToMin(e){let t="hour"===e&&"h12"===m?12:w.getSegmentLimits(e).minValue;I(w.set(e,t,k))},setSegment(e,t){I(w.set(e,t,k))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(C)){let e=wU(w.toValue(v??k),c?.calendar||new wn);y&&0===e.compare(y)||g(e),x(new Em(h,m,v))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),I(t)},formatValue:e=>v?new vH(t,Ec(e,S)).format($):"",getDateFormatter:(e,t)=>new vH(e,Ec({},{...S,...t}))}}let EE=(0,fb.createContext)(null),ES=(0,fb.createContext)(null),EO=(0,fb.createContext)(null),ED=(0,fb.forwardRef)(function(e,t){let r=(0,fb.useContext)(ES),n=(0,fb.useContext)(EO);return r||n?fv().createElement(Ek,{...e,ref:t}):fv().createElement(EP,{...e,ref:t})}),EP=(0,fb.forwardRef)((e,t)=>{let[r,n]=gN({slot:e.slot},t,EE),{locale:o}=vW(),i=Ex({...r,locale:o,createCalendar:_3}),a=(0,fb.useRef)(null),{fieldProps:s,inputProps:l}=x3({...r,inputRef:a},i,n);return fv().createElement(gT,{values:[[ES,i],[xO,{...l,ref:a}],[xE,{...s,ref:n,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},fv().createElement(Ek,e))}),Ek=(0,fb.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,fb.useContext)(ES),i=(0,fb.useContext)(EO),a=o??i;return fv().createElement(fv().Fragment,null,fv().createElement(xS,{...e,ref:t,slot:e.slot||void 0,className:r??"react-aria-DateInput",isReadOnly:a.isReadOnly,isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,fb.cloneElement)(n(e),{key:t}))),fv().createElement(xD,{className:""}))});function EC({children:e}){let t=(0,fb.useMemo)(()=>({register:()=>{}}),[]);return fv().createElement(b7.Provider,{value:t},e)}fv().forwardRef(({children:e,...t},r)=>{let n=(0,fb.useRef)(!1),o=(0,fb.useContext)(b7),i=gk(o||{},{...t,register(){n.current=!0,o&&o.register()}});return i.ref=gC(r||o?.ref),bX(o,i.ref),(0,fb.useEffect)(()=>{n.current||(n.current=!0)},[]),fv().createElement(b7.Provider,{value:i},e)});let Ej=(0,fb.createContext)({}),ET=fv().createContext(null);function ER(e){let t=gv(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,i]=(0,fb.useState)(!1),a=(0,fb.useMemo)(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=(0,fb.useContext)(Ej)??{};if(!e.portalContainer&&s&&(r=s()),!r)return null;let l=e.children;return e.disableFocusManagement||(l=fv().createElement(xT,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},l)),l=fv().createElement(ET.Provider,{value:a},fv().createElement(EC,null,fv().createElement(bQ.Provider,{value:null},l))),vt.createPortal(l,r)}let EA=(0,fb.createContext)(null),EN=(0,fb.createContext)(null),EM=(0,fb.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=gN(e,t,EA);let{dialogProps:n,titleProps:o,contentProps:i}=function(e,t){let r,n,{role:o="dialog"}=e,i=gS();i=e["aria-label"]?void 0:i;let a=gS();a="alertdialog"!==o||e["aria-describedby"]?void 0:a;let s=(0,fb.useRef)(!1);(0,fb.useEffect)(()=>{if(t.current&&!g7(t.current)){bW(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(s.current=!0,t.current&&(t.current.blur(),bW(t.current)),s.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),r=(0,fb.useContext)(ET),gc(()=>{n?.(!0)},[n=r?.setContain]),(0,fb.useRef)(!1),(0,fb.useEffect)(()=>{});let l=e["aria-describedby"]??a;return{dialogProps:{...gZ(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]??i,"aria-describedby":l,onBlur:e=>{s.current&&e.stopPropagation()}},titleProps:{id:i},contentProps:{id:a}}}({...e,"aria-labelledby":r},t),a=(0,fb.useContext)(EN);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let s=gR({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:a?.close||(()=>{})}}),l=gZ(e,{global:!0});return fv().createElement(gF.section,{...gk(l,s,n),render:e.render,ref:t,slot:e.slot||void 0},fv().createElement(gT,{values:[[vO,{slots:{[gj]:{},title:{...o,level:2}}}],[vD,{slots:{[gj]:{},description:i}}],[vx,{slots:{[gj]:{},close:{onPress:()=>a?.close()}}}]]},s.children))}),EI=(0,fb.createContext)(null),E$=(0,fb.forwardRef)(function(e,t){let r=(0,fb.useContext)(EI);return r?.isInvalid?fv().createElement(EL,{...e,ref:t}):null}),EL=(0,fb.forwardRef)((e,t)=>{let r=(0,fb.useContext)(EI),{elementType:n,...o}=e,i=gZ(o,{global:!0}),a=gR({...o,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==a.children?null:fv().createElement(vP,{slot:"errorMessage",elementType:n,...i,...a,ref:t})}),EF=(0,fb.createContext)(null),EB=["day","month","year"],EV={hour:1,minute:2,second:3};function EU(e){let{state:t}=e,{containerProps:r,inputProps:n}=function(e,t){let{autoComplete:r,isDisabled:n,name:o}=e,{visuallyHiddenProps:i}=xu({style:{position:"fixed",top:0,left:0}}),a=60;"second"===t.granularity?a=1:"hour"===t.granularity&&(a=3600);let s="";t.value&&(s="day"===t.granularity?wB(t.value).toString():wV("timeZone"in t.value?wW(t.value,w1()):t.value).toString());let l="day"===t.granularity?"date":"datetime-local",u=["hour","minute","second"],c=0;return u.includes(t.granularity)&&(c=EV[t.granularity],u=u.slice(0,c)),{containerProps:{...i,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{tabIndex:-1,autoComplete:r,disabled:n,type:l,form:"",name:o,step:a,value:s,onChange:e=>{let r=g5(e).value.toString();if(r)try{let e=function(e){let t=e.match(w_);if(!t){if(wx.test(e))throw Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`);throw Error("Invalid ISO 8601 date time string: "+e)}let r=wE(t[1],-9999,9999),n=new wj(r<1?"BC":"AD",r<1?-r+1:r,wE(t[2],1,12),1,t[4]?wE(t[4],0,23):0,t[5]?wE(t[5],0,59):0,t[6]?wE(t[6],0,59):0,t[7]?1e3*wE(t[7],0,1/0):0);return n.day=wE(t[3],0,n.calendar.getDaysInMonth(n)),n}(r);if("day"===t.granularity&&(e=function(e){let t=e.match(ww);if(!t){if(wx.test(e))throw Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`);throw Error("Invalid ISO 8601 date string: "+e)}let r=new wk(wE(t[1],0,9999),wE(t[2],1,12),1);return r.day=wE(t[3],1,r.calendar.getDaysInMonth(r)),r}(r)),"setSegment"in t)for(let r in e)EB.includes(r)&&t.setSegment(r,e[r]),u.includes(r)&&t.setSegment(r,e[r]);t.setValue(e)}catch{}}}}}({...e},t);return fv().createElement("div",{...r,"data-testid":"hidden-dateinput-container"},fv().createElement("input",n))}let EW=(0,fb.createContext)({}),EK=vh(function(e,t){[e,t]=gN(e,t,EW);let{elementType:r="label",...n}=e,o=gF[r];return fv().createElement(o,{className:"react-aria-Label",...n,ref:t})}),EH=(0,fb.createContext)({placement:"bottom"}),Ez="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,EG=new WeakMap,Eq=[];function EY(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function EZ(e,t){let r=e,n=0,o=t.toString(),i=o.toLowerCase().indexOf("e-");if(i>0)n=Math.abs(Math.floor(Math.log10(Math.abs(t))))+i;else{let e=o.indexOf(".");e>=0&&(n=o.length-e)}if(n>0){let e=Math.pow(10,n);r=Math.round(r*e)/e}return r}function EJ(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=EZ(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(EZ(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(EZ((r-t)/n,n))*n),i=EZ(i,n)}let EX={top:"top",bottom:"top",left:"left",right:"left"},EQ={top:"bottom",bottom:"top",left:"right",right:"left"},E0={top:"left",left:"top"},E1={top:"height",left:"width"},E2={width:"totalWidth",height:"totalHeight"},E3={};function E4(e,t){let r=0,n=0,o=0,i=0,a=0,s=0,l={},u=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let u=document.documentElement;o=u.clientWidth,i=u.clientHeight,r=t?.width??o,n=t?.height??i,l.top=u.scrollTop||e.scrollTop,l.left=u.scrollLeft||e.scrollLeft,t&&(a=Math.max(0,t.pageTop-(l.top??0)),s=Math.max(0,t.pageLeft-(l.left??0)))}else({width:r,height:n,top:a,left:s}=Se(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,o=r,i=n;return bg()&&("BODY"===e.tagName||"HTML"===e.tagName)&&u&&(l.top=0,l.left=0,a=t?.pageTop??0,s=t?.pageLeft??0),{width:r,height:n,totalWidth:o,totalHeight:i,scroll:l,top:a,left:s}}function E5(e,t,r,n,o,i,a){let s=o.scroll[e]??0,l=n[E1[e]],u=a[e]+n.scroll[EX[e]]+i,c=a[e]+n.scroll[EX[e]]+l-i,d=t-s+n.scroll[EX[e]]+a[e]-n[EX[e]],p=t-s+r+n.scroll[EX[e]]+a[e]-n[EX[e]];return d<u?u-d:p>c?Math.max(c-p,u-d):0}function E6(e){if(E3[e])return E3[e];let[t,r]=e.split(" "),n=EX[t]||"right",o=E0[n];EX[r]||(r="center");let i=E1[n],a=E1[o];return E3[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},E3[e]}function E7(e,t,r,n,o,i,a,s,l,u,c){let{placement:d,crossPlacement:p,axis:f,crossAxis:h,size:m,crossSize:y}=n,g={};g[h]=e[h]??0,"center"===p?g[h]+=((e[y]??0)-(r[y]??0))/2:p!==h&&(g[h]+=(e[y]??0)-(r[y]??0)),g[h]+=i;let b=e[h]-r[y]+l+u,v=e[h]+e[y]-l-u;if(g[h]=EY(g[h],b,v),d===f){let t=s?c[m]:c[E2[m]];g[EQ[f]]=Math.floor(t-e[f]+o)}else g[f]=Math.floor(e[f]+e[m]+o);return g}function E9(e,t,r,n,o,i,a,s){let{placement:l,axis:u,size:c}=i;return l===u?Math.max(0,r[u]-(a.scroll[u]??0)-(e[u]+(s?t[u]:0))-(n[u]??0)-n[EQ[u]]-o):Math.max(0,e[c]+e[u]+(s?t[u]:0)-r[u]-r[c]+(a.scroll[u]??0)-(n[u]??0)-n[EQ[u]]-o)}function E8(e,t){let{top:r,left:n,width:o,height:i}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(o=e.offsetWidth,i=e.offsetHeight),{top:r,left:n,width:o,height:i}}function Se(e,t,r){let{top:n,left:o,width:i,height:a}=r||E8(e,t),{scrollTop:s,scrollLeft:l,clientTop:u,clientLeft:c}=document.documentElement;return{top:n+s-u,left:o+l-c,width:i,height:a}}function St(e,t,r,n){let o,i=window.getComputedStyle(e);if("fixed"===i.position)o=n||E8(e,r);else{o=Se(e,r,n);let i=Se(t,r),a=window.getComputedStyle(t);i.top+=(parseInt(a.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(a.borderLeftWidth,10)||0)-t.scrollLeft,o.top-=i.top,o.left-=i.left}return o.top-=parseInt(i.marginTop,10)||0,o.left-=parseInt(i.marginLeft,10)||0,o}function Sr(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let Sn=new WeakMap;function So(e){let{ref:t,box:r,onResize:n}=e,o=b8(n);(0,fb.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&o()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[t,r])}let Si="u">typeof document?window.visualViewport:null;function Sa(e,t){if(e.button>0)return!1;let r=g5(e);if(r){let e=r.ownerDocument;if(!e||!g4(e.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let Ss=[],Sl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Su(e){return e instanceof HTMLInputElement&&!Sl.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let Sc="u">typeof document&&window.visualViewport,Sd=0;function Sp(e,t){t||!Sc?Sf(e):Sc.addEventListener("resize",()=>Sf(e),{once:!0})}function Sf(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=_l(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect(),n=r.getBoundingClientRect();if(n.top<t.top||n.bottom>t.top+r.clientHeight){let r=t.bottom;Sc&&(r=Math.min(r,Sc.offsetTop+Sc.height));let o=n.top-t.top-((r-t.top)/2-n.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+o)),behavior:"smooth"})}}r=e.parentElement}}var Sh={};function Sm(e){var t;let{onDismiss:r,...n}=e,o=_o(n,v6((t=Sh)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return fv().createElement(xc,null,fv().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function Sy(e){let[t,r]=xr(e.isOpen,e.defaultOpen||!1,e.onOpenChange),[n,o]=(0,fb.useState)(null),i=(0,fb.useCallback)(()=>{r(!0)},[r]),a=(0,fb.useCallback)(()=>{r(!1)},[r]),s=(0,fb.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:i,close:a,toggle:s,point:n,setPoint:o}}function Sg(e,t,r){gc(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{n||(0,vt.flushSync)(()=>{r()})}),()=>{n=!0}}},[e,t,r])}Sh={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let Sb=(0,fb.createContext)(null),Sv=(0,fb.createContext)(null),Sw=(0,fb.forwardRef)(function(e,t){[e,t]=gN(e,t,Sb);let r=(0,fb.useContext)(EN),n=Sy(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,fb.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return Sg(e,o,(0,fb.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen),a=e.isExiting||!e.shouldSkipAnimation&&i||!1,s=(0,fb.useContext)(vf),{direction:l}=vW();if(s){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),fv().createElement(fv().Fragment,null,t)}return!o||o.isOpen||a?fv().createElement(S_,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:a,dir:l}):null});function S_({state:e,isExiting:t,UNSTABLE_portalContainer:r,clearContexts:n,...o}){let i=(0,fb.useRef)(null),a=(0,fb.useRef)(null),s=(0,fb.useContext)(Sv),l=s&&"SubmenuTrigger"===o.trigger,{popoverProps:u,underlayProps:c,arrowProps:p,placement:f,triggerAnchorPoint:h}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:c,underlayProps:p}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e,l=(0,fb.useRef)(void 0);(0,fb.useEffect)(()=>{if(o&&!Ss.includes(t))return Ss.push(t),()=>{let e=Ss.indexOf(t);e>=0&&Ss.splice(e,1)}},[o,t]);let u=()=>{Ss[Ss.length-1]===t&&r&&r()},{keyboardProps:c}=bJ({shortcuts:{Escape:()=>!a&&void u()}});!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,fb.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=b8(e=>{r&&Sa(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=b8(e=>{r&&r(e)});(0,fb.useEffect)(()=>{let e=i.current;if(n)return;let r=gQ(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&Sa(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("click",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("click",n,!0)}}},[t,n])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(g5(e)))&&(Ss[Ss.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let r=Ss[Ss.length-1];l.current=r,(!s||s(g5(e)))&&r===t&&e.stopPropagation()}});let{focusWithinProps:d}=vm({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||xM(e.relatedTarget,xj))&&(!s||s(e.relatedTarget))&&r?.()}});return{overlayProps:{...c,...d},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},o??n),{overlayProps:f,arrowProps:h,placement:m,triggerAnchorPoint:y}=function(e){var t;let{direction:r}=vW(),{arrowSize:n,targetRef:o,overlayRef:i,arrowRef:a,scrollRef:s=i,placement:l="bottom",containerPadding:u=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:p=0,crossOffset:f=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:y,maxHeight:g,arrowBoundaryOffset:b=0,getTargetRect:v}=e,[w,x]=(0,fb.useState)(null),E=[h,l,i.current,o.current,a?.current,s.current,u,c,d,p,f,m,r,g,b,n],S=(0,fb.useRef)(Si?.scale);(0,fb.useEffect)(()=>{m&&(S.current=Si?.scale)},[m]);let O=(0,fb.useCallback)(()=>{var e;if(!1===h||!m||!i.current||!o.current||!d||Si?.scale!==S.current)return;let t=null;if(s.current&&g7(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),r=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-r.top}).offset>r.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-r.bottom)}let y=i.current;!g&&i.current&&(y.style.top="0px",y.style.bottom="",y.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let w=function(e){let t,r,{placement:n,targetNode:o,overlayNode:i,scrollNode:a,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:p,arrowSize:f=0,arrowBoundaryOffset:h=0,targetRect:m}=e,y="u">typeof document?window.visualViewport:null,g=i instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!Sr(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!Sr(t);)t=t.parentElement;return t||document.documentElement}(i):document.documentElement,b=g===document.documentElement,v=window.getComputedStyle(g).position,w=b?Se(o,!1,m):St(o,g,!1,m);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(o);w.top+=parseInt(e,10)||0,w.left+=parseInt(t,10)||0}let x=Se(i,!0),E={top:parseInt((t=window.getComputedStyle(i)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};x.width+=(E.left??0)+(E.right??0),x.height+=(E.top??0)+(E.bottom??0),a.scrollTop,a.scrollLeft,a.scrollWidth,a.scrollHeight;let S=E4(u,y),O=E4(g,y);if("BODY"!==u.tagName&&"HTML"!==u.tagName||b)r=("BODY"===u.tagName||"HTML"===u.tagName)&&b?{top:0,left:0,width:0,height:0}:St(u,g,!1);else{let e=E8(g,!1);r={top:-(e.top-S.top),left:-(e.left-S.left),width:0,height:0}}return function(e,t,r,n,o,i,a,s,l,u,c,d,p,f,h,m,y){var g,b,v;let w,x,E,S=E6(e),{size:O,crossAxis:D,crossSize:P,placement:k,crossPlacement:C}=S,j=E7(t,a,r,S,u,c,l,d,f,h,s),T=u,R=E9(a,l,t,n,o+u,S,s,m);if(i&&r[O]>R){let e=E6(`${EQ[k]} ${C}`),i=E7(t,a,r,e,u,c,l,d,f,h,s);E9(a,l,t,n,o+u,e,s,m)>R&&(S=e,j=i,T=u)}let A="bottom";"top"===S.axis?"top"===S.placement?A="top":"bottom"===S.placement&&(A="bottom"):"top"===S.crossAxis&&("top"===S.crossPlacement?A="bottom":"bottom"===S.crossPlacement&&(A="top"));let N=E5(D,j[D],r[P],a,s,o,l);j[D]+=N;let M=(g=j,b=r.height,v=A,w=(null!=g.top?g.top:s[E2.height]-(g.bottom??0)-b)-(s.scroll.top??0),x=m?l.top:0,E={top:Math.max(a.top+x,(y?.offsetTop??a.top)+x),bottom:Math.min(a.top+a.height+x,(y?.offsetTop??0)+(y?.height??0))},"top"!==v?Math.max(0,E.bottom-w-((n.top??0)+(n.bottom??0)+o)):Math.max(0,w+b-E.top-((n.top??0)+(n.bottom??0)+o)));p&&p<M&&(M=p),r.height=Math.min(r.height,M),N=E5(D,(j=E7(t,a,r,S,T,c,l,d,f,h,s))[D],r[P],a,s,o,l),j[D]+=N;let I={},$=t[D]-j[D]-n[EX[D]],L=$+.5*t[P],F=f/2+h,B="left"===EX[D]?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),V=r[P]-B-f/2-h,U=EY(L,t[D]+f/2-(j[D]+n[EX[D]]),t[D]+t[P]-f/2-(j[D]+n[EX[D]]));I[D]=EY(U,F,V),({placement:k,crossPlacement:C}=S),f?$=I[D]:"right"===C?$+=t[P]:"center"===C&&($+=t[P]/2);let W="left"===k||"top"===k?r[O]:0,K={x:"top"===k||"bottom"===k?$:W,y:"left"===k||"right"===k?$:W};return{position:j,maxHeight:M,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:k,triggerAnchorPoint:K}}(n,w,x,E,s,l,S,O,r,c,d,!!v&&"static"!==v,p,f,h,g4(u,g),y)}({placement:(e=l,"rtl"===r?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:i.current,targetNode:o.current,scrollNode:s.current||i.current,padding:u,shouldFlip:c,boundaryElement:d,offset:p,crossOffset:f,maxHeight:g,arrowSize:n??(a?.current?E8(a.current,!0).width:0),arrowBoundaryOffset:b,targetRect:v?.(o.current)});if(!w.position)return;y.style.top="",y.style.bottom="",y.style.left="",y.style.right="",Object.keys(w.position).forEach(e=>y.style[e]=w.position[e]+"px"),y.style.maxHeight=null!=w.maxHeight?w.maxHeight+"px":"";let E=((e=document)=>e.activeElement)();if(t&&E&&s.current){let e=E.getBoundingClientRect(),r=s.current.getBoundingClientRect(),n=e[t.type]-r[t.type];s.current.scrollTop+=n-t.offset}x(w)},E);gc(O,E),gc(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=O]),So({ref:i,onResize:O}),So({ref:o,onResize:O});let D=(0,fb.useRef)(!1);gc(()=>{let e,t=()=>{D.current=!0,clearTimeout(e),e=setTimeout(()=>{D.current=!1},500),O()},r=()=>{D.current&&t()};Si?.addEventListener("resize",t),Si?.addEventListener("scroll",r);let n=g2(g6(window),"scroll",r);return()=>{Si?.removeEventListener("resize",t),Si?.removeEventListener("scroll",r),n()}},[O]);let P=(0,fb.useCallback)(()=>{D.current||y?.()},[y,D]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,fb.useEffect)(()=>{if(r&&null!==n)return g2(g6(t.current),"scroll",e=>{let r=g5(e);if(!t.current||r instanceof Node&&!g4(r,t.current)||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)return;let o=n||Sn.get(t.current);o&&o()},!0)},[r,n,t])}({triggerRef:o,isOpen:m,onClose:y&&P}),{overlayProps:{style:{position:w?"absolute":"fixed",top:w?void 0:0,left:w?void 0:0,zIndex:1e5,...w?.position,maxHeight:w?.maxHeight??"100vh"}},placement:w?.placement??null,triggerAnchorPoint:w?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:w?.arrowOffsetLeft,top:w?.arrowOffsetTop}},updatePosition:O}}({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!u?t.close:null,getTargetRect:l.getTargetRect??(t.point?()=>new DOMRect(t.point.x,t.point.y,0,0):void 0)});!function(e={}){let{isDisabled:t}=e;gc(()=>{if(!t){let e,t,r,n,o,i,a,s;return 1==++Sd&&(d=by()&&bg()?(t=g3(document.documentElement,"overflow","hidden"),r=!1,n=document.createElement("style"),(o=b6())&&(n.nonce=o),n.textContent=`
39
+ @layer {
40
+ * {
41
+ overscroll-behavior: contain;
42
+ }
43
+ }`.trim(),document.head.prepend(n),i=HTMLElement.prototype.focus,Reflect.defineProperty(HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(e){let t=((e=document)=>e.activeElement)(),r=null!=t&&Su(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||Sp(this,r)}}),a=gu(g2(document,"touchstart",t=>{let n=g5(t);e=_s(n)?n:_l(n,!0),r=!1;let o=n.ownerDocument.defaultView.getSelection();o&&!o.isCollapsed&&o.containsNode(n,!0)&&(r=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(r=!0),"selectionStart"in n&&"selectionEnd"in n&&n.selectionStart<n.selectionEnd&&n.ownerDocument.activeElement===n&&(r=!0)},{passive:!1,capture:!0}),g2(document,"touchmove",t=>{if(2!==t.touches.length&&!r){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),g2(document,"blur",e=>{let t=g5(e),r=e.relatedTarget;if(r&&Su(r))r.focus({preventScroll:!0}),Sp(r,Su(t));else if(!r){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),n.remove(),Reflect.defineProperty(HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:i})}):gu((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?g3(document.documentElement,"scrollbar-gutter","stable"):g3(document.documentElement,"padding-right",`${s}px`)),g3(document.documentElement,"overflow","hidden"))),()=>{0==--Sd&&d()}}},[t])}({isDisabled:i||!t.isOpen}),(0,fb.useEffect)(()=>{if(t.isOpen&&n.current)if(i){var e,r,a=o?.current??n.current;let t=Eq[Eq.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,l,u,c,d,p,f,h;return e=[o?.current??n.current],i=(r={shouldUseInert:!0})instanceof(t=g0(e?.[0])).Element?{root:r}:r,a=i?.root??document.body,s=i?.shouldUseInert&&Ez,l=new Set(e),u=new Set,c=(e,r)=>{s&&e instanceof t.HTMLElement?e.inert=r:r?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(g4(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},r=xP(gQ(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),n=t(e);if(n===NodeFilter.FILTER_ACCEPT&&p(e),n!==NodeFilter.FILTER_REJECT){let e=r.nextNode();for(;null!=e;)p(e),e=r.nextNode()}},p=e=>{let r=EG.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===r||(0===r&&c(e,!0),u.add(e),EG.set(e,r+1))},Eq.length&&Eq[Eq.length-1].disconnect(),d(a),(f=new MutationObserver(e=>{for(let r of e)if("childList"===r.type&&r.target.isConnected&&![...l,...u].some(e=>g4(e,r.target)))for(let e of r.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:l,hiddenNodes:u,observe(){f.observe(a,{childList:!0,subtree:!0})},disconnect(){f.disconnect()}},Eq.push(h),()=>{for(let e of(f.disconnect(),u)){let t=EG.get(e);null!=t&&(1===t?(c(e,!1),EG.delete(e)):EG.set(e,t-1))}h===Eq[Eq.length-1]?(Eq.pop(),Eq.length&&Eq[Eq.length-1].observe()):Eq.splice(Eq.indexOf(h),1)}}},[i,t.isOpen,n,o]);let{focusWithinProps:g}=vm(e);return{popoverProps:gk(c,f,g),arrowProps:h,underlayProps:p,placement:m,triggerAnchorPoint:y}}({...o,offset:o.offset??8,arrowRef:i,groupRef:l?s:a},e),m=o.popoverRef,y=function(e,t=!0){let[r,n]=(0,fb.useState)(!0),o=r&&t;return gc(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),Sg(e,o,(0,fb.useCallback)(()=>n(!1),[])),o}(m,!!f),g=o.isEntering||!o.shouldSkipAnimation&&y||!1,b=gR({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:f,isEntering:g,isExiting:t}}),v=!o.isNonModal||"SubmenuTrigger"===o.trigger||"PreviewTrigger"===o.trigger,[w,x]=(0,fb.useState)("PreviewTrigger"===o.trigger);gc(()=>{m.current&&x(v&&!m.current.querySelector("[role=dialog]"))},[m,v]),(0,fb.useEffect)(()=>{w&&"PreviewTrigger"!==o.trigger&&("SubmenuTrigger"!==o.trigger||"pointer"!==bE)&&m.current&&!g7(m.current)&&bW(m.current)},[w,m,o.trigger]);let E=(0,fb.useMemo)(()=>{let e=b.children;if(n)for(let t of n)e=fv().createElement(t.Provider,{value:null},e);return e},[b.children,n]),[S,O]=(0,fb.useState)(null),D=(0,fb.useCallback)(()=>{o.triggerRef.current&&O(o.triggerRef.current.getBoundingClientRect().width+"px")},[o.triggerRef]);gc(D,[D]),So({ref:b.style?.["--trigger-width"]?void 0:o.triggerRef,onResize:D});let P={...u.style,"--trigger-anchor-point":h?`${h.x}px ${h.y}px`:void 0,...b.style,"--trigger-width":b.style?.["--trigger-width"]||S},k=fv().createElement(gF.div,{...gk(gZ(o,{global:!0}),u),...b,id:w?o.id:void 0,role:w?"dialog":void 0,tabIndex:w?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:m,slot:o.slot||void 0,style:P,dir:o.dir,"data-trigger":o.trigger,"data-placement":f,"data-entering":g||void 0,"data-exiting":t||void 0},!o.isNonModal&&fv().createElement(Sm,{onDismiss:e.close}),fv().createElement(EH.Provider,{value:{...p,placement:f,ref:i}},E),fv().createElement(Sm,{onDismiss:e.close}));return l?fv().createElement(ER,{...o,shouldContainFocus:w&&"PreviewTrigger"!==o.trigger,isExiting:t,portalContainer:r??s?.current??void 0},k):fv().createElement(ER,{...o,shouldContainFocus:w&&"PreviewTrigger"!==o.trigger,isExiting:t,portalContainer:r},!o.isNonModal&&e.isOpen&&fv().createElement("div",{"data-testid":"underlay",...c,style:{position:"fixed",inset:0}}),fv().createElement("div",{ref:a,style:{display:"contents"}},fv().createElement(Sv.Provider,{value:a},k)))}function Sx(e){return e?.start!=null&&null!=e.end}let SE=(0,fb.createContext)(null),SS=(0,fb.createContext)(null),SO=(0,fb.createContext)(null),SD=(0,fb.createContext)(null),SP=[xE,vx,EW,vD],Sk=(0,fb.forwardRef)(function(e,t){[e,t]=gN(e,t,SE);let{validationBehavior:r}=gA(EF)||{},n=e.validationBehavior??r??"native",o=function(e){let t=Sy(e),[r,n]=xr(e.value,e.defaultValue||null,e.onChange),[o]=(0,fb.useState)(r),i=r||e.placeholderValue||null,[a,s]=Ef(i,e.granularity),l=null!=r?r.toDate(s??"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,p]=(0,fb.useState)(null),[f,h]=(0,fb.useState)(null);if(r&&(d=r,"hour"in r&&(f=r)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=r?.calendar.identifier==="gregory"&&"BC"===r.era,y=(0,fb.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,fb.useMemo)(()=>Es(r,g,b,v,y),[r,g,b,v,y]),x=Ee({...e,value:r,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),O=(e,t)=>{n("timeZone"in t?t.set(wB(e)):wV(e,t)),p(null),h(null),x.commitValidation()};return{...x,value:r,defaultValue:e.defaultValue??o,setValue:n,dateValue:d,timeValue:f,setDateValue:r=>{let o="function"==typeof c?c():c;u?f||o?O(r,f||Ed(e.defaultValue||e.placeholderValue)):p(r):(n(r),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?O(d,e):h(e)},granularity:a,hasTime:u,...t,setOpen(n){!n&&!r&&d&&u&&O(d,f||Ed(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:S,isInvalid:E,formatValue:(e,t)=>l?new vH(e,Ec(t,y)).format(l):"",getDateFormatter:(e,t)=>new vH(e,Ec({},{...y,...t}))}}({...e,validationBehavior:n}),i=(0,fb.useRef)(null),[a,s]=gM(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:l,labelProps:u,fieldProps:c,buttonProps:d,dialogProps:p,calendarProps:f,descriptionProps:h,errorMessageProps:m,...y}=function(e,t,r){var n;let o=gE(),i=gE(),a=gE(),s=v6((n=xq)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:h}=xJ({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=xY(t,r),y=p["aria-labelledby"]||p.id,{locale:g}=vW(),b=t.formatValue(g,{month:"long"}),v=_h(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=gZ(e),E=(0,fb.useMemo)(()=>xW(r),[r]),S=(0,fb.useRef)(!1),{focusWithinProps:O}=vm({...e,isDisabled:t.isOpen,onBlurWithin:t=>{g4(document.getElementById(i),t.relatedTarget)||(S.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{S.current||(S.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:gk(x,m,p,v,O,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...p,id:a,[x1]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[x8]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...gI(e),label:s,validationBehavior:n},o,i),{focusProps:g,isFocused:b,isFocusVisible:v}=vy({within:!0}),w=gR({...e,values:{state:o,isFocusWithin:b,isFocusVisible:v,isDisabled:e.isDisabled||!1,isInvalid:o.isInvalid,isOpen:o.isOpen,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-DatePicker"}),x=gZ(e,{global:!0});return delete x.id,fv().createElement(gT,{values:[[SO,o],[xE,{...l,ref:i,isInvalid:o.isInvalid}],[EE,c],[vx,{...d,isPressed:o.isOpen}],[EW,{...u,ref:a,elementType:"span"}],[xd,f],[EN,o],[Sb,{trigger:"DatePicker",triggerRef:i,placement:"bottom start",clearContexts:SP}],[EA,p],[vD,{slots:{description:h,errorMessage:m}}],[EI,y]]},fv().createElement(gF.div,{...gk(x,w,g),ref:t,slot:e.slot||void 0,"data-focus-within":b||void 0,"data-invalid":o.isInvalid||void 0,"data-focus-visible":v||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-open":o.isOpen||void 0}),fv().createElement(EU,{autoComplete:e.autoComplete,name:e.name,isDisabled:e.isDisabled,state:o}))}),SC=(0,fb.forwardRef)(function(e,t){[e,t]=gN(e,t,SS);let{validationBehavior:r}=gA(EF)||{},n=e.validationBehavior??r??"native",o=function(e){let t=Sy(e),[r,n]=xr(e.value,e.defaultValue||null,e.onChange),[o]=(0,fb.useState)(r),[i,a]=(0,fb.useState)(()=>r||{start:null,end:null});null==r&&i.start&&i.end&&a(i={start:null,end:null});let s=r||i,l=e=>{a(s=e||{start:null,end:null}),Sx(s)?n(s):n(null)},[u,c]=Ef(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,p=e.shouldCloseOnSelect??!0,[f,h]=(0,fb.useState)(null),[m,y]=(0,fb.useState)(null);s&&Sx(s)&&(f=s,"hour"in s.start&&(m=s));let g=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(wB(e.start)):wV(e.start,t.start),end:"timeZone"in t.end?t.end.set(wB(e.end)):wV(e.end,t.end)}),h(null),y(null),P.commitValidation()},b=r=>{let n="function"==typeof p?p():p;d?Sx(r)&&(n||m?.start&&m?.end)?g(r,{start:m?.start||Ed(e.placeholderValue),end:m?.end||Ed(e.placeholderValue)}):h(r):Sx(r)?(l(r),P.commitValidation()):h(r),n&&t.setOpen(!1)},v=e=>{Sx(f)&&Sx(e)?g(f,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,fb.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:E,maxValue:S,isDateUnavailable:O}=e,D=(0,fb.useMemo)(()=>{var e,t;let r;return e=s,t=O?e=>O(e,null):void 0,r=Eo(Es(e?.start??null,E,S,t,x),Es(e?.end??null,E,S,t,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(r=Eo(r,{isInvalid:!0,validationErrors:[(v0.getGlobalDictionaryForPackage("@react-stately/datepicker")||Ei).getStringForLocale("rangeReversed",Ea())],validationDetails:{...x5,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[s,E,S,O,x]),P=Ee({...e,value:r,name:(0,fb.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:D}),k=P.displayValidation.isInvalid,C=e.validationState||(k?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:l,dateRange:f,timeRange:m,granularity:u,hasTime:d,setDate(e,t){"start"===e?b({start:t,end:f?.end??null}):b({start:f?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:b,setTimeRange:v,...t,setOpen(r){!r&&!(s?.start&&s?.end)&&Sx(f)&&d&&g(f,{start:m?.start||Ed(e.placeholderValue),end:m?.end||Ed(e.placeholderValue)}),t.setOpen(r)},validationState:C,isInvalid:k,formatValue(t,r){let n;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=Ec(r,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(o||"UTC"),d=s.end.toDate(a||"UTC"),p=new vH(t,u);if(o===a&&i===l&&0!==s.start.compare(s.end)){try{let e=p.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=p}else n=new vH(t,Ec(r,{granularity:l,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new vH(e,Ec({},{...x,...t}))}}({...e,validationBehavior:n}),i=(0,fb.useRef)(null),[a,s]=gM(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:l,labelProps:u,startFieldProps:c,endFieldProps:d,buttonProps:p,dialogProps:f,calendarProps:h,descriptionProps:m,errorMessageProps:y,...g}=function(e,t,r){var n;let o=v6((n=xq)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=xJ({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),p=u["aria-labelledby"]||u.id,{locale:f}=vW(),h=t.formatValue(f,{month:"long"}),m=_h(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":p},g={"aria-label":o.format("endDate"),"aria-labelledby":p},b=gE(),v=gE(),w=xY(t,r),x=[m["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=(0,fb.useMemo)(()=>xW(r,{accept:e=>e.id!==b}),[r,b]),S={[x2]:E,[x1]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},O=gZ(e),D=(0,fb.useRef)(!1),{focusWithinProps:P}=vm({...e,isDisabled:t.isOpen,onBlurWithin:t=>{g4(document.getElementById(v),t.relatedTarget)||(D.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{D.current||(D.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),k=(0,fb.useRef)(x7),C=(0,fb.useRef)(x7);return{groupProps:gk(O,w,u,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...l,onClick:()=>{E.focusFirst()}},buttonProps:{...m,id:b,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${b} ${p}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${b} ${p}`},startFieldProps:{...y,...S,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[x8]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(Eo(e,C.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...S,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[x8]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(Eo(k.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...gI(e),label:s,validationBehavior:n},o,i),{focusProps:b,isFocused:v,isFocusVisible:w}=vy({within:!0}),x=gR({...e,values:{state:o,isFocusWithin:v,isFocusVisible:w,isDisabled:e.isDisabled||!1,isInvalid:o.isInvalid,isOpen:o.isOpen,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-DateRangePicker"}),E=gZ(e,{global:!0});return delete E.id,fv().createElement(gT,{values:[[SD,o],[xE,{...l,ref:i,isInvalid:o.isInvalid}],[vx,{...p,isPressed:o.isOpen}],[EW,{...u,ref:a,elementType:"span"}],[xp,h],[EN,o],[Sb,{trigger:"DateRangePicker",triggerRef:i,placement:"bottom start",clearContexts:SP}],[EA,f],[EE,{slots:{start:c,end:d}}],[vD,{slots:{description:m,errorMessage:y}}],[EI,g]]},fv().createElement(gF.div,{...gk(E,x,b),ref:t,slot:e.slot||void 0,"data-focus-within":v||void 0,"data-invalid":o.isInvalid||void 0,"data-focus-visible":w||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-open":o.isOpen||void 0}))});function Sj(e){return fv().createElement(vU,e)}function ST(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof wk||e instanceof wj||e instanceof wT)return t?wU(e,t):e;{let r=h6()(e).toDate(),n=new wk(r.getFullYear(),r.getMonth()+1,r.getDate());return t?wU(n,t):n}}function SR(e){if(e)return e.toDate(w1())}function SA(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function SN(e){let t=e??"",r=SA(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function SM(){let e=window.i18next.language,t=SA(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;es=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;es=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var SI=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(es||"en-US"),S$=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},SL={};for(let e=0;e<100;e++)SL[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var SF={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},SB="[1234567890一二三四五六七八九〇\\d]",SV={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},SU={},SW={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},SK={zone:SW,year:SL,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},SH={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:`\\(?(?:${Object.keys(SW).join("|")})\\)?`,MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},Sz={...SH,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},SG={},Sq=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=SI){let r=t.toLowerCase(),n=SG[r];if(n)return n;let o=new e(t);return SG[r]=o,o}constructor(e=SI){this.locale=e,this.lookups={...SK},this.vars={...SH};const t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){return"number"==typeof e?e:"string"==typeof e?this.stringToInt(e):void 0}stringToInt(e){if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!Number.isNaN(t))return t}let t="";for(let r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.stringToInt(t):2===t.length?10*this.stringToInt(t):this.stringToInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.stringToInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.stringToInt(r)+(n?this.stringToInt(n):0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=SV:this.buildNumbers(),!/^en/i.test(this.locale)&&(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){let t=SU[e];if(t)return t;if("fullwide"===e||"hanidec"===e)return{group:SB,lookup:{...SV}};let r=SF[e];if(!r)return{group:"\\d",lookup:{...SV}};let n=String.fromCharCode(r),o=String.fromCharCode(r+9),i={};for(let e=0;e<10;e++)i[String.fromCharCode(r+e)]=e;return SU[e]={group:`[${n}-${o}]`,lookup:i},SU[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Sz)Object.hasOwn(Sz,r)&&(this.vars[r]=Sz[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[r+o+(i<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).find(n);if(!s)continue;let l=s.value.toLocaleLowerCase(this.locale);/^\d+$/.test(l)||(/^ko/i.test(this.locale)&&(l+="월"),"medium"===o?(l=l.replace(/\.$/,""),e[`${l}\\.?`]=!0):e[l]=!0,t[l]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n);if(!a)continue;let s=a.value.toLocaleLowerCase(this.locale);s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0,t[s]=i+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t);if(!s)continue;let l=s.value.toLocaleLowerCase(this.locale);"short"===o?(l=l.replace(/\.$/,""),r.push(`${l}\\.?`)):r.push(l),n[l]=a}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},SY=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],SZ={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},SJ=()=>new Date;function SX(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var SQ=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in r||void 0===t||(r[e]=t);let e=o.index??0;if(t=(t=t.slice(0,e)+t.slice(e+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},S0=["year","month","day","hour","minute","second","millisecond","offset"],S1={};function S2(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var S3=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],S4={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...S3],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:S3,id:S3,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function S5(e,t=SI){let r=function(e){var t,r;let n,o,i=S1[e];if(i)return i;let a=Sq.factory(e),s=new SQ({doneChecker:S2,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:SX(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:SX(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:SX(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${SB}{2,4})\\s*\u5E74\\s*(${SB}{1,2})\\s*\u6708\\s*(${SB}{1,2})\\s*\u65E5$`),handler:SX(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:SX(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:SX(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/\b(now|today|tomorrow|yesterday)\b/i,handler:e=>{let t=SJ(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r]??0;0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:([,e,t,r,n])=>{let o,i=parseFloat(t);"week"===(o=r.length<=2?SZ[r]:(o=r.replace(/s$/,"")).toLowerCase())&&(o="day",i*=7),("-"===e||n)&&(i*=-1);let a=SJ();return"millisecond"===o?a.setUTCMilliseconds(a.getUTCMilliseconds()+i):"second"===o?a.setUTCSeconds(a.getUTCSeconds()+i):"minute"===o?a.setUTCMinutes(a.getUTCMinutes()+i):"hour"===o?a.setUTCHours(a.getUTCHours()+i):"day"===o?a.setUTCDate(a.getUTCDate()+i):"month"===o?a.setUTCMonth(a.getUTCMonth()+i):"year"===o&&a.setUTCFullYear(a.getUTCFullYear()+i),{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:e=>{let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:e=>{let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:SX(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:SX(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:SX(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:SX(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:SX(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:SX(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:SX(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:SX(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:SX(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:SX(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:SX(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:SX(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:SX(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:SX(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:SX(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:SX(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([./-])(_MONTH_)\\2+(_DAY_)"),handler:SX(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:SX(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:SX(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:SX(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:SX(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:SX(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:SX(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:SX(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:SX(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:SX(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:SX(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:SX(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:SX(["zone"])},{name:"onlyOffset",regex:a.compile("_OFFSET_"),handler:SX(["offset"])}],o=a.baseName.slice(0,5),SY.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=a,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(S0.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return void 0!==t.year&&t.year<100&&(t.year=SL[String(e.year)]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})});return S1[e]=s,s}(t),n=function(e,t){let r=S4[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function S6(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new S$(e.year??NaN,(e.month??NaN)-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new S$(t.valueOf()-60*e.offset*1e3):t}function S7(e,t=SI){let r=S5(e,t),n=r.invalid?new S$(NaN):S6(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function S9(e,t=SI){return e instanceof Date?new S$(e.valueOf()):"number"==typeof e?new S$(e):S7(e,t)}Date.fromString=S$.fromString=S7,Date.fromAny=S$.fromAny=S9,"u">typeof window&&(window.anyDateParser={fromString:S7,fromAny:S9,fromObject:S6,attempt:S5});var S8=r(44397),Oe=r(57657);let Ot=function(e){return null==e};function Or(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}h5.extend(h7),h5.extend(Oe),h5.extend(S8);let On="YYYY-MM-DDTHH:mm:ss.SSSZZ";function Oo(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&h5(e,On).isValid()}function Oi(e){return h5(e).isToday()}function Oa(e){return Oo(e)?h5(e,On).toDate():null}function Os(e,t=!1){let r=h5(e);return t&&(r=r.utc()),r.format(On)}function Ol(e){return h5(e).toDate()}var Ou=new WeakMap;let Oc=new class{register(e,t){Or(this,Ou).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(Or(this,Ou).has(t))return Or(this,Ou).get(t)}if(e.language&&Or(this,Ou).has(e.language))return Or(this,Ou).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return Or(this,Ou).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,Ou,{writable:!0,value:new Map})}};function Od(e,t){Oc.register(e,t)}function Op(e){let t=e??SM();return Oc.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let Of={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function Oh(e,t={}){let r=S5(e,SM());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!Ot(r.day)&&Ot(r.month)&&(r=Object.assign({},t2(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},t2(r,"day"),{date:r.day}));let n=h5().set(r).toDate();return Ot(r.year)&&(t.year=!1),Ot(r.month)&&(t.month=!1),Ot(r.date)&&(t.day=!1),Om(n,t)}function Om(e,t){let r,n=t?.locale??SM(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...Of,...{noToday:"am"===o.language},...t},f={calendar:i??Op(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},h=h5(e).isToday();if(h&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(Oy("-"))),"wide"==a&&(t=t.map(Oy(" — "))),"ethiopic"===f.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(r+=`, ${Og(e)}`),r}let Oy=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function Og(e){return e.toLocaleTimeString(SM(),{hour:"2-digit",minute:"2-digit"})}function Ob(e,t){return Om(e,{...t,time:!0})}function Ov(e,t){let r=Op("string"==typeof t?new Intl.Locale(t):t);return r?wU(e,_3(r)):e}function Ow(e,t){return new Intl.DurationFormat(SM(),t).format(e)}function O_(e,t){if(null==e)return null;if("string"==typeof e){let r=S5(e,SM());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...t2(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...t2(r,"day"),...{date:r.day}}),h5(t).set(r))}return h5(e)}let Ox=["years","months","days","hours","minutes","seconds"],OE={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},OS={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function OO(e,t=h5(),r){let n,o=h5(t),i=O_(e,o);if(null==i)return null;if("string"==typeof r){let e=OE[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?OE[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=Ox.indexOf(r);for(let o=0;o<Ox.length;o++){let i=Ox[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):OE[s]??s,function(e,t,r,n){let o=Ox.indexOf(r),i=Ox.indexOf(n),a=Ox.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...OS};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[OE[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let OD={style:"short",localeMatcher:"lookup"};function OP(e,t=h5(),r){let n=OO(e,t,r);return null==n?null:Ow(n,"object"==typeof r&&r.formatOptions?{...OD,...r.formatOptions}:OD)}let Ok=(0,fb.createContext)(null);function OC(){let e=hy({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,fb.useMemo)(()=>{let t=SM();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,fb.useMemo)(()=>{let e=Op(t);return void 0!==e?_3(e):void 0},[t]),n=(0,fb.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,fb.useMemo)(()=>r?wU(wJ(w1()),r):wJ(w1()),[r]);return{calendar:r,intlLocale:n,today_:o}}let Oj=new wk(1793,1,1);var OT={};function OR(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function OA(e={}){let{locale:t}=vW();return(0,fb.useMemo)(()=>new(0,Eb.K)(t,e),[t,e])}OT={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var ON={};ON={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let OM=()=>{};function OI(e){var t;let r=(0,fb.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,y=v6((t=ON)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),g=(0,fb.useRef)(!1),b=(0,fb.useCallback)(()=>{clearTimeout(r.current),g.current=!1},[]),v=b8(()=>{b()});(0,fb.useEffect)(()=>()=>v(),[]);let{keyboardProps:w}=bJ({isDisabled:s||l,shortcuts:{PageUp:()=>d?void d():!!c&&void c(),ArrowUp:()=>!!c&&void c(),PageDown:()=>f?void f():!!p&&void p(),ArrowDown:()=>!!p&&void p(),Home:()=>!!h&&void h(),End:()=>!!m&&void m()},allowRepeats:!0}),x=(0,fb.useRef)(!1),E=()=>{x.current=!0},S=()=>{x.current=!1},O=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,fb.useEffect)(()=>{x.current&&(gV&&gV.clear("assertive"),gU(O,"assertive"))},[O]);let D=(0,fb.useCallback)(()=>{b()},[b]),P=b8(c??OM),k=b8(p??OM),C=b8(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&(P(),j(60))}),j=b8(e=>{v(),g.current=!0,r.current=window.setTimeout(C,e)}),T=b8(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&(k(),R(60))}),R=b8(e=>{v(),g.current=!0,r.current=window.setTimeout(T,e)}),A=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:M}=ve(),I=(0,fb.useRef)(!1),[$,L]=(0,fb.useState)(null);(0,fb.useEffect)(()=>{"touch"===$?j(600):$?j(400):$||v()},[$]);let[F,B]=(0,fb.useState)(null);return(0,fb.useEffect)(()=>{"touch"===F?R(600):F?R(400):F||v()},[F]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":O,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,...w,onFocus:E,onBlur:S},incrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(c?.(),L("mouse")):(N(window,"pointercancel",D,{capture:!0}),I.current=!1,L("touch")),N(window,"contextmenu",A)},onPressUp:e=>{b(),"touch"===e.pointerType&&(I.current=!0),M(),L(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&I.current&&c?.(),I.current=!1,L(null)},onFocus:E,onBlur:S},decrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(p?.(),B("mouse")):(N(window,"pointercancel",D,{capture:!0}),I.current=!1,B("touch"))},onPressUp:e=>{b(),"touch"===e.pointerType&&(I.current=!0),M(),B(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&I.current&&p?.(),I.current=!1,B(null)},onFocus:E,onBlur:S}}}let O$=null;var OL=r(72103);function OF(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let OB=(0,fb.createContext)(null),OV=(0,fb.createContext)(null),OU=(0,fb.forwardRef)(function(e,t){[e,t]=gN(e,t,OB);let{validationBehavior:r}=gA(EF)||{},n=e.validationBehavior??r??"native",{locale:o}=vW(),i=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let p=(0,fb.useCallback)(e=>void 0===n||isNaN(n)?EY(e,t,r):EJ(e,t,r,n),[n,t,r]);void 0===i||isNaN(i)||"snap"!==d||(i=p(i)),isNaN(a)||"snap"!==d||(a=p(a));let[f,h]=xr(i,isNaN(a)?NaN:a,s),[m]=(0,fb.useState)(f),[y,g]=(0,fb.useState)(()=>isNaN(f)?"":new(0,Eb.K)(l,o).format(f)),b=(0,fb.useMemo)(()=>new(0,OL.d)(l,o),[l,o]),v=(0,fb.useMemo)(()=>b.getNumberingSystem(y),[b,y]),w=(0,fb.useMemo)(()=>new(0,Eb.K)(l,{...o,numberingSystem:v}),[l,o,v]),x=(0,fb.useMemo)(()=>w.resolvedOptions(),[w]),E=(0,fb.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),S=Ee({...e,value:f}),O=void 0===n||isNaN(n)?1:n;"percent"===x.style&&(void 0===n||isNaN(n))&&(O=.01);let[D,P]=(0,fb.useState)(f),[k,C]=(0,fb.useState)(l),[j,T]=(0,fb.useState)(o);Object.is(f,D)&&l===k&&function(e,t){if(e===t)return!0;if(!e||!t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}(o,j)||(g(E(f)),P(f),C(l),T(o));let R=(0,fb.useMemo)(()=>b.parse(y),[b,y]),A=(e,n=0)=>{if(isNaN(R))return EJ(isNaN(n)?0:n,t,r,O);{let n=EJ(R,t,r,O);return"+"===e&&n>R||"-"===e&&n<R?n:EJ(OF(e,R,O),t,r,O)}},N=(0,fb.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===r||isNaN(r)||EJ(R,t,r,O)>R||OF("+",R,O)<=r),[u,c,t,r,O,R]),M=(0,fb.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===t||isNaN(t)||EJ(R,t,r,O)<R||OF("-",R,O)>=t),[u,c,t,r,O,R]);return{...S,validate:e=>b.isValidPartialNumber(e,t,r),increment:()=>{let e=A("+",t);e===f&&g(E(e)),h(e),S.commitValidation()},incrementToMax:()=>{null!=r&&(h(EJ(r,t,r,O)),S.commitValidation())},decrement:()=>{let e=A("-",r);e===f&&g(E(e)),h(e),S.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),S.commitValidation())},canIncrement:N,canDecrement:M,minValue:t,maxValue:r,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:g,inputValue:y,commit:e=>{let t=void 0===e?y:e,r=R;if(void 0!==e&&(r=b.parse(t)),!t.length){h(NaN),g(void 0===i?"":E(f));return}if(isNaN(r))return void g(E(f));let n="snap"===d?p(r):r,o=(n=b.parse(E(n)))!==f;h(n),g(E(void 0===i?n:f)),o&&S.commitValidation()}}}({...e,locale:o,validationBehavior:n}),a=(0,fb.useRef)(null),[s,l]=gM(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:u,groupProps:c,inputProps:d,incrementButtonProps:p,decrementButtonProps:f,descriptionProps:h,errorMessageProps:m,...y}=function(e,t,r){var n,o,i,a,s,l,u,c,d;let p,{id:f,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:g,isRequired:b,minValue:v,maxValue:w,autoFocus:x,label:E,formatOptions:S,onBlur:O=()=>{},onFocus:D,onFocusChange:P,onKeyDown:k,onKeyUp:C,description:j,errorMessage:T,isWheelDisabled:R,...A}=e,{increment:N,incrementToMax:M,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=v6((n=OT)&&n.__esModule?n.default:n,"@react-aria/numberfield"),W=(0,fb.useCallback)(()=>{let e=r.current?.value??"";(0,vt.flushSync)(()=>{B()}),r.current?.value!==e&&gU(r.current?.value??"","assertive")},[B,r]),K=gE(f),{focusProps:H}=bK({onBlur(){W()}}),z=OA(S),G=(0,fb.useMemo)(()=>z.resolvedOptions(),[z]),q=OA({...S,currencySign:void 0}),Y=(0,fb.useMemo)(()=>isNaN(L)?"":q.format(L),[q,L]),{spinButtonProps:Z,incrementButtonProps:J,decrementButtonProps:X}=OI({isDisabled:y,isReadOnly:g,isRequired:b,maxValue:w,minValue:v,onIncrement:N,onIncrementToMax:M,onDecrement:I,onDecrementToMin:$,value:L,textValue:Y}),[Q,ee]=(0,fb.useState)(!1),{focusWithinProps:et}=vm({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,fb.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);_m(t,"wheel",n?void 0:o)}({onScroll:(0,fb.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?N():e.deltaY<0&&I())},[I,N]),isDisabled:R||y||g||!Q},r);let er=(G.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";bh()?en?eo="text":er&&(eo="decimal"):bv()&&(en?eo="numeric":er&&(eo="decimal"));let ei=gZ(e),{keyboardProps:ea}=bJ({isDisabled:y||g,shortcuts:{Enter:()=>((0,vt.flushSync)(()=>{B()}),V(),{shouldPreventDefault:!1})},onKeyDown:k,onKeyUp:C}),{isInvalid:es,validationErrors:el,validationDetails:eu}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ep,errorMessageProps:ef}=function(e,t,r){let n=b8(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,fb.useEffect)(()=>{if(!OR()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r]);let o=OR()?null:e=>{let r=g5(e).value.slice(0,g5(e).selectionStart)+e.data+g5(e).value.slice(g5(e).selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=xr(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=b0(e,t),d=Ee({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=xJ({...e,isInvalid:p,errorMessage:e.errorMessage||f}),v=gZ(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,fb.useState)(l);return xX(t,e.defaultValue??x,u),xQ(e,d,t),{labelProps:m,inputProps:gk(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(g5(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(fv().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:p,validationErrors:f,validationDetails:h}}(e,r),c=(0,fb.useRef)(null);return{inputProps:gk(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...A,...ei,name:void 0,form:void 0,label:E,autoFocus:x,isDisabled:y,isReadOnly:g,isRequired:b,validate:void 0,[x8]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:K,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:O,onFocus:D,onFocusChange:P,onPaste:t=>{e.onPaste?.(t);let r=g5(t);r&&(r.selectionEnd??-1)-(r.selectionStart??0)===r.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:j,errorMessage:T},t,r),eh=gk(ea,ed);xX(r,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=r,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,gc(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!O$&&"u">typeof document&&((O$=document.createElement("input")).type="number"),!O$))return;O$.min=null==l||isNaN(l)?"":String(l),O$.max=null==u||isNaN(u)?"":String(u),O$.step=null==c||isNaN(c)?"":String(c),O$.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&O$.validity.valid,r=e.validationMessage||O$.validationMessage,n={isInvalid:!t,validationErrors:r?[r]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:O$.validity.rangeOverflow,rangeUnderflow:O$.validity.rangeUnderflow,stepMismatch:O$.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};o.updateValidation(n),"native"!==i||O$.validity.valid||e.setCustomValidity(O$.validationMessage)});let em=gk(Z,H,eh,{role:null,"aria-roledescription":by()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(em["aria-required"]=void 0);let ey=e=>{((e=document)=>e.activeElement)()!==r.current&&("mouse"===e.pointerType?r.current?.focus():e.target.focus())},eg=e["aria-label"]||("string"==typeof e.label?e.label:"");eg||(p=null!=e.label?ec.id:e["aria-labelledby"]);let eb=gE(),ev=gE(),ew=gk(J,{"aria-label":m||U.format("increase",{fieldLabel:eg}).trim(),id:p&&!m?eb:null,"aria-labelledby":p&&!m?`${eb} ${p}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ey}),e_=gk(X,{"aria-label":h||U.format("decrease",{fieldLabel:eg}).trim(),id:p&&!h?ev:null,"aria-labelledby":p&&!h?`${ev} ${p}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ey});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:em,incrementButtonProps:ew,decrementButtonProps:e_,errorMessageProps:ef,descriptionProps:ep,isInvalid:es,validationErrors:el,validationDetails:eu}}({...gI(e),label:l,validationBehavior:n},i,a),g=gR({...e,values:{state:i,isDisabled:e.isDisabled||!1,isInvalid:y.isInvalid||!1,isRequired:e.isRequired||!1,isReadOnly:e.isReadOnly||!1},defaultClassName:"react-aria-NumberField"}),b=gZ(e,{global:!0});return delete b.id,fv().createElement(gT,{values:[[OV,i],[xE,c],[xO,{...d,ref:a}],[EW,{...u,ref:s}],[vx,{slots:{increment:p,decrement:f}}],[vD,{slots:{description:h,errorMessage:m}}],[EI,y]]},fv().createElement(gF.div,{...b,...g,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-invalid":y.isInvalid||void 0}),e.name&&fv().createElement("input",{type:"hidden",name:e.name,form:e.form,value:isNaN(i.numberValue)?"":i.numberValue,disabled:e.isDisabled||void 0}))});function OW(e,t){return Number.parseInt(Om(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let OK=(0,fb.forwardRef)(function(e,t){let{className:r}=e,n=(0,fb.useContext)(xf),o=(0,fb.useContext)(xh),i=n??o,a=(0,fb.useContext)(Ok),s=w1(),l=Om(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=OW(i.visibleRange.start.toDate(s),a),c=i.maxValue?OW(i.maxValue.toDate(s),a):void 0,d=i.minValue?OW(i.minValue.toDate(s),a):void 0,p=(0,fb.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,my.jsxs)("span",{ref:t,className:r,children:[(0,my.jsx)("span",{children:l}),(0,my.jsxs)(OU,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,my.jsx)(xD,{}),(0,my.jsxs)(xS,{children:[(0,my.jsx)(vE,{slot:"increment",children:(0,my.jsx)(mq,{size:8})}),(0,my.jsx)(vE,{slot:"decrement",children:(0,my.jsx)(mH,{size:8})})]})]})]})}),OH="-esm-ward__datepicker-module__inputGroup___gBam-",Oz="-esm-ward__datepicker-module__inputSegment___wIJDZ",OG="-esm-ward__datepicker-module__dateInputWrapper___LiY68",Oq="-esm-ward__datepicker-module__invalidText___A4cv4",OY="-esm-ward__datepicker-module__flatButton___HcpME",OZ="-esm-ward__datepicker-module__flatButtonMd___eFpyF",OJ="-esm-ward__datepicker-module__flatButtonSm___tsawR",OX="-esm-ward__datepicker-module__flatButtonLg___4HG5y";function OQ({children:e}){let t=(0,fb.useContext)(SO),r=(0,fb.useContext)(SD),n=t??r,o=hq(()=>n?.close());return(0,my.jsx)(EM,{className:"-esm-ward__datepicker-module__dialog___DaqYi",ref:o,children:e})}let O0=(0,fb.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,my.jsx)(Sw,{ref:o,className:"-esm-ward__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,my.jsx)(OQ,{children:(0,my.jsxs)(i?xy:xm,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,my.jsxs)("header",{className:"-esm-ward__datepicker-module__header___rPv3L",children:[(0,my.jsx)(vE,{className:mb()(OY,OZ),slot:"previous",children:(0,my.jsx)(m1,{size:16})}),(0,my.jsx)(OK,{className:"-esm-ward__datepicker-module__monthYear___Rw4qE"}),(0,my.jsx)(vE,{className:mb()(OY,OZ),slot:"next",children:(0,my.jsx)(m2,{size:16})})]}),(0,my.jsx)(xb,{className:"-esm-ward__datepicker-module__calendarGrid___yKV-n",children:e=>(0,my.jsx)(xx,{className:mb()("cds--date-picker__day",{"-esm-ward__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),O1=(0,fb.forwardRef)(function(e,t){let r=(0,fb.useContext)(SO),[n,o]=gN({slot:e.slot},t,EE),{locale:i}=vW(),a=Ex({...n,locale:i,createCalendar:_3}),s=(0,fb.useRef)(null),{fieldProps:l,inputProps:u}=x3({...n,inputRef:s},a,o),c=(0,fb.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,my.jsxs)(gT,{values:[[ES,a],[xO,{...u,ref:s}],[xE,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,my.jsx)(xS,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,fb.cloneElement)(e.children(t),{key:r}))}),(0,my.jsx)(xD,{})]})}),O2=(0,fb.forwardRef)(function(e,t){let r=(0,fb.useContext)(SO),n=(0,fb.useContext)(SD);return(r??n).isInvalid?(0,my.jsx)(y8,{ref:t,size:16,...e}):(0,my.jsx)(mK,{ref:t,size:16,...e})});class O3{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let O4=new Map,O5=(0,fb.forwardRef)(function({segment:e,...t},r){let n=(0,fb.useContext)(ES),o=gC(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,fb.useRef)(""),{locale:l,direction:u}=vW(),c=function(){var e;let{locale:t}=vW(),r=v5((e=xq)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,fb.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new O3(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:h}=x0.get(t),m=e.isPlaceholder?"":e.text,y=(0,fb.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=vZ({month:"long",timeZone:y.timeZone}),b=vZ({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=OI({value:e.value??void 0,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,fb.useMemo)(()=>new(0,OL.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{keyboardProps:E}=bJ({shortcuts:{Backspace:()=>{x()},Delete:()=>{x()},"Mod+a":()=>{}},allowRepeats:!0}),{startsWith:S}=(n=function(e){let{locale:t}=vW(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(O4.has(r))return O4.get(r);let n=new Intl.Collator(t,e);return O4.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,fb.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,fb.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,fb.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,fb.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),O=vZ({hour:"numeric",hour12:!0}),D=(0,fb.useMemo)(()=>{let e=new Date;return e.setHours(0),O.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[O]),P=(0,fb.useMemo)(()=>{let e=new Date;return e.setHours(12),O.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[O]),k=vZ({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,fb.useMemo)(()=>{if("era"!==e.type)return[];let r=wU(new wk(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:k.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[k,t.calendar,e.type]),j=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(S(D,r))t.setSegment("dayPeriod",0);else if(S(P,r))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=C.find(e=>S(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=n}}};_m((0,fb.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&g4(r.current,e?.anchorNode)&&((e=document)=>e.activeElement)()===r.current&&e.collapse(r.current)});let T=(0,fb.useRef)("");_m(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":T.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&j(n.data)}}),_m(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=T.current),null!=n&&(S(D,n)||S(P,n))&&j(n))}),gc(()=>{let e=r.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let R=by()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,fb.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let A=gE(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,M="literal"===e.type?"":c.of(e.type),I=_o({"aria-label":`${M}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:gk(v,I,{id:A,...R,...E,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(fv().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onFocus:()=>{s.current="",r.current&&_d(r.current,{containingElement:_l(r.current)});let e=window.getSelection();e?.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=vy(),{hoverProps:u,isHovered:c}=v_({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,fb.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,fb.useCallback)(e=>{e.stopPropagation()},[]);return(0,my.jsx)("span",{...gk(gZ(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:p})}),O6={short:!1,size:"md"},O7=(0,fb.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:h,short:m,size:y,value:g,...b}={...O6,...e},{calendar:v,intlLocale:w,today_:x}=OC(),E=(0,fb.useId)(),S=!!(u??l),O=(0,fb.useMemo)(()=>ST(n,v),[n,v]),D=(0,fb.useMemo)(()=>ST(g,v,!0),[g,v]),P=(0,fb.useMemo)(()=>ST(d,v),[d,v]),k=(0,fb.useMemo)(()=>ST(p??Oj,v),[p,v]),C=(0,fb.useMemo)(()=>i||s,[i,s]),j=(0,fb.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(SR(e)))),[h,f]);return(0,my.jsx)(Sj,{locale:w.toString(),children:(0,my.jsx)("div",{className:mb()("cds--form-item",r),children:(0,my.jsx)(gT,{values:[[Ok,w]],children:(0,my.jsxs)(Sk,{className:mb()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:O,isDisabled:o,isInvalid:C,maxValue:P,minValue:k,value:D,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:j,children:[(0,my.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,my.jsx)(EK,{className:mb()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:u??l}),(0,my.jsxs)(xS,{className:OH,children:[(0,my.jsx)(O1,{id:S?E:void 0,ref:t,className:mb()("cds--date-picker-input__wrapper","-esm-ward__datepicker-module__inputWrapper___uKdT1",{"-esm-ward__datepicker-module__inputWrapperSm___0RXJc":"sm"===y,"-esm-ward__datepicker-module__inputWrapperMd___4Vff1":"md"===y||!y||0===y.length,"-esm-ward__datepicker-module__inputWrapperLg___VCRm5":"lg"===y}),children:e=>"era"!==e.type?(0,my.jsx)(O5,{className:Oz,segment:e}):(0,my.jsx)(fv().Fragment,{})}),(0,my.jsx)(vE,{className:mb()(OY,{[OJ]:"sm"===y,[OZ]:"md"===y||!y||0===y.length,[OX]:"lg"===y}),children:(0,my.jsx)(O2,{})})]}),(0,my.jsx)(E$,{className:Oq,children:a})]}),(0,my.jsx)(O0,{variant:"single",today_:x})]})})})})}),O9=(0,fb.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=OC(),w=(0,fb.useId)(),x=!!(s??a),E=(0,fb.useMemo)(()=>{if(h)return{start:ST(h[0],g,!1),end:ST(h[1],g,!1)}},[h,g]),S=(0,fb.useMemo)(()=>{if(t)return{start:ST(t[0],g,!1),end:ST(t[1],g,!1)}},[t,g]),O=(0,fb.useMemo)(()=>ST(c??Oj,g,!0),[c,g]),D=(0,fb.useMemo)(()=>ST(u,g,!0),[u,g]),P=(0,fb.useMemo)(()=>r||i,[r,i]),k=(0,fb.useMemo)(()=>(p&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>d?.([SR(e.start),SR(e.end)]))),[p,d]);return(0,my.jsx)(Sj,{locale:b.toString(),children:(0,my.jsx)("div",{className:mb()("cds--form-item",e),children:(0,my.jsx)(gT,{values:[[Ok,b]],children:(0,my.jsx)(SC,{id:x?w:void 0,className:mb()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:D,minValue:O,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:k,children:(0,my.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,my.jsx)(EK,{className:mb()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,my.jsxs)(xS,{className:OH,children:[(0,my.jsxs)("div",{className:mb()("-esm-ward__datepicker-module__inputsWrapper___xXRQI",{"-esm-ward__datepicker-module__inputsWrapperSm___nL+b6":"sm"===f,"-esm-ward__datepicker-module__inputsWrapperMd___Kgcps":"md"===f||!f||0===f.length,"-esm-ward__datepicker-module__inputsWrapperLg___raaSN":"lg"===f}),children:[(0,my.jsx)(ED,{className:mb()("cds--date-picker-input__wrapper","-esm-ward__datepicker-module__startInput___cWw-5",OG),slot:"start",children:e=>(0,my.jsx)(O5,{className:Oz,segment:e})}),(0,my.jsx)("div",{className:"-esm-ward__datepicker-module__separator___Ddb4g",children:(0,my.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,my.jsx)(ED,{className:mb()("cds--date-picker-input__wrapper","-esm-ward__datepicker-module__endInput___xdYOl",OG),slot:"end",children:e=>(0,my.jsx)(O5,{className:Oz,segment:e})})]}),(0,my.jsx)(vE,{className:mb()(OY,{[OJ]:"sm"===f,[OZ]:"md"===f||!f||0===f.length,[OX]:"lg"===f}),children:(0,my.jsx)(O2,{})})]}),(0,my.jsx)(E$,{className:Oq,children:n}),(0,my.jsx)(O0,{variant:"range",today_:v,minDate:O,maxDate:D})]})})})})})}),O8=({diagnoses:e})=>{let{diagnosisTags:t}=hy({externalModuleName:"@openmrs/esm-styleguide"});return(0,my.jsx)("div",{className:"-esm-ward__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,my.jsx)(mE.vwO,{type:i,children:o},n)})})},De={action:"-esm-ward__empty-card-module__action___oG778",content:"-esm-ward__empty-card-module__content___YUXvR",desktopHeading:"-esm-ward__empty-card-module__desktopHeading___EljiH",tabletHeading:"-esm-ward__empty-card-module__tabletHeading___8mc7w",tile:"-esm-ward__empty-card-module__tile___3-rRO"},Dt=({width:e="64",height:t="64"})=>(0,my.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,my.jsx)("use",{href:"#omrs-empty-data-illustration"})}),Dr=e=>{let t="tablet"===hW(),r=e.launchForm;return(0,my.jsx)(mE.Wdr,{className:De.layer,children:(0,my.jsxs)(mE.FAs,{className:De.tile,children:[(0,my.jsx)("div",{className:t?De.tabletHeading:De.desktopHeading,children:(0,my.jsx)("h4",{children:e.headerTitle})}),(0,my.jsx)(Dt,{}),(0,my.jsx)("p",{className:De.content,children:ao("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,my.jsx)("p",{className:De.action,children:r&&(0,my.jsx)(mE.$nd,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:ao("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},Dn=({error:e,headerTitle:t})=>{let r="tablet"===hW();return(0,my.jsx)(mE.Wdr,{children:(0,my.jsxs)(mE.FAs,{className:"-esm-ward__error-state-module__tile___mzWLn",children:[(0,my.jsx)("div",{className:r?"-esm-ward__error-state-module__tabletHeading___l7Cpn":"-esm-ward__error-state-module__desktopHeading___p57fl",children:(0,my.jsx)("h4",{children:t})}),(0,my.jsxs)("p",{className:"-esm-ward__error-state-module__errorMessage___0fU6v",children:[ao("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,my.jsx)("p",{className:"-esm-ward__error-state-module__errorCopy___xkVog",children:ao("errorCopy")})]})})},Do=Dn,Di=fv().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=hz(),a=window.location??{pathname:""},s=fA(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,my.jsxs)(mE.f8J,{"aria-label":ao("leftNavigation","Left navigation"),className:"-esm-ward__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,my.jsx)(fI,{name:"global-nav-menu-slot"}),r?(0,my.jsx)(ha,{value:o,fallback:(0,my.jsx)(fI,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,my.jsx)(fw.Provider,{value:o,children:(0,my.jsx)(fI,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),Da=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,fb.useState)(""),s=(0,fb.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=h_()(t,oY,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,fb.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:p,error:f,setPage:h}=function(e,t=0,r=""){let n=hv(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=hM()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let i=`${oz}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},oY);return(0,fb.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),m=(0,fb.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,fb.useCallback)(e=>{o(),a(e.trim())},[o]),g=hY((0,fb.useCallback)(()=>{!p&&d&&h(e=>e+1)},[p,d,h])),b=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,my.jsxs)(my.Fragment,{children:[(0,my.jsx)(mE.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:ao("searchForLocation"),id:s,placeholder:ao("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),f&&(0,my.jsx)("div",{className:"-esm-ward__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,my.jsx)(mE.jeF,{kind:"error",subtitle:ao("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:ao("error","Error")})}),(0,my.jsx)("div",{className:"-esm-ward__location-picker-module__searchResults___agplm",children:c?(0,my.jsx)("div",{className:"-esm-ward__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,my.jsx)(mE.Psq,{className:"-esm-ward__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,my.jsxs)(my.Fragment,{children:[(0,my.jsx)("div",{className:"-esm-ward__location-picker-module__locationResultsContainer___06YOS",children:m.length>0?(0,my.jsx)(mE.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,my.jsx)(mE.aaP,{className:"-esm-ward__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,my.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,my.jsx)("div",{className:"-esm-ward__location-picker-module__emptyState___cPWp8",children:(0,my.jsx)("p",{className:"-esm-ward__location-picker-module__locationNotFound___b14++",children:ao("noResultsToDisplay")})})}),p&&(0,my.jsx)("div",{className:"-esm-ward__location-picker-module__loadingIcon___GVlrq",children:(0,my.jsx)(mE.OuH,{description:ao("loading")})})]})})]})},Ds=q("modalState",{modalContainer:null,modalStack:[]}),Dl=0;async function Du(e,t,r={}){let n=p5(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=Dl++;o=await fh({...a,name:`${t}-${s}`},{...r,domElement:e})}else M(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function Dc(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function Dd(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function Dp(e){return e.find(e=>!Dc(e))}function Df(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let Dh=window.getComputedStyle(document.body).overflow;function Dm({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Dg),document.body.style.overflow="hidden",t.style.visibility="unset");let r=Dp(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=r,e.state="MOUNTING",Du(r,e.modalName,e.props).then(n=>{Dc(e)?Dd(e.modalName,n):n?(e.parcel=n,t.prepend(r),Df(e,Dp(Ds.getState().modalStack)===e),n.mountPromise.then(()=>{Dc(e)||(e.state="MOUNTED")},t=>{M(t),e.parcel=null,Dy(e)})):Dy(e)},t=>{M(t),Dy(e)});break}case"MOUNTING":case"MOUNTED":Df(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),Dd(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=Ds.getState();Ds.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=Dh,removeEventListener("keydown",Dg)}function Dy(e){if(Dc(e))return;e.state="TO_BE_DELETED";let t=Ds.getState();Ds.setState({...t,modalStack:[...t.modalStack]})}function Dg(e){"Escape"===e.key&&function(){let[e]=Ds.getState().modalStack;e&&Dy(e)}()}function Db(e){Ds.subscribe(Dm),Ds.setState({...Ds.getState(),modalContainer:e})}function Dv(e,t={},r=()=>{}){let n=()=>{let e=Ds.getState().modalStack.find(e=>e.onClose===r);e&&Dy(e)};if(p5(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=Ds.getState()).modalStack],Ds.setState({...i,modalStack:a})}else M(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}let Dw=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,my.jsx)(mE.kZS,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},D_=({subject:e})=>{let[t,r]=(0,fb.useState)([]);return(0,fb.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,my.jsx)(my.Fragment,{children:t.map(e=>(0,my.jsx)(Dw,{notification:e},e.id))})},Dx=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,fb.useState)(t);return(0,my.jsx)(mE.kZS,{kind:o||"info",actionButtonLabel:c,ariaLabel:ao("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:ao("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...u})},DE=({subject:e})=>{let[t,r]=(0,fb.useState)([]);return(0,fb.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,my.jsx)(my.Fragment,{children:t.map(e=>(0,my.jsx)(Dx,{notification:e},e.id))})};var DS=r(33264),DO=Object.prototype.hasOwnProperty;let DD=function(e){if(null==e)return!0;if((0,e2.A)(e)&&((0,e1.A)(e)||"string"==typeof e||"function"==typeof e.splice||(0,e3.A)(e)||(0,e5.A)(e)||(0,e0.A)(e)))return!e.length;var t=(0,tE.A)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,eX.A)(e))return!(0,DS.A)(e).length;for(var r in e)if(DO.call(e,r))return!1;return!0},DP=new dx,Dk=0,DC=new dx,Dj=0;function DT(e){e&&(0,f$.createRoot)(e).render((0,my.jsx)(D_,{subject:DP}))}function DR(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!DD(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{DP.next({...e,id:Dk++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function DA(e){e&&(0,f$.createRoot)(e).render((0,my.jsx)(DE,{subject:DC}))}function DN(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!DD(t))?setTimeout(()=>{DC.next({...e,id:Dj++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let DM=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],DI=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],D$={container:"-esm-ward__numeric-observation-module__container___gS0Wg",card:"-esm-ward__numeric-observation-module__card___w0fF5","abnormal-value":"-esm-ward__numeric-observation-module__abnormal-value___xuX3W","critical-value":"-esm-ward__numeric-observation-module__critical-value___Jynsn",cell:"-esm-ward__numeric-observation-module__cell___tMhBJ","critically-high":"-esm-ward__numeric-observation-module__critically-high___3L2wx","critically-low":"-esm-ward__numeric-observation-module__critically-low___XP+HX",high:"-esm-ward__numeric-observation-module__high___JV9do",low:"-esm-ward__numeric-observation-module__low___-uDKD","label-container":"-esm-ward__numeric-observation-module__label-container___vTf2y","value-container":"-esm-ward__numeric-observation-module__value-container___xTUIC",label:"-esm-ward__numeric-observation-module__label___-pfmb",value:"-esm-ward__numeric-observation-module__value___1A4zt",units:"-esm-ward__numeric-observation-module__units___SzvX+","pad-right":"-esm-ward__numeric-observation-module__pad-right___ND9XL","off-scale-low":"-esm-ward__numeric-observation-module__off-scale-low___gFAv9","off-scale-high":"-esm-ward__numeric-observation-module__off-scale-high___aSEmX",arrow:"-esm-ward__numeric-observation-module__arrow___9bvsX"},DL=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,fb.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${oH}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${oH}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=h_()(r,oY),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||n?void 0:i,s),d=o??u,p=(0,fb.useMemo)(()=>{if(n)return n?"--"===n?"normal":DM.includes(n)?n.toLowerCase():DI.includes(n)?n:"normal":void 0;if(d&&!c){if(!d||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==d.hiAbsolute&&void 0!==d.hiAbsolute&&t>d.hiAbsolute?"off_scale_high":null!==d.hiCritical&&void 0!==d.hiCritical&&t>=d.hiCritical?"critically_high":null!==d.hiNormal&&void 0!==d.hiNormal&&t>d.hiNormal?"high":null!==d.lowAbsolute&&void 0!==d.lowAbsolute&&t<d.lowAbsolute?"off_scale_low":null!==d.lowCritical&&void 0!==d.lowCritical&&t<=d.lowCritical?"critically_low":null!==d.lowNormal&&void 0!==d.lowNormal&&t<d.lowNormal?"low":"normal"}return"normal"},[n,d,e,c])??"normal",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,h="normal"!==p,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,g=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:ao("notAvailable","Not available"),w=mb()({[D$["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[D$["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[D$.low]:"low"===p,[D$.high]:"high"===p,[D$["off-scale-low"]]:"off_scale_low"===p,[D$["off-scale-high"]]:"off_scale_high"===p}),x=mb()({[D$.container]:!0,[D$.card]:!0,[D$["critical-value"]]:f,[D$["abnormal-value"]]:h&&!f}),E=mb()({[D$.cell]:!0,[w]:!0});return"cell"===a?(0,my.jsxs)("div",{className:E,children:[v,b&&t?` ${t}`:""]}):(0,my.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,my.jsxs)("div",{className:D$["label-container"],children:[(0,my.jsx)("span",{id:m,className:D$.label,children:r}),h&&(0,my.jsx)("span",{className:D$[p.replace("_","-")],title:ao("abnormalValue","Abnormal value")})]}),(0,my.jsxs)("div",{className:D$["value-container"],children:[(0,my.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:D$.value,children:v}),b&&t&&(0,my.jsx)("span",{id:g,className:D$.units,children:t})]})]})},DF="-esm-ward__page-header-module__pageHeader___6TOjO",DB=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,my.jsx)("div",{className:mb()(DF,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,my.jsx)("div",{className:mb()(DF,n),...o,children:(0,my.jsx)(DV,{title:t,illustration:r})})}},DV=({title:e,illustration:t,className:r})=>{let[n,o]=(0,fb.useState)(null);return(0,fb.useEffect)(()=>{rI("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,my.jsxs)("div",{className:mb()("-esm-ward__page-header-module__pageHeaderContent___mCImT",r),children:[t,(0,my.jsxs)("div",{className:"-esm-ward__page-header-module__pageLabels___kqDS+",children:[n?.implementationName&&(0,my.jsx)("p",{children:ao(n.implementationName)}),(0,my.jsx)("p",{className:"-esm-ward__page-header-module__pageName___SbZBC",children:e})]})]})},DU=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=hX(t,e,n,i),u="tablet"===hW(),c=ao("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,my.jsx)(my.Fragment,{children:e>0&&(0,my.jsxs)("div",{className:mb()({"-esm-ward__pagination-module__tablet___82gj1":u,"-esm-ward__pagination-module__desktop___6yI8e":!u}),children:[(0,my.jsxs)("div",{children:[c,o&&(0,my.jsx)(f_,{to:o,className:"-esm-ward__pagination-module__configurableLink___oIqma",children:a??ao("seeAll","See all")})]}),(0,my.jsx)(mE.dKS,{className:"-esm-ward__pagination-module__pagination___A-Lcg",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>ao("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function DW(e){return DH(DG(e,"usual","official"))}function DK(e){return DW(e)}function DH(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function Dz(e){return DH(e)}function DG(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function Dq(e,t=h5()){let r=h5(t),n=O_(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function DY(e,t=h5()){let r=Dq(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),Ow(r,n)}let DZ={container:"-esm-ward__patient-banner-patient-info-module__container___iC32K",activePatientContainer:"-esm-ward__patient-banner-patient-info-module__activePatientContainer___OoDPd",patientBanner:"-esm-ward__patient-banner-patient-info-module__patientBanner___swajU",patientName:"-esm-ward__patient-banner-patient-info-module__patientName___+2+Xi",patientAvatar:"-esm-ward__patient-banner-patient-info-module__patientAvatar___Rdf75",patientAvatarButton:"-esm-ward__patient-banner-patient-info-module__patientAvatarButton___A1q8c",patientInfo:"-esm-ward__patient-banner-patient-info-module__patientInfo___L-cOQ",demographics:"-esm-ward__patient-banner-patient-info-module__demographics___IDhb0",row:"-esm-ward__patient-banner-patient-info-module__row___TP7gU",flexRow:"-esm-ward__patient-banner-patient-info-module__flexRow___vNMt2",tagsSlot:"-esm-ward__patient-banner-patient-info-module__tagsSlot___0Dvjn",identifiers:"-esm-ward__patient-banner-patient-info-module__identifiers___d3GTJ",identifier:"-esm-ward__patient-banner-patient-info-module__identifier___kc6eq",primaryIdentifier:"-esm-ward__patient-banner-patient-info-module__primaryIdentifier___ZxRUU",secondaryIdentifier:"-esm-ward__patient-banner-patient-info-module__secondaryIdentifier___eQh8x",value:"-esm-ward__patient-banner-patient-info-module__value___CoAOR",tag:"-esm-ward__patient-banner-patient-info-module__tag___InccN",gender:"-esm-ward__patient-banner-patient-info-module__gender___vfinx",separator:"-esm-ward__patient-banner-patient-info-module__separator___3OIBl",tooltipPadding:"-esm-ward__patient-banner-patient-info-module__tooltipPadding___hBqWG",tooltipSmallText:"-esm-ward__patient-banner-patient-info-module__tooltipSmallText___bPnkq",actionsButtonText:"-esm-ward__patient-banner-patient-info-module__actionsButtonText___VNvm7"};function DJ({showIdentifierLabel:e,type:t,value:r}){return(0,my.jsx)("span",{className:DZ.primaryIdentifier,children:(0,my.jsxs)(mE.vwO,{className:DZ.tag,type:"gray",children:[e&&t?.text&&(0,my.jsxs)("span",{className:DZ.label,children:[t.text,": "]}),(0,my.jsx)("span",{className:DZ.value,children:r})]})})}function DX({showIdentifierLabel:e,type:t,value:r}){return(0,my.jsxs)(mE.lRv,{className:DZ.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,my.jsxs)("span",{className:DZ.label,children:[t?.text,": "]}),(0,my.jsx)("span",{className:DZ.value,children:r})]})}function DQ({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=hy(),{primaryIdentifierCode:n}=h1(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,my.jsx)(my.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,my.jsxs)(fv().Fragment,{children:[(0,my.jsx)("span",{className:DZ.identifier,children:r?.coding?.[0]?.code===n?(0,my.jsx)(DJ,{showIdentifierLabel:t,type:r,value:e}):(0,my.jsx)(DX,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,my.jsx)("span",{className:DZ.separator,children:"\xb7"})]},e)):""})}let D0={Female:yo,Male:yi,Other:ya,Unknown:ys},D1=({gender:e})=>{let t=D0[e];return t?(0,my.jsx)(t,{fill:"#525252"}):null},D2={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function D3({patient:e,renderedFrom:t}){var r;let n,o,i=DW(e),a=e?.gender&&(o=D2[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:ao(n,r),iconKey:o}),s=(0,fb.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,my.jsxs)("div",{className:DZ.patientInfo,children:[(0,my.jsx)("div",{className:mb()(DZ.row,DZ.patientNameRow),children:(0,my.jsxs)("div",{className:DZ.flexRow,children:[(0,my.jsx)("span",{className:DZ.patientName,children:i}),a&&(0,my.jsxs)("div",{className:DZ.gender,children:[(0,my.jsx)(D1,{gender:a.iconKey}),(0,my.jsx)("span",{children:a.displayText})]}),(0,my.jsx)(fI,{className:DZ.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,my.jsxs)("div",{className:DZ.demographics,children:[e.birthDate&&(0,my.jsxs)(my.Fragment,{children:[(0,my.jsx)("span",{children:DY(e.birthDate)}),(0,my.jsx)("span",{className:DZ.separator,children:"\xb7"}),(0,my.jsx)("span",{children:Oh(e.birthDate,{time:!1})}),(0,my.jsx)("span",{className:DZ.separator,children:"\xb7"})]}),(0,my.jsx)(DQ,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,my.jsx)(fI,{className:DZ.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var D4=r(95795);function D5({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,fb.useState)(!1),{extensions:a}=fN(r),s="tablet"===hW(),l=hq(()=>i(!1),o),u=(0,fb.useRef)(null),c=(0,fb.useRef)(null),d=(0,fb.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,h=(0,fb.useCallback)(()=>i(e=>!e),[]),m=(0,fb.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,fb.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,fb.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,fb.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,my.jsx)("div",{className:"-esm-ward__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,my.jsxs)("div",{"data-overflow-menu":!0,className:mb()("cds--overflow-menu",mD),ref:l,children:[(0,my.jsxs)("button",{className:mb()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},mC),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:h,onKeyDown:y,ref:u,children:[(0,my.jsx)("span",{className:"-esm-ward__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:ao("actions","Actions")})," ",(0,my.jsx)(D4.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,my.jsxs)("div",{className:mb()("cds--overflow-menu-options","cds--overflow-menu--flip",mP,{[mk]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,my.jsx)("ul",{className:mb()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,my.jsx)(fI,{name:r,state:g},r)}),(0,my.jsx)("span",{})]})]})})}var D6=r(35570),D7=r.n(D6);function D9(e){let{patientPhotoConceptUuid:t}=hy({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${oH}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=(0,fX.Ay)(e?r:null,oY),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let D8=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,fJ.useTranslation)();return(0,my.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,my.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,my.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})},Pe="-esm-ward__patient-photo-module__avatar___thboZ";function Pt({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=D9(e),[i,a]=(0,fb.useState)(null),[s,l]=(0,fb.useState)(!1),u=(0,fb.useMemo)(()=>D7().generate(e),[e]);(0,fb.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,fb.useMemo)(()=>r||(i?ao("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):ao("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,my.jsx)(mE.ryE,{className:"-esm-ward__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,my.jsx)(D8,{"aria-label":ao("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,my.jsx)("div",{"aria-label":c,children:(0,my.jsx)("img",{className:Pe,src:i,alt:c,title:t})}):(0,my.jsx)("div",{"aria-label":c,children:(0,my.jsx)("div",{className:Pe,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,my.jsx)("span",{className:"-esm-ward__patient-photo-module__initials___xLeEF",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let Pr=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],Pn=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),Po=Pn,Pi=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),Pa=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),Ps=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),Pl=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),Pu=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),Pc=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Pd=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),Pp=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),Pf=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Ph=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),Pm=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),Py=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),Pg=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),Pb=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Pv=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),Pw=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),P_=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),Px=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),PE=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),PS=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),PO=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),PD=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),PP=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Pk=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),PC=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),Pj=(0,fb.memo)((0,fb.forwardRef)(function(e,t){return(0,my.jsx)(PN,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),PT=Pf,PR=P_,PA=(0,fb.memo)((0,fb.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,fb.useRef)(document.getElementById(e));return(0,fb.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,my.jsx)(ha,{value:o.current,fallback:t,children:(0,my.jsx)(PN,{ref:n,pictogram:e,pictogramProps:r})})})),PN=(0,fb.memo)((0,fb.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,my.jsx)("svg",{ref:r,className:mb()("-esm-ward__pictograms-module__pictogram___ooPKM",n),height:o,width:o,children:(0,my.jsx)("use",{href:`#${e}`})})})),PM=({children:e})=>"tablet"===hW()?(0,my.jsx)(mE.Wdr,{children:e}):(0,my.jsx)(my.Fragment,{children:e}),PI=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...p}=e,[f,h]=(0,fb.useState)(r),[m,y]=(0,fb.useState)(!0),[g,b]=(0,fb.useState)(!1),v=(0,fb.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,fb.useCallback)(()=>{b(!0),v()},[v]);return(0,fb.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,fb.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,my.jsx)(mE.kZS,{actionButtonLabel:f,"aria-label":ao("closeSnackbar","Close snackbar"),className:mb()("-esm-ward__snackbar-module__slideIn___senVE",{"-esm-ward__snackbar-module__animated___8eltL":m,"-esm-ward__snackbar-module__slideOut___BIIXm":g}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:ao("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},P$=({subject:e})=>{let[t,r]=(0,fb.useState)([]),n=(0,fb.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,fb.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,my.jsx)(my.Fragment,{children:t.map(e=>(0,my.jsx)(PI,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},PL=new dx,PF=0;function PB(e){e&&(0,f$.createRoot)(e).render((0,my.jsx)(P$,{subject:PL}))}function PV(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{PL.next({...e,id:PF++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let PU=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,fb.useCallback)(()=>{s(),t()},[t,s]);return(0,my.jsx)("div",{children:(0,my.jsx)(mE.kZS,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:l,onClose:t})})},PW=({subject:e})=>{let[t,r]=(0,fb.useState)([]),n=(0,fb.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,fb.useEffect)(()=>{let t=e.subscribe(e=>r(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,my.jsx)(my.Fragment,{children:t.map(e=>(0,my.jsx)(PU,{toast:e,closeToast:()=>n(e)},e.id))})},PK=new dx,PH=0;function Pz(e){e&&(0,f$.createRoot)(e).render((0,my.jsx)(PW,{subject:PK}))}function PG(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!DD(t))?setTimeout(()=>{PK.next({...e,id:PH++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Pq(e,t=!1){if(t)return!0;let r=PQ[e];return!r||!r()}function PY(e,t){let r=P7.getState()?.workspaceGroup,n=r?.name;n&&e===n&&kt(()=>{let n=ka(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),P7.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function PZ(e,t){let{name:r,additionalProps:n}=t;ft(r);let o=()=>{P4(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>PJ(r,n),closeWorkspaceGroup:!1})};Pq(e.name)?o():kn("closing-workspace-launching-new-workspace",o,e.title??e.name)}function PJ(e,t){let r=ft(e),n=P7.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void PY(n.name,()=>{PJ(e,t)});let o=P7.getState().workspaceGroup?.name,i={...r,title:ko(r,t),closeWorkspace:(t={})=>P4(e,t),closeWorkspaceWithSavedChanges:t=>P4(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(PQ[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,P7.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){P7.setState(r=>{let n=[e,...t??r.openWorkspaces],o=ke(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&ka(o,t);let s=P7.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===ko(t,t.additionalProps)&&{title:ko(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,P7.getState().openWorkspaces.filter(e=>e.type!=i.type)),PZ(u,{name:e,additionalProps:t})):a(i);else PZ(s[0],{name:e,additionalProps:t})}function PX({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){P5(t),PJ(r,n),oM({to:e})}let PQ={};function P0(e,t){PQ[e]=t}function P1(e){return PQ[e]}function P2(){let e=P7.getState();P7.setState({...e,prompt:null})}let P3={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function P4(e,t={}){t={...P3,...t};let r=()=>{let r=P7.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=P7.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&PY(o),PQ[e]=()=>!1,P7.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:ke(n?.[0])})),t?.onWorkspaceClose?.()};return Pq(e,t?.ignoreChanges)?(r(),!0):(kn("closing-workspace",r,ft(e).title??e),!1)}function P5(e){P7.getState().context!=e&&P7.setState({context:e,openWorkspaces:[],prompt:null})}let P6={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},P7=q("workspace",P6);function P9(){return P7}function P8(e){let t=P7.getState();P7.setState({...t,workspaceWindowState:e})}function ke(e){return e?.preferredWindowSize??"normal"}function kt(e=()=>{},t=()=>!0){let r=P7.getState().openWorkspaces.filter(t).every(({name:e})=>Pq(e)),n=()=>{ki(),e?.()};r?n():kn("closing-all-workspaces",n)}function kr(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=fD(P7);return(0,fb.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function kn(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:ao("unsavedChangesTitleText","Unsaved changes"),body:ao("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:ao("discard","Discard")};break;case"closing-all-workspaces":{let e=P7.getState().openWorkspaces.filter(({name:e})=>!Pq(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:ao("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:ao("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:ao("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:ao("unsavedChangesTitleText","Unsaved changes"),body:ao("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{P7.setState(e=>({...e,prompt:null})),t?.()},confirmText:ao("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}P7.setState(e=>({...e,prompt:n}))}function ko(e,t){return t?.workspaceTitle??e.title}function ki(){P7.setState(P6)}function ka(e,t={}){if(!e||"default"===e)return;let r=Z(e,{});return t&&r.setState(e=>({...e,...t})),r}let ks="-esm-ward__action-menu-button-module__container___F68g0",kl="-esm-ward__action-menu-button-module__elementContainer___D1ACn",ku="-esm-ward__action-menu-button-module__active___HAE75";function kc({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,my.jsxs)(my.Fragment,{children:[e({size:16}),t?(0,my.jsx)("span",{className:"-esm-ward__action-menu-button-module__interruptedTag___CQ2Xs",children:"!"}):(0,my.jsx)("span",{className:"-esm-ward__action-menu-button-module__countTag___3mn9k",children:r})]})}let kd=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=hW(),{workspaces:s,workspaceWindowState:l}=kr(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,my.jsxs)(mE.$nd,{className:mb()(ks,{[ku]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,my.jsx)("span",{className:kl,children:(0,my.jsx)(kc,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,my.jsx)("span",{children:t})]}):(0,my.jsx)(mE.K0,{align:"left","aria-label":r,className:mb()(ks,{[ku]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,my.jsx)("div",{className:kl,children:(0,my.jsx)(kc,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var kp=r(18282),kf=r(88537),kh=r(68622),km=r(94888),ky=/[\\^$.*+?()[\]{}|]/g,kg=RegExp(ky.source);let kb=function(e){return(e=(0,km.A)(e))&&kg.test(e)?e.replace(ky,"\\$&"):e};function kv({contextKey:e}){let{prompt:t}=kr();return(0,fb.useEffect)(()=>{RegExp(`/${kb(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,fb.useEffect)(()=>(P5(e),()=>{P5(null)}),[e]),(0,fb.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${kb(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=P7.getState().openWorkspaces.every(({name:e})=>Pq(e));a||(s?ki():(r?.(),kt(()=>{oM({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,my.jsxs)(mE.KXP,{open:!0,onClose:P2,children:[(0,my.jsx)(mE.rQ0,{title:t.title}),(0,my.jsx)(mE.cwr,{children:(0,my.jsx)("p",{className:"-esm-ward__workspace-notification-module__messageBody___dkytJ",children:t.body})}),(0,my.jsxs)(mE.jlY,{children:[(0,my.jsx)(mE.$nd,{kind:"secondary",onClick:P2,children:t.cancelText??ao("cancel")}),(0,my.jsx)(mE.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??ao("confirm")})]})]}):null}function kw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function k_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kw(Object(r),!0).forEach(function(t){kE(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function kx(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kS(e){return(kS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kO(e,t){return(kO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kD(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var kP=function(e){var t=fb.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&kO(a,t);var r,n,o,i=(r=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=kS(a);e=r?Reflect.construct(t,arguments,kS(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return kD(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),kE(kD(t=i.call(this,e)),"handleRef",function(e){t.el=e}),kE(kD(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),kE(kD(t),"getParcelProps",function(){var e=k_(k_({},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 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 n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n 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 \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,k_({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 fW&&fW.Consumer?fb.createElement(fW.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=fW&&fW.Consumer?fb.createElement(fW.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return fb.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],kx(a.prototype,n),o&&kx(a,o),a}();kE(kP,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function kk({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,fb.useState)(),o=function(e){let[t,r]=(0,fb.useState)({}),[n,o]=(0,fb.useState)(e);return(0,fb.useEffect)(()=>{n!==e&&o(e)},[e]),(0,fb.useEffect)(()=>{let e,t=ka(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,fb.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,fb.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,my.jsx)(kP,{config:r,mountParcel:fy,...i},e.name):(0,my.jsx)(mE.OuH,{className:"-esm-ward__workspace-module__loader___jEP+q",description:`${ao("loading","Loading")} ...`})}function kC({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,fb.useState)(!1),i=(0,fb.useRef)(window.innerHeight),{featureName:a}=(0,fb.useContext)(fw),s=hW();(0,fb.useEffect)(()=>{let e=()=>{o(!hK(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,my.jsx)("aside",{className:mb()("-esm-ward__action-menu-module__sideRail___iVmKs",{"-esm-ward__action-menu-module__withinWorkspace___YZfet":e,"-esm-ward__action-menu-module__sideRailHidden___bCdyQ":n,"-esm-ward__action-menu-module__sideRailVisible___+oJCY":!n}),children:(0,my.jsx)("div",{className:"-esm-ward__action-menu-module__container___sf6Et",children:(0,my.jsx)(fI,{className:"-esm-ward__action-menu-module__chartExtensions___l+r+Y",name:l,state:r})})})}function kj({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=hW(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=kr(),u=l?.name,c=a[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,fb.useMemo)(()=>r||u&&!d,[u,d,r]);return hf(!d&&!hK(i)),(0,my.jsxs)(my.Fragment,{children:[(0,my.jsxs)("div",{className:r?"-esm-ward__workspace-module__workspaceContainerWithActionMenu___kZRyN":"-esm-ward__workspace-module__workspaceContainerWithoutActionMenu___1OJIb",children:[(0,my.jsx)("aside",{className:mb()(t?"-esm-ward__workspace-module__workspaceOverlayOuterContainer___8RiIj":"-esm-ward__workspace-module__workspaceWindowSpacer___F1W-O",{"-esm-ward__workspace-module__hiddenRelative___7oRNR":d,"-esm-ward__workspace-module__narrowWorkspace___R3CN9":"narrow"===p,"-esm-ward__workspace-module__widerWorkspace___L-pDK":"wider"===p,"-esm-ward__workspace-module__extraWideWorkspace___D50Zj":"extra-wide"===p}),children:(0,my.jsx)("div",{className:mb()("-esm-ward__workspace-module__workspaceFixedContainer___9E2Or",{"-esm-ward__workspace-module__maximizedWindow___d+PZ5":"maximized"===s,"-esm-ward__workspace-module__hiddenFixed___kBFgl":d}),children:a.map((e,t)=>(0,my.jsx)("div",{className:mb()("-esm-ward__workspace-module__workspaceInnerContainer___VEPNB",{"-esm-ward__workspace-module__hiddenExtraWorkspace___E7d4h":0!==t}),children:(0,my.jsx)(fb.Suspense,{fallback:null,children:(0,my.jsx)(fJ.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,my.jsx)(kT,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,my.jsx)(kv,{contextKey:e})]}),f&&(0,my.jsx)(kC,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function kT({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,fJ.useTranslation)(),n=hW(),{workspaceWindowState:o,workspaceGroup:i}=kr(),a=i?.name,s="maximized"===o;(0,fb.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,fb.useContext)(fw),u=(0,fb.useCallback)(()=>{P8(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,fb.useMemo)(()=>e??{},[e]),h=(0,fb.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,my.jsxs)(my.Fragment,{children:[(0,my.jsxs)(mE.Y9Y,{"aria-label":ao("workspaceHeader","Workspace Header"),className:"-esm-ward__workspace-module__header___nMH1R",children:[!hK(n)&&!c&&(0,my.jsx)(mE.dJ2,{"aria-label":ao("close","Close"),renderMenuIcon:(0,my.jsx)(mF,{}),onClick:()=>f()}),(0,my.jsx)(mE.bCw,{prefix:"",children:e.titleNode??r(e.title)}),(0,my.jsx)("div",{className:"-esm-ward__workspace-module__overlayHeaderSpacer___vxoMd"}),(0,my.jsxs)(mE.wdv,{className:"-esm-ward__workspace-module__headerButtons___lek95",children:[(0,my.jsx)(fI,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,my.jsx)(fI,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,my.jsx)(fI,{name:`workspace-header-${l}-slot`,state:h}),hK(n)&&(0,my.jsxs)(my.Fragment,{children:[(d||s)&&(0,my.jsx)(mE.V8d,{"aria-label":s?ao("minimize","Minimize"):ao("maximize","Maximize"),onClick:u,children:s?(0,my.jsx)(kp.Xj,{}):(0,my.jsx)(kf.hz,{})}),c&&!a?(0,my.jsx)(mE.V8d,{"aria-label":ao("hide","Hide"),onClick:()=>P8("hidden"),children:(0,my.jsx)(mB,{})}):(0,my.jsx)(mE.V8d,{"aria-label":ao("close","Close"),onClick:()=>f?.(),children:(0,my.jsx)(m4,{})})]}),"tablet"===n&&c&&(0,my.jsx)(mE.V8d,{"aria-label":ao("close","Close"),onClick:()=>f?.(),children:(0,my.jsx)(kh.d3,{})})]})]}),(0,my.jsx)("div",{className:mb()("-esm-ward__workspace-module__workspaceContent___FFe+u",{"-esm-ward__workspace-module__marginWorkspaceContent___SEV31":!!p}),children:(0,my.jsx)(kk,{workspace:e,additionalPropsFromPage:t},e.name)})]})}var kR=new Uint8Array(16);let kA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var kN=[],kM=0;kM<256;++kM)kN.push((kM+256).toString(16).substr(1));let kI=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(kN[e[t+0]]+kN[e[t+1]]+kN[e[t+2]]+kN[e[t+3]]+"-"+kN[e[t+4]]+kN[e[t+5]]+"-"+kN[e[t+6]]+kN[e[t+7]]+"-"+kN[e[t+8]]+kN[e[t+9]]+"-"+kN[e[t+10]]+kN[e[t+11]]+kN[e[t+12]]+kN[e[t+13]]+kN[e[t+14]]+kN[e[t+15]]).toLowerCase();if(!("string"==typeof r&&kA.test(r)))throw TypeError("Stringified UUID is invalid");return r},k$=function(e,t,r){var n=(e=e||{}).random||(e.rng||function(){if(!el&&!(el="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return el(kR)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return kI(n)};async function kL(e,t){let{openedGroup:r}=fn.getState();if(r){if(r.groupName===e&&kV(r.props,t))return!0;else if(!await kU({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return fn.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function kF(e){let{openedGroup:t,openedWindows:r}=fn.getState();if(t){if(r.length>0&&!(e||await kU({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;fn.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function kB(e,t=null,r=null,n=null){let o=fn.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=fo(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=fi(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=fa(e);if(a&&(a.groupName!==l.name||!kV(a.props,n)))return!!await kU({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(fn.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[kG(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(kV(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&kV(d.props,t)?((a||u!==o.openedWindows.length-1)&&fn.setState(kW.restoreWindow(o,s)),!0):!!await kU({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(fn.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[kG(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await kU({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(fn.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[kG(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(fn.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[kG(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await kU({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(fn.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[kG(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function kV(e,t){return null==e||null==t||L(e,t)}function kU(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=fn.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=Dv("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let kW={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=fa(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,kG(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=fa(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function kK(){return fP(fn,kW)}let kH=()=>(0,fb.useContext)(fW),kz=()=>Object.keys(fn.getState().registeredWorkspacesByName);function kG(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:k$()}}let kq={workspaceOuterContainer:"-esm-ward__workspace2-module__workspaceOuterContainer___jaqGm",narrowWorkspace:"-esm-ward__workspace2-module__narrowWorkspace___o1wsL",widerWorkspace:"-esm-ward__workspace2-module__widerWorkspace___gdEOi",extraWideWorkspace:"-esm-ward__workspace2-module__extraWideWorkspace___U9xlJ",workspaceMiddleContainer:"-esm-ward__workspace2-module__workspaceMiddleContainer___0AdtX",maximized:"-esm-ward__workspace2-module__maximized___aKCbE",hidden:"-esm-ward__workspace2-module__hidden___n1US5",workspaceInnerContainer:"-esm-ward__workspace2-module__workspaceInnerContainer___1g+qk",workspaceSpacer:"-esm-ward__workspace2-module__workspaceSpacer___P2T9y",loader:"-esm-ward__workspace2-module__loader___fCfzZ",hiddenExtraWorkspace:"-esm-ward__workspace2-module__hiddenExtraWorkspace___hvPSi",header:"-esm-ward__workspace2-module__header___MXXx9",headerButtons:"-esm-ward__workspace2-module__headerButtons___sJdnC",workspaceContent:"-esm-ward__workspace2-module__workspaceContent___6NuXT",overlayHeaderSpacer:"-esm-ward__workspace2-module__overlayHeaderSpacer___PLO6T",isActionMenuOpened:"-esm-ward__workspace2-module__isActionMenuOpened___X3Vj6",showActionMenu:"-esm-ward__workspace2-module__showActionMenu___HSun1",marginWorkspaceContent:"-esm-ward__workspace2-module__marginWorkspaceContent___DCfWz",workspaceContainerWithActionMenu:"-esm-ward__workspace2-module__workspaceContainerWithActionMenu___G9MdI",workspaceFixedContainer:"-esm-ward__workspace2-module__workspaceFixedContainer___uIldI",workspaceContainerWithoutActionMenu:"-esm-ward__workspace2-module__workspaceContainerWithoutActionMenu___lBudZ"},kY=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=hW(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=kK(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=kH(),v=fa(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,fb.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,fb.useEffect)(()=>{p[m]!==e&&f(m,e)},[p,m,e,f]),v<0||null==l||null==x)return null;let E=u[l.groupName];if(!E)throw Error(`Cannot find registered workspace group ${l.groupName}`);let S=d[m].window,O=c[S];if(!O)throw Error(`Cannot find registered workspace window ${S}`);let{icon:D,canMaximize:P}=O,k="closable"===E.persistence,C=!!D&&!k,{maximized:j}=w,T=O?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),A=v<s.length-1||h;return(0,my.jsxs)("div",{className:mb()(kq.workspaceOuterContainer,{[kq.narrowWorkspace]:"narrow"===T,[kq.widerWorkspace]:"wider"===T,[kq.extraWideWorkspace]:"extra-wide"===T,[kq.isActionMenuOpened]:R}),children:[(0,my.jsx)("div",{className:mb()(kq.workspaceSpacer,{[kq.hidden]:A})}),(0,my.jsx)("div",{className:mb()(kq.workspaceMiddleContainer,{[kq.maximized]:j,[kq.hidden]:A,[kq.isRootWorkspace]:y,[kq.showActionMenu]:b}),children:(0,my.jsxs)("div",{className:mb()(kq.workspaceInnerContainer,{[kq.maximized]:j,[kq.hidden]:A,[kq.isRootWorkspace]:y}),children:[(0,my.jsxs)(mE.Y9Y,{"aria-label":ao("workspaceHeader"),className:kq.header,children:[(0,my.jsx)(mE.bCw,{prefix:"",children:e}),(0,my.jsx)("div",{className:kq.overlayHeaderSpacer}),(0,my.jsx)(mE.wdv,{className:kq.headerButtons,children:hK(n)?(0,my.jsxs)(my.Fragment,{children:[(P||j)&&(0,my.jsx)(mE.V8d,{"aria-label":j?ao("minimize"):ao("maximize"),onClick:()=>o(S,!j),children:j?(0,my.jsx)(kp.Xj,{}):(0,my.jsx)(kf.hz,{})}),C&&(0,my.jsx)(mE.V8d,{"aria-label":ao("hide"),onClick:()=>i(),children:(0,my.jsx)(mB,{})}),!k&&(0,my.jsx)(mE.V8d,{"aria-label":ao("close"),onClick:()=>g({closeWindow:!0}),children:(0,my.jsx)(m4,{})})]}):(0,my.jsxs)(my.Fragment,{children:[C&&(0,my.jsx)(mE.V8d,{"aria-label":ao("hide"),onClick:()=>i(),children:(0,my.jsx)(kh.d3,{})}),(0,my.jsx)(mE.V8d,{"aria-label":ao("close"),onClick:()=>{k?kF():g({closeWindow:!0})},children:(0,my.jsx)(m4,{})})]})})]}),(0,my.jsx)("div",{className:mb()(kq.workspaceContent),children:t})]})})]})},kZ="-esm-ward__action-menu-button2-module__container___pahg-",kJ="-esm-ward__action-menu-button2-module__elementContainer___PzOdc",kX="-esm-ward__action-menu-button2-module__active___4O4Bs",kQ="-esm-ward__action-menu-button2-module__focused___+k5kD";function k0({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,my.jsxs)(my.Fragment,{children:[e({size:16}),t?(0,my.jsx)("span",{className:"-esm-ward__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,my.jsx)("span",{className:"-esm-ward__action-menu-button2-module__countTag___rb5CW",children:r})]})}let k1=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=hW(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=kK(),{extension:c}=(0,fb.useContext)(fw),d=a.findIndex(e=>e.windowName===c?.extensionId),p=a[d],f=null!=p,h=f&&(d<a.length-1||u),m=f&&!h,y=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(f)h?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;kB(e,t,r)}};return"tablet"===i||"phone"===i?(0,my.jsxs)(mE.$nd,{className:mb()(kZ,{[kX]:f&&!m,[kQ]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,my.jsx)("span",{className:kJ,children:(0,my.jsx)(k0,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,my.jsx)("span",{children:t})]}):(0,my.jsx)(mE.K0,{align:"left","aria-label":t,className:mb()(kZ,{[kX]:f&&!m,[kQ]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,my.jsx)("div",{className:kJ,children:(0,my.jsx)(k0,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function k2({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,my.jsx)(mE.$nd,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?m3:m0,children:e?ao("showLess","Show less"):ao("showMore","Show more")})}let k3={contactDetails:"-esm-ward__patient-banner-contact-details-module__contactDetails___rhdjA",deceased:"-esm-ward__patient-banner-contact-details-module__deceased___K4NPg",heading:"-esm-ward__patient-banner-contact-details-module__heading___zj6Zt",row:"-esm-ward__patient-banner-contact-details-module__row___+Bx+P",col:"-esm-ward__patient-banner-contact-details-module__col___0H31P",relationship:"-esm-ward__patient-banner-contact-details-module__relationship___CZmay"},k4=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${oH}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=(0,fX.Ay)(t,oY),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,fb.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,my.jsxs)(my.Fragment,{children:[(0,my.jsxs)("p",{className:k3.heading,children:[ao("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,my.jsx)(mE.OuH,{description:`${ao("loading","Loading")} ...`,role:"progressbar"}):(0,my.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>Ol(e?.startDate).getTime()-Ol(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,my.jsx)("li",{children:(0,my.jsx)(f_,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,my.jsx)("li",{children:"--"})})(),t.length>3&&(0,my.jsx)("li",{className:k3.link,children:(0,my.jsx)(f_,{to:`${window.spaBase}/home/patient-lists`,children:ao("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},k5=({patientId:e})=>{let{patient:t,isLoading:r}=h0(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,my.jsx)(mE.OuH,{description:`${ao("loading","Loading")} ...`,role:"progressbar"}):(0,my.jsxs)(my.Fragment,{children:[(0,my.jsx)("p",{className:k3.heading,children:ao("address","Address")}),(0,my.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,my.jsxs)("li",{children:[ao(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,my.jsxs)("li",{children:[ao(e,e),": ",t]},`address-${e}`)):(0,my.jsx)("li",{children:"--"})})]})},k6=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=hy({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=h_()(`${oH}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,oY);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,fb.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,fb.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?ao(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,my.jsxs)(my.Fragment,{children:[(0,my.jsx)("p",{className:k3.heading,children:ao("contactDetails","Contact Details")}),t?(0,my.jsx)(mE.OuH,{description:`${ao("loading","Loading")} ...`,role:"progressbar"}):(0,my.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,my.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,my.jsx)("li",{children:"--"})})]})},k7=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${oH}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:i}=(0,fX.Ay)(e?t:null,oY),a=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,my.jsxs)(my.Fragment,{children:[(0,my.jsx)("p",{className:k3.heading,children:ao("relationships","Relationships")}),r?(0,my.jsx)(mE.OuH,{description:`${ao("loading","Loading")} ...`,role:"progressbar"}):(0,my.jsx)("ul",{children:t&&t.length>0?(0,my.jsx)(my.Fragment,{children:t.map(e=>(0,my.jsxs)("li",{className:k3.relationship,children:[(0,my.jsx)("div",{children:(0,my.jsx)(f_,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,my.jsx)("div",{children:e.relationshipType}),(0,my.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?ao("yearAbbreviation","yr"):ao("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,my.jsx)("li",{children:"--"})})]})};function k9({patientId:e,deceased:t}){return(0,my.jsxs)("div",{className:mb()(k3.contactDetails,{[k3.deceased]:t}),children:[(0,my.jsxs)("div",{className:k3.row,children:[(0,my.jsx)("div",{className:k3.col,children:(0,my.jsx)(k5,{patientId:e})}),(0,my.jsx)("div",{className:k3.col,children:(0,my.jsx)(k6,{patientUuid:e})})]}),(0,my.jsxs)("div",{className:k3.row,children:[(0,my.jsx)("div",{className:k3.col,children:(0,my.jsx)(k7,{patientId:e})}),(0,my.jsx)("div",{className:k3.col,children:(0,my.jsx)(k4,{patientUuid:e})})]})]})}function k8(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let Ce="-esm-ward__action-menu2-module__container___5s3CM";function Ct({workspaceGroup:e,groupProps:t}){let r=hW(),{persistence:n}=e;return(0,my.jsx)("aside",{className:"-esm-ward__action-menu2-module__sideRail___qwAz4",children:(0,my.jsxs)("div",{className:Ce,children:["closable"==n&&hK(r)&&(0,my.jsx)(mE.K0,{align:"left",onClick:()=>kF(),label:ao("close"),kind:"ghost",children:(0,my.jsx)(m4,{})}),(0,my.jsx)(fw.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,my.jsx)(fI,{className:Ce,name:e.name,state:{groupProps:t}})})]})})}function Cr(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}let Cn=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=kK(),u=(0,fb.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await kU({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await kU({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:i}=r,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await kU({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||l(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:a&&a.props?a.props:null,isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:i},[t,s,a,r]);if(!e){let{registeredWorkspacesByName:e}=fn.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=fn.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,my.jsxs)("div",{className:mb()(kq.workspaceOuterContainer,{[kq.narrowWorkspace]:"narrow"===u,[kq.widerWorkspace]:"wider"===u,[kq.extraWideWorkspace]:"extra-wide"===u,[kq.isActionMenuOpened]:c}),children:[(0,my.jsx)("div",{className:kq.workspaceSpacer}),(0,my.jsx)("div",{className:mb()(kq.workspaceMiddleContainer,{[kq.isRootWorkspace]:n,[kq.showActionMenu]:i}),children:(0,my.jsx)("div",{className:mb()(kq.workspaceInnerContainer,{[kq.isRootWorkspace]:n}),children:(0,my.jsx)(mE.OuH,{className:kq.loader,description:`${ao("loading")} ...`})})})]})}return(0,my.jsx)(kP,{config:e,mountParcel:fy,...u},t.workspaceName)},Co=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,fb.useState)({}),{registeredWorkspacesByName:i}=fn.getState();return(0,fb.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await mi(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,my.jsx)(my.Fragment,{children:r.map((o,i)=>(0,my.jsx)(Cn,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function Ci(e){e&&(0,f$.createRoot)(e).render((0,my.jsx)(Ca,{}))}function Ca(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=kK();if((0,fb.useEffect)(()=>df("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(kF().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=Cr(t),i=Cr(r);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=n.exec(o.spaRelative),s=n.exec(i.spaRelative);if(a&&s||(a=n.exec(o.full),s=n.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,i,a)&&o(kF().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(n).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,my.jsxs)("div",{className:mb()("-esm-ward__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___gN2f4",{"-esm-ward__workspace-windows-and-menu-module__overlay___fqI+X":o.overlay,"-esm-ward__workspace-windows-and-menu-module__hasMaximizedWindow___J7wBw":i}),children:[(0,my.jsx)("div",{className:"-esm-ward__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(e=>(0,my.jsx)(Co,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,my.jsx)(Ct,{workspaceGroup:o,groupProps:e.props})]})}function Cs(e,t,r){if(null==e)return r;let n=SA(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=SA(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function Cl(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function Cu(e){return!!e&&e.constructor===Object}var Cc=r(2722);function Cd(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function Cp(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=Cd(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return Cd(e)}(t);return Cc.satisfies(r,e,{includePrerelease:!0})}async function Cf(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await Ch(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function Ch(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);