@kenyaemr/esm-version-app 5.4.4-pre.43 → 5.4.4-pre.430

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 (331) hide show
  1. package/.turbo/turbo-build.log +6 -6
  2. package/dist/1148.js +1 -0
  3. package/dist/1148.js.map +1 -0
  4. package/dist/1278.js +1 -0
  5. package/dist/1278.js.map +1 -0
  6. package/dist/15.js +1 -0
  7. package/dist/15.js.map +1 -0
  8. package/dist/1620.js +1 -0
  9. package/dist/1620.js.map +1 -0
  10. package/dist/1789.js +1 -0
  11. package/dist/1789.js.map +1 -0
  12. package/dist/1831.js +1 -0
  13. package/dist/1831.js.map +1 -0
  14. package/dist/1844.js +1 -0
  15. package/dist/1844.js.map +1 -0
  16. package/dist/1919.js +1 -0
  17. package/dist/1919.js.map +1 -0
  18. package/dist/1946.js +1 -0
  19. package/dist/1946.js.map +1 -0
  20. package/dist/2146.js +1 -0
  21. package/dist/2146.js.map +1 -0
  22. package/dist/2202.js +1 -0
  23. package/dist/2202.js.map +1 -0
  24. package/dist/2394.js +1 -0
  25. package/dist/2394.js.map +1 -0
  26. package/dist/2534.js +1 -1
  27. package/dist/2534.js.map +1 -1
  28. package/dist/2537.js +1 -0
  29. package/dist/2537.js.map +1 -0
  30. package/dist/2556.js +1 -0
  31. package/dist/2556.js.map +1 -0
  32. package/dist/2648.js +1 -0
  33. package/dist/2648.js.map +1 -0
  34. package/dist/2842.js +1 -0
  35. package/dist/2842.js.map +1 -0
  36. package/dist/2916.js +1 -0
  37. package/dist/2916.js.map +1 -0
  38. package/dist/2924.js +1 -0
  39. package/dist/2924.js.map +1 -0
  40. package/dist/2947.js +1 -1
  41. package/dist/2947.js.map +1 -1
  42. package/dist/3032.js +1 -0
  43. package/dist/3032.js.map +1 -0
  44. package/dist/3285.js +1 -0
  45. package/dist/3285.js.map +1 -0
  46. package/dist/3335.js +1 -0
  47. package/dist/3335.js.map +1 -0
  48. package/dist/3378.js +1 -0
  49. package/dist/3378.js.map +1 -0
  50. package/dist/3504.js +1 -0
  51. package/dist/3504.js.map +1 -0
  52. package/dist/356.js +1 -0
  53. package/dist/356.js.map +1 -0
  54. package/dist/3569.js +1 -0
  55. package/dist/3569.js.map +1 -0
  56. package/dist/3723.js +1 -0
  57. package/dist/3723.js.map +1 -0
  58. package/dist/3745.js +1 -0
  59. package/dist/3745.js.map +1 -0
  60. package/dist/3754.js +1 -0
  61. package/dist/3754.js.map +1 -0
  62. package/dist/3813.js +1 -0
  63. package/dist/3813.js.map +1 -0
  64. package/dist/393.js +6 -0
  65. package/dist/393.js.map +1 -0
  66. package/dist/3953.js +1 -0
  67. package/dist/3953.js.map +1 -0
  68. package/dist/4178.js +1 -1
  69. package/dist/4178.js.map +1 -1
  70. package/dist/4308.js +1 -1
  71. package/dist/4308.js.map +1 -1
  72. package/dist/4487.js +11 -0
  73. package/dist/4487.js.map +1 -0
  74. package/dist/4588.js +1 -0
  75. package/dist/4588.js.map +1 -0
  76. package/dist/4637.js +1 -1
  77. package/dist/4637.js.map +1 -1
  78. package/dist/466.js +1 -1
  79. package/dist/466.js.map +1 -1
  80. package/dist/4732.js +1 -0
  81. package/dist/4732.js.map +1 -0
  82. package/dist/4817.js +1 -0
  83. package/dist/4817.js.map +1 -0
  84. package/dist/500.js +1 -0
  85. package/dist/500.js.map +1 -0
  86. package/dist/5055.js +1 -0
  87. package/dist/5055.js.map +1 -0
  88. package/dist/5086.js +1 -1
  89. package/dist/5086.js.map +1 -1
  90. package/dist/5117.js +1 -0
  91. package/dist/5117.js.map +1 -0
  92. package/dist/5366.js +1 -0
  93. package/dist/5366.js.map +1 -0
  94. package/dist/5526.js +1 -0
  95. package/dist/5526.js.map +1 -0
  96. package/dist/5598.js +1 -0
  97. package/dist/5598.js.map +1 -0
  98. package/dist/5676.js +1 -1
  99. package/dist/5676.js.map +1 -1
  100. package/dist/5731.js +5 -0
  101. package/dist/5731.js.map +1 -0
  102. package/dist/5809.js +1 -1
  103. package/dist/5809.js.map +1 -1
  104. package/dist/5825.js +1 -0
  105. package/dist/5825.js.map +1 -0
  106. package/dist/5932.js +1 -0
  107. package/dist/5932.js.map +1 -0
  108. package/dist/5941.js +1 -0
  109. package/dist/5941.js.map +1 -0
  110. package/dist/5967.js +1 -0
  111. package/dist/5967.js.map +1 -0
  112. package/dist/6104.js +1 -1
  113. package/dist/6104.js.map +1 -1
  114. package/dist/6273.js +1 -0
  115. package/dist/6273.js.map +1 -0
  116. package/dist/6337.js +1 -0
  117. package/dist/6337.js.map +1 -0
  118. package/dist/6357.js +1 -0
  119. package/dist/6357.js.map +1 -0
  120. package/dist/6427.js +1 -1
  121. package/dist/6427.js.map +1 -1
  122. package/dist/647.js +1 -0
  123. package/dist/647.js.map +1 -0
  124. package/dist/6478.js +7 -0
  125. package/dist/6478.js.map +1 -0
  126. package/dist/6508.js +1 -0
  127. package/dist/6508.js.map +1 -0
  128. package/dist/6561.js +1 -0
  129. package/dist/6561.js.map +1 -0
  130. package/dist/6567.js +1 -0
  131. package/dist/6567.js.map +1 -0
  132. package/dist/6634.js +1 -0
  133. package/dist/6634.js.map +1 -0
  134. package/dist/689.js +1 -1
  135. package/dist/689.js.map +1 -1
  136. package/dist/7022.js +1 -0
  137. package/dist/7022.js.map +1 -0
  138. package/dist/7085.js +1 -0
  139. package/dist/7085.js.map +1 -0
  140. package/dist/7360.js +1 -0
  141. package/dist/7360.js.map +1 -0
  142. package/dist/740.js +1 -0
  143. package/dist/740.js.map +1 -0
  144. package/dist/7478.js +1 -1
  145. package/dist/7478.js.map +1 -1
  146. package/dist/7782.js +1 -0
  147. package/dist/7782.js.map +1 -0
  148. package/dist/781.js +1 -1
  149. package/dist/781.js.map +1 -1
  150. package/dist/8028.js +1 -0
  151. package/dist/8028.js.map +1 -0
  152. package/dist/8196.js +1 -1
  153. package/dist/8196.js.map +1 -1
  154. package/dist/820.js +1 -0
  155. package/dist/820.js.map +1 -0
  156. package/dist/8240.js +1 -1
  157. package/dist/8240.js.map +1 -1
  158. package/dist/8472.js +1 -0
  159. package/dist/8472.js.map +1 -0
  160. package/dist/8607.js +1 -0
  161. package/dist/8607.js.map +1 -0
  162. package/dist/8762.js +1 -0
  163. package/dist/8762.js.map +1 -0
  164. package/dist/8924.js +1 -1
  165. package/dist/8924.js.map +1 -1
  166. package/dist/901.js +1 -0
  167. package/dist/901.js.map +1 -0
  168. package/dist/9011.js +1 -0
  169. package/dist/9011.js.map +1 -0
  170. package/dist/9060.js +1 -0
  171. package/dist/9060.js.map +1 -0
  172. package/dist/9087.js +1 -0
  173. package/dist/9087.js.map +1 -0
  174. package/dist/9168.js +1 -0
  175. package/dist/9168.js.map +1 -0
  176. package/dist/9425.js +1 -1
  177. package/dist/9515.js +1 -0
  178. package/dist/9515.js.map +1 -0
  179. package/dist/9520.js +1 -1
  180. package/dist/9520.js.map +1 -1
  181. package/dist/9547.js +1 -0
  182. package/dist/9547.js.map +1 -0
  183. package/dist/9612.js +1 -0
  184. package/dist/9612.js.map +1 -0
  185. package/dist/9632.js +1 -0
  186. package/dist/9632.js.map +1 -0
  187. package/dist/9774.js +1 -0
  188. package/dist/9774.js.map +1 -0
  189. package/dist/9806.js +1 -0
  190. package/dist/9806.js.map +1 -0
  191. package/dist/9885.js +1 -0
  192. package/dist/9885.js.map +1 -0
  193. package/dist/992.js +1 -0
  194. package/dist/992.js.map +1 -0
  195. package/dist/997.js +1 -0
  196. package/dist/997.js.map +1 -0
  197. package/dist/main.js +6 -5
  198. package/dist/main.js.map +1 -1
  199. package/dist/openmrs-esm-patient-verification-app.js +6 -5
  200. package/dist/openmrs-esm-patient-verification-app.js.buildmanifest.json +946 -509
  201. package/dist/openmrs-esm-patient-verification-app.js.map +1 -1
  202. package/dist/routes.json +1 -1
  203. package/package.json +2 -2
  204. package/src/about/about.component.tsx +2 -1
  205. package/src/frontend-modules/frontend-modules.component.test.tsx +62 -0
  206. package/src/release-version.js +7 -7
  207. package/translations/fr.json +11 -1
  208. package/tsconfig.json +1 -1
  209. package/dist/1072.js +0 -1
  210. package/dist/1072.js.map +0 -1
  211. package/dist/1172.js +0 -1
  212. package/dist/1172.js.map +0 -1
  213. package/dist/132.js +0 -1
  214. package/dist/132.js.map +0 -1
  215. package/dist/1761.js +0 -1
  216. package/dist/1761.js.map +0 -1
  217. package/dist/1809.js +0 -7
  218. package/dist/1809.js.map +0 -1
  219. package/dist/1866.js +0 -1
  220. package/dist/1866.js.map +0 -1
  221. package/dist/1871.js +0 -1
  222. package/dist/1871.js.map +0 -1
  223. package/dist/1962.js +0 -1
  224. package/dist/1962.js.map +0 -1
  225. package/dist/2007.js +0 -1
  226. package/dist/2007.js.map +0 -1
  227. package/dist/2045.js +0 -1
  228. package/dist/2045.js.map +0 -1
  229. package/dist/2163.js +0 -1
  230. package/dist/2163.js.map +0 -1
  231. package/dist/217.js +0 -17
  232. package/dist/217.js.map +0 -1
  233. package/dist/2267.js +0 -1
  234. package/dist/2267.js.map +0 -1
  235. package/dist/2561.js +0 -1
  236. package/dist/2561.js.map +0 -1
  237. package/dist/2564.js +0 -1
  238. package/dist/2564.js.map +0 -1
  239. package/dist/2867.js +0 -1
  240. package/dist/2867.js.map +0 -1
  241. package/dist/3040.js +0 -1
  242. package/dist/3228.js +0 -1
  243. package/dist/3228.js.map +0 -1
  244. package/dist/3339.js +0 -1
  245. package/dist/3339.js.map +0 -1
  246. package/dist/3491.js +0 -1
  247. package/dist/3491.js.map +0 -1
  248. package/dist/3509.js +0 -1
  249. package/dist/3509.js.map +0 -1
  250. package/dist/3576.js +0 -1
  251. package/dist/3576.js.map +0 -1
  252. package/dist/4146.js +0 -1
  253. package/dist/4146.js.map +0 -1
  254. package/dist/422.js +0 -1
  255. package/dist/422.js.map +0 -1
  256. package/dist/4724.js +0 -1
  257. package/dist/4724.js.map +0 -1
  258. package/dist/4972.js +0 -1
  259. package/dist/4972.js.map +0 -1
  260. package/dist/509.js +0 -1
  261. package/dist/509.js.map +0 -1
  262. package/dist/5096.js +0 -1
  263. package/dist/5096.js.map +0 -1
  264. package/dist/5119.js +0 -1
  265. package/dist/5119.js.map +0 -1
  266. package/dist/5576.js +0 -1
  267. package/dist/5576.js.map +0 -1
  268. package/dist/5882.js +0 -1
  269. package/dist/5939.js +0 -5
  270. package/dist/5939.js.map +0 -1
  271. package/dist/6004.js +0 -1
  272. package/dist/6004.js.map +0 -1
  273. package/dist/6129.js +0 -1
  274. package/dist/6129.js.map +0 -1
  275. package/dist/6135.js +0 -13
  276. package/dist/6135.js.map +0 -1
  277. package/dist/6137.js +0 -1
  278. package/dist/6137.js.map +0 -1
  279. package/dist/6232.js +0 -1
  280. package/dist/6232.js.map +0 -1
  281. package/dist/6356.js +0 -1
  282. package/dist/6356.js.map +0 -1
  283. package/dist/6548.js +0 -1
  284. package/dist/6548.js.map +0 -1
  285. package/dist/6626.js +0 -1
  286. package/dist/6626.js.map +0 -1
  287. package/dist/6661.js +0 -1
  288. package/dist/6661.js.map +0 -1
  289. package/dist/6721.js +0 -1
  290. package/dist/6721.js.map +0 -1
  291. package/dist/6868.js +0 -1
  292. package/dist/6868.js.map +0 -1
  293. package/dist/7127.js +0 -1
  294. package/dist/7419.js +0 -1
  295. package/dist/7419.js.map +0 -1
  296. package/dist/7544.js +0 -1
  297. package/dist/7544.js.map +0 -1
  298. package/dist/7560.js +0 -1
  299. package/dist/7560.js.map +0 -1
  300. package/dist/8103.js +0 -1
  301. package/dist/8103.js.map +0 -1
  302. package/dist/8179.js +0 -6
  303. package/dist/8179.js.map +0 -1
  304. package/dist/8189.js +0 -1
  305. package/dist/8189.js.map +0 -1
  306. package/dist/8249.js +0 -1
  307. package/dist/8249.js.map +0 -1
  308. package/dist/8489.js +0 -1
  309. package/dist/8489.js.map +0 -1
  310. package/dist/8502.js +0 -1
  311. package/dist/8502.js.map +0 -1
  312. package/dist/8522.js +0 -1
  313. package/dist/8522.js.map +0 -1
  314. package/dist/8775.js +0 -11
  315. package/dist/8775.js.map +0 -1
  316. package/dist/8869.js +0 -1
  317. package/dist/8869.js.map +0 -1
  318. package/dist/887.js +0 -1
  319. package/dist/887.js.map +0 -1
  320. package/dist/8990.js +0 -1
  321. package/dist/8990.js.map +0 -1
  322. package/dist/9049.js +0 -1
  323. package/dist/9049.js.map +0 -1
  324. package/dist/9117.js +0 -4
  325. package/dist/9117.js.map +0 -1
  326. package/dist/916.js +0 -1
  327. package/dist/9828.js +0 -1
  328. package/dist/9828.js.map +0 -1
  329. package/dist/9931.js +0 -1
  330. package/dist/9931.js.map +0 -1
  331. package/jest.config.js +0 -3
