@lorepack/cli 0.0.0-stage → 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/commands/activate.d.ts +20 -0
  3. package/dist/commands/activate.d.ts.map +1 -0
  4. package/dist/commands/activate.js +171 -0
  5. package/dist/commands/activate.js.map +1 -0
  6. package/dist/commands/build.d.ts +3 -0
  7. package/dist/commands/build.d.ts.map +1 -0
  8. package/dist/commands/build.js +53 -0
  9. package/dist/commands/build.js.map +1 -0
  10. package/dist/commands/config.d.ts +14 -0
  11. package/dist/commands/config.d.ts.map +1 -0
  12. package/dist/commands/config.js +109 -0
  13. package/dist/commands/config.js.map +1 -0
  14. package/dist/commands/connect.d.ts +5 -0
  15. package/dist/commands/connect.d.ts.map +1 -0
  16. package/dist/commands/connect.js +196 -0
  17. package/dist/commands/connect.js.map +1 -0
  18. package/dist/commands/deploy.d.ts +14 -0
  19. package/dist/commands/deploy.d.ts.map +1 -0
  20. package/dist/commands/deploy.js +248 -0
  21. package/dist/commands/deploy.js.map +1 -0
  22. package/dist/commands/dev.d.ts +25 -0
  23. package/dist/commands/dev.d.ts.map +1 -0
  24. package/dist/commands/dev.js +227 -0
  25. package/dist/commands/dev.js.map +1 -0
  26. package/dist/commands/diff.d.ts +3 -0
  27. package/dist/commands/diff.d.ts.map +1 -0
  28. package/dist/commands/diff.js +75 -0
  29. package/dist/commands/diff.js.map +1 -0
  30. package/dist/commands/doctor.d.ts +14 -0
  31. package/dist/commands/doctor.d.ts.map +1 -0
  32. package/dist/commands/doctor.js +96 -0
  33. package/dist/commands/doctor.js.map +1 -0
  34. package/dist/commands/export.d.ts +3 -0
  35. package/dist/commands/export.d.ts.map +1 -0
  36. package/dist/commands/export.js +126 -0
  37. package/dist/commands/export.js.map +1 -0
  38. package/dist/commands/index.d.ts +8 -0
  39. package/dist/commands/index.d.ts.map +1 -0
  40. package/dist/commands/index.js +51 -0
  41. package/dist/commands/index.js.map +1 -0
  42. package/dist/commands/init.d.ts +3 -0
  43. package/dist/commands/init.d.ts.map +1 -0
  44. package/dist/commands/init.js +95 -0
  45. package/dist/commands/init.js.map +1 -0
  46. package/dist/commands/inspect.d.ts +15 -0
  47. package/dist/commands/inspect.d.ts.map +1 -0
  48. package/dist/commands/inspect.js +527 -0
  49. package/dist/commands/inspect.js.map +1 -0
  50. package/dist/commands/mcp.d.ts +12 -0
  51. package/dist/commands/mcp.d.ts.map +1 -0
  52. package/dist/commands/mcp.js +219 -0
  53. package/dist/commands/mcp.js.map +1 -0
  54. package/dist/commands/pack.d.ts +9 -0
  55. package/dist/commands/pack.d.ts.map +1 -0
  56. package/dist/commands/pack.js +57 -0
  57. package/dist/commands/pack.js.map +1 -0
  58. package/dist/commands/plan.d.ts +3 -0
  59. package/dist/commands/plan.d.ts.map +1 -0
  60. package/dist/commands/plan.js +44 -0
  61. package/dist/commands/plan.js.map +1 -0
  62. package/dist/commands/prune.d.ts +7 -0
  63. package/dist/commands/prune.d.ts.map +1 -0
  64. package/dist/commands/prune.js +341 -0
  65. package/dist/commands/prune.js.map +1 -0
  66. package/dist/commands/search.d.ts +3 -0
  67. package/dist/commands/search.d.ts.map +1 -0
  68. package/dist/commands/search.js +84 -0
  69. package/dist/commands/search.js.map +1 -0
  70. package/dist/commands/serve.d.ts +20 -0
  71. package/dist/commands/serve.d.ts.map +1 -0
  72. package/dist/commands/serve.js +66 -0
  73. package/dist/commands/serve.js.map +1 -0
  74. package/dist/commands/status.d.ts +3 -0
  75. package/dist/commands/status.d.ts.map +1 -0
  76. package/dist/commands/status.js +27 -0
  77. package/dist/commands/status.js.map +1 -0
  78. package/dist/commands/target.d.ts +71 -0
  79. package/dist/commands/target.d.ts.map +1 -0
  80. package/dist/commands/target.js +945 -0
  81. package/dist/commands/target.js.map +1 -0
  82. package/dist/entry.d.ts +3 -0
  83. package/dist/entry.d.ts.map +1 -0
  84. package/dist/entry.js +19 -0
  85. package/dist/entry.js.map +1 -0
  86. package/dist/framework/context.d.ts +49 -0
  87. package/dist/framework/context.d.ts.map +1 -0
  88. package/dist/framework/context.js +47 -0
  89. package/dist/framework/context.js.map +1 -0
  90. package/dist/framework/exit.d.ts +36 -0
  91. package/dist/framework/exit.d.ts.map +1 -0
  92. package/dist/framework/exit.js +57 -0
  93. package/dist/framework/exit.js.map +1 -0
  94. package/dist/framework/metadata.d.ts +38 -0
  95. package/dist/framework/metadata.d.ts.map +1 -0
  96. package/dist/framework/metadata.js +47 -0
  97. package/dist/framework/metadata.js.map +1 -0
  98. package/dist/framework/program.d.ts +47 -0
  99. package/dist/framework/program.d.ts.map +1 -0
  100. package/dist/framework/program.js +189 -0
  101. package/dist/framework/program.js.map +1 -0
  102. package/dist/index.d.ts +7 -0
  103. package/dist/index.d.ts.map +1 -0
  104. package/dist/index.js +7 -0
  105. package/dist/index.js.map +1 -0
  106. package/dist/migrations/README.md +7 -0
  107. package/dist/migrations/build/0001_catalog.sql +85 -0
  108. package/dist/migrations/build/0002_tables.sql +43 -0
  109. package/dist/migrations/build/0003_table-cell-range.sql +13 -0
  110. package/dist/migrations/build/0004_chunk-page.sql +11 -0
  111. package/dist/migrations/state/0001_state.sql +40 -0
  112. package/dist/public-entry.js +38563 -0
  113. package/dist/public-entry.js.map +7 -0
  114. package/dist/public-index.js +36428 -0
  115. package/dist/public-index.js.map +7 -0
  116. package/dist/services/build.d.ts +48 -0
  117. package/dist/services/build.d.ts.map +1 -0
  118. package/dist/services/build.js +499 -0
  119. package/dist/services/build.js.map +1 -0
  120. package/dist/services/builds.d.ts +40 -0
  121. package/dist/services/builds.d.ts.map +1 -0
  122. package/dist/services/builds.js +184 -0
  123. package/dist/services/builds.js.map +1 -0
  124. package/dist/services/cancellation.d.ts +27 -0
  125. package/dist/services/cancellation.d.ts.map +1 -0
  126. package/dist/services/cancellation.js +41 -0
  127. package/dist/services/cancellation.js.map +1 -0
  128. package/dist/services/cloudflare-target.d.ts +38 -0
  129. package/dist/services/cloudflare-target.d.ts.map +1 -0
  130. package/dist/services/cloudflare-target.js +471 -0
  131. package/dist/services/cloudflare-target.js.map +1 -0
  132. package/dist/services/comparer.d.ts +15 -0
  133. package/dist/services/comparer.d.ts.map +1 -0
  134. package/dist/services/comparer.js +43 -0
  135. package/dist/services/comparer.js.map +1 -0
  136. package/dist/services/config-resolve.d.ts +60 -0
  137. package/dist/services/config-resolve.d.ts.map +1 -0
  138. package/dist/services/config-resolve.js +178 -0
  139. package/dist/services/config-resolve.js.map +1 -0
  140. package/dist/services/deploy.d.ts +70 -0
  141. package/dist/services/deploy.d.ts.map +1 -0
  142. package/dist/services/deploy.js +260 -0
  143. package/dist/services/deploy.js.map +1 -0
  144. package/dist/services/dev-session.d.ts +52 -0
  145. package/dist/services/dev-session.d.ts.map +1 -0
  146. package/dist/services/dev-session.js +102 -0
  147. package/dist/services/dev-session.js.map +1 -0
  148. package/dist/services/doctor.d.ts +35 -0
  149. package/dist/services/doctor.d.ts.map +1 -0
  150. package/dist/services/doctor.js +389 -0
  151. package/dist/services/doctor.js.map +1 -0
  152. package/dist/services/export.d.ts +20 -0
  153. package/dist/services/export.d.ts.map +1 -0
  154. package/dist/services/export.js +129 -0
  155. package/dist/services/export.js.map +1 -0
  156. package/dist/services/init.d.ts +46 -0
  157. package/dist/services/init.d.ts.map +1 -0
  158. package/dist/services/init.js +231 -0
  159. package/dist/services/init.js.map +1 -0
  160. package/dist/services/packing.d.ts +25 -0
  161. package/dist/services/packing.d.ts.map +1 -0
  162. package/dist/services/packing.js +69 -0
  163. package/dist/services/packing.js.map +1 -0
  164. package/dist/services/parse-cache.d.ts +47 -0
  165. package/dist/services/parse-cache.d.ts.map +1 -0
  166. package/dist/services/parse-cache.js +65 -0
  167. package/dist/services/parse-cache.js.map +1 -0
  168. package/dist/services/project.d.ts +49 -0
  169. package/dist/services/project.d.ts.map +1 -0
  170. package/dist/services/project.js +119 -0
  171. package/dist/services/project.js.map +1 -0
  172. package/dist/services/remote-prune.d.ts +7 -0
  173. package/dist/services/remote-prune.d.ts.map +1 -0
  174. package/dist/services/remote-prune.js +34 -0
  175. package/dist/services/remote-prune.js.map +1 -0
  176. package/dist/services/retention.d.ts +20 -0
  177. package/dist/services/retention.d.ts.map +1 -0
  178. package/dist/services/retention.js +106 -0
  179. package/dist/services/retention.js.map +1 -0
  180. package/dist/services/revalidate.d.ts +36 -0
  181. package/dist/services/revalidate.d.ts.map +1 -0
  182. package/dist/services/revalidate.js +73 -0
  183. package/dist/services/revalidate.js.map +1 -0
  184. package/dist/services/search.d.ts +25 -0
  185. package/dist/services/search.d.ts.map +1 -0
  186. package/dist/services/search.js +88 -0
  187. package/dist/services/search.js.map +1 -0
  188. package/dist/services/serving.d.ts +70 -0
  189. package/dist/services/serving.d.ts.map +1 -0
  190. package/dist/services/serving.js +240 -0
  191. package/dist/services/serving.js.map +1 -0
  192. package/dist/services/status.d.ts +54 -0
  193. package/dist/services/status.d.ts.map +1 -0
  194. package/dist/services/status.js +203 -0
  195. package/dist/services/status.js.map +1 -0
  196. package/dist/services/studio-assets.d.ts +13 -0
  197. package/dist/services/studio-assets.d.ts.map +1 -0
  198. package/dist/services/studio-assets.js +94 -0
  199. package/dist/services/studio-assets.js.map +1 -0
  200. package/dist/services/studio-diagnostics.d.ts +28 -0
  201. package/dist/services/studio-diagnostics.d.ts.map +1 -0
  202. package/dist/services/studio-diagnostics.js +88 -0
  203. package/dist/services/studio-diagnostics.js.map +1 -0
  204. package/dist/services/studio-endpoints.d.ts +61 -0
  205. package/dist/services/studio-endpoints.d.ts.map +1 -0
  206. package/dist/services/studio-endpoints.js +88 -0
  207. package/dist/services/studio-endpoints.js.map +1 -0
  208. package/dist/services/studio-mutations.d.ts +32 -0
  209. package/dist/services/studio-mutations.d.ts.map +1 -0
  210. package/dist/services/studio-mutations.js +149 -0
  211. package/dist/services/studio-mutations.js.map +1 -0
  212. package/dist/services/versions.d.ts +38 -0
  213. package/dist/services/versions.d.ts.map +1 -0
  214. package/dist/services/versions.js +46 -0
  215. package/dist/services/versions.js.map +1 -0
  216. package/dist/services/watch.d.ts +103 -0
  217. package/dist/services/watch.d.ts.map +1 -0
  218. package/dist/services/watch.js +420 -0
  219. package/dist/services/watch.js.map +1 -0
  220. package/package.json +73 -4
  221. package/studio-dist/assets/ibm-plex-mono-latin-400-normal-Dm_PoFIZ.woff2 +0 -0
  222. package/studio-dist/assets/ibm-plex-mono-latin-500-normal-C_OblDzq.woff2 +0 -0
  223. package/studio-dist/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
  224. package/studio-dist/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
  225. package/studio-dist/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
  226. package/studio-dist/assets/index-BuAYbQVX.js +66 -0
  227. package/studio-dist/assets/index-C_3XEUt4.css +1 -0
  228. package/studio-dist/index.html +30 -0
  229. package/README.md +0 -3
@@ -0,0 +1,66 @@
1
+ function Tb(l,i){for(var r=0;r<i.length;r++){const c=i[r];if(typeof c!="string"&&!Array.isArray(c)){for(const f in c)if(f!=="default"&&!(f in l)){const d=Object.getOwnPropertyDescriptor(c,f);d&&Object.defineProperty(l,f,d.get?d:{enumerable:!0,get:()=>c[f]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function r(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(f){if(f.ep)return;f.ep=!0;const d=r(f);fetch(f.href,d)}})();function wb(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Eo={exports:{}},us={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ap;function Cb(){if(ap)return us;ap=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(c,f,d){var m=null;if(d!==void 0&&(m=""+d),f.key!==void 0&&(m=""+f.key),"key"in f){d={};for(var p in f)p!=="key"&&(d[p]=f[p])}else d=f;return f=d.ref,{$$typeof:l,type:c,key:m,ref:f!==void 0?f:null,props:d}}return us.Fragment=i,us.jsx=r,us.jsxs=r,us}var lp;function Mb(){return lp||(lp=1,Eo.exports=Cb()),Eo.exports}var o=Mb(),di=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(l){return this.listeners.add(l),this.onSubscribe(),()=>{this.listeners.delete(l),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ob={setTimeout:(l,i)=>setTimeout(l,i),clearTimeout:l=>clearTimeout(l),setInterval:(l,i)=>setInterval(l,i),clearInterval:l=>clearInterval(l)},Ab=class{#e=Ob;#t=!1;setTimeoutProvider(l){this.#e=l}setTimeout(l,i){return this.#e.setTimeout(l,i)}clearTimeout(l){this.#e.clearTimeout(l)}setInterval(l,i){return this.#e.setInterval(l,i)}clearInterval(l){this.#e.clearInterval(l)}},dn=new Ab;function Db(l){setTimeout(l,0)}var pn=typeof window>"u"||"Deno"in globalThis;function Ut(){}function zb(l,i){return typeof l=="function"?l(i):l}function Ho(l){return typeof l=="number"&&l>=0&&l!==1/0}function ov(l,i){return Math.max(l+(i||0)-Date.now(),0)}function Gl(l,i){return typeof l=="function"?l(i):l}function ma(l,i){return typeof l=="function"?l(i):l}function np(l,i){const{type:r="all",exact:c,fetchStatus:f,predicate:d,queryKey:m,stale:p}=l;if(m){if(c){if(i.queryHash!==Po(m,i.options))return!1}else if(!vs(i.queryKey,m))return!1}if(r!=="all"){const y=i.isActive();if(r==="active"&&!y||r==="inactive"&&y)return!1}return!(typeof p=="boolean"&&i.isStale()!==p||f&&f!==i.state.fetchStatus||d&&!d(i))}function ip(l,i){const{exact:r,status:c,predicate:f,mutationKey:d}=l;if(d){if(!i.options.mutationKey)return!1;if(r){if(vn(i.options.mutationKey)!==vn(d))return!1}else if(!vs(i.options.mutationKey,d))return!1}return!(c&&i.state.status!==c||f&&!f(i))}function Po(l,i){return(i?.queryKeyHashFn||vn)(l)}function vn(l){return JSON.stringify(l,(i,r)=>qo(r)?Object.keys(r).sort().reduce((c,f)=>(c[f]=r[f],c),{}):r)}function vs(l,i){return l===i?!0:typeof l!=typeof i?!1:l&&i&&typeof l=="object"&&typeof i=="object"?Object.keys(i).every(r=>vs(l[r],i[r])):!1}var _b=Object.prototype.hasOwnProperty;function fv(l,i){if(l===i)return l;const r=sp(l)&&sp(i);if(!r&&!(qo(l)&&qo(i)))return i;const f=(r?l:Object.keys(l)).length,d=r?i:Object.keys(i),m=d.length,p=r?new Array(m):{};let y=0;for(let v=0;v<m;v++){const b=r?v:d[v],x=l[b],E=i[b];if(x===E){p[b]=x,(r?v<f:_b.call(l,b))&&y++;continue}if(x===null||E===null||typeof x!="object"||typeof E!="object"){p[b]=E;continue}const M=fv(x,E);p[b]=M,M===x&&y++}return f===m&&y===f?l:p}function Wr(l,i){if(!i||Object.keys(l).length!==Object.keys(i).length)return!1;for(const r in l)if(l[r]!==i[r])return!1;return!0}function sp(l){return Array.isArray(l)&&l.length===Object.keys(l).length}function qo(l){if(!rp(l))return!1;const i=l.constructor;if(i===void 0)return!0;const r=i.prototype;return!(!rp(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(l)!==Object.prototype)}function rp(l){return Object.prototype.toString.call(l)==="[object Object]"}function Ub(l){return new Promise(i=>{dn.setTimeout(i,l)})}function Bo(l,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(l,i):r.structuralSharing!==!1?fv(l,i):i}function Lb(l,i,r=0){const c=[...l,i];return r&&c.length>r?c.slice(1):c}function Hb(l,i,r=0){const c=[i,...l];return r&&c.length>r?c.slice(0,-1):c}var Wo=Symbol();function dv(l,i){return!l.queryFn&&i?.initialPromise?()=>i.initialPromise:!l.queryFn||l.queryFn===Wo?()=>Promise.reject(new Error(`Missing queryFn: '${l.queryHash}'`)):l.queryFn}function hv(l,i){return typeof l=="function"?l(...i):!!l}var qb=class extends di{#e;#t;#a;constructor(){super(),this.#a=l=>{if(!pn&&window.addEventListener){const i=()=>l();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(l){this.#a=l,this.#t?.(),this.#t=l(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(l){this.#e!==l&&(this.#e=l,this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(i=>{i(l)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Io=new qb;function Qo(){let l,i;const r=new Promise((f,d)=>{l=f,i=d});r.status="pending",r.catch(()=>{});function c(f){Object.assign(r,f),delete r.resolve,delete r.reject}return r.resolve=f=>{c({status:"fulfilled",value:f}),l(f)},r.reject=f=>{c({status:"rejected",reason:f}),i(f)},r}var Bb=Db;function Qb(){let l=[],i=0,r=p=>{p()},c=p=>{p()},f=Bb;const d=p=>{i?l.push(p):f(()=>{r(p)})},m=()=>{const p=l;l=[],p.length&&f(()=>{c(()=>{p.forEach(y=>{r(y)})})})};return{batch:p=>{let y;i++;try{y=p()}finally{i--,i||m()}return y},batchCalls:p=>(...y)=>{d(()=>{p(...y)})},schedule:d,setNotifyFunction:p=>{r=p},setBatchNotifyFunction:p=>{c=p},setScheduler:p=>{f=p}}}var gt=Qb(),Yb=class extends di{#e=!0;#t;#a;constructor(){super(),this.#a=l=>{if(!pn&&window.addEventListener){const i=()=>l(!0),r=()=>l(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(l){this.#a=l,this.#t?.(),this.#t=l(this.setOnline.bind(this))}setOnline(l){this.#e!==l&&(this.#e=l,this.listeners.forEach(r=>{r(l)}))}isOnline(){return this.#e}},Ir=new Yb;function Gb(l){return Math.min(1e3*2**l,3e4)}function mv(l){return(l??"online")==="online"?Ir.isOnline():!0}var Yo=class extends Error{constructor(l){super("CancelledError"),this.revert=l?.revert,this.silent=l?.silent}};function pv(l){let i=!1,r=0,c;const f=Qo(),d=()=>f.status!=="pending",m=B=>{if(!d()){const H=new Yo(B);E(H),l.onCancel?.(H)}},p=()=>{i=!0},y=()=>{i=!1},v=()=>Io.isFocused()&&(l.networkMode==="always"||Ir.isOnline())&&l.canRun(),b=()=>mv(l.networkMode)&&l.canRun(),x=B=>{d()||(c?.(),f.resolve(B))},E=B=>{d()||(c?.(),f.reject(B))},M=()=>new Promise(B=>{c=H=>{(d()||v())&&B(H)},l.onPause?.()}).then(()=>{c=void 0,d()||l.onContinue?.()}),L=()=>{if(d())return;let B;const H=r===0?l.initialPromise:void 0;try{B=H??l.fn()}catch(P){B=Promise.reject(P)}Promise.resolve(B).then(x).catch(P=>{if(d())return;const F=l.retry??(pn?0:3),K=l.retryDelay??Gb,ie=typeof K=="function"?K(r,P):K,ae=F===!0||typeof F=="number"&&r<F||typeof F=="function"&&F(r,P);if(i||!ae){E(P);return}r++,l.onFail?.(r,P),Ub(ie).then(()=>v()?void 0:M()).then(()=>{i?E(P):L()})})};return{promise:f,status:()=>f.status,cancel:m,continue:()=>(c?.(),f),cancelRetry:p,continueRetry:y,canStart:b,start:()=>(b()?L():M().then(L),f)}}var vv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ho(this.gcTime)&&(this.#e=dn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(l){this.gcTime=Math.max(this.gcTime||0,l??(pn?1/0:300*1e3))}clearGcTimeout(){this.#e&&(dn.clearTimeout(this.#e),this.#e=void 0)}},kb=class extends vv{#e;#t;#a;#n;#l;#i;#r;constructor(l){super(),this.#r=!1,this.#i=l.defaultOptions,this.setOptions(l.options),this.observers=[],this.#n=l.client,this.#a=this.#n.getQueryCache(),this.queryKey=l.queryKey,this.queryHash=l.queryHash,this.#e=up(this.options),this.state=l.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(l){if(this.options={...this.#i,...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=up(this.options);i.data!==void 0&&(this.setData(i.data,{updatedAt:i.dataUpdatedAt,manual:!0}),this.#e=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(l,i){const r=Bo(this.state.data,l,this.options);return this.#s({data:r,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),r}setState(l,i){this.#s({type:"setState",state:l,setStateOptions:i})}cancel(l){const i=this.#l?.promise;return this.#l?.cancel(l),i?i.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(l=>ma(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wo||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>Gl(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!ov(this.state.dataUpdatedAt,l)}onFocus(){this.observers.find(i=>i.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){this.observers.find(i=>i.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(this.#l&&(this.#r?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(l,i){if(this.state.fetchStatus!=="idle"&&this.#l?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(l&&this.setOptions(l),!this.options.queryFn){const p=this.observers.find(y=>y.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,c=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#r=!0,r.signal)})},f=()=>{const p=dv(this.options,i),v=(()=>{const b={client:this.#n,queryKey:this.queryKey,meta:this.meta};return c(b),b})();return this.#r=!1,this.options.persister?this.options.persister(p,v,this):p(v)},m=(()=>{const p={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:f};return c(p),p})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#s({type:"fetch",meta:m.fetchOptions?.meta}),this.#l=pv({initialPromise:i?.initialPromise,fn:m.fetchFn,onCancel:p=>{p instanceof Yo&&p.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(p,y)=>{this.#s({type:"failed",failureCount:p,error:y})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const p=await this.#l.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#a.config.onSuccess?.(p,this),this.#a.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof Yo){if(p.silent)return this.#l.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#s({type:"error",error:p}),this.#a.config.onError?.(p,this),this.#a.config.onSettled?.(this.state.data,p,this),p}finally{this.scheduleGc()}}#s(l){const i=r=>{switch(l.type){case"failed":return{...r,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...yv(r.data,this.options),fetchMeta:l.meta??null};case"success":const c={...r,data:l.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:l.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=l.manual?c:void 0,c;case"error":const f=l.error;return{...r,error:f,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...l.state}}};this.state=i(this.state),gt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:l})})}};function yv(l,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mv(i.networkMode)?"fetching":"paused",...l===void 0&&{error:null,status:"pending"}}}function up(l){const i=typeof l.initialData=="function"?l.initialData():l.initialData,r=i!==void 0,c=r?typeof l.initialDataUpdatedAt=="function"?l.initialDataUpdatedAt():l.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Xb=class extends di{constructor(l,i){super(),this.options=i,this.#e=l,this.#s=null,this.#r=Qo(),this.bindMethods(),this.setOptions(i)}#e;#t=void 0;#a=void 0;#n=void 0;#l;#i;#r;#s;#p;#d;#h;#c;#o;#u;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),cp(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Go(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Go(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(l){const i=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ma(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#j(),this.#t.setOptions(this.options),i._defaulted&&!Wr(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const c=this.hasListeners();c&&op(this.#t,r,this.options,i)&&this.#f(),this.updateResult(),c&&(this.#t!==r||ma(this.options.enabled,this.#t)!==ma(i.enabled,this.#t)||Gl(this.options.staleTime,this.#t)!==Gl(i.staleTime,this.#t))&&this.#v();const f=this.#y();c&&(this.#t!==r||ma(this.options.enabled,this.#t)!==ma(i.enabled,this.#t)||f!==this.#u)&&this.#g(f)}getOptimisticResult(l){const i=this.#e.getQueryCache().build(this.#e,l),r=this.createResult(i,l);return Vb(this,r)&&(this.#n=r,this.#i=this.options,this.#l=this.#t.state),r}getCurrentResult(){return this.#n}trackResult(l,i){return new Proxy(l,{get:(r,c)=>(this.trackProp(c),i?.(c),c==="promise"&&!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,c))})}trackProp(l){this.#m.add(l)}getCurrentQuery(){return this.#t}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const i=this.#e.defaultQueryOptions(l),r=this.#e.getQueryCache().build(this.#e,i);return r.fetch().then(()=>this.createResult(r,i))}fetch(l){return this.#f({...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(l){this.#j();let i=this.#t.fetch(this.options,l);return l?.throwOnError||(i=i.catch(Ut)),i}#v(){this.#x();const l=Gl(this.options.staleTime,this.#t);if(pn||this.#n.isStale||!Ho(l))return;const r=ov(this.#n.dataUpdatedAt,l)+1;this.#c=dn.setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(l){this.#S(),this.#u=l,!(pn||ma(this.options.enabled,this.#t)===!1||!Ho(this.#u)||this.#u===0)&&(this.#o=dn.setInterval(()=>{(this.options.refetchIntervalInBackground||Io.isFocused())&&this.#f()},this.#u))}#b(){this.#v(),this.#g(this.#y())}#x(){this.#c&&(dn.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#o&&(dn.clearInterval(this.#o),this.#o=void 0)}createResult(l,i){const r=this.#t,c=this.options,f=this.#n,d=this.#l,m=this.#i,y=l!==r?l.state:this.#a,{state:v}=l;let b={...v},x=!1,E;if(i._optimisticResults){const O=this.hasListeners(),ge=!O&&cp(l,i),je=O&&op(l,r,i,c);(ge||je)&&(b={...b,...yv(v.data,l.options)}),i._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:M,errorUpdatedAt:L,status:B}=b;E=b.data;let H=!1;if(i.placeholderData!==void 0&&E===void 0&&B==="pending"){let O;f?.isPlaceholderData&&i.placeholderData===m?.placeholderData?(O=f.data,H=!0):O=typeof i.placeholderData=="function"?i.placeholderData(this.#h?.state.data,this.#h):i.placeholderData,O!==void 0&&(B="success",E=Bo(f?.data,O,i),x=!0)}if(i.select&&E!==void 0&&!H)if(f&&E===d?.data&&i.select===this.#p)E=this.#d;else try{this.#p=i.select,E=i.select(E),E=Bo(f?.data,E,i),this.#d=E,this.#s=null}catch(O){this.#s=O}this.#s&&(M=this.#s,E=this.#d,L=Date.now(),B="error");const P=b.fetchStatus==="fetching",F=B==="pending",K=B==="error",ie=F&&P,ae=E!==void 0,$={status:B,fetchStatus:b.fetchStatus,isPending:F,isSuccess:B==="success",isError:K,isInitialLoading:ie,isLoading:ie,data:E,dataUpdatedAt:b.dataUpdatedAt,error:M,errorUpdatedAt:L,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>y.dataUpdateCount||b.errorUpdateCount>y.errorUpdateCount,isFetching:P,isRefetching:P&&!F,isLoadingError:K&&!ae,isPaused:b.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:K&&ae,isStale:ef(l,i),refetch:this.refetch,promise:this.#r,isEnabled:ma(i.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const O=qe=>{$.status==="error"?qe.reject($.error):$.data!==void 0&&qe.resolve($.data)},ge=()=>{const qe=this.#r=$.promise=Qo();O(qe)},je=this.#r;switch(je.status){case"pending":l.queryHash===r.queryHash&&O(je);break;case"fulfilled":($.status==="error"||$.data!==je.value)&&ge();break;case"rejected":($.status!=="error"||$.error!==je.reason)&&ge();break}}return $}updateResult(){const l=this.#n,i=this.createResult(this.#t,this.options);if(this.#l=this.#t.state,this.#i=this.options,this.#l.data!==void 0&&(this.#h=this.#t),Wr(i,l))return;this.#n=i;const r=()=>{if(!l)return!0;const{notifyOnChangeProps:c}=this.options,f=typeof c=="function"?c():c;if(f==="all"||!f&&!this.#m.size)return!0;const d=new Set(f??this.#m);return this.options.throwOnError&&d.add("error"),Object.keys(this.#n).some(m=>{const p=m;return this.#n[p]!==l[p]&&d.has(p)})};this.#E({listeners:r()})}#j(){const l=this.#e.getQueryCache().build(this.#e,this.options);if(l===this.#t)return;const i=this.#t;this.#t=l,this.#a=l.state,this.hasListeners()&&(i?.removeObserver(this),l.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(l){gt.batch(()=>{l.listeners&&this.listeners.forEach(i=>{i(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Kb(l,i){return ma(i.enabled,l)!==!1&&l.state.data===void 0&&!(l.state.status==="error"&&i.retryOnMount===!1)}function cp(l,i){return Kb(l,i)||l.state.data!==void 0&&Go(l,i,i.refetchOnMount)}function Go(l,i,r){if(ma(i.enabled,l)!==!1&&Gl(i.staleTime,l)!=="static"){const c=typeof r=="function"?r(l):r;return c==="always"||c!==!1&&ef(l,i)}return!1}function op(l,i,r,c){return(l!==i||ma(c.enabled,l)===!1)&&(!r.suspense||l.state.status!=="error")&&ef(l,r)}function ef(l,i){return ma(i.enabled,l)!==!1&&l.isStaleByTime(Gl(i.staleTime,l))}function Vb(l,i){return!Wr(l.getCurrentResult(),i)}function fp(l){return{onFetch:(i,r)=>{const c=i.options,f=i.fetchOptions?.meta?.fetchMore?.direction,d=i.state.data?.pages||[],m=i.state.data?.pageParams||[];let p={pages:[],pageParams:[]},y=0;const v=async()=>{let b=!1;const x=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(i.signal.aborted?b=!0:i.signal.addEventListener("abort",()=>{b=!0}),i.signal)})},E=dv(i.options,i.fetchOptions),M=async(L,B,H)=>{if(b)return Promise.reject();if(B==null&&L.pages.length)return Promise.resolve(L);const F=(()=>{const he={client:i.client,queryKey:i.queryKey,pageParam:B,direction:H?"backward":"forward",meta:i.options.meta};return x(he),he})(),K=await E(F),{maxPages:ie}=i.options,ae=H?Hb:Lb;return{pages:ae(L.pages,K,ie),pageParams:ae(L.pageParams,B,ie)}};if(f&&d.length){const L=f==="backward",B=L?Zb:dp,H={pages:d,pageParams:m},P=B(c,H);p=await M(H,P,L)}else{const L=l??d.length;do{const B=y===0?m[0]??c.initialPageParam:dp(c,p);if(y>0&&B==null)break;p=await M(p,B),y++}while(y<L)}return p};i.options.persister?i.fetchFn=()=>i.options.persister?.(v,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r):i.fetchFn=v}}}function dp(l,{pages:i,pageParams:r}){const c=i.length-1;return i.length>0?l.getNextPageParam(i[c],i,r[c],r):void 0}function Zb(l,{pages:i,pageParams:r}){return i.length>0?l.getPreviousPageParam?.(i[0],i,r[0],r):void 0}var $b=class extends vv{#e;#t;#a;#n;constructor(l){super(),this.#e=l.client,this.mutationId=l.mutationId,this.#a=l.mutationCache,this.#t=[],this.state=l.state||gv(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){this.#t.includes(l)||(this.#t.push(l),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){this.#t=this.#t.filter(i=>i!==l),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(l){const i=()=>{this.#l({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=pv({fn:()=>this.options.mutationFn?this.options.mutationFn(l,r):Promise.reject(new Error("No mutationFn found")),onFail:(d,m)=>{this.#l({type:"failed",failureCount:d,error:m})},onPause:()=>{this.#l({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const c=this.state.status==="pending",f=!this.#n.canStart();try{if(c)i();else{this.#l({type:"pending",variables:l,isPaused:f}),await this.#a.config.onMutate?.(l,this,r);const m=await this.options.onMutate?.(l,r);m!==this.state.context&&this.#l({type:"pending",context:m,variables:l,isPaused:f})}const d=await this.#n.start();return await this.#a.config.onSuccess?.(d,l,this.state.context,this,r),await this.options.onSuccess?.(d,l,this.state.context,r),await this.#a.config.onSettled?.(d,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(d,null,l,this.state.context,r),this.#l({type:"success",data:d}),d}catch(d){try{throw await this.#a.config.onError?.(d,l,this.state.context,this,r),await this.options.onError?.(d,l,this.state.context,r),await this.#a.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,d,l,this.state.context,r),d}finally{this.#l({type:"error",error:d})}}finally{this.#a.runNext(this)}}#l(l){const i=r=>{switch(l.type){case"failed":return{...r,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...r,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:l.error,failureCount:r.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=i(this.state),gt.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(l)}),this.#a.notify({mutation:this,type:"updated",action:l})})}};function gv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fb=class extends di{constructor(l={}){super(),this.config=l,this.#e=new Set,this.#t=new Map,this.#a=0}#e;#t;#a;build(l,i,r){const c=new $b({client:l,mutationCache:this,mutationId:++this.#a,options:l.defaultMutationOptions(i),state:r});return this.add(c),c}add(l){this.#e.add(l);const i=Gr(l);if(typeof i=="string"){const r=this.#t.get(i);r?r.push(l):this.#t.set(i,[l])}this.notify({type:"added",mutation:l})}remove(l){if(this.#e.delete(l)){const i=Gr(l);if(typeof i=="string"){const r=this.#t.get(i);if(r)if(r.length>1){const c=r.indexOf(l);c!==-1&&r.splice(c,1)}else r[0]===l&&this.#t.delete(i)}}this.notify({type:"removed",mutation:l})}canRun(l){const i=Gr(l);if(typeof i=="string"){const c=this.#t.get(i)?.find(f=>f.state.status==="pending");return!c||c===l}else return!0}runNext(l){const i=Gr(l);return typeof i=="string"?this.#t.get(i)?.find(c=>c!==l&&c.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){gt.batch(()=>{this.#e.forEach(l=>{this.notify({type:"removed",mutation:l})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(l){const i={exact:!0,...l};return this.getAll().find(r=>ip(i,r))}findAll(l={}){return this.getAll().filter(i=>ip(l,i))}notify(l){gt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}resumePausedMutations(){const l=this.getAll().filter(i=>i.state.isPaused);return gt.batch(()=>Promise.all(l.map(i=>i.continue().catch(Ut))))}};function Gr(l){return l.options.scope?.id}var Jb=class extends di{#e;#t=void 0;#a;#n;constructor(i,r){super(),this.#e=i,this.setOptions(r),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){const r=this.options;this.options=this.#e.defaultMutationOptions(i),Wr(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),r?.mutationKey&&this.options.mutationKey&&vn(r.mutationKey)!==vn(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(i){this.#l(),this.#i(i)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#l(),this.#i()}mutate(i,r){return this.#n=r,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(i)}#l(){const i=this.#a?.state??gv();this.#t={...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset}}#i(i){gt.batch(()=>{if(this.#n&&this.hasListeners()){const r=this.#t.variables,c=this.#t.context,f={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};i?.type==="success"?(this.#n.onSuccess?.(i.data,r,c,f),this.#n.onSettled?.(i.data,null,r,c,f)):i?.type==="error"&&(this.#n.onError?.(i.error,r,c,f),this.#n.onSettled?.(void 0,i.error,r,c,f))}this.listeners.forEach(r=>{r(this.#t)})})}},Pb=class extends di{constructor(l={}){super(),this.config=l,this.#e=new Map}#e;build(l,i,r){const c=i.queryKey,f=i.queryHash??Po(c,i);let d=this.get(f);return d||(d=new kb({client:l,queryKey:c,queryHash:f,options:l.defaultQueryOptions(i),state:r,defaultOptions:l.getQueryDefaults(c)}),this.add(d)),d}add(l){this.#e.has(l.queryHash)||(this.#e.set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const i=this.#e.get(l.queryHash);i&&(l.destroy(),i===l&&this.#e.delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){gt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return this.#e.get(l)}getAll(){return[...this.#e.values()]}find(l){const i={exact:!0,...l};return this.getAll().find(r=>np(i,r))}findAll(l={}){const i=this.getAll();return Object.keys(l).length>0?i.filter(r=>np(l,r)):i}notify(l){gt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},Wb=class{#e;#t;#a;#n;#l;#i;#r;#s;constructor(l={}){this.#e=l.queryCache||new Pb,this.#t=l.mutationCache||new Fb,this.#a=l.defaultOptions||{},this.#n=new Map,this.#l=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#r=Io.subscribe(async l=>{l&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ir.subscribe(async l=>{l&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#r?.(),this.#r=void 0,this.#s?.(),this.#s=void 0)}isFetching(l){return this.#e.findAll({...l,fetchStatus:"fetching"}).length}isMutating(l){return this.#t.findAll({...l,status:"pending"}).length}getQueryData(l){const i=this.defaultQueryOptions({queryKey:l});return this.#e.get(i.queryHash)?.state.data}ensureQueryData(l){const i=this.defaultQueryOptions(l),r=this.#e.build(this,i),c=r.state.data;return c===void 0?this.fetchQuery(l):(l.revalidateIfStale&&r.isStaleByTime(Gl(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(c))}getQueriesData(l){return this.#e.findAll(l).map(({queryKey:i,state:r})=>{const c=r.data;return[i,c]})}setQueryData(l,i,r){const c=this.defaultQueryOptions({queryKey:l}),d=this.#e.get(c.queryHash)?.state.data,m=zb(i,d);if(m!==void 0)return this.#e.build(this,c).setData(m,{...r,manual:!0})}setQueriesData(l,i,r){return gt.batch(()=>this.#e.findAll(l).map(({queryKey:c})=>[c,this.setQueryData(c,i,r)]))}getQueryState(l){const i=this.defaultQueryOptions({queryKey:l});return this.#e.get(i.queryHash)?.state}removeQueries(l){const i=this.#e;gt.batch(()=>{i.findAll(l).forEach(r=>{i.remove(r)})})}resetQueries(l,i){const r=this.#e;return gt.batch(()=>(r.findAll(l).forEach(c=>{c.reset()}),this.refetchQueries({type:"active",...l},i)))}cancelQueries(l,i={}){const r={revert:!0,...i},c=gt.batch(()=>this.#e.findAll(l).map(f=>f.cancel(r)));return Promise.all(c).then(Ut).catch(Ut)}invalidateQueries(l,i={}){return gt.batch(()=>(this.#e.findAll(l).forEach(r=>{r.invalidate()}),l?.refetchType==="none"?Promise.resolve():this.refetchQueries({...l,type:l?.refetchType??l?.type??"active"},i)))}refetchQueries(l,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},c=gt.batch(()=>this.#e.findAll(l).filter(f=>!f.isDisabled()&&!f.isStatic()).map(f=>{let d=f.fetch(void 0,r);return r.throwOnError||(d=d.catch(Ut)),f.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(c).then(Ut)}fetchQuery(l){const i=this.defaultQueryOptions(l);i.retry===void 0&&(i.retry=!1);const r=this.#e.build(this,i);return r.isStaleByTime(Gl(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(l){return this.fetchQuery(l).then(Ut).catch(Ut)}fetchInfiniteQuery(l){return l.behavior=fp(l.pages),this.fetchQuery(l)}prefetchInfiniteQuery(l){return this.fetchInfiniteQuery(l).then(Ut).catch(Ut)}ensureInfiniteQueryData(l){return l.behavior=fp(l.pages),this.ensureQueryData(l)}resumePausedMutations(){return Ir.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(l){this.#a=l}setQueryDefaults(l,i){this.#n.set(vn(l),{queryKey:l,defaultOptions:i})}getQueryDefaults(l){const i=[...this.#n.values()],r={};return i.forEach(c=>{vs(l,c.queryKey)&&Object.assign(r,c.defaultOptions)}),r}setMutationDefaults(l,i){this.#l.set(vn(l),{mutationKey:l,defaultOptions:i})}getMutationDefaults(l){const i=[...this.#l.values()],r={};return i.forEach(c=>{vs(l,c.mutationKey)&&Object.assign(r,c.defaultOptions)}),r}defaultQueryOptions(l){if(l._defaulted)return l;const i={...this.#a.queries,...this.getQueryDefaults(l.queryKey),...l,_defaulted:!0};return i.queryHash||(i.queryHash=Po(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Wo&&(i.enabled=!1),i}defaultMutationOptions(l){return l?._defaulted?l:{...this.#a.mutations,...l?.mutationKey&&this.getMutationDefaults(l.mutationKey),...l,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},No={exports:{}},Se={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var hp;function Ib(){if(hp)return Se;hp=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),E=Symbol.iterator;function M(R){return R===null||typeof R!="object"?null:(R=E&&R[E]||R["@@iterator"],typeof R=="function"?R:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,H={};function P(R,Y,J){this.props=R,this.context=Y,this.refs=H,this.updater=J||L}P.prototype.isReactComponent={},P.prototype.setState=function(R,Y){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,Y,"setState")},P.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function F(){}F.prototype=P.prototype;function K(R,Y,J){this.props=R,this.context=Y,this.refs=H,this.updater=J||L}var ie=K.prototype=new F;ie.constructor=K,B(ie,P.prototype),ie.isPureReactComponent=!0;var ae=Array.isArray;function he(){}var $={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function ge(R,Y,J){var W=J.ref;return{$$typeof:l,type:R,key:Y,ref:W!==void 0?W:null,props:J}}function je(R,Y){return ge(R.type,Y,R.props)}function qe(R){return typeof R=="object"&&R!==null&&R.$$typeof===l}function be(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(J){return Y[J]})}var nt=/\/+/g;function Ue(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?be(""+R.key):Y.toString(36)}function ke(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(he,he):(R.status="pending",R.then(function(Y){R.status==="pending"&&(R.status="fulfilled",R.value=Y)},function(Y){R.status==="pending"&&(R.status="rejected",R.reason=Y)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function U(R,Y,J,W,ce){var me=typeof R;(me==="undefined"||me==="boolean")&&(R=null);var Ce=!1;if(R===null)Ce=!0;else switch(me){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(R.$$typeof){case l:case i:Ce=!0;break;case b:return Ce=R._init,U(Ce(R._payload),Y,J,W,ce)}}if(Ce)return ce=ce(R),Ce=W===""?"."+Ue(R,0):W,ae(ce)?(J="",Ce!=null&&(J=Ce.replace(nt,"$&/")+"/"),U(ce,Y,J,"",function(Xl){return Xl})):ce!=null&&(qe(ce)&&(ce=je(ce,J+(ce.key==null||R&&R.key===ce.key?"":(""+ce.key).replace(nt,"$&/")+"/")+Ce)),Y.push(ce)),1;Ce=0;var ft=W===""?".":W+":";if(ae(R))for(var Pe=0;Pe<R.length;Pe++)W=R[Pe],me=ft+Ue(W,Pe),Ce+=U(W,Y,J,me,ce);else if(Pe=M(R),typeof Pe=="function")for(R=Pe.call(R),Pe=0;!(W=R.next()).done;)W=W.value,me=ft+Ue(W,Pe++),Ce+=U(W,Y,J,me,ce);else if(me==="object"){if(typeof R.then=="function")return U(ke(R),Y,J,W,ce);throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function Z(R,Y,J){if(R==null)return R;var W=[],ce=0;return U(R,W,"","",function(me){return Y.call(J,me,ce++)}),W}function se(R){if(R._status===-1){var Y=R._result;Y=Y(),Y.then(function(J){(R._status===0||R._status===-1)&&(R._status=1,R._result=J)},function(J){(R._status===0||R._status===-1)&&(R._status=2,R._result=J)}),R._status===-1&&(R._status=0,R._result=Y)}if(R._status===1)return R._result.default;throw R._result}var ue=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},ye={map:Z,forEach:function(R,Y,J){Z(R,function(){Y.apply(this,arguments)},J)},count:function(R){var Y=0;return Z(R,function(){Y++}),Y},toArray:function(R){return Z(R,function(Y){return Y})||[]},only:function(R){if(!qe(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Se.Activity=x,Se.Children=ye,Se.Component=P,Se.Fragment=r,Se.Profiler=f,Se.PureComponent=K,Se.StrictMode=c,Se.Suspense=y,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Se.__COMPILER_RUNTIME={__proto__:null,c:function(R){return $.H.useMemoCache(R)}},Se.cache=function(R){return function(){return R.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(R,Y,J){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var W=B({},R.props),ce=R.key;if(Y!=null)for(me in Y.key!==void 0&&(ce=""+Y.key),Y)!O.call(Y,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&Y.ref===void 0||(W[me]=Y[me]);var me=arguments.length-2;if(me===1)W.children=J;else if(1<me){for(var Ce=Array(me),ft=0;ft<me;ft++)Ce[ft]=arguments[ft+2];W.children=Ce}return ge(R.type,ce,W)},Se.createContext=function(R){return R={$$typeof:m,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:d,_context:R},R},Se.createElement=function(R,Y,J){var W,ce={},me=null;if(Y!=null)for(W in Y.key!==void 0&&(me=""+Y.key),Y)O.call(Y,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ce[W]=Y[W]);var Ce=arguments.length-2;if(Ce===1)ce.children=J;else if(1<Ce){for(var ft=Array(Ce),Pe=0;Pe<Ce;Pe++)ft[Pe]=arguments[Pe+2];ce.children=ft}if(R&&R.defaultProps)for(W in Ce=R.defaultProps,Ce)ce[W]===void 0&&(ce[W]=Ce[W]);return ge(R,me,ce)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(R){return{$$typeof:p,render:R}},Se.isValidElement=qe,Se.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:se}},Se.memo=function(R,Y){return{$$typeof:v,type:R,compare:Y===void 0?null:Y}},Se.startTransition=function(R){var Y=$.T,J={};$.T=J;try{var W=R(),ce=$.S;ce!==null&&ce(J,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(he,ue)}catch(me){ue(me)}finally{Y!==null&&J.types!==null&&(Y.types=J.types),$.T=Y}},Se.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Se.use=function(R){return $.H.use(R)},Se.useActionState=function(R,Y,J){return $.H.useActionState(R,Y,J)},Se.useCallback=function(R,Y){return $.H.useCallback(R,Y)},Se.useContext=function(R){return $.H.useContext(R)},Se.useDebugValue=function(){},Se.useDeferredValue=function(R,Y){return $.H.useDeferredValue(R,Y)},Se.useEffect=function(R,Y){return $.H.useEffect(R,Y)},Se.useEffectEvent=function(R){return $.H.useEffectEvent(R)},Se.useId=function(){return $.H.useId()},Se.useImperativeHandle=function(R,Y,J){return $.H.useImperativeHandle(R,Y,J)},Se.useInsertionEffect=function(R,Y){return $.H.useInsertionEffect(R,Y)},Se.useLayoutEffect=function(R,Y){return $.H.useLayoutEffect(R,Y)},Se.useMemo=function(R,Y){return $.H.useMemo(R,Y)},Se.useOptimistic=function(R,Y){return $.H.useOptimistic(R,Y)},Se.useReducer=function(R,Y,J){return $.H.useReducer(R,Y,J)},Se.useRef=function(R){return $.H.useRef(R)},Se.useState=function(R){return $.H.useState(R)},Se.useSyncExternalStore=function(R,Y,J){return $.H.useSyncExternalStore(R,Y,J)},Se.useTransition=function(){return $.H.useTransition()},Se.version="19.2.0",Se}var mp;function tf(){return mp||(mp=1,No.exports=Ib()),No.exports}var N=tf();const e0=wb(N),t0=Tb({__proto__:null,default:e0},[N]);var bv=N.createContext(void 0),af=l=>{const i=N.useContext(bv);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},a0=({client:l,children:i})=>(N.useEffect(()=>(l.mount(),()=>{l.unmount()}),[l]),o.jsx(bv.Provider,{value:l,children:i})),xv=N.createContext(!1),l0=()=>N.useContext(xv);xv.Provider;function n0(){let l=!1;return{clearReset:()=>{l=!1},reset:()=>{l=!0},isReset:()=>l}}var i0=N.createContext(n0()),s0=()=>N.useContext(i0),r0=(l,i)=>{(l.suspense||l.throwOnError||l.experimental_prefetchInRender)&&(i.isReset()||(l.retryOnMount=!1))},u0=l=>{N.useEffect(()=>{l.clearReset()},[l])},c0=({result:l,errorResetBoundary:i,throwOnError:r,query:c,suspense:f})=>l.isError&&!i.isReset()&&!l.isFetching&&c&&(f&&l.data===void 0||hv(r,[l.error,c])),o0=l=>{if(l.suspense){const r=f=>f==="static"?f:Math.max(f??1e3,1e3),c=l.staleTime;l.staleTime=typeof c=="function"?(...f)=>r(c(...f)):r(c),typeof l.gcTime=="number"&&(l.gcTime=Math.max(l.gcTime,1e3))}},f0=(l,i)=>l.isLoading&&l.isFetching&&!i,d0=(l,i)=>l?.suspense&&i.isPending,pp=(l,i,r)=>i.fetchOptimistic(l).catch(()=>{r.clearReset()});function h0(l,i,r){const c=l0(),f=s0(),d=af(),m=d.defaultQueryOptions(l);d.getDefaultOptions().queries?._experimental_beforeQuery?.(m),m._optimisticResults=c?"isRestoring":"optimistic",o0(m),r0(m,f),u0(f);const p=!d.getQueryCache().get(m.queryHash),[y]=N.useState(()=>new i(d,m)),v=y.getOptimisticResult(m),b=!c&&l.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(x=>{const E=b?y.subscribe(gt.batchCalls(x)):Ut;return y.updateResult(),E},[y,b]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),N.useEffect(()=>{y.setOptions(m)},[m,y]),d0(m,v))throw pp(m,y,f);if(c0({result:v,errorResetBoundary:f,throwOnError:m.throwOnError,query:d.getQueryCache().get(m.queryHash),suspense:m.suspense}))throw v.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(m,v),m.experimental_prefetchInRender&&!pn&&f0(v,c)&&(p?pp(m,y,f):d.getQueryCache().get(m.queryHash)?.promise)?.catch(Ut).finally(()=>{y.updateResult()}),m.notifyOnChangeProps?v:y.trackResult(v)}function Rt(l,i){return h0(l,Xb)}function eu(l,i){const r=af(),[c]=N.useState(()=>new Jb(r,l));N.useEffect(()=>{c.setOptions(l)},[c,l]);const f=N.useSyncExternalStore(N.useCallback(m=>c.subscribe(gt.batchCalls(m)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d=N.useCallback((m,p)=>{c.mutate(m,p).catch(Ut)},[c]);if(f.error&&hv(c.options.throwOnError,[f.error]))throw f.error;return{...f,mutate:d,mutateAsync:f.mutate}}var Ro={exports:{}},cs={},To={exports:{}},wo={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var vp;function m0(){return vp||(vp=1,(function(l){function i(U,Z){var se=U.length;U.push(Z);e:for(;0<se;){var ue=se-1>>>1,ye=U[ue];if(0<f(ye,Z))U[ue]=Z,U[se]=ye,se=ue;else break e}}function r(U){return U.length===0?null:U[0]}function c(U){if(U.length===0)return null;var Z=U[0],se=U.pop();if(se!==Z){U[0]=se;e:for(var ue=0,ye=U.length,R=ye>>>1;ue<R;){var Y=2*(ue+1)-1,J=U[Y],W=Y+1,ce=U[W];if(0>f(J,se))W<ye&&0>f(ce,J)?(U[ue]=ce,U[W]=se,ue=W):(U[ue]=J,U[Y]=se,ue=Y);else if(W<ye&&0>f(ce,se))U[ue]=ce,U[W]=se,ue=W;else break e}}return Z}function f(U,Z){var se=U.sortIndex-Z.sortIndex;return se!==0?se:U.id-Z.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var m=Date,p=m.now();l.unstable_now=function(){return m.now()-p}}var y=[],v=[],b=1,x=null,E=3,M=!1,L=!1,B=!1,H=!1,P=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function ie(U){for(var Z=r(v);Z!==null;){if(Z.callback===null)c(v);else if(Z.startTime<=U)c(v),Z.sortIndex=Z.expirationTime,i(y,Z);else break;Z=r(v)}}function ae(U){if(B=!1,ie(U),!L)if(r(y)!==null)L=!0,he||(he=!0,be());else{var Z=r(v);Z!==null&&ke(ae,Z.startTime-U)}}var he=!1,$=-1,O=5,ge=-1;function je(){return H?!0:!(l.unstable_now()-ge<O)}function qe(){if(H=!1,he){var U=l.unstable_now();ge=U;var Z=!0;try{e:{L=!1,B&&(B=!1,F($),$=-1),M=!0;var se=E;try{t:{for(ie(U),x=r(y);x!==null&&!(x.expirationTime>U&&je());){var ue=x.callback;if(typeof ue=="function"){x.callback=null,E=x.priorityLevel;var ye=ue(x.expirationTime<=U);if(U=l.unstable_now(),typeof ye=="function"){x.callback=ye,ie(U),Z=!0;break t}x===r(y)&&c(y),ie(U)}else c(y);x=r(y)}if(x!==null)Z=!0;else{var R=r(v);R!==null&&ke(ae,R.startTime-U),Z=!1}}break e}finally{x=null,E=se,M=!1}Z=void 0}}finally{Z?be():he=!1}}}var be;if(typeof K=="function")be=function(){K(qe)};else if(typeof MessageChannel<"u"){var nt=new MessageChannel,Ue=nt.port2;nt.port1.onmessage=qe,be=function(){Ue.postMessage(null)}}else be=function(){P(qe,0)};function ke(U,Z){$=P(function(){U(l.unstable_now())},Z)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(U){U.callback=null},l.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<U?Math.floor(1e3/U):5},l.unstable_getCurrentPriorityLevel=function(){return E},l.unstable_next=function(U){switch(E){case 1:case 2:case 3:var Z=3;break;default:Z=E}var se=E;E=Z;try{return U()}finally{E=se}},l.unstable_requestPaint=function(){H=!0},l.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var se=E;E=U;try{return Z()}finally{E=se}},l.unstable_scheduleCallback=function(U,Z,se){var ue=l.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ue+se:ue):se=ue,U){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=se+ye,U={id:b++,callback:Z,priorityLevel:U,startTime:se,expirationTime:ye,sortIndex:-1},se>ue?(U.sortIndex=se,i(v,U),r(y)===null&&U===r(v)&&(B?(F($),$=-1):B=!0,ke(ae,se-ue))):(U.sortIndex=ye,i(y,U),L||M||(L=!0,he||(he=!0,be()))),U},l.unstable_shouldYield=je,l.unstable_wrapCallback=function(U){var Z=E;return function(){var se=E;E=Z;try{return U.apply(this,arguments)}finally{E=se}}}})(wo)),wo}var yp;function p0(){return yp||(yp=1,To.exports=m0()),To.exports}var Co={exports:{}},Ct={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var gp;function v0(){if(gp)return Ct;gp=1;var l=tf();function i(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)v+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var c={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(y,v,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:x==null?null:""+x,children:y,containerInfo:v,implementation:b}}var m=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Ct.createPortal=function(y,v){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return d(y,v,null,b)},Ct.flushSync=function(y){var v=m.T,b=c.p;try{if(m.T=null,c.p=2,y)return y()}finally{m.T=v,c.p=b,c.d.f()}},Ct.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,c.d.C(y,v))},Ct.prefetchDNS=function(y){typeof y=="string"&&c.d.D(y)},Ct.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var b=v.as,x=p(b,v.crossOrigin),E=typeof v.integrity=="string"?v.integrity:void 0,M=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;b==="style"?c.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:x,integrity:E,fetchPriority:M}):b==="script"&&c.d.X(y,{crossOrigin:x,integrity:E,fetchPriority:M,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Ct.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var b=p(v.as,v.crossOrigin);c.d.M(y,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&c.d.M(y)},Ct.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var b=v.as,x=p(b,v.crossOrigin);c.d.L(y,b,{crossOrigin:x,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Ct.preloadModule=function(y,v){if(typeof y=="string")if(v){var b=p(v.as,v.crossOrigin);c.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else c.d.m(y)},Ct.requestFormReset=function(y){c.d.r(y)},Ct.unstable_batchedUpdates=function(y,v){return y(v)},Ct.useFormState=function(y,v,b){return m.H.useFormState(y,v,b)},Ct.useFormStatus=function(){return m.H.useHostTransitionStatus()},Ct.version="19.2.0",Ct}var bp;function y0(){if(bp)return Co.exports;bp=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),Co.exports=v0(),Co.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var xp;function g0(){if(xp)return cs;xp=1;var l=p0(),i=tf(),r=y0();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(d(e)!==e)throw Error(c(188))}function v(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,n=t;;){var s=a.return;if(s===null)break;var u=s.alternate;if(u===null){if(n=s.return,n!==null){a=n;continue}break}if(s.child===u.child){for(u=s.child;u;){if(u===a)return y(s),e;if(u===n)return y(s),t;u=u.sibling}throw Error(c(188))}if(a.return!==n.return)a=s,n=u;else{for(var h=!1,g=s.child;g;){if(g===a){h=!0,a=s,n=u;break}if(g===n){h=!0,n=s,a=u;break}g=g.sibling}if(!h){for(g=u.child;g;){if(g===a){h=!0,a=u,n=s;break}if(g===n){h=!0,n=u,a=s;break}g=g.sibling}if(!h)throw Error(c(189))}}if(a.alternate!==n)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,E=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),K=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),qe=Symbol.iterator;function be(e){return e===null||typeof e!="object"?null:(e=qe&&e[qe]||e["@@iterator"],typeof e=="function"?e:null)}var nt=Symbol.for("react.client.reference");function Ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===nt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case P:return"Profiler";case H:return"StrictMode";case ae:return"Suspense";case he:return"SuspenseList";case ge:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case K:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:Ue(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return Ue(e(t))}catch{}}return null}var ke=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ue=[],ye=-1;function R(e){return{current:e}}function Y(e){0>ye||(e.current=ue[ye],ue[ye]=null,ye--)}function J(e,t){ye++,ue[ye]=e.current,e.current=t}var W=R(null),ce=R(null),me=R(null),Ce=R(null);function ft(e,t){switch(J(me,t),J(ce,e),J(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rm(t),e=Tm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(W),J(W,e)}function Pe(){Y(W),Y(ce),Y(me)}function Xl(e){e.memoizedState!==null&&J(Ce,e);var t=W.current,a=Tm(t,e.type);t!==a&&(J(ce,e),J(W,a))}function bn(e){ce.current===e&&(Y(W),Y(ce)),Ce.current===e&&(Y(Ce),ns._currentValue=se)}var mi,vt;function Ht(e){if(mi===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);mi=t&&t[1]||"",vt=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+mi+e+vt}var xn=!1;function pi(e,t){if(!e||xn)return"";xn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(q){var _=q}Reflect.construct(e,[],k)}else{try{k.call()}catch(q){_=q}e.call(k.prototype)}}else{try{throw Error()}catch(q){_=q}(k=e())&&typeof k.catch=="function"&&k.catch(function(){})}}catch(q){if(q&&_&&typeof q.stack=="string")return[q.stack,_.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),h=u[0],g=u[1];if(h&&g){var S=h.split(`
44
+ `),D=g.split(`
45
+ `);for(s=n=0;n<S.length&&!S[n].includes("DetermineComponentFrameRoot");)n++;for(;s<D.length&&!D[s].includes("DetermineComponentFrameRoot");)s++;if(n===S.length||s===D.length)for(n=S.length-1,s=D.length-1;1<=n&&0<=s&&S[n]!==D[s];)s--;for(;1<=n&&0<=s;n--,s--)if(S[n]!==D[s]){if(n!==1||s!==1)do if(n--,s--,0>s||S[n]!==D[s]){var Q=`
46
+ `+S[n].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),Q}while(1<=n&&0<=s);break}}}finally{xn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ht(a):""}function Ba(e,t){switch(e.tag){case 26:case 27:case 5:return Ht(e.type);case 16:return Ht("Lazy");case 13:return e.child!==t&&t!==null?Ht("Suspense Fallback"):Ht("Suspense");case 19:return Ht("SuspenseList");case 0:case 15:return pi(e.type,!1);case 11:return pi(e.type.render,!1);case 1:return pi(e.type,!0);case 31:return Ht("Activity");default:return""}}function ws(e){try{var t="",a=null;do t+=Ba(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
47
+ Error generating stack: `+n.message+`
48
+ `+n.stack}}var vi=Object.prototype.hasOwnProperty,Sn=l.unstable_scheduleCallback,yi=l.unstable_cancelCallback,fu=l.unstable_shouldYield,du=l.unstable_requestPaint,Ot=l.unstable_now,Qa=l.unstable_getCurrentPriorityLevel,fl=l.unstable_ImmediatePriority,gi=l.unstable_UserBlockingPriority,dl=l.unstable_NormalPriority,ba=l.unstable_LowPriority,aa=l.unstable_IdlePriority,hu=l.log,mu=l.unstable_setDisableYieldValue,Ya=null,At=null;function bt(e){if(typeof hu=="function"&&mu(e),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(Ya,e)}catch{}}var wt=Math.clz32?Math.clz32:pu,Cs=Math.log,Ms=Math.LN2;function pu(e){return e>>>=0,e===0?32:31-(Cs(e)/Ms|0)|0}var Kl=256,Ga=262144,Vl=4194304;function xa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function jn(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var s=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var g=n&134217727;return g!==0?(n=g&~u,n!==0?s=xa(n):(h&=g,h!==0?s=xa(h):a||(a=g&~e,a!==0&&(s=xa(a))))):(g=n&~u,g!==0?s=xa(g):h!==0?s=xa(h):a||(a=n&~e,a!==0&&(s=xa(a)))),s===0?0:t!==0&&t!==s&&(t&u)===0&&(u=s&-s,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:s}function hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vu(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bi(){var e=Vl;return Vl<<=1,(Vl&62914560)===0&&(Vl=4194304),e}function ml(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Oa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Os(e,t,a,n,s,u){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var g=e.entanglements,S=e.expirationTimes,D=e.hiddenUpdates;for(a=h&~a;0<a;){var Q=31-wt(a),k=1<<Q;g[Q]=0,S[Q]=-1;var _=D[Q];if(_!==null)for(D[Q]=null,Q=0;Q<_.length;Q++){var q=_[Q];q!==null&&(q.lane&=-536870913)}a&=~k}n!==0&&As(e,n,0),u!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function As(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-wt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function Ds(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-wt(a),s=1<<n;s&t|e[n]&t&&(e[n]|=t),a&=~s}}function j(e,t){var a=t&-t;return a=(a&42)!==0?1:w(a),(a&(e.suspendedLanes|t))!==0?0:a}function w(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function z(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function X(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Fm(e.type))}function V(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var le=Math.random().toString(36).slice(2),I="__reactFiber$"+le,te="__reactProps$"+le,ee="__reactContainer$"+le,fe="__reactEvents$"+le,de="__reactListeners$"+le,Ee="__reactHandles$"+le,ve="__reactResources$"+le,Me="__reactMarker$"+le;function Be(e){delete e[I],delete e[te],delete e[fe],delete e[de],delete e[Ee]}function et(e){var t=e[I];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ee]||a[I]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=zm(e);e!==null;){if(a=e[I])return a;e=zm(e)}return t}e=a,a=e.parentNode}return null}function Xe(e){if(e=e[I]||e[ee]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Le(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function rt(e){var t=e[ve];return t||(t=e[ve]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function He(e){e[Me]=!0}var pl=new Set,Sa={};function qt(e,t){Dt(e,t),Dt(e+"Capture",t)}function Dt(e,t){for(Sa[e]=t,e=0;e<t.length;e++)pl.add(t[e])}var la=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),En={},ja={};function Nn(e){return vi.call(ja,e)?!0:vi.call(En,e)?!1:la.test(e)?ja[e]=!0:(En[e]=!0,!1)}function ka(e,t,a){if(Nn(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Xa(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function xe(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function We(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ea(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(h){a=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rn(e){if(!e._valueTracker){var t=Vt(e)?"checked":"value";e._valueTracker=Ea(e,t,""+e[t])}}function Tn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Vt(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Ke(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ka=/[\n"\\]/g;function zt(e){return e.replace(Ka,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xi(e,t,a,n,s,u,h,g){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+We(t)):e.value!==""+We(t)&&(e.value=""+We(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?yu(e,h,We(t)):a!=null?yu(e,h,We(a)):n!=null&&e.removeAttribute("value"),s==null&&u!=null&&(e.defaultChecked=!!u),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+We(g):e.removeAttribute("name")}function bf(e,t,a,n,s,u,h,g){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Rn(e);return}a=a!=null?""+We(a):"",t=t!=null?""+We(t):a,g||t===e.value||(e.value=t),e.defaultValue=t}n=n??s,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=g?e.checked:!!n,e.defaultChecked=!!n,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Rn(e)}function yu(e,t,a){t==="number"&&Ke(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function wn(e,t,a,n){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&n&&(e[a].defaultSelected=!0)}else{for(a=""+We(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function xf(e,t,a){if(t!=null&&(t=""+We(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+We(a):""}function Sf(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(ke(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=We(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Rn(e)}function Cn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Sy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function jf(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Sy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Ef(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var s in t)n=t[s],t.hasOwnProperty(s)&&a[s]!==n&&jf(e,s,n)}else for(var u in t)t.hasOwnProperty(u)&&jf(e,u,t[u])}function gu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ey=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function zs(e){return Ey.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Va(){}var bu=null;function xu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mn=null,On=null;function Nf(e){var t=Xe(e);if(t&&(e=t.stateNode)){var a=e[te]||null;e:switch(e=t.stateNode,t.type){case"input":if(xi(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+zt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var s=n[te]||null;if(!s)throw Error(c(90));xi(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&Tn(n)}break e;case"textarea":xf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&wn(e,!!a.multiple,t,!1)}}}var Su=!1;function Rf(e,t,a){if(Su)return e(t,a);Su=!0;try{var n=e(t);return n}finally{if(Su=!1,(Mn!==null||On!==null)&&(xr(),Mn&&(t=Mn,e=On,On=Mn=null,Nf(t),e)))for(t=0;t<e.length;t++)Nf(e[t])}}function Si(e,t){var a=e.stateNode;if(a===null)return null;var n=a[te]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var Za=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ju=!1;if(Za)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){ju=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{ju=!1}var vl=null,Eu=null,_s=null;function Tf(){if(_s)return _s;var e,t=Eu,a=t.length,n,s="value"in vl?vl.value:vl.textContent,u=s.length;for(e=0;e<a&&t[e]===s[e];e++);var h=a-e;for(n=1;n<=h&&t[a-n]===s[u-n];n++);return _s=s.slice(e,1<n?1-n:void 0)}function Us(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ls(){return!0}function wf(){return!1}function Bt(e){function t(a,n,s,u,h){this._reactName=a,this._targetInst=s,this.type=n,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(a=e[g],this[g]=a?a(u):u[g]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ls:wf,this.isPropagationStopped=wf,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ls)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ls)},persist:function(){},isPersistent:Ls}),t}var Zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hs=Bt(Zl),Ei=x({},Zl,{view:0,detail:0}),Ny=Bt(Ei),Nu,Ru,Ni,qs=x({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ni&&(Ni&&e.type==="mousemove"?(Nu=e.screenX-Ni.screenX,Ru=e.screenY-Ni.screenY):Ru=Nu=0,Ni=e),Nu)},movementY:function(e){return"movementY"in e?e.movementY:Ru}}),Cf=Bt(qs),Ry=x({},qs,{dataTransfer:0}),Ty=Bt(Ry),wy=x({},Ei,{relatedTarget:0}),Tu=Bt(wy),Cy=x({},Zl,{animationName:0,elapsedTime:0,pseudoElement:0}),My=Bt(Cy),Oy=x({},Zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ay=Bt(Oy),Dy=x({},Zl,{data:0}),Mf=Bt(Dy),zy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_y={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Uy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ly(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uy[e])?!!t[e]:!1}function wu(){return Ly}var Hy=x({},Ei,{key:function(e){if(e.key){var t=zy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Us(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_y[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wu,charCode:function(e){return e.type==="keypress"?Us(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Us(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qy=Bt(Hy),By=x({},qs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Of=Bt(By),Qy=x({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wu}),Yy=Bt(Qy),Gy=x({},Zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ky=Bt(Gy),Xy=x({},qs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ky=Bt(Xy),Vy=x({},Zl,{newState:0,oldState:0}),Zy=Bt(Vy),$y=[9,13,27,32],Cu=Za&&"CompositionEvent"in window,Ri=null;Za&&"documentMode"in document&&(Ri=document.documentMode);var Fy=Za&&"TextEvent"in window&&!Ri,Af=Za&&(!Cu||Ri&&8<Ri&&11>=Ri),Df=" ",zf=!1;function _f(e,t){switch(e){case"keyup":return $y.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var An=!1;function Jy(e,t){switch(e){case"compositionend":return Uf(t);case"keypress":return t.which!==32?null:(zf=!0,Df);case"textInput":return e=t.data,e===Df&&zf?null:e;default:return null}}function Py(e,t){if(An)return e==="compositionend"||!Cu&&_f(e,t)?(e=Tf(),_s=Eu=vl=null,An=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Af&&t.locale!=="ko"?null:t.data;default:return null}}var Wy={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Lf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Wy[e.type]:t==="textarea"}function Hf(e,t,a,n){Mn?On?On.push(n):On=[n]:Mn=n,t=wr(t,"onChange"),0<t.length&&(a=new Hs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Ti=null,wi=null;function Iy(e){bm(e,0)}function Bs(e){var t=Le(e);if(Tn(t))return e}function qf(e,t){if(e==="change")return t}var Bf=!1;if(Za){var Mu;if(Za){var Ou="oninput"in document;if(!Ou){var Qf=document.createElement("div");Qf.setAttribute("oninput","return;"),Ou=typeof Qf.oninput=="function"}Mu=Ou}else Mu=!1;Bf=Mu&&(!document.documentMode||9<document.documentMode)}function Yf(){Ti&&(Ti.detachEvent("onpropertychange",Gf),wi=Ti=null)}function Gf(e){if(e.propertyName==="value"&&Bs(wi)){var t=[];Hf(t,wi,e,xu(e)),Rf(Iy,t)}}function eg(e,t,a){e==="focusin"?(Yf(),Ti=t,wi=a,Ti.attachEvent("onpropertychange",Gf)):e==="focusout"&&Yf()}function tg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bs(wi)}function ag(e,t){if(e==="click")return Bs(t)}function lg(e,t){if(e==="input"||e==="change")return Bs(t)}function ng(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:ng;function Ci(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var s=a[n];if(!vi.call(t,s)||!Zt(e[s],t[s]))return!1}return!0}function kf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xf(e,t){var a=kf(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=kf(a)}}function Kf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ke(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Ke(e.document)}return t}function Au(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var ig=Za&&"documentMode"in document&&11>=document.documentMode,Dn=null,Du=null,Mi=null,zu=!1;function Zf(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;zu||Dn==null||Dn!==Ke(n)||(n=Dn,"selectionStart"in n&&Au(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Mi&&Ci(Mi,n)||(Mi=n,n=wr(Du,"onSelect"),0<n.length&&(t=new Hs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Dn)))}function $l(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var zn={animationend:$l("Animation","AnimationEnd"),animationiteration:$l("Animation","AnimationIteration"),animationstart:$l("Animation","AnimationStart"),transitionrun:$l("Transition","TransitionRun"),transitionstart:$l("Transition","TransitionStart"),transitioncancel:$l("Transition","TransitionCancel"),transitionend:$l("Transition","TransitionEnd")},_u={},$f={};Za&&($f=document.createElement("div").style,"AnimationEvent"in window||(delete zn.animationend.animation,delete zn.animationiteration.animation,delete zn.animationstart.animation),"TransitionEvent"in window||delete zn.transitionend.transition);function Fl(e){if(_u[e])return _u[e];if(!zn[e])return e;var t=zn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in $f)return _u[e]=t[a];return e}var Ff=Fl("animationend"),Jf=Fl("animationiteration"),Pf=Fl("animationstart"),sg=Fl("transitionrun"),rg=Fl("transitionstart"),ug=Fl("transitioncancel"),Wf=Fl("transitionend"),If=new Map,Uu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Uu.push("scrollEnd");function Na(e,t){If.set(e,t),qt(t,[e])}var Qs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},na=[],_n=0,Lu=0;function Ys(){for(var e=_n,t=Lu=_n=0;t<e;){var a=na[t];na[t++]=null;var n=na[t];na[t++]=null;var s=na[t];na[t++]=null;var u=na[t];if(na[t++]=null,n!==null&&s!==null){var h=n.pending;h===null?s.next=s:(s.next=h.next,h.next=s),n.pending=s}u!==0&&ed(a,s,u)}}function Gs(e,t,a,n){na[_n++]=e,na[_n++]=t,na[_n++]=a,na[_n++]=n,Lu|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Hu(e,t,a,n){return Gs(e,t,a,n),ks(e)}function Jl(e,t){return Gs(e,null,null,t),ks(e)}function ed(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var s=!1,u=e.return;u!==null;)u.childLanes|=a,n=u.alternate,n!==null&&(n.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(s=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,s&&t!==null&&(s=31-wt(a),e=u.hiddenUpdates,n=e[s],n===null?e[s]=[t]:n.push(t),t.lane=a|536870912),u):null}function ks(e){if(50<Pi)throw Pi=0,Vc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Un={};function cg(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,a,n){return new cg(e,t,a,n)}function qu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $a(e,t){var a=e.alternate;return a===null?(a=$t(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function td(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Xs(e,t,a,n,s,u){var h=0;if(n=e,typeof e=="function")qu(e)&&(h=1);else if(typeof e=="string")h=mb(e,a,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ge:return e=$t(31,a,t,s),e.elementType=ge,e.lanes=u,e;case B:return Pl(a.children,s,u,t);case H:h=8,s|=24;break;case P:return e=$t(12,a,t,s|2),e.elementType=P,e.lanes=u,e;case ae:return e=$t(13,a,t,s),e.elementType=ae,e.lanes=u,e;case he:return e=$t(19,a,t,s),e.elementType=he,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:h=10;break e;case F:h=9;break e;case ie:h=11;break e;case $:h=14;break e;case O:h=16,n=null;break e}h=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=$t(h,a,t,s),t.elementType=e,t.type=n,t.lanes=u,t}function Pl(e,t,a,n){return e=$t(7,e,n,t),e.lanes=a,e}function Bu(e,t,a){return e=$t(6,e,null,t),e.lanes=a,e}function ad(e){var t=$t(18,null,null,0);return t.stateNode=e,t}function Qu(e,t,a){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ld=new WeakMap;function ia(e,t){if(typeof e=="object"&&e!==null){var a=ld.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ws(t)},ld.set(e,t),t)}return{value:e,source:t,stack:ws(t)}}var Ln=[],Hn=0,Ks=null,Oi=0,sa=[],ra=0,yl=null,Aa=1,Da="";function Fa(e,t){Ln[Hn++]=Oi,Ln[Hn++]=Ks,Ks=e,Oi=t}function nd(e,t,a){sa[ra++]=Aa,sa[ra++]=Da,sa[ra++]=yl,yl=e;var n=Aa;e=Da;var s=32-wt(n)-1;n&=~(1<<s),a+=1;var u=32-wt(t)+s;if(30<u){var h=s-s%5;u=(n&(1<<h)-1).toString(32),n>>=h,s-=h,Aa=1<<32-wt(t)+s|a<<s|n,Da=u+e}else Aa=1<<u|a<<s|n,Da=e}function Yu(e){e.return!==null&&(Fa(e,1),nd(e,1,0))}function Gu(e){for(;e===Ks;)Ks=Ln[--Hn],Ln[Hn]=null,Oi=Ln[--Hn],Ln[Hn]=null;for(;e===yl;)yl=sa[--ra],sa[ra]=null,Da=sa[--ra],sa[ra]=null,Aa=sa[--ra],sa[ra]=null}function id(e,t){sa[ra++]=Aa,sa[ra++]=Da,sa[ra++]=yl,Aa=t.id,Da=t.overflow,yl=e}var St=null,tt=null,_e=!1,gl=null,ua=!1,ku=Error(c(519));function bl(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ai(ia(t,e)),ku}function sd(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[I]=e,t[te]=n,a){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(a=0;a<Ii.length;a++)Ae(Ii[a],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),bf(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Sf(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||Em(t.textContent,a)?(n.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),n.onScroll!=null&&Ae("scroll",t),n.onScrollEnd!=null&&Ae("scrollend",t),n.onClick!=null&&(t.onclick=Va),t=!0):t=!1,t||bl(e,!0)}function rd(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:ua=!1;return;case 27:case 3:ua=!0;return;default:St=St.return}}function qn(e){if(e!==St)return!1;if(!_e)return rd(e),_e=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ro(e.type,e.memoizedProps)),a=!a),a&&tt&&bl(e),rd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));tt=Dm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));tt=Dm(e)}else t===27?(t=tt,zl(e.type)?(e=ho,ho=null,tt=e):tt=t):tt=St?oa(e.stateNode.nextSibling):null;return!0}function Wl(){tt=St=null,_e=!1}function Xu(){var e=gl;return e!==null&&(kt===null?kt=e:kt.push.apply(kt,e),gl=null),e}function Ai(e){gl===null?gl=[e]:gl.push(e)}var Ku=R(null),Il=null,Ja=null;function xl(e,t,a){J(Ku,t._currentValue),t._currentValue=a}function Pa(e){e._currentValue=Ku.current,Y(Ku)}function Vu(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Zu(e,t,a,n){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var u=s.dependencies;if(u!==null){var h=s.child;u=u.firstContext;e:for(;u!==null;){var g=u;u=s;for(var S=0;S<t.length;S++)if(g.context===t[S]){u.lanes|=a,g=u.alternate,g!==null&&(g.lanes|=a),Vu(u.return,a,e),n||(h=null);break e}u=g.next}}else if(s.tag===18){if(h=s.return,h===null)throw Error(c(341));h.lanes|=a,u=h.alternate,u!==null&&(u.lanes|=a),Vu(h,a,e),h=null}else h=s.child;if(h!==null)h.return=s;else for(h=s;h!==null;){if(h===e){h=null;break}if(s=h.sibling,s!==null){s.return=h.return,h=s;break}h=h.return}s=h}}function Bn(e,t,a,n){e=null;for(var s=t,u=!1;s!==null;){if(!u){if((s.flags&524288)!==0)u=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var h=s.alternate;if(h===null)throw Error(c(387));if(h=h.memoizedProps,h!==null){var g=s.type;Zt(s.pendingProps.value,h.value)||(e!==null?e.push(g):e=[g])}}else if(s===Ce.current){if(h=s.alternate,h===null)throw Error(c(387));h.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ns):e=[ns])}s=s.return}e!==null&&Zu(t,e,a,n),t.flags|=262144}function Vs(e){for(e=e.firstContext;e!==null;){if(!Zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function en(e){Il=e,Ja=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function jt(e){return ud(Il,e)}function Zs(e,t){return Il===null&&en(e),ud(e,t)}function ud(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ja===null){if(e===null)throw Error(c(308));Ja=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ja=Ja.next=t;return a}var og=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},fg=l.unstable_scheduleCallback,dg=l.unstable_NormalPriority,dt={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $u(){return{controller:new og,data:new Map,refCount:0}}function Di(e){e.refCount--,e.refCount===0&&fg(dg,function(){e.controller.abort()})}var zi=null,Fu=0,Qn=0,Yn=null;function hg(e,t){if(zi===null){var a=zi=[];Fu=0,Qn=Wc(),Yn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Fu++,t.then(cd,cd),t}function cd(){if(--Fu===0&&zi!==null){Yn!==null&&(Yn.status="fulfilled");var e=zi;zi=null,Qn=0,Yn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function mg(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(n.status="rejected",n.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),n}var od=U.S;U.S=function(e,t){Zh=Ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&hg(e,t),od!==null&&od(e,t)};var tn=R(null);function Ju(){var e=tn.current;return e!==null?e:Ie.pooledCache}function $s(e,t){t===null?J(tn,tn.current):J(tn,t.pool)}function fd(){var e=Ju();return e===null?null:{parent:dt._currentValue,pool:e}}var Gn=Error(c(460)),Pu=Error(c(474)),Fs=Error(c(542)),Js={then:function(){}};function dd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hd(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Va,Va),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pd(e),e;default:if(typeof t.status=="string")t.then(Va,Va);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=n}},function(n){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pd(e),e}throw ln=t,Gn}}function an(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ln=a,Gn):a}}var ln=null;function md(){if(ln===null)throw Error(c(459));var e=ln;return ln=null,e}function pd(e){if(e===Gn||e===Fs)throw Error(c(483))}var kn=null,_i=0;function Ps(e){var t=_i;return _i+=1,kn===null&&(kn=[]),hd(kn,e,t)}function Ui(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ws(e,t){throw t.$$typeof===E?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function vd(e){function t(C,T){if(e){var A=C.deletions;A===null?(C.deletions=[T],C.flags|=16):A.push(T)}}function a(C,T){if(!e)return null;for(;T!==null;)t(C,T),T=T.sibling;return null}function n(C){for(var T=new Map;C!==null;)C.key!==null?T.set(C.key,C):T.set(C.index,C),C=C.sibling;return T}function s(C,T){return C=$a(C,T),C.index=0,C.sibling=null,C}function u(C,T,A){return C.index=A,e?(A=C.alternate,A!==null?(A=A.index,A<T?(C.flags|=67108866,T):A):(C.flags|=67108866,T)):(C.flags|=1048576,T)}function h(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function g(C,T,A,G){return T===null||T.tag!==6?(T=Bu(A,C.mode,G),T.return=C,T):(T=s(T,A),T.return=C,T)}function S(C,T,A,G){var oe=A.type;return oe===B?Q(C,T,A.props.children,G,A.key):T!==null&&(T.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===O&&an(oe)===T.type)?(T=s(T,A.props),Ui(T,A),T.return=C,T):(T=Xs(A.type,A.key,A.props,null,C.mode,G),Ui(T,A),T.return=C,T)}function D(C,T,A,G){return T===null||T.tag!==4||T.stateNode.containerInfo!==A.containerInfo||T.stateNode.implementation!==A.implementation?(T=Qu(A,C.mode,G),T.return=C,T):(T=s(T,A.children||[]),T.return=C,T)}function Q(C,T,A,G,oe){return T===null||T.tag!==7?(T=Pl(A,C.mode,G,oe),T.return=C,T):(T=s(T,A),T.return=C,T)}function k(C,T,A){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Bu(""+T,C.mode,A),T.return=C,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case M:return A=Xs(T.type,T.key,T.props,null,C.mode,A),Ui(A,T),A.return=C,A;case L:return T=Qu(T,C.mode,A),T.return=C,T;case O:return T=an(T),k(C,T,A)}if(ke(T)||be(T))return T=Pl(T,C.mode,A,null),T.return=C,T;if(typeof T.then=="function")return k(C,Ps(T),A);if(T.$$typeof===K)return k(C,Zs(C,T),A);Ws(C,T)}return null}function _(C,T,A,G){var oe=T!==null?T.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return oe!==null?null:g(C,T,""+A,G);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case M:return A.key===oe?S(C,T,A,G):null;case L:return A.key===oe?D(C,T,A,G):null;case O:return A=an(A),_(C,T,A,G)}if(ke(A)||be(A))return oe!==null?null:Q(C,T,A,G,null);if(typeof A.then=="function")return _(C,T,Ps(A),G);if(A.$$typeof===K)return _(C,T,Zs(C,A),G);Ws(C,A)}return null}function q(C,T,A,G,oe){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return C=C.get(A)||null,g(T,C,""+G,oe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case M:return C=C.get(G.key===null?A:G.key)||null,S(T,C,G,oe);case L:return C=C.get(G.key===null?A:G.key)||null,D(T,C,G,oe);case O:return G=an(G),q(C,T,A,G,oe)}if(ke(G)||be(G))return C=C.get(A)||null,Q(T,C,G,oe,null);if(typeof G.then=="function")return q(C,T,A,Ps(G),oe);if(G.$$typeof===K)return q(C,T,A,Zs(T,G),oe);Ws(T,G)}return null}function ne(C,T,A,G){for(var oe=null,Qe=null,re=T,Re=T=0,ze=null;re!==null&&Re<A.length;Re++){re.index>Re?(ze=re,re=null):ze=re.sibling;var Ye=_(C,re,A[Re],G);if(Ye===null){re===null&&(re=ze);break}e&&re&&Ye.alternate===null&&t(C,re),T=u(Ye,T,Re),Qe===null?oe=Ye:Qe.sibling=Ye,Qe=Ye,re=ze}if(Re===A.length)return a(C,re),_e&&Fa(C,Re),oe;if(re===null){for(;Re<A.length;Re++)re=k(C,A[Re],G),re!==null&&(T=u(re,T,Re),Qe===null?oe=re:Qe.sibling=re,Qe=re);return _e&&Fa(C,Re),oe}for(re=n(re);Re<A.length;Re++)ze=q(re,C,Re,A[Re],G),ze!==null&&(e&&ze.alternate!==null&&re.delete(ze.key===null?Re:ze.key),T=u(ze,T,Re),Qe===null?oe=ze:Qe.sibling=ze,Qe=ze);return e&&re.forEach(function(ql){return t(C,ql)}),_e&&Fa(C,Re),oe}function pe(C,T,A,G){if(A==null)throw Error(c(151));for(var oe=null,Qe=null,re=T,Re=T=0,ze=null,Ye=A.next();re!==null&&!Ye.done;Re++,Ye=A.next()){re.index>Re?(ze=re,re=null):ze=re.sibling;var ql=_(C,re,Ye.value,G);if(ql===null){re===null&&(re=ze);break}e&&re&&ql.alternate===null&&t(C,re),T=u(ql,T,Re),Qe===null?oe=ql:Qe.sibling=ql,Qe=ql,re=ze}if(Ye.done)return a(C,re),_e&&Fa(C,Re),oe;if(re===null){for(;!Ye.done;Re++,Ye=A.next())Ye=k(C,Ye.value,G),Ye!==null&&(T=u(Ye,T,Re),Qe===null?oe=Ye:Qe.sibling=Ye,Qe=Ye);return _e&&Fa(C,Re),oe}for(re=n(re);!Ye.done;Re++,Ye=A.next())Ye=q(re,C,Re,Ye.value,G),Ye!==null&&(e&&Ye.alternate!==null&&re.delete(Ye.key===null?Re:Ye.key),T=u(Ye,T,Re),Qe===null?oe=Ye:Qe.sibling=Ye,Qe=Ye);return e&&re.forEach(function(Rb){return t(C,Rb)}),_e&&Fa(C,Re),oe}function Je(C,T,A,G){if(typeof A=="object"&&A!==null&&A.type===B&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case M:e:{for(var oe=A.key;T!==null;){if(T.key===oe){if(oe=A.type,oe===B){if(T.tag===7){a(C,T.sibling),G=s(T,A.props.children),G.return=C,C=G;break e}}else if(T.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===O&&an(oe)===T.type){a(C,T.sibling),G=s(T,A.props),Ui(G,A),G.return=C,C=G;break e}a(C,T);break}else t(C,T);T=T.sibling}A.type===B?(G=Pl(A.props.children,C.mode,G,A.key),G.return=C,C=G):(G=Xs(A.type,A.key,A.props,null,C.mode,G),Ui(G,A),G.return=C,C=G)}return h(C);case L:e:{for(oe=A.key;T!==null;){if(T.key===oe)if(T.tag===4&&T.stateNode.containerInfo===A.containerInfo&&T.stateNode.implementation===A.implementation){a(C,T.sibling),G=s(T,A.children||[]),G.return=C,C=G;break e}else{a(C,T);break}else t(C,T);T=T.sibling}G=Qu(A,C.mode,G),G.return=C,C=G}return h(C);case O:return A=an(A),Je(C,T,A,G)}if(ke(A))return ne(C,T,A,G);if(be(A)){if(oe=be(A),typeof oe!="function")throw Error(c(150));return A=oe.call(A),pe(C,T,A,G)}if(typeof A.then=="function")return Je(C,T,Ps(A),G);if(A.$$typeof===K)return Je(C,T,Zs(C,A),G);Ws(C,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,T!==null&&T.tag===6?(a(C,T.sibling),G=s(T,A),G.return=C,C=G):(a(C,T),G=Bu(A,C.mode,G),G.return=C,C=G),h(C)):a(C,T)}return function(C,T,A,G){try{_i=0;var oe=Je(C,T,A,G);return kn=null,oe}catch(re){if(re===Gn||re===Fs)throw re;var Qe=$t(29,re,null,C.mode);return Qe.lanes=G,Qe.return=C,Qe}finally{}}}var nn=vd(!0),yd=vd(!1),Sl=!1;function Wu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Iu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function jl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function El(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ge&2)!==0){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,t=ks(e),ed(e,null,a),t}return Gs(e,n,t,a),ks(e)}function Li(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Ds(e,a)}}function ec(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var s=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?s=u=h:u=u.next=h,a=a.next}while(a!==null);u===null?s=u=t:u=u.next=t}else s=u=t;a={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var tc=!1;function Hi(){if(tc){var e=Yn;if(e!==null)throw e}}function qi(e,t,a,n){tc=!1;var s=e.updateQueue;Sl=!1;var u=s.firstBaseUpdate,h=s.lastBaseUpdate,g=s.shared.pending;if(g!==null){s.shared.pending=null;var S=g,D=S.next;S.next=null,h===null?u=D:h.next=D,h=S;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,g=Q.lastBaseUpdate,g!==h&&(g===null?Q.firstBaseUpdate=D:g.next=D,Q.lastBaseUpdate=S))}if(u!==null){var k=s.baseState;h=0,Q=D=S=null,g=u;do{var _=g.lane&-536870913,q=_!==g.lane;if(q?(De&_)===_:(n&_)===_){_!==0&&_===Qn&&(tc=!0),Q!==null&&(Q=Q.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ne=e,pe=g;_=t;var Je=a;switch(pe.tag){case 1:if(ne=pe.payload,typeof ne=="function"){k=ne.call(Je,k,_);break e}k=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=pe.payload,_=typeof ne=="function"?ne.call(Je,k,_):ne,_==null)break e;k=x({},k,_);break e;case 2:Sl=!0}}_=g.callback,_!==null&&(e.flags|=64,q&&(e.flags|=8192),q=s.callbacks,q===null?s.callbacks=[_]:q.push(_))}else q={lane:_,tag:g.tag,payload:g.payload,callback:g.callback,next:null},Q===null?(D=Q=q,S=k):Q=Q.next=q,h|=_;if(g=g.next,g===null){if(g=s.shared.pending,g===null)break;q=g,g=q.next,q.next=null,s.lastBaseUpdate=q,s.shared.pending=null}}while(!0);Q===null&&(S=k),s.baseState=S,s.firstBaseUpdate=D,s.lastBaseUpdate=Q,u===null&&(s.shared.lanes=0),Cl|=h,e.lanes=h,e.memoizedState=k}}function gd(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function bd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)gd(a[e],t)}var Xn=R(null),Is=R(0);function xd(e,t){e=sl,J(Is,e),J(Xn,t),sl=e|t.baseLanes}function ac(){J(Is,sl),J(Xn,Xn.current)}function lc(){sl=Is.current,Y(Xn),Y(Is)}var Ft=R(null),ca=null;function Nl(e){var t=e.alternate;J(ut,ut.current&1),J(Ft,e),ca===null&&(t===null||Xn.current!==null||t.memoizedState!==null)&&(ca=e)}function nc(e){J(ut,ut.current),J(Ft,e),ca===null&&(ca=e)}function Sd(e){e.tag===22?(J(ut,ut.current),J(Ft,e),ca===null&&(ca=e)):Rl()}function Rl(){J(ut,ut.current),J(Ft,Ft.current)}function Jt(e){Y(Ft),ca===e&&(ca=null),Y(ut)}var ut=R(0);function er(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||oo(a)||fo(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wa=0,Ne=null,$e=null,ht=null,tr=!1,Kn=!1,sn=!1,ar=0,Bi=0,Vn=null,pg=0;function it(){throw Error(c(321))}function ic(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Zt(e[a],t[a]))return!1;return!0}function sc(e,t,a,n,s,u){return Wa=u,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?nh:Sc,sn=!1,u=a(n,s),sn=!1,Kn&&(u=Ed(t,a,n,s)),jd(e),u}function jd(e){U.H=Gi;var t=$e!==null&&$e.next!==null;if(Wa=0,ht=$e=Ne=null,tr=!1,Bi=0,Vn=null,t)throw Error(c(300));e===null||mt||(e=e.dependencies,e!==null&&Vs(e)&&(mt=!0))}function Ed(e,t,a,n){Ne=e;var s=0;do{if(Kn&&(Vn=null),Bi=0,Kn=!1,25<=s)throw Error(c(301));if(s+=1,ht=$e=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}U.H=ih,u=t(a,n)}while(Kn);return u}function vg(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Qi(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Ne.flags|=1024),t}function rc(){var e=ar!==0;return ar=0,e}function uc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function cc(e){if(tr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}tr=!1}Wa=0,ht=$e=Ne=null,Kn=!1,Bi=ar=0,Vn=null}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?Ne.memoizedState=ht=e:ht=ht.next=e,ht}function ct(){if($e===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=ht===null?Ne.memoizedState:ht.next;if(t!==null)ht=t,$e=e;else{if(e===null)throw Ne.alternate===null?Error(c(467)):Error(c(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},ht===null?Ne.memoizedState=ht=e:ht=ht.next=e}return ht}function lr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qi(e){var t=Bi;return Bi+=1,Vn===null&&(Vn=[]),e=hd(Vn,e,t),t=Ne,(ht===null?t.memoizedState:ht.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?nh:Sc),e}function nr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Qi(e);if(e.$$typeof===K)return jt(e)}throw Error(c(438,String(e)))}function oc(e){var t=null,a=Ne.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ne.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=lr(),Ne.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=je;return t.index++,a}function Ia(e,t){return typeof t=="function"?t(e):t}function ir(e){var t=ct();return fc(t,$e,e)}function fc(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var s=e.baseQueue,u=n.pending;if(u!==null){if(s!==null){var h=s.next;s.next=u.next,u.next=h}t.baseQueue=s=u,n.pending=null}if(u=e.baseState,s===null)e.memoizedState=u;else{t=s.next;var g=h=null,S=null,D=t,Q=!1;do{var k=D.lane&-536870913;if(k!==D.lane?(De&k)===k:(Wa&k)===k){var _=D.revertLane;if(_===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),k===Qn&&(Q=!0);else if((Wa&_)===_){D=D.next,_===Qn&&(Q=!0);continue}else k={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},S===null?(g=S=k,h=u):S=S.next=k,Ne.lanes|=_,Cl|=_;k=D.action,sn&&a(u,k),u=D.hasEagerState?D.eagerState:a(u,k)}else _={lane:k,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},S===null?(g=S=_,h=u):S=S.next=_,Ne.lanes|=k,Cl|=k;D=D.next}while(D!==null&&D!==t);if(S===null?h=u:S.next=g,!Zt(u,e.memoizedState)&&(mt=!0,Q&&(a=Yn,a!==null)))throw a;e.memoizedState=u,e.baseState=h,e.baseQueue=S,n.lastRenderedState=u}return s===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function dc(e){var t=ct(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,s=a.pending,u=t.memoizedState;if(s!==null){a.pending=null;var h=s=s.next;do u=e(u,h.action),h=h.next;while(h!==s);Zt(u,t.memoizedState)||(mt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function Nd(e,t,a){var n=Ne,s=ct(),u=_e;if(u){if(a===void 0)throw Error(c(407));a=a()}else a=t();var h=!Zt(($e||s).memoizedState,a);if(h&&(s.memoizedState=a,mt=!0),s=s.queue,pc(wd.bind(null,n,s,e),[e]),s.getSnapshot!==t||h||ht!==null&&ht.memoizedState.tag&1){if(n.flags|=2048,Zn(9,{destroy:void 0},Td.bind(null,n,s,a,t),null),Ie===null)throw Error(c(349));u||(Wa&127)!==0||Rd(n,t,a)}return a}function Rd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ne.updateQueue,t===null?(t=lr(),Ne.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Td(e,t,a,n){t.value=a,t.getSnapshot=n,Cd(t)&&Md(e)}function wd(e,t,a){return a(function(){Cd(t)&&Md(e)})}function Cd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Zt(e,a)}catch{return!0}}function Md(e){var t=Jl(e,2);t!==null&&Xt(t,e,2)}function hc(e){var t=_t();if(typeof e=="function"){var a=e;if(e=a(),sn){bt(!0);try{a()}finally{bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ia,lastRenderedState:e},t}function Od(e,t,a,n){return e.baseState=a,fc(e,$e,typeof n=="function"?n:Ia)}function yg(e,t,a,n,s){if(ur(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};U.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,Ad(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Ad(e,t){var a=t.action,n=t.payload,s=e.state;if(t.isTransition){var u=U.T,h={};U.T=h;try{var g=a(s,n),S=U.S;S!==null&&S(h,g),Dd(e,t,g)}catch(D){mc(e,t,D)}finally{u!==null&&h.types!==null&&(u.types=h.types),U.T=u}}else try{u=a(s,n),Dd(e,t,u)}catch(D){mc(e,t,D)}}function Dd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){zd(e,t,n)},function(n){return mc(e,t,n)}):zd(e,t,a)}function zd(e,t,a){t.status="fulfilled",t.value=a,_d(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ad(e,a)))}function mc(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,_d(t),t=t.next;while(t!==n)}e.action=null}function _d(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ud(e,t){return t}function Ld(e,t){if(_e){var a=Ie.formState;if(a!==null){e:{var n=Ne;if(_e){if(tt){t:{for(var s=tt,u=ua;s.nodeType!==8;){if(!u){s=null;break t}if(s=oa(s.nextSibling),s===null){s=null;break t}}u=s.data,s=u==="F!"||u==="F"?s:null}if(s){tt=oa(s.nextSibling),n=s.data==="F!";break e}}bl(n)}n=!1}n&&(t=a[0])}}return a=_t(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ud,lastRenderedState:t},a.queue=n,a=th.bind(null,Ne,n),n.dispatch=a,n=hc(!1),u=xc.bind(null,Ne,!1,n.queue),n=_t(),s={state:t,dispatch:null,action:e,pending:null},n.queue=s,a=yg.bind(null,Ne,s,u,a),s.dispatch=a,n.memoizedState=e,[t,a,!1]}function Hd(e){var t=ct();return qd(t,$e,e)}function qd(e,t,a){if(t=fc(e,t,Ud)[0],e=ir(Ia)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Qi(t)}catch(h){throw h===Gn?Fs:h}else n=t;t=ct();var s=t.queue,u=s.dispatch;return a!==t.memoizedState&&(Ne.flags|=2048,Zn(9,{destroy:void 0},gg.bind(null,s,a),null)),[n,u,e]}function gg(e,t){e.action=t}function Bd(e){var t=ct(),a=$e;if(a!==null)return qd(t,a,e);ct(),t=t.memoizedState,a=ct();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Zn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=lr(),Ne.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Qd(){return ct().memoizedState}function sr(e,t,a,n){var s=_t();Ne.flags|=e,s.memoizedState=Zn(1|t,{destroy:void 0},a,n===void 0?null:n)}function rr(e,t,a,n){var s=ct();n=n===void 0?null:n;var u=s.memoizedState.inst;$e!==null&&n!==null&&ic(n,$e.memoizedState.deps)?s.memoizedState=Zn(t,u,a,n):(Ne.flags|=e,s.memoizedState=Zn(1|t,u,a,n))}function Yd(e,t){sr(8390656,8,e,t)}function pc(e,t){rr(2048,8,e,t)}function bg(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=lr(),Ne.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Gd(e){var t=ct().memoizedState;return bg({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function kd(e,t){return rr(4,2,e,t)}function Xd(e,t){return rr(4,4,e,t)}function Kd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vd(e,t,a){a=a!=null?a.concat([e]):null,rr(4,4,Kd.bind(null,t,e),a)}function vc(){}function Zd(e,t){var a=ct();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&ic(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function $d(e,t){var a=ct();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&ic(t,n[1]))return n[0];if(n=e(),sn){bt(!0);try{e()}finally{bt(!1)}}return a.memoizedState=[n,t],n}function yc(e,t,a){return a===void 0||(Wa&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Fh(),Ne.lanes|=e,Cl|=e,a)}function Fd(e,t,a,n){return Zt(a,t)?a:Xn.current!==null?(e=yc(e,a,n),Zt(e,t)||(mt=!0),e):(Wa&42)===0||(Wa&1073741824)!==0&&(De&261930)===0?(mt=!0,e.memoizedState=a):(e=Fh(),Ne.lanes|=e,Cl|=e,t)}function Jd(e,t,a,n,s){var u=Z.p;Z.p=u!==0&&8>u?u:8;var h=U.T,g={};U.T=g,xc(e,!1,t,a);try{var S=s(),D=U.S;if(D!==null&&D(g,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var Q=mg(S,n);Yi(e,t,Q,It(e))}else Yi(e,t,n,It(e))}catch(k){Yi(e,t,{then:function(){},status:"rejected",reason:k},It())}finally{Z.p=u,h!==null&&g.types!==null&&(h.types=g.types),U.T=h}}function xg(){}function gc(e,t,a,n){if(e.tag!==5)throw Error(c(476));var s=Pd(e).queue;Jd(e,s,t,se,a===null?xg:function(){return Wd(e),a(n)})}function Pd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ia,lastRenderedState:se},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ia,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wd(e){var t=Pd(e);t.next===null&&(t=e.alternate.memoizedState),Yi(e,t.next.queue,{},It())}function bc(){return jt(ns)}function Id(){return ct().memoizedState}function eh(){return ct().memoizedState}function Sg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=It();e=jl(a);var n=El(t,e,a);n!==null&&(Xt(n,t,a),Li(n,t,a)),t={cache:$u()},e.payload=t;return}t=t.return}}function jg(e,t,a){var n=It();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ur(e)?ah(t,a):(a=Hu(e,t,a,n),a!==null&&(Xt(a,e,n),lh(a,t,n)))}function th(e,t,a){var n=It();Yi(e,t,a,n)}function Yi(e,t,a,n){var s={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ur(e))ah(t,s);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,g=u(h,a);if(s.hasEagerState=!0,s.eagerState=g,Zt(g,h))return Gs(e,t,s,0),Ie===null&&Ys(),!1}catch{}finally{}if(a=Hu(e,t,s,n),a!==null)return Xt(a,e,n),lh(a,t,n),!0}return!1}function xc(e,t,a,n){if(n={lane:2,revertLane:Wc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ur(e)){if(t)throw Error(c(479))}else t=Hu(e,a,n,2),t!==null&&Xt(t,e,2)}function ur(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function ah(e,t){Kn=tr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function lh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Ds(e,a)}}var Gi={readContext:jt,use:nr,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};Gi.useEffectEvent=it;var nh={readContext:jt,use:nr,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:Yd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,sr(4194308,4,Kd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return sr(4194308,4,e,t)},useInsertionEffect:function(e,t){sr(4,2,e,t)},useMemo:function(e,t){var a=_t();t=t===void 0?null:t;var n=e();if(sn){bt(!0);try{e()}finally{bt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=_t();if(a!==void 0){var s=a(t);if(sn){bt(!0);try{a(t)}finally{bt(!1)}}}else s=t;return n.memoizedState=n.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},n.queue=e,e=e.dispatch=jg.bind(null,Ne,e),[n.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:function(e){e=hc(e);var t=e.queue,a=th.bind(null,Ne,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:vc,useDeferredValue:function(e,t){var a=_t();return yc(a,e,t)},useTransition:function(){var e=hc(!1);return e=Jd.bind(null,Ne,e.queue,!0,!1),_t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ne,s=_t();if(_e){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Ie===null)throw Error(c(349));(De&127)!==0||Rd(n,t,a)}s.memoizedState=a;var u={value:a,getSnapshot:t};return s.queue=u,Yd(wd.bind(null,n,u,e),[e]),n.flags|=2048,Zn(9,{destroy:void 0},Td.bind(null,n,u,a,t),null),a},useId:function(){var e=_t(),t=Ie.identifierPrefix;if(_e){var a=Da,n=Aa;a=(n&~(1<<32-wt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ar++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=pg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bc,useFormState:Ld,useActionState:Ld,useOptimistic:function(e){var t=_t();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=xc.bind(null,Ne,!0,a),a.dispatch=t,[e,t]},useMemoCache:oc,useCacheRefresh:function(){return _t().memoizedState=Sg.bind(null,Ne)},useEffectEvent:function(e){var t=_t(),a={impl:e};return t.memoizedState=a,function(){if((Ge&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},Sc={readContext:jt,use:nr,useCallback:Zd,useContext:jt,useEffect:pc,useImperativeHandle:Vd,useInsertionEffect:kd,useLayoutEffect:Xd,useMemo:$d,useReducer:ir,useRef:Qd,useState:function(){return ir(Ia)},useDebugValue:vc,useDeferredValue:function(e,t){var a=ct();return Fd(a,$e.memoizedState,e,t)},useTransition:function(){var e=ir(Ia)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Qi(e),t]},useSyncExternalStore:Nd,useId:Id,useHostTransitionStatus:bc,useFormState:Hd,useActionState:Hd,useOptimistic:function(e,t){var a=ct();return Od(a,$e,e,t)},useMemoCache:oc,useCacheRefresh:eh};Sc.useEffectEvent=Gd;var ih={readContext:jt,use:nr,useCallback:Zd,useContext:jt,useEffect:pc,useImperativeHandle:Vd,useInsertionEffect:kd,useLayoutEffect:Xd,useMemo:$d,useReducer:dc,useRef:Qd,useState:function(){return dc(Ia)},useDebugValue:vc,useDeferredValue:function(e,t){var a=ct();return $e===null?yc(a,e,t):Fd(a,$e.memoizedState,e,t)},useTransition:function(){var e=dc(Ia)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Qi(e),t]},useSyncExternalStore:Nd,useId:Id,useHostTransitionStatus:bc,useFormState:Bd,useActionState:Bd,useOptimistic:function(e,t){var a=ct();return $e!==null?Od(a,$e,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:oc,useCacheRefresh:eh};ih.useEffectEvent=Gd;function jc(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ec={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=It(),s=jl(n);s.payload=t,a!=null&&(s.callback=a),t=El(e,s,n),t!==null&&(Xt(t,e,n),Li(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=It(),s=jl(n);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=El(e,s,n),t!==null&&(Xt(t,e,n),Li(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=It(),n=jl(a);n.tag=2,t!=null&&(n.callback=t),t=El(e,n,a),t!==null&&(Xt(t,e,a),Li(t,e,a))}};function sh(e,t,a,n,s,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,h):t.prototype&&t.prototype.isPureReactComponent?!Ci(a,n)||!Ci(s,u):!0}function rh(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function rn(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function uh(e){Qs(e)}function ch(e){console.error(e)}function oh(e){Qs(e)}function cr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function fh(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Nc(e,t,a){return a=jl(a),a.tag=3,a.payload={element:null},a.callback=function(){cr(e,t)},a}function dh(e){return e=jl(e),e.tag=3,e}function hh(e,t,a,n){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var u=n.value;e.payload=function(){return s(u)},e.callback=function(){fh(t,a,n)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){fh(t,a,n),typeof s!="function"&&(Ml===null?Ml=new Set([this]):Ml.add(this));var g=n.stack;this.componentDidCatch(n.value,{componentStack:g!==null?g:""})})}function Eg(e,t,a,n,s){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Bn(t,a,s,!0),a=Ft.current,a!==null){switch(a.tag){case 31:case 13:return ca===null?Sr():a.alternate===null&&st===0&&(st=3),a.flags&=-257,a.flags|=65536,a.lanes=s,n===Js?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Fc(e,n,s)),!1;case 22:return a.flags|=65536,n===Js?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Fc(e,n,s)),!1}throw Error(c(435,a.tag))}return Fc(e,n,s),Sr(),!1}if(_e)return t=Ft.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,n!==ku&&(e=Error(c(422),{cause:n}),Ai(ia(e,a)))):(n!==ku&&(t=Error(c(423),{cause:n}),Ai(ia(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,n=ia(n,a),s=Nc(e.stateNode,n,s),ec(e,s),st!==4&&(st=2)),!1;var u=Error(c(520),{cause:n});if(u=ia(u,a),Ji===null?Ji=[u]:Ji.push(u),st!==4&&(st=2),t===null)return!0;n=ia(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Nc(a.stateNode,n,e),ec(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ml===null||!Ml.has(u))))return a.flags|=65536,s&=-s,a.lanes|=s,s=dh(s),hh(s,e,a,n),ec(a,s),!1}a=a.return}while(a!==null);return!1}var Rc=Error(c(461)),mt=!1;function Et(e,t,a,n){t.child=e===null?yd(t,null,a,n):nn(t,e.child,a,n)}function mh(e,t,a,n,s){a=a.render;var u=t.ref;if("ref"in n){var h={};for(var g in n)g!=="ref"&&(h[g]=n[g])}else h=n;return en(t),n=sc(e,t,a,h,u,s),g=rc(),e!==null&&!mt?(uc(e,t,s),el(e,t,s)):(_e&&g&&Yu(t),t.flags|=1,Et(e,t,n,s),t.child)}function ph(e,t,a,n,s){if(e===null){var u=a.type;return typeof u=="function"&&!qu(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,vh(e,t,u,n,s)):(e=Xs(a.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!zc(e,s)){var h=u.memoizedProps;if(a=a.compare,a=a!==null?a:Ci,a(h,n)&&e.ref===t.ref)return el(e,t,s)}return t.flags|=1,e=$a(u,n),e.ref=t.ref,e.return=t,t.child=e}function vh(e,t,a,n,s){if(e!==null){var u=e.memoizedProps;if(Ci(u,n)&&e.ref===t.ref)if(mt=!1,t.pendingProps=n=u,zc(e,s))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,el(e,t,s)}return Tc(e,t,a,n,s)}function yh(e,t,a,n){var s=n.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(n=t.child=e.child,s=0;n!==null;)s=s|n.lanes|n.childLanes,n=n.sibling;n=s&~u}else n=0,t.child=null;return gh(e,t,u,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$s(t,u!==null?u.cachePool:null),u!==null?xd(t,u):ac(),Sd(t);else return n=t.lanes=536870912,gh(e,t,u!==null?u.baseLanes|a:a,a,n)}else u!==null?($s(t,u.cachePool),xd(t,u),Rl(),t.memoizedState=null):(e!==null&&$s(t,null),ac(),Rl());return Et(e,t,s,a),t.child}function ki(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gh(e,t,a,n,s){var u=Ju();return u=u===null?null:{parent:dt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&$s(t,null),ac(),Sd(t),e!==null&&Bn(e,t,n,!0),t.childLanes=s,null}function or(e,t){return t=dr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bh(e,t,a){return nn(t,e.child,null,a),e=or(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function Ng(e,t,a){var n=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(_e){if(n.mode==="hidden")return e=or(t,n),t.lanes=536870912,ki(null,e);if(nc(t),(e=tt)?(e=Am(e,ua),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yl!==null?{id:Aa,overflow:Da}:null,retryLane:536870912,hydrationErrors:null},a=ad(e),a.return=t,t.child=a,St=t,tt=null)):e=null,e===null)throw bl(t);return t.lanes=536870912,null}return or(t,n)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(nc(t),s)if(t.flags&256)t.flags&=-257,t=bh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(mt||Bn(e,t,a,!1),s=(a&e.childLanes)!==0,mt||s){if(n=Ie,n!==null&&(h=j(n,a),h!==0&&h!==u.retryLane))throw u.retryLane=h,Jl(e,h),Xt(n,e,h),Rc;Sr(),t=bh(e,t,a)}else e=u.treeContext,tt=oa(h.nextSibling),St=t,_e=!0,gl=null,ua=!1,e!==null&&id(t,e),t=or(t,n),t.flags|=4096;return t}return e=$a(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Tc(e,t,a,n,s){return en(t),a=sc(e,t,a,n,void 0,s),n=rc(),e!==null&&!mt?(uc(e,t,s),el(e,t,s)):(_e&&n&&Yu(t),t.flags|=1,Et(e,t,a,s),t.child)}function xh(e,t,a,n,s,u){return en(t),t.updateQueue=null,a=Ed(t,n,a,s),jd(e),n=rc(),e!==null&&!mt?(uc(e,t,u),el(e,t,u)):(_e&&n&&Yu(t),t.flags|=1,Et(e,t,a,u),t.child)}function Sh(e,t,a,n,s){if(en(t),t.stateNode===null){var u=Un,h=a.contextType;typeof h=="object"&&h!==null&&(u=jt(h)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ec,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},Wu(t),h=a.contextType,u.context=typeof h=="object"&&h!==null?jt(h):Un,u.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(jc(t,a,h,n),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&Ec.enqueueReplaceState(u,u.state,null),qi(t,n,u,s),Hi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var g=t.memoizedProps,S=rn(a,g);u.props=S;var D=u.context,Q=a.contextType;h=Un,typeof Q=="object"&&Q!==null&&(h=jt(Q));var k=a.getDerivedStateFromProps;Q=typeof k=="function"||typeof u.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,Q||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g||D!==h)&&rh(t,u,n,h),Sl=!1;var _=t.memoizedState;u.state=_,qi(t,n,u,s),Hi(),D=t.memoizedState,g||_!==D||Sl?(typeof k=="function"&&(jc(t,a,k,n),D=t.memoizedState),(S=Sl||sh(t,a,S,n,_,D,h))?(Q||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=D),u.props=n,u.state=D,u.context=h,n=S):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,Iu(e,t),h=t.memoizedProps,Q=rn(a,h),u.props=Q,k=t.pendingProps,_=u.context,D=a.contextType,S=Un,typeof D=="object"&&D!==null&&(S=jt(D)),g=a.getDerivedStateFromProps,(D=typeof g=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==k||_!==S)&&rh(t,u,n,S),Sl=!1,_=t.memoizedState,u.state=_,qi(t,n,u,s),Hi();var q=t.memoizedState;h!==k||_!==q||Sl||e!==null&&e.dependencies!==null&&Vs(e.dependencies)?(typeof g=="function"&&(jc(t,a,g,n),q=t.memoizedState),(Q=Sl||sh(t,a,Q,n,_,q,S)||e!==null&&e.dependencies!==null&&Vs(e.dependencies))?(D||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,q,S),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,q,S)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=q),u.props=n,u.state=q,u.context=S,n=Q):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),n=!1)}return u=n,fr(e,t),n=(t.flags&128)!==0,u||n?(u=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&n?(t.child=nn(t,e.child,null,s),t.child=nn(t,null,a,s)):Et(e,t,a,s),t.memoizedState=u.state,e=t.child):e=el(e,t,s),e}function jh(e,t,a,n){return Wl(),t.flags|=256,Et(e,t,a,n),t.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cc(e){return{baseLanes:e,cachePool:fd()}}function Mc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Wt),e}function Eh(e,t,a){var n=t.pendingProps,s=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),h&&(s=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(_e){if(s?Nl(t):Rl(),(e=tt)?(e=Am(e,ua),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yl!==null?{id:Aa,overflow:Da}:null,retryLane:536870912,hydrationErrors:null},a=ad(e),a.return=t,t.child=a,St=t,tt=null)):e=null,e===null)throw bl(t);return fo(e)?t.lanes=32:t.lanes=536870912,null}var g=n.children;return n=n.fallback,s?(Rl(),s=t.mode,g=dr({mode:"hidden",children:g},s),n=Pl(n,s,a,null),g.return=t,n.return=t,g.sibling=n,t.child=g,n=t.child,n.memoizedState=Cc(a),n.childLanes=Mc(e,h,a),t.memoizedState=wc,ki(null,n)):(Nl(t),Oc(t,g))}var S=e.memoizedState;if(S!==null&&(g=S.dehydrated,g!==null)){if(u)t.flags&256?(Nl(t),t.flags&=-257,t=Ac(e,t,a)):t.memoizedState!==null?(Rl(),t.child=e.child,t.flags|=128,t=null):(Rl(),g=n.fallback,s=t.mode,n=dr({mode:"visible",children:n.children},s),g=Pl(g,s,a,null),g.flags|=2,n.return=t,g.return=t,n.sibling=g,t.child=n,nn(t,e.child,null,a),n=t.child,n.memoizedState=Cc(a),n.childLanes=Mc(e,h,a),t.memoizedState=wc,t=ki(null,n));else if(Nl(t),fo(g)){if(h=g.nextSibling&&g.nextSibling.dataset,h)var D=h.dgst;h=D,n=Error(c(419)),n.stack="",n.digest=h,Ai({value:n,source:null,stack:null}),t=Ac(e,t,a)}else if(mt||Bn(e,t,a,!1),h=(a&e.childLanes)!==0,mt||h){if(h=Ie,h!==null&&(n=j(h,a),n!==0&&n!==S.retryLane))throw S.retryLane=n,Jl(e,n),Xt(h,e,n),Rc;oo(g)||Sr(),t=Ac(e,t,a)}else oo(g)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,tt=oa(g.nextSibling),St=t,_e=!0,gl=null,ua=!1,e!==null&&id(t,e),t=Oc(t,n.children),t.flags|=4096);return t}return s?(Rl(),g=n.fallback,s=t.mode,S=e.child,D=S.sibling,n=$a(S,{mode:"hidden",children:n.children}),n.subtreeFlags=S.subtreeFlags&65011712,D!==null?g=$a(D,g):(g=Pl(g,s,a,null),g.flags|=2),g.return=t,n.return=t,n.sibling=g,t.child=n,ki(null,n),n=t.child,g=e.child.memoizedState,g===null?g=Cc(a):(s=g.cachePool,s!==null?(S=dt._currentValue,s=s.parent!==S?{parent:S,pool:S}:s):s=fd(),g={baseLanes:g.baseLanes|a,cachePool:s}),n.memoizedState=g,n.childLanes=Mc(e,h,a),t.memoizedState=wc,ki(e.child,n)):(Nl(t),a=e.child,e=a.sibling,a=$a(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Oc(e,t){return t=dr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function dr(e,t){return e=$t(22,e,null,t),e.lanes=0,e}function Ac(e,t,a){return nn(t,e.child,null,a),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nh(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Vu(e.return,t,a)}function Dc(e,t,a,n,s,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:s,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=n,h.tail=a,h.tailMode=s,h.treeForkCount=u)}function Rh(e,t,a){var n=t.pendingProps,s=n.revealOrder,u=n.tail;n=n.children;var h=ut.current,g=(h&2)!==0;if(g?(h=h&1|2,t.flags|=128):h&=1,J(ut,h),Et(e,t,n,a),n=_e?Oi:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nh(e,a,t);else if(e.tag===19)Nh(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&er(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Dc(t,!1,s,a,u,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&er(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Dc(t,!0,a,null,u,n);break;case"together":Dc(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function el(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Cl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Bn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=$a(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$a(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function zc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vs(e)))}function Rg(e,t,a){switch(t.tag){case 3:ft(t,t.stateNode.containerInfo),xl(t,dt,e.memoizedState.cache),Wl();break;case 27:case 5:Xl(t);break;case 4:ft(t,t.stateNode.containerInfo);break;case 10:xl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,nc(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Nl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Eh(e,t,a):(Nl(t),e=el(e,t,a),e!==null?e.sibling:null);Nl(t);break;case 19:var s=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Bn(e,t,a,!1),n=(a&t.childLanes)!==0),s){if(n)return Rh(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),J(ut,ut.current),n)break;return null;case 22:return t.lanes=0,yh(e,t,a,t.pendingProps);case 24:xl(t,dt,e.memoizedState.cache)}return el(e,t,a)}function Th(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!zc(e,a)&&(t.flags&128)===0)return mt=!1,Rg(e,t,a);mt=(e.flags&131072)!==0}else mt=!1,_e&&(t.flags&1048576)!==0&&nd(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=an(t.elementType),t.type=e,typeof e=="function")qu(e)?(n=rn(e,n),t.tag=1,t=Sh(null,t,e,n,a)):(t.tag=0,t=Tc(null,t,e,n,a));else{if(e!=null){var s=e.$$typeof;if(s===ie){t.tag=11,t=mh(null,t,e,n,a);break e}else if(s===$){t.tag=14,t=ph(null,t,e,n,a);break e}}throw t=Ue(e)||e,Error(c(306,t,""))}}return t;case 0:return Tc(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,s=rn(n,t.pendingProps),Sh(e,t,n,s,a);case 3:e:{if(ft(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var u=t.memoizedState;s=u.element,Iu(e,t),qi(t,n,null,a);var h=t.memoizedState;if(n=h.cache,xl(t,dt,n),n!==u.cache&&Zu(t,[dt],a,!0),Hi(),n=h.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=jh(e,t,n,a);break e}else if(n!==s){s=ia(Error(c(424)),t),Ai(s),t=jh(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(tt=oa(e.firstChild),St=t,_e=!0,gl=null,ua=!0,a=yd(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Wl(),n===s){t=el(e,t,a);break e}Et(e,t,n,a)}t=t.child}return t;case 26:return fr(e,t),e===null?(a=Hm(t.type,null,t.pendingProps,null))?t.memoizedState=a:_e||(a=t.type,e=t.pendingProps,n=Cr(me.current).createElement(a),n[I]=t,n[te]=e,Nt(n,a,e),He(n),t.stateNode=n):t.memoizedState=Hm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xl(t),e===null&&_e&&(n=t.stateNode=_m(t.type,t.pendingProps,me.current),St=t,ua=!0,s=tt,zl(t.type)?(ho=s,tt=oa(n.firstChild)):tt=s),Et(e,t,t.pendingProps.children,a),fr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&_e&&((s=n=tt)&&(n=tb(n,t.type,t.pendingProps,ua),n!==null?(t.stateNode=n,St=t,tt=oa(n.firstChild),ua=!1,s=!0):s=!1),s||bl(t)),Xl(t),s=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,n=u.children,ro(s,u)?n=null:h!==null&&ro(s,h)&&(t.flags|=32),t.memoizedState!==null&&(s=sc(e,t,vg,null,null,a),ns._currentValue=s),fr(e,t),Et(e,t,n,a),t.child;case 6:return e===null&&_e&&((e=a=tt)&&(a=ab(a,t.pendingProps,ua),a!==null?(t.stateNode=a,St=t,tt=null,e=!0):e=!1),e||bl(t)),null;case 13:return Eh(e,t,a);case 4:return ft(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=nn(t,null,n,a):Et(e,t,n,a),t.child;case 11:return mh(e,t,t.type,t.pendingProps,a);case 7:return Et(e,t,t.pendingProps,a),t.child;case 8:return Et(e,t,t.pendingProps.children,a),t.child;case 12:return Et(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,xl(t,t.type,n.value),Et(e,t,n.children,a),t.child;case 9:return s=t.type._context,n=t.pendingProps.children,en(t),s=jt(s),n=n(s),t.flags|=1,Et(e,t,n,a),t.child;case 14:return ph(e,t,t.type,t.pendingProps,a);case 15:return vh(e,t,t.type,t.pendingProps,a);case 19:return Rh(e,t,a);case 31:return Ng(e,t,a);case 22:return yh(e,t,a,t.pendingProps);case 24:return en(t),n=jt(dt),e===null?(s=Ju(),s===null&&(s=Ie,u=$u(),s.pooledCache=u,u.refCount++,u!==null&&(s.pooledCacheLanes|=a),s=u),t.memoizedState={parent:n,cache:s},Wu(t),xl(t,dt,s)):((e.lanes&a)!==0&&(Iu(e,t),qi(t,null,null,a),Hi()),s=e.memoizedState,u=t.memoizedState,s.parent!==n?(s={parent:n,cache:n},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),xl(t,dt,n)):(n=u.cache,xl(t,dt,n),n!==s.cache&&Zu(t,[dt],a,!0))),Et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function tl(e){e.flags|=4}function _c(e,t,a,n,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Ih())e.flags|=8192;else throw ln=Js,Pu}else e.flags&=-16777217}function wh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Gm(t))if(Ih())e.flags|=8192;else throw ln=Js,Pu}function hr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?bi():536870912,e.lanes|=t,Pn|=t)}function Xi(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags&65011712,n|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Tg(e,t,a){var n=t.pendingProps;switch(Gu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Pa(dt),Pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(qn(t)?tl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xu())),at(t),null;case 26:var s=t.type,u=t.memoizedState;return e===null?(tl(t),u!==null?(at(t),wh(t,u)):(at(t),_c(t,s,null,n,a))):u?u!==e.memoizedState?(tl(t),at(t),wh(t,u)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&tl(t),at(t),_c(t,s,e,n,a)),null;case 27:if(bn(t),a=me.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&tl(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return at(t),null}e=W.current,qn(t)?sd(t):(e=_m(s,n,a),t.stateNode=e,tl(t))}return at(t),null;case 5:if(bn(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&tl(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return at(t),null}if(u=W.current,qn(t))sd(t);else{var h=Cr(me.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?h.createElement("select",{is:n.is}):h.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?h.createElement(s,{is:n.is}):h.createElement(s)}}u[I]=t,u[te]=n;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(Nt(u,s,n),s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&tl(t)}}return at(t),_c(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&tl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=me.current,qn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,s=St,s!==null)switch(s.tag){case 27:case 5:n=s.memoizedProps}e[I]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Em(e.nodeValue,a)),e||bl(t,!0)}else e=Cr(e).createTextNode(n),e[I]=t,t.stateNode=e}return at(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=qn(t),a!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[I]=t}else Wl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else a=Xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return at(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=qn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(c(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(c(317));s[I]=t}else Wl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),s=!1}else s=Xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,s=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(s=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==s&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),hr(t,t.updateQueue),at(t),null);case 4:return Pe(),e===null&&ao(t.stateNode.containerInfo),at(t),null;case 10:return Pa(t.type),at(t),null;case 19:if(Y(ut),n=t.memoizedState,n===null)return at(t),null;if(s=(t.flags&128)!==0,u=n.rendering,u===null)if(s)Xi(n,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=er(e),u!==null){for(t.flags|=128,Xi(n,!1),e=u.updateQueue,t.updateQueue=e,hr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)td(a,e),a=a.sibling;return J(ut,ut.current&1|2),_e&&Fa(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ot()>gr&&(t.flags|=128,s=!0,Xi(n,!1),t.lanes=4194304)}else{if(!s)if(e=er(u),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,hr(t,e),Xi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!_e)return at(t),null}else 2*Ot()-n.renderingStartTime>gr&&a!==536870912&&(t.flags|=128,s=!0,Xi(n,!1),t.lanes=4194304);n.isBackwards?(u.sibling=t.child,t.child=u):(e=n.last,e!==null?e.sibling=u:t.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ot(),e.sibling=null,a=ut.current,J(ut,s?a&1|2:a&1),_e&&Fa(t,n.treeForkCount),e):(at(t),null);case 22:case 23:return Jt(t),lc(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),a=t.updateQueue,a!==null&&hr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Y(tn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Pa(dt),at(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function wg(e,t){switch(Gu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pa(dt),Pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return bn(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(c(340));Wl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Wl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(ut),null;case 4:return Pe(),null;case 10:return Pa(t.type),null;case 22:case 23:return Jt(t),lc(),e!==null&&Y(tn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pa(dt),null;case 25:return null;default:return null}}function Ch(e,t){switch(Gu(t),t.tag){case 3:Pa(dt),Pe();break;case 26:case 27:case 5:bn(t);break;case 4:Pe();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:Y(ut);break;case 10:Pa(t.type);break;case 22:case 23:Jt(t),lc(),e!==null&&Y(tn);break;case 24:Pa(dt)}}function Ki(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var s=n.next;a=s;do{if((a.tag&e)===e){n=void 0;var u=a.create,h=a.inst;n=u(),h.destroy=n}a=a.next}while(a!==s)}}catch(g){Ze(t,t.return,g)}}function Tl(e,t,a){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var u=s.next;n=u;do{if((n.tag&e)===e){var h=n.inst,g=h.destroy;if(g!==void 0){h.destroy=void 0,s=t;var S=a,D=g;try{D()}catch(Q){Ze(s,S,Q)}}}n=n.next}while(n!==u)}}catch(Q){Ze(t,t.return,Q)}}function Mh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{bd(t,a)}catch(n){Ze(e,e.return,n)}}}function Oh(e,t,a){a.props=rn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ze(e,t,n)}}function Vi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(s){Ze(e,t,s)}}function za(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(s){Ze(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){Ze(e,t,s)}else a.current=null}function Ah(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(s){Ze(e,e.return,s)}}function Uc(e,t,a){try{var n=e.stateNode;Fg(n,e.type,a,t),n[te]=t}catch(s){Ze(e,e.return,s)}}function Dh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zl(e.type)||e.tag===4}function Lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&zl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Va));else if(n!==4&&(n===27&&zl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Hc(e,t,a),e=e.sibling;e!==null;)Hc(e,t,a),e=e.sibling}function mr(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&zl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mr(e,t,a),e=e.sibling;e!==null;)mr(e,t,a),e=e.sibling}function zh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Nt(t,n,a),t[I]=e,t[te]=a}catch(u){Ze(e,e.return,u)}}var al=!1,pt=!1,qc=!1,_h=typeof WeakSet=="function"?WeakSet:Set,xt=null;function Cg(e,t){if(e=e.containerInfo,io=Ur,e=Vf(e),Au(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var s=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var h=0,g=-1,S=-1,D=0,Q=0,k=e,_=null;t:for(;;){for(var q;k!==a||s!==0&&k.nodeType!==3||(g=h+s),k!==u||n!==0&&k.nodeType!==3||(S=h+n),k.nodeType===3&&(h+=k.nodeValue.length),(q=k.firstChild)!==null;)_=k,k=q;for(;;){if(k===e)break t;if(_===a&&++D===s&&(g=h),_===u&&++Q===n&&(S=h),(q=k.nextSibling)!==null)break;k=_,_=k.parentNode}k=q}a=g===-1||S===-1?null:{start:g,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(so={focusedElem:e,selectionRange:a},Ur=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){switch(t=xt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,s=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var ne=rn(a.type,s);e=n.getSnapshotBeforeUpdate(ne,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Ze(a,a.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)co(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":co(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,xt=e;break}xt=t.return}}function Uh(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:nl(e,a),n&4&&Ki(5,a);break;case 1:if(nl(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ze(a,a.return,h)}else{var s=rn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ze(a,a.return,h)}}n&64&&Mh(a),n&512&&Vi(a,a.return);break;case 3:if(nl(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{bd(e,t)}catch(h){Ze(a,a.return,h)}}break;case 27:t===null&&n&4&&zh(a);case 26:case 5:nl(e,a),t===null&&n&4&&Ah(a),n&512&&Vi(a,a.return);break;case 12:nl(e,a);break;case 31:nl(e,a),n&4&&qh(e,a);break;case 13:nl(e,a),n&4&&Bh(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Hg.bind(null,a),lb(e,a))));break;case 22:if(n=a.memoizedState!==null||al,!n){t=t!==null&&t.memoizedState!==null||pt,s=al;var u=pt;al=n,(pt=t)&&!u?il(e,a,(a.subtreeFlags&8772)!==0):nl(e,a),al=s,pt=u}break;case 30:break;default:nl(e,a)}}function Lh(e){var t=e.alternate;t!==null&&(e.alternate=null,Lh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Be(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var lt=null,Qt=!1;function ll(e,t,a){for(a=a.child;a!==null;)Hh(e,t,a),a=a.sibling}function Hh(e,t,a){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Ya,a)}catch{}switch(a.tag){case 26:pt||za(a,t),ll(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:pt||za(a,t);var n=lt,s=Qt;zl(a.type)&&(lt=a.stateNode,Qt=!1),ll(e,t,a),ts(a.stateNode),lt=n,Qt=s;break;case 5:pt||za(a,t);case 6:if(n=lt,s=Qt,lt=null,ll(e,t,a),lt=n,Qt=s,lt!==null)if(Qt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(a.stateNode)}catch(u){Ze(a,t,u)}else try{lt.removeChild(a.stateNode)}catch(u){Ze(a,t,u)}break;case 18:lt!==null&&(Qt?(e=lt,Mm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ii(e)):Mm(lt,a.stateNode));break;case 4:n=lt,s=Qt,lt=a.stateNode.containerInfo,Qt=!0,ll(e,t,a),lt=n,Qt=s;break;case 0:case 11:case 14:case 15:Tl(2,a,t),pt||Tl(4,a,t),ll(e,t,a);break;case 1:pt||(za(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Oh(a,t,n)),ll(e,t,a);break;case 21:ll(e,t,a);break;case 22:pt=(n=pt)||a.memoizedState!==null,ll(e,t,a),pt=n;break;default:ll(e,t,a)}}function qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ii(e)}catch(a){Ze(t,t.return,a)}}}function Bh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ii(e)}catch(a){Ze(t,t.return,a)}}function Mg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _h),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _h),t;default:throw Error(c(435,e.tag))}}function pr(e,t){var a=Mg(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var s=qg.bind(null,e,n);n.then(s,s)}})}function Yt(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var s=a[n],u=e,h=t,g=h;e:for(;g!==null;){switch(g.tag){case 27:if(zl(g.type)){lt=g.stateNode,Qt=!1;break e}break;case 5:lt=g.stateNode,Qt=!1;break e;case 3:case 4:lt=g.stateNode.containerInfo,Qt=!0;break e}g=g.return}if(lt===null)throw Error(c(160));Hh(u,h,s),lt=null,Qt=!1,u=s.alternate,u!==null&&(u.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qh(t,e),t=t.sibling}var Ra=null;function Qh(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(t,e),Gt(e),n&4&&(Tl(3,e,e.return),Ki(3,e),Tl(5,e,e.return));break;case 1:Yt(t,e),Gt(e),n&512&&(pt||a===null||za(a,a.return)),n&64&&al&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var s=Ra;if(Yt(t,e),Gt(e),n&512&&(pt||a===null||za(a,a.return)),n&4){var u=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(n){case"title":u=s.getElementsByTagName("title")[0],(!u||u[Me]||u[I]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=s.createElement(n),s.head.insertBefore(u,s.querySelector("head > title"))),Nt(u,n,a),u[I]=e,He(u),n=u;break e;case"link":var h=Qm("link","href",s).get(n+(a.href||""));if(h){for(var g=0;g<h.length;g++)if(u=h[g],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(g,1);break t}}u=s.createElement(n),Nt(u,n,a),s.head.appendChild(u);break;case"meta":if(h=Qm("meta","content",s).get(n+(a.content||""))){for(g=0;g<h.length;g++)if(u=h[g],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(g,1);break t}}u=s.createElement(n),Nt(u,n,a),s.head.appendChild(u);break;default:throw Error(c(468,n))}u[I]=e,He(u),n=u}e.stateNode=n}else Ym(s,e.type,e.stateNode);else e.stateNode=Bm(s,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?Ym(s,e.type,e.stateNode):Bm(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Uc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Yt(t,e),Gt(e),n&512&&(pt||a===null||za(a,a.return)),a!==null&&n&4&&Uc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Yt(t,e),Gt(e),n&512&&(pt||a===null||za(a,a.return)),e.flags&32){s=e.stateNode;try{Cn(s,"")}catch(ne){Ze(e,e.return,ne)}}n&4&&e.stateNode!=null&&(s=e.memoizedProps,Uc(e,s,a!==null?a.memoizedProps:s)),n&1024&&(qc=!0);break;case 6:if(Yt(t,e),Gt(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(ne){Ze(e,e.return,ne)}}break;case 3:if(Ar=null,s=Ra,Ra=Mr(t.containerInfo),Yt(t,e),Ra=s,Gt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{ii(t.containerInfo)}catch(ne){Ze(e,e.return,ne)}qc&&(qc=!1,Yh(e));break;case 4:n=Ra,Ra=Mr(e.stateNode.containerInfo),Yt(t,e),Gt(e),Ra=n;break;case 12:Yt(t,e),Gt(e);break;case 31:Yt(t,e),Gt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,pr(e,n)));break;case 13:Yt(t,e),Gt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(yr=Ot()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,pr(e,n)));break;case 22:s=e.memoizedState!==null;var S=a!==null&&a.memoizedState!==null,D=al,Q=pt;if(al=D||s,pt=Q||S,Yt(t,e),pt=Q,al=D,Gt(e),n&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||S||al||pt||un(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){S=a=t;try{if(u=S.stateNode,s)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{g=S.stateNode;var k=S.memoizedProps.style,_=k!=null&&k.hasOwnProperty("display")?k.display:null;g.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ne){Ze(S,S.return,ne)}}}else if(t.tag===6){if(a===null){S=t;try{S.stateNode.nodeValue=s?"":S.memoizedProps}catch(ne){Ze(S,S.return,ne)}}}else if(t.tag===18){if(a===null){S=t;try{var q=S.stateNode;s?Om(q,!0):Om(S.stateNode,!1)}catch(ne){Ze(S,S.return,ne)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,pr(e,a))));break;case 19:Yt(t,e),Gt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,pr(e,n)));break;case 30:break;case 21:break;default:Yt(t,e),Gt(e)}}function Gt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Dh(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var s=a.stateNode,u=Lc(e);mr(e,u,s);break;case 5:var h=a.stateNode;a.flags&32&&(Cn(h,""),a.flags&=-33);var g=Lc(e);mr(e,g,h);break;case 3:case 4:var S=a.stateNode.containerInfo,D=Lc(e);Hc(e,D,S);break;default:throw Error(c(161))}}catch(Q){Ze(e,e.return,Q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Yh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Yh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Uh(e,t.alternate,t),t=t.sibling}function un(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tl(4,t,t.return),un(t);break;case 1:za(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Oh(t,t.return,a),un(t);break;case 27:ts(t.stateNode);case 26:case 5:za(t,t.return),un(t);break;case 22:t.memoizedState===null&&un(t);break;case 30:un(t);break;default:un(t)}e=e.sibling}}function il(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,s=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:il(s,u,a),Ki(4,u);break;case 1:if(il(s,u,a),n=u,s=n.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(D){Ze(n,n.return,D)}if(n=u,s=n.updateQueue,s!==null){var g=n.stateNode;try{var S=s.shared.hiddenCallbacks;if(S!==null)for(s.shared.hiddenCallbacks=null,s=0;s<S.length;s++)gd(S[s],g)}catch(D){Ze(n,n.return,D)}}a&&h&64&&Mh(u),Vi(u,u.return);break;case 27:zh(u);case 26:case 5:il(s,u,a),a&&n===null&&h&4&&Ah(u),Vi(u,u.return);break;case 12:il(s,u,a);break;case 31:il(s,u,a),a&&h&4&&qh(s,u);break;case 13:il(s,u,a),a&&h&4&&Bh(s,u);break;case 22:u.memoizedState===null&&il(s,u,a),Vi(u,u.return);break;case 30:break;default:il(s,u,a)}t=t.sibling}}function Bc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Di(a))}function Qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e))}function Ta(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gh(e,t,a,n),t=t.sibling}function Gh(e,t,a,n){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Ta(e,t,a,n),s&2048&&Ki(9,t);break;case 1:Ta(e,t,a,n);break;case 3:Ta(e,t,a,n),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e)));break;case 12:if(s&2048){Ta(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,g=u.onPostCommit;typeof g=="function"&&g(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Ze(t,t.return,S)}}else Ta(e,t,a,n);break;case 31:Ta(e,t,a,n);break;case 13:Ta(e,t,a,n);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?Ta(e,t,a,n):Zi(e,t):u._visibility&2?Ta(e,t,a,n):(u._visibility|=2,$n(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Bc(h,t);break;case 24:Ta(e,t,a,n),s&2048&&Qc(t.alternate,t);break;default:Ta(e,t,a,n)}}function $n(e,t,a,n,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,g=a,S=n,D=h.flags;switch(h.tag){case 0:case 11:case 15:$n(u,h,g,S,s),Ki(8,h);break;case 23:break;case 22:var Q=h.stateNode;h.memoizedState!==null?Q._visibility&2?$n(u,h,g,S,s):Zi(u,h):(Q._visibility|=2,$n(u,h,g,S,s)),s&&D&2048&&Bc(h.alternate,h);break;case 24:$n(u,h,g,S,s),s&&D&2048&&Qc(h.alternate,h);break;default:$n(u,h,g,S,s)}t=t.sibling}}function Zi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,s=n.flags;switch(n.tag){case 22:Zi(a,n),s&2048&&Bc(n.alternate,n);break;case 24:Zi(a,n),s&2048&&Qc(n.alternate,n);break;default:Zi(a,n)}t=t.sibling}}var $i=8192;function Fn(e,t,a){if(e.subtreeFlags&$i)for(e=e.child;e!==null;)kh(e,t,a),e=e.sibling}function kh(e,t,a){switch(e.tag){case 26:Fn(e,t,a),e.flags&$i&&e.memoizedState!==null&&pb(a,Ra,e.memoizedState,e.memoizedProps);break;case 5:Fn(e,t,a);break;case 3:case 4:var n=Ra;Ra=Mr(e.stateNode.containerInfo),Fn(e,t,a),Ra=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=$i,$i=16777216,Fn(e,t,a),$i=n):Fn(e,t,a));break;default:Fn(e,t,a)}}function Xh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];xt=n,Vh(n,e)}Xh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Kh(e),e=e.sibling}function Kh(e){switch(e.tag){case 0:case 11:case 15:Fi(e),e.flags&2048&&Tl(9,e,e.return);break;case 3:Fi(e);break;case 12:Fi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vr(e)):Fi(e);break;default:Fi(e)}}function vr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];xt=n,Vh(n,e)}Xh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tl(8,t,t.return),vr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,vr(t));break;default:vr(t)}e=e.sibling}}function Vh(e,t){for(;xt!==null;){var a=xt;switch(a.tag){case 0:case 11:case 15:Tl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Di(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,xt=n;else e:for(a=e;xt!==null;){n=xt;var s=n.sibling,u=n.return;if(Lh(n),n===a){xt=null;break e}if(s!==null){s.return=u,xt=s;break e}xt=u}}}var Og={getCacheForType:function(e){var t=jt(dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return jt(dt).controller.signal}},Ag=typeof WeakMap=="function"?WeakMap:Map,Ge=0,Ie=null,Oe=null,De=0,Ve=0,Pt=null,wl=!1,Jn=!1,Yc=!1,sl=0,st=0,Cl=0,cn=0,Gc=0,Wt=0,Pn=0,Ji=null,kt=null,kc=!1,yr=0,Zh=0,gr=1/0,br=null,Ml=null,yt=0,Ol=null,Wn=null,rl=0,Xc=0,Kc=null,$h=null,Pi=0,Vc=null;function It(){return(Ge&2)!==0&&De!==0?De&-De:U.T!==null?Wc():X()}function Fh(){if(Wt===0)if((De&536870912)===0||_e){var e=Ga;Ga<<=1,(Ga&3932160)===0&&(Ga=262144),Wt=e}else Wt=536870912;return e=Ft.current,e!==null&&(e.flags|=32),Wt}function Xt(e,t,a){(e===Ie&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(In(e,0),Al(e,De,Wt,!1)),Oa(e,a),((Ge&2)===0||e!==Ie)&&(e===Ie&&((Ge&2)===0&&(cn|=a),st===4&&Al(e,De,Wt,!1)),_a(e))}function Jh(e,t,a){if((Ge&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||hl(e,t),s=n?_g(e,t):$c(e,t,!0),u=n;do{if(s===0){Jn&&!n&&Al(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Dg(a)){s=$c(e,t,!1),u=!1;continue}if(s===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var g=e;s=Ji;var S=g.current.memoizedState.isDehydrated;if(S&&(In(g,h).flags|=256),h=$c(g,h,!1),h!==2){if(Yc&&!S){g.errorRecoveryDisabledLanes|=u,cn|=u,s=4;break e}u=kt,kt=s,u!==null&&(kt===null?kt=u:kt.push.apply(kt,u))}s=h}if(u=!1,s!==2)continue}}if(s===1){In(e,0),Al(e,t,0,!0);break}e:{switch(n=e,u=s,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Al(n,t,Wt,!wl);break e;case 2:kt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(s=yr+300-Ot(),10<s)){if(Al(n,t,Wt,!wl),jn(n,0,!0)!==0)break e;rl=t,n.timeoutHandle=wm(Ph.bind(null,n,a,kt,br,kc,t,Wt,cn,Pn,wl,u,"Throttled",-0,0),s);break e}Ph(n,a,kt,br,kc,t,Wt,cn,Pn,wl,u,null,-0,0)}}break}while(!0);_a(e)}function Ph(e,t,a,n,s,u,h,g,S,D,Q,k,_,q){if(e.timeoutHandle=-1,k=t.subtreeFlags,k&8192||(k&16785408)===16785408){k={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Va},kh(t,u,k);var ne=(u&62914560)===u?yr-Ot():(u&4194048)===u?Zh-Ot():0;if(ne=vb(k,ne),ne!==null){rl=u,e.cancelPendingCommit=ne(im.bind(null,e,t,u,a,n,s,h,g,S,Q,k,null,_,q)),Al(e,u,h,!D);return}}im(e,t,u,a,n,s,h,g,S)}function Dg(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var s=a[n],u=s.getSnapshot;s=s.value;try{if(!Zt(u(),s))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Al(e,t,a,n){t&=~Gc,t&=~cn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var s=t;0<s;){var u=31-wt(s),h=1<<u;n[u]=-1,s&=~h}a!==0&&As(e,a,t)}function xr(){return(Ge&6)===0?(Wi(0),!1):!0}function Zc(){if(Oe!==null){if(Ve===0)var e=Oe.return;else e=Oe,Ja=Il=null,cc(e),kn=null,_i=0,e=Oe;for(;e!==null;)Ch(e.alternate,e),e=e.return;Oe=null}}function In(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Wg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),rl=0,Zc(),Ie=e,Oe=a=$a(e.current,null),De=t,Ve=0,Pt=null,wl=!1,Jn=hl(e,t),Yc=!1,Pn=Wt=Gc=cn=Cl=st=0,kt=Ji=null,kc=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-wt(n),u=1<<s;t|=e[s],n&=~u}return sl=t,Ys(),a}function Wh(e,t){Ne=null,U.H=Gi,t===Gn||t===Fs?(t=md(),Ve=3):t===Pu?(t=md(),Ve=4):Ve=t===Rc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Pt=t,Oe===null&&(st=1,cr(e,ia(t,e.current)))}function Ih(){var e=Ft.current;return e===null?!0:(De&4194048)===De?ca===null:(De&62914560)===De||(De&536870912)!==0?e===ca:!1}function em(){var e=U.H;return U.H=Gi,e===null?Gi:e}function tm(){var e=U.A;return U.A=Og,e}function Sr(){st=4,wl||(De&4194048)!==De&&Ft.current!==null||(Jn=!0),(Cl&134217727)===0&&(cn&134217727)===0||Ie===null||Al(Ie,De,Wt,!1)}function $c(e,t,a){var n=Ge;Ge|=2;var s=em(),u=tm();(Ie!==e||De!==t)&&(br=null,In(e,t)),t=!1;var h=st;e:do try{if(Ve!==0&&Oe!==null){var g=Oe,S=Pt;switch(Ve){case 8:Zc(),h=6;break e;case 3:case 2:case 9:case 6:Ft.current===null&&(t=!0);var D=Ve;if(Ve=0,Pt=null,ei(e,g,S,D),a&&Jn){h=0;break e}break;default:D=Ve,Ve=0,Pt=null,ei(e,g,S,D)}}zg(),h=st;break}catch(Q){Wh(e,Q)}while(!0);return t&&e.shellSuspendCounter++,Ja=Il=null,Ge=n,U.H=s,U.A=u,Oe===null&&(Ie=null,De=0,Ys()),h}function zg(){for(;Oe!==null;)am(Oe)}function _g(e,t){var a=Ge;Ge|=2;var n=em(),s=tm();Ie!==e||De!==t?(br=null,gr=Ot()+500,In(e,t)):Jn=hl(e,t);e:do try{if(Ve!==0&&Oe!==null){t=Oe;var u=Pt;t:switch(Ve){case 1:Ve=0,Pt=null,ei(e,t,u,1);break;case 2:case 9:if(dd(u)){Ve=0,Pt=null,lm(t);break}t=function(){Ve!==2&&Ve!==9||Ie!==e||(Ve=7),_a(e)},u.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:dd(u)?(Ve=0,Pt=null,lm(t)):(Ve=0,Pt=null,ei(e,t,u,7));break;case 5:var h=null;switch(Oe.tag){case 26:h=Oe.memoizedState;case 5:case 27:var g=Oe;if(h?Gm(h):g.stateNode.complete){Ve=0,Pt=null;var S=g.sibling;if(S!==null)Oe=S;else{var D=g.return;D!==null?(Oe=D,jr(D)):Oe=null}break t}}Ve=0,Pt=null,ei(e,t,u,5);break;case 6:Ve=0,Pt=null,ei(e,t,u,6);break;case 8:Zc(),st=6;break e;default:throw Error(c(462))}}Ug();break}catch(Q){Wh(e,Q)}while(!0);return Ja=Il=null,U.H=n,U.A=s,Ge=a,Oe!==null?0:(Ie=null,De=0,Ys(),st)}function Ug(){for(;Oe!==null&&!fu();)am(Oe)}function am(e){var t=Th(e.alternate,e,sl);e.memoizedProps=e.pendingProps,t===null?jr(e):Oe=t}function lm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=xh(a,t,t.pendingProps,t.type,void 0,De);break;case 11:t=xh(a,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:cc(t);default:Ch(a,t),t=Oe=td(t,sl),t=Th(a,t,sl)}e.memoizedProps=e.pendingProps,t===null?jr(e):Oe=t}function ei(e,t,a,n){Ja=Il=null,cc(t),kn=null,_i=0;var s=t.return;try{if(Eg(e,s,t,a,De)){st=1,cr(e,ia(a,e.current)),Oe=null;return}}catch(u){if(s!==null)throw Oe=s,u;st=1,cr(e,ia(a,e.current)),Oe=null;return}t.flags&32768?(_e||n===1?e=!0:Jn||(De&536870912)!==0?e=!1:(wl=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ft.current,n!==null&&n.tag===13&&(n.flags|=16384))),nm(t,e)):jr(t)}function jr(e){var t=e;do{if((t.flags&32768)!==0){nm(t,wl);return}e=t.return;var a=Tg(t.alternate,t,sl);if(a!==null){Oe=a;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);st===0&&(st=5)}function nm(e,t){do{var a=wg(e.alternate,e);if(a!==null){a.flags&=32767,Oe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=a}while(e!==null);st=6,Oe=null}function im(e,t,a,n,s,u,h,g,S){e.cancelPendingCommit=null;do Er();while(yt!==0);if((Ge&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=Lu,Os(e,a,u,h,g,S),e===Ie&&(Oe=Ie=null,De=0),Wn=t,Ol=e,rl=a,Xc=u,Kc=s,$h=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Bg(dl,function(){return om(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=U.T,U.T=null,s=Z.p,Z.p=2,h=Ge,Ge|=4;try{Cg(e,t,a)}finally{Ge=h,Z.p=s,U.T=n}}yt=1,sm(),rm(),um()}}function sm(){if(yt===1){yt=0;var e=Ol,t=Wn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var n=Z.p;Z.p=2;var s=Ge;Ge|=4;try{Qh(t,e);var u=so,h=Vf(e.containerInfo),g=u.focusedElem,S=u.selectionRange;if(h!==g&&g&&g.ownerDocument&&Kf(g.ownerDocument.documentElement,g)){if(S!==null&&Au(g)){var D=S.start,Q=S.end;if(Q===void 0&&(Q=D),"selectionStart"in g)g.selectionStart=D,g.selectionEnd=Math.min(Q,g.value.length);else{var k=g.ownerDocument||document,_=k&&k.defaultView||window;if(_.getSelection){var q=_.getSelection(),ne=g.textContent.length,pe=Math.min(S.start,ne),Je=S.end===void 0?pe:Math.min(S.end,ne);!q.extend&&pe>Je&&(h=Je,Je=pe,pe=h);var C=Xf(g,pe),T=Xf(g,Je);if(C&&T&&(q.rangeCount!==1||q.anchorNode!==C.node||q.anchorOffset!==C.offset||q.focusNode!==T.node||q.focusOffset!==T.offset)){var A=k.createRange();A.setStart(C.node,C.offset),q.removeAllRanges(),pe>Je?(q.addRange(A),q.extend(T.node,T.offset)):(A.setEnd(T.node,T.offset),q.addRange(A))}}}}for(k=[],q=g;q=q.parentNode;)q.nodeType===1&&k.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<k.length;g++){var G=k[g];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Ur=!!io,so=io=null}finally{Ge=s,Z.p=n,U.T=a}}e.current=t,yt=2}}function rm(){if(yt===2){yt=0;var e=Ol,t=Wn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var n=Z.p;Z.p=2;var s=Ge;Ge|=4;try{Uh(e,t.alternate,t)}finally{Ge=s,Z.p=n,U.T=a}}yt=3}}function um(){if(yt===4||yt===3){yt=0,du();var e=Ol,t=Wn,a=rl,n=$h;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?yt=5:(yt=0,Wn=Ol=null,cm(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ml=null),z(a),t=t.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(Ya,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=U.T,s=Z.p,Z.p=2,U.T=null;try{for(var u=e.onRecoverableError,h=0;h<n.length;h++){var g=n[h];u(g.value,{componentStack:g.stack})}}finally{U.T=t,Z.p=s}}(rl&3)!==0&&Er(),_a(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===Vc?Pi++:(Pi=0,Vc=e):Pi=0,Wi(0)}}function cm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Di(t)))}function Er(){return sm(),rm(),um(),om()}function om(){if(yt!==5)return!1;var e=Ol,t=Xc;Xc=0;var a=z(rl),n=U.T,s=Z.p;try{Z.p=32>a?32:a,U.T=null,a=Kc,Kc=null;var u=Ol,h=rl;if(yt=0,Wn=Ol=null,rl=0,(Ge&6)!==0)throw Error(c(331));var g=Ge;if(Ge|=4,Kh(u.current),Gh(u,u.current,h,a),Ge=g,Wi(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Ya,u)}catch{}return!0}finally{Z.p=s,U.T=n,cm(e,t)}}function fm(e,t,a){t=ia(a,t),t=Nc(e.stateNode,t,2),e=El(e,t,2),e!==null&&(Oa(e,2),_a(e))}function Ze(e,t,a){if(e.tag===3)fm(e,e,a);else for(;t!==null;){if(t.tag===3){fm(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ml===null||!Ml.has(n))){e=ia(a,e),a=dh(2),n=El(t,a,2),n!==null&&(hh(a,n,t,e),Oa(n,2),_a(n));break}}t=t.return}}function Fc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Ag;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(a)||(Yc=!0,s.add(a),e=Lg.bind(null,e,t,a),t.then(e,e))}function Lg(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ie===e&&(De&a)===a&&(st===4||st===3&&(De&62914560)===De&&300>Ot()-yr?(Ge&2)===0&&In(e,0):Gc|=a,Pn===De&&(Pn=0)),_a(e)}function dm(e,t){t===0&&(t=bi()),e=Jl(e,t),e!==null&&(Oa(e,t),_a(e))}function Hg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),dm(e,a)}function qg(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),dm(e,a)}function Bg(e,t){return Sn(e,t)}var Nr=null,ti=null,Jc=!1,Rr=!1,Pc=!1,Dl=0;function _a(e){e!==ti&&e.next===null&&(ti===null?Nr=ti=e:ti=ti.next=e),Rr=!0,Jc||(Jc=!0,Yg())}function Wi(e,t){if(!Pc&&Rr){Pc=!0;do for(var a=!1,n=Nr;n!==null;){if(e!==0){var s=n.pendingLanes;if(s===0)var u=0;else{var h=n.suspendedLanes,g=n.pingedLanes;u=(1<<31-wt(42|e)+1)-1,u&=s&~(h&~g),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,vm(n,u))}else u=De,u=jn(n,n===Ie?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||hl(n,u)||(a=!0,vm(n,u));n=n.next}while(a);Pc=!1}}function Qg(){hm()}function hm(){Rr=Jc=!1;var e=0;Dl!==0&&Pg()&&(e=Dl);for(var t=Ot(),a=null,n=Nr;n!==null;){var s=n.next,u=mm(n,t);u===0?(n.next=null,a===null?Nr=s:a.next=s,s===null&&(ti=a)):(a=n,(e!==0||(u&3)!==0)&&(Rr=!0)),n=s}yt!==0&&yt!==5||Wi(e),Dl!==0&&(Dl=0)}function mm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-wt(u),g=1<<h,S=s[h];S===-1?((g&a)===0||(g&n)!==0)&&(s[h]=vu(g,t)):S<=t&&(e.expiredLanes|=g),u&=~g}if(t=Ie,a=De,a=jn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&yi(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||hl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&yi(n),z(a)){case 2:case 8:a=gi;break;case 32:a=dl;break;case 268435456:a=aa;break;default:a=dl}return n=pm.bind(null,e),a=Sn(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&yi(n),e.callbackPriority=2,e.callbackNode=null,2}function pm(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Er()&&e.callbackNode!==a)return null;var n=De;return n=jn(e,e===Ie?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Jh(e,n,t),mm(e,Ot()),e.callbackNode!=null&&e.callbackNode===a?pm.bind(null,e):null)}function vm(e,t){if(Er())return null;Jh(e,t,!0)}function Yg(){Ig(function(){(Ge&6)!==0?Sn(fl,Qg):hm()})}function Wc(){if(Dl===0){var e=Qn;e===0&&(e=Kl,Kl<<=1,(Kl&261888)===0&&(Kl=256)),Dl=e}return Dl}function ym(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zs(""+e)}function gm(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Gg(e,t,a,n,s){if(t==="submit"&&a&&a.stateNode===s){var u=ym((s[te]||null).action),h=n.submitter;h&&(t=(t=h[te]||null)?ym(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var g=new Hs("action","action",null,n,s);e.push({event:g,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Dl!==0){var S=h?gm(s,h):new FormData(s);gc(a,{pending:!0,data:S,method:s.method,action:u},null,S)}}else typeof u=="function"&&(g.preventDefault(),S=h?gm(s,h):new FormData(s),gc(a,{pending:!0,data:S,method:s.method,action:u},u,S))},currentTarget:s}]})}}for(var Ic=0;Ic<Uu.length;Ic++){var eo=Uu[Ic],kg=eo.toLowerCase(),Xg=eo[0].toUpperCase()+eo.slice(1);Na(kg,"on"+Xg)}Na(Ff,"onAnimationEnd"),Na(Jf,"onAnimationIteration"),Na(Pf,"onAnimationStart"),Na("dblclick","onDoubleClick"),Na("focusin","onFocus"),Na("focusout","onBlur"),Na(sg,"onTransitionRun"),Na(rg,"onTransitionStart"),Na(ug,"onTransitionCancel"),Na(Wf,"onTransitionEnd"),Dt("onMouseEnter",["mouseout","mouseover"]),Dt("onMouseLeave",["mouseout","mouseover"]),Dt("onPointerEnter",["pointerout","pointerover"]),Dt("onPointerLeave",["pointerout","pointerover"]),qt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qt("onBeforeInput",["compositionend","keypress","textInput","paste"]),qt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Kg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ii));function bm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],s=n.event;n=n.listeners;e:{var u=void 0;if(t)for(var h=n.length-1;0<=h;h--){var g=n[h],S=g.instance,D=g.currentTarget;if(g=g.listener,S!==u&&s.isPropagationStopped())break e;u=g,s.currentTarget=D;try{u(s)}catch(Q){Qs(Q)}s.currentTarget=null,u=S}else for(h=0;h<n.length;h++){if(g=n[h],S=g.instance,D=g.currentTarget,g=g.listener,S!==u&&s.isPropagationStopped())break e;u=g,s.currentTarget=D;try{u(s)}catch(Q){Qs(Q)}s.currentTarget=null,u=S}}}}function Ae(e,t){var a=t[fe];a===void 0&&(a=t[fe]=new Set);var n=e+"__bubble";a.has(n)||(xm(t,e,2,!1),a.add(n))}function to(e,t,a){var n=0;t&&(n|=4),xm(a,e,n,t)}var Tr="_reactListening"+Math.random().toString(36).slice(2);function ao(e){if(!e[Tr]){e[Tr]=!0,pl.forEach(function(a){a!=="selectionchange"&&(Kg.has(a)||to(a,!1,e),to(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Tr]||(t[Tr]=!0,to("selectionchange",!1,t))}}function xm(e,t,a,n){switch(Fm(t)){case 2:var s=bb;break;case 8:s=xb;break;default:s=go}a=s.bind(null,t,a,e),s=void 0,!ju||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function lo(e,t,a,n,s){var u=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var h=n.tag;if(h===3||h===4){var g=n.stateNode.containerInfo;if(g===s)break;if(h===4)for(h=n.return;h!==null;){var S=h.tag;if((S===3||S===4)&&h.stateNode.containerInfo===s)return;h=h.return}for(;g!==null;){if(h=et(g),h===null)return;if(S=h.tag,S===5||S===6||S===26||S===27){n=u=h;continue e}g=g.parentNode}}n=n.return}Rf(function(){var D=u,Q=xu(a),k=[];e:{var _=If.get(e);if(_!==void 0){var q=Hs,ne=e;switch(e){case"keypress":if(Us(a)===0)break e;case"keydown":case"keyup":q=qy;break;case"focusin":ne="focus",q=Tu;break;case"focusout":ne="blur",q=Tu;break;case"beforeblur":case"afterblur":q=Tu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Cf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Ty;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Yy;break;case Ff:case Jf:case Pf:q=My;break;case Wf:q=ky;break;case"scroll":case"scrollend":q=Ny;break;case"wheel":q=Ky;break;case"copy":case"cut":case"paste":q=Ay;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Of;break;case"toggle":case"beforetoggle":q=Zy}var pe=(t&4)!==0,Je=!pe&&(e==="scroll"||e==="scrollend"),C=pe?_!==null?_+"Capture":null:_;pe=[];for(var T=D,A;T!==null;){var G=T;if(A=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||A===null||C===null||(G=Si(T,C),G!=null&&pe.push(es(T,G,A))),Je)break;T=T.return}0<pe.length&&(_=new q(_,ne,null,a,Q),k.push({event:_,listeners:pe}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",_&&a!==bu&&(ne=a.relatedTarget||a.fromElement)&&(et(ne)||ne[ee]))break e;if((q||_)&&(_=Q.window===Q?Q:(_=Q.ownerDocument)?_.defaultView||_.parentWindow:window,q?(ne=a.relatedTarget||a.toElement,q=D,ne=ne?et(ne):null,ne!==null&&(Je=d(ne),pe=ne.tag,ne!==Je||pe!==5&&pe!==27&&pe!==6)&&(ne=null)):(q=null,ne=D),q!==ne)){if(pe=Cf,G="onMouseLeave",C="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Of,G="onPointerLeave",C="onPointerEnter",T="pointer"),Je=q==null?_:Le(q),A=ne==null?_:Le(ne),_=new pe(G,T+"leave",q,a,Q),_.target=Je,_.relatedTarget=A,G=null,et(Q)===D&&(pe=new pe(C,T+"enter",ne,a,Q),pe.target=A,pe.relatedTarget=Je,G=pe),Je=G,q&&ne)t:{for(pe=Vg,C=q,T=ne,A=0,G=C;G;G=pe(G))A++;G=0;for(var oe=T;oe;oe=pe(oe))G++;for(;0<A-G;)C=pe(C),A--;for(;0<G-A;)T=pe(T),G--;for(;A--;){if(C===T||T!==null&&C===T.alternate){pe=C;break t}C=pe(C),T=pe(T)}pe=null}else pe=null;q!==null&&Sm(k,_,q,pe,!1),ne!==null&&Je!==null&&Sm(k,Je,ne,pe,!0)}}e:{if(_=D?Le(D):window,q=_.nodeName&&_.nodeName.toLowerCase(),q==="select"||q==="input"&&_.type==="file")var Qe=qf;else if(Lf(_))if(Bf)Qe=lg;else{Qe=tg;var re=eg}else q=_.nodeName,!q||q.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?D&&gu(D.elementType)&&(Qe=qf):Qe=ag;if(Qe&&(Qe=Qe(e,D))){Hf(k,Qe,a,Q);break e}re&&re(e,_,D),e==="focusout"&&D&&_.type==="number"&&D.memoizedProps.value!=null&&yu(_,"number",_.value)}switch(re=D?Le(D):window,e){case"focusin":(Lf(re)||re.contentEditable==="true")&&(Dn=re,Du=D,Mi=null);break;case"focusout":Mi=Du=Dn=null;break;case"mousedown":zu=!0;break;case"contextmenu":case"mouseup":case"dragend":zu=!1,Zf(k,a,Q);break;case"selectionchange":if(ig)break;case"keydown":case"keyup":Zf(k,a,Q)}var Re;if(Cu)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else An?_f(e,a)&&(ze="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ze="onCompositionStart");ze&&(Af&&a.locale!=="ko"&&(An||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&An&&(Re=Tf()):(vl=Q,Eu="value"in vl?vl.value:vl.textContent,An=!0)),re=wr(D,ze),0<re.length&&(ze=new Mf(ze,e,null,a,Q),k.push({event:ze,listeners:re}),Re?ze.data=Re:(Re=Uf(a),Re!==null&&(ze.data=Re)))),(Re=Fy?Jy(e,a):Py(e,a))&&(ze=wr(D,"onBeforeInput"),0<ze.length&&(re=new Mf("onBeforeInput","beforeinput",null,a,Q),k.push({event:re,listeners:ze}),re.data=Re)),Gg(k,e,D,a,Q)}bm(k,t)})}function es(e,t,a){return{instance:e,listener:t,currentTarget:a}}function wr(e,t){for(var a=t+"Capture",n=[];e!==null;){var s=e,u=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||u===null||(s=Si(e,a),s!=null&&n.unshift(es(e,s,u)),s=Si(e,t),s!=null&&n.push(es(e,s,u))),e.tag===3)return n;e=e.return}return[]}function Vg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Sm(e,t,a,n,s){for(var u=t._reactName,h=[];a!==null&&a!==n;){var g=a,S=g.alternate,D=g.stateNode;if(g=g.tag,S!==null&&S===n)break;g!==5&&g!==26&&g!==27||D===null||(S=D,s?(D=Si(a,u),D!=null&&h.unshift(es(a,D,S))):s||(D=Si(a,u),D!=null&&h.push(es(a,D,S)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Zg=/\r\n?/g,$g=/\u0000|\uFFFD/g;function jm(e){return(typeof e=="string"?e:""+e).replace(Zg,`
49
+ `).replace($g,"")}function Em(e,t){return t=jm(t),jm(e)===t}function Fe(e,t,a,n,s,u){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Cn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Cn(e,""+n);break;case"className":Xa(e,"class",n);break;case"tabIndex":Xa(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Xa(e,a,n);break;case"style":Ef(e,n,u);break;case"data":if(t!=="object"){Xa(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=zs(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&Fe(e,t,"name",s.name,s,null),Fe(e,t,"formEncType",s.formEncType,s,null),Fe(e,t,"formMethod",s.formMethod,s,null),Fe(e,t,"formTarget",s.formTarget,s,null)):(Fe(e,t,"encType",s.encType,s,null),Fe(e,t,"method",s.method,s,null),Fe(e,t,"target",s.target,s,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=zs(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Va);break;case"onScroll":n!=null&&Ae("scroll",e);break;case"onScrollEnd":n!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(s.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=zs(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),ka(e,"popover",n);break;case"xlinkActuate":xe(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":xe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":xe(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":xe(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":xe(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":xe(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":xe(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":xe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":xe(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":ka(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=jy.get(a)||a,ka(e,a,n))}}function no(e,t,a,n,s,u){switch(a){case"style":Ef(e,n,u);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(s.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof n=="string"?Cn(e,n):(typeof n=="number"||typeof n=="bigint")&&Cn(e,""+n);break;case"onScroll":n!=null&&Ae("scroll",e);break;case"onScrollEnd":n!=null&&Ae("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sa.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),u=e[te]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,s),typeof n=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,s);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):ka(e,a,n)}}}function Nt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var n=!1,s=!1,u;for(u in a)if(a.hasOwnProperty(u)){var h=a[u];if(h!=null)switch(u){case"src":n=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Fe(e,t,u,h,a,null)}}s&&Fe(e,t,"srcSet",a.srcSet,a,null),n&&Fe(e,t,"src",a.src,a,null);return;case"input":Ae("invalid",e);var g=u=h=s=null,S=null,D=null;for(n in a)if(a.hasOwnProperty(n)){var Q=a[n];if(Q!=null)switch(n){case"name":s=Q;break;case"type":h=Q;break;case"checked":S=Q;break;case"defaultChecked":D=Q;break;case"value":u=Q;break;case"defaultValue":g=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(c(137,t));break;default:Fe(e,t,n,Q,a,null)}}bf(e,u,g,S,D,h,s,!1);return;case"select":Ae("invalid",e),n=h=u=null;for(s in a)if(a.hasOwnProperty(s)&&(g=a[s],g!=null))switch(s){case"value":u=g;break;case"defaultValue":h=g;break;case"multiple":n=g;default:Fe(e,t,s,g,a,null)}t=u,a=h,e.multiple=!!n,t!=null?wn(e,!!n,t,!1):a!=null&&wn(e,!!n,a,!0);return;case"textarea":Ae("invalid",e),u=s=n=null;for(h in a)if(a.hasOwnProperty(h)&&(g=a[h],g!=null))switch(h){case"value":n=g;break;case"defaultValue":s=g;break;case"children":u=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(c(91));break;default:Fe(e,t,h,g,a,null)}Sf(e,n,s,u);return;case"option":for(S in a)if(a.hasOwnProperty(S)&&(n=a[S],n!=null))switch(S){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Fe(e,t,S,n,a,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(n=0;n<Ii.length;n++)Ae(Ii[n],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(n=a[D],n!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Fe(e,t,D,n,a,null)}return;default:if(gu(t)){for(Q in a)a.hasOwnProperty(Q)&&(n=a[Q],n!==void 0&&no(e,t,Q,n,a,void 0));return}}for(g in a)a.hasOwnProperty(g)&&(n=a[g],n!=null&&Fe(e,t,g,n,a,null))}function Fg(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,u=null,h=null,g=null,S=null,D=null,Q=null;for(q in a){var k=a[q];if(a.hasOwnProperty(q)&&k!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":S=k;default:n.hasOwnProperty(q)||Fe(e,t,q,null,n,k)}}for(var _ in n){var q=n[_];if(k=a[_],n.hasOwnProperty(_)&&(q!=null||k!=null))switch(_){case"type":u=q;break;case"name":s=q;break;case"checked":D=q;break;case"defaultChecked":Q=q;break;case"value":h=q;break;case"defaultValue":g=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(c(137,t));break;default:q!==k&&Fe(e,t,_,q,n,k)}}xi(e,h,g,S,D,Q,u,s);return;case"select":q=h=g=_=null;for(u in a)if(S=a[u],a.hasOwnProperty(u)&&S!=null)switch(u){case"value":break;case"multiple":q=S;default:n.hasOwnProperty(u)||Fe(e,t,u,null,n,S)}for(s in n)if(u=n[s],S=a[s],n.hasOwnProperty(s)&&(u!=null||S!=null))switch(s){case"value":_=u;break;case"defaultValue":g=u;break;case"multiple":h=u;default:u!==S&&Fe(e,t,s,u,n,S)}t=g,a=h,n=q,_!=null?wn(e,!!a,_,!1):!!n!=!!a&&(t!=null?wn(e,!!a,t,!0):wn(e,!!a,a?[]:"",!1));return;case"textarea":q=_=null;for(g in a)if(s=a[g],a.hasOwnProperty(g)&&s!=null&&!n.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:Fe(e,t,g,null,n,s)}for(h in n)if(s=n[h],u=a[h],n.hasOwnProperty(h)&&(s!=null||u!=null))switch(h){case"value":_=s;break;case"defaultValue":q=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(c(91));break;default:s!==u&&Fe(e,t,h,s,n,u)}xf(e,_,q);return;case"option":for(var ne in a)if(_=a[ne],a.hasOwnProperty(ne)&&_!=null&&!n.hasOwnProperty(ne))switch(ne){case"selected":e.selected=!1;break;default:Fe(e,t,ne,null,n,_)}for(S in n)if(_=n[S],q=a[S],n.hasOwnProperty(S)&&_!==q&&(_!=null||q!=null))switch(S){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Fe(e,t,S,_,n,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in a)_=a[pe],a.hasOwnProperty(pe)&&_!=null&&!n.hasOwnProperty(pe)&&Fe(e,t,pe,null,n,_);for(D in n)if(_=n[D],q=a[D],n.hasOwnProperty(D)&&_!==q&&(_!=null||q!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,t));break;default:Fe(e,t,D,_,n,q)}return;default:if(gu(t)){for(var Je in a)_=a[Je],a.hasOwnProperty(Je)&&_!==void 0&&!n.hasOwnProperty(Je)&&no(e,t,Je,void 0,n,_);for(Q in n)_=n[Q],q=a[Q],!n.hasOwnProperty(Q)||_===q||_===void 0&&q===void 0||no(e,t,Q,_,n,q);return}}for(var C in a)_=a[C],a.hasOwnProperty(C)&&_!=null&&!n.hasOwnProperty(C)&&Fe(e,t,C,null,n,_);for(k in n)_=n[k],q=a[k],!n.hasOwnProperty(k)||_===q||_==null&&q==null||Fe(e,t,k,_,n,q)}function Nm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var s=a[n],u=s.transferSize,h=s.initiatorType,g=s.duration;if(u&&g&&Nm(h)){for(h=0,g=s.responseEnd,n+=1;n<a.length;n++){var S=a[n],D=S.startTime;if(D>g)break;var Q=S.transferSize,k=S.initiatorType;Q&&Nm(k)&&(S=S.responseEnd,h+=Q*(S<g?1:(g-D)/(S-D)))}if(--n,t+=8*(u+h)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var io=null,so=null;function Cr(e){return e.nodeType===9?e:e.ownerDocument}function Rm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Tm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ro(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var uo=null;function Pg(){var e=window.event;return e&&e.type==="popstate"?e===uo?!1:(uo=e,!0):(uo=null,!1)}var wm=typeof setTimeout=="function"?setTimeout:void 0,Wg=typeof clearTimeout=="function"?clearTimeout:void 0,Cm=typeof Promise=="function"?Promise:void 0,Ig=typeof queueMicrotask=="function"?queueMicrotask:typeof Cm<"u"?function(e){return Cm.resolve(null).then(e).catch(eb)}:wm;function eb(e){setTimeout(function(){throw e})}function zl(e){return e==="head"}function Mm(e,t){var a=t,n=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(s),ii(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")ts(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ts(a);for(var u=a.firstChild;u;){var h=u.nextSibling,g=u.nodeName;u[Me]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=h}}else a==="body"&&ts(e.ownerDocument.body);a=s}while(a);ii(t)}function Om(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function co(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":co(a),Be(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function tb(e,t,a,n){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Me])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=oa(e.nextSibling),e===null)break}return null}function ab(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=oa(e.nextSibling),e===null))return null;return e}function Am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=oa(e.nextSibling),e===null))return null;return e}function oo(e){return e.data==="$?"||e.data==="$~"}function fo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function lb(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function oa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ho=null;function Dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return oa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function zm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function _m(e,t,a){switch(t=Cr(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function ts(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Be(e)}var fa=new Map,Um=new Set;function Mr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ul=Z.d;Z.d={f:nb,r:ib,D:sb,C:rb,L:ub,m:cb,X:fb,S:ob,M:db};function nb(){var e=ul.f(),t=xr();return e||t}function ib(e){var t=Xe(e);t!==null&&t.tag===5&&t.type==="form"?Wd(t):ul.r(e)}var ai=typeof document>"u"?null:document;function Lm(e,t,a){var n=ai;if(n&&typeof t=="string"&&t){var s=zt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),Um.has(s)||(Um.add(s),e={rel:e,crossOrigin:a,href:t},n.querySelector(s)===null&&(t=n.createElement("link"),Nt(t,"link",e),He(t),n.head.appendChild(t)))}}function sb(e){ul.D(e),Lm("dns-prefetch",e,null)}function rb(e,t){ul.C(e,t),Lm("preconnect",e,t)}function ub(e,t,a){ul.L(e,t,a);var n=ai;if(n&&e&&t){var s='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+zt(a.imageSizes)+'"]')):s+='[href="'+zt(e)+'"]';var u=s;switch(t){case"style":u=li(e);break;case"script":u=ni(e)}fa.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),fa.set(u,e),n.querySelector(s)!==null||t==="style"&&n.querySelector(as(u))||t==="script"&&n.querySelector(ls(u))||(t=n.createElement("link"),Nt(t,"link",e),He(t),n.head.appendChild(t)))}}function cb(e,t){ul.m(e,t);var a=ai;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+zt(n)+'"][href="'+zt(e)+'"]',u=s;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ni(e)}if(!fa.has(u)&&(e=x({rel:"modulepreload",href:e},t),fa.set(u,e),a.querySelector(s)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ls(u)))return}n=a.createElement("link"),Nt(n,"link",e),He(n),a.head.appendChild(n)}}}function ob(e,t,a){ul.S(e,t,a);var n=ai;if(n&&e){var s=rt(n).hoistableStyles,u=li(e);t=t||"default";var h=s.get(u);if(!h){var g={loading:0,preload:null};if(h=n.querySelector(as(u)))g.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=fa.get(u))&&mo(e,a);var S=h=n.createElement("link");He(S),Nt(S,"link",e),S._p=new Promise(function(D,Q){S.onload=D,S.onerror=Q}),S.addEventListener("load",function(){g.loading|=1}),S.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Or(h,t,n)}h={type:"stylesheet",instance:h,count:1,state:g},s.set(u,h)}}}function fb(e,t){ul.X(e,t);var a=ai;if(a&&e){var n=rt(a).hoistableScripts,s=ni(e),u=n.get(s);u||(u=a.querySelector(ls(s)),u||(e=x({src:e,async:!0},t),(t=fa.get(s))&&po(e,t),u=a.createElement("script"),He(u),Nt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(s,u))}}function db(e,t){ul.M(e,t);var a=ai;if(a&&e){var n=rt(a).hoistableScripts,s=ni(e),u=n.get(s);u||(u=a.querySelector(ls(s)),u||(e=x({src:e,async:!0,type:"module"},t),(t=fa.get(s))&&po(e,t),u=a.createElement("script"),He(u),Nt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(s,u))}}function Hm(e,t,a,n){var s=(s=me.current)?Mr(s):null;if(!s)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=li(a.href),a=rt(s).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=li(a.href);var u=rt(s).hoistableStyles,h=u.get(e);if(h||(s=s.ownerDocument||s,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=s.querySelector(as(e)))&&!u._p&&(h.instance=u,h.state.loading=5),fa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},fa.set(e,a),u||hb(s,e,a,h.state))),t&&n===null)throw Error(c(528,""));return h}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ni(a),a=rt(s).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function li(e){return'href="'+zt(e)+'"'}function as(e){return'link[rel="stylesheet"]['+e+"]"}function qm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function hb(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Nt(t,"link",a),He(t),e.head.appendChild(t))}function ni(e){return'[src="'+zt(e)+'"]'}function ls(e){return"script[async]"+e}function Bm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+zt(a.href)+'"]');if(n)return t.instance=n,He(n),n;var s=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),He(n),Nt(n,"style",s),Or(n,a.precedence,e),t.instance=n;case"stylesheet":s=li(a.href);var u=e.querySelector(as(s));if(u)return t.state.loading|=4,t.instance=u,He(u),u;n=qm(a),(s=fa.get(s))&&mo(n,s),u=(e.ownerDocument||e).createElement("link"),He(u);var h=u;return h._p=new Promise(function(g,S){h.onload=g,h.onerror=S}),Nt(u,"link",n),t.state.loading|=4,Or(u,a.precedence,e),t.instance=u;case"script":return u=ni(a.src),(s=e.querySelector(ls(u)))?(t.instance=s,He(s),s):(n=a,(s=fa.get(u))&&(n=x({},a),po(n,s)),e=e.ownerDocument||e,s=e.createElement("script"),He(s),Nt(s,"link",n),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Or(n,a.precedence,e));return t.instance}function Or(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=n.length?n[n.length-1]:null,u=s,h=0;h<n.length;h++){var g=n[h];if(g.dataset.precedence===t)u=g;else if(u!==s)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function mo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function po(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ar=null;function Qm(e,t,a){if(Ar===null){var n=new Map,s=Ar=new Map;s.set(a,n)}else s=Ar,n=s.get(a),n||(n=new Map,s.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var u=a[s];if(!(u[Me]||u[I]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var g=n.get(h);g?g.push(u):n.set(h,[u])}}return n}function Ym(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function mb(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Gm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function pb(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=li(n.href),u=t.querySelector(as(s));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Dr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,He(u);return}u=t.ownerDocument||t,n=qm(n),(s=fa.get(s))&&mo(n,s),u=u.createElement("link"),He(u);var h=u;h._p=new Promise(function(g,S){h.onload=g,h.onerror=S}),Nt(u,"link",n),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Dr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var vo=0;function vb(e,t){return e.stylesheets&&e.count===0&&_r(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&_r(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&vo===0&&(vo=62500*Jg());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_r(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>vo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(s)}}:null}function Dr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_r(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zr=null;function _r(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zr=new Map,t.forEach(yb,e),zr=null,Dr.call(e))}function yb(e,t){if(!(t.state.loading&4)){var a=zr.get(e);if(a)var n=a.get(null);else{a=new Map,zr.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<s.length;u++){var h=s[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),n=h)}n&&a.set(null,n)}s=t.instance,h=s.getAttribute("data-precedence"),u=a.get(h)||n,u===n&&a.set(null,s),a.set(h,s),this.count++,n=Dr.bind(this),s.addEventListener("load",n),s.addEventListener("error",n),u?u.parentNode.insertBefore(s,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var ns={$$typeof:K,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function gb(e,t,a,n,s,u,h,g,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ml(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ml(0),this.hiddenUpdates=ml(null),this.identifierPrefix=n,this.onUncaughtError=s,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function km(e,t,a,n,s,u,h,g,S,D,Q,k){return e=new gb(e,t,a,h,S,D,Q,k,g),t=1,u===!0&&(t|=24),u=$t(3,null,null,t),e.current=u,u.stateNode=e,t=$u(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},Wu(u),e}function Xm(e){return e?(e=Un,e):Un}function Km(e,t,a,n,s,u){s=Xm(s),n.context===null?n.context=s:n.pendingContext=s,n=jl(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=El(e,n,t),a!==null&&(Xt(a,e,t),Li(a,e,t))}function Vm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function yo(e,t){Vm(e,t),(e=e.alternate)&&Vm(e,t)}function Zm(e){if(e.tag===13||e.tag===31){var t=Jl(e,67108864);t!==null&&Xt(t,e,67108864),yo(e,67108864)}}function $m(e){if(e.tag===13||e.tag===31){var t=It();t=w(t);var a=Jl(e,t);a!==null&&Xt(a,e,t),yo(e,t)}}var Ur=!0;function bb(e,t,a,n){var s=U.T;U.T=null;var u=Z.p;try{Z.p=2,go(e,t,a,n)}finally{Z.p=u,U.T=s}}function xb(e,t,a,n){var s=U.T;U.T=null;var u=Z.p;try{Z.p=8,go(e,t,a,n)}finally{Z.p=u,U.T=s}}function go(e,t,a,n){if(Ur){var s=bo(n);if(s===null)lo(e,t,n,Lr,a),Jm(e,n);else if(jb(s,e,t,a,n))n.stopPropagation();else if(Jm(e,n),t&4&&-1<Sb.indexOf(e)){for(;s!==null;){var u=Xe(s);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=xa(u.pendingLanes);if(h!==0){var g=u;for(g.pendingLanes|=2,g.entangledLanes|=2;h;){var S=1<<31-wt(h);g.entanglements[1]|=S,h&=~S}_a(u),(Ge&6)===0&&(gr=Ot()+500,Wi(0))}}break;case 31:case 13:g=Jl(u,2),g!==null&&Xt(g,u,2),xr(),yo(u,2)}if(u=bo(n),u===null&&lo(e,t,n,Lr,a),u===s)break;s=u}s!==null&&n.stopPropagation()}else lo(e,t,n,null,a)}}function bo(e){return e=xu(e),xo(e)}var Lr=null;function xo(e){if(Lr=null,e=et(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Lr=e,null}function Fm(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qa()){case fl:return 2;case gi:return 8;case dl:case ba:return 32;case aa:return 268435456;default:return 32}default:return 32}}var So=!1,_l=null,Ul=null,Ll=null,is=new Map,ss=new Map,Hl=[],Sb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Jm(e,t){switch(e){case"focusin":case"focusout":_l=null;break;case"dragenter":case"dragleave":Ul=null;break;case"mouseover":case"mouseout":Ll=null;break;case"pointerover":case"pointerout":is.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ss.delete(t.pointerId)}}function rs(e,t,a,n,s,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[s]},t!==null&&(t=Xe(t),t!==null&&Zm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function jb(e,t,a,n,s){switch(t){case"focusin":return _l=rs(_l,e,t,a,n,s),!0;case"dragenter":return Ul=rs(Ul,e,t,a,n,s),!0;case"mouseover":return Ll=rs(Ll,e,t,a,n,s),!0;case"pointerover":var u=s.pointerId;return is.set(u,rs(is.get(u)||null,e,t,a,n,s)),!0;case"gotpointercapture":return u=s.pointerId,ss.set(u,rs(ss.get(u)||null,e,t,a,n,s)),!0}return!1}function Pm(e){var t=et(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,V(e.priority,function(){$m(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,V(e.priority,function(){$m(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=bo(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);bu=n,a.target.dispatchEvent(n),bu=null}else return t=Xe(a),t!==null&&Zm(t),e.blockedOn=a,!1;t.shift()}return!0}function Wm(e,t,a){Hr(e)&&a.delete(t)}function Eb(){So=!1,_l!==null&&Hr(_l)&&(_l=null),Ul!==null&&Hr(Ul)&&(Ul=null),Ll!==null&&Hr(Ll)&&(Ll=null),is.forEach(Wm),ss.forEach(Wm)}function qr(e,t){e.blockedOn===t&&(e.blockedOn=null,So||(So=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Eb)))}var Br=null;function Im(e){Br!==e&&(Br=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Br===e&&(Br=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],s=e[t+2];if(typeof n!="function"){if(xo(n||a)===null)continue;break}var u=Xe(a);u!==null&&(e.splice(t,3),t-=3,gc(u,{pending:!0,data:s,method:a.method,action:n},n,s))}}))}function ii(e){function t(S){return qr(S,e)}_l!==null&&qr(_l,e),Ul!==null&&qr(Ul,e),Ll!==null&&qr(Ll,e),is.forEach(t),ss.forEach(t);for(var a=0;a<Hl.length;a++){var n=Hl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Hl.length&&(a=Hl[0],a.blockedOn===null);)Pm(a),a.blockedOn===null&&Hl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var s=a[n],u=a[n+1],h=s[te]||null;if(typeof u=="function")h||Im(a);else if(h){var g=null;if(u&&u.hasAttribute("formAction")){if(s=u,h=u[te]||null)g=h.formAction;else if(xo(s)!==null)continue}else g=h.action;typeof g=="function"?a[n+1]=g:(a.splice(n,3),n-=3),Im(a)}}}function ep(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return s=h})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function jo(e){this._internalRoot=e}Qr.prototype.render=jo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=It();Km(a,n,e,t,null,null)},Qr.prototype.unmount=jo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Km(e.current,2,null,e,null,null),xr(),t[ee]=null}};function Qr(e){this._internalRoot=e}Qr.prototype.unstable_scheduleHydration=function(e){if(e){var t=X();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Hl.length&&t!==0&&t<Hl[a].priority;a++);Hl.splice(a,0,e),a===0&&Pm(e)}};var tp=i.version;if(tp!=="19.2.0")throw Error(c(527,tp,"19.2.0"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=v(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Nb={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yr.isDisabled&&Yr.supportsFiber)try{Ya=Yr.inject(Nb),At=Yr}catch{}}return cs.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",s=uh,u=ch,h=oh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=km(e,1,!1,null,null,a,n,null,s,u,h,ep),e[ee]=t.current,ao(e),new jo(t)},cs.hydrateRoot=function(e,t,a){if(!f(e))throw Error(c(299));var n=!1,s="",u=uh,h=ch,g=oh,S=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(g=a.onRecoverableError),a.formState!==void 0&&(S=a.formState)),t=km(e,1,!0,t,a??null,n,s,S,u,h,g,ep),t.context=Xm(null),a=t.current,n=It(),n=w(n),s=jl(n),s.callback=null,El(a,s,n),a=n,t.current.lanes=a,Oa(t,a),_a(t),e[ee]=t.current,ao(e),new Qr(t)},cs.version="19.2.0",cs}var Sp;function b0(){if(Sp)return Ro.exports;Sp=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),Ro.exports=g0(),Ro.exports}var x0=b0();/**
50
+ * react-router v7.18.2
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var Sv=l=>{throw TypeError(l)},jv=(l,i,r)=>i.has(l)||Sv("Cannot "+r),da=(l,i,r)=>(jv(l,i,"read from private field"),r?r.call(l):i.get(l)),hs=(l,i,r)=>i.has(l)?Sv("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(l):i.set(l,r),Ua=(l,i,r,c)=>(jv(l,i,"write to private field"),i.set(l,r),r),nu=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,lf=/^[\\/]{2}/;function Ev(l,i){return i+l.replace(/\\/g,"/")}var jp="popstate";function Ep(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function S0(l={}){function i(f,d){let{pathname:m="/",search:p="",hash:y=""}=Ma(f.location.hash.substring(1));return!m.startsWith("/")&&!m.startsWith(".")&&(m="/"+m),ys("",{pathname:m,search:p,hash:y},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(f,d){let m=f.document.querySelector("base"),p="";if(m&&m.getAttribute("href")){let y=f.location.href,v=y.indexOf("#");p=v===-1?y:y.slice(0,v)}return p+"#"+(typeof d=="string"?d:Ha(d))}function c(f,d){ot(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(d)})`)}return E0(i,r,c,l)}function we(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function ot(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function j0(){return Math.random().toString(36).substring(2,10)}function Np(l,i){return{usr:l.state,key:l.key,idx:i,masked:l.mask?{pathname:l.pathname,search:l.search,hash:l.hash}:void 0}}function ys(l,i,r=null,c,f){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof i=="string"?Ma(i):i,state:r,key:i&&i.key||c||j0(),mask:f}}function Ha({pathname:l="/",search:i="",hash:r=""}){return i&&i!=="?"&&(l+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(l+=r.charAt(0)==="#"?r:"#"+r),l}function Ma(l){let i={};if(l){let r=l.indexOf("#");r>=0&&(i.hash=l.substring(r),l=l.substring(0,r));let c=l.indexOf("?");c>=0&&(i.search=l.substring(c),l=l.substring(0,c)),l&&(i.pathname=l)}return i}function E0(l,i,r,c={}){let{window:f=document.defaultView,v5Compat:d=!1}=c,m=f.history,p="POP",y=null,v=b();v==null&&(v=0,m.replaceState({...m.state,idx:v},""));function b(){return(m.state||{idx:null}).idx}function x(){p="POP";let H=b(),P=H==null?null:H-v;v=H,y&&y({action:p,location:B.location,delta:P})}function E(H,P){p="PUSH";let F=Ep(H)?H:ys(B.location,H,P);r&&r(F,H),v=b()+1;let K=Np(F,v),ie=B.createHref(F.mask||F);try{m.pushState(K,"",ie)}catch(ae){if(ae instanceof DOMException&&ae.name==="DataCloneError")throw ae;f.location.assign(ie)}d&&y&&y({action:p,location:B.location,delta:1})}function M(H,P){p="REPLACE";let F=Ep(H)?H:ys(B.location,H,P);r&&r(F,H),v=b();let K=Np(F,v),ie=B.createHref(F.mask||F);m.replaceState(K,"",ie),d&&y&&y({action:p,location:B.location,delta:0})}function L(H){return Nv(f,H)}let B={get action(){return p},get location(){return l(f,m)},listen(H){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(jp,x),y=H,()=>{f.removeEventListener(jp,x),y=null}},createHref(H){return i(f,H)},createURL:L,encodeLocation(H){let P=L(H);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:E,replace:M,go(H){return m.go(H)}};return B}function Nv(l,i,r=!1){let c="http://localhost";l&&(c=l.location.origin!=="null"?l.location.origin:l.location.href),we(c,"No window.location.(origin|href) available to create URL");let f=typeof i=="string"?i:Ha(i);return f=f.replace(/ $/,"%20"),!r&&lf.test(f)&&(f=c+f),new URL(f,c)}var ms,Rp=class{constructor(l){if(hs(this,ms,new Map),l)for(let[i,r]of l)this.set(i,r)}get(l){if(da(this,ms).has(l))return da(this,ms).get(l);if(l.defaultValue!==void 0)return l.defaultValue;throw new Error("No value found for context")}set(l,i){da(this,ms).set(l,i)}};ms=new WeakMap;var N0=new Set(["lazy","caseSensitive","path","id","index","children"]);function R0(l){return N0.has(l)}var T0=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function w0(l){return T0.has(l)}function C0(l){return l.index===!0}function gs(l,i,r=[],c={},f=!1){return l.map((d,m)=>{let p=[...r,String(m)],y=typeof d.id=="string"?d.id:p.join("-");if(we(d.index!==!0||!d.children,"Cannot specify children on an index route"),we(f||!c[y],`Found a route id collision on id "${y}". Route id's must be globally unique within Data Router usages`),C0(d)){let v={...d,id:y};return c[y]=Tp(v,i(v)),v}else{let v={...d,id:y,children:void 0};return c[y]=Tp(v,i(v)),d.children&&(v.children=gs(d.children,i,p,c,f)),v}})}function Tp(l,i){return Object.assign(l,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...l.lazy,...i.lazy}}:{}})}function Rv(l,i,r="/"){return wa(l,i,r,!1)}function wa(l,i,r,c,f){let d=typeof i=="string"?Ma(i):i,m=ya(d.pathname||"/",r);if(m==null)return null;let p=f??Vr(l),y=null,v=Q0(m);for(let b=0;y==null&&b<p.length;++b)y=B0(p[b],v,c);return y}function M0(l,i){let{route:r,pathname:c,params:f}=l;return{id:r.id,pathname:c,params:f,data:i[r.id],loaderData:i[r.id],handle:r.handle}}function Vr(l){let i=Tv(l);return O0(i),i}function Tv(l,i=[],r=[],c="",f=!1){let d=(m,p,y=f,v)=>{let b={relativePath:v===void 0?m.path||"":v,caseSensitive:m.caseSensitive===!0,childrenIndex:p,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(c)&&y)return;we(b.relativePath.startsWith(c),`Absolute route path "${b.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(c.length)}let x=pa([c,b.relativePath]),E=r.concat(b);m.children&&m.children.length>0&&(we(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Tv(m.children,i,E,x,y)),!(m.path==null&&!m.index)&&i.push({path:x,score:H0(x,m.index),routesMeta:E.map((M,L)=>{let[B,H]=Mv(M.relativePath,M.caseSensitive,L===E.length-1);return{...M,matcher:B,compiledParams:H}})})};return l.forEach((m,p)=>{if(m.path===""||!m.path?.includes("?"))d(m,p);else for(let y of wv(m.path))d(m,p,!0,y)}),i}function wv(l){let i=l.split("/");if(i.length===0)return[];let[r,...c]=i,f=r.endsWith("?"),d=r.replace(/\?$/,"");if(c.length===0)return f?[d,""]:[d];let m=wv(c.join("/")),p=[];return p.push(...m.map(y=>y===""?d:[d,y].join("/"))),f&&p.push(...m),p.map(y=>l.startsWith("/")&&y===""?"/":y)}function O0(l){l.sort((i,r)=>i.score!==r.score?r.score-i.score:q0(i.routesMeta.map(c=>c.childrenIndex),r.routesMeta.map(c=>c.childrenIndex)))}var A0=/^:[\w-]+$/,D0=3,z0=2,_0=1,U0=10,L0=-2,wp=l=>l==="*";function H0(l,i){let r=l.split("/"),c=r.length;return r.some(wp)&&(c+=L0),i&&(c+=z0),r.filter(f=>!wp(f)).reduce((f,d)=>f+(A0.test(d)?D0:d===""?_0:U0),c)}function q0(l,i){return l.length===i.length&&l.slice(0,-1).every((c,f)=>c===i[f])?l[l.length-1]-i[i.length-1]:0}function B0(l,i,r=!1){let{routesMeta:c}=l,f={},d="/",m=[];for(let p=0;p<c.length;++p){let y=c[p],v=p===c.length-1,b=d==="/"?i:i.slice(d.length)||"/",x={path:y.relativePath,caseSensitive:y.caseSensitive,end:v},E=y.matcher&&y.compiledParams?Cv(x,b,y.matcher,y.compiledParams):tu(x,b),M=y.route;if(!E&&v&&r&&!c[c.length-1].route.index&&(E=tu({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!E)return null;Object.assign(f,E.params),m.push({params:f,pathname:pa([d,E.pathname]),pathnameBase:k0(pa([d,E.pathnameBase])),route:M}),E.pathnameBase!=="/"&&(d=pa([d,E.pathnameBase]))}return m}function tu(l,i){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,c]=Mv(l.path,l.caseSensitive,l.end);return Cv(l,i,r,c)}function Cv(l,i,r,c){let f=i.match(r);if(!f)return null;let d=f[0],m=d.replace(/(.)\/+$/,"$1"),p=f.slice(1);return{params:c.reduce((v,{paramName:b,isOptional:x},E)=>{if(b==="*"){let L=p[E]||"";m=d.slice(0,d.length-L.length).replace(/(.)\/+$/,"$1")}const M=p[E];return x&&!M?v[b]=void 0:v[b]=(M||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:m,pattern:l}}function Mv(l,i=!1,r=!0){ot(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let c=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,p,y,v,b)=>{if(c.push({paramName:p,isOptional:y!=null}),y){let x=b.charAt(v+m.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,i?void 0:"i"),c]}function Q0(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return ot(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),l}}function ya(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,c=l.charAt(r);return c&&c!=="/"?null:l.slice(r)||"/"}function Y0({basename:l,pathname:i}){return i==="/"?l:pa([l,i])}var nf=l=>nu.test(l);function G0(l,i="/"){let{pathname:r,search:c="",hash:f=""}=typeof l=="string"?Ma(l):l,d;return r?(r=rf(r),r.startsWith("/")?d=Cp(r.substring(1),"/"):d=Cp(r,i)):d=i,{pathname:d,search:X0(c),hash:K0(f)}}function Cp(l,i){let r=au(i).split("/");return l.split("/").forEach(f=>{f===".."?r.length>1&&r.pop():f!=="."&&r.push(f)}),r.length>1?r.join("/"):"/"}function Mo(l,i,r,c){return`Cannot include a '${l}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. 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 Ov(l){return l.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function sf(l){let i=Ov(l);return i.map((r,c)=>c===i.length-1?r.pathname:r.pathnameBase)}function iu(l,i,r,c=!1){let f;typeof l=="string"?f=Ma(l):(f={...l},we(!f.pathname||!f.pathname.includes("?"),Mo("?","pathname","search",f)),we(!f.pathname||!f.pathname.includes("#"),Mo("#","pathname","hash",f)),we(!f.search||!f.search.includes("#"),Mo("#","search","hash",f)));let d=l===""||f.pathname==="",m=d?"/":f.pathname,p;if(m==null)p=r;else{let x=i.length-1;if(!c&&m.startsWith("..")){let E=m.split("/");for(;E[0]==="..";)E.shift(),x-=1;f.pathname=E.join("/")}p=x>=0?i[x]:"/"}let y=G0(f,p),v=m&&m!=="/"&&m.endsWith("/"),b=(d||m===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(v||b)&&(y.pathname+="/"),y}var rf=l=>l.replace(/[\\/]{2,}/g,"/"),pa=l=>rf(l.join("/")),au=l=>l.replace(/\/+$/,""),k0=l=>au(l).replace(/^\/*/,"/"),X0=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,K0=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,V0=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xs=class{constructor(l,i,r,c=!1){this.status=l,this.statusText=i||"",this.internal=c,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function fi(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Ss(l){let i=l.map(r=>r.route.path).filter(Boolean);return pa(i)||"/"}var Av=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Dv(l,i){let r=l;if(typeof r!="string"||!nu.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let c=r,f=!1;if(Av)try{let d=new URL(window.location.href),m=lf.test(r)?new URL(Ev(r,d.protocol)):new URL(r),p=ya(m.pathname,i);m.origin===d.origin&&p!=null?r=p+m.search+m.hash:f=!0}catch{ot(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:r}}var Yl=Symbol("Uninstrumented");function Z0(l,i){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};l.forEach(f=>f({id:i.id,index:i.index,path:i.path,instrument(d){let m=Object.keys(r);for(let p of m)d[p]&&r[p].push(d[p])}}));let c={};if(typeof i.lazy=="function"&&r.lazy.length>0){let f=ci(r.lazy,i.lazy,()=>{});f&&(c.lazy=f)}if(typeof i.lazy=="object"){let f=i.lazy;["middleware","loader","action"].forEach(d=>{let m=f[d],p=r[`lazy.${d}`];if(typeof m=="function"&&p.length>0){let y=ci(p,m,()=>{});y&&(c.lazy=Object.assign(c.lazy||{},{[d]:y}))}})}return["loader","action"].forEach(f=>{let d=i[f];if(typeof d=="function"&&r[f].length>0){let m=d[Yl]??d,p=ci(r[f],m,(...y)=>Mp(y[0]));p&&(f==="loader"&&m.hydrate===!0&&(p.hydrate=!0),p[Yl]=m,c[f]=p)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(c.middleware=i.middleware.map(f=>{let d=f[Yl]??f,m=ci(r.middleware,d,(...p)=>Mp(p[0]));return m?(m[Yl]=d,m):f})),c}function $0(l,i){let r={navigate:[],fetch:[]};if(i.forEach(c=>c({instrument(f){let d=Object.keys(f);for(let m of d)f[m]&&r[m].push(f[m])}})),r.navigate.length>0){let c=l.navigate[Yl]??l.navigate,f=ci(r.navigate,c,(...d)=>{let[m,p]=d;return{to:typeof m=="number"||typeof m=="string"?m:m?Ha(m):".",...Op(l,p??{})}});f&&(f[Yl]=c,l.navigate=f)}if(r.fetch.length>0){let c=l.fetch[Yl]??l.fetch,f=ci(r.fetch,c,(...d)=>{let[m,,p,y]=d;return{href:p??".",fetcherKey:m,...Op(l,y??{})}});f&&(f[Yl]=c,l.fetch=f)}return l}function ci(l,i,r){return l.length===0?null:async(...c)=>{let f=await zv(l,r(...c),()=>i(...c),l.length-1);if(f.type==="error")throw f.value;return f.value}}async function zv(l,i,r,c){let f=l[c],d;if(f){let m,p=async()=>(m?console.error("You cannot call instrumented handlers more than once"):m=zv(l,i,r,c-1),d=await m,we(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await f(p,i)}catch(y){console.error("An instrumentation function threw an error:",y)}m||await p(),await m}else try{d={type:"success",value:await r()}}catch(m){d={type:"error",value:m}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Mp(l){let{request:i,context:r,params:c,pattern:f}=l;return{request:F0(i),params:{...c},pattern:f,context:J0(r)}}function Op(l,i){return{currentUrl:Ha(l.state.location),..."formMethod"in i?{formMethod:i.formMethod}:{},..."formEncType"in i?{formEncType:i.formEncType}:{},..."formData"in i?{formData:i.formData}:{},..."body"in i?{body:i.body}:{}}}function F0(l){return{method:l.method,url:l.url,headers:{get:(...i)=>l.headers.get(...i)}}}function J0(l){if(W0(l)){let i={...l};return Object.freeze(i),i}else return{get:i=>l.get(i)}}var P0=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function W0(l){if(l===null||typeof l!="object")return!1;const i=Object.getPrototypeOf(l);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===P0}var _v=["POST","PUT","PATCH","DELETE"],I0=new Set(_v),ex=["GET",..._v],tx=new Set(ex),Uv=new Set([301,302,303,307,308]),ax=new Set([307,308]),Oo={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lx={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},os={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},nx=l=>({hasErrorBoundary:!!l.hasErrorBoundary}),Lv="remix-router-transitions",Hv=Symbol("ResetLoaderData"),fn,si,Bl,ri,ix=class{constructor(l){hs(this,fn),hs(this,si),hs(this,Bl),hs(this,ri),Ua(this,fn,l),Ua(this,si,Vr(l))}get stableRoutes(){return da(this,fn)}get activeRoutes(){return da(this,Bl)??da(this,fn)}get branches(){return da(this,ri)??da(this,si)}get hasHMRRoutes(){return da(this,Bl)!=null}setRoutes(l){Ua(this,fn,l),Ua(this,si,Vr(l))}setHmrRoutes(l){Ua(this,Bl,l),Ua(this,ri,Vr(l))}commitHmrRoutes(){da(this,Bl)&&(Ua(this,fn,da(this,Bl)),Ua(this,si,da(this,ri)),Ua(this,Bl,void 0),Ua(this,ri,void 0))}};fn=new WeakMap;si=new WeakMap;Bl=new WeakMap;ri=new WeakMap;function sx(l){const i=l.window?l.window:typeof window<"u"?window:void 0,r=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";we(l.routes.length>0,"You must provide a non-empty routes array to createRouter");let c=l.hydrationRouteProperties||[],f=l.mapRouteProperties||nx,d=f;if(l.instrumentations){let j=l.instrumentations;d=w=>({...f(w),...Z0(j.map(z=>z.route).filter(Boolean),w)})}let m={},p=new ix(gs(l.routes,d,void 0,m)),y=l.basename||"/";y.startsWith("/")||(y=`/${y}`);let v=l.dataStrategy||fx,b={...l.future},x=null,E=new Set,M=null,L=null,B=null,H=null,P=l.hydrationData!=null,F=wa(p.activeRoutes,l.history.location,y,!1,p.branches),K=!1,ie=null,ae,he;if(F==null&&!l.patchRoutesOnNavigation){let j=ha(404,{pathname:l.history.location.pathname}),{matches:w,route:z}=kr(p.activeRoutes);ae=!0,he=!ae,F=w,ie={[z.id]:j}}else if(F&&!l.hydrationData&&ml(F,p.activeRoutes,l.history.location.pathname).active&&(F=null),F)if(F.some(j=>j.route.lazy))ae=!1,he=!ae;else if(!F.some(j=>uf(j.route)))ae=!0,he=!ae;else{let j=l.hydrationData?l.hydrationData.loaderData:null,w=l.hydrationData?l.hydrationData.errors:null,z=F;if(w){let X=F.findIndex(V=>w[V.route.id]!==void 0);z=z.slice(0,X+1)}he=!1,ae=!0,z.forEach(X=>{let V=qv(X.route,j,w);he=he||V.renderFallback,ae=ae&&!V.shouldLoad})}else{ae=!1,he=!ae,F=[];let j=ml(null,p.activeRoutes,l.history.location.pathname);j.active&&j.matches&&(K=!0,F=j.matches)}let $,O={historyAction:l.history.action,location:l.history.location,matches:F,initialized:ae,renderFallback:he,navigation:Oo,restoreScrollPosition:l.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:l.hydrationData&&l.hydrationData.loaderData||{},actionData:l.hydrationData&&l.hydrationData.actionData||null,errors:l.hydrationData&&l.hydrationData.errors||ie,fetchers:new Map,blockers:new Map},ge="POP",je=null,qe=!1,be,nt=!1,Ue=new Map,ke=null,U=!1,Z=!1,se=new Set,ue=new Map,ye=0,R=-1,Y=new Map,J=new Set,W=new Map,ce=new Map,me=new Set,Ce=new Map,ft,Pe=null;function Xl(){if(x=l.history.listen(({action:j,location:w,delta:z})=>{if(ft){ft(),ft=void 0;return}ot(Ce.size===0||z!=null,"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 X=Vl({currentLocation:O.location,nextLocation:w,historyAction:j});if(X&&z!=null){let V=new Promise(le=>{ft=le});l.history.go(z*-1),Ga(X,{state:"blocked",location:w,proceed(){Ga(X,{state:"proceeding",proceed:void 0,reset:void 0,location:w}),V.then(()=>l.history.go(z))},reset(){let le=new Map(O.blockers);le.set(X,os),vt({blockers:le})}}),je?.resolve(),je=null;return}return Ba(j,w)}),r){Ox(i,Ue);let j=()=>Ax(i,Ue);i.addEventListener("pagehide",j),ke=()=>i.removeEventListener("pagehide",j)}return O.initialized||Ba("POP",O.location,{initialHydration:!0}),$}function bn(){x&&x(),ke&&ke(),E.clear(),be&&be.abort(),O.fetchers.forEach((j,w)=>Ya(O.fetchers,w)),O.blockers.forEach((j,w)=>Kl(w))}function mi(j){if(E.add(j),M){let{newErrors:w}=M;M=null,j(O,{deletedFetchers:[],newErrors:w,viewTransitionOpts:void 0,flushSync:!1})}return()=>E.delete(j)}function vt(j,w={}){j.matches&&(j.matches=j.matches.map(V=>{let le=m[V.route.id],I=V.route;return I.element!==le.element||I.errorElement!==le.errorElement||I.hydrateFallbackElement!==le.hydrateFallbackElement?{...V,route:le}:V})),O={...O,...j};let z=[],X=[];O.fetchers.forEach((V,le)=>{V.state==="idle"&&(me.has(le)?z.push(le):X.push(le))}),me.forEach(V=>{!O.fetchers.has(V)&&!ue.has(V)&&z.push(V)}),E.size===0&&(M={newErrors:j.errors??null}),[...E].forEach(V=>V(O,{deletedFetchers:z,newErrors:j.errors??null,viewTransitionOpts:w.viewTransitionOpts,flushSync:w.flushSync===!0})),z.forEach(V=>Ya(O.fetchers,V)),X.forEach(V=>O.fetchers.delete(V))}function Ht(j,w,{flushSync:z}={}){let X=O.actionData!=null&&O.navigation.formMethod!=null&&Mt(O.navigation.formMethod)&&O.navigation.state==="loading"&&j.state?._isRedirect!==!0,V;w.actionData?Object.keys(w.actionData).length>0?V=w.actionData:V=null:X?V=O.actionData:V=null;let le=w.loaderData?Qp(O.loaderData,w.loaderData,w.matches||[],w.errors):O.loaderData,I=O.blockers;I.size>0&&(I=new Map(I),I.forEach((de,Ee)=>I.set(Ee,os)));let te=U?!1:bi(j,w.matches||O.matches),ee=qe===!0||O.navigation.formMethod!=null&&Mt(O.navigation.formMethod)&&j.state?._isRedirect!==!0;p.commitHmrRoutes(),U||ge==="POP"||(ge==="PUSH"?l.history.push(j,j.state):ge==="REPLACE"&&l.history.replace(j,j.state));let fe;if(ge==="POP"){let de=Ue.get(O.location.pathname);de&&de.has(j.pathname)?fe={currentLocation:O.location,nextLocation:j}:Ue.has(j.pathname)&&(fe={currentLocation:j,nextLocation:O.location})}else if(nt){let de=Ue.get(O.location.pathname);de?de.add(j.pathname):(de=new Set([j.pathname]),Ue.set(O.location.pathname,de)),fe={currentLocation:O.location,nextLocation:j}}vt({...w,actionData:V,loaderData:le,historyAction:ge,location:j,initialized:!0,renderFallback:!1,navigation:Oo,revalidation:"idle",restoreScrollPosition:te,preventScrollReset:ee,blockers:I},{viewTransitionOpts:fe,flushSync:z===!0}),ge="POP",qe=!1,nt=!1,U=!1,Z=!1,je?.resolve(),je=null,Pe?.resolve(),Pe=null}async function xn(j,w){if(je?.resolve(),je=null,typeof j=="number"){je||(je=Xp());let Be=je.promise;return l.history.go(j),Be}let z=ko(O.location,O.matches,y,j,w?.fromRouteId,w?.relative),{path:X,submission:V,error:le}=Ap(!1,z,w),I;w?.mask&&(I={pathname:"",search:"",hash:"",...typeof w.mask=="string"?Ma(w.mask):{...O.location.mask,...w.mask}});let te=O.location,ee=ys(te,X,w&&w.state,void 0,I);ee={...ee,...l.history.encodeLocation(ee)};let fe=w&&w.replace!=null?w.replace:void 0,de="PUSH";fe===!0?de="REPLACE":fe===!1||V!=null&&Mt(V.formMethod)&&V.formAction===O.location.pathname+O.location.search&&(de="REPLACE");let Ee=w&&"preventScrollReset"in w?w.preventScrollReset===!0:void 0,ve=(w&&w.flushSync)===!0,Me=Vl({currentLocation:te,nextLocation:ee,historyAction:de});if(Me){Ga(Me,{state:"blocked",location:ee,proceed(){Ga(Me,{state:"proceeding",proceed:void 0,reset:void 0,location:ee}),xn(j,w)},reset(){let Be=new Map(O.blockers);Be.set(Me,os),vt({blockers:Be})}});return}await Ba(de,ee,{submission:V,pendingError:le,preventScrollReset:Ee,replace:w&&w.replace,enableViewTransition:w&&w.viewTransition,flushSync:ve,callSiteDefaultShouldRevalidate:w&&w.defaultShouldRevalidate})}function pi(){Pe||(Pe=Xp()),dl(),vt({revalidation:"loading"});let j=Pe.promise;return O.navigation.state==="submitting"?j:O.navigation.state==="idle"?(Ba(O.historyAction,O.location,{startUninterruptedRevalidation:!0}),j):(Ba(ge||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:nt===!0}),j)}async function Ba(j,w,z){be&&be.abort(),be=null,ge=j,U=(z&&z.startUninterruptedRevalidation)===!0,vu(O.location,O.matches),qe=(z&&z.preventScrollReset)===!0,nt=(z&&z.enableViewTransition)===!0;let X=p.activeRoutes,V=z?.initialHydration&&O.matches&&O.matches.length>0&&!K?O.matches:wa(X,w,y,!1,p.branches),le=(z&&z.flushSync)===!0;if(V&&O.initialized&&!Z&&xx(O.location,w)&&!(z&&z.submission&&Mt(z.submission.formMethod))){Ht(w,{matches:V},{flushSync:le});return}let I=ml(V,X,w.pathname);if(I.active&&I.matches&&(V=I.matches),!V){let{error:Xe,notFoundMatches:Le,route:rt}=xa(w.pathname);Ht(w,{matches:Le,loaderData:{},errors:{[rt.id]:Xe}},{flushSync:le});return}let te=z&&z.overrideNavigation?{...z.overrideNavigation,matches:V,historyAction:j}:void 0;be=new AbortController;let ee=ui(l.history,w,be.signal,z&&z.submission),fe=l.getContext?await l.getContext():new Rp,de;if(z&&z.pendingError)de=[Ql(V).route.id,{type:"error",error:z.pendingError}];else if(z&&z.submission&&Mt(z.submission.formMethod)){let Xe=await ws(ee,w,z.submission,V,j,fe,I.active,z&&z.initialHydration===!0,{replace:z.replace,flushSync:le});if(Xe.shortCircuited)return;if(Xe.pendingActionResult){let[Le,rt]=Xe.pendingActionResult;if(ea(rt)&&fi(rt.error)&&rt.error.status===404){be=null,Ht(w,{matches:Xe.matches,loaderData:{},errors:{[Le]:rt.error}});return}}V=Xe.matches||V,de=Xe.pendingActionResult,te=Ao(w,V,j,z.submission),le=!1,I.active=!1,ee=ui(l.history,ee.url,ee.signal)}let{shortCircuited:Ee,matches:ve,loaderData:Me,errors:Be,workingFetchers:et}=await vi(ee,w,V,j,fe,I.active,te,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,le,de,z&&z.callSiteDefaultShouldRevalidate);Ee||(be=null,Ht(w,{matches:ve||V,...Yp(de),loaderData:Me,errors:Be,...et?{fetchers:et}:{}}))}async function ws(j,w,z,X,V,le,I,te,ee={}){dl();let fe=Cx(w,X,V,z);if(vt({navigation:fe},{flushSync:ee.flushSync===!0}),I){let ve=await Oa(X,w.pathname,j.signal);if(ve.type==="aborted")return{shortCircuited:!0};if(ve.type==="error"){if(ve.partialMatches.length===0){let{matches:Be,route:et}=kr(p.activeRoutes);return{matches:Be,pendingActionResult:[et.id,{type:"error",error:ve.error}]}}let Me=Ql(ve.partialMatches).route.id;return{matches:ve.partialMatches,pendingActionResult:[Me,{type:"error",error:ve.error}]}}else if(ve.matches)X=ve.matches;else{let{notFoundMatches:Me,error:Be,route:et}=xa(w.pathname);return{matches:Me,pendingActionResult:[et.id,{type:"error",error:Be}]}}}let de,Ee=Zr(X,w);if(!Ee.route.action&&!Ee.route.lazy)de={type:"error",error:ha(405,{method:j.method,pathname:w.pathname,routeId:Ee.route.id})};else{let ve=oi(d,m,j,w,X,Ee,te?[]:c,le),Me=await fl(j,w,ve,le,null);if(de=Me[Ee.route.id],!de){for(let Be of X)if(Me[Be.route.id]){de=Me[Be.route.id];break}}if(j.signal.aborted)return{shortCircuited:!0}}if(hn(de)){let ve;return ee&&ee.replace!=null?ve=ee.replace:ve=Hp(de.response.headers.get("Location"),new URL(j.url),y,l.history)===O.location.pathname+O.location.search,await Qa(j,de,!0,{submission:z,replace:ve}),{shortCircuited:!0}}if(ea(de)){let ve=Ql(X,Ee.route.id);return(ee&&ee.replace)!==!0&&(ge="PUSH"),{matches:X,pendingActionResult:[ve.route.id,de,Ee.route.id]}}return{matches:X,pendingActionResult:[Ee.route.id,de]}}async function vi(j,w,z,X,V,le,I,te,ee,fe,de,Ee,ve,Me){let Be=I||Ao(w,z,X,te),et=te||ee||kp(Be),Xe=!U&&!de;if(le){if(Xe){let We=Sn(ve);vt({navigation:Be,...We!==void 0?{actionData:We}:{}},{flushSync:Ee})}let xe=await Oa(z,w.pathname,j.signal);if(xe.type==="aborted")return{shortCircuited:!0};if(xe.type==="error"){if(xe.partialMatches.length===0){let{matches:Vt,route:Ea}=kr(p.activeRoutes);return{matches:Vt,loaderData:{},errors:{[Ea.id]:xe.error}}}let We=Ql(xe.partialMatches).route.id;return{matches:xe.partialMatches,loaderData:{},errors:{[We]:xe.error}}}else if(xe.matches)z=xe.matches;else{let{error:We,notFoundMatches:Vt,route:Ea}=xa(w.pathname);return{matches:Vt,loaderData:{},errors:{[Ea.id]:We}}}}let Le=p.activeRoutes,{dsMatches:rt,revalidatingFetchers:He}=Dp(j,V,d,m,l.history,O,z,et,w,de?[]:c,de===!0,Z,se,me,W,J,Le,y,l.patchRoutesOnNavigation!=null,p.branches,ve,Me);if(R=++ye,!l.dataStrategy&&!rt.some(xe=>xe.shouldLoad)&&!rt.some(xe=>xe.route.middleware&&xe.route.middleware.length>0)&&He.length===0){let xe=new Map(O.fetchers),We=Cs(xe);return Ht(w,{matches:z,loaderData:{},errors:ve&&ea(ve[1])?{[ve[0]]:ve[1].error}:null,...Yp(ve),...We?{fetchers:xe}:{}},{flushSync:Ee}),{shortCircuited:!0}}if(Xe){let xe={};if(!le){xe.navigation=Be;let We=Sn(ve);We!==void 0&&(xe.actionData=We)}He.length>0&&(xe.fetchers=yi(He)),vt(xe,{flushSync:Ee})}He.forEach(xe=>{bt(xe.key),xe.controller&&ue.set(xe.key,xe.controller)});let pl=()=>He.forEach(xe=>bt(xe.key));be&&be.signal.addEventListener("abort",pl);let{loaderResults:Sa,fetcherResults:qt}=await gi(rt,He,j,w,V);if(j.signal.aborted)return{shortCircuited:!0};be&&be.signal.removeEventListener("abort",pl),He.forEach(xe=>ue.delete(xe.key));let Dt=Xr(Sa);if(Dt)return await Qa(j,Dt.result,!0,{replace:fe}),{shortCircuited:!0};if(Dt=Xr(qt),Dt)return J.add(Dt.key),await Qa(j,Dt.result,!0,{replace:fe}),{shortCircuited:!0};let la=new Map(O.fetchers),{loaderData:En,errors:ja}=Bp(O,z,Sa,ve,He,qt,la);de&&O.errors&&(ja={...O.errors,...ja});let Nn=Cs(la),ka=Ms(R,la),Xa=Nn||ka||He.length>0;return{matches:z,loaderData:En,errors:ja,...Xa?{workingFetchers:la}:{}}}function Sn(j){if(j&&!ea(j[1]))return{[j[0]]:j[1].data};if(O.actionData)return Object.keys(O.actionData).length===0?null:O.actionData}function yi(j){let w=new Map(O.fetchers);return j.forEach(z=>{let X=w.get(z.key),V=fs(void 0,X?X.data:void 0);w.set(z.key,V)}),w}async function fu(j,w,z,X){bt(j);let V=(X&&X.flushSync)===!0,le=p.activeRoutes,I=ko(O.location,O.matches,y,z,w,X?.relative),te=wa(le,I,y,!1,p.branches),ee=ml(te,le,I);if(ee.active&&ee.matches&&(te=ee.matches),!te){aa(j,w,ha(404,{pathname:I}),{flushSync:V});return}let{path:fe,submission:de,error:Ee}=Ap(!0,I,X);if(Ee){aa(j,w,Ee,{flushSync:V});return}let ve=l.getContext?await l.getContext():new Rp,Me=(X&&X.preventScrollReset)===!0;if(de&&Mt(de.formMethod)){await du(j,w,fe,te,ve,ee.active,V,Me,de,X&&X.defaultShouldRevalidate);return}W.set(j,{routeId:w,path:fe}),await Ot(j,w,fe,te,ve,ee.active,V,Me,de)}async function du(j,w,z,X,V,le,I,te,ee,fe){dl(),W.delete(j);let de=O.fetchers.get(j);ba(j,Mx(ee,de),{flushSync:I});let Ee=new AbortController,ve=ui(l.history,z,Ee.signal,ee);if(le){let Ke=await Oa(X,new URL(ve.url).pathname,ve.signal,j);if(Ke.type==="aborted")return;if(Ke.type==="error"){aa(j,w,Ke.error,{flushSync:I});return}else if(Ke.matches)X=Ke.matches;else{aa(j,w,ha(404,{pathname:z}),{flushSync:I});return}}let Me=Zr(X,z);if(!Me.route.action&&!Me.route.lazy){let Ke=ha(405,{method:ee.formMethod,pathname:z,routeId:w});aa(j,w,Ke,{flushSync:I});return}ue.set(j,Ee);let Be=ye,et=oi(d,m,ve,z,X,Me,c,V),Xe=await fl(ve,z,et,V,j),Le=Xe[Me.route.id];if(!Le){for(let Ke of et)if(Xe[Ke.route.id]){Le=Xe[Ke.route.id];break}}if(ve.signal.aborted){ue.get(j)===Ee&&ue.delete(j);return}if(me.has(j)){if(hn(Le)||ea(Le)){ba(j,La(void 0));return}}else{if(hn(Le))if(ue.delete(j),R>Be){ba(j,La(void 0));return}else return J.add(j),ba(j,fs(ee)),Qa(ve,Le,!1,{fetcherSubmission:ee,preventScrollReset:te});if(ea(Le)){aa(j,w,Le.error);return}}let rt=O.navigation.location||O.location,He=ui(l.history,rt,Ee.signal),pl=p.activeRoutes,Sa=O.navigation.state!=="idle"?wa(pl,O.navigation.location,y,!1,p.branches):O.matches;we(Sa,"Didn't find any matches after fetcher action");let qt=++ye;Y.set(j,qt);let{dsMatches:Dt,revalidatingFetchers:la}=Dp(He,V,d,m,l.history,O,Sa,ee,rt,c,!1,Z,se,me,W,J,pl,y,l.patchRoutesOnNavigation!=null,p.branches,[Me.route.id,Le],fe),En=fs(ee,Le.data),ja=new Map(O.fetchers);ja.set(j,En),la.filter(Ke=>Ke.key!==j).forEach(Ke=>{let Ka=Ke.key,zt=ja.get(Ka),xi=fs(void 0,zt?zt.data:void 0);ja.set(Ka,xi),bt(Ka),Ke.controller&&ue.set(Ka,Ke.controller)}),vt({fetchers:ja});let Nn=()=>la.forEach(Ke=>bt(Ke.key));Ee.signal.addEventListener("abort",Nn);let{loaderResults:ka,fetcherResults:Xa}=await gi(Dt,la,He,rt,V);if(Ee.signal.aborted)return;Ee.signal.removeEventListener("abort",Nn),Y.delete(j),ue.delete(j),la.forEach(Ke=>ue.delete(Ke.key));let xe=O.fetchers.has(j),We=Ke=>{if(!xe)return Ke;let Ka=new Map(Ke.fetchers);return Ka.set(j,La(Le.data)),{...Ke,fetchers:Ka}},Vt=Xr(ka);if(Vt)return O=We(O),Qa(He,Vt.result,!1,{preventScrollReset:te});if(Vt=Xr(Xa),Vt)return J.add(Vt.key),O=We(O),Qa(He,Vt.result,!1,{preventScrollReset:te});let Ea=new Map(O.fetchers);xe&&Ea.set(j,La(Le.data));let{loaderData:Rn,errors:Tn}=Bp(O,Sa,ka,void 0,la,Xa,Ea);Ms(qt,Ea),O.navigation.state==="loading"&&qt>R?(we(ge,"Expected pending action"),be&&be.abort(),Ht(O.navigation.location,{matches:Sa,loaderData:Rn,errors:Tn,fetchers:Ea})):(vt({errors:Tn,loaderData:Qp(O.loaderData,Rn,Sa,Tn),fetchers:Ea}),Z=!1)}async function Ot(j,w,z,X,V,le,I,te,ee){let fe=O.fetchers.get(j);ba(j,fs(ee,fe?fe.data:void 0),{flushSync:I});let de=new AbortController,Ee=ui(l.history,z,de.signal);if(le){let Le=await Oa(X,new URL(Ee.url).pathname,Ee.signal,j);if(Le.type==="aborted")return;if(Le.type==="error"){aa(j,w,Le.error,{flushSync:I});return}else if(Le.matches)X=Le.matches;else{aa(j,w,ha(404,{pathname:z}),{flushSync:I});return}}let ve=Zr(X,z);ue.set(j,de);let Me=ye,Be=oi(d,m,Ee,z,X,ve,c,V),et=await fl(Ee,z,Be,V,j),Xe=et[ve.route.id];if(!Xe){for(let Le of X)if(et[Le.route.id]){Xe=et[Le.route.id];break}}if(ue.get(j)===de&&ue.delete(j),!Ee.signal.aborted){if(me.has(j)){ba(j,La(void 0));return}if(hn(Xe))if(R>Me){ba(j,La(void 0));return}else{J.add(j),await Qa(Ee,Xe,!1,{preventScrollReset:te});return}if(ea(Xe)){aa(j,w,Xe.error);return}ba(j,La(Xe.data))}}async function Qa(j,w,z,{submission:X,fetcherSubmission:V,preventScrollReset:le,replace:I}={}){z||(je?.resolve(),je=null),w.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let te=w.response.headers.get("Location");we(te,"Expected a Location header on the redirect Response"),te=Hp(te,new URL(j.url),y,l.history);let ee=ys(O.location,te,{_isRedirect:!0});if(r){let Be=!1;if(w.response.headers.has("X-Remix-Reload-Document"))Be=!0;else if(nf(te)){const et=Nv(i,te,!0);Be=et.origin!==i.location.origin||ya(et.pathname,y)==null}if(Be){I?i.location.replace(te):i.location.assign(te);return}}be=null;let fe=I===!0||w.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:de,formAction:Ee,formEncType:ve}=O.navigation;!X&&!V&&de&&Ee&&ve&&(X=kp(O.navigation));let Me=X||V;if(ax.has(w.response.status)&&Me&&Mt(Me.formMethod))await Ba(fe,ee,{submission:{...Me,formAction:te},preventScrollReset:le||qe,enableViewTransition:z?nt:void 0});else{let Be=Ao(ee,[],fe,X);await Ba(fe,ee,{overrideNavigation:Be,fetcherSubmission:V,preventScrollReset:le||qe,enableViewTransition:z?nt:void 0})}}async function fl(j,w,z,X,V){let le,I={};try{le=await hx(v,j,w,z,V,X,!1)}catch(te){return z.filter(ee=>ee.shouldLoad).forEach(ee=>{I[ee.route.id]={type:"error",error:te}}),I}if(j.signal.aborted)return I;if(!Mt(j.method))for(let te of z){if(le[te.route.id]?.type==="error")break;!le.hasOwnProperty(te.route.id)&&!O.loaderData.hasOwnProperty(te.route.id)&&(!O.errors||!O.errors.hasOwnProperty(te.route.id))&&te.shouldCallHandler()&&(le[te.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${te.route.id}`)})}for(let[te,ee]of Object.entries(le))if(Nx(ee)){let fe=ee.result;I[te]={type:"redirect",response:yx(fe,j,te,z,y)}}else I[te]=await vx(ee);return I}async function gi(j,w,z,X,V){let le=fl(z,X,j,V,null),I=Promise.all(w.map(async fe=>{if(fe.matches&&fe.match&&fe.request&&fe.controller){let Ee=(await fl(fe.request,fe.path,fe.matches,V,fe.key))[fe.match.route.id];return{[fe.key]:Ee}}else return Promise.resolve({[fe.key]:{type:"error",error:ha(404,{pathname:fe.path})}})})),te=await le,ee=(await I).reduce((fe,de)=>Object.assign(fe,de),{});return{loaderResults:te,fetcherResults:ee}}function dl(){Z=!0,W.forEach((j,w)=>{ue.has(w)&&se.add(w),bt(w)})}function ba(j,w,z={}){let X=new Map(O.fetchers);X.set(j,w),vt({fetchers:X},{flushSync:(z&&z.flushSync)===!0})}function aa(j,w,z,X={}){let V=Ql(O.matches,w),le=new Map(O.fetchers);Ya(le,j),vt({errors:{[V.route.id]:z},fetchers:le},{flushSync:(X&&X.flushSync)===!0})}function hu(j){return ce.set(j,(ce.get(j)||0)+1),me.has(j)&&me.delete(j),O.fetchers.get(j)||lx}function mu(j,w){bt(j,w?.reason),ba(j,La(null))}function Ya(j,w){let z=O.fetchers.get(w);ue.has(w)&&!(z&&z.state==="loading"&&Y.has(w))&&bt(w),W.delete(w),Y.delete(w),J.delete(w),me.delete(w),se.delete(w),j.delete(w)}function At(j){let w=(ce.get(j)||0)-1;w<=0?(ce.delete(j),me.add(j)):ce.set(j,w),vt({fetchers:new Map(O.fetchers)})}function bt(j,w){let z=ue.get(j);z&&(z.abort(w),ue.delete(j))}function wt(j,w){for(let z of j){let X=w.get(z);we(X,`Expected fetcher: ${z}`);let V=La(X.data);w.set(z,V)}}function Cs(j){let w=[],z=!1;for(let X of J){let V=j.get(X);we(V,`Expected fetcher: ${X}`),V.state==="loading"&&(J.delete(X),w.push(X),z=!0)}return wt(w,j),z}function Ms(j,w){let z=[];for(let[X,V]of Y)if(V<j){let le=w.get(X);we(le,`Expected fetcher: ${X}`),le.state==="loading"&&(bt(X),Y.delete(X),z.push(X))}return wt(z,w),z.length>0}function pu(j,w){let z=O.blockers.get(j)||os;return Ce.get(j)!==w&&Ce.set(j,w),z}function Kl(j){O.blockers.delete(j),Ce.delete(j)}function Ga(j,w){let z=O.blockers.get(j)||os;we(z.state==="unblocked"&&w.state==="blocked"||z.state==="blocked"&&w.state==="blocked"||z.state==="blocked"&&w.state==="proceeding"||z.state==="blocked"&&w.state==="unblocked"||z.state==="proceeding"&&w.state==="unblocked",`Invalid blocker state transition: ${z.state} -> ${w.state}`);let X=new Map(O.blockers);X.set(j,w),vt({blockers:X})}function Vl({currentLocation:j,nextLocation:w,historyAction:z}){if(Ce.size===0)return;Ce.size>1&&ot(!1,"A router only supports one blocker at a time");let X=Array.from(Ce.entries()),[V,le]=X[X.length-1],I=O.blockers.get(V);if(!(I&&I.state==="proceeding")&&le({currentLocation:j,nextLocation:w,historyAction:z}))return V}function xa(j){let w=ha(404,{pathname:j}),z=p.activeRoutes,{matches:X,route:V}=kr(z);return{notFoundMatches:X,route:V,error:w}}function jn(j,w,z){if(L=j,H=w,B=z||null,!P&&O.navigation===Oo){P=!0;let X=bi(O.location,O.matches);X!=null&&vt({restoreScrollPosition:X})}return()=>{L=null,H=null,B=null}}function hl(j,w){return B&&B(j,w.map(X=>M0(X,O.loaderData)))||j.key}function vu(j,w){if(L&&H){let z=hl(j,w);L[z]=H()}}function bi(j,w){if(L){let z=hl(j,w),X=L[z];if(typeof X=="number")return X}return null}function ml(j,w,z){if(l.patchRoutesOnNavigation){let X=p.branches;if(j){if(Object.keys(j[0].params).length>0)return{active:!0,matches:wa(w,z,y,!0,X)}}else return{active:!0,matches:wa(w,z,y,!0,X)||[]}}return{active:!1,matches:null}}async function Oa(j,w,z,X){if(!l.patchRoutesOnNavigation)return{type:"success",matches:j};let V=j;for(;;){let le=m;try{await l.patchRoutesOnNavigation({signal:z,path:w,matches:V,fetcherKey:X,patch:(fe,de)=>{z.aborted||zp(fe,de,p,le,d,!1)}})}catch(fe){return{type:"error",error:fe,partialMatches:V}}if(z.aborted)return{type:"aborted"};let I=p.branches,te=wa(p.activeRoutes,w,y,!1,I),ee=null;if(te){if(Object.keys(te[0].params).length===0)return{type:"success",matches:te};if(ee=wa(p.activeRoutes,w,y,!0,I),!(ee&&V.length<ee.length&&Os(V,ee.slice(0,V.length))))return{type:"success",matches:te}}if(ee||(ee=wa(p.activeRoutes,w,y,!0,I)),!ee||Os(V,ee))return{type:"success",matches:null};V=ee}}function Os(j,w){return j.length===w.length&&j.every((z,X)=>z.route.id===w[X].route.id)}function As(j){m={},p.setHmrRoutes(gs(j,d,void 0,m))}function Ds(j,w,z=!1){zp(j,w,p,m,d,z),p.hasHMRRoutes||vt({})}return $={get basename(){return y},get future(){return b},get state(){return O},get routes(){return p.stableRoutes},get branches(){return p.branches},get manifest(){return m},get window(){return i},initialize:Xl,subscribe:mi,enableScrollRestoration:jn,navigate:xn,fetch:fu,revalidate:pi,createHref:j=>l.history.createHref(j),encodeLocation:j=>l.history.encodeLocation(j),getFetcher:hu,resetFetcher:mu,deleteFetcher:At,dispose:bn,getBlocker:pu,deleteBlocker:Kl,patchRoutes:Ds,_internalFetchControllers:ue,_internalSetRoutes:As,_internalSetStateDoNotUseOrYouWillBreakYourApp(j){vt(j)}},l.instrumentations&&($=$0($,l.instrumentations.map(j=>j.router).filter(Boolean))),$}function rx(l){return l!=null&&("formData"in l&&l.formData!=null||"body"in l&&l.body!==void 0)}function ko(l,i,r,c,f,d){let m,p;if(f){m=[];for(let v of i)if(m.push(v),v.route.id===f){p=v;break}}else m=i,p=i[i.length-1];let y=iu(c||".",sf(m),ya(l.pathname,r)||l.pathname,d==="path");if(c==null&&(y.search=l.search,y.hash=l.hash),(c==null||c===""||c===".")&&p){let v=of(y.search);if(p.route.index&&!v)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!p.route.index&&v){let b=new URLSearchParams(y.search),x=b.getAll("index");b.delete("index"),x.filter(M=>M).forEach(M=>b.append("index",M));let E=b.toString();y.search=E?`?${E}`:""}}return r!=="/"&&(y.pathname=Y0({basename:r,pathname:y.pathname})),Ha(y)}function Ap(l,i,r){if(!r||!rx(r))return{path:i};if(r.formMethod&&!wx(r.formMethod))return{path:i,error:ha(405,{method:r.formMethod})};let c=()=>({path:i,error:ha(400,{type:"invalid-body"})}),d=(r.formMethod||"get").toUpperCase(),m=Kv(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Mt(d))return c();let x=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((E,[M,L])=>`${E}${M}=${L}
59
+ `,""):String(r.body);return{path:i,submission:{formMethod:d,formAction:m,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!Mt(d))return c();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:i,submission:{formMethod:d,formAction:m,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return c()}}}we(typeof FormData=="function","FormData is not available in this environment");let p,y;if(r.formData)p=Vo(r.formData),y=r.formData;else if(r.body instanceof FormData)p=Vo(r.body),y=r.body;else if(r.body instanceof URLSearchParams)p=r.body,y=qp(p);else if(r.body==null)p=new URLSearchParams,y=new FormData;else try{p=new URLSearchParams(r.body),y=qp(p)}catch{return c()}let v={formMethod:d,formAction:m,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(Mt(v.formMethod))return{path:i,submission:v};let b=Ma(i);return l&&b.search&&of(b.search)&&p.append("index",""),b.search=`?${p}`,{path:Ha(b),submission:v}}function Dp(l,i,r,c,f,d,m,p,y,v,b,x,E,M,L,B,H,P,F,K,ie,ae){let he=ie?ea(ie[1])?ie[1].error:ie[1].data:void 0,$=f.createURL(d.location),O=f.createURL(y),ge;if(b&&d.errors){let U=Object.keys(d.errors)[0];ge=m.findIndex(Z=>Z.route.id===U)}else if(ie&&ea(ie[1])){let U=ie[0];ge=m.findIndex(Z=>Z.route.id===U)-1}let je=ie?ie[1].statusCode:void 0,qe=je&&je>=400,be={currentUrl:$,currentParams:d.matches[0]?.params||{},nextUrl:O,nextParams:m[0].params,...p,actionResult:he,actionStatus:je},nt=Ss(m),Ue=m.map((U,Z)=>{let{route:se}=U,ue=null;if(ge!=null&&Z>ge)ue=!1;else if(se.lazy)ue=!0;else if(!uf(se))ue=!1;else if(b){let{shouldLoad:J}=qv(se,d.loaderData,d.errors);ue=J}else ux(d.loaderData,d.matches[Z],U)&&(ue=!0);if(ue!==null)return Xo(r,c,l,y,nt,U,v,i,ue);let ye=!1;typeof ae=="boolean"?ye=ae:qe?ye=!1:(x||$.pathname+$.search===O.pathname+O.search||$.search!==O.search||cx(d.matches[Z],U))&&(ye=!0);let R={...be,defaultShouldRevalidate:ye},Y=ps(U,R);return Xo(r,c,l,y,nt,U,v,i,Y,R,ae)}),ke=[];return L.forEach((U,Z)=>{if(b||!m.some(ce=>ce.route.id===U.routeId)||M.has(Z))return;let se=d.fetchers.get(Z),ue=se&&se.state!=="idle"&&se.data===void 0,ye=wa(H,U.path,P??"/",!1,K);if(!ye){if(F&&ue)return;ke.push({key:Z,routeId:U.routeId,path:U.path,matches:null,match:null,request:null,controller:null});return}if(B.has(Z))return;let R=Zr(ye,U.path),Y=new AbortController,J=ui(f,U.path,Y.signal),W=null;if(E.has(Z))E.delete(Z),W=oi(r,c,J,U.path,ye,R,v,i);else if(ue)x&&(W=oi(r,c,J,U.path,ye,R,v,i));else{let ce;typeof ae=="boolean"?ce=ae:qe?ce=!1:ce=x;let me={...be,defaultShouldRevalidate:ce};ps(R,me)&&(W=oi(r,c,J,U.path,ye,R,v,i,me))}W&&ke.push({key:Z,routeId:U.routeId,path:U.path,matches:W,match:R,request:J,controller:Y})}),{dsMatches:Ue,revalidatingFetchers:ke}}function uf(l){return l.loader!=null||l.middleware!=null&&l.middleware.length>0}function qv(l,i,r){if(l.lazy)return{shouldLoad:!0,renderFallback:!0};if(!uf(l))return{shouldLoad:!1,renderFallback:!1};let c=i!=null&&l.id in i,f=r!=null&&r[l.id]!==void 0;if(!c&&f)return{shouldLoad:!1,renderFallback:!1};if(typeof l.loader=="function"&&l.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!c};let d=!c&&!f;return{shouldLoad:d,renderFallback:d}}function ux(l,i,r){let c=!i||r.route.id!==i.route.id,f=!l.hasOwnProperty(r.route.id);return c||f}function cx(l,i){let r=l.route.path;return l.pathname!==i.pathname||r!=null&&r.endsWith("*")&&l.params["*"]!==i.params["*"]}function ps(l,i){if(l.route.shouldRevalidate){let r=l.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function zp(l,i,r,c,f,d){let m;if(l){let v=c[l];we(v,`No route found to patch children into: routeId = ${l}`),v.children||(v.children=[]),m=v.children}else m=r.activeRoutes;let p=[],y=[];if(i.forEach(v=>{let b=m.find(x=>Bv(v,x));b?y.push({existingRoute:b,newRoute:v}):p.push(v)}),p.length>0){let v=gs(p,f,[l||"_","patch",String(m?.length||"0")],c);m.push(...v)}if(d&&y.length>0)for(let v=0;v<y.length;v++){let{existingRoute:b,newRoute:x}=y[v],E=b,[M]=gs([x],f,[],{},!0);Object.assign(E,{element:M.element?M.element:E.element,errorElement:M.errorElement?M.errorElement:E.errorElement,hydrateFallbackElement:M.hydrateFallbackElement?M.hydrateFallbackElement:E.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function Bv(l,i){return"id"in l&&"id"in i&&l.id===i.id?!0:l.index===i.index&&l.path===i.path&&l.caseSensitive===i.caseSensitive?(!l.children||l.children.length===0)&&(!i.children||i.children.length===0)?!0:l.children?.every((r,c)=>i.children?.some(f=>Bv(r,f)))??!1:!1}var _p=new WeakMap,Qv=({key:l,route:i,manifest:r,mapRouteProperties:c})=>{let f=r[i.id];if(we(f,"No route found in manifest"),!f.lazy||typeof f.lazy!="object")return;let d=f.lazy[l];if(!d)return;let m=_p.get(f);m||(m={},_p.set(f,m));let p=m[l];if(p)return p;let y=(async()=>{let v=R0(l),x=f[l]!==void 0&&l!=="hasErrorBoundary";if(v)ot(!v,"Route property "+l+" is not a supported lazy route property. This property will be ignored."),m[l]=Promise.resolve();else if(x)ot(!1,`Route "${f.id}" has a static property "${l}" defined. The lazy property will be ignored.`);else{let E=await d();E!=null&&(Object.assign(f,{[l]:E}),Object.assign(f,c(f)))}typeof f.lazy=="object"&&(f.lazy[l]=void 0,Object.values(f.lazy).every(E=>E===void 0)&&(f.lazy=void 0))})();return m[l]=y,y},Up=new WeakMap;function ox(l,i,r,c,f){let d=r[l.id];if(we(d,"No route found in manifest"),!l.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof l.lazy=="function"){let b=Up.get(d);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let x=(async()=>{we(typeof l.lazy=="function","No lazy route function found");let E=await l.lazy(),M={};for(let L in E){let B=E[L];if(B===void 0)continue;let H=w0(L),F=d[L]!==void 0&&L!=="hasErrorBoundary";H?ot(!H,"Route property "+L+" is not a supported property to be returned from a lazy route function. This property will be ignored."):F?ot(!F,`Route "${d.id}" has a static property "${L}" defined but its lazy function is also returning a value for this property. The lazy route property "${L}" will be ignored.`):M[L]=B}Object.assign(d,M),Object.assign(d,{...c(d),lazy:void 0})})();return Up.set(d,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let m=Object.keys(l.lazy),p=[],y;for(let b of m){if(f&&f.includes(b))continue;let x=Qv({key:b,route:l,manifest:r,mapRouteProperties:c});x&&(p.push(x),b===i&&(y=x))}let v=p.length>0?Promise.all(p).then(()=>{}):void 0;return v?.catch(()=>{}),y?.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:y}}async function Lp(l){let i=l.matches.filter(f=>f.shouldLoad),r={};return(await Promise.all(i.map(f=>f.resolve()))).forEach((f,d)=>{r[i[d].route.id]=f}),r}async function fx(l){return l.matches.some(i=>i.route.middleware)?Yv(l,()=>Lp(l)):Lp(l)}function Yv(l,i){return dx(l,i,c=>{if(Tx(c))throw c;return c},jx,r);function r(c,f,d){if(d)return Promise.resolve(Object.assign(d.value,{[f]:{type:"error",result:c}}));{let{matches:m}=l,p=Math.min(Math.max(m.findIndex(v=>v.route.id===f),0),Math.max(m.findIndex(v=>v.shouldCallHandler()),0)),y=Ql(m,m[p].route.id).route.id;return Promise.resolve({[y]:{type:"error",result:c}})}}}async function dx(l,i,r,c,f){let{matches:d,...m}=l,p=d.flatMap(v=>v.route.middleware?v.route.middleware.map(b=>[v.route.id,b]):[]);return await Gv(m,p,i,r,c,f)}async function Gv(l,i,r,c,f,d,m=0){let{request:p}=l;if(p.signal.aborted)throw p.signal.reason??new Error(`Request aborted: ${p.method} ${p.url}`);let y=i[m];if(!y)return await r();let[v,b]=y,x,E=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await Gv(l,i,r,c,f,d,m+1)},x.value}catch(M){return x={value:await d(M,v,x)},x.value}};try{let M=await b(l,E),L=M!=null?c(M):void 0;return f(L)?L:x?L??x.value:(x={value:await E()},x.value)}catch(M){return await d(M,v,x)}}function kv(l,i,r,c,f){let d=Qv({key:"middleware",route:c.route,manifest:i,mapRouteProperties:l}),m=ox(c.route,Mt(r.method)?"action":"loader",i,l,f);return{middleware:d,route:m.lazyRoutePromise,handler:m.lazyHandlerPromise}}function Xo(l,i,r,c,f,d,m,p,y,v=null,b){let x=!1,E=kv(l,i,r,d,m);return{...d,_lazyPromises:E,shouldLoad:y,shouldRevalidateArgs:v,shouldCallHandler(M){return x=!0,v?typeof b=="boolean"?ps(d,{...v,defaultShouldRevalidate:b}):typeof M=="boolean"?ps(d,{...v,defaultShouldRevalidate:M}):ps(d,v):y},resolve(M){let{lazy:L,loader:B,middleware:H}=d.route,P=x||y||M&&!Mt(r.method)&&(L||B),F=H&&H.length>0&&!B&&!L;return P&&(Mt(r.method)||!F)?mx({request:r,path:c,pattern:f,match:d,lazyHandlerPromise:E?.handler,lazyRoutePromise:E?.route,handlerOverride:M,scopedContext:p}):Promise.resolve({type:"data",result:void 0})}}}function oi(l,i,r,c,f,d,m,p,y=null){return f.map(v=>v.route.id!==d.route.id?{...v,shouldLoad:!1,shouldRevalidateArgs:y,shouldCallHandler:()=>!1,_lazyPromises:kv(l,i,r,v,m),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Xo(l,i,r,c,Ss(f),v,m,p,!0,y))}async function hx(l,i,r,c,f,d,m){c.some(b=>b._lazyPromises?.middleware)&&await Promise.all(c.map(b=>b._lazyPromises?.middleware));let p={request:i,url:Xv(i,r),pattern:Ss(c),params:c[0].params,context:d,matches:c},v=await l({...p,fetcherKey:f,runClientMiddleware:b=>{let x=p;return Yv(x,()=>b({...x,fetcherKey:f,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(c.flatMap(b=>[b._lazyPromises?.handler,b._lazyPromises?.route]))}catch{}return v}async function mx({request:l,path:i,pattern:r,match:c,lazyHandlerPromise:f,lazyRoutePromise:d,handlerOverride:m,scopedContext:p}){let y,v,b=Mt(l.method),x=b?"action":"loader",E=M=>{let L,B=new Promise((F,K)=>L=K);v=()=>L(),l.signal.addEventListener("abort",v);let H=F=>typeof M!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${x}" [routeId: ${c.route.id}]`)):M({request:l,url:Xv(l,i),pattern:r,params:c.params,context:p},...F!==void 0?[F]:[]),P=(async()=>{try{return{type:"data",result:await(m?m(K=>H(K)):H())}}catch(F){return{type:"error",result:F}}})();return Promise.race([P,B])};try{let M=b?c.route.action:c.route.loader;if(f||d)if(M){let L,[B]=await Promise.all([E(M).catch(H=>{L=H}),f,d]);if(L!==void 0)throw L;y=B}else{await f;let L=b?c.route.action:c.route.loader;if(L)[y]=await Promise.all([E(L),d]);else if(x==="action"){let B=new URL(l.url),H=B.pathname+B.search;throw ha(405,{method:l.method,pathname:H,routeId:c.route.id})}else return{type:"data",result:void 0}}else if(M)y=await E(M);else{let L=new URL(l.url),B=L.pathname+L.search;throw ha(404,{pathname:B})}}catch(M){return{type:"error",result:M}}finally{v&&l.signal.removeEventListener("abort",v)}return y}async function px(l){let i=l.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?l.body==null?null:l.json():l.text()}async function vx(l){let{result:i,type:r}=l;if(cf(i)){let c;try{c=await px(i)}catch(f){return{type:"error",error:f}}return r==="error"?{type:"error",error:new xs(i.status,i.statusText,c),statusCode:i.status,headers:i.headers}:{type:"data",data:c,statusCode:i.status,headers:i.headers}}return r==="error"?Gp(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:Sx(i),statusCode:fi(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:fi(i)?i.status:void 0}:Gp(i)?{type:"data",data:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function yx(l,i,r,c,f){let d=l.headers.get("Location");if(we(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!nf(d)){let m=c.slice(0,c.findIndex(p=>p.route.id===r)+1);d=ko(new URL(i.url),m,f,d),l.headers.set("Location",d)}return l}var gx=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ko(l){try{return gx.includes(new URL(l).protocol)}catch{return!1}}function Hp(l,i,r,c){if(nf(l)){let f=l,d=lf.test(f)?new URL(Ev(f,i.protocol)):new URL(f);if(Ko(d.toString()))throw new Error("Invalid redirect location");let m=ya(d.pathname,r)!=null;if(d.origin===i.origin&&m)return rf(d.pathname)+d.search+d.hash}try{let f=c.createURL(l);if(Ko(f.toString()))throw new Error("Invalid redirect location")}catch{}return l}function ui(l,i,r,c){let f=l.createURL(Kv(i)).toString(),d={signal:r};if(c&&Mt(c.formMethod)){let{formMethod:m,formEncType:p}=c;d.method=m.toUpperCase(),p==="application/json"?(d.headers=new Headers({"Content-Type":p}),d.body=JSON.stringify(c.json)):p==="text/plain"?d.body=c.text:p==="application/x-www-form-urlencoded"&&c.formData?d.body=Vo(c.formData):d.body=c.formData}return new Request(f,d)}function Xv(l,i){let r=new URL(l.url),c=typeof i=="string"?Ma(i):i;if(r.pathname=c.pathname||"/",c.search){let f=new URLSearchParams(c.search),d=f.getAll("index");f.delete("index");for(let m of d.filter(Boolean))f.append("index",m);r.search=f.size?`?${f.toString()}`:""}else r.search="";return r.hash=c.hash||"",r}function Vo(l){let i=new URLSearchParams;for(let[r,c]of l.entries())i.append(r,typeof c=="string"?c:c.name);return i}function qp(l){let i=new FormData;for(let[r,c]of l.entries())i.append(r,c);return i}function bx(l,i,r,c=!1,f=!1){let d={},m=null,p,y=!1,v={},b=r&&ea(r[1])?r[1].error:void 0;return l.forEach(x=>{if(!(x.route.id in i))return;let E=x.route.id,M=i[E];if(we(!hn(M),"Cannot handle redirect results in processLoaderData"),ea(M)){let L=M.error;if(b!==void 0&&(L=b,b=void 0),m=m||{},f)m[E]=L;else{let B=Ql(l,E);m[B.route.id]==null&&(m[B.route.id]=L)}c||(d[E]=Hv),y||(y=!0,p=fi(M.error)?M.error.status:500),M.headers&&(v[E]=M.headers)}else d[E]=M.data,M.statusCode&&M.statusCode!==200&&!y&&(p=M.statusCode),M.headers&&(v[E]=M.headers)}),b!==void 0&&r&&(m={[r[0]]:b},r[2]&&(d[r[2]]=void 0)),{loaderData:d,errors:m,statusCode:p||200,loaderHeaders:v}}function Bp(l,i,r,c,f,d,m){let{loaderData:p,errors:y}=bx(i,r,c);return f.filter(v=>!v.matches||v.matches.some(b=>b.shouldLoad)).forEach(v=>{let{key:b,match:x,controller:E}=v;if(E&&E.signal.aborted)return;let M=d[b];if(we(M,"Did not find corresponding fetcher result"),ea(M)){let L=Ql(l.matches,x?.route.id);y&&y[L.route.id]||(y={...y,[L.route.id]:M.error}),m.delete(b)}else if(hn(M))we(!1,"Unhandled fetcher revalidation redirect");else{let L=La(M.data);m.set(b,L)}}),{loaderData:p,errors:y}}function Qp(l,i,r,c){let f=Object.entries(i).filter(([,d])=>d!==Hv).reduce((d,[m,p])=>(d[m]=p,d),{});for(let d of r){let m=d.route.id;if(!i.hasOwnProperty(m)&&l.hasOwnProperty(m)&&d.route.loader&&(f[m]=l[m]),c&&c.hasOwnProperty(m))break}return f}function Yp(l){return l?ea(l[1])?{actionData:{}}:{actionData:{[l[0]]:l[1].data}}:{}}function Ql(l,i){return(i?l.slice(0,l.findIndex(c=>c.route.id===i)+1):[...l]).reverse().find(c=>c.route.hasErrorBoundary===!0)||l[0]}function kr(l){let i=l.length===1?l[0]:l.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function ha(l,{pathname:i,routeId:r,method:c,type:f,message:d}={}){let m="Unknown Server Error",p="Unknown @remix-run/router error";return l===400?(m="Bad Request",c&&i&&r?p=`You made a ${c} request to "${i}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:f==="invalid-body"&&(p="Unable to encode submission body")):l===403?(m="Forbidden",p=`Route "${r}" does not match URL "${i}"`):l===404?(m="Not Found",p=`No route matches URL "${i}"`):l===405&&(m="Method Not Allowed",c&&i&&r?p=`You made a ${c.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:c&&(p=`Invalid request method "${c.toUpperCase()}"`)),new xs(l||500,m,new Error(p),!0)}function Xr(l){let i=Object.entries(l);for(let r=i.length-1;r>=0;r--){let[c,f]=i[r];if(hn(f))return{key:c,result:f}}}function Kv(l){let i=typeof l=="string"?Ma(l):l;return Ha({...i,hash:""})}function xx(l,i){return l.pathname!==i.pathname||l.search!==i.search?!1:l.hash===""?i.hash!=="":l.hash===i.hash?!0:i.hash!==""}function Sx(l){return new xs(l.init?.status??500,l.init?.statusText??"Internal Server Error",l.data)}function jx(l){return l!=null&&typeof l=="object"&&Object.entries(l).every(([i,r])=>typeof i=="string"&&Ex(r))}function Ex(l){return l!=null&&typeof l=="object"&&"type"in l&&"result"in l&&(l.type==="data"||l.type==="error")}function Nx(l){return cf(l.result)&&Uv.has(l.result.status)}function ea(l){return l.type==="error"}function hn(l){return(l&&l.type)==="redirect"}function Gp(l){return typeof l=="object"&&l!=null&&"type"in l&&"data"in l&&"init"in l&&l.type==="DataWithResponseInit"}function cf(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.headers=="object"&&typeof l.body<"u"}function Rx(l){return Uv.has(l)}function Tx(l){return cf(l)&&Rx(l.status)&&l.headers.has("Location")}function wx(l){return tx.has(l.toUpperCase())}function Mt(l){return I0.has(l.toUpperCase())}function of(l){return new URLSearchParams(l).getAll("index").some(i=>i==="")}function Zr(l,i){let r=typeof i=="string"?Ma(i).search:i.search;if(l[l.length-1].route.index&&of(r||""))return l[l.length-1];let c=Ov(l);return c[c.length-1]}function kp(l){let{formMethod:i,formAction:r,formEncType:c,text:f,formData:d,json:m}=l;if(!(!i||!r||!c)){if(f!=null)return{formMethod:i,formAction:r,formEncType:c,formData:void 0,json:void 0,text:f};if(d!=null)return{formMethod:i,formAction:r,formEncType:c,formData:d,json:void 0,text:void 0};if(m!==void 0)return{formMethod:i,formAction:r,formEncType:c,formData:void 0,json:m,text:void 0}}}function Ao(l,i,r,c){return c?{state:"loading",location:l,matches:i,historyAction:r,formMethod:c.formMethod,formAction:c.formAction,formEncType:c.formEncType,formData:c.formData,json:c.json,text:c.text}:{state:"loading",location:l,matches:i,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Cx(l,i,r,c){return{state:"submitting",location:l,matches:i,historyAction:r,formMethod:c.formMethod,formAction:c.formAction,formEncType:c.formEncType,formData:c.formData,json:c.json,text:c.text}}function fs(l,i){return l?{state:"loading",formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function Mx(l,i){return{state:"submitting",formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text,data:i?i.data:void 0}}function La(l){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:l}}function Ox(l,i){try{let r=l.sessionStorage.getItem(Lv);if(r){let c=JSON.parse(r);for(let[f,d]of Object.entries(c||{}))d&&Array.isArray(d)&&i.set(f,new Set(d||[]))}}catch{}}function Ax(l,i){if(i.size>0){let r={};for(let[c,f]of i)r[c]=[...f];try{l.sessionStorage.setItem(Lv,JSON.stringify(r))}catch(c){ot(!1,`Failed to save applied view transitions in sessionStorage (${c}).`)}}}function Xp(){let l,i,r=new Promise((c,f)=>{l=async d=>{c(d);try{await r}catch{}},i=async d=>{f(d);try{await r}catch{}}});return{promise:r,resolve:l,reject:i}}var yn=N.createContext(null);yn.displayName="DataRouter";var js=N.createContext(null);js.displayName="DataRouterState";var Vv=N.createContext(!1);function Zv(){return N.useContext(Vv)}var ff=N.createContext({isTransitioning:!1});ff.displayName="ViewTransition";var $v=N.createContext(new Map);$v.displayName="Fetchers";var Dx=N.createContext(null);Dx.displayName="Await";var ga=N.createContext(null);ga.displayName="Navigation";var su=N.createContext(null);su.displayName="Location";var qa=N.createContext({outlet:null,matches:[],isDataRoute:!1});qa.displayName="Route";var df=N.createContext(null);df.displayName="RouteError";var Fv="REACT_ROUTER_ERROR",zx="REDIRECT",_x="ROUTE_ERROR_RESPONSE";function Ux(l){if(l.startsWith(`${Fv}:${zx}:{`))try{let i=JSON.parse(l.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function Lx(l){if(l.startsWith(`${Fv}:${_x}:{`))try{let i=JSON.parse(l.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new xs(i.status,i.statusText,i.data)}catch{}}function Hx(l,{relative:i}={}){we(Es(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:c}=N.useContext(ga),{hash:f,pathname:d,search:m}=Ns(l,{relative:i}),p=d;return r!=="/"&&(p=d==="/"?r:pa([r,d])),c.createHref({pathname:p,search:m,hash:f})}function Es(){return N.useContext(su)!=null}function cl(){return we(Es(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(su).location}var Jv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pv(l){N.useContext(ga).static||N.useLayoutEffect(l)}function Wv(){let{isDataRoute:l}=N.useContext(qa);return l?Px():qx()}function qx(){we(Es(),"useNavigate() may be used only in the context of a <Router> component.");let l=N.useContext(yn),{basename:i,navigator:r}=N.useContext(ga),{matches:c}=N.useContext(qa),{pathname:f}=cl(),d=JSON.stringify(sf(c)),m=N.useRef(!1);return Pv(()=>{m.current=!0}),N.useCallback((y,v={})=>{if(ot(m.current,Jv),!m.current)return;if(typeof y=="number"){r.go(y);return}let b=iu(y,JSON.parse(d),f,v.relative==="path");l==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:pa([i,b.pathname])),(v.replace?r.replace:r.push)(b,v.state,v)},[i,r,d,f,l])}var Bx=N.createContext(null);function Qx(l){let i=N.useContext(qa).outlet;return N.useMemo(()=>i&&N.createElement(Bx.Provider,{value:l},i),[i,l])}function Ns(l,{relative:i}={}){let{matches:r}=N.useContext(qa),{pathname:c}=cl(),f=JSON.stringify(sf(r));return N.useMemo(()=>iu(l,JSON.parse(f),c,i==="path"),[l,f,c,i])}function Yx(l,i,r){we(Es(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=N.useContext(ga),{matches:f}=N.useContext(qa),d=f[f.length-1],m=d?d.params:{},p=d?d.pathname:"/",y=d?d.pathnameBase:"/",v=d&&d.route;{let H=v&&v.path||"";ty(p,!v||H.endsWith("*")||H.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${H}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
+
61
+ Please change the parent <Route path="${H}"> to <Route path="${H==="/"?"*":`${H}/*`}">.`)}let b=cl(),x;x=b;let E=x.pathname||"/",M=E;if(y!=="/"){let H=y.replace(/^\//,"").split("/");M="/"+E.replace(/^\//,"").split("/").slice(H.length).join("/")}let L=r&&r.state.matches.length?r.state.matches.map(H=>Object.assign(H,{route:r.manifest[H.route.id]||H.route})):Rv(l,{pathname:M});return ot(v||L!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),ot(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Vx(L&&L.map(H=>Object.assign({},H,{params:Object.assign({},m,H.params),pathname:pa([y,c.encodeLocation?c.encodeLocation(H.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathname]),pathnameBase:H.pathnameBase==="/"?y:pa([y,c.encodeLocation?c.encodeLocation(H.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathnameBase])})),f,r)}function Gx(){let l=ey(),i=fi(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),r=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},d={padding:"2px 4px",backgroundColor:c},m=null;return console.error("Error handled by React Router default ErrorBoundary:",l),m=N.createElement(N.Fragment,null,N.createElement("p",null,"💿 Hey developer 👋"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:d},"ErrorBoundary")," or"," ",N.createElement("code",{style:d},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},i),r?N.createElement("pre",{style:f},r):null,m)}var kx=N.createElement(Gx,null),Iv=class extends N.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,i){return i.location!==l.location||i.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:i.error,location:i.location,revalidation:l.revalidation||i.revalidation}}componentDidCatch(l,i){this.props.onError?this.props.onError(l,i):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const r=Lx(l.digest);r&&(l=r)}let i=l!==void 0?N.createElement(qa.Provider,{value:this.props.routeContext},N.createElement(df.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?N.createElement(Xx,{error:l},i):i}};Iv.contextType=Vv;var Do=new WeakMap;function Xx({children:l,error:i}){let{basename:r}=N.useContext(ga);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let c=Ux(i.digest);if(c){let f=Do.get(i);if(f)throw f;let d=Dv(c.location,r),m=d.absoluteURL||d.to;if(Ko(m))throw new Error("Invalid redirect location");if(Av&&!Do.get(i))if(d.isExternal||c.reloadDocument)window.location.href=m;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:c.replace}));throw Do.set(i,p),p}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m}`})}}return l}function Kx({routeContext:l,match:i,children:r}){let c=N.useContext(yn);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),N.createElement(qa.Provider,{value:l},r)}function Vx(l,i=[],r){let c=r?.state;if(l==null){if(!c)return null;if(c.errors)l=c.matches;else if(i.length===0&&!c.initialized&&c.matches.length>0)l=c.matches;else return null}let f=l,d=c?.errors;if(d!=null){let b=f.findIndex(x=>x.route.id&&d?.[x.route.id]!==void 0);we(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,b+1))}let m=!1,p=-1;if(r&&c){m=c.renderFallback;for(let b=0;b<f.length;b++){let x=f[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(p=b),x.route.id){let{loaderData:E,errors:M}=c,L=x.route.loader&&!E.hasOwnProperty(x.route.id)&&(!M||M[x.route.id]===void 0);if(x.route.lazy||L){r.isStatic&&(m=!0),p>=0?f=f.slice(0,p+1):f=[f[0]];break}}}}let y=r?.onError,v=c&&y?(b,x)=>{y(b,{location:c.location,params:c.matches?.[0]?.params??{},pattern:Ss(c.matches),errorInfo:x})}:void 0;return f.reduceRight((b,x,E)=>{let M,L=!1,B=null,H=null;c&&(M=d&&x.route.id?d[x.route.id]:void 0,B=x.route.errorElement||kx,m&&(p<0&&E===0?(ty("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,H=null):p===E&&(L=!0,H=x.route.hydrateFallbackElement||null)));let P=i.concat(f.slice(0,E+1)),F=()=>{let K;return M?K=B:L?K=H:x.route.Component?K=N.createElement(x.route.Component,null):x.route.element?K=x.route.element:K=b,N.createElement(Kx,{match:x,routeContext:{outlet:b,matches:P,isDataRoute:c!=null},children:K})};return c&&(x.route.ErrorBoundary||x.route.errorElement||E===0)?N.createElement(Iv,{location:c.location,revalidation:c.revalidation,component:B,error:M,children:F(),routeContext:{outlet:null,matches:P,isDataRoute:!0},onError:v}):F()},null)}function hf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zx(l){let i=N.useContext(yn);return we(i,hf(l)),i}function $x(l){let i=N.useContext(js);return we(i,hf(l)),i}function Fx(l){let i=N.useContext(qa);return we(i,hf(l)),i}function mf(l){let i=Fx(l),r=i.matches[i.matches.length-1];return we(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function Jx(){return mf("useRouteId")}function ey(){let l=N.useContext(df),i=$x("useRouteError"),r=mf("useRouteError");return l!==void 0?l:i.errors?.[r]}function Px(){let{router:l}=Zx("useNavigate"),i=mf("useNavigate"),r=N.useRef(!1);return Pv(()=>{r.current=!0}),N.useCallback(async(f,d={})=>{ot(r.current,Jv),r.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:i,...d}))},[l,i])}var Kp={};function ty(l,i,r){!i&&!Kp[l]&&(Kp[l]=!0,ot(!1,r))}var Vp={};function Zp(l,i){!l&&!Vp[i]&&(Vp[i]=!0,console.warn(i))}var Wx="useOptimistic",$p=t0[Wx],Ix=()=>{};function eS(l){return $p?$p(l):[l,Ix]}function tS(l){let i={hasErrorBoundary:l.hasErrorBoundary||l.ErrorBoundary!=null||l.errorElement!=null};return l.Component&&(l.element&&ot(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:N.createElement(l.Component),Component:void 0})),l.HydrateFallback&&(l.hydrateFallbackElement&&ot(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:N.createElement(l.HydrateFallback),HydrateFallback:void 0})),l.ErrorBoundary&&(l.errorElement&&ot(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:N.createElement(l.ErrorBoundary),ErrorBoundary:void 0})),i}var aS=["HydrateFallback","hydrateFallbackElement"],lS=class{constructor(){this.status="pending",this.promise=new Promise((l,i)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",l(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",i(r))}})}};function nS({router:l,flushSync:i,onError:r,useTransitions:c}){c=Zv()||c;let[d,m]=N.useState(l.state),[p,y]=eS(d),[v,b]=N.useState(),[x,E]=N.useState({isTransitioning:!1}),[M,L]=N.useState(),[B,H]=N.useState(),[P,F]=N.useState(),K=N.useRef(new Map),ie=N.useCallback((O,{deletedFetchers:ge,newErrors:je,flushSync:qe,viewTransitionOpts:be})=>{je&&r&&Object.values(je).forEach(Ue=>r(Ue,{location:O.location,params:O.matches[0]?.params??{},pattern:Ss(O.matches)})),O.fetchers.forEach((Ue,ke)=>{Ue.data!==void 0&&K.current.set(ke,Ue.data)}),ge.forEach(Ue=>K.current.delete(Ue)),Zp(qe===!1||i!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let nt=l.window!=null&&l.window.document!=null&&typeof l.window.document.startViewTransition=="function";if(Zp(be==null||nt,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!be||!nt){i&&qe?i(()=>m(O)):c===!1?m(O):N.startTransition(()=>{c===!0&&y(Ue=>Fp(Ue,O)),m(O)});return}if(i&&qe){i(()=>{B&&(M?.resolve(),B.skipTransition()),E({isTransitioning:!0,flushSync:!0,currentLocation:be.currentLocation,nextLocation:be.nextLocation})});let Ue=l.window.document.startViewTransition(()=>{i(()=>m(O))});Ue.finished.finally(()=>{i(()=>{L(void 0),H(void 0),b(void 0),E({isTransitioning:!1})})}),i(()=>H(Ue));return}B?(M?.resolve(),B.skipTransition(),F({state:O,currentLocation:be.currentLocation,nextLocation:be.nextLocation})):(b(O),E({isTransitioning:!0,flushSync:!1,currentLocation:be.currentLocation,nextLocation:be.nextLocation}))},[l.window,i,B,M,c,y,r]);N.useLayoutEffect(()=>l.subscribe(ie),[l,ie]),N.useEffect(()=>{x.isTransitioning&&!x.flushSync&&L(new lS)},[x]),N.useEffect(()=>{if(M&&v&&l.window){let O=v,ge=M.promise,je=l.window.document.startViewTransition(async()=>{c===!1?m(O):N.startTransition(()=>{c===!0&&y(qe=>Fp(qe,O)),m(O)}),await ge});je.finished.finally(()=>{L(void 0),H(void 0),b(void 0),E({isTransitioning:!1})}),H(je)}},[v,M,l.window,c,y]),N.useEffect(()=>{M&&v&&p.location.key===v.location.key&&M.resolve()},[M,B,p.location,v]),N.useEffect(()=>{!x.isTransitioning&&P&&(b(P.state),E({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}),F(void 0))},[x.isTransitioning,P]);let ae=N.useMemo(()=>({createHref:l.createHref,encodeLocation:l.encodeLocation,go:O=>l.navigate(O),push:(O,ge,je)=>l.navigate(O,{state:ge,preventScrollReset:je?.preventScrollReset}),replace:(O,ge,je)=>l.navigate(O,{replace:!0,state:ge,preventScrollReset:je?.preventScrollReset})}),[l]),he=l.basename||"/",$=N.useMemo(()=>({router:l,navigator:ae,static:!1,basename:he,onError:r}),[l,ae,he,r]);return N.createElement(N.Fragment,null,N.createElement(yn.Provider,{value:$},N.createElement(js.Provider,{value:p},N.createElement($v.Provider,{value:K.current},N.createElement(ff.Provider,{value:x},N.createElement(uS,{basename:he,location:p.location,navigationType:p.historyAction,navigator:ae,useTransitions:c},N.createElement(iS,{routes:l.routes,manifest:l.manifest,future:l.future,state:p,isStatic:!1,onError:r})))))),null)}function Fp(l,i){return{...l,navigation:i.navigation.state!=="idle"?i.navigation:l.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:l.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:l.actionData,fetchers:i.fetchers}}var iS=N.memo(sS);function sS({routes:l,manifest:i,future:r,state:c,isStatic:f,onError:d}){return Yx(l,void 0,{manifest:i,state:c,isStatic:f,onError:d})}function rS(l){return Qx(l.context)}function uS({basename:l="/",children:i=null,location:r,navigationType:c="POP",navigator:f,static:d=!1,useTransitions:m}){we(!Es(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=l.replace(/^\/*/,"/"),y=N.useMemo(()=>({basename:p,navigator:f,static:d,useTransitions:m,future:{}}),[p,f,d,m]);typeof r=="string"&&(r=Ma(r));let{pathname:v="/",search:b="",hash:x="",state:E=null,key:M="default",mask:L}=r,B=N.useMemo(()=>{let H=ya(v,p);return H==null?null:{location:{pathname:H,search:b,hash:x,state:E,key:M,mask:L},navigationType:c}},[p,v,b,x,E,M,c,L]);return ot(B!=null,`<Router basename="${p}"> is not able to match the URL "${v}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),B==null?null:N.createElement(ga.Provider,{value:y},N.createElement(su.Provider,{children:i,value:B}))}var $r="get",Fr="application/x-www-form-urlencoded";function ru(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function cS(l){return ru(l)&&l.tagName.toLowerCase()==="button"}function oS(l){return ru(l)&&l.tagName.toLowerCase()==="form"}function fS(l){return ru(l)&&l.tagName.toLowerCase()==="input"}function dS(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function hS(l,i){return l.button===0&&(!i||i==="_self")&&!dS(l)}var Kr=null;function mS(){if(Kr===null)try{new FormData(document.createElement("form"),0),Kr=!1}catch{Kr=!0}return Kr}var pS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zo(l){return l!=null&&!pS.has(l)?(ot(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fr}"`),null):l}function vS(l,i){let r,c,f,d,m;if(oS(l)){let p=l.getAttribute("action");c=p?ya(p,i):null,r=l.getAttribute("method")||$r,f=zo(l.getAttribute("enctype"))||Fr,d=new FormData(l)}else if(cS(l)||fS(l)&&(l.type==="submit"||l.type==="image")){let p=l.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=l.getAttribute("formaction")||p.getAttribute("action");if(c=y?ya(y,i):null,r=l.getAttribute("formmethod")||p.getAttribute("method")||$r,f=zo(l.getAttribute("formenctype"))||zo(p.getAttribute("enctype"))||Fr,d=new FormData(p,l),!mS()){let{name:v,type:b,value:x}=l;if(b==="image"){let E=v?`${v}.`:"";d.append(`${E}x`,"0"),d.append(`${E}y`,"0")}else v&&d.append(v,x)}}else{if(ru(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=$r,c=null,f=Fr,m=l}return d&&f==="text/plain"&&(m=d,d=void 0),{action:c,method:r.toLowerCase(),encType:f,formData:d,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pf(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function ay(l,i,r,c){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return r?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${c}`:f.pathname=`${f.pathname}.${c}`:f.pathname==="/"?f.pathname=`_root.${c}`:i&&ya(f.pathname,i)==="/"?f.pathname=`${au(i)}/_root.${c}`:f.pathname=`${au(f.pathname)}.${c}`,f}async function yS(l,i){if(l.id in i)return i[l.id];try{let r=await import(l.module);return i[l.id]=r,r}catch(r){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function gS(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function bS(l,i,r){let c=await Promise.all(l.map(async f=>{let d=i.routes[f.route.id];if(d){let m=await yS(d,r);return m.links?m.links():[]}return[]}));return ES(c.flat(1).filter(gS).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Jp(l,i,r,c,f,d){let m=(y,v)=>r[v]?y.route.id!==r[v].route.id:!0,p=(y,v)=>r[v].pathname!==y.pathname||r[v].route.path?.endsWith("*")&&r[v].params["*"]!==y.params["*"];return d==="assets"?i.filter((y,v)=>m(y,v)||p(y,v)):d==="data"?i.filter((y,v)=>{let b=c.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(m(y,v)||p(y,v))return!0;if(y.route.shouldRevalidate){let x=y.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(l,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function xS(l,i,{includeHydrateFallback:r}={}){return SS(l.map(c=>{let f=i.routes[c.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),r&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function SS(l){return[...new Set(l)]}function jS(l){let i={},r=Object.keys(l).sort();for(let c of r)i[c]=l[c];return i}function ES(l,i){let r=new Set;return new Set(i),l.reduce((c,f)=>{let d=JSON.stringify(jS(f));return r.has(d)||(r.add(d),c.push({key:d,link:f})),c},[])}function vf(){let l=N.useContext(yn);return pf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function NS(){let l=N.useContext(js);return pf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var yf=N.createContext(void 0);yf.displayName="FrameworkContext";function uu(){let l=N.useContext(yf);return pf(l,"You must render this element inside a <HydratedRouter> element"),l}function RS(l,i){let r=N.useContext(yf),[c,f]=N.useState(!1),[d,m]=N.useState(!1),{onFocus:p,onBlur:y,onMouseEnter:v,onMouseLeave:b,onTouchStart:x}=i,E=N.useRef(null);N.useEffect(()=>{if(l==="render"&&m(!0),l==="viewport"){let B=P=>{P.forEach(F=>{m(F.isIntersecting)})},H=new IntersectionObserver(B,{threshold:.5});return E.current&&H.observe(E.current),()=>{H.disconnect()}}},[l]),N.useEffect(()=>{if(c){let B=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(B)}}},[c]);let M=()=>{f(!0)},L=()=>{f(!1),m(!1)};return r?l!=="intent"?[d,E,{}]:[d,E,{onFocus:ds(p,M),onBlur:ds(y,L),onMouseEnter:ds(v,M),onMouseLeave:ds(b,L),onTouchStart:ds(x,M)}]:[!1,E,{}]}function ds(l,i){return r=>{l&&l(r),r.defaultPrevented||i(r)}}function TS({page:l,...i}){let r=Zv(),{nonce:c}=uu(),{router:f}=vf(),d=N.useMemo(()=>Rv(f.routes,l,f.basename),[f.routes,l,f.basename]);return d?(i.nonce==null&&c&&(i={...i,nonce:c}),r?N.createElement(CS,{page:l,matches:d,...i}):N.createElement(MS,{page:l,matches:d,...i})):null}function wS(l){let{manifest:i,routeModules:r}=uu(),[c,f]=N.useState([]);return N.useEffect(()=>{let d=!1;return bS(l,i,r).then(m=>{d||f(m)}),()=>{d=!0}},[l,i,r]),c}function CS({page:l,matches:i,...r}){let c=cl(),{future:f}=uu(),{basename:d}=vf(),m=N.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let p=ay(l,d,f.v8_trailingSlashAwareDataRequests,"rsc"),y=!1,v=[];for(let b of i)typeof b.route.shouldRevalidate=="function"?y=!0:v.push(b.route.id);return y&&v.length>0&&p.searchParams.set("_routes",v.join(",")),[p.pathname+p.search]},[d,f.v8_trailingSlashAwareDataRequests,l,c,i]);return N.createElement(N.Fragment,null,m.map(p=>N.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})))}function MS({page:l,matches:i,...r}){let c=cl(),{future:f,manifest:d,routeModules:m}=uu(),{basename:p}=vf(),{loaderData:y,matches:v}=NS(),b=N.useMemo(()=>Jp(l,i,v,d,c,"data"),[l,i,v,d,c]),x=N.useMemo(()=>Jp(l,i,v,d,c,"assets"),[l,i,v,d,c]),E=N.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let B=new Set,H=!1;if(i.forEach(F=>{let K=d.routes[F.route.id];!K||!K.hasLoader||(!b.some(ie=>ie.route.id===F.route.id)&&F.route.id in y&&m[F.route.id]?.shouldRevalidate||K.hasClientLoader?H=!0:B.add(F.route.id))}),B.size===0)return[];let P=ay(l,p,f.v8_trailingSlashAwareDataRequests,"data");return H&&B.size>0&&P.searchParams.set("_routes",i.filter(F=>B.has(F.route.id)).map(F=>F.route.id).join(",")),[P.pathname+P.search]},[p,f.v8_trailingSlashAwareDataRequests,y,c,d,b,i,l,m]),M=N.useMemo(()=>xS(x,d),[x,d]),L=wS(x);return N.createElement(N.Fragment,null,E.map(B=>N.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...r})),M.map(B=>N.createElement("link",{key:B,rel:"modulepreload",href:B,...r})),L.map(({key:B,link:H})=>N.createElement("link",{key:B,nonce:r.nonce,...H,crossOrigin:H.crossOrigin??r.crossOrigin})))}function OS(...l){return i=>{l.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var AS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{AS&&(window.__reactRouterVersion="7.18.2")}catch{}function DS(l,i){return sx({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:S0({window:i?.window}),hydrationData:zS(),routes:l,mapRouteProperties:tS,hydrationRouteProperties:aS,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,instrumentations:i?.instrumentations}).initialize()}function zS(){let l=window?.__staticRouterHydrationData;return l&&l.errors&&(l={...l,errors:_S(l.errors)}),l}function _S(l){if(!l)return null;let i=Object.entries(l),r={};for(let[c,f]of i)if(f&&f.__type==="RouteErrorResponse")r[c]=new xs(f.status,f.statusText,f.data,f.internal===!0);else if(f&&f.__type==="Error"){if(typeof f.__subType=="string"&&V0.includes(f.__subType)){let d=window[f.__subType];if(typeof d=="function")try{let m=new d(f.message);m.stack="",r[c]=m}catch{}}if(r[c]==null){let d=new Error(f.message);d.stack="",r[c]=d}}else r[c]=f;return r}var ly=N.forwardRef(function({onClick:i,discover:r="render",prefetch:c="none",relative:f,reloadDocument:d,replace:m,mask:p,state:y,target:v,to:b,preventScrollReset:x,viewTransition:E,defaultShouldRevalidate:M,...L},B){let{basename:H,navigator:P,useTransitions:F}=N.useContext(ga),K=typeof b=="string"&&nu.test(b),ie=Dv(b,H);b=ie.to;let ae=Hx(b,{relative:f}),he=cl(),$=null;if(p){let ke=iu(p,[],he.mask?he.mask.pathname:"/",!0);H!=="/"&&(ke.pathname=ke.pathname==="/"?H:pa([H,ke.pathname])),$=P.createHref(ke)}let[O,ge,je]=RS(c,L),qe=HS(b,{replace:m,mask:p,state:y,target:v,preventScrollReset:x,relative:f,viewTransition:E,defaultShouldRevalidate:M,useTransitions:F});function be(ke){i&&i(ke),ke.defaultPrevented||qe(ke)}let nt=!(ie.isExternal||d),Ue=N.createElement("a",{...L,...je,href:(nt?$:void 0)||ie.absoluteURL||ae,onClick:nt?be:i,ref:OS(B,ge),target:v,"data-discover":!K&&r==="render"?"true":void 0});return O&&!K?N.createElement(N.Fragment,null,Ue,N.createElement(TS,{page:ae})):Ue});ly.displayName="Link";var ny=N.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:c="",end:f=!1,style:d,to:m,viewTransition:p,children:y,...v},b){let x=Ns(m,{relative:v.relative}),E=cl(),M=N.useContext(js),{navigator:L,basename:B}=N.useContext(ga),H=M!=null&&GS(x)&&p===!0,P=L.encodeLocation?L.encodeLocation(x).pathname:x.pathname,F=E.pathname,K=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;r||(F=F.toLowerCase(),K=K?K.toLowerCase():null,P=P.toLowerCase()),K&&B&&(K=ya(K,B)||K);const ie=P!=="/"&&P.endsWith("/")?P.length-1:P.length;let ae=F===P||!f&&F.startsWith(P)&&F.charAt(ie)==="/",he=K!=null&&(K===P||!f&&K.startsWith(P)&&K.charAt(P.length)==="/"),$={isActive:ae,isPending:he,isTransitioning:H},O=ae?i:void 0,ge;typeof c=="function"?ge=c($):ge=[c,ae?"active":null,he?"pending":null,H?"transitioning":null].filter(Boolean).join(" ");let je=typeof d=="function"?d($):d;return N.createElement(ly,{...v,"aria-current":O,className:ge,ref:b,style:je,to:m,viewTransition:p},typeof y=="function"?y($):y)});ny.displayName="NavLink";var US=N.forwardRef(({discover:l="render",fetcherKey:i,navigate:r,reloadDocument:c,replace:f,state:d,method:m=$r,action:p,onSubmit:y,relative:v,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:E,...M},L)=>{let{useTransitions:B}=N.useContext(ga),H=QS(),P=YS(p,{relative:v}),F=m.toLowerCase()==="get"?"get":"post",K=typeof p=="string"&&nu.test(p),ie=ae=>{if(y&&y(ae),ae.defaultPrevented)return;ae.preventDefault();let he=ae.nativeEvent.submitter,$=he?.getAttribute("formmethod")||m,O=()=>H(he||ae.currentTarget,{fetcherKey:i,method:$,navigate:r,replace:f,state:d,relative:v,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:E});B&&r!==!1?N.startTransition(()=>O()):O()};return N.createElement("form",{ref:L,method:F,action:P,onSubmit:c?y:ie,...M,"data-discover":!K&&l==="render"?"true":void 0})});US.displayName="Form";function LS(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iy(l){let i=N.useContext(yn);return we(i,LS(l)),i}function HS(l,{target:i,replace:r,mask:c,state:f,preventScrollReset:d,relative:m,viewTransition:p,defaultShouldRevalidate:y,useTransitions:v}={}){let b=Wv(),x=cl(),E=Ns(l,{relative:m});return N.useCallback(M=>{if(hS(M,i)){M.preventDefault();let L=r!==void 0?r:Ha(x)===Ha(E),B=()=>b(l,{replace:L,mask:c,state:f,preventScrollReset:d,relative:m,viewTransition:p,defaultShouldRevalidate:y});v?N.startTransition(()=>B()):B()}},[x,b,E,r,c,f,i,l,d,m,p,y,v])}var qS=0,BS=()=>`__${String(++qS)}__`;function QS(){let{router:l}=iy("useSubmit"),{basename:i}=N.useContext(ga),r=Jx(),c=l.fetch,f=l.navigate;return N.useCallback(async(d,m={})=>{let{action:p,method:y,encType:v,formData:b,body:x}=vS(d,i);if(m.navigate===!1){let E=m.fetcherKey||BS();await c(E,r,m.action||p,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:x,formMethod:m.method||y,formEncType:m.encType||v,flushSync:m.flushSync})}else await f(m.action||p,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:x,formMethod:m.method||y,formEncType:m.encType||v,replace:m.replace,state:m.state,fromRouteId:r,flushSync:m.flushSync,viewTransition:m.viewTransition})},[c,f,i,r])}function YS(l,{relative:i}={}){let{basename:r}=N.useContext(ga),c=N.useContext(qa);we(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),d={...Ns(l||".",{relative:i})},m=cl();if(l==null){d.search=m.search;let p=new URLSearchParams(d.search),y=p.getAll("index");if(y.some(b=>b==="")){p.delete("index"),y.filter(x=>x).forEach(x=>p.append("index",x));let b=p.toString();d.search=b?`?${b}`:""}}return(!l||l===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(d.pathname=d.pathname==="/"?r:pa([r,d.pathname])),Ha(d)}function GS(l,{relative:i}={}){let r=N.useContext(ff);we(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=iy("useViewTransitionState"),f=Ns(l,{relative:i});if(!r.isTransitioning)return!1;let d=ya(r.currentLocation.pathname,c)||r.currentLocation.pathname,m=ya(r.nextLocation.pathname,c)||r.nextLocation.pathname;return tu(f.pathname,m)!=null||tu(f.pathname,d)!=null}class Jr extends Error{code;status;remediation;subject;constructor(i){super(i.message),this.name="LoreClientError",this.code=i.code,this.status=i.status,this.remediation=i.remediation,this.subject=i.subject}}const kS=3e4,XS=3;class KS{#e;#t;#a;#n;#l;constructor(i){this.#e=i.baseUrl.replace(/\/+$/,""),this.#t=i.token,this.#a=i.timeoutMs??kS;const r=i.fetch??globalThis.fetch;this.#n=r.bind(globalThis),this.#l=Math.max(1,i.retries??XS)}health(i){return this.#i("/health",i)}describeBuild(i){return this.#i("/v1/build",i)}search(i,r){return this.#r("/v1/search",i,r)}contextForTask(i,r){return this.#r("/v1/context",i,r)}readSource(i,r={},c){const f=new URLSearchParams;r.page!==void 0&&f.set("page",String(r.page)),r.lineStart!==void 0&&f.set("lineStart",String(r.lineStart)),r.lineEnd!==void 0&&f.set("lineEnd",String(r.lineEnd)),r.headingPath!==void 0&&f.set("headingPath",r.headingPath.join(" > "));const d=f.size===0?"":`?${f.toString()}`;return this.#i(`/v1/sources/${encodeURIComponent(i)}${d}`,c)}listTables(i){return this.#i("/v1/tables",i)}describeTable(i,r){return this.#i(`/v1/tables/${encodeURIComponent(i)}`,r)}queryTable(i,r,c={},f){return this.#r(`/v1/tables/${encodeURIComponent(i)}/query`,{tableId:i,sql:r,...c},f)}async#i(i,r){let c;for(let f=1;f<=this.#l;f+=1)try{return await this.#s(i,{method:"GET"},r)}catch(d){if(c=d,d instanceof Jr||r?.aborted===!0)throw d;if(f===this.#l)break;await VS(2**(f-1)*100)}throw c}async#r(i,r,c){return this.#s(i,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}},c)}async#s(i,r,c){const f=AbortSignal.timeout(this.#a),d=c===void 0?f:AbortSignal.any([c,f]),m=await this.#n(`${this.#e}${i}`,{...r,signal:d,headers:{Accept:"application/json",...this.#t===void 0?{}:{Authorization:`Bearer ${this.#t}`},...r.headers}}),p=await m.text();let y;try{y=p===""?null:JSON.parse(p)}catch{throw new Jr({code:"LORE_E_INTERNAL",message:`The server returned a response that is not JSON (HTTP ${m.status}).`,status:m.status})}if(!m.ok){const v=y?.error;throw new Jr({code:typeof v?.code=="string"?v.code:"LORE_E_INTERNAL",message:typeof v?.message=="string"?v.message:`The server returned HTTP ${m.status}.`,status:m.status,...typeof v?.remediation=="string"?{remediation:v.remediation}:{},...typeof v?.subject=="string"?{subject:v.subject}:{}})}return y}}function VS(l){return new Promise(i=>{setTimeout(i,l)})}const ol=new KS({baseUrl:typeof window>"u"?"http://127.0.0.1:43110":window.location.origin});function Kt(l){if(l instanceof Jr)return{message:l.message,...l.code===void 0?{}:{code:l.code},...l.remediation===void 0?{}:{remediation:l.remediation}};const i=l?.error;if(typeof i=="object"&&i!==null&&typeof i.message=="string"){const r=i;return{message:r.message,...typeof r.code=="string"?{code:r.code}:{},...typeof r.remediation=="string"?{remediation:r.remediation}:{}}}return l instanceof Error?{message:l.message,remediation:"Check that `lorepack dev` is still running in your terminal."}:{message:String(l)}}async function sy({signal:l}){const i=await fetch("/v1/sources",{signal:l});if(!i.ok)throw new Error("This server does not list sources.");return await i.json()}const ZS={overview:o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),o.jsx("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),o.jsx("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),o.jsx("rect",{x:"9",y:"9",width:"4.5",height:"4.5",rx:"1"})]}),sources:o.jsxs(o.Fragment,{children:[o.jsx("path",{d:"M9.5 1.75H4.25a1 1 0 0 0-1 1v10.5a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V5Z"}),o.jsx("path",{d:"M9.5 1.75V5h3.25"}),o.jsx("path",{d:"M5.75 8.25h4.5M5.75 10.75h3"})]}),tables:o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"2",y:"2.75",width:"12",height:"10.5",rx:"1.25"}),o.jsx("path",{d:"M2 6.25h12M2 9.75h12M6.25 6.25v7"})]}),playground:o.jsxs(o.Fragment,{children:[o.jsx("path",{d:"M6 1.75v4.5L2.6 12.2a1 1 0 0 0 .87 1.55h9.06a1 1 0 0 0 .87-1.55L10 6.25v-4.5"}),o.jsx("path",{d:"M5 1.75h6M4.25 9.75h7.5"})]}),versions:o.jsxs(o.Fragment,{children:[o.jsx("circle",{cx:"8",cy:"8",r:"2.25"}),o.jsx("path",{d:"M8 1.75v4M8 10.25v4"})]}),diagnostics:o.jsx("path",{d:"M1.75 8h2.5l1.75-4.5 3.5 9 1.75-4.5h3"}),search:o.jsxs(o.Fragment,{children:[o.jsx("circle",{cx:"7.25",cy:"7.25",r:"4.5"}),o.jsx("path",{d:"m10.5 10.5 3.25 3.25"})]}),system:o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1.75",y:"2.75",width:"12.5",height:"8.5",rx:"1.25"}),o.jsx("path",{d:"M5.5 13.75h5M8 11.25v2.5"})]}),light:o.jsxs(o.Fragment,{children:[o.jsx("circle",{cx:"8",cy:"8",r:"2.75"}),o.jsx("path",{d:"M8 1.5v1.25M8 13.25v1.25M1.5 8h1.25M13.25 8h1.25M3.4 3.4l.9.9M11.7 11.7l.9.9M3.4 12.6l.9-.9M11.7 4.3l.9-.9"})]}),dark:o.jsx("path",{d:"M13.25 9.6A5.5 5.5 0 0 1 6.4 2.75a5.5 5.5 0 1 0 6.85 6.85Z"}),copy:o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"5.25",y:"5.25",width:"8.5",height:"8.5",rx:"1.25"}),o.jsx("path",{d:"M10.75 5.25v-2a1 1 0 0 0-1-1h-6.5a1 1 0 0 0-1 1v6.5a1 1 0 0 0 1 1h2"})]}),arrow:o.jsx("path",{d:"M3 8h10M9 4l4 4-4 4"}),check:o.jsx("path",{d:"m3.25 8.5 3 3 6.5-7"})};function mn({name:l}){return o.jsx("svg",{className:"icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:ZS[l]})}function $S(){return o.jsxs("svg",{className:"mark",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:[o.jsx("rect",{x:"2",y:"11",width:"16",height:"6",rx:"2",fill:"currentColor",opacity:"0.28"}),o.jsx("rect",{x:"2",y:"7",width:"16",height:"6",rx:"2",fill:"currentColor",opacity:"0.55"}),o.jsx("rect",{x:"2",y:"3",width:"16",height:"6",rx:"2",fill:"currentColor"})]})}const FS=8,JS=["Go to","Sources","Tables","Actions"];function PS({routes:l,hasTables:i,buildId:r,onNavigate:c,onTheme:f,onClose:d}){const[m,p]=N.useState(""),[y,v]=N.useState(0),b=N.useRef(null),x=N.useRef(null),E=N.useId(),M=Rt({queryKey:["sources"],queryFn:sy}),L=Rt({queryKey:["tables"],queryFn:({signal:K})=>ol.listTables(K),enabled:i});N.useEffect(()=>{b.current?.focus()},[]);const B=N.useMemo(()=>{const K=[...l.map($=>({id:`route:${$.to}`,group:"Go to",label:$.label,icon:$.icon,run:()=>c($.to)})),...(M.data?.artifacts??[]).map($=>({id:`source:${$.artifactId}`,group:"Sources",label:$.displayPath,detail:`${$.chunkCount} ${$.chunkCount===1?"chunk":"chunks"}`,icon:"sources",run:()=>c(`/sources?artifact=${encodeURIComponent($.artifactId)}`)})),...(L.data?.tables??[]).map($=>({id:`table:${$.tableId}`,group:"Tables",label:$.name,icon:"tables",run:()=>c(`/tables?table=${encodeURIComponent($.tableId)}`)})),...r===void 0?[]:[{id:"action:copy-build",group:"Actions",label:"Copy active build id",detail:r.slice(0,17),icon:"copy",run:()=>void navigator.clipboard?.writeText(r)}],...["system","light","dark"].map($=>({id:`theme:${$}`,group:"Actions",label:`Use ${$} theme`,icon:$,run:()=>f($)}))],ie=m.trim().toLowerCase(),ae=ie===""?K:K.filter($=>WS($,ie)),he=new Map;return ae.filter($=>{const O=he.get($.group)??0;return he.set($.group,O+1),O<FS})},[l,M.data,L.data,r,m,c,f]);N.useEffect(()=>v(0),[m]),N.useEffect(()=>{x.current?.querySelector(`[data-index="${y}"]`)?.scrollIntoView({block:"nearest"})},[y]);const H=K=>{K!==void 0&&(d(),K.run())},P=K=>`${E}-option-${K}`,F=JS.map(K=>({group:K,rows:B.flatMap((ie,ae)=>ie.group===K?[{entry:ie,index:ae}]:[])})).filter(K=>K.rows.length>0);return o.jsxs("div",{className:"palette-layer",children:[o.jsx("button",{type:"button",className:"palette-scrim","aria-label":"Close the command palette",tabIndex:-1,onClick:d}),o.jsxs("div",{className:"palette",role:"dialog","aria-modal":"true","aria-label":"Command palette",children:[o.jsxs("div",{className:"palette-search",children:[o.jsx(mn,{name:"search"}),o.jsx("input",{ref:b,className:"palette-input",role:"combobox","aria-expanded":"true","aria-controls":E,"aria-autocomplete":"list","aria-activedescendant":B.length>0?P(y):void 0,"aria-label":"Search routes, sources, tables and actions",placeholder:"Jump to a route, source or table",value:m,spellCheck:!1,autoComplete:"off",onChange:K=>p(K.target.value),onKeyDown:K=>{K.key==="ArrowDown"?(K.preventDefault(),v(ie=>Math.min(ie+1,B.length-1))):K.key==="ArrowUp"?(K.preventDefault(),v(ie=>Math.max(ie-1,0))):K.key==="Enter"?(K.preventDefault(),H(B[y])):K.key==="Escape"?(K.preventDefault(),d()):K.key==="Tab"&&K.preventDefault()}}),o.jsx("kbd",{className:"kbd",children:"esc"})]}),o.jsxs("div",{className:"palette-list",id:E,role:"listbox",ref:x,"aria-label":"Results",children:[B.length===0&&o.jsx("p",{className:"palette-empty",children:M.isPending?"Reading sources.":`Nothing matches "${m.trim()}".`}),F.map(({group:K,rows:ie})=>o.jsxs("div",{role:"group","aria-labelledby":`${E}-${K}`,children:[o.jsx("div",{className:"palette-group",id:`${E}-${K}`,children:K}),ie.map(({entry:ae,index:he})=>o.jsxs("div",{id:P(he),role:"option","aria-selected":he===y,"data-index":he,className:he===y?"palette-option palette-option-on":"palette-option",onMouseMove:()=>v(he),onClick:()=>H(ae),children:[o.jsx(mn,{name:ae.icon}),o.jsx("span",{className:"palette-label",children:ae.label}),ae.detail!==void 0&&o.jsx("span",{className:"palette-detail",children:ae.detail})]},ae.id))]},K))]}),o.jsxs("div",{className:"palette-foot","aria-hidden":"true",children:[o.jsxs("span",{children:[o.jsx("kbd",{className:"kbd",children:"↑"})," ",o.jsx("kbd",{className:"kbd",children:"↓"})," to move"]}),o.jsxs("span",{children:[o.jsx("kbd",{className:"kbd",children:"↵"})," to open"]})]})]})]})}function WS(l,i){const r=`${l.label} ${l.group}`.toLowerCase();return i.split(/\s+/).every(c=>r.includes(c))}function va({title:l,intro:i,actions:r}){return o.jsxs("div",{className:"route-header",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"route-title",children:l}),i!==void 0&&o.jsx("p",{className:"route-intro prose",children:i})]}),r!==void 0&&o.jsx("div",{className:"route-actions",children:r})]})}const IS={clean:"ok",dirty:"warn",unknown:"idle"},e1={active:"idle",draft:"warn",archived:"idle",superseded:"idle"},t1={pass:"ok",warn:"warn",fail:"bad"};function ry(l){return IS[l]??"idle"}function a1(l){return e1[l]??"idle"}function l1(l){return t1[l]??"idle"}function Ca({tone:l,children:i}){return o.jsx("span",{className:`badge badge-${l}`,children:i})}function gn({children:l}){return o.jsx("dl",{className:"facts",children:l})}function Te({label:l,children:i,mono:r=!0}){return o.jsxs("div",{className:"fact",children:[o.jsx("dt",{className:"fact-label",children:l}),o.jsx("dd",{className:r?"fact-value":"fact-value prose",children:i})]})}function bs({value:l}){const[i,r]=uy(l);return o.jsxs("span",{className:"command",children:[o.jsx("code",{children:l}),o.jsx("button",{type:"button",className:"command-copy",onClick:r,"aria-label":`Copy command ${l}`,children:i?"copied":"copy"})]})}function Pp({value:l,label:i}){const[r,c]=uy(l);return o.jsxs("span",{className:"command command-value",children:[o.jsx("code",{children:l}),o.jsx("button",{type:"button",className:"command-copy",onClick:c,"aria-label":`Copy ${i}`,children:r?"copied":"copy"})]})}function uy(l){const[i,r]=N.useState(!1);return[i,()=>{navigator.clipboard?.writeText(l).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)})}]}function Rs({lead:l,leadClassName:i,className:r,children:c}){return o.jsxs(o.Fragment,{children:[o.jsx("span",{className:i,children:l}),n1,o.jsx("span",{className:r,children:c})]})}const n1=" ";function kl({title:l,children:i}){return o.jsxs("div",{className:"empty",children:[o.jsx("p",{className:"empty-title prose",children:l}),i!==void 0&&o.jsx("div",{className:"empty-body prose",children:i})]})}function Lt({message:l,code:i,remediation:r}){return o.jsxs("div",{className:"failure",role:"alert",children:[o.jsx("p",{className:"failure-message prose",children:l}),i!==void 0&&o.jsx("p",{className:"failure-code",children:i}),r!==void 0&&o.jsx("p",{className:"failure-remediation prose",children:r})]})}function Tt({label:l}){return o.jsx("p",{className:"loading",role:"status",children:l})}function cu(l){return/^[A-Za-z0-9_./:=@%+-]+$/.test(l)?l:`'${l.replaceAll("'","'\\''")}'`}function gf(l,i,r){return[`curl -s -X POST ${l}${i}`," -H 'content-type: application/json'",` -d ${cu(JSON.stringify(r))}`].join(` \\
62
+ `)}function i1(l,i){const r=["lorepack export",`--task ${cu(l.task)}`,`--profile ${l.profile}`];return l.budget!==void 0&&r.push(`--budget ${l.budget}`),{cli:r.join(" "),http:gf(i,"/v1/context",l),mcp:{name:"lore_context_for_task",arguments:{...l}}}}function s1(l,i){return{cli:`lorepack search ${cu(l.query)}${l.debug===!0?" --debug":""}`,http:gf(i,"/v1/search",l),mcp:{name:"lore_search",arguments:{...l}}}}function r1(l,i,r){return{http:gf(r,`/v1/tables/${encodeURIComponent(l)}/query`,{sql:i}),mcp:{name:"lore_query_table",arguments:{tableId:l,sql:i}}}}function u1(l,i,r){const c=i===null?"":`?lineStart=${i.start}&lineEnd=${i.end}`;return{http:`curl -s ${cu(`${r}/v1/sources/${encodeURIComponent(l)}${c}`)}`,mcp:{name:"lore_read_source",arguments:i===null?{artifactId:l}:{artifactId:l,lineStart:i.start,lineEnd:i.end}}}}function c1(l){return JSON.stringify({name:l.name,arguments:l.arguments},null,2)}function hi(){return typeof window>"u"?"http://127.0.0.1:43110":window.location.origin}const Zo="lore:locationchange";function Wp(l){const i=window.location.hash,r=i.indexOf("?");return r===-1?null:new URLSearchParams(i.slice(r+1)).get(l)}function o1(){window.dispatchEvent(new Event(Zo))}function $o(l){const[i,r]=N.useState(()=>Wp(l));return N.useEffect(()=>{const c=()=>r(Wp(l));return window.addEventListener("hashchange",c),window.addEventListener("popstate",c),window.addEventListener(Zo,c),()=>{window.removeEventListener("hashchange",c),window.removeEventListener("popstate",c),window.removeEventListener(Zo,c)}},[l]),i}const Fo="lore-studio-theme",cy="(prefers-color-scheme: dark)";function f1(){try{const l=window.localStorage.getItem(Fo);if(l==="light"||l==="dark")return l}catch{}return"system"}function d1(){return typeof window.matchMedia=="function"&&window.matchMedia(cy).matches}function Ip(l){const i=l==="dark"||l==="system"&&d1();document.documentElement.dataset.theme=i?"dark":"light"}function h1(){const[l,i]=N.useState(f1);N.useEffect(()=>{if(Ip(l),l!=="system"||typeof window.matchMedia!="function")return;const c=window.matchMedia(cy),f=()=>Ip("system");return c.addEventListener("change",f),()=>c.removeEventListener("change",f)},[l]);const r=N.useCallback(c=>{try{c==="system"?window.localStorage.removeItem(Fo):window.localStorage.setItem(Fo,c)}catch{}i(c)},[]);return{choice:l,setChoice:r}}const m1=[{to:"/",label:"Overview",end:!0,icon:"overview"},{to:"/sources",label:"Sources",end:!1,icon:"sources"},{to:"/tables",label:"Tables",end:!1,icon:"tables",needs:"table-query"},{to:"/playground",label:"Playground",end:!1,icon:"playground"},{to:"/versions",label:"Versions",end:!1,icon:"versions"},{to:"/diagnostics",label:"Diagnostics",end:!1,icon:"diagnostics"}],p1=[{choice:"system",label:"Match system theme"},{choice:"light",label:"Light theme"},{choice:"dark",label:"Dark theme"}];function v1(){const l=Rt({queryKey:["build"],queryFn:({signal:E})=>ol.describeBuild(E),refetchInterval:2e3,refetchOnWindowFocus:!0}),i=l.data?.capabilities??[],r=m1.filter(E=>E.needs===void 0||i.includes(E.needs)),{choice:c,setChoice:f}=h1(),d=Wv(),[m,p]=N.useState(!1),y=N.useRef(null),v=N.useCallback(()=>{y.current=document.activeElement instanceof HTMLElement?document.activeElement:null,p(!0)},[]),b=N.useCallback(()=>{p(!1),window.requestAnimationFrame(()=>y.current?.focus())},[]),x=N.useCallback(E=>{Promise.resolve(d(E)).then(o1)},[d]);return N.useEffect(()=>{const E=M=>{M.key.toLowerCase()==="k"&&(M.metaKey||M.ctrlKey)&&(M.preventDefault(),m?b():v())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[m,v,b]),o.jsxs("div",{className:"app",children:[o.jsx("a",{className:"skip-link",href:"#main",children:"Skip to content"}),o.jsxs("header",{className:"sidebar",children:[o.jsxs("div",{className:"sidebar-brand",children:[o.jsx($S,{}),o.jsx("span",{className:"sidebar-product",children:"Lore Studio"})]}),o.jsx(y1,{}),o.jsxs("button",{type:"button",className:"search-trigger","aria-label":"Jump to a route, source or table","aria-keyshortcuts":"Meta+K Control+K",onClick:v,children:[o.jsx(mn,{name:"search"}),o.jsx("span",{className:"search-trigger-label",children:"Jump to"}),o.jsx("kbd",{className:"kbd search-trigger-key",children:b1()?"⌘K":"Ctrl K"})]}),o.jsx("nav",{className:"nav","aria-label":"Studio sections",children:r.map(E=>o.jsxs(ny,{to:E.to,end:E.end,className:({isActive:M})=>M?"nav-link nav-link-active":"nav-link",children:[o.jsx(mn,{name:E.icon}),E.label]},E.to))}),o.jsxs("div",{className:"sidebar-foot",children:[o.jsx(g1,{}),o.jsxs("fieldset",{className:"theme-switch",children:[o.jsx("legend",{className:"visually-hidden",children:"Theme"}),p1.map(E=>o.jsx("button",{type:"button",className:c===E.choice?"theme-option theme-option-on":"theme-option","aria-pressed":c===E.choice,"aria-label":E.label,title:E.label,onClick:()=>f(E.choice),children:o.jsx(mn,{name:E.choice})},E.choice))]})]})]}),o.jsx("main",{className:"main",id:"main",children:o.jsx(rS,{})}),m&&o.jsx(PS,{routes:r,hasTables:i.includes("table-query"),buildId:l.data?.buildId,onNavigate:x,onTheme:f,onClose:b})]})}function y1(){const i=Rt({queryKey:["build"],queryFn:({signal:f})=>ol.describeBuild(f)}).data,[r,c]=N.useState(!1);return o.jsxs("div",{className:"build-identity",children:[o.jsx("span",{className:"header-name",children:i?.projectName??"Lorepack"}),o.jsxs("div",{className:"build-identity-row",children:[i===void 0?o.jsx("span",{className:"header-id header-id-pending",children:"reading build"}):o.jsx("span",{className:"header-id",title:i.buildId,children:i.shortBuildId},i.buildId),i!==void 0&&o.jsx("button",{type:"button",className:"icon-button","aria-label":r?"Copied build id":`Copy build id ${i.buildId}`,title:"Copy full build id",onClick:()=>{navigator.clipboard?.writeText(i.buildId).then(()=>{c(!0),window.setTimeout(()=>c(!1),1200)})},children:o.jsx(mn,{name:"copy"})})]}),i!==void 0&&o.jsxs("div",{className:"build-identity-state",children:[o.jsx(Ca,{tone:ry(i.sourceState),children:i.sourceState}),o.jsx("span",{className:"build-identity-note",children:"active build"})]}),o.jsx("span",{className:"visually-hidden",role:"status","aria-live":"polite",children:i===void 0?"":`Active build ${i.shortBuildId}, sources ${i.sourceState}`})]})}function g1(){const l=`${hi()}/mcp`,[i,r]=N.useState(!1);return o.jsxs("button",{type:"button",className:"mcp-endpoint",title:l,"aria-label":i?"Copied MCP endpoint":`Copy MCP endpoint ${l}`,onClick:()=>{navigator.clipboard?.writeText(l).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)})},children:[o.jsx(mn,{name:i?"check":"copy"}),o.jsx("span",{children:i?"Copied":"MCP URL"})]})}function b1(){return typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform)}function on(){const l=ey(),i=fi(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:String(l);return o.jsxs("section",{children:[o.jsx(va,{title:"Something broke",intro:"This page hit an error it could not recover from. The build and the server are unaffected.",actions:o.jsxs(o.Fragment,{children:[o.jsx("a",{className:"action",href:"#/",children:"Go to Overview"}),o.jsx("button",{type:"button",className:"action",onClick:()=>window.location.reload(),children:"Reload"})]})}),o.jsx(Lt,{message:i,remediation:"Reload the page. If it happens again, open an issue with the steps that led here and the output of `lorepack doctor --json`."})]})}async function oy({signal:l}){const i=await fetch("/v1/diagnostics",{signal:l}),r=await i.json();if(!i.ok)throw r;return r}function x1(l){return l.configured?l.ownedByLorepack?"yes":"yes, configured by hand":"no"}const ev="The doctor checks, the running session, its environment, and which AI clients are connected.";function S1(){const l=Rt({queryKey:["diagnostics"],queryFn:oy,refetchOnWindowFocus:!1});if(l.isPending)return o.jsx(Tt,{label:"Running the checks."});if(l.isError)return o.jsxs("section",{children:[o.jsx(va,{title:"Diagnostics",intro:ev}),o.jsx(Lt,{...Kt(l.error)})]});const i=l.data;return o.jsxs("section",{children:[o.jsx(va,{title:"Diagnostics",intro:ev,actions:o.jsx("button",{type:"button",className:"action",disabled:l.isFetching,onClick:()=>void l.refetch(),children:l.isFetching?"Running":"Re-run checks"})}),o.jsx("p",{className:"counts",role:"status",children:j1(i.doctor.counts)}),o.jsx(E1,{checks:i.doctor.checks}),o.jsxs("div",{className:"diagnostics-grid",children:[o.jsx(N1,{session:i.session}),o.jsx(T1,{environment:i.environment})]}),o.jsx(w1,{clients:i.clients})]})}function j1(l){const i=[`${l.pass} passed`];return l.warn>0&&i.push(`${l.warn} to look at`),l.fail>0&&i.push(`${l.fail} failed`),i.join(", ")}function E1({checks:l}){return o.jsx("ul",{className:"checks",children:l.map(i=>o.jsxs("li",{className:"check",children:[o.jsxs("div",{className:"check-head",children:[o.jsx(Ca,{tone:l1(i.status),children:i.status}),o.jsx("span",{className:"check-title",children:i.title})]}),o.jsx("p",{className:"check-detail prose",children:i.detail}),i.remediation!==void 0&&o.jsx("p",{className:"check-remediation",children:i.remediation}),i.values!==void 0&&Object.keys(i.values).length>0&&o.jsx("dl",{className:"check-values",children:Object.entries(i.values).map(([r,c])=>o.jsxs("div",{className:"check-value",children:[o.jsx("dt",{children:r}),o.jsx("dd",{children:String(c)})]},r))})]},i.id))})}function N1({session:l}){const i=l.watcher;return o.jsxs("section",{className:"panel",children:[o.jsx("h2",{className:"section-heading",children:"Session"}),o.jsxs(gn,{children:[o.jsx(Te,{label:"Address",children:`${l.host}:${l.port}`}),o.jsx(Te,{label:"Process",children:String(l.pid)}),o.jsx(Te,{label:"Started",children:lu(l.startedAt)}),i===null?o.jsx(Te,{label:"Watcher",mono:!1,children:"Not watching. This server serves the active build and never rebuilds."}):o.jsxs(o.Fragment,{children:[o.jsx(Te,{label:"Sources",children:i.state}),o.jsx(Te,{label:"Watching",children:`${i.watchedPaths.toLocaleString()} paths`}),o.jsx(Te,{label:"Last event",children:i.lastEventAt===null?"none yet":lu(i.lastEventAt)}),o.jsx(Te,{label:"Last rebuild",children:R1(i.lastRebuild)}),o.jsx(Te,{label:"Rebuilds",children:`${i.rebuilds}, and ${i.noOps} change${i.noOps===1?"":"s"} that changed nothing`})]})]})]})}function R1(l){if(l===null)return"none since this session started";if(l.failed)return`failed at ${lu(l.at)}, after ${l.durationMs} ms`;const i=l.created?"new build":"no change";return`${lu(l.at)}, ${l.durationMs} ms, ${i}`}function T1({environment:l}){return o.jsxs("section",{className:"panel",children:[o.jsx("h2",{className:"section-heading",children:"Environment"}),o.jsx(gn,{children:Object.entries(l).map(([i,r])=>o.jsx(Te,{label:i,children:String(r)},i))})]})}function w1({clients:l}){return o.jsxs("section",{className:"panel",children:[o.jsx("h2",{className:"section-heading",children:"Clients"}),o.jsx("div",{className:"table-frame table-scroll",children:o.jsxs("table",{className:"data-table clients",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:"client"}),o.jsx("th",{scope:"col",children:"installed"}),o.jsx("th",{scope:"col",children:"connected"}),o.jsx("th",{scope:"col",children:"configuration"})]})}),o.jsx("tbody",{children:l.map(i=>o.jsxs("tr",{children:[o.jsx("th",{scope:"row",className:"client-name",children:i.version===void 0?i.title:o.jsx(Rs,{lead:i.title,className:"client-version",children:i.version})}),o.jsx("td",{children:i.installed?"yes":"no"}),o.jsx("td",{children:x1(i)}),o.jsx("td",{className:"client-path",children:i.configPath??"(none)"})]},i.id))})]})}),l.filter(i=>i.installed&&!i.configured).map(i=>o.jsx("p",{className:"clients-hint",children:o.jsx(bs,{value:`lorepack connect ${i.id}`})},i.id))]})}function lu(l){const i=new Date(l);return Number.isNaN(i.getTime())?l:i.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}const fy=["warnings"];async function dy({signal:l}){const i=await fetch("/v1/warnings",{signal:l});if(!i.ok)throw new Error("Warnings are not available from this server.");return await i.json()}const _o="The build your AI reads right now, and whether its sources still match it.";function C1(){const[l,i]=N.useState(!1),r=Rt({queryKey:["build"],queryFn:({signal:d})=>ol.describeBuild(d),refetchInterval:2e3});if(r.isPending)return o.jsx(Tt,{label:"Reading the active build."});if(r.isError){const d=Kt(r.error);return d.code==="LORE_E_BUILD_NOT_FOUND"?o.jsxs("section",{children:[o.jsx(va,{title:"Overview",intro:_o}),o.jsxs(kl,{title:"This project has no build yet.",children:[o.jsx("p",{children:"Build it, and this page fills in."}),o.jsx(bs,{value:"lorepack build"})]})]}):o.jsxs("section",{children:[o.jsx(va,{title:"Overview",intro:_o}),o.jsx(Lt,{...d})]})}const c=r.data,f=c.sourceState==="dirty";return o.jsxs("section",{children:[o.jsx(va,{title:"Overview",intro:_o}),o.jsxs("div",{className:f?"panel summary summary-dirty":"panel summary",children:[o.jsx("h2",{className:"visually-hidden",children:"build"}),o.jsx("div",{className:"summary-id",children:o.jsx(M1,{full:c.buildId,short:c.shortBuildId})}),o.jsxs("div",{className:"state-banner",children:[o.jsx(Ca,{tone:ry(c.sourceState),children:c.sourceState}),o.jsx("p",{className:"state-line prose",children:c.sourceState==="clean"?"The sources match this build. Your AI is reading what is on disk.":c.sourceState==="dirty"?"The sources have changed since this build. Your AI is reading the older text.":"Freshness could not be established, so this build is served as it is."}),f&&o.jsx(bs,{value:"lorepack build"})]}),o.jsxs("p",{className:"summary-meta",children:[c.createdAt!==void 0&&o.jsx("span",{children:`Created ${new Date(c.createdAt).toLocaleString()}`}),o.jsx("span",{children:`Compiler ${c.compilerVersion}`}),o.jsx("span",{className:"capabilities",children:c.capabilities.map((d,m)=>o.jsxs("span",{children:[m>0&&" ",o.jsx("span",{className:"capability",children:d})]},d))})]})]}),o.jsx(D1,{onPlan:()=>{i(!0),hy("next-build")}}),o.jsxs("div",{className:"overview-grid",children:[o.jsxs("div",{className:"overview-main",children:[o.jsx(z1,{}),o.jsxs("div",{className:"panel overview-build",children:[o.jsx("h2",{className:"section-heading",children:"contents"}),o.jsxs(gn,{children:[o.jsx(Te,{label:"Project",children:c.projectName}),o.jsx(Te,{label:"Artifacts",children:c.counts.artifacts.toLocaleString()}),o.jsx(Te,{label:"Nodes",children:c.counts.nodes.toLocaleString()}),o.jsx(Te,{label:"Chunks",children:c.counts.chunks.toLocaleString()}),c.counts.tables>0&&o.jsx(Te,{label:"Tables",children:`${c.counts.tables.toLocaleString()} (${c.counts.tableRows.toLocaleString()} rows)`})]})]})]}),o.jsxs("div",{className:"overview-side",children:[o.jsx(A1,{asked:l,onAsk:()=>i(!0)}),o.jsx(O1,{count:c.warningCount})]})]})]})}function M1({full:l,short:i}){const[r,c]=N.useState(!1);return o.jsxs("span",{className:"summary-build-id",children:[o.jsx("span",{title:l,children:i}),o.jsx("button",{type:"button",className:"command-copy","aria-label":`Copy build id ${l}`,onClick:()=>{navigator.clipboard?.writeText(l).then(()=>{c(!0),window.setTimeout(()=>c(!1),1200)})},children:r?"copied":"copy"})]})}function O1({count:l}){const i=Rt({queryKey:fy,queryFn:dy,enabled:l>0});return l===0?null:o.jsxs("div",{className:"panel",children:[o.jsx("h2",{className:"section-heading",children:"warnings"}),i.data===void 0?o.jsx(Tt,{label:"Reading warnings."}):o.jsx("ul",{className:"warning-groups",children:i.data.groups.map(r=>o.jsxs("li",{className:"warning-group",children:[o.jsx("span",{className:"warning-count",children:r.count}),o.jsx("span",{className:"warning-class",children:r.class}),o.jsxs("ul",{className:"warning-list",children:[r.warnings.slice(0,5).map(c=>o.jsx("li",{children:c.path===void 0?o.jsx("span",{className:"warning-message prose",children:tv(c)}):o.jsx(Rs,{lead:c.path,leadClassName:"warning-path",className:"warning-message prose",children:tv(c)})},`${c.code}-${c.path??""}-${c.message}`)),r.warnings.length>5&&o.jsx("li",{className:"warning-more prose",children:`and ${r.warnings.length-5} more, in lorepack inspect warnings`})]})]},r.class))})]})}function tv(l){if(l.path===void 0||!l.message.startsWith(l.path))return l.message;const i=l.message.slice(l.path.length).trimStart();return i.charAt(0).toUpperCase()+i.slice(1)}function A1({asked:l,onAsk:i}){const r=Rt({queryKey:["plan"],queryFn:async({signal:c})=>{const f=await fetch("/v1/plan",{signal:c});if(!f.ok)throw new Error("This server cannot plan, because it has no sources.");return await f.json()},enabled:l,staleTime:0});return o.jsxs("div",{className:"panel",id:"next-build",tabIndex:-1,children:[o.jsx("h2",{className:"section-heading",children:"next build"}),l?r.isPending?o.jsx(Tt,{label:"Planning. This reads every source file."}):r.isError?o.jsx(Lt,{...Kt(r.error)}):o.jsxs(o.Fragment,{children:[o.jsxs(gn,{children:[o.jsx(Te,{label:"Added",children:r.data.artifacts.added.toLocaleString()}),o.jsx(Te,{label:"Changed",children:r.data.artifacts.changed.toLocaleString()}),o.jsx(Te,{label:"Removed",children:r.data.artifacts.removed.toLocaleString()}),o.jsx(Te,{label:"Reused",children:r.data.artifacts.reused.toLocaleString()}),o.jsx(Te,{label:"Lockfile",mono:!1,children:r.data.lock.changed?"would change":"unchanged"})]}),o.jsx("div",{className:"plan-refresh",children:o.jsx("button",{type:"button",className:"action",onClick:()=>void r.refetch(),children:"Plan again"})})]}):o.jsxs("div",{className:"plan-idle",children:[o.jsx("p",{className:"prose",children:"Planning reads every source file, so it runs when you ask."}),o.jsx("button",{type:"button",className:"action",onClick:i,children:"Plan a rebuild"})]})]})}function hy(l){window.requestAnimationFrame(()=>{const i=document.getElementById(l);i?.scrollIntoView?.({behavior:"smooth",block:"start"}),i?.focus({preventScroll:!0})})}function my(){const l=Rt({queryKey:["diagnostics"],queryFn:oy,refetchOnWindowFocus:!1,staleTime:3e4});return{clients:Array.isArray(l.data?.clients)?l.data.clients:[],pending:l.isPending}}function D1({onPlan:l}){const{clients:i,pending:r}=my(),c=i.filter(f=>f.configured).length;return o.jsxs("section",{className:"next-steps","aria-label":"Next steps",children:[o.jsxs("div",{className:"next-step",children:[o.jsx("h2",{className:"next-step-title",children:"Ask the build a question"}),o.jsx("p",{className:"next-step-text prose",children:"Assemble the context a model would receive for a task, then copy it as a CLI, HTTP or MCP call."}),o.jsx("a",{className:"action action-small",href:"#/playground",children:"Open Playground"})]}),o.jsxs("div",{className:"next-step",children:[o.jsxs("h2",{className:"next-step-title",children:["Connect an AI client ",!r&&o.jsx(Ca,{tone:c>0?"ok":"idle",children:c>0?`${c} connected`:"none connected"})]}),o.jsx("p",{className:"next-step-text prose",children:"Point an MCP client at this build. It reads, and can never build, deploy or edit."}),o.jsx("button",{type:"button",className:"action action-small",onClick:()=>hy("connect"),children:"Show how to connect"})]}),o.jsxs("div",{className:"next-step",children:[o.jsx("h2",{className:"next-step-title",children:"Preview the next build"}),o.jsx("p",{className:"next-step-text prose",children:"See what a rebuild would add, change or remove before anything is compiled."}),o.jsx("button",{type:"button",className:"action action-small",onClick:l,children:"Preview a rebuild"})]})]})}function z1(){const l=hi(),{clients:i,pending:r}=my(),c=i.filter(f=>f.installed&&!f.configured);return o.jsxs("div",{className:"panel connect",id:"connect",tabIndex:-1,children:[o.jsx("h2",{className:"section-heading",children:"connect your AI"}),o.jsx("p",{className:"section-note prose",children:"This process serves the active build read-only, over MCP and HTTP, on the address Studio is open at."}),o.jsxs("dl",{className:"endpoints",children:[o.jsxs("div",{className:"endpoint",children:[o.jsx("dt",{children:"MCP over HTTP"}),o.jsx("dd",{children:o.jsx(Pp,{value:`${l}/mcp`,label:"MCP endpoint"})})]}),o.jsxs("div",{className:"endpoint",children:[o.jsx("dt",{children:"MCP over stdio"}),o.jsx("dd",{children:o.jsx(bs,{value:"lorepack mcp"})})]}),o.jsxs("div",{className:"endpoint",children:[o.jsx("dt",{children:"HTTP API"}),o.jsx("dd",{children:o.jsx(Pp,{value:`${l}/v1`,label:"HTTP API base URL"})})]})]}),o.jsx("h3",{className:"connect-heading",children:"Clients on this machine"}),r?o.jsx(Tt,{label:"Looking for installed clients."}):i.length===0?o.jsx("p",{className:"connect-none prose",children:"No supported client was detected. Any MCP client can use the endpoints above."}):o.jsx("ul",{className:"client-list",children:i.map(f=>o.jsxs("li",{className:"client-row",children:[o.jsx("span",{className:"client-row-name",children:f.version===void 0?f.title:o.jsx(Rs,{lead:f.title,className:"client-row-version",children:f.version})}),o.jsx(Ca,{tone:f.configured?"ok":"idle",children:f.installed?f.configured?"connected":"not connected":"not installed"}),f.configured&&!f.ownedByLorepack&&o.jsx("span",{className:"client-row-note",children:"configured by hand"}),c.includes(f)&&o.jsx("span",{className:"client-row-command",children:o.jsx(bs,{value:`lorepack connect ${f.id}`})})]},f.id))})]})}function _1(l){const i=[],r=l.relativePath??l.artifactId;r!==void 0&&i.push(r),l.sheet!==void 0&&i.push(l.sheet),l.headingPath!==void 0&&l.headingPath.length>0&&i.push(l.headingPath.join(" › "));const c=py(l);return c!==null&&i.push(c),i.join(" · ")}function py(l){return l.cellRange!==void 0?l.cellRange:l.page!==void 0?`p${l.page}`:l.lineStart===void 0?null:l.lineEnd===void 0||l.lineEnd===l.lineStart?String(l.lineStart):`${l.lineStart}-${l.lineEnd}`}function U1(l){if(l.artifactId===void 0)return null;const i=new URLSearchParams({artifact:l.artifactId});return l.lineStart!==void 0&&i.set("lines",`${l.lineStart}-${l.lineEnd??l.lineStart}`),`#/sources?${i.toString()}`}function Ts({locator:l,link:i=!0}){const r=_1(l),[c,f]=N.useState(!1),d=N.useCallback(()=>{navigator.clipboard?.writeText(r).then(()=>{f(!0),window.setTimeout(()=>f(!1),1200)})},[r]),m=l.relativePath??l.artifactId,p=l.headingPath??[],y=py(l),v=i?U1(l):null;return o.jsxs("span",{className:"citation",children:[m!==void 0&&(v===null?o.jsx("span",{className:"citation-path",children:m}):o.jsx("a",{className:"citation-path citation-link",href:v,title:"Open this source in Studio",children:m})),l.sheet!==void 0&&o.jsxs(o.Fragment,{children:[o.jsx(Uo,{}),o.jsx("span",{className:"citation-path",children:l.sheet})]}),p.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Uo,{}),o.jsx("span",{className:"citation-headings",children:p.map((b,x)=>o.jsxs("span",{children:[x>0&&o.jsxs(o.Fragment,{children:[" ",o.jsx("span",{className:"citation-chevron",children:"›"})," "]}),b]},p.slice(0,x+1).join("")))})]}),y!==null&&o.jsxs(o.Fragment,{children:[o.jsx(Uo,{}),o.jsx("span",{className:"citation-range",children:y})]}),o.jsx("button",{type:"button",className:"citation-copy",onClick:d,"aria-label":`Copy citation ${r}`,children:c?"copied":"copy"})]})}function Uo(){return o.jsxs(o.Fragment,{children:[" ",o.jsx("span",{className:"citation-separator","aria-hidden":"true",children:"·"})," "]})}const av={cli:"CLI",http:"HTTP",mcp:"MCP"},lv={cli:"Run in the project directory.",http:"The same request against this running server.",mcp:"The tools/call params an MCP client sends to this server."};function ou({forms:l,label:i="Use it anywhere"}){const r=l.cli===void 0?["http","mcp"]:["cli","http","mcp"],[c,f]=N.useState(r[0]??"http"),d=r.includes(c)?c:r[0]??"http",[m,p]=N.useState(!1),y=N.useId(),v=d==="cli"?l.cli??"":d==="http"?l.http:c1(l.mcp);return o.jsxs("section",{className:"equivalents","aria-label":i,children:[o.jsxs("div",{className:"equivalents-head",children:[o.jsx("h3",{className:"equivalents-title",children:i}),o.jsx("div",{className:"equivalents-tabs",role:"tablist","aria-label":`${i} as`,children:r.map(b=>o.jsx("button",{type:"button",role:"tab",id:`${y}-${b}`,"aria-selected":b===d,"aria-controls":`${y}-panel`,className:b===d?"equivalents-tab equivalents-tab-on":"equivalents-tab",onClick:()=>{f(b),p(!1)},children:av[b]},b))}),o.jsx("button",{type:"button",className:"action action-small equivalents-copy","aria-label":`Copy the ${av[d]} form`,onClick:()=>{navigator.clipboard?.writeText(v).then(()=>{p(!0),window.setTimeout(()=>p(!1),1400)})},children:m?"Copied":"Copy"})]}),o.jsxs("div",{id:`${y}-panel`,role:"tabpanel","aria-labelledby":`${y}-${d}`,children:[o.jsx("pre",{className:"equivalents-code",tabIndex:0,children:o.jsx("code",{children:v})}),o.jsx("p",{className:"equivalents-note",children:d==="mcp"?o.jsxs(o.Fragment,{children:["Tool ",o.jsx("code",{children:l.mcp.name}),". ",lv.mcp]}):lv[d]})]})]})}const L1=["agent","coding","chat","deep"],nv=4e3,iv=4e4;function H1(){const[l,i]=N.useState("context");return o.jsxs("section",{children:[o.jsx(va,{title:"Playground",intro:"Assemble the context a model would receive for a task, and see exactly what was left out and why."}),o.jsxs("div",{className:"view-switch playground-tabs",role:"tablist","aria-label":"What to run",children:[o.jsx("button",{type:"button",role:"tab","aria-selected":l==="context",className:l==="context"?"view-option view-option-active":"view-option",onClick:()=>i("context"),children:"context for a task"}),o.jsx("button",{type:"button",role:"tab","aria-selected":l==="search",className:l==="search"?"view-option view-option-active":"view-option",onClick:()=>i("search"),children:"search"})]}),l==="context"?o.jsx(q1,{}):o.jsx(X1,{})]})}function q1(){const[l,i]=N.useState(""),[r,c]=N.useState("agent"),[f,d]=N.useState(""),[m,p]=N.useState(!1),y=()=>({task:l,profile:r,...f.trim()===""?{}:{budget:Number(f)}}),v=eu({mutationFn:E=>ol.contextForTask(E)}),b=eu({mutationFn:async()=>{const E=await fetch("/v1/export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(y())});if(!E.ok)throw new Error("The export could not be rendered.");const M=await E.text();return await navigator.clipboard?.writeText(M),M},onSuccess:()=>{p(!0),window.setTimeout(()=>p(!1),1400)}}),x=f.trim()!==""&&(!Number.isInteger(Number(f))||Number(f)<nv||Number(f)>iv);return o.jsxs(o.Fragment,{children:[o.jsxs("form",{className:"task-form",onSubmit:E=>{E.preventDefault(),l.trim()!==""&&!x&&v.mutate(y())},children:[o.jsxs("label",{className:"task-field",children:[o.jsx("span",{className:"field-label",children:"Task"}),o.jsx("input",{type:"text",className:"field-control task-input",placeholder:"how do I roll back a release",value:l,onChange:E=>i(E.target.value)})]}),o.jsxs("label",{className:"task-field task-field-narrow",children:[o.jsx("span",{className:"field-label",children:"Profile"}),o.jsx("select",{className:"field-control task-select",value:r,onChange:E=>c(E.target.value),children:L1.map(E=>o.jsx("option",{value:E,children:E},E))})]}),o.jsxs("label",{className:"task-field task-field-narrow",children:[o.jsx("span",{className:"field-label",children:"Budget"}),o.jsx("input",{type:"text",inputMode:"numeric",className:"field-control task-input",placeholder:"profile default",value:f,onChange:E=>d(E.target.value),"aria-invalid":x,"aria-describedby":x?"budget-bounds":void 0})]}),o.jsx("button",{type:"submit",className:"action action-primary task-submit",disabled:l.trim()===""||x,children:"Assemble"})]}),x&&o.jsx("p",{className:"field-error prose",id:"budget-bounds",children:`A budget is a whole number between ${nv.toLocaleString()} and ${iv.toLocaleString()} estimated tokens.`}),v.isPending&&o.jsx(Tt,{label:"Assembling the bundle."}),v.isError&&o.jsx(Lt,{...Kt(v.error)}),v.data!==void 0&&o.jsxs(o.Fragment,{children:[o.jsx(B1,{bundle:v.data}),v.variables!==void 0&&o.jsx("div",{className:"section",children:o.jsx(ou,{forms:i1(v.variables,hi())})}),v.data.overview.length>0&&o.jsxs("div",{className:"section",children:[o.jsx("h2",{className:"section-heading",children:"orientation"}),o.jsx("p",{className:"section-note prose",children:"The opening of each of the most relevant documents, which is what the reserve in the budget above pays for. The model receives these alongside the selections."}),o.jsx(Lo,{items:v.data.overview})]}),o.jsxs("div",{className:"section",children:[o.jsxs("div",{className:"section-with-action",children:[o.jsx("h2",{className:"section-heading",children:"selected"}),o.jsx("button",{type:"button",className:"action",onClick:()=>b.mutate(),disabled:b.isPending,children:m?"Copied":"Copy as export"})]}),v.data.selected.length===0?o.jsx(kl,{title:"Nothing fit. Every candidate is in the omissions below."}):o.jsx(Lo,{items:v.data.selected})]}),v.data.tables.length>0&&o.jsxs("div",{className:"section",children:[o.jsx("h2",{className:"section-heading",children:"tables"}),o.jsx(Y1,{tables:v.data.tables})]}),v.data.alternatives.length>0&&o.jsxs("div",{className:"section",children:[o.jsx("h2",{className:"section-heading",children:"alternatives"}),o.jsx("p",{className:"section-note prose",children:"Ranked lower by the status and authority declared in your configuration. Lorepack does not judge which of two documents is correct."}),o.jsx(Lo,{items:v.data.alternatives})]}),o.jsx(k1,{items:v.data.omitted})]})]})}function B1({bundle:l}){const i=l.omitted.filter(r=>r.reason==="budget").reduce((r,c)=>r+c.estimatedTokens,0);return o.jsxs("div",{className:"section panel",children:[o.jsx("h2",{className:"section-heading",children:"budget"}),o.jsx("p",{className:"section-note prose",children:"Every figure is a conservative estimate, not an exact token count."}),o.jsx(Q1,{bundle:l,cut:i}),o.jsxs(gn,{children:[o.jsx(Te,{label:"Profile",children:l.profile}),o.jsx(Te,{label:"Orientation",children:`${l.overview.length}, using ${l.reservedTokens.toLocaleString()} reserved`}),o.jsx(Te,{label:"Selected",children:String(l.selected.length)}),l.alternatives.length>0&&o.jsx(Te,{label:"Alternatives",children:String(l.alternatives.length)}),l.tables.length>0&&o.jsx(Te,{label:"Tables",children:String(l.tables.length)}),o.jsx(Te,{label:"Cited passages",children:String(l.citations.length)}),o.jsx(Te,{label:"Omitted",children:String(l.omitted.length)}),i>0&&o.jsx(Te,{label:"Cut for budget",children:i.toLocaleString()})]})]})}function Q1({bundle:l,cut:i}){const r=d=>`${Math.max(0,Math.min(100,d/Math.max(l.budget,1)*100))}%`,c=Math.max(l.estimatedTokens-l.reservedTokens,0),f=Math.max(l.budget-l.estimatedTokens,0);return o.jsxs("div",{className:"tape",children:[o.jsxs("p",{className:"tape-summary",children:[o.jsx("span",{className:"tape-used",children:l.estimatedTokens.toLocaleString()})," of ",o.jsx("span",{className:"tape-budget",children:l.budget.toLocaleString()})," estimated tokens used"]}),o.jsxs("div",{className:"tape-track","aria-hidden":"true",children:[o.jsx("span",{className:"tape-segment tape-reserved",style:{width:r(l.reservedTokens)}}),o.jsx("span",{className:"tape-segment tape-selected",style:{width:r(c)}})]}),o.jsxs("div",{className:"tape-legend","aria-hidden":"true",children:[o.jsxs("span",{className:"tape-key",children:[o.jsx("span",{className:"tape-swatch tape-reserved"}),`orientation ${l.reservedTokens.toLocaleString()}`]}),o.jsxs("span",{className:"tape-key",children:[o.jsx("span",{className:"tape-swatch tape-selected"}),`selections ${c.toLocaleString()}`]}),o.jsxs("span",{className:"tape-key",children:[o.jsx("span",{className:"tape-swatch tape-free"}),`unused ${f.toLocaleString()}`]}),i>0&&o.jsxs("span",{className:"tape-key",children:[o.jsx("span",{className:"tape-swatch tape-cut"}),`fell off the end ${i.toLocaleString()}`]})]})]})}function Y1({tables:l}){return o.jsx("ul",{className:"items",children:l.map(i=>o.jsx("li",{className:"item",children:o.jsxs("div",{className:"item-head",children:[o.jsx("span",{className:"table-name",children:i.name}),o.jsx("span",{className:"table-id",children:i.tableId})]})},i.tableId))})}function Lo({items:l}){return o.jsx("ul",{className:"items",children:l.map(i=>o.jsxs("li",{className:"item",children:[o.jsxs("div",{className:"item-head",children:[o.jsx(Ts,{locator:i.locator}),o.jsx("span",{className:"item-tokens",children:`${i.estimatedTokens.toLocaleString()} est`}),i.labels.map(r=>o.jsx(Ca,{tone:"idle",children:r},r))]}),o.jsx("p",{className:"item-text prose",children:i.text})]},i.chunkId))})}const G1={budget:"did not fit the budget",duplicate:"near-duplicate of something already selected",diversity:"one document may not be the whole answer",superseded:"superseded by another document you declared",archived:"archived in your configuration",filtered:"excluded by the filters on this request"};function k1({items:l}){return l.length===0?null:o.jsxs("div",{className:"section",children:[o.jsx("h2",{className:"section-heading",children:"omitted"}),o.jsx("div",{className:"table-frame table-scroll",children:o.jsxs("table",{className:"data-table omissions",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:"where"}),o.jsx("th",{scope:"col",children:"why"}),o.jsx("th",{scope:"col",className:"numeric",children:"est"})]})}),o.jsx("tbody",{children:l.map(i=>o.jsxs("tr",{className:"artifact-row",children:[o.jsx("td",{children:o.jsx(Ts,{locator:i.locator})}),o.jsx("td",{className:"omitted-reason prose",children:G1[i.reason]??i.reason}),o.jsx("td",{className:"numeric",children:i.estimatedTokens.toLocaleString()})]},i.chunkId))})]})})]})}function X1(){const[l,i]=N.useState(""),r=eu({mutationFn:c=>ol.search(c)});return o.jsxs(o.Fragment,{children:[o.jsxs("form",{className:"task-form",onSubmit:c=>{c.preventDefault(),l.trim()!==""&&r.mutate({query:l,debug:!0})},children:[o.jsxs("label",{className:"task-field",children:[o.jsx("span",{className:"field-label",children:"Query"}),o.jsx("input",{type:"search",className:"field-control task-input",placeholder:"rollback",value:l,onChange:c=>i(c.target.value)})]}),o.jsx("button",{type:"submit",className:"action action-primary task-submit",disabled:l.trim()==="",children:"Search"})]}),r.isPending&&o.jsx(Tt,{label:"Searching."}),r.isError&&o.jsx(Lt,{...Kt(r.error)}),r.data!==void 0&&o.jsxs("div",{className:"section",children:[o.jsx("p",{className:"section-note prose",children:`${r.data.hits.length} of ${r.data.totalIndexedChunks.toLocaleString()} indexed chunks. Relevance orders results and is not a measure of correctness or confidence.`}),r.variables!==void 0&&o.jsx("div",{className:"search-equivalents",children:o.jsx(ou,{forms:s1(r.variables,hi())})}),r.data.hits.length===0?o.jsx(kl,{title:"No chunk matches those terms."}):o.jsx("ul",{className:"items",children:r.data.hits.map(c=>o.jsxs("li",{className:"item",children:[o.jsxs("div",{className:"item-head",children:[o.jsx(Ts,{locator:c.locator}),o.jsx(Ca,{tone:"idle",children:c.status})]}),o.jsx("p",{className:"item-text prose",children:c.excerpt}),o.jsx(K1,{score:c.score,components:c.scoreComponents})]},c.chunkId))})]})]})}function K1({score:l,components:i}){const r=Object.entries(i??{}).filter(([c])=>c!=="lexicalRaw");return o.jsxs("details",{className:"score",children:[o.jsxs("summary",{className:"score-summary",children:[`relevance ${l.toFixed(4)}`,o.jsx("span",{className:"score-hint",children:" ranking heuristic, not a truth score"})]}),r.length>0&&o.jsx("dl",{className:"score-components",children:r.map(([c,f])=>o.jsxs("div",{className:"score-row",children:[o.jsx("dt",{children:c}),o.jsx("dd",{children:f.toFixed(4)})]},c))})]})}const sv="Every file this build indexed, and every file it left out, with the reason.";function V1(){const[l,i]=N.useState("indexed"),[r,c]=N.useState(""),f=$o("artifact"),d=$o("lines"),[m,p]=N.useState(f);N.useEffect(()=>{f!==null&&(i("indexed"),p(f))},[f]);const y=Rt({queryKey:["sources"],queryFn:sy}),v=Rt({queryKey:fy,queryFn:dy,select:H=>({discovered:H.groups.flatMap(P=>P.warnings.map(F=>({...F,class:P.class}))),byRule:H.exclusions,byRuleCount:H.excludedByRule})}),b=y.data?.artifacts??[],x=N.useMemo(()=>{const H=r.trim().toLowerCase();return H===""?b:b.filter(P=>P.displayPath.toLowerCase().includes(H)||P.status.toLowerCase()===H)},[b,r]),E=b.find(H=>H.artifactId===m)??null;if(y.isPending)return o.jsx(Tt,{label:"Reading the artifact list."});if(y.isError)return o.jsxs("section",{children:[o.jsx(va,{title:"Sources",intro:sv}),o.jsx(Lt,{...Kt(y.error)})]});const M=v.data?.discovered??[],L=v.data?.byRule??null,B=M.length+(v.data?.byRuleCount??0);return o.jsxs("section",{children:[o.jsx(va,{title:"Sources",intro:sv}),o.jsxs("div",{className:"sources-toolbar",children:[o.jsxs("fieldset",{className:"view-switch",children:[o.jsx("legend",{className:"visually-hidden",children:"Which files to show"}),o.jsxs("button",{type:"button",className:l==="indexed"?"view-option view-option-active":"view-option","aria-pressed":l==="indexed",onClick:()=>i("indexed"),children:["indexed ",o.jsx("span",{className:"view-count",children:b.length})]}),o.jsxs("button",{type:"button",className:l==="excluded"?"view-option view-option-active":"view-option","aria-pressed":l==="excluded",onClick:()=>i("excluded"),children:["excluded ",o.jsx("span",{className:"view-count",children:B})]})]}),l==="indexed"&&o.jsxs("label",{className:"filter",children:[o.jsx("span",{className:"visually-hidden",children:"Filter by path or status"}),o.jsx("input",{type:"search",className:"field-control filter-input",placeholder:"Filter by path or status",value:r,onChange:H=>c(H.target.value)})]})]}),l==="excluded"?o.jsx(F1,{entries:M,byRule:L,loading:v.isPending,isError:v.isError}):o.jsxs("div",{className:"sources-split",children:[o.jsx(Z1,{artifacts:x,selected:m,onSelect:p,total:b.length}),E===null?o.jsx("p",{className:"detail-hint prose",children:"Choose a file to see its parser, size, node count and content hash."}):o.jsx($1,{artifact:E})]}),l==="indexed"&&E!==null&&o.jsx(ej,{artifact:E,range:f===E.artifactId?I1(d):null},E.artifactId)]})}function Z1({artifacts:l,selected:i,onSelect:r,total:c}){return l.length===0?o.jsx(kl,{title:c===0?"This build indexed no files.":"No file matches that filter.",children:c===0&&o.jsx("p",{children:"Check the exclusions, which list every file and the reason it was skipped."})}):o.jsx("div",{className:"table-frame table-scroll",children:o.jsxs("table",{className:"data-table artifacts",children:[o.jsx("caption",{className:"visually-hidden",children:`${l.length} of ${c} indexed files`}),o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:"path"}),o.jsx("th",{scope:"col",children:"status"}),o.jsx("th",{scope:"col",className:"numeric",children:"authority"}),o.jsx("th",{scope:"col",className:"numeric",children:"chunks"})]})}),o.jsx("tbody",{children:l.map(f=>o.jsxs("tr",{className:f.artifactId===i?"artifact-row artifact-row-selected":"artifact-row",children:[o.jsx("td",{children:o.jsx("button",{type:"button",className:"artifact-path",onClick:()=>r(f.artifactId),children:f.displayPath})}),o.jsx("td",{children:o.jsx(Ca,{tone:a1(f.status),children:f.status})}),o.jsx("td",{className:"numeric",children:f.authority}),o.jsx("td",{className:"numeric",children:f.chunkCount.toLocaleString()})]},f.artifactId))})]})})}function $1({artifact:l}){return o.jsxs("aside",{className:"artifact-detail","aria-label":`Details for ${l.displayPath}`,children:[o.jsx("h2",{className:"detail-title",children:l.displayPath.split("/").pop()}),o.jsx(Ts,{locator:{relativePath:l.displayPath,artifactId:l.artifactId},link:!1}),o.jsxs(gn,{children:[l.title!==null&&o.jsx(Te,{label:"Title",mono:!1,children:l.title}),o.jsx(Te,{label:"Media type",children:l.mediaType}),o.jsx(Te,{label:"Parser",children:l.parserId}),o.jsx(Te,{label:"Size",children:P1(l.byteSize)}),o.jsx(Te,{label:"Nodes",children:l.nodeCount.toLocaleString()}),o.jsx(Te,{label:"Chunks",children:l.chunkCount.toLocaleString()}),o.jsx(Te,{label:"Status",children:l.status}),o.jsx(Te,{label:"Authority",children:String(l.authority)}),o.jsx(Te,{label:"Content",children:l.objectHash.slice(0,16)})]})]})}function F1({entries:l,byRule:i,loading:r,isError:c}){return r?o.jsx(Tt,{label:"Reading exclusions."}):c?o.jsx(kl,{title:"This server does not report what was left out of the build."}):l.length===0&&(i===null||i.length===0)?o.jsx(kl,{title:i===null?"Nothing was discovered and skipped. This build predates the record of what ignore rules removed.":"Nothing was excluded. Every file in scope is in this build."}):o.jsxs(o.Fragment,{children:[i!==null&&i.length>0&&o.jsx("div",{className:"table-frame table-scroll excluded-block",children:o.jsxs("table",{className:"data-table artifacts",children:[o.jsx("caption",{className:"excluded-caption prose",children:"Removed by an ignore rule before anything was read. Grouped by the rule, because one line of configuration is one decision however many files it covers."}),o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:"rule"}),o.jsx("th",{scope:"col",children:"from"}),o.jsx("th",{scope:"col",className:"numeric",children:"paths"}),o.jsx("th",{scope:"col",children:"for example"})]})}),o.jsx("tbody",{children:i.map(f=>o.jsxs("tr",{className:"artifact-row",children:[o.jsx("td",{className:"excluded-path",children:f.pattern}),o.jsx("td",{className:"excluded-source",children:f.source}),o.jsx("td",{className:"numeric",children:f.count.toLocaleString()}),o.jsx("td",{className:"excluded-sample",children:o.jsxs("ul",{className:"sample-list",children:[W1(f).map(d=>o.jsx("li",{children:d},d)),f.count>f.sample.length&&o.jsx("li",{className:"prose",children:`and ${(f.count-f.sample.length).toLocaleString()} more`})]})})]},`${f.source}-${f.pattern}`))})]})}),i===null&&o.jsx("p",{className:"excluded-caption prose",children:"This build predates the record of what ignore rules removed, so only files that were read and skipped are listed. Build again to record both."}),l.length>0&&o.jsx("div",{className:"table-frame table-scroll excluded-block",children:o.jsxs("table",{className:"data-table artifacts",children:[o.jsx("caption",{className:"excluded-caption prose",children:"Found by the walk and not indexed, each with the reason it was skipped."}),o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:"path"}),o.jsx("th",{scope:"col",children:"reason"})]})}),o.jsx("tbody",{children:l.map(f=>o.jsxs("tr",{className:"artifact-row",children:[o.jsx("td",{className:"excluded-path",children:f.path??"(no path)"}),o.jsx("td",{children:o.jsx(Rs,{lead:f.class,leadClassName:"excluded-class",className:"excluded-message prose",children:J1(f)})})]},`${f.code}-${f.path??""}-${f.message}`))})]})})]})}function J1(l){if(l.path===void 0||!l.message.startsWith(l.path))return l.message;const i=l.message.slice(l.path.length).trimStart();return i.charAt(0).toUpperCase()+i.slice(1)}function P1(l){return l<1024?`${l} B`:l<1024*1024?`${Math.round(l/102.4)/10} kB`:`${Math.round(l/(1024*104.86))/10} MB`}function W1(l){const i=l.pattern.replace(/\/$/,"");return l.sample.filter(r=>r.replace(/\/$/,"")!==i)}function I1(l){const i=/^(\d+)-(\d+)$/.exec(l??"");if(i===null)return null;const r=Number(i[1]),c=Number(i[2]);return r>=1&&c>=r?{start:r,end:c}:null}function ej({artifact:l,range:i}){const r=Rt({queryKey:["source",l.artifactId],queryFn:async({signal:m})=>{const p=await fetch(`/v1/sources/${encodeURIComponent(l.artifactId)}`,{signal:m}),y=await p.json();if(!p.ok)throw y;if(typeof y.text!="string")throw new Error("This server cannot read a source.");return{text:y.text,truncated:y.truncated===!0}},staleTime:Number.POSITIVE_INFINITY}),c=N.useRef(null),f=N.useRef(null);N.useEffect(()=>{if(i===null||r.data===void 0)return;f.current?.scrollIntoView?.({behavior:"smooth",block:"start"});const m=c.current?.querySelector(`[data-line="${i.start}"]`);m!=null&&c.current!==null&&(c.current.scrollTop=Math.max(m.offsetTop-48,0))},[i,r.data]);const d=r.data?.text.split(`
63
+ `)??[];return o.jsxs("section",{className:"reader",ref:f,"aria-label":`Stored text of ${l.displayPath}`,children:[o.jsxs("div",{className:"reader-head",children:[o.jsx("h2",{className:"reader-title",children:"Stored text"}),o.jsx("p",{className:"reader-note prose",children:i===null?"Exactly what this build holds for the file, which is what a model reads.":`Lines ${i.start}-${i.end} are the cited passage.`})]}),r.isPending?o.jsx(Tt,{label:"Reading the stored text."}):r.isError?o.jsx(Lt,{...Kt(r.error)}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"reader-frame",ref:c,tabIndex:0,children:o.jsx("pre",{className:"reader-text",children:d.map((m,p)=>{const y=p+1,v=i!==null&&y>=i.start&&y<=i.end;return o.jsxs("span",{"data-line":y,className:v?"reader-line reader-line-marked":"reader-line",children:[o.jsx("span",{className:"reader-number","aria-hidden":"true",children:y}),o.jsx("span",{className:"reader-content",children:`${m}
64
+ `})]},y)})})}),r.data.truncated&&o.jsx("p",{className:"reader-note prose",children:"Truncated at the read limit, exactly as a model receives it. Read a line range to see the rest."}),o.jsx(ou,{forms:u1(l.artifactId,i,hi()),label:"Read it anywhere"})]})]})}function tj(){const l=$o("table"),[i,r]=N.useState(l);N.useEffect(()=>{l!==null&&r(l)},[l]);const c=Rt({queryKey:["tables"],queryFn:({signal:p})=>ol.listTables(p)}),f=N.useMemo(()=>c.data?.tables??[],[c.data]),d=i??f[0]?.tableId??null,m=p=>o.jsxs(o.Fragment,{children:[o.jsx(va,{title:"Tables",intro:"Typed tables imported from CSV and spreadsheet sources, with a read-only SQL console."}),p]});return c.isPending?m(o.jsx(Tt,{label:"Reading the table catalog"})):c.isError?m(o.jsx(Lt,{...Kt(c.error)})):f.length===0?m(o.jsx(kl,{title:"This build contains no tables.",children:o.jsxs("p",{children:["CSV and spreadsheet files become typed tables; other formats become text. Add one and run"," ",o.jsx("code",{children:"lorepack build"}),"."]})})):m(o.jsxs("section",{className:"tables","aria-label":"Typed tables",children:[o.jsxs("nav",{className:"tables-list","aria-label":"Tables in this build",children:[o.jsx("p",{className:"tables-list-heading",children:`${f.length} ${f.length===1?"table":"tables"}`}),o.jsx("ul",{children:f.map(p=>o.jsx("li",{children:o.jsx("button",{type:"button",className:p.tableId===d?"tables-item tables-item-on":"tables-item","aria-current":p.tableId===d,onClick:()=>r(p.tableId),children:p.name})},p.tableId))})]}),d===null?null:o.jsx(aj,{tableId:d})]}))}function aj({tableId:l}){const i=Rt({queryKey:["table",l],queryFn:({signal:f})=>ol.describeTable(l,f)});if(i.isPending)return o.jsx(Tt,{label:"Reading the table"});if(i.isError)return o.jsx(Lt,{...Kt(i.error)});const r=i.data,c=r.columns;return o.jsxs("div",{className:"tables-detail",children:[o.jsxs("div",{className:"panel tables-summary",children:[o.jsx("h2",{className:"tables-title",children:r.name}),o.jsxs(gn,{children:[o.jsx(Te,{label:"Rows",children:r.rowCount.toLocaleString("en-US")}),o.jsx(Te,{label:"Columns",children:c.length}),o.jsx(Te,{label:"SQL name",children:r.sqlName}),o.jsx(Te,{label:"Source",children:o.jsx(Ts,{locator:r.locator})})]})]}),o.jsx("h3",{className:"tables-heading",children:"Schema"}),o.jsx("div",{className:"table-frame table-scroll",children:o.jsxs("table",{className:"data-table tables-schema","aria-label":`${r.name} schema`,children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:"column"}),o.jsx("th",{scope:"col",children:"sql name"}),o.jsx("th",{scope:"col",children:"type"}),o.jsx("th",{scope:"col",children:"nulls"}),o.jsx("th",{scope:"col",children:"distinct"}),o.jsx("th",{scope:"col",children:"range"})]})}),o.jsx("tbody",{children:c.map(f=>o.jsxs("tr",{children:[o.jsx("th",{scope:"row",className:"tables-column-name",children:o.jsx(Rs,{lead:f.name,children:f.nullable?o.jsx(Ca,{tone:"idle",children:"nullable"}):o.jsx(Ca,{tone:"idle",children:"required"})})}),o.jsx("td",{className:"tables-sql-name",children:f.sqlName}),o.jsx("td",{children:f.type}),o.jsx("td",{children:f.statistics.nullCount.toLocaleString("en-US")}),o.jsxs("td",{children:[f.statistics.distinctIsExact?"":"at least ",f.statistics.distinctEstimate.toLocaleString("en-US")]}),o.jsx("td",{className:"tables-range",children:lj(f.statistics)})]},f.sqlName))})]})}),o.jsx("h3",{className:"tables-heading",children:"First rows"}),o.jsx("p",{className:"tables-note prose",children:"A sample of the stored rows, to show the shape. Use the console below to ask anything else."}),o.jsx(vy,{label:`${r.name} sample rows`,columns:c.map(f=>f.name),rows:r.sample}),o.jsx(nj,{tableId:l,sqlName:r.sqlName,columns:c.map(f=>f.sqlName)})]})}function lj(l){return l.min===void 0?"":`${String(l.min)} .. ${String(l.max)}`}function nj({tableId:l,sqlName:i,columns:r}){const c=N.useMemo(()=>`SELECT ${r.join(", ")}
65
+ FROM ${i}
66
+ LIMIT 20`,[r,i]),[f,d]=N.useState(c),[m,p]=N.useState(null);N.useEffect(()=>{d(c),p(null)},[c]);const y=Rt({queryKey:["table-query",l,m],queryFn:({signal:v})=>ol.queryTable(l,m,{},v),enabled:m!==null,retry:!1});return o.jsxs("section",{className:"console","aria-label":"Query console",children:[o.jsx("h3",{className:"tables-heading",children:"Console"}),o.jsxs("p",{className:"tables-note prose",children:["One read-only ",o.jsx("code",{children:"SELECT"}),", over this table, through the same validator and the same limits as the model-facing tool. It cannot write, and it cannot read anything else."]}),o.jsxs("form",{className:"console-form",onSubmit:v=>{v.preventDefault(),p(f)},children:[o.jsx("label",{className:"console-label",htmlFor:"console-sql",children:"SQL"}),o.jsx("textarea",{id:"console-sql",className:"field-control console-input",value:f,spellCheck:!1,rows:4,onChange:v=>d(v.target.value)}),o.jsxs("div",{className:"console-actions",children:[o.jsx("button",{type:"submit",className:"action action-primary console-run",children:"Run query"}),o.jsx("button",{type:"button",className:"action console-reset",onClick:()=>{d(c)},children:"Reset"})]})]}),m===null?null:o.jsx(ij,{query:y}),m===null?null:o.jsx(ou,{forms:r1(l,m,hi())})]})}function ij({query:l}){if(l.isPending)return o.jsx(Tt,{label:"Running the query"});if(l.isError){const r=Kt(l.error);return o.jsx(Lt,{...r})}const i=l.data;return i===void 0?o.jsx(Tt,{label:"Running the query"}):o.jsxs("div",{className:"console-result",children:[o.jsxs("p",{className:"console-count",role:"status",children:[i.rows.length===0?"No rows.":`${i.rows.length.toLocaleString("en-US")} ${i.rows.length===1?"row":"rows"}.`,i.truncated?" Truncated at the row limit, so there are more.":""]}),o.jsx(vy,{label:"Query result",columns:i.columns,rows:i.rows})]})}function vy({label:l,columns:i,rows:r}){return r.length===0?o.jsx("p",{className:"tables-note prose",children:"No rows."}):o.jsx("div",{className:"table-frame table-scroll",children:o.jsxs("table",{className:"data-table tables-grid","aria-label":l,children:[o.jsx("thead",{children:o.jsx("tr",{children:i.map(c=>o.jsx("th",{scope:"col",children:c},c))})}),o.jsx("tbody",{children:r.map((c,f)=>o.jsx("tr",{children:i.map(d=>o.jsx("td",{className:rj(c[d]),children:sj(c[d])},d))},f))})]})})}function sj(l){return l==null?"null":typeof l=="boolean"?l?"true":"false":String(l)}function rj(l){return l==null?"cell cell-null":typeof l=="number"?"cell cell-number":"cell"}const yy={activate:{imperative:"Activate",past:"Activated"},rollback:{imperative:"Roll back to",past:"Rolled back to"},pack:{imperative:"Pack",past:"Packed"}},rv="Every immutable build of this project. Compare any two, activate one, roll back, or pack one into an archive.";function uj(){const l=af(),[i,r]=N.useState(null),[c,f]=N.useState(null),[d,m]=N.useState(null),p=Rt({queryKey:["builds"],queryFn:async({signal:M})=>{const L=await fetch("/v1/builds",{signal:M});if(!L.ok)throw new Error("This server does not manage builds.");return await L.json()}}),y=eu({mutationFn:async M=>{const L=await fetch(vj(M),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(yj(M))}),B=await L.json();if(!L.ok)throw B;return{action:M,result:B}},onSuccess:async({action:M,result:L})=>{r(null),f(gj(M,L)),await l.invalidateQueries()}});if(p.isPending)return o.jsx(Tt,{label:"Reading build history."});if(p.isError)return o.jsxs("section",{children:[o.jsx(va,{title:"Versions",intro:rv}),o.jsx(Lt,{...Kt(p.error)})]});const v=p.data?.builds??[],b=p.data?.activeBuildId??null,x=pj(v,b),E=M=>{f(null),r(M)};return o.jsxs("section",{children:[o.jsx(va,{title:"Versions",intro:rv,actions:x===null?void 0:o.jsx("button",{type:"button",className:"action",disabled:y.isPending,onClick:()=>E({kind:"rollback",build:x}),children:"Roll back"})}),c!==null&&o.jsx("p",{className:"outcome",role:"status",children:c}),y.isError&&o.jsx(Lt,{...Kt(y.error)}),v.length===0?o.jsx(kl,{title:"This project has no builds yet.",children:o.jsx("p",{children:"Run a build, and every version of it appears here."})}):o.jsxs(o.Fragment,{children:[o.jsx(cj,{builds:v,busy:y.isPending,onAct:E,onCompare:M=>{r(null),m({from:M,to:b??v[0]?.buildId??M})}}),x!==null&&o.jsx("p",{className:"rollback-line prose",children:`Roll back returns to the previous verified build, ${ta(x)}. It is a pointer change, so nothing is recompiled and the current build stays exactly where it is.`})]}),i!==null&&o.jsx(oj,{pending:i,active:b,busy:y.isPending,onCancel:()=>r(null),onConfirm:()=>y.mutate(i)}),v.length>1&&i===null&&o.jsx(dj,{builds:v,selection:d,onSelect:m,active:b})]})}function cj({builds:l,busy:i,onAct:r,onCompare:c}){return o.jsx("div",{className:"table-frame table-scroll",children:o.jsxs("table",{className:"data-table builds",children:[o.jsx("caption",{className:"visually-hidden",children:"Every build in this project, newest first"}),o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:"build"}),o.jsx("th",{scope:"col",children:"created"}),o.jsx("th",{scope:"col",children:"state"}),o.jsx("th",{scope:"col",className:"numeric",children:"artifacts"}),o.jsx("th",{scope:"col",className:"numeric",children:"chunks"}),o.jsx("th",{scope:"col",children:"capabilities"}),o.jsx("th",{scope:"col",className:"build-deployment",children:"deployment"}),o.jsx("th",{scope:"col",className:"build-actions-head",children:o.jsx("span",{className:"visually-hidden",children:"actions"})})]})}),o.jsx("tbody",{children:l.map(f=>o.jsxs("tr",{className:f.active?"build-row build-row-active":"build-row",children:[o.jsxs("th",{scope:"row",className:"build-id",children:[f.active&&o.jsx("span",{className:"active-marker",children:"active"}),o.jsx("span",{title:f.buildId,children:ta(f.buildId)})]}),o.jsx("td",{className:"build-created",children:bj(f.createdAt)}),o.jsx("td",{children:o.jsx(Ca,{tone:mj(f.state),children:f.state})}),o.jsx("td",{className:"numeric",children:f.counts.artifacts.toLocaleString()}),o.jsx("td",{className:"numeric",children:f.counts.chunks.toLocaleString()}),o.jsx("td",{className:"build-capabilities",children:f.capabilities===null?"unknown":f.capabilities.join(" ")}),o.jsx("td",{className:"build-deployment",children:"local only"}),o.jsxs("td",{className:"build-actions",children:[o.jsx("button",{type:"button",className:"action action-small",onClick:()=>c(f.buildId),"aria-label":`Compare ${ta(f.buildId)}`,children:"Compare"}),!f.active&&Jo(f.state)&&o.jsx("button",{type:"button",className:"action action-small",disabled:i,"aria-label":`Activate ${ta(f.buildId)}`,onClick:()=>r({kind:"activate",build:f.buildId}),children:"Activate"}),Jo(f.state)&&o.jsx("button",{type:"button",className:"action action-small",disabled:i,"aria-label":`Pack ${ta(f.buildId)}`,onClick:()=>r({kind:"pack",build:f.buildId}),children:"Pack"})]})]},f.buildId))})]})})}function oj({pending:l,active:i,busy:r,onCancel:c,onConfirm:f}){const d=N.useRef(null);N.useEffect(()=>{d.current?.focus()},[]);const p=`${yy[l.kind].imperative} ${ta(l.build)}`;return o.jsxs("section",{className:"confirm","aria-labelledby":"confirm-heading",onKeyDown:y=>{y.key==="Escape"&&c()},children:[o.jsx("h2",{className:"confirm-heading",id:"confirm-heading",ref:d,tabIndex:-1,children:p}),l.kind==="pack"?o.jsxs("p",{className:"prose confirm-plan",children:["Writes a ",o.jsx("code",{children:".lorepack"})," archive of this build into the project root. Nothing about the build changes, and the archive is an ordinary ZIP that opens without Lorepack."]}):o.jsx(fj,{from:i,to:l.build}),o.jsxs("div",{className:"confirm-actions",children:[o.jsx("button",{type:"button",className:"action action-primary",disabled:r,onClick:f,children:p}),o.jsx("button",{type:"button",className:"action",disabled:r,onClick:c,children:"Cancel"})]})]})}function fj({from:l,to:i}){const r=gy(l??"",i,l!==null&&l!==i);return l===null?o.jsx("p",{className:"prose confirm-plan",children:"No build is active, so this one becomes the first."}):o.jsxs("div",{className:"confirm-plan",children:[o.jsx("p",{className:"prose",children:`Serving moves from ${ta(l)} to ${ta(i)}. Nothing is recompiled, and ${ta(l)} stays exactly where it is.`}),r.isPending&&l!==i&&o.jsx(Tt,{label:"Comparing the two builds."}),r.isError&&o.jsx(Lt,{...Kt(r.error)}),r.data!==void 0&&o.jsx(by,{diff:r.data})]})}function dj({builds:l,selection:i,onSelect:r,active:c}){const f=i?.to??c??l[0]?.buildId??"",d=i?.from??l.find(p=>p.buildId!==f)?.buildId??l[0]?.buildId??"",m=gy(d,f,d!==""&&f!=="");return o.jsxs("section",{className:"compare",children:[o.jsx("h2",{className:"section-heading",children:"Compare"}),o.jsxs("div",{className:"compare-controls",children:[o.jsxs("label",{className:"compare-field",children:[o.jsx("span",{children:"from"}),o.jsx("select",{className:"field-control",value:d,onChange:p=>r({from:p.target.value,to:f}),children:l.map(p=>o.jsx("option",{value:p.buildId,children:ta(p.buildId)},p.buildId))})]}),o.jsxs("label",{className:"compare-field",children:[o.jsx("span",{children:"to"}),o.jsx("select",{className:"field-control",value:f,onChange:p=>r({from:d,to:p.target.value}),children:l.map(p=>o.jsx("option",{value:p.buildId,children:ta(p.buildId)},p.buildId))})]})]}),m.isPending&&o.jsx(Tt,{label:"Comparing."}),m.isError&&o.jsx(Lt,{...Kt(m.error)}),m.data!==void 0&&o.jsx(by,{diff:m.data})]})}function gy(l,i,r){return Rt({queryKey:["diff",l,i],enabled:r,queryFn:async({signal:c})=>{const f=await fetch(`/v1/builds/${encodeURIComponent(l)}/diff/${encodeURIComponent(i)}`,{signal:c}),d=await f.json();if(!f.ok)throw d;return d}})}function by({diff:l}){return l.identical?o.jsxs("div",{className:"diff",children:[l.incompatibilities.length>0&&o.jsx(uv,{diff:l}),o.jsx("p",{className:"diff-identical prose",children:"No differences. These two builds compiled to the same content."})]}):o.jsxs("div",{className:"diff",children:[l.incompatibilities.length>0&&o.jsx(uv,{diff:l}),o.jsx(hj,{diff:l})]})}function uv({diff:l}){return o.jsxs("div",{className:"diff-incompatible",children:[o.jsx("h3",{className:"diff-heading",children:"Incompatible builds"}),o.jsx("ul",{className:"diff-list",children:l.incompatibilities.map(i=>o.jsxs("li",{className:"diff-changed",children:[o.jsx("span",{className:"diff-marker",children:"~"}),o.jsx("span",{children:`${i.field} ${i.from} -> ${i.to}`})]},i.field))}),o.jsx("p",{className:"prose diff-note",children:"Record-level comparison across this change may mislead."})]})}function hj({diff:l}){return o.jsxs(o.Fragment,{children:[o.jsxs("section",{className:"diff-section",children:[o.jsx("h3",{className:"diff-heading",children:"Artifacts"}),l.artifacts.changes.length===0?o.jsx("p",{className:"diff-none",children:"none"}):o.jsx("ul",{className:"diff-list",children:l.artifacts.changes.map(i=>o.jsxs("li",{className:`diff-${i.change}`,children:[o.jsx("span",{className:"diff-marker",children:cv[i.change]}),o.jsx("span",{className:"diff-path",children:i.path}),i.sameContentAs!==void 0&&o.jsx("span",{className:"diff-note",children:`same content as ${i.sameContentAs}`})]},`${i.change}-${i.path}`))})]}),o.jsxs("section",{className:"diff-section",children:[o.jsx("h3",{className:"diff-heading",children:"Rules"}),l.rules.length===0?o.jsx("p",{className:"diff-none",children:"none"}):o.jsx("ul",{className:"diff-list",children:l.rules.map(i=>o.jsxs("li",{className:"diff-changed",children:[o.jsx("span",{className:"diff-marker",children:"~"}),o.jsx("span",{className:"diff-path",children:i.path}),o.jsx("span",{className:"diff-note",children:`${i.field} ${i.from??"none"} -> ${i.to??"none"}`})]},`${i.path}-${i.field}`))})]}),o.jsxs("section",{className:"diff-section",children:[o.jsx("h3",{className:"diff-heading",children:"Context"}),o.jsxs("ul",{className:"diff-list",children:[o.jsxs("li",{className:"diff-added",children:[o.jsx("span",{className:"diff-marker",children:"+"}),o.jsx("span",{children:Pr(l.chunks.added,"chunk")})]}),o.jsxs("li",{className:"diff-changed",children:[o.jsx("span",{className:"diff-marker",children:"~"}),o.jsx("span",{children:Pr(l.chunks.changed,"chunk")})]}),o.jsxs("li",{className:"diff-removed",children:[o.jsx("span",{className:"diff-marker",children:"-"}),o.jsx("span",{children:Pr(l.chunks.removed,"chunk")})]})]})]}),o.jsxs("section",{className:"diff-section",children:[o.jsx("h3",{className:"diff-heading",children:"Tables"}),l.tables.length===0?o.jsx("p",{className:"diff-none",children:"none"}):o.jsx("ul",{className:"diff-list",children:l.tables.map(i=>o.jsxs("li",{className:"diff-changed",children:[o.jsx("span",{className:"diff-marker",children:"~"}),o.jsx("span",{className:"diff-path",children:i.name}),o.jsxs("span",{className:"diff-note",children:[`rows ${i.rowsBefore??"none"} -> ${i.rowsAfter??"none"}`,i.columnsAdded.length>0&&` columns + ${i.columnsAdded.join(", ")}`,i.columnsRemoved.length>0&&` columns - ${i.columnsRemoved.join(", ")}`]})]},i.tableId))})]}),o.jsxs("section",{className:"diff-section",children:[o.jsx("h3",{className:"diff-heading",children:"Capabilities"}),o.jsx("ul",{className:"diff-list",children:l.capabilities.map(i=>o.jsxs("li",{className:`diff-${i.change}`,children:[o.jsx("span",{className:"diff-marker",children:cv[i.change]}),o.jsx("span",{children:i.capability})]},i.capability))})]})]})}const cv={added:"+",changed:"~",removed:"-",same:"="};function Jo(l){return l==="verified"||l==="active"}function mj(l){return Jo(l)?"ok":l==="failed"?"bad":"warn"}function pj(l,i){return l.filter(c=>c.buildId!==i&&(c.state==="verified"||c.state==="active"))[0]?.buildId??null}function vj(l){return l.kind==="activate"?"/v1/builds/activate":l.kind==="rollback"?"/v1/builds/rollback":"/v1/builds/pack"}function yj(l){return l.kind==="rollback"?{expect:l.build}:{build:l.build}}function gj(l,i){const r=yy[l.kind].past;if(l.kind==="pack")return`${r} ${ta(String(i.buildId))} into ${String(i.archive)}, ${Pr(Number(i.members),"member")} including the checksum index.`;const c=ta(String(i.buildId));return i.changed===!1?`${c} was already active. Nothing changed.`:`${r} ${c}. Generation ${String(i.generation)}.`}function ta(l){return l.length>17?l.slice(0,17):l}function Pr(l,i){return`${l.toLocaleString()} ${i}${l===1?"":"s"}`}function bj(l){const i=new Date(l);return Number.isNaN(i.getTime())?l:i.toLocaleString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}const xj=DS([{path:"/",element:o.jsx(v1,{}),errorElement:o.jsx(on,{}),children:[{index:!0,element:o.jsx(C1,{}),errorElement:o.jsx(on,{})},{path:"sources",element:o.jsx(V1,{}),errorElement:o.jsx(on,{})},{path:"tables",element:o.jsx(tj,{}),errorElement:o.jsx(on,{})},{path:"playground",element:o.jsx(H1,{}),errorElement:o.jsx(on,{})},{path:"versions",element:o.jsx(uj,{}),errorElement:o.jsx(on,{})},{path:"diagnostics",element:o.jsx(S1,{}),errorElement:o.jsx(on,{})}]}]),Sj=new Wb({defaultOptions:{queries:{staleTime:1e3,retry:1,refetchOnWindowFocus:!0}}}),xy=document.getElementById("root");if(xy===null)throw new Error("Studio could not find its mount point.");x0.createRoot(xy).render(o.jsx(N.StrictMode,{children:o.jsx(a0,{client:Sj,children:o.jsx(nS,{router:xj})})}));