package/dist/5086.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_kenyaemr_esm_version_app=globalThis.webpackChunk_kenyaemr_esm_version_app||[]).push([["5086"],{21613:function(e,t,r){var a,n,o,i;function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}r.d(t,{AO:()=>v,B6:()=>k,G3:()=>et,Gh:()=>T,HC:()=>q,HS:()=>O,HW:()=>ee,Oi:()=>h,Pq:()=>I,RO:()=>L,Rr:()=>y,Sk:()=>N,TM:()=>u,V2:()=>F,VV:()=>K,aE:()=>eo,o1:()=>M,pX:()=>V,pb:()=>j,rc:()=>a,ro:()=>D,sC:()=>d,tH:()=>W,tW:()=>x,ue:()=>S,v6:()=>B,yD:()=>_,zR:()=>c}),(o=a||(a={})).Pop="POP",o.Push="PUSH",o.Replace="REPLACE";let l="popstate";function d(e){let t;void 0===e&&(e={});let{initialEntries:r=["/"],initialIndex:n,v5Compat:o=!1}=e;t=r.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let i=d(null==n?t.length-1:n),s=a.Pop,l=null;function d(e){return Math.min(Math.max(e,0),t.length-1)}function c(e,r,a){void 0===r&&(r=null);let n=m(t?t[i].pathname:"/",e,r,a);return f("/"===n.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),n}function u(e){return"string"==typeof e?e:v(e)}return{get index(){return i},get action(){return s},get location(){return t[i]},createHref:u,createURL:e=>new URL(u(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?y(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){s=a.Push;let n=c(e,r);i+=1,t.splice(i,t.length,n),o&&l&&l({action:s,location:n,delta:1})},replace(e,r){s=a.Replace;let n=c(e,r);t[i]=n,o&&l&&l({action:s,location:n,delta:0})},go(e){s=a.Pop;let r=d(i+e),n=t[r];i=r,l&&l({action:s,location:n,delta:e})},listen:e=>(l=e,()=>{l=null})}}function c(e){return void 0===e&&(e={}),g(function(e,t){let{pathname:r,search:a,hash:n}=e.location;return m("",{pathname:r,search:a,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:v(t)},null,e)}function u(e){return void 0===e&&(e={}),g(function(e,t){let{pathname:r="/",search:a="",hash:n=""}=y(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),m("",{pathname:r,search:a,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),a="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");a=-1===r?t:t.slice(0,r)}return a+"#"+("string"==typeof t?t:v(t))},function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function h(e,t){if(!1===e||null==e)throw Error(t)}function f(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,r,a){return void 0===r&&(r=null),s({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?y(t):t,{state:r,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function v(e){let{pathname:t="/",search:r="",hash:a=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function g(e,t,r,n){void 0===n&&(n={});let{window:o=document.defaultView,v5Compat:i=!1}=n,d=o.history,c=a.Pop,u=null,f=y();function y(){return(d.state||{idx:null}).idx}function g(){c=a.Pop;let e=y(),t=null==e?null:e-f;f=e,u&&u({action:c,location:w.location,delta:t})}function b(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:v(e);return h(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==f&&(f=0,d.replaceState(s({},d.state,{idx:f}),""));let w={get action(){return c},get location(){return e(o,d)},listen(e){if(u)throw Error("A history only accepts one active listener");return o.addEventListener(l,g),u=e,()=>{o.removeEventListener(l,g),u=null}},createHref:e=>t(o,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=a.Push;let n=m(w.location,e,t);r&&r(n,e);let s=p(n,f=y()+1),l=w.createHref(n);try{d.pushState(s,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(l)}i&&u&&u({action:c,location:w.location,delta:1})},replace:function(e,t){c=a.Replace;let n=m(w.location,e,t);r&&r(n,e);let o=p(n,f=y()),s=w.createHref(n);d.replaceState(o,"",s),i&&u&&u({action:c,location:w.location,delta:0})},go:e=>d.go(e)};return w}(i=n||(n={})).data="data",i.deferred="deferred",i.redirect="redirect",i.error="error";let b=new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,r,a){return void 0===r&&(r=[]),void 0===a&&(a={}),e.map((e,n)=>{let o=[...r,String(n)],i="string"==typeof e.id?e.id:o.join("-");if(h(!0!==e.index||!e.children,"Cannot specify children on an index route"),h(!a[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){let r=s({},e,t(e),{id:i});return a[i]=r,r}{let r=s({},e,t(e),{id:i,children:void 0});return a[i]=r,e.children&&(r.children=w(e.children,t,o,a)),r}})}function S(e,t,r){return void 0===r&&(r="/"),E(e,t,r,!1)}function E(e,t,r,a){let n=j(("string"==typeof t?y(t):t).pathname||"/",r);if(null==n)return null;let o=function e(t,r,a,n){void 0===r&&(r=[]),void 0===a&&(a=[]),void 0===n&&(n="");let o=(t,o,i)=>{var s,l;let d,c,u={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};u.relativePath.startsWith("/")&&(h(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),u.relativePath=u.relativePath.slice(n.length));let f=O([n,u.relativePath]),p=a.concat(u);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+f+'".'),e(t.children,r,p,f)),(null!=t.path||t.index)&&r.push({path:f,score:(s=f,l=t.index,c=(d=s.split("/")).length,d.some(P)&&(c+=-2),l&&(c+=2),d.filter(e=>!P(e)).reduce((e,t)=>e+(R.test(t)?3:""===t?1:10),c)),routesMeta:p})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[a,...n]=r,o=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];let s=e(n.join("/")),l=[];return l.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&l.push(...s),l.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);o.sort((e,t)=>{var r,a;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),a=t.routesMeta.map(e=>e.childrenIndex),r.length===a.length&&r.slice(0,-1).every((e,t)=>e===a[t])?r[r.length-1]-a[a.length-1]:0)});let i=null;for(let e=0;null==i&&e<o.length;++e){let t=L(n);i=function(e,t,r){void 0===r&&(r=!1);let{routesMeta:a}=e,n={},o="/",i=[];for(let e=0;e<a.length;++e){let s=a[e],l=e===a.length-1,d="/"===o?t:t.slice(o.length)||"/",c=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},d),u=s.route;if(!c&&l&&r&&!a[a.length-1].route.index&&(c=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},d)),!c)return null;Object.assign(n,c.params),i.push({params:n,pathname:O([o,c.pathname]),pathnameBase:U(O([o,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(o=O([o,c.pathnameBase]))}return i}(o[e],t,a)}return i}function D(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],handle:r.handle}}let R=/^:[\w-]+$/,P=e=>"*"===e;function x(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(f(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));let a=r.startsWith("/")?"/":"",n=e=>null==e?"":"string"==typeof e?e:String(e);return a+r.split(/\/+/).map((e,r,a)=>{if(r===a.length-1&&"*"===e)return n(t["*"]);let o=e.match(/^:([\w-]+)(\??)$/);if(o){let[,e,r]=o,a=t[e];return h("?"===r||null!=a,'Missing ":'+e+'" param'),n(a)}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function k(e,t){var r,a,n;let o,i;"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[s,l]=(r=e.path,a=e.caseSensitive,n=e.end,void 0===a&&(a=!1),void 0===n&&(n=!0),f("*"===r||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),o=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(o.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")),r.endsWith("*")?(o.push({paramName:"*"}),i+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==r&&"/"!==r&&(i+="(?:(?=\\/|$))"),[new RegExp(i,a?void 0:"i"),o]),d=t.match(s);if(!d)return null;let c=d[0],u=c.replace(/(.)\/+$/,"$1"),h=d.slice(1);return{params:l.reduce((e,t,r)=>{let{paramName:a,isOptional:n}=t;if("*"===a){let e=h[r]||"";u=c.slice(0,c.length-e.length).replace(/(.)\/+$/,"$1")}let o=h[r];return n&&!o?e[a]=void 0:e[a]=(o||"").replace(/%2F/g,"/"),e},{}),pathname:c,pathnameBase:u,pattern:e}}function L(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function j(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&"/"!==a?null:e.slice(r)||"/"}function M(e,t){var r;let a;void 0===t&&(t="/");let{pathname:n,search:o="",hash:i=""}="string"==typeof e?y(e):e;return{pathname:n?n.startsWith("/")?n:(r=n,a=t.replace(/\/+$/,"").split("/"),r.split("/").forEach(e=>{".."===e?a.length>1&&a.pop():"."!==e&&a.push(e)}),a.length>1?a.join("/"):"/"):t,search:z(o),hash:H(i)}}function A(e,t,r,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field [")+JSON.stringify(a)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function C(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function _(e,t){let r=C(e);return t?r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase):r.map(e=>e.pathnameBase)}function T(e,t,r,a){let n,o;void 0===a&&(a=!1),"string"==typeof e?n=y(e):(h(!(n=s({},e)).pathname||!n.pathname.includes("?"),A("?","pathname","search",n)),h(!n.pathname||!n.pathname.includes("#"),A("#","pathname","hash",n)),h(!n.search||!n.search.includes("#"),A("#","search","hash",n)));let i=""===e||""===n.pathname,l=i?"/":n.pathname;if(null==l)o=r;else{let e=t.length-1;if(!a&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;n.pathname=t.join("/")}o=e>=0?t[e]:"/"}let d=M(n,o),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&r.endsWith("/");return!d.pathname.endsWith("/")&&(c||u)&&(d.pathname+="/"),d}let O=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",H=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",I=function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,a=new Headers(r.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),s({},r,{headers:a}))};class W extends Error{}class ${constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],h(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise((e,t)=>r=t),this.controller=new AbortController;let a=()=>r(new W("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(e).reduce((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:this.trackPromise(r,a)})},{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(r,e,void 0,t),t=>this.onSettle(r,e,t));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,a){if(this.controller.signal.aborted&&r instanceof W)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===a){let r=Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===a?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>a}),this.emit(!1,t),a)}emit(e,t){this.subscribers.forEach(r=>r(e,t))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t)),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise(t=>{this.subscribe(a=>{e.removeEventListener("abort",r),(a||this.done)&&t(a)})})}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return h(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:function(e){if(!(e instanceof Promise&&!0===e._tracked))return e;if(e._error)throw e._error;return e._data}(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}let B=function(e,t){return void 0===t&&(t={}),new $(e,"number"==typeof t?{status:t}:t)},F=function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",e),new Response(null,s({},r,{headers:a}))},N=(e,t)=>{let r=F(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},q=(e,t)=>{let r=F(e,t);return r.headers.set("X-Remix-Replace","true"),r};class K{constructor(e,t,r,a){void 0===a&&(a=!1),this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function V(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}let J=["post","put","patch","delete"],Y=new Set(J),X=new Set(["get",...J]),G=new Set([301,302,303,307,308]),Q=new Set([307,308]),Z={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ee={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},et={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},er=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ea=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),en="remix-router-transitions";function eo(e){let t,r,o,i,l,d,c=e.window?e.window:"undefined"!=typeof window?window:void 0,u=void 0!==c&&void 0!==c.document&&void 0!==c.document.createElement,p=!u;if(h(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let r=e.detectErrorBoundary;t=e=>({hasErrorBoundary:r(e)})}else t=ea;let v={},y=w(e.routes,t,void 0,v),g=e.basename||"/",b=e.dataStrategy||em,R=e.patchRoutesOnNavigation,P=s({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),x=null,k=new Set,L=null,M=null,A=null,C=null!=e.hydrationData,_=S(y,e.history.location,g),T=!1,O=null;if(null==_&&!R){let t=eL(404,{pathname:e.history.location.pathname}),{matches:r,route:a}=ek(y);_=r,O={[a.id]:t}}if(_&&!e.hydrationData&&to(_,y,e.history.location.pathname).active&&(_=null),_)if(_.some(e=>e.route.lazy))o=!1;else if(_.some(e=>e.route.loader))if(P.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=_.findIndex(e=>void 0!==r[e.route.id]);o=_.slice(0,e+1).every(e=>!ec(e.route,t,r))}else o=_.every(e=>!ec(e.route,t,r))}else o=null!=e.hydrationData;else o=!0;else if(o=!1,_=[],P.v7_partialHydration){let t=to(null,y,e.history.location.pathname);t.active&&t.matches&&(T=!0,_=t.matches)}let U={historyAction:e.history.action,location:e.history.location,matches:_,initialized:o,navigation:Z,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||O,fetchers:new Map,blockers:new Map},z=a.Pop,H=!1,I=!1,W=new Map,$=null,B=!1,F=!1,N=[],q=new Set,K=new Map,J=0,Y=-1,X=new Map,eo=new Set,el=new Map,eu=new Map,eh=new Set,ep=new Map,ey=new Map;function eS(e,t){void 0===t&&(t={}),U=s({},U,e);let r=[],a=[];P.v7_fetcherPersist&&U.fetchers.forEach((e,t)=>{"idle"===e.state&&(eh.has(t)?a.push(t):r.push(t))}),eh.forEach(e=>{U.fetchers.has(e)||K.has(e)||a.push(e)}),[...k].forEach(e=>e(U,{deletedFetchers:a,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),P.v7_fetcherPersist?(r.forEach(e=>U.fetchers.delete(e)),a.forEach(e=>e7(e))):a.forEach(e=>eh.delete(e))}function eE(t,n,o){var i,l;let d,c,{flushSync:u}=void 0===o?{}:o,h=null!=U.actionData&&null!=U.navigation.formMethod&&eU(U.navigation.formMethod)&&"loading"===U.navigation.state&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;d=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:h?U.actionData:null;let f=n.loaderData?eR(U.loaderData,n.loaderData,n.matches||[],n.errors):U.loaderData,p=U.blockers;p.size>0&&(p=new Map(p)).forEach((e,t)=>p.set(t,et));let m=!0===H||null!=U.navigation.formMethod&&eU(U.navigation.formMethod)&&(null==(l=t.state)?void 0:l._isRedirect)!==!0;if(r&&(y=r,r=void 0),B||z===a.Pop||(z===a.Push?e.history.push(t,t.state):z===a.Replace&&e.history.replace(t,t.state)),z===a.Pop){let e=W.get(U.location.pathname);e&&e.has(t.pathname)?c={currentLocation:U.location,nextLocation:t}:W.has(t.pathname)&&(c={currentLocation:t,nextLocation:U.location})}else if(I){let e=W.get(U.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),W.set(U.location.pathname,e)),c={currentLocation:U.location,nextLocation:t}}eS(s({},n,{actionData:d,loaderData:f,historyAction:z,location:t,initialized:!0,navigation:Z,revalidation:"idle",restoreScrollPosition:tn(t,n.matches||U.matches),preventScrollReset:m,blockers:p}),{viewTransitionOpts:c,flushSync:!0===u}),z=a.Pop,H=!1,I=!1,B=!1,F=!1,N=[]}async function eM(t,r){if("number"==typeof t)return void e.history.go(t);let n=ei(U.location,U.matches,g,P.v7_prependBasename,t,P.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:o,submission:i,error:l}=es(P.v7_normalizeFormMethod,!1,n,r),d=U.location,c=m(U.location,o,r&&r.state);c=s({},c,e.history.encodeLocation(c));let u=r&&null!=r.replace?r.replace:void 0,h=a.Push;!0===u?h=a.Replace:!1===u||null!=i&&eU(i.formMethod)&&i.formAction===U.location.pathname+U.location.search&&(h=a.Replace);let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,p=!0===(r&&r.flushSync),v=te({currentLocation:d,nextLocation:c,historyAction:h});return v?void e9(v,{state:"blocked",location:c,proceed(){e9(v,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),eM(t,r)},reset(){let e=new Map(U.blockers);e.set(v,et),eS({blockers:e})}}):await eT(h,c,{submission:i,pendingError:l,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:p})}async function eT(t,a,o){var i,d,c,u;let h;l&&l.abort(),l=null,z=t,B=!0===(o&&o.startUninterruptedRevalidation),i=U.location,d=U.matches,L&&A&&(L[ta(i,d)]=A()),H=!0===(o&&o.preventScrollReset),I=!0===(o&&o.enableViewTransition);let f=r||y,p=o&&o.overrideNavigation,m=null!=o&&o.initialHydration&&U.matches&&U.matches.length>0&&!T?U.matches:S(f,a,g),v=!0===(o&&o.flushSync);if(m&&U.initialized&&!F&&(c=U.location,u=a,c.pathname===u.pathname&&c.search===u.search&&(""===c.hash?""!==u.hash:c.hash===u.hash||""!==u.hash||!1))&&!(o&&o.submission&&eU(o.submission.formMethod)))return void eE(a,{matches:m},{flushSync:v});let b=to(m,f,a.pathname);if(b.active&&b.matches&&(m=b.matches),!m){let{error:e,notFoundMatches:t,route:r}=tt(a.pathname);eE(a,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:v});return}l=new AbortController;let w=ew(e.history,a,l.signal,o&&o.submission);if(o&&o.pendingError)h=[ex(m).route.id,{type:n.error,error:o.pendingError}];else if(o&&o.submission&&eU(o.submission.formMethod)){let t=await eW(w,a,o.submission,m,b.active,{replace:o.replace,flushSync:v});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(eC(r)&&V(r.error)&&404===r.error.status){l=null,eE(a,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}m=t.matches||m,h=t.pendingActionResult,p=eF(a,o.submission),v=!1,b.active=!1,w=ew(e.history,w.url,w.signal)}let{shortCircuited:E,matches:D,loaderData:R,errors:P}=await eK(w,a,m,b.active,p,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,v,h);E||(l=null,eE(a,s({matches:D||m},eP(h),{loaderData:R,errors:P})))}async function eW(e,t,r,o,i,s){var l;let d;if(void 0===s&&(s={}),eZ(),eS({navigation:{state:"submitting",location:t,formMethod:(l=r).formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}},{flushSync:!0===s.flushSync}),i){let r=await ti(o,t.pathname,e.signal);if("aborted"===r.type)return{shortCircuited:!0};if("error"===r.type){let e=ex(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:n.error,error:r.error}]}}if(r.matches)o=r.matches;else{let{notFoundMatches:e,error:r,route:a}=tt(t.pathname);return{matches:e,pendingActionResult:[a.id,{type:n.error,error:r}]}}}let c=e$(o,t);if(c.route.action||c.route.lazy){if(d=(await eG("action",U,e,[c],o,null))[c.route.id],e.signal.aborted)return{shortCircuited:!0}}else d={type:n.error,error:eL(405,{method:e.method,pathname:t.pathname,routeId:c.route.id})};if(e_(d)){let t;return t=s&&null!=s.replace?s.replace:eb(d.response.headers.get("Location"),new URL(e.url),g)===U.location.pathname+U.location.search,await eX(e,d,!0,{submission:r,replace:t}),{shortCircuited:!0}}if(eA(d))throw eL(400,{type:"defer-action"});if(eC(d)){let e=ex(o,c.route.id);return!0!==(s&&s.replace)&&(z=a.Push),{matches:o,pendingActionResult:[e.route.id,d]}}return{matches:o,pendingActionResult:[c.route.id,d]}}async function eK(t,a,n,o,i,d,c,u,h,f,p){let m=i||eF(a,d),v=d||c||eB(m),b=!B&&(!P.v7_partialHydration||!h);if(o){if(b){let e=eV(p);eS(s({navigation:m},void 0!==e?{actionData:e}:{}),{flushSync:f})}let e=await ti(n,a.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=ex(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)n=e.matches;else{let{error:e,notFoundMatches:t,route:r}=tt(a.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let w=r||y,[S,E]=ed(e.history,U,n,v,a,P.v7_partialHydration&&!0===h,P.v7_skipActionErrorRevalidation,F,N,q,eh,el,eo,w,g,p);if(tr(e=>!(n&&n.some(t=>t.route.id===e))||S&&S.some(t=>t.route.id===e)),Y=++J,0===S.length&&0===E.length){let e=e5();return eE(a,s({matches:n,loaderData:{},errors:p&&eC(p[1])?{[p[0]]:p[1].error}:null},eP(p),e?{fetchers:new Map(U.fetchers)}:{}),{flushSync:f}),{shortCircuited:!0}}if(b){let e={};if(!o){e.navigation=m;let t=eV(p);void 0!==t&&(e.actionData=t)}E.length>0&&(E.forEach(e=>{let t=U.fetchers.get(e.key),r=eN(void 0,t?t.data:void 0);U.fetchers.set(e.key,r)}),e.fetchers=new Map(U.fetchers)),eS(e,{flushSync:f})}E.forEach(e=>{e3(e.key),e.controller&&K.set(e.key,e.controller)});let D=()=>E.forEach(e=>e3(e.key));l&&l.signal.addEventListener("abort",D);let{loaderResults:R,fetcherResults:x}=await eQ(U,n,S,E,t);if(t.signal.aborted)return{shortCircuited:!0};l&&l.signal.removeEventListener("abort",D),E.forEach(e=>K.delete(e.key));let k=ej(R);if(k)return await eX(t,k.result,!0,{replace:u}),{shortCircuited:!0};if(k=ej(x))return eo.add(k.key),await eX(t,k.result,!0,{replace:u}),{shortCircuited:!0};let{loaderData:L,errors:j}=eD(U,n,R,p,E,x,ep);ep.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&ep.delete(t)})}),P.v7_partialHydration&&h&&U.errors&&(j=s({},U.errors,j));let M=e5(),A=e6(Y),C=M||A||E.length>0;return s({matches:n,loaderData:L,errors:j},C?{fetchers:new Map(U.fetchers)}:{})}function eV(e){if(e&&!eC(e[1]))return{[e[0]]:e[1].data};if(U.actionData)if(0===Object.keys(U.actionData).length)return null;else return U.actionData}async function eJ(t,a,n,o,i,s,d,c,u){var f,p;function m(e){if(!e.route.action&&!e.route.lazy){let e=eL(405,{method:u.formMethod,pathname:n,routeId:a});return e1(t,a,e,{flushSync:d}),!0}return!1}if(eZ(),el.delete(t),!s&&m(o))return;let v=U.fetchers.get(t);e0(t,(f=u,p=v,{state:"submitting",formMethod:f.formMethod,formAction:f.formAction,formEncType:f.formEncType,formData:f.formData,json:f.json,text:f.text,data:p?p.data:void 0}),{flushSync:d});let b=new AbortController,w=ew(e.history,n,b.signal,u);if(s){let e=await ti(i,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,a,e.error,{flushSync:d});if(!e.matches)return void e1(t,a,eL(404,{pathname:n}),{flushSync:d});if(m(o=e$(i=e.matches,n)))return}K.set(t,b);let E=J,D=(await eG("action",U,w,[o],i,t))[o.route.id];if(w.signal.aborted){K.get(t)===b&&K.delete(t);return}if(P.v7_fetcherPersist&&eh.has(t)){if(e_(D)||eC(D))return void e0(t,eq(void 0))}else{if(e_(D))return(K.delete(t),Y>E)?void e0(t,eq(void 0)):(eo.add(t),e0(t,eN(u)),eX(w,D,!1,{fetcherSubmission:u,preventScrollReset:c}));if(eC(D))return void e1(t,a,D.error)}if(eA(D))throw eL(400,{type:"defer-action"});let R=U.navigation.location||U.location,x=ew(e.history,R,b.signal),k=r||y,L="idle"!==U.navigation.state?S(k,U.navigation.location,g):U.matches;h(L,"Didn't find any matches after fetcher action");let j=++J;X.set(t,j);let M=eN(u,D.data);U.fetchers.set(t,M);let[A,C]=ed(e.history,U,L,u,R,!1,P.v7_skipActionErrorRevalidation,F,N,q,eh,el,eo,k,g,[o.route.id,D]);C.filter(e=>e.key!==t).forEach(e=>{let t=e.key,r=U.fetchers.get(t),a=eN(void 0,r?r.data:void 0);U.fetchers.set(t,a),e3(t),e.controller&&K.set(t,e.controller)}),eS({fetchers:new Map(U.fetchers)});let _=()=>C.forEach(e=>e3(e.key));b.signal.addEventListener("abort",_);let{loaderResults:T,fetcherResults:O}=await eQ(U,L,A,C,x);if(b.signal.aborted)return;b.signal.removeEventListener("abort",_),X.delete(t),K.delete(t),C.forEach(e=>K.delete(e.key));let H=ej(T);if(H)return eX(x,H.result,!1,{preventScrollReset:c});if(H=ej(O))return eo.add(H.key),eX(x,H.result,!1,{preventScrollReset:c});let{loaderData:I,errors:W}=eD(U,L,T,void 0,C,O,ep);if(U.fetchers.has(t)){let e=eq(D.data);U.fetchers.set(t,e)}e6(j),"loading"===U.navigation.state&&j>Y?(h(z,"Expected pending action"),l&&l.abort(),eE(U.navigation.location,{matches:L,loaderData:I,errors:W,fetchers:new Map(U.fetchers)})):(eS({errors:W,loaderData:eR(U.loaderData,I,L,W),fetchers:new Map(U.fetchers)}),F=!1)}async function eY(t,r,a,n,o,i,s,l,d){let c=U.fetchers.get(t);e0(t,eN(d,c?c.data:void 0),{flushSync:s});let u=new AbortController,f=ew(e.history,a,u.signal);if(i){let e=await ti(o,new URL(f.url).pathname,f.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,r,e.error,{flushSync:s});if(!e.matches)return void e1(t,r,eL(404,{pathname:a}),{flushSync:s});n=e$(o=e.matches,a)}K.set(t,u);let p=J,m=(await eG("loader",U,f,[n],o,t))[n.route.id];if(eA(m)&&(m=await eI(m,f.signal,!0)||m),K.get(t)===u&&K.delete(t),!f.signal.aborted){if(eh.has(t))return void e0(t,eq(void 0));if(e_(m))if(Y>p)return void e0(t,eq(void 0));else{eo.add(t),await eX(f,m,!1,{preventScrollReset:l});return}if(eC(m))return void e1(t,r,m.error);h(!eA(m),"Unhandled fetcher deferred data"),e0(t,eq(m.data))}}async function eX(t,r,n,o){let{submission:i,fetcherSubmission:d,preventScrollReset:f,replace:p}=void 0===o?{}:o;r.response.headers.has("X-Remix-Revalidate")&&(F=!0);let v=r.response.headers.get("Location");h(v,"Expected a Location header on the redirect Response"),v=eb(v,new URL(t.url),g);let y=m(U.location,v,{_isRedirect:!0});if(u){let t=!1;if(r.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(er.test(v)){let r=e.history.createURL(v);t=r.origin!==c.location.origin||null==j(r.pathname,g)}if(t)return void(p?c.location.replace(v):c.location.assign(v))}l=null;let b=!0===p||r.response.headers.has("X-Remix-Replace")?a.Replace:a.Push,{formMethod:w,formAction:S,formEncType:E}=U.navigation;!i&&!d&&w&&S&&E&&(i=eB(U.navigation));let D=i||d;if(Q.has(r.response.status)&&D&&eU(D.formMethod))await eT(b,y,{submission:s({},D,{formAction:v}),preventScrollReset:f||H,enableViewTransition:n?I:void 0});else{let e=eF(y,i);await eT(b,y,{overrideNavigation:e,fetcherSubmission:d,preventScrollReset:f||H,enableViewTransition:n?I:void 0})}}async function eG(e,r,a,o,i,s){let l,d={};try{l=await ev(b,e,r,a,o,i,s,v,t)}catch(e){return o.forEach(t=>{d[t.route.id]={type:n.error,error:e}}),d}for(let[e,t]of Object.entries(l)){var c;if(eO((c=t).result)&&G.has(c.result.status)){let r=t.result;d[e]={type:n.redirect,response:function(e,t,r,a,n,o){let i=e.headers.get("Location");if(h(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!er.test(i)){let s=a.slice(0,a.findIndex(e=>e.route.id===r)+1);i=ei(new URL(t.url),s,n,!0,i,o),e.headers.set("Location",i)}return e}(r,a,e,i,g,P.v7_relativeSplatPath)}}else d[e]=await eg(t)}return d}async function eQ(t,r,a,o,i){let s=t.matches,l=eG("loader",t,i,a,r,null),d=Promise.all(o.map(async r=>{if(!r.matches||!r.match||!r.controller)return Promise.resolve({[r.key]:{type:n.error,error:eL(404,{pathname:r.path})}});{let a=(await eG("loader",t,ew(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:a}}})),c=await l,u=(await d).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([ez(r,c,i.signal,s,t.loaderData),eH(r,u,o)]),{loaderResults:c,fetcherResults:u}}function eZ(){F=!0,N.push(...tr()),el.forEach((e,t)=>{K.has(t)&&q.add(t),e3(t)})}function e0(e,t,r){void 0===r&&(r={}),U.fetchers.set(e,t),eS({fetchers:new Map(U.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function e1(e,t,r,a){void 0===a&&(a={});let n=ex(U.matches,t);e7(e),eS({errors:{[n.route.id]:r},fetchers:new Map(U.fetchers)},{flushSync:!0===(a&&a.flushSync)})}function e4(e){return eu.set(e,(eu.get(e)||0)+1),eh.has(e)&&eh.delete(e),U.fetchers.get(e)||ee}function e7(e){let t=U.fetchers.get(e);K.has(e)&&!(t&&"loading"===t.state&&X.has(e))&&e3(e),el.delete(e),X.delete(e),eo.delete(e),P.v7_fetcherPersist&&eh.delete(e),q.delete(e),U.fetchers.delete(e)}function e3(e){let t=K.get(e);t&&(t.abort(),K.delete(e))}function e2(e){for(let t of e){let e=eq(e4(t).data);U.fetchers.set(t,e)}}function e5(){let e=[],t=!1;for(let r of eo){let a=U.fetchers.get(r);h(a,"Expected fetcher: "+r),"loading"===a.state&&(eo.delete(r),e.push(r),t=!0)}return e2(e),t}function e6(e){let t=[];for(let[r,a]of X)if(a<e){let e=U.fetchers.get(r);h(e,"Expected fetcher: "+r),"loading"===e.state&&(e3(r),X.delete(r),t.push(r))}return e2(t),t.length>0}function e8(e){U.blockers.delete(e),ey.delete(e)}function e9(e,t){let r=U.blockers.get(e)||et;h("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let a=new Map(U.blockers);a.set(e,t),eS({blockers:a})}function te(e){let{currentLocation:t,nextLocation:r,historyAction:a}=e;if(0===ey.size)return;ey.size>1&&f(!1,"A router only supports one blocker at a time");let n=Array.from(ey.entries()),[o,i]=n[n.length-1],s=U.blockers.get(o);if((!s||"proceeding"!==s.state)&&i({currentLocation:t,nextLocation:r,historyAction:a}))return o}function tt(e){let t=eL(404,{pathname:e}),{matches:a,route:n}=ek(r||y);return tr(),{notFoundMatches:a,route:n,error:t}}function tr(e){let t=[];return ep.forEach((r,a)=>{(!e||e(a))&&(r.cancel(),t.push(a),ep.delete(a))}),t}function ta(e,t){return M&&M(e,t.map(e=>D(e,U.loaderData)))||e.key}function tn(e,t){if(L){let r=L[ta(e,t)];if("number"==typeof r)return r}return null}function to(e,t,r){if(R){if(!e)return{active:!0,matches:E(t,r,g,!0)||[]};else if(Object.keys(e[0].params).length>0)return{active:!0,matches:E(t,r,g,!0)}}return{active:!1,matches:null}}async function ti(e,a,n,o){if(!R)return{type:"success",matches:e};let i=e;for(;;){let e=null==r,s=r||y,l=v;try{await R({signal:n,path:a,matches:i,fetcherKey:o,patch:(e,r)=>{n.aborted||ef(e,r,s,l,t)}})}catch(e){return{type:"error",error:e,partialMatches:i}}finally{e&&!n.aborted&&(y=[...y])}if(n.aborted)return{type:"aborted"};let d=S(s,a,g);if(d)return{type:"success",matches:d};let c=E(s,a,g,!0);if(!c||i.length===c.length&&i.every((e,t)=>e.route.id===c[t].route.id))return{type:"success",matches:null};i=c}}return i={get basename(){return g},get future(){return P},get state(){return U},get routes(){return y},get window(){return c},initialize:function(){if(x=e.history.listen(t=>{let{action:r,location:a,delta:n}=t;if(d){d(),d=void 0;return}f(0===ey.size||null!=n,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=te({currentLocation:U.location,nextLocation:a,historyAction:r});if(o&&null!=n){let t=new Promise(e=>{d=e});e.history.go(-1*n),e9(o,{state:"blocked",location:a,proceed(){e9(o,{state:"proceeding",proceed:void 0,reset:void 0,location:a}),t.then(()=>e.history.go(n))},reset(){let e=new Map(U.blockers);e.set(o,et),eS({blockers:e})}});return}return eT(r,a)}),u){var t=c,r=W;try{let e=t.sessionStorage.getItem(en);if(e){let t=JSON.parse(e);for(let[e,a]of Object.entries(t||{}))a&&Array.isArray(a)&&r.set(e,new Set(a||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,a]of t)r[e]=[...a];try{e.sessionStorage.setItem(en,JSON.stringify(r))}catch(e){f(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}})(c,W);c.addEventListener("pagehide",e),$=()=>c.removeEventListener("pagehide",e)}return U.initialized||eT(a.Pop,U.location,{initialHydration:!0}),i},subscribe:function(e){return k.add(e),()=>k.delete(e)},enableScrollRestoration:function(e,t,r){if(L=e,A=t,M=r||null,!C&&U.navigation===Z){C=!0;let e=tn(U.location,U.matches);null!=e&&eS({restoreScrollPosition:e})}return()=>{L=null,A=null,M=null}},navigate:eM,fetch:function(e,t,a,n){if(p)throw Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");e3(e);let o=!0===(n&&n.flushSync),i=r||y,s=ei(U.location,U.matches,g,P.v7_prependBasename,a,P.v7_relativeSplatPath,t,null==n?void 0:n.relative),l=S(i,s,g),d=to(l,i,s);if(d.active&&d.matches&&(l=d.matches),!l)return void e1(e,t,eL(404,{pathname:s}),{flushSync:o});let{path:c,submission:u,error:h}=es(P.v7_normalizeFormMethod,!0,s,n);if(h)return void e1(e,t,h,{flushSync:o});let f=e$(l,c),m=!0===(n&&n.preventScrollReset);u&&eU(u.formMethod)?eJ(e,t,c,f,l,d.active,o,m,u):(el.set(e,{routeId:t,path:c}),eY(e,t,c,f,l,d.active,o,m,u))},revalidate:function(){if(eZ(),eS({revalidation:"loading"}),"submitting"!==U.navigation.state){if("idle"===U.navigation.state)return void eT(U.historyAction,U.location,{startUninterruptedRevalidation:!0});eT(z||U.historyAction,U.navigation.location,{overrideNavigation:U.navigation,enableViewTransition:!0===I})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:e4,deleteFetcher:function(e){let t=(eu.get(e)||0)-1;t<=0?(eu.delete(e),eh.add(e),P.v7_fetcherPersist||e7(e)):eu.set(e,t),eS({fetchers:new Map(U.fetchers)})},dispose:function(){x&&x(),$&&$(),k.clear(),l&&l.abort(),U.fetchers.forEach((e,t)=>e7(t)),U.blockers.forEach((e,t)=>e8(t))},getBlocker:function(e,t){let r=U.blockers.get(e)||et;return ey.get(e)!==t&&ey.set(e,t),r},deleteBlocker:e8,patchRoutes:function(e,a){let n=null==r;ef(e,a,r||y,v,t),n&&(y=[...y],eS({}))},_internalFetchControllers:K,_internalActiveDeferreds:ep,_internalSetRoutes:function(e){r=w(e,t,void 0,v={})}}}function ei(e,t,r,a,n,o,i,s){let l,d;if(i){for(let e of(l=[],t))if(l.push(e),e.route.id===i){d=e;break}}else l=t,d=t[t.length-1];let c=T(n||".",_(l,o),j(e.pathname,r)||e.pathname,"path"===s);if(null==n&&(c.search=e.search,c.hash=e.hash),(null==n||""===n||"."===n)&&d){let e=eW(c.search);if(d.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();c.search=r?"?"+r:""}}return a&&"/"!==r&&(c.pathname="/"===c.pathname?r:O([r,c.pathname])),v(c)}function es(e,t,r,a){var n;let o,i;if(!a||!(null!=a&&("formData"in a&&null!=a.formData||"body"in a&&void 0!==a.body)))return{path:r};if(a.formMethod&&(n=a.formMethod,!X.has(n.toLowerCase())))return{path:r,error:eL(405,{method:a.formMethod})};let s=()=>({path:r,error:eL(400,{type:"invalid-body"})}),l=a.formMethod||"get",d=e?l.toUpperCase():l.toLowerCase(),c=eM(r);if(void 0!==a.body){if("text/plain"===a.formEncType){if(!eU(d))return s();let e="string"==typeof a.body?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((e,t)=>{let[r,a]=t;return""+e+r+"="+a+"\n"},""):String(a.body);return{path:r,submission:{formMethod:d,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:e}}}else if("application/json"===a.formEncType){if(!eU(d))return s();try{let e="string"==typeof a.body?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:d,formAction:c,formEncType:a.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(h("function"==typeof FormData,"FormData is not available in this environment"),a.formData)o=eS(a.formData),i=a.formData;else if(a.body instanceof FormData)o=eS(a.body),i=a.body;else if(a.body instanceof URLSearchParams)i=eE(o=a.body);else if(null==a.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(a.body),i=eE(o)}catch(e){return s()}let u={formMethod:d,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(eU(u.formMethod))return{path:r,submission:u};let f=y(r);return t&&f.search&&eW(f.search)&&o.append("index",""),f.search="?"+o,{path:v(f),submission:u}}function el(e,t,r){void 0===r&&(r=!1);let a=e.findIndex(e=>e.route.id===t);return a>=0?e.slice(0,r?a+1:a):e}function ed(e,t,r,a,n,o,i,l,d,c,u,h,f,p,m,v){let y=v?eC(v[1])?v[1].error:v[1].data:void 0,g=e.createURL(t.location),b=e.createURL(n),w=r;o&&t.errors?w=el(r,Object.keys(t.errors)[0],!0):v&&eC(v[1])&&(w=el(r,v[0]));let E=v?v[1].statusCode:void 0,D=i&&E&&E>=400,R=w.filter((e,r)=>{var n,i,c;let u,h,{route:f}=e;if(f.lazy)return!0;if(null==f.loader)return!1;if(o)return ec(f,t.loaderData,t.errors);if(n=t.loaderData,i=t.matches[r],c=e,u=!i||c.route.id!==i.route.id,h=void 0===n[c.route.id],u||h||d.some(t=>t===e.route.id))return!0;let p=t.matches[r];return eh(e,s({currentUrl:g,currentParams:p.params,nextUrl:b,nextParams:e.params},a,{actionResult:y,actionStatus:E,defaultShouldRevalidate:!D&&(l||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||eu(p,e))}))}),P=[];return h.forEach((e,n)=>{if(o||!r.some(t=>t.route.id===e.routeId)||u.has(n))return;let i=S(p,e.path,m);if(!i)return void P.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let d=t.fetchers.get(n),h=e$(i,e.path),v=!1;f.has(n)?v=!1:c.has(n)?(c.delete(n),v=!0):v=d&&"idle"!==d.state&&void 0===d.data?l:eh(h,s({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},a,{actionResult:y,actionStatus:E,defaultShouldRevalidate:!D&&l})),v&&P.push({key:n,routeId:e.routeId,path:e.path,matches:i,match:h,controller:new AbortController})}),[R,P]}function ec(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let a=null!=t&&void 0!==t[e.id],n=null!=r&&void 0!==r[e.id];return(!!a||!n)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!a&&!n)}function eu(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function eh(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function ef(e,t,r,a,n){var o;let i;if(e){let t=a[e];h(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),i=t.children}else i=r;let s=w(t.filter(e=>!i.some(t=>(function e(t,r){return"id"in t&&"id"in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,a)=>{var n;return null==(n=r.children)?void 0:n.some(r=>e(t,r))}))})(e,t))),n,[e||"_","patch",String((null==(o=i)?void 0:o.length)||"0")],a);i.push(...s)}async function ep(e,t,r){if(!e.lazy)return;let a=await e.lazy();if(!e.lazy)return;let n=r[e.id];h(n,"No route found in manifest");let o={};for(let e in a){let t=void 0!==n[e]&&"hasErrorBoundary"!==e;f(!t,'Route "'+n.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||b.has(e)||(o[e]=a[e])}Object.assign(n,o),Object.assign(n,s({},t(n),{lazy:void 0}))}async function em(e){let{matches:t}=e,r=t.filter(e=>e.shouldLoad);return(await Promise.all(r.map(e=>e.resolve()))).reduce((e,t,a)=>Object.assign(e,{[r[a].route.id]:t}),{})}async function ev(e,t,r,a,o,i,l,d,c,u){let h=i.map(e=>e.route.lazy?ep(e.route,c,d):void 0),f=i.map((e,r)=>{let i=h[r],l=o.some(t=>t.route.id===e.route.id),d=async r=>(r&&"GET"===a.method&&(e.route.lazy||e.route.loader)&&(l=!0),l?ey(t,a,e,i,r,u):Promise.resolve({type:n.data,result:void 0}));return s({},e,{shouldLoad:l,resolve:d})}),p=await e({matches:f,request:a,params:i[0].params,fetcherKey:l,context:u});try{await Promise.all(h)}catch(e){}return p}async function ey(e,t,r,a,o,i){let s,l,d=a=>{let n,s=new Promise((e,t)=>n=t);l=()=>n(),t.signal.addEventListener("abort",l);let d=n=>"function"!=typeof a?Promise.reject(Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: ')+r.route.id+"]")):a({request:t,params:r.params,context:i},...void 0!==n?[n]:[]);return Promise.race([(async()=>{try{let e=await (o?o(e=>d(e)):d());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})(),s])};try{let o=r.route[e];if(a)if(o){let e,[t]=await Promise.all([d(o).catch(t=>{e=t}),a]);if(void 0!==e)throw e;s=t}else if(await a,o=r.route[e])s=await d(o);else{if("action"!==e)return{type:n.data,result:void 0};let a=new URL(t.url),o=a.pathname+a.search;throw eL(405,{method:t.method,pathname:o,routeId:r.route.id})}else if(o)s=await d(o);else{let e=new URL(t.url),r=e.pathname+e.search;throw eL(404,{pathname:r})}h(void 0!==s.result,"You defined "+("action"===e?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `")+e+"` function. Please return a value or `null`.")}catch(e){return{type:n.error,result:e}}finally{l&&t.signal.removeEventListener("abort",l)}return s}async function eg(e){var t,r,a,o,i,s,l,d,c;let{result:u,type:h}=e;if(eO(u)){let e;try{let t=u.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==u.body?null:await u.json():await u.text()}catch(e){return{type:n.error,error:e}}return h===n.error?{type:n.error,error:new K(u.status,u.statusText,e),statusCode:u.status,headers:u.headers}:{type:n.data,data:e,statusCode:u.status,headers:u.headers}}if(h===n.error)return eT(u)?u.data instanceof Error?{type:n.error,error:u.data,statusCode:null==(a=u.init)?void 0:a.status,headers:null!=(o=u.init)&&o.headers?new Headers(u.init.headers):void 0}:{type:n.error,error:new K((null==(t=u.init)?void 0:t.status)||500,void 0,u.data),statusCode:V(u)?u.status:void 0,headers:null!=(r=u.init)&&r.headers?new Headers(u.init.headers):void 0}:{type:n.error,error:u,statusCode:V(u)?u.status:void 0};return(c=u)&&"object"==typeof c&&"object"==typeof c.data&&"function"==typeof c.subscribe&&"function"==typeof c.cancel&&"function"==typeof c.resolveData?{type:n.deferred,deferredData:u,statusCode:null==(i=u.init)?void 0:i.status,headers:(null==(s=u.init)?void 0:s.headers)&&new Headers(u.init.headers)}:eT(u)?{type:n.data,data:u.data,statusCode:null==(l=u.init)?void 0:l.status,headers:null!=(d=u.init)&&d.headers?new Headers(u.init.headers):void 0}:{type:n.data,data:u}}function eb(e,t,r){if(er.test(e)){let a=new URL(e.startsWith("//")?t.protocol+e:e),n=null!=j(a.pathname,r);if(a.origin===t.origin&&n)return a.pathname+a.search+a.hash}return e}function ew(e,t,r,a){let n=e.createURL(eM(t)).toString(),o={signal:r};if(a&&eU(a.formMethod)){let{formMethod:e,formEncType:t}=a;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(a.json)):"text/plain"===t?o.body=a.text:"application/x-www-form-urlencoded"===t&&a.formData?o.body=eS(a.formData):o.body=a.formData}return new Request(n,o)}function eS(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,"string"==typeof a?a:a.name);return t}function eE(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function eD(e,t,r,a,n,o,i){let l,d,c,u,f,p,{loaderData:m,errors:v}=(d={},c=null,u=!1,f={},p=a&&eC(a[1])?a[1].error:void 0,t.forEach(e=>{if(!(e.route.id in r))return;let a=e.route.id,n=r[a];if(h(!e_(n),"Cannot handle redirect results in processLoaderData"),eC(n)){let e=n.error;void 0!==p&&(e=p,p=void 0),c=c||{},1;{let r=ex(t,a);null==c[r.route.id]&&(c[r.route.id]=e)}d[a]=void 0,u||(u=!0,l=V(n.error)?n.error.status:500),n.headers&&(f[a]=n.headers)}else eA(n)?(i.set(a,n.deferredData),d[a]=n.deferredData.data,null==n.statusCode||200===n.statusCode||u||(l=n.statusCode)):(d[a]=n.data,n.statusCode&&200!==n.statusCode&&!u&&(l=n.statusCode)),n.headers&&(f[a]=n.headers)}),void 0!==p&&a&&(c={[a[0]]:p},d[a[0]]=void 0),{loaderData:d,errors:c,statusCode:l||200,loaderHeaders:f});return n.forEach(t=>{let{key:r,match:a,controller:n}=t,i=o[r];if(h(i,"Did not find corresponding fetcher result"),!n||!n.signal.aborted)if(eC(i)){let t=ex(e.matches,null==a?void 0:a.route.id);v&&v[t.route.id]||(v=s({},v,{[t.route.id]:i.error})),e.fetchers.delete(r)}else if(e_(i))h(!1,"Unhandled fetcher revalidation redirect");else if(eA(i))h(!1,"Unhandled fetcher deferred data");else{let t=eq(i.data);e.fetchers.set(r,t)}}),{loaderData:m,errors:v}}function eR(e,t,r,a){let n=s({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(n[r]=t[r]):void 0!==e[r]&&o.route.loader&&(n[r]=e[r]),a&&a.hasOwnProperty(r))break}return n}function eP(e){return e?eC(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ex(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function ek(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eL(e,t){let{pathname:r,routeId:a,method:n,type:o,message:i}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",n&&r&&a?l="You made a "+n+' request to "'+r+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+a+'" does not match URL "'+r+'"'):404===e?(s="Not Found",l='No route matches URL "'+r+'"'):405===e&&(s="Method Not Allowed",n&&r&&a?l="You made a "+n.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':n&&(l='Invalid request method "'+n.toUpperCase()+'"')),new K(e||500,s,Error(l),!0)}function ej(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,a]=t[e];if(e_(a))return{key:r,result:a}}}function eM(e){let t="string"==typeof e?y(e):e;return v(s({},t,{hash:""}))}function eA(e){return e.type===n.deferred}function eC(e){return e.type===n.error}function e_(e){return(e&&e.type)===n.redirect}function eT(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function eO(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function eU(e){return Y.has(e.toLowerCase())}async function ez(e,t,r,a,n){let o=Object.entries(t);for(let i=0;i<o.length;i++){let[s,l]=o[i],d=e.find(e=>(null==e?void 0:e.route.id)===s);if(!d)continue;let c=a.find(e=>e.route.id===d.route.id),u=null!=c&&!eu(c,d)&&(n&&n[d.route.id])!==void 0;eA(l)&&u&&await eI(l,r,!1).then(e=>{e&&(t[s]=e)})}}async function eH(e,t,r){for(let a=0;a<r.length;a++){let{key:n,routeId:o,controller:i}=r[a],s=t[n];e.find(e=>(null==e?void 0:e.route.id)===o)&&eA(s)&&(h(i,"Expected an AbortController for revalidating fetcher deferred result"),await eI(s,i.signal,!0).then(e=>{e&&(t[n]=e)}))}}async function eI(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:n.data,data:e.deferredData.unwrappedData}}catch(e){return{type:n.error,error:e}}return{type:n.data,data:e.deferredData.data}}}function eW(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function e$(e,t){let r="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&eW(r||""))return e[e.length-1];let a=C(e);return a[a.length-1]}function eB(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:i}=e;if(t&&r&&a){if(null!=n)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};else if(null!=o)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}}}function eF(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eN(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function eq(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}Symbol("deferred")}}]);
1
+ "use strict";(globalThis.webpackChunk_kenyaemr_esm_version_app=globalThis.webpackChunk_kenyaemr_esm_version_app||[]).push([["5086"],{21613(e,t,r){var a,n,o,i;function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}r.d(t,{AO:()=>v,B6:()=>k,G3:()=>en,Gh:()=>U,HC:()=>J,HS:()=>I,HW:()=>ea,Oi:()=>h,Pq:()=>B,RO:()=>L,Rr:()=>y,Sk:()=>V,TM:()=>u,V2:()=>K,VV:()=>Y,aE:()=>el,o1:()=>A,pX:()=>X,pb:()=>j,rc:()=>a,ro:()=>R,sC:()=>d,tH:()=>F,tW:()=>x,ue:()=>S,v6:()=>q,yD:()=>O,zR:()=>c}),(o=a||(a={})).Pop="POP",o.Push="PUSH",o.Replace="REPLACE";let l="popstate";function d(e){let t;void 0===e&&(e={});let{initialEntries:r=["/"],initialIndex:n,v5Compat:o=!1}=e;t=r.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let i=d(null==n?t.length-1:n),s=a.Pop,l=null;function d(e){return Math.min(Math.max(e,0),t.length-1)}function c(e,r,a){void 0===r&&(r=null);let n=m(t?t[i].pathname:"/",e,r,a);return f("/"===n.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),n}function u(e){return"string"==typeof e?e:v(e)}return{get index(){return i},get action(){return s},get location(){return t[i]},createHref:u,createURL:e=>new URL(u(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?y(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){s=a.Push;let n=c(e,r);i+=1,t.splice(i,t.length,n),o&&l&&l({action:s,location:n,delta:1})},replace(e,r){s=a.Replace;let n=c(e,r);t[i]=n,o&&l&&l({action:s,location:n,delta:0})},go(e){s=a.Pop;let r=d(i+e),n=t[r];i=r,l&&l({action:s,location:n,delta:e})},listen:e=>(l=e,()=>{l=null})}}function c(e){return void 0===e&&(e={}),g(function(e,t){let{pathname:r,search:a,hash:n}=e.location;return m("",{pathname:r,search:a,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:v(t)},null,e)}function u(e){return void 0===e&&(e={}),g(function(e,t){let{pathname:r="/",search:a="",hash:n=""}=y(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),m("",{pathname:r,search:a,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),a="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");a=-1===r?t:t.slice(0,r)}return a+"#"+("string"==typeof t?t:v(t))},function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function h(e,t){if(!1===e||null==e)throw Error(t)}function f(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,r,a){return void 0===r&&(r=null),s({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?y(t):t,{state:r,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function v(e){let{pathname:t="/",search:r="",hash:a=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function g(e,t,r,n){void 0===n&&(n={});let{window:o=document.defaultView,v5Compat:i=!1}=n,d=o.history,c=a.Pop,u=null,f=y();function y(){return(d.state||{idx:null}).idx}function g(){c=a.Pop;let e=y(),t=null==e?null:e-f;f=e,u&&u({action:c,location:w.location,delta:t})}function b(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:v(e);return h(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==f&&(f=0,d.replaceState(s({},d.state,{idx:f}),""));let w={get action(){return c},get location(){return e(o,d)},listen(e){if(u)throw Error("A history only accepts one active listener");return o.addEventListener(l,g),u=e,()=>{o.removeEventListener(l,g),u=null}},createHref:e=>t(o,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=a.Push;let n=m(w.location,e,t);r&&r(n,e);let s=p(n,f=y()+1),l=w.createHref(n);try{d.pushState(s,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(l)}i&&u&&u({action:c,location:w.location,delta:1})},replace:function(e,t){c=a.Replace;let n=m(w.location,e,t);r&&r(n,e);let o=p(n,f=y()),s=w.createHref(n);d.replaceState(o,"",s),i&&u&&u({action:c,location:w.location,delta:0})},go:e=>d.go(e)};return w}(i=n||(n={})).data="data",i.deferred="deferred",i.redirect="redirect",i.error="error";let b=new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,r,a){return void 0===r&&(r=[]),void 0===a&&(a={}),e.map((e,n)=>{let o=[...r,String(n)],i="string"==typeof e.id?e.id:o.join("-");if(h(!0!==e.index||!e.children,"Cannot specify children on an index route"),h(!a[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){let r=s({},e,t(e),{id:i});return a[i]=r,r}{let r=s({},e,t(e),{id:i,children:void 0});return a[i]=r,e.children&&(r.children=w(e.children,t,o,a)),r}})}function S(e,t,r){return void 0===r&&(r="/"),E(e,t,r,!1)}function E(e,t,r,a){let n=j(("string"==typeof t?y(t):t).pathname||"/",r);if(null==n)return null;let o=function e(t,r,a,n){void 0===r&&(r=[]),void 0===a&&(a=[]),void 0===n&&(n="");let o=(t,o,i)=>{var s,l;let d,c,u={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};u.relativePath.startsWith("/")&&(h(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),u.relativePath=u.relativePath.slice(n.length));let f=I([n,u.relativePath]),p=a.concat(u);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+f+'".'),e(t.children,r,p,f)),(null!=t.path||t.index)&&r.push({path:f,score:(s=f,l=t.index,c=(d=s.split("/")).length,d.some(P)&&(c+=-2),l&&(c+=2),d.filter(e=>!P(e)).reduce((e,t)=>e+(D.test(t)?3:""===t?1:10),c)),routesMeta:p})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[a,...n]=r,o=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];let s=e(n.join("/")),l=[];return l.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&l.push(...s),l.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);o.sort((e,t)=>{var r,a;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),a=t.routesMeta.map(e=>e.childrenIndex),r.length===a.length&&r.slice(0,-1).every((e,t)=>e===a[t])?r[r.length-1]-a[a.length-1]:0)});let i=null,s=L(n);for(let e=0;null==i&&e<o.length;++e)i=function(e,t,r){void 0===r&&(r=!1);let{routesMeta:a}=e,n={},o="/",i=[];for(let e=0;e<a.length;++e){let s=a[e],l=e===a.length-1,d="/"===o?t:t.slice(o.length)||"/",c=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},d),u=s.route;if(!c&&l&&r&&!a[a.length-1].route.index&&(c=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},d)),!c)return null;Object.assign(n,c.params),i.push({params:n,pathname:I([o,c.pathname]),pathnameBase:H(I([o,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(o=I([o,c.pathnameBase]))}return i}(o[e],s,a);return i}function R(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],handle:r.handle}}let D=/^:[\w-]+$/,P=e=>"*"===e;function x(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(f(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));let a=r.startsWith("/")?"/":"",n=e=>null==e?"":"string"==typeof e?e:String(e);return a+r.split(/\/+/).map((e,r,a)=>{if(r===a.length-1&&"*"===e)return n(t["*"]);let o=e.match(/^:([\w-]+)(\??)$/);if(o){let[,e,r]=o,a=t[e];return h("?"===r||null!=a,'Missing ":'+e+'" param'),n(a)}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function k(e,t){var r,a,n;let o,i;"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[s,l]=(r=e.path,a=e.caseSensitive,n=e.end,void 0===a&&(a=!1),void 0===n&&(n=!0),f("*"===r||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),o=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(o.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")),r.endsWith("*")?(o.push({paramName:"*"}),i+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==r&&"/"!==r&&(i+="(?:(?=\\/|$))"),[new RegExp(i,a?void 0:"i"),o]),d=t.match(s);if(!d)return null;let c=d[0],u=c.replace(/(.)\/+$/,"$1"),h=d.slice(1);return{params:l.reduce((e,t,r)=>{let{paramName:a,isOptional:n}=t;if("*"===a){let e=h[r]||"";u=c.slice(0,c.length-e.length).replace(/(.)\/+$/,"$1")}let o=h[r];return n&&!o?e[a]=void 0:e[a]=(o||"").replace(/%2F/g,"/"),e},{}),pathname:c,pathnameBase:u,pattern:e}}function L(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function j(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&"/"!==a?null:e.slice(r)||"/"}let M=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function A(e,t){let r;void 0===t&&(t="/");let{pathname:a,search:n="",hash:o=""}="string"==typeof e?y(e):e;if(a){let e;(e=a,M.test(e))?r=a:(a.includes("//")&&f(!1,"Pathnames cannot have embedded double slashes - normalizing "+a+" -> "+(a=z(a))),r=a.startsWith("/")?C(a.substring(1),"/"):C(a,t))}else r=t;return{pathname:r,search:W(n),hash:$(o)}}function C(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function _(e,t,r,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field [")+JSON.stringify(a)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function T(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function O(e,t){let r=T(e);return t?r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase):r.map(e=>e.pathnameBase)}function U(e,t,r,a){let n,o;void 0===a&&(a=!1),"string"==typeof e?n=y(e):(h(!(n=s({},e)).pathname||!n.pathname.includes("?"),_("?","pathname","search",n)),h(!n.pathname||!n.pathname.includes("#"),_("#","pathname","hash",n)),h(!n.search||!n.search.includes("#"),_("#","search","hash",n)));let i=""===e||""===n.pathname,l=i?"/":n.pathname;if(null==l)o=r;else{let e=t.length-1;if(!a&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;n.pathname=t.join("/")}o=e>=0?t[e]:"/"}let d=A(n,o),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&r.endsWith("/");return!d.pathname.endsWith("/")&&(c||u)&&(d.pathname+="/"),d}let z=e=>e.replace(/\/\/+/g,"/"),I=e=>z(e.join("/")),H=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),W=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",$=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",B=function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,a=new Headers(r.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),s({},r,{headers:a}))};class F extends Error{}class N{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],h(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise((e,t)=>r=t),this.controller=new AbortController;let a=()=>r(new F("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(e).reduce((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:this.trackPromise(r,a)})},{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(r,e,void 0,t),t=>this.onSettle(r,e,t));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,a){if(this.controller.signal.aborted&&r instanceof F)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===a){let r=Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===a?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>a}),this.emit(!1,t),a)}emit(e,t){this.subscribers.forEach(r=>r(e,t))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t)),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise(t=>{this.subscribe(a=>{e.removeEventListener("abort",r),(a||this.done)&&t(a)})})}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return h(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:function(e){if(!(e instanceof Promise&&!0===e._tracked))return e;if(e._error)throw e._error;return e._data}(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}let q=function(e,t){return void 0===t&&(t={}),new N(e,"number"==typeof t?{status:t}:t)},K=function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",e),new Response(null,s({},r,{headers:a}))},V=(e,t)=>{let r=K(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},J=(e,t)=>{let r=K(e,t);return r.headers.set("X-Remix-Replace","true"),r};class Y{constructor(e,t,r,a){void 0===a&&(a=!1),this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function X(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}let G=["post","put","patch","delete"],Q=new Set(G),Z=new Set(["get",...G]),ee=new Set([301,302,303,307,308]),et=new Set([307,308]),er={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ea={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},en={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},eo=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ei=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),es="remix-router-transitions";function el(e){let t,r,o,i,l,d,c=e.window?e.window:"u">typeof window?window:void 0,u=void 0!==c&&void 0!==c.document&&void 0!==c.document.createElement,p=!u;if(h(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let r=e.detectErrorBoundary;t=e=>({hasErrorBoundary:r(e)})}else t=ei;let v={},y=w(e.routes,t,void 0,v),g=e.basename||"/",b=e.dataStrategy||eg,D=e.patchRoutesOnNavigation,P=s({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),x=null,k=new Set,L=null,M=null,A=null,C=null!=e.hydrationData,_=S(y,e.history.location,g),T=!1,O=null;if(null==_&&!D){let t=eA(404,{pathname:e.history.location.pathname}),{matches:r,route:a}=eM(y);_=r,O={[a.id]:t}}if(_&&!e.hydrationData&&to(_,y,e.history.location.pathname).active&&(_=null),_)if(_.some(e=>e.route.lazy))o=!1;else if(_.some(e=>e.route.loader))if(P.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=_.findIndex(e=>void 0!==r[e.route.id]);o=_.slice(0,e+1).every(e=>!ef(e.route,t,r))}else o=_.every(e=>!ef(e.route,t,r))}else o=null!=e.hydrationData;else o=!0;else if(o=!1,_=[],P.v7_partialHydration){let t=to(null,y,e.history.location.pathname);t.active&&t.matches&&(T=!0,_=t.matches)}let U={historyAction:e.history.action,location:e.history.location,matches:_,initialized:o,navigation:er,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||O,fetchers:new Map,blockers:new Map},z=a.Pop,I=!1,H=!1,W=new Map,$=null,B=!1,F=!1,N=[],q=new Set,K=new Map,V=0,J=-1,Y=new Map,G=new Set,Q=new Map,Z=new Map,el=new Set,eu=new Map,ep=new Map;function em(e,t){void 0===t&&(t={}),U=s({},U,e);let r=[],a=[];P.v7_fetcherPersist&&U.fetchers.forEach((e,t)=>{"idle"===e.state&&(el.has(t)?a.push(t):r.push(t))}),el.forEach(e=>{U.fetchers.has(e)||K.has(e)||a.push(e)}),[...k].forEach(e=>e(U,{deletedFetchers:a,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),P.v7_fetcherPersist?(r.forEach(e=>U.fetchers.delete(e)),a.forEach(e=>e7(e))):a.forEach(e=>el.delete(e))}function ey(t,n,o){var i,l;let d,c,{flushSync:u}=void 0===o?{}:o,h=null!=U.actionData&&null!=U.navigation.formMethod&&eH(U.navigation.formMethod)&&"loading"===U.navigation.state&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;d=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:h?U.actionData:null;let f=n.loaderData?ek(U.loaderData,n.loaderData,n.matches||[],n.errors):U.loaderData,p=U.blockers;p.size>0&&(p=new Map(p)).forEach((e,t)=>p.set(t,en));let m=!0===I||null!=U.navigation.formMethod&&eH(U.navigation.formMethod)&&(null==(l=t.state)?void 0:l._isRedirect)!==!0;if(r&&(y=r,r=void 0),B||z===a.Pop||(z===a.Push?e.history.push(t,t.state):z===a.Replace&&e.history.replace(t,t.state)),z===a.Pop){let e=W.get(U.location.pathname);e&&e.has(t.pathname)?c={currentLocation:U.location,nextLocation:t}:W.has(t.pathname)&&(c={currentLocation:t,nextLocation:U.location})}else if(H){let e=W.get(U.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),W.set(U.location.pathname,e)),c={currentLocation:U.location,nextLocation:t}}em(s({},n,{actionData:d,loaderData:f,historyAction:z,location:t,initialized:!0,navigation:er,revalidation:"idle",restoreScrollPosition:tn(t,n.matches||U.matches),preventScrollReset:m,blockers:p}),{viewTransitionOpts:c,flushSync:!0===u}),z=a.Pop,I=!1,H=!1,B=!1,F=!1,N=[]}async function ew(t,r){if("number"==typeof t)return void e.history.go(t);let n=ed(U.location,U.matches,g,P.v7_prependBasename,t,P.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:o,submission:i,error:l}=ec(P.v7_normalizeFormMethod,!1,n,r),d=U.location,c=m(U.location,o,r&&r.state);c=s({},c,e.history.encodeLocation(c));let u=r&&null!=r.replace?r.replace:void 0,h=a.Push;!0===u?h=a.Replace:!1===u||null!=i&&eH(i.formMethod)&&i.formAction===U.location.pathname+U.location.search&&(h=a.Replace);let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,p=!0===(r&&r.flushSync),v=te({currentLocation:d,nextLocation:c,historyAction:h});return v?void e9(v,{state:"blocked",location:c,proceed(){e9(v,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),ew(t,r)},reset(){let e=new Map(U.blockers);e.set(v,en),em({blockers:e})}}):await eD(h,c,{submission:i,pendingError:l,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:p})}async function eD(t,a,o){var i,d,c,u;let h;l&&l.abort(),l=null,z=t,B=!0===(o&&o.startUninterruptedRevalidation),i=U.location,d=U.matches,L&&A&&(L[ta(i,d)]=A()),I=!0===(o&&o.preventScrollReset),H=!0===(o&&o.enableViewTransition);let f=r||y,p=o&&o.overrideNavigation,m=null!=o&&o.initialHydration&&U.matches&&U.matches.length>0&&!T?U.matches:S(f,a,g),v=!0===(o&&o.flushSync);if(m&&U.initialized&&!F&&(c=U.location,u=a,c.pathname===u.pathname&&c.search===u.search&&(""===c.hash?""!==u.hash:c.hash===u.hash||""!==u.hash||!1))&&!(o&&o.submission&&eH(o.submission.formMethod)))return void ey(a,{matches:m},{flushSync:v});let b=to(m,f,a.pathname);if(b.active&&b.matches&&(m=b.matches),!m){let{error:e,notFoundMatches:t,route:r}=tt(a.pathname);ey(a,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:v});return}l=new AbortController;let w=eR(e.history,a,l.signal,o&&o.submission);if(o&&o.pendingError)h=[ej(m).route.id,{type:n.error,error:o.pendingError}];else if(o&&o.submission&&eH(o.submission.formMethod)){let t=await eP(w,a,o.submission,m,b.active,{replace:o.replace,flushSync:v});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(eO(r)&&X(r.error)&&404===r.error.status){l=null,ey(a,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}m=t.matches||m,h=t.pendingActionResult,p=eK(a,o.submission),v=!1,b.active=!1,w=eR(e.history,w.url,w.signal)}let{shortCircuited:E,matches:R,loaderData:D,errors:P}=await e_(w,a,m,b.active,p,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,v,h);E||(l=null,ey(a,s({matches:R||m},eL(h),{loaderData:D,errors:P})))}async function eP(t,r,o,i,s,l){var d;let c;if(void 0===l&&(l={}),eZ(),em({navigation:{state:"submitting",location:r,formMethod:(d=o).formMethod,formAction:d.formAction,formEncType:d.formEncType,formData:d.formData,json:d.json,text:d.text}},{flushSync:!0===l.flushSync}),s){let e=await ti(i,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=ej(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:n.error,error:e.error}]}}if(e.matches)i=e.matches;else{let{notFoundMatches:e,error:t,route:a}=tt(r.pathname);return{matches:e,pendingActionResult:[a.id,{type:n.error,error:t}]}}}let u=eN(i,r);if(u.route.action||u.route.lazy){if(c=(await eG("action",U,t,[u],i,null))[u.route.id],t.signal.aborted)return{shortCircuited:!0}}else c={type:n.error,error:eA(405,{method:t.method,pathname:r.pathname,routeId:u.route.id})};if(eU(c)){let r;return r=l&&null!=l.replace?l.replace:eE(c.response.headers.get("Location"),new URL(t.url),g,e.history)===U.location.pathname+U.location.search,await eX(t,c,!0,{submission:o,replace:r}),{shortCircuited:!0}}if(eT(c))throw eA(400,{type:"defer-action"});if(eO(c)){let e=ej(i,u.route.id);return!0!==(l&&l.replace)&&(z=a.Push),{matches:i,pendingActionResult:[e.route.id,c]}}return{matches:i,pendingActionResult:[u.route.id,c]}}async function e_(t,a,n,o,i,d,c,u,h,f,p){let m=i||eK(a,d),v=d||c||eq(m),b=!B&&(!P.v7_partialHydration||!h);if(o){if(b){let e=ez(p);em(s({navigation:m},void 0!==e?{actionData:e}:{}),{flushSync:f})}let e=await ti(n,a.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=ej(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)n=e.matches;else{let{error:e,notFoundMatches:t,route:r}=tt(a.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let w=r||y,[S,E]=eh(e.history,U,n,v,a,P.v7_partialHydration&&!0===h,P.v7_skipActionErrorRevalidation,F,N,q,el,Q,G,w,g,p);if(tr(e=>!(n&&n.some(t=>t.route.id===e))||S&&S.some(t=>t.route.id===e)),J=++V,0===S.length&&0===E.length){let e=e5();return ey(a,s({matches:n,loaderData:{},errors:p&&eO(p[1])?{[p[0]]:p[1].error}:null},eL(p),e?{fetchers:new Map(U.fetchers)}:{}),{flushSync:f}),{shortCircuited:!0}}if(b){let e={};if(!o){e.navigation=m;let t=ez(p);void 0!==t&&(e.actionData=t)}E.length>0&&(E.forEach(e=>{let t=U.fetchers.get(e.key),r=eV(void 0,t?t.data:void 0);U.fetchers.set(e.key,r)}),e.fetchers=new Map(U.fetchers)),em(e,{flushSync:f})}E.forEach(e=>{e3(e.key),e.controller&&K.set(e.key,e.controller)});let R=()=>E.forEach(e=>e3(e.key));l&&l.signal.addEventListener("abort",R);let{loaderResults:D,fetcherResults:x}=await eQ(U,n,S,E,t);if(t.signal.aborted)return{shortCircuited:!0};l&&l.signal.removeEventListener("abort",R),E.forEach(e=>K.delete(e.key));let k=eC(D);if(k)return await eX(t,k.result,!0,{replace:u}),{shortCircuited:!0};if(k=eC(x))return G.add(k.key),await eX(t,k.result,!0,{replace:u}),{shortCircuited:!0};let{loaderData:L,errors:j}=ex(U,n,D,p,E,x,eu);eu.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&eu.delete(t)})}),P.v7_partialHydration&&h&&U.errors&&(j=s({},U.errors,j));let M=e5(),A=e6(J),C=M||A||E.length>0;return s({matches:n,loaderData:L,errors:j},C?{fetchers:new Map(U.fetchers)}:{})}function ez(e){if(e&&!eO(e[1]))return{[e[0]]:e[1].data};if(U.actionData)if(0===Object.keys(U.actionData).length)return null;else return U.actionData}async function eF(t,a,n,o,i,s,d,c,u){var f,p;function m(e){if(!e.route.action&&!e.route.lazy){let e=eA(405,{method:u.formMethod,pathname:n,routeId:a});return e1(t,a,e,{flushSync:d}),!0}return!1}if(eZ(),Q.delete(t),!s&&m(o))return;let v=U.fetchers.get(t);e0(t,(f=u,p=v,{state:"submitting",formMethod:f.formMethod,formAction:f.formAction,formEncType:f.formEncType,formData:f.formData,json:f.json,text:f.text,data:p?p.data:void 0}),{flushSync:d});let b=new AbortController,w=eR(e.history,n,b.signal,u);if(s){let e=await ti(i,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,a,e.error,{flushSync:d});if(!e.matches)return void e1(t,a,eA(404,{pathname:n}),{flushSync:d});if(m(o=eN(i=e.matches,n)))return}K.set(t,b);let E=V,R=(await eG("action",U,w,[o],i,t))[o.route.id];if(w.signal.aborted){K.get(t)===b&&K.delete(t);return}if(P.v7_fetcherPersist&&el.has(t)){if(eU(R)||eO(R))return void e0(t,eJ(void 0))}else{if(eU(R))return(K.delete(t),J>E)?void e0(t,eJ(void 0)):(G.add(t),e0(t,eV(u)),eX(w,R,!1,{fetcherSubmission:u,preventScrollReset:c}));if(eO(R))return void e1(t,a,R.error)}if(eT(R))throw eA(400,{type:"defer-action"});let D=U.navigation.location||U.location,x=eR(e.history,D,b.signal),k=r||y,L="idle"!==U.navigation.state?S(k,U.navigation.location,g):U.matches;h(L,"Didn't find any matches after fetcher action");let j=++V;Y.set(t,j);let M=eV(u,R.data);U.fetchers.set(t,M);let[A,C]=eh(e.history,U,L,u,D,!1,P.v7_skipActionErrorRevalidation,F,N,q,el,Q,G,k,g,[o.route.id,R]);C.filter(e=>e.key!==t).forEach(e=>{let t=e.key,r=U.fetchers.get(t),a=eV(void 0,r?r.data:void 0);U.fetchers.set(t,a),e3(t),e.controller&&K.set(t,e.controller)}),em({fetchers:new Map(U.fetchers)});let _=()=>C.forEach(e=>e3(e.key));b.signal.addEventListener("abort",_);let{loaderResults:T,fetcherResults:O}=await eQ(U,L,A,C,x);if(b.signal.aborted)return;b.signal.removeEventListener("abort",_),Y.delete(t),K.delete(t),C.forEach(e=>K.delete(e.key));let I=eC(T);if(I)return eX(x,I.result,!1,{preventScrollReset:c});if(I=eC(O))return G.add(I.key),eX(x,I.result,!1,{preventScrollReset:c});let{loaderData:H,errors:W}=ex(U,L,T,void 0,C,O,eu);if(U.fetchers.has(t)){let e=eJ(R.data);U.fetchers.set(t,e)}e6(j),"loading"===U.navigation.state&&j>J?(h(z,"Expected pending action"),l&&l.abort(),ey(U.navigation.location,{matches:L,loaderData:H,errors:W,fetchers:new Map(U.fetchers)})):(em({errors:W,loaderData:ek(U.loaderData,H,L,W),fetchers:new Map(U.fetchers)}),F=!1)}async function eY(t,r,a,n,o,i,s,l,d){let c=U.fetchers.get(t);e0(t,eV(d,c?c.data:void 0),{flushSync:s});let u=new AbortController,f=eR(e.history,a,u.signal);if(i){let e=await ti(o,new URL(f.url).pathname,f.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,r,e.error,{flushSync:s});if(!e.matches)return void e1(t,r,eA(404,{pathname:a}),{flushSync:s});n=eN(o=e.matches,a)}K.set(t,u);let p=V,m=(await eG("loader",U,f,[n],o,t))[n.route.id];if(eT(m)&&(m=await eB(m,f.signal,!0)||m),K.get(t)===u&&K.delete(t),!f.signal.aborted){if(el.has(t))return void e0(t,eJ(void 0));if(eU(m))if(J>p)return void e0(t,eJ(void 0));else{G.add(t),await eX(f,m,!1,{preventScrollReset:l});return}if(eO(m))return void e1(t,r,m.error);h(!eT(m),"Unhandled fetcher deferred data"),e0(t,eJ(m.data))}}async function eX(t,r,n,o){let{submission:i,fetcherSubmission:d,preventScrollReset:f,replace:p}=void 0===o?{}:o;r.response.headers.has("X-Remix-Revalidate")&&(F=!0);let v=r.response.headers.get("Location");h(v,"Expected a Location header on the redirect Response"),v=eE(v,new URL(t.url),g,e.history);let y=m(U.location,v,{_isRedirect:!0});if(u){let t=!1;if(r.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(eo.test(v)){let r=e.history.createURL(v);t=r.origin!==c.location.origin||null==j(r.pathname,g)}if(t)return void(p?c.location.replace(v):c.location.assign(v))}l=null;let b=!0===p||r.response.headers.has("X-Remix-Replace")?a.Replace:a.Push,{formMethod:w,formAction:S,formEncType:E}=U.navigation;!i&&!d&&w&&S&&E&&(i=eq(U.navigation));let R=i||d;if(et.has(r.response.status)&&R&&eH(R.formMethod))await eD(b,y,{submission:s({},R,{formAction:v}),preventScrollReset:f||I,enableViewTransition:n?H:void 0});else{let e=eK(y,i);await eD(b,y,{overrideNavigation:e,fetcherSubmission:d,preventScrollReset:f||I,enableViewTransition:n?H:void 0})}}async function eG(e,r,a,o,i,s){let l,d={};try{l=await eb(b,e,r,a,o,i,s,v,t)}catch(e){return o.forEach(t=>{d[t.route.id]={type:n.error,error:e}}),d}for(let[e,t]of Object.entries(l)){var c;if(eI((c=t).result)&&ee.has(c.result.status)){let r=t.result;d[e]={type:n.redirect,response:function(e,t,r,a,n,o){let i=e.headers.get("Location");if(h(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!eo.test(i)){let s=a.slice(0,a.findIndex(e=>e.route.id===r)+1);i=ed(new URL(t.url),s,n,!0,i,o),e.headers.set("Location",i)}return e}(r,a,e,i,g,P.v7_relativeSplatPath)}}else d[e]=await eS(t)}return d}async function eQ(t,r,a,o,i){let s=t.matches,l=eG("loader",t,i,a,r,null),d=Promise.all(o.map(async r=>{if(!r.matches||!r.match||!r.controller)return Promise.resolve({[r.key]:{type:n.error,error:eA(404,{pathname:r.path})}});{let a=(await eG("loader",t,eR(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:a}}})),c=await l,u=(await d).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([eW(r,c,i.signal,s,t.loaderData),e$(r,u,o)]),{loaderResults:c,fetcherResults:u}}function eZ(){F=!0,N.push(...tr()),Q.forEach((e,t)=>{K.has(t)&&q.add(t),e3(t)})}function e0(e,t,r){void 0===r&&(r={}),U.fetchers.set(e,t),em({fetchers:new Map(U.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function e1(e,t,r,a){void 0===a&&(a={});let n=ej(U.matches,t);e7(e),em({errors:{[n.route.id]:r},fetchers:new Map(U.fetchers)},{flushSync:!0===(a&&a.flushSync)})}function e4(e){return Z.set(e,(Z.get(e)||0)+1),el.has(e)&&el.delete(e),U.fetchers.get(e)||ea}function e7(e){let t=U.fetchers.get(e);K.has(e)&&!(t&&"loading"===t.state&&Y.has(e))&&e3(e),Q.delete(e),Y.delete(e),G.delete(e),P.v7_fetcherPersist&&el.delete(e),q.delete(e),U.fetchers.delete(e)}function e3(e){let t=K.get(e);t&&(t.abort(),K.delete(e))}function e2(e){for(let t of e){let e=eJ(e4(t).data);U.fetchers.set(t,e)}}function e5(){let e=[],t=!1;for(let r of G){let a=U.fetchers.get(r);h(a,"Expected fetcher: "+r),"loading"===a.state&&(G.delete(r),e.push(r),t=!0)}return e2(e),t}function e6(e){let t=[];for(let[r,a]of Y)if(a<e){let e=U.fetchers.get(r);h(e,"Expected fetcher: "+r),"loading"===e.state&&(e3(r),Y.delete(r),t.push(r))}return e2(t),t.length>0}function e8(e){U.blockers.delete(e),ep.delete(e)}function e9(e,t){let r=U.blockers.get(e)||en;h("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let a=new Map(U.blockers);a.set(e,t),em({blockers:a})}function te(e){let{currentLocation:t,nextLocation:r,historyAction:a}=e;if(0===ep.size)return;ep.size>1&&f(!1,"A router only supports one blocker at a time");let n=Array.from(ep.entries()),[o,i]=n[n.length-1],s=U.blockers.get(o);if((!s||"proceeding"!==s.state)&&i({currentLocation:t,nextLocation:r,historyAction:a}))return o}function tt(e){let t=eA(404,{pathname:e}),{matches:a,route:n}=eM(r||y);return tr(),{notFoundMatches:a,route:n,error:t}}function tr(e){let t=[];return eu.forEach((r,a)=>{(!e||e(a))&&(r.cancel(),t.push(a),eu.delete(a))}),t}function ta(e,t){return M&&M(e,t.map(e=>R(e,U.loaderData)))||e.key}function tn(e,t){if(L){let r=L[ta(e,t)];if("number"==typeof r)return r}return null}function to(e,t,r){if(D){if(!e)return{active:!0,matches:E(t,r,g,!0)||[]};else if(Object.keys(e[0].params).length>0)return{active:!0,matches:E(t,r,g,!0)}}return{active:!1,matches:null}}async function ti(e,a,n,o){if(!D)return{type:"success",matches:e};let i=e;for(;;){let e=null==r,s=r||y,l=v;try{await D({signal:n,path:a,matches:i,fetcherKey:o,patch:(e,r)=>{n.aborted||ev(e,r,s,l,t)}})}catch(e){return{type:"error",error:e,partialMatches:i}}finally{e&&!n.aborted&&(y=[...y])}if(n.aborted)return{type:"aborted"};let d=S(s,a,g);if(d)return{type:"success",matches:d};let c=E(s,a,g,!0);if(!c||i.length===c.length&&i.every((e,t)=>e.route.id===c[t].route.id))return{type:"success",matches:null};i=c}}return i={get basename(){return g},get future(){return P},get state(){return U},get routes(){return y},get window(){return c},initialize:function(){if(x=e.history.listen(t=>{let{action:r,location:a,delta:n}=t;if(d){d(),d=void 0;return}f(0===ep.size||null!=n,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=te({currentLocation:U.location,nextLocation:a,historyAction:r});if(o&&null!=n){let t=new Promise(e=>{d=e});e.history.go(-1*n),e9(o,{state:"blocked",location:a,proceed(){e9(o,{state:"proceeding",proceed:void 0,reset:void 0,location:a}),t.then(()=>e.history.go(n))},reset(){let e=new Map(U.blockers);e.set(o,en),em({blockers:e})}});return}return eD(r,a)}),u){var t=c,r=W;try{let e=t.sessionStorage.getItem(es);if(e){let t=JSON.parse(e);for(let[e,a]of Object.entries(t||{}))a&&Array.isArray(a)&&r.set(e,new Set(a||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,a]of t)r[e]=[...a];try{e.sessionStorage.setItem(es,JSON.stringify(r))}catch(e){f(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}})(c,W);c.addEventListener("pagehide",e),$=()=>c.removeEventListener("pagehide",e)}return U.initialized||eD(a.Pop,U.location,{initialHydration:!0}),i},subscribe:function(e){return k.add(e),()=>k.delete(e)},enableScrollRestoration:function(e,t,r){if(L=e,A=t,M=r||null,!C&&U.navigation===er){C=!0;let e=tn(U.location,U.matches);null!=e&&em({restoreScrollPosition:e})}return()=>{L=null,A=null,M=null}},navigate:ew,fetch:function(e,t,a,n){if(p)throw Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");e3(e);let o=!0===(n&&n.flushSync),i=r||y,s=ed(U.location,U.matches,g,P.v7_prependBasename,a,P.v7_relativeSplatPath,t,null==n?void 0:n.relative),l=S(i,s,g),d=to(l,i,s);if(d.active&&d.matches&&(l=d.matches),!l)return void e1(e,t,eA(404,{pathname:s}),{flushSync:o});let{path:c,submission:u,error:h}=ec(P.v7_normalizeFormMethod,!0,s,n);if(h)return void e1(e,t,h,{flushSync:o});let f=eN(l,c),m=!0===(n&&n.preventScrollReset);u&&eH(u.formMethod)?eF(e,t,c,f,l,d.active,o,m,u):(Q.set(e,{routeId:t,path:c}),eY(e,t,c,f,l,d.active,o,m,u))},revalidate:function(){if(eZ(),em({revalidation:"loading"}),"submitting"!==U.navigation.state){if("idle"===U.navigation.state)return void eD(U.historyAction,U.location,{startUninterruptedRevalidation:!0});eD(z||U.historyAction,U.navigation.location,{overrideNavigation:U.navigation,enableViewTransition:!0===H})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:e4,deleteFetcher:function(e){let t=(Z.get(e)||0)-1;t<=0?(Z.delete(e),el.add(e),P.v7_fetcherPersist||e7(e)):Z.set(e,t),em({fetchers:new Map(U.fetchers)})},dispose:function(){x&&x(),$&&$(),k.clear(),l&&l.abort(),U.fetchers.forEach((e,t)=>e7(t)),U.blockers.forEach((e,t)=>e8(t))},getBlocker:function(e,t){let r=U.blockers.get(e)||en;return ep.get(e)!==t&&ep.set(e,t),r},deleteBlocker:e8,patchRoutes:function(e,a){let n=null==r;ev(e,a,r||y,v,t),n&&(y=[...y],em({}))},_internalFetchControllers:K,_internalActiveDeferreds:eu,_internalSetRoutes:function(e){r=w(e,t,void 0,v={})}}}function ed(e,t,r,a,n,o,i,s){let l,d;if(i){for(let e of(l=[],t))if(l.push(e),e.route.id===i){d=e;break}}else l=t,d=t[t.length-1];let c=U(n||".",O(l,o),j(e.pathname,r)||e.pathname,"path"===s);if(null==n&&(c.search=e.search,c.hash=e.hash),(null==n||""===n||"."===n)&&d){let e=eF(c.search);if(d.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();c.search=r?"?"+r:""}}return a&&"/"!==r&&(c.pathname="/"===c.pathname?r:I([r,c.pathname])),v(c)}function ec(e,t,r,a){var n;let o,i;if(!a||!(null!=a&&("formData"in a&&null!=a.formData||"body"in a&&void 0!==a.body)))return{path:r};if(a.formMethod&&(n=a.formMethod,!Z.has(n.toLowerCase())))return{path:r,error:eA(405,{method:a.formMethod})};let s=()=>({path:r,error:eA(400,{type:"invalid-body"})}),l=a.formMethod||"get",d=e?l.toUpperCase():l.toLowerCase(),c=e_(r);if(void 0!==a.body){if("text/plain"===a.formEncType){if(!eH(d))return s();let e="string"==typeof a.body?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((e,t)=>{let[r,a]=t;return""+e+r+"="+a+"\n"},""):String(a.body);return{path:r,submission:{formMethod:d,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:e}}}else if("application/json"===a.formEncType){if(!eH(d))return s();try{let e="string"==typeof a.body?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:d,formAction:c,formEncType:a.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(h("function"==typeof FormData,"FormData is not available in this environment"),a.formData)o=eD(a.formData),i=a.formData;else if(a.body instanceof FormData)o=eD(a.body),i=a.body;else if(a.body instanceof URLSearchParams)i=eP(o=a.body);else if(null==a.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(a.body),i=eP(o)}catch(e){return s()}let u={formMethod:d,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(eH(u.formMethod))return{path:r,submission:u};let f=y(r);return t&&f.search&&eF(f.search)&&o.append("index",""),f.search="?"+o,{path:v(f),submission:u}}function eu(e,t,r){void 0===r&&(r=!1);let a=e.findIndex(e=>e.route.id===t);return a>=0?e.slice(0,r?a+1:a):e}function eh(e,t,r,a,n,o,i,l,d,c,u,h,f,p,m,v){let y=v?eO(v[1])?v[1].error:v[1].data:void 0,g=e.createURL(t.location),b=e.createURL(n),w=r;o&&t.errors?w=eu(r,Object.keys(t.errors)[0],!0):v&&eO(v[1])&&(w=eu(r,v[0]));let E=v?v[1].statusCode:void 0,R=i&&E&&E>=400,D=w.filter((e,r)=>{var n,i,c;let u,h,{route:f}=e;if(f.lazy)return!0;if(null==f.loader)return!1;if(o)return ef(f,t.loaderData,t.errors);if(n=t.loaderData,i=t.matches[r],c=e,u=!i||c.route.id!==i.route.id,h=void 0===n[c.route.id],u||h||d.some(t=>t===e.route.id))return!0;let p=t.matches[r];return em(e,s({currentUrl:g,currentParams:p.params,nextUrl:b,nextParams:e.params},a,{actionResult:y,actionStatus:E,defaultShouldRevalidate:!R&&(l||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||ep(p,e))}))}),P=[];return h.forEach((e,n)=>{if(o||!r.some(t=>t.route.id===e.routeId)||u.has(n))return;let i=S(p,e.path,m);if(!i)return void P.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let d=t.fetchers.get(n),h=eN(i,e.path),v=!1;f.has(n)?v=!1:c.has(n)?(c.delete(n),v=!0):v=d&&"idle"!==d.state&&void 0===d.data?l:em(h,s({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},a,{actionResult:y,actionStatus:E,defaultShouldRevalidate:!R&&l})),v&&P.push({key:n,routeId:e.routeId,path:e.path,matches:i,match:h,controller:new AbortController})}),[D,P]}function ef(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let a=null!=t&&void 0!==t[e.id],n=null!=r&&void 0!==r[e.id];return(!!a||!n)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!a&&!n)}function ep(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function em(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function ev(e,t,r,a,n){var o;let i;if(e){let t=a[e];h(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),i=t.children}else i=r;let s=w(t.filter(e=>!i.some(t=>(function e(t,r){return"id"in t&&"id"in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,a)=>{var n;return null==(n=r.children)?void 0:n.some(r=>e(t,r))}))})(e,t))),n,[e||"_","patch",String((null==(o=i)?void 0:o.length)||"0")],a);i.push(...s)}async function ey(e,t,r){if(!e.lazy)return;let a=await e.lazy();if(!e.lazy)return;let n=r[e.id];h(n,"No route found in manifest");let o={};for(let e in a){let t=void 0!==n[e]&&"hasErrorBoundary"!==e;f(!t,'Route "'+n.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||b.has(e)||(o[e]=a[e])}Object.assign(n,o),Object.assign(n,s({},t(n),{lazy:void 0}))}async function eg(e){let{matches:t}=e,r=t.filter(e=>e.shouldLoad);return(await Promise.all(r.map(e=>e.resolve()))).reduce((e,t,a)=>Object.assign(e,{[r[a].route.id]:t}),{})}async function eb(e,t,r,a,o,i,l,d,c,u){let h=i.map(e=>e.route.lazy?ey(e.route,c,d):void 0),f=i.map((e,r)=>{let i=h[r],l=o.some(t=>t.route.id===e.route.id),d=async r=>(r&&"GET"===a.method&&(e.route.lazy||e.route.loader)&&(l=!0),l?ew(t,a,e,i,r,u):Promise.resolve({type:n.data,result:void 0}));return s({},e,{shouldLoad:l,resolve:d})}),p=await e({matches:f,request:a,params:i[0].params,fetcherKey:l,context:u});try{await Promise.all(h)}catch(e){}return p}async function ew(e,t,r,a,o,i){let s,l,d=a=>{let n,s=new Promise((e,t)=>n=t);l=()=>n(),t.signal.addEventListener("abort",l);let d=n=>"function"!=typeof a?Promise.reject(Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: ')+r.route.id+"]")):a({request:t,params:r.params,context:i},...void 0!==n?[n]:[]);return Promise.race([(async()=>{try{let e=await (o?o(e=>d(e)):d());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})(),s])};try{let o=r.route[e];if(a)if(o){let e,[t]=await Promise.all([d(o).catch(t=>{e=t}),a]);if(void 0!==e)throw e;s=t}else if(await a,o=r.route[e])s=await d(o);else{if("action"!==e)return{type:n.data,result:void 0};let a=new URL(t.url),o=a.pathname+a.search;throw eA(405,{method:t.method,pathname:o,routeId:r.route.id})}else if(o)s=await d(o);else{let e=new URL(t.url),r=e.pathname+e.search;throw eA(404,{pathname:r})}h(void 0!==s.result,"You defined "+("action"===e?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `")+e+"` function. Please return a value or `null`.")}catch(e){return{type:n.error,result:e}}finally{l&&t.signal.removeEventListener("abort",l)}return s}async function eS(e){var t,r,a,o,i,s,l,d,c;let{result:u,type:h}=e;if(eI(u)){let e;try{let t=u.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==u.body?null:await u.json():await u.text()}catch(e){return{type:n.error,error:e}}return h===n.error?{type:n.error,error:new Y(u.status,u.statusText,e),statusCode:u.status,headers:u.headers}:{type:n.data,data:e,statusCode:u.status,headers:u.headers}}if(h===n.error)return ez(u)?u.data instanceof Error?{type:n.error,error:u.data,statusCode:null==(a=u.init)?void 0:a.status,headers:null!=(o=u.init)&&o.headers?new Headers(u.init.headers):void 0}:{type:n.error,error:new Y((null==(t=u.init)?void 0:t.status)||500,void 0,u.data),statusCode:X(u)?u.status:void 0,headers:null!=(r=u.init)&&r.headers?new Headers(u.init.headers):void 0}:{type:n.error,error:u,statusCode:X(u)?u.status:void 0};return(c=u)&&"object"==typeof c&&"object"==typeof c.data&&"function"==typeof c.subscribe&&"function"==typeof c.cancel&&"function"==typeof c.resolveData?{type:n.deferred,deferredData:u,statusCode:null==(i=u.init)?void 0:i.status,headers:(null==(s=u.init)?void 0:s.headers)&&new Headers(u.init.headers)}:ez(u)?{type:n.data,data:u.data,statusCode:null==(l=u.init)?void 0:l.status,headers:null!=(d=u.init)&&d.headers?new Headers(u.init.headers):void 0}:{type:n.data,data:u}}function eE(e,t,r,a){let n=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(eo.test(e)){let a=new URL(e.startsWith("//")?t.protocol+e:e);if(n.includes(a.protocol))throw Error("Invalid redirect location");let o=null!=j(a.pathname,r);if(a.origin===t.origin&&o)return z(a.pathname)+a.search+a.hash}try{let t=a.createURL(e);if(n.includes(t.protocol))throw Error("Invalid redirect location")}catch(e){}return e}function eR(e,t,r,a){let n=e.createURL(e_(t)).toString(),o={signal:r};if(a&&eH(a.formMethod)){let{formMethod:e,formEncType:t}=a;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(a.json)):"text/plain"===t?o.body=a.text:"application/x-www-form-urlencoded"===t&&a.formData?o.body=eD(a.formData):o.body=a.formData}return new Request(n,o)}function eD(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,"string"==typeof a?a:a.name);return t}function eP(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function ex(e,t,r,a,n,o,i){let l,d,c,u,f,p,{loaderData:m,errors:v}=(d={},c=null,u=!1,f={},p=a&&eO(a[1])?a[1].error:void 0,t.forEach(e=>{if(!(e.route.id in r))return;let a=e.route.id,n=r[a];if(h(!eU(n),"Cannot handle redirect results in processLoaderData"),eO(n)){let e=n.error;void 0!==p&&(e=p,p=void 0),c=c||{},1;{let r=ej(t,a);null==c[r.route.id]&&(c[r.route.id]=e)}d[a]=void 0,u||(u=!0,l=X(n.error)?n.error.status:500),n.headers&&(f[a]=n.headers)}else eT(n)?(i.set(a,n.deferredData),d[a]=n.deferredData.data,null==n.statusCode||200===n.statusCode||u||(l=n.statusCode)):(d[a]=n.data,n.statusCode&&200!==n.statusCode&&!u&&(l=n.statusCode)),n.headers&&(f[a]=n.headers)}),void 0!==p&&a&&(c={[a[0]]:p},d[a[0]]=void 0),{loaderData:d,errors:c,statusCode:l||200,loaderHeaders:f});return n.forEach(t=>{let{key:r,match:a,controller:n}=t,i=o[r];if(h(i,"Did not find corresponding fetcher result"),!n||!n.signal.aborted)if(eO(i)){let t=ej(e.matches,null==a?void 0:a.route.id);v&&v[t.route.id]||(v=s({},v,{[t.route.id]:i.error})),e.fetchers.delete(r)}else if(eU(i))h(!1,"Unhandled fetcher revalidation redirect");else if(eT(i))h(!1,"Unhandled fetcher deferred data");else{let t=eJ(i.data);e.fetchers.set(r,t)}}),{loaderData:m,errors:v}}function ek(e,t,r,a){let n=s({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(n[r]=t[r]):void 0!==e[r]&&o.route.loader&&(n[r]=e[r]),a&&a.hasOwnProperty(r))break}return n}function eL(e){return e?eO(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ej(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function eM(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eA(e,t){let{pathname:r,routeId:a,method:n,type:o,message:i}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",n&&r&&a?l="You made a "+n+' request to "'+r+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+a+'" does not match URL "'+r+'"'):404===e?(s="Not Found",l='No route matches URL "'+r+'"'):405===e&&(s="Method Not Allowed",n&&r&&a?l="You made a "+n.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':n&&(l='Invalid request method "'+n.toUpperCase()+'"')),new Y(e||500,s,Error(l),!0)}function eC(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,a]=t[e];if(eU(a))return{key:r,result:a}}}function e_(e){let t="string"==typeof e?y(e):e;return v(s({},t,{hash:""}))}function eT(e){return e.type===n.deferred}function eO(e){return e.type===n.error}function eU(e){return(e&&e.type)===n.redirect}function ez(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function eI(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function eH(e){return Q.has(e.toLowerCase())}async function eW(e,t,r,a,n){let o=Object.entries(t);for(let i=0;i<o.length;i++){let[s,l]=o[i],d=e.find(e=>(null==e?void 0:e.route.id)===s);if(!d)continue;let c=a.find(e=>e.route.id===d.route.id),u=null!=c&&!ep(c,d)&&(n&&n[d.route.id])!==void 0;eT(l)&&u&&await eB(l,r,!1).then(e=>{e&&(t[s]=e)})}}async function e$(e,t,r){for(let a=0;a<r.length;a++){let{key:n,routeId:o,controller:i}=r[a],s=t[n];e.find(e=>(null==e?void 0:e.route.id)===o)&&eT(s)&&(h(i,"Expected an AbortController for revalidating fetcher deferred result"),await eB(s,i.signal,!0).then(e=>{e&&(t[n]=e)}))}}async function eB(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:n.data,data:e.deferredData.unwrappedData}}catch(e){return{type:n.error,error:e}}return{type:n.data,data:e.deferredData.data}}}function eF(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eN(e,t){let r="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&eF(r||""))return e[e.length-1];let a=T(e);return a[a.length-1]}function eq(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:i}=e;if(t&&r&&a){if(null!=n)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};else if(null!=o)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}}}function eK(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eV(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function eJ(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}Symbol("deferred")}}]);