@lunora/studio 1.0.0-alpha.375 → 1.0.0-alpha.377

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 (218) hide show
  1. package/dist/index.d.mts +18 -8
  2. package/dist/index.d.ts +18 -8
  3. package/dist/index.mjs +1 -1
  4. package/dist/mount.d.mts +1 -1
  5. package/dist/mount.d.ts +1 -1
  6. package/dist/mount.mjs +1 -1
  7. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -1
  8. package/dist/packem_chunks/ApiTab.mjs +1 -1
  9. package/dist/packem_chunks/AuditPanel.mjs +1 -1
  10. package/dist/packem_chunks/ExportImportPanel.mjs +1 -1
  11. package/dist/packem_chunks/FileBrowser.mjs +1 -1
  12. package/dist/packem_chunks/FunctionRunner.mjs +1 -1
  13. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -1
  14. package/dist/packem_chunks/HealthPanel.mjs +1 -1
  15. package/dist/packem_chunks/InsightsPanel.mjs +1 -1
  16. package/dist/packem_chunks/LogsPanel.mjs +1 -1
  17. package/dist/packem_chunks/MailPanel.mjs +1 -1
  18. package/dist/packem_chunks/MetricsPanel.mjs +1 -1
  19. package/dist/packem_chunks/NotificationsPanel.mjs +1 -1
  20. package/dist/packem_chunks/PitrPanel.mjs +1 -1
  21. package/dist/packem_chunks/SchemaViewer.mjs +1 -1
  22. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -1
  23. package/dist/packem_chunks/SettingsPanel.mjs +1 -1
  24. package/dist/packem_chunks/SqlEditorPanel.mjs +1 -1
  25. package/dist/packem_chunks/TableEditor.mjs +1 -1
  26. package/dist/packem_chunks/agents-panel.mjs +1 -1
  27. package/dist/packem_chunks/ai-usage-panel.mjs +1 -1
  28. package/dist/packem_chunks/assistant-panel.mjs +1 -1
  29. package/dist/packem_chunks/auth-audit-panel.mjs +1 -1
  30. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -1
  31. package/dist/packem_chunks/containers-panel.mjs +1 -1
  32. package/dist/packem_chunks/dashboards-panel.mjs +1 -1
  33. package/dist/packem_chunks/evals-panel.mjs +1 -1
  34. package/dist/packem_chunks/fanout-panel.mjs +1 -1
  35. package/dist/packem_chunks/flags-panel.mjs +1 -1
  36. package/dist/packem_chunks/issues-panel.mjs +1 -1
  37. package/dist/packem_chunks/kv-browser.mjs +1 -1
  38. package/dist/packem_chunks/migrations-route.mjs +1 -1
  39. package/dist/packem_chunks/organizations-panel.mjs +1 -1
  40. package/dist/packem_chunks/payments-panel.mjs +1 -1
  41. package/dist/packem_chunks/permissions-panel.mjs +1 -1
  42. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -1
  43. package/dist/packem_chunks/queues-panel.mjs +1 -1
  44. package/dist/packem_chunks/reactors-panel.mjs +1 -1
  45. package/dist/packem_chunks/rls-panel.mjs +1 -1
  46. package/dist/packem_chunks/schedule-panel.mjs +1 -1
  47. package/dist/packem_chunks/storage-rules-panel.mjs +1 -1
  48. package/dist/packem_chunks/subscriptions-panel.mjs +1 -1
  49. package/dist/packem_chunks/sync-client-panel.mjs +1 -1
  50. package/dist/packem_chunks/traces-panel.mjs +1 -1
  51. package/dist/packem_chunks/users-panel.mjs +1 -1
  52. package/dist/packem_chunks/workflows-panel.mjs +1 -1
  53. package/dist/packem_shared/ADMIN_FUNCTIONS-DAHZ35kM.mjs +1 -0
  54. package/dist/packem_shared/{ApiDocsPanel-xqgxgYCy.mjs → ApiDocsPanel-sEDqUNQq.mjs} +1 -1
  55. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-B9kGlqXE.mjs +1 -0
  56. package/dist/packem_shared/{DataBrowser-BrRWqnCr.mjs → DataBrowser-CkVOu6py.mjs} +1 -1
  57. package/dist/packem_shared/GlobalDataBrowser-l2ECwXCm.mjs +1 -0
  58. package/dist/packem_shared/{HomePanel-CHq9VBrh.mjs → HomePanel-c7as4tvl.mjs} +1 -1
  59. package/dist/packem_shared/{MigrationsPanel-BWGgOwmX.mjs → MigrationsPanel-BQol4Un1.mjs} +1 -1
  60. package/dist/packem_shared/{ScheduledJobs-QCTRdugp.mjs → ScheduledJobs-Du8ZGL7v.mjs} +1 -1
  61. package/dist/packem_shared/{Studio-pDEG4JTx.mjs → Studio-BmbkaUrx.mjs} +1 -1
  62. package/dist/packem_shared/{StudioApp-C4IOJPR6.mjs → StudioApp-CsyDnrg2.mjs} +1 -1
  63. package/dist/packem_shared/{advisor-view-Dj-mZPAq.mjs → advisor-view-gtf_DhUU.mjs} +1 -1
  64. package/dist/packem_shared/{app.d-BXrVLb99.d.mts → app.d-DpxFQ0qO.d.mts} +14 -0
  65. package/dist/packem_shared/{app.d-BXrVLb99.d.ts → app.d-DpxFQ0qO.d.ts} +14 -0
  66. package/dist/packem_shared/{assistant-provider-BQG7QZAu.mjs → assistant-provider-Dw0roZh3.mjs} +1 -1
  67. package/dist/packem_shared/{error-alert-BzZfqmf4.mjs → error-alert-3AR_-s_s.mjs} +1 -1
  68. package/dist/packem_shared/{home-panel-DTWHlX5S.mjs → home-panel-TpxiaHgB.mjs} +1 -1
  69. package/dist/packem_shared/{studio-DE7i2--m.mjs → studio-DZlpp4Vx.mjs} +1 -1
  70. package/dist/packem_shared/{table-list-sidebar-DUnCjFL7.mjs → table-list-sidebar-Bfmg04MD.mjs} +1 -1
  71. package/dist/packem_shared/{use-assistant-rpc-DCC6ph2u.mjs → use-assistant-rpc-AKu8hvPm.mjs} +1 -1
  72. package/dist/standalone/{chunk-RKPVI2PI.js → chunk-22OYIN7Q.js} +1 -1
  73. package/dist/standalone/{chunk-N7EIHD3H.js → chunk-2BCNWFC5.js} +1 -1
  74. package/dist/standalone/{chunk-2MZLFQR5.js → chunk-2BUAJRHS.js} +1 -1
  75. package/dist/standalone/{chunk-J45HAKBU.js → chunk-2KTN53PK.js} +1 -1
  76. package/dist/standalone/chunk-2NUCBQFU.js +1 -0
  77. package/dist/standalone/{chunk-PIOHOROI.js → chunk-2SKEPLDB.js} +1 -1
  78. package/dist/standalone/{chunk-BQS3C5V3.js → chunk-3FVWKQLT.js} +1 -1
  79. package/dist/standalone/{chunk-C4BS3LHQ.js → chunk-3J26FAKO.js} +1 -1
  80. package/dist/standalone/{chunk-XZHTVLDG.js → chunk-446DKR7O.js} +1 -1
  81. package/dist/standalone/{chunk-Z6WEYWT7.js → chunk-44ZHY2EU.js} +1 -1
  82. package/dist/standalone/{chunk-4EPW63HS.js → chunk-4AG356VE.js} +1 -1
  83. package/dist/standalone/{chunk-ZSWW2UGP.js → chunk-4KPATTV6.js} +1 -1
  84. package/dist/standalone/{chunk-XITLHKKR.js → chunk-4RPRUFVA.js} +1 -1
  85. package/dist/standalone/{chunk-HFBSWKJS.js → chunk-4SY2N2RS.js} +1 -1
  86. package/dist/standalone/{chunk-KBYFBEG2.js → chunk-553O7ESU.js} +1 -1
  87. package/dist/standalone/{chunk-JPCVFWR5.js → chunk-5Z6PF6KC.js} +1 -1
  88. package/dist/standalone/{chunk-ILSJ22BK.js → chunk-5ZZO5UEC.js} +1 -1
  89. package/dist/standalone/chunk-6ALD476Y.js +8 -0
  90. package/dist/standalone/{chunk-TDJQ7HQM.js → chunk-6BWAMHRF.js} +1 -1
  91. package/dist/standalone/{chunk-2U6Z7A6C.js → chunk-6ORWM6ZT.js} +1 -1
  92. package/dist/standalone/{chunk-4RGKUS3H.js → chunk-74OCXJGH.js} +1 -1
  93. package/dist/standalone/{chunk-CBACG4XF.js → chunk-7E3RA4X6.js} +1 -1
  94. package/dist/standalone/{chunk-645S7KRU.js → chunk-7VZPHPTH.js} +1 -1
  95. package/dist/standalone/chunk-7WGZSDRS.js +2 -0
  96. package/dist/standalone/{chunk-GWNGVKLG.js → chunk-A6TVTNKO.js} +1 -1
  97. package/dist/standalone/{chunk-6G3E4PJ2.js → chunk-ADABTCDI.js} +1 -1
  98. package/dist/standalone/{chunk-WFXS3YRM.js → chunk-AFIY2ATE.js} +1 -1
  99. package/dist/standalone/{chunk-GXTSE66Z.js → chunk-AFLNQEZ5.js} +1 -1
  100. package/dist/standalone/{chunk-AERXMIND.js → chunk-AKOBXMLE.js} +1 -1
  101. package/dist/standalone/{chunk-MJWIIV2C.js → chunk-AMWPN5JC.js} +1 -1
  102. package/dist/standalone/{chunk-NGGTRLCC.js → chunk-APHDGDQX.js} +1 -1
  103. package/dist/standalone/{chunk-RDS46R5R.js → chunk-BMDQFH65.js} +1 -1
  104. package/dist/standalone/{chunk-7SNL633X.js → chunk-BS77NGL6.js} +1 -1
  105. package/dist/standalone/{chunk-OVEOTKK5.js → chunk-CD6Y4HMA.js} +1 -1
  106. package/dist/standalone/{chunk-HZU4WF4X.js → chunk-CF2MJGHC.js} +1 -1
  107. package/dist/standalone/{chunk-6VOBO5QL.js → chunk-CJJSRDJQ.js} +1 -1
  108. package/dist/standalone/{chunk-QHKR5JW4.js → chunk-COLRWCN5.js} +1 -1
  109. package/dist/standalone/{chunk-F5WJCL3F.js → chunk-CTIZP3XO.js} +1 -1
  110. package/dist/standalone/{chunk-QNY5EEBN.js → chunk-CVPH3ATG.js} +1 -1
  111. package/dist/standalone/{chunk-OSHODLMU.js → chunk-D76SLSGV.js} +1 -1
  112. package/dist/standalone/{chunk-LA76GGAT.js → chunk-D7SKD7RO.js} +1 -1
  113. package/dist/standalone/{chunk-PIQ4A4BZ.js → chunk-DB332GVZ.js} +1 -1
  114. package/dist/standalone/{chunk-OODTH4NA.js → chunk-DBOXAUII.js} +1 -1
  115. package/dist/standalone/{chunk-SKZNH5QQ.js → chunk-DBV2V6OY.js} +1 -1
  116. package/dist/standalone/{chunk-JAAXDIR5.js → chunk-DIZP54PG.js} +1 -1
  117. package/dist/standalone/{chunk-2DT3QG6Q.js → chunk-DRHZZ7IN.js} +1 -1
  118. package/dist/standalone/{chunk-4ADB7TWC.js → chunk-EC3XQQRV.js} +1 -1
  119. package/dist/standalone/{chunk-3D67ZJRW.js → chunk-EDL46BPM.js} +1 -1
  120. package/dist/standalone/{chunk-4PI2OSSP.js → chunk-EOFWXI3T.js} +1 -1
  121. package/dist/standalone/{chunk-LR2FBYCC.js → chunk-EYDMS22X.js} +1 -1
  122. package/dist/standalone/{chunk-B76HLC52.js → chunk-F4KT43QZ.js} +1 -1
  123. package/dist/standalone/chunk-FH4R64SS.js +5 -0
  124. package/dist/standalone/{chunk-IJNP6YSD.js → chunk-GBVYBBIF.js} +1 -1
  125. package/dist/standalone/{chunk-RDS72J4I.js → chunk-GQF53GWD.js} +1 -1
  126. package/dist/standalone/{chunk-FGZ73BFG.js → chunk-GWRKSV2Q.js} +1 -1
  127. package/dist/standalone/{chunk-2EB7FN5S.js → chunk-H6VTIXVB.js} +1 -1
  128. package/dist/standalone/{chunk-RUQTILJN.js → chunk-IAVAD545.js} +1 -1
  129. package/dist/standalone/{chunk-ELUYMLPL.js → chunk-IDK6WH4X.js} +1 -1
  130. package/dist/standalone/{chunk-RHYQB4RH.js → chunk-IEMQNFZ7.js} +1 -1
  131. package/dist/standalone/{chunk-KTK4NDWQ.js → chunk-IQ5CIBXJ.js} +1 -1
  132. package/dist/standalone/{chunk-4B54WP4R.js → chunk-IYN56FBP.js} +1 -1
  133. package/dist/standalone/{chunk-EX2DUBRT.js → chunk-JB5VB7PX.js} +1 -1
  134. package/dist/standalone/{chunk-HCOF7HOM.js → chunk-JNWK5MJC.js} +1 -1
  135. package/dist/standalone/{chunk-FT3BWJVP.js → chunk-JQH5M3FB.js} +1 -1
  136. package/dist/standalone/{chunk-WSG35SRF.js → chunk-JUTXPZQK.js} +1 -1
  137. package/dist/standalone/chunk-K24LZAP2.js +7 -0
  138. package/dist/standalone/{chunk-FWOOA2ZR.js → chunk-K7Z7UTJJ.js} +1 -1
  139. package/dist/standalone/{chunk-6YBEKVUG.js → chunk-KMA6JR2E.js} +1 -1
  140. package/dist/standalone/{chunk-YUVGMKHG.js → chunk-L27FKJTG.js} +1 -1
  141. package/dist/standalone/{chunk-LFKKTGEF.js → chunk-LD6JOIEW.js} +1 -1
  142. package/dist/standalone/{chunk-GH6CI2P2.js → chunk-LIQOSH6R.js} +1 -1
  143. package/dist/standalone/{chunk-UBX5ZPLV.js → chunk-LMCBMC2V.js} +1 -1
  144. package/dist/standalone/chunk-LYVYUTQY.js +1 -0
  145. package/dist/standalone/{chunk-ZCOMJH2I.js → chunk-M5VU6MF5.js} +1 -1
  146. package/dist/standalone/{chunk-ASD6UAND.js → chunk-M7EHYZ6R.js} +1 -1
  147. package/dist/standalone/{chunk-D3DZZHZA.js → chunk-MAZES4KJ.js} +1 -1
  148. package/dist/standalone/{chunk-42RZZFLX.js → chunk-MBA6SBBO.js} +1 -1
  149. package/dist/standalone/chunk-MHZNDDGI.js +1 -0
  150. package/dist/standalone/{chunk-JB3DZ2PJ.js → chunk-MUCEG53A.js} +1 -1
  151. package/dist/standalone/{chunk-R52GVSS2.js → chunk-MWF4AQ5B.js} +1 -1
  152. package/dist/standalone/{chunk-WJA2IGZC.js → chunk-MWMVXHQM.js} +1 -1
  153. package/dist/standalone/{chunk-CAEJQOMU.js → chunk-MXYZQCDR.js} +1 -1
  154. package/dist/standalone/{chunk-2CPMCEHD.js → chunk-N33IYFIX.js} +1 -1
  155. package/dist/standalone/{chunk-IELLWQGA.js → chunk-N6H4WQHD.js} +1 -1
  156. package/dist/standalone/{chunk-QRA7AKYO.js → chunk-N7FOBAV3.js} +1 -1
  157. package/dist/standalone/{chunk-D6CDIHHL.js → chunk-NSG5VFIL.js} +1 -1
  158. package/dist/standalone/{chunk-25WEL5RI.js → chunk-NXNTS5G2.js} +1 -1
  159. package/dist/standalone/{chunk-TW4O2BA5.js → chunk-O5QATFN3.js} +3 -3
  160. package/dist/standalone/{chunk-SUUBCPUD.js → chunk-O6HYP4FT.js} +1 -1
  161. package/dist/standalone/{chunk-6FPV3EK2.js → chunk-ODEIAS3V.js} +1 -1
  162. package/dist/standalone/{chunk-QN66FO5B.js → chunk-OR2CSCVB.js} +1 -1
  163. package/dist/standalone/{chunk-EAPNLM2Q.js → chunk-OVXKPVKS.js} +1 -1
  164. package/dist/standalone/{chunk-D65UVZIA.js → chunk-OWRWDDJT.js} +1 -1
  165. package/dist/standalone/chunk-OYCDWIG2.js +33 -0
  166. package/dist/standalone/{chunk-VUOEJJUH.js → chunk-OZID3UYF.js} +1 -1
  167. package/dist/standalone/{chunk-TUFOWHEF.js → chunk-P37L55FP.js} +1 -1
  168. package/dist/standalone/{chunk-XWVFKYZV.js → chunk-PGK4SNG3.js} +1 -1
  169. package/dist/standalone/{chunk-VDSTHVWZ.js → chunk-PP75AWAZ.js} +1 -1
  170. package/dist/standalone/{chunk-VNH4OBJS.js → chunk-QF743FSL.js} +1 -1
  171. package/dist/standalone/{chunk-52ULLZJX.js → chunk-QH6WAQIT.js} +1 -1
  172. package/dist/standalone/{chunk-ONTGYVAN.js → chunk-QLZGKBOW.js} +1 -1
  173. package/dist/standalone/{chunk-3BQD5ITB.js → chunk-QURAUVUB.js} +1 -1
  174. package/dist/standalone/{chunk-G5REMLEG.js → chunk-QVFWLGGW.js} +1 -1
  175. package/dist/standalone/chunk-R3RIZDUS.js +1 -0
  176. package/dist/standalone/{chunk-4EQAUONF.js → chunk-RNTEWZRJ.js} +1 -1
  177. package/dist/standalone/{chunk-LCIDEYA4.js → chunk-RNVK7QCW.js} +1 -1
  178. package/dist/standalone/{chunk-QMULO5AP.js → chunk-RQFK2LYP.js} +1 -1
  179. package/dist/standalone/{chunk-JMZT3CEW.js → chunk-SCTYLLJT.js} +1 -1
  180. package/dist/standalone/{chunk-O3AZ7JKE.js → chunk-T7UKRA6J.js} +1 -1
  181. package/dist/standalone/{chunk-MTX62MQ7.js → chunk-TKALUM7Y.js} +1 -1
  182. package/dist/standalone/{chunk-CGXIERYO.js → chunk-TLOLN6RV.js} +1 -1
  183. package/dist/standalone/{chunk-FK2S7VR4.js → chunk-UBAPZPI2.js} +1 -1
  184. package/dist/standalone/{chunk-MWYGLPDV.js → chunk-VB3BKQCE.js} +1 -1
  185. package/dist/standalone/{chunk-DDTWGWM4.js → chunk-VH4NT2WJ.js} +1 -1
  186. package/dist/standalone/{chunk-MGFELY5Q.js → chunk-VRAOBE6E.js} +1 -1
  187. package/dist/standalone/{chunk-VXZAS5VS.js → chunk-VSYZL2WH.js} +1 -1
  188. package/dist/standalone/{chunk-S36FVTKK.js → chunk-W7CLOQOU.js} +1 -1
  189. package/dist/standalone/chunk-WUWBRYJG.js +1 -0
  190. package/dist/standalone/{chunk-M4TCBPSY.js → chunk-XMJB5JOF.js} +1 -1
  191. package/dist/standalone/{chunk-HCWB4UDT.js → chunk-XNZ4WUSQ.js} +1 -1
  192. package/dist/standalone/{chunk-DHH7WHXQ.js → chunk-Y5HPCYBO.js} +1 -1
  193. package/dist/standalone/chunk-Y6OVSHPH.js +1 -0
  194. package/dist/standalone/{chunk-6IRGBPDN.js → chunk-YKUO2I5M.js} +1 -1
  195. package/dist/standalone/{chunk-XLYFGUEF.js → chunk-YNCZVYCO.js} +1 -1
  196. package/dist/standalone/chunk-YOUTNV5Y.js +1 -0
  197. package/dist/standalone/{chunk-A2Q3TGIQ.js → chunk-YYJGL32M.js} +1 -1
  198. package/dist/standalone/{chunk-2IOS27FL.js → chunk-ZAWNUXWP.js} +1 -1
  199. package/dist/standalone/{chunk-KYN4A72O.js → chunk-ZIUDJD6M.js} +1 -1
  200. package/dist/standalone/{chunk-HPD2PZP2.js → chunk-ZUVDTKXM.js} +1 -1
  201. package/dist/standalone/studio.js +3 -3
  202. package/package.json +13 -13
  203. package/dist/packem_shared/ADMIN_FUNCTIONS-C6U-ugro.mjs +0 -1
  204. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Py5Yx7rP.mjs +0 -1
  205. package/dist/packem_shared/GlobalDataBrowser-DB1B-WAN.mjs +0 -1
  206. package/dist/standalone/chunk-6A6AELDJ.js +0 -1
  207. package/dist/standalone/chunk-ACWAMBGT.js +0 -1
  208. package/dist/standalone/chunk-BG2CJOVS.js +0 -1
  209. package/dist/standalone/chunk-BKI3JMXQ.js +0 -1
  210. package/dist/standalone/chunk-KGLIQIZU.js +0 -1
  211. package/dist/standalone/chunk-ODLNNVP2.js +0 -7
  212. package/dist/standalone/chunk-PGJOTPWC.js +0 -1
  213. package/dist/standalone/chunk-PUK3H4RN.js +0 -33
  214. package/dist/standalone/chunk-QAOZXPLU.js +0 -1
  215. package/dist/standalone/chunk-RTS5G3ET.js +0 -2
  216. package/dist/standalone/chunk-USVLFLZL.js +0 -5
  217. package/dist/standalone/chunk-Z7ZGAQ5J.js +0 -8
  218. /package/dist/standalone/{chunk-NGVP66OH.js → chunk-QHVUXMRV.js} +0 -0
@@ -1 +1 @@
1
- import{a as S}from"./chunk-FWOOA2ZR.js";import{a as q,b as M,c as A,d as w,e as C,f as E}from"./chunk-VXZAS5VS.js";import{a as L}from"./chunk-OSHODLMU.js";import{B as g,j as v,r as N,s as j}from"./chunk-PUK3H4RN.js";import"./chunk-PDBW6GTJ.js";import{a as I}from"./chunk-GWNGVKLG.js";import{a as H,b as R}from"./chunk-6G3E4PJ2.js";import{a as u,d as x}from"./chunk-5PEAXTYQ.js";var Q=x(I(),1),d=x(H(),1);var a=x(R(),1);var T={volume:"Request volume per function",latency:"Latency p50 / p95 per function",hotShards:"Hot shards"},O=Object.keys(T),P={error:null,loading:!0,rows:null},$=u(s=>Object.keys(s[0]??{}),"B"),U=u(s=>{let e=(0,Q.c)(22),{state:y,title:o}=s,l=g(),{error:t,loading:r,rows:n}=y,c;if(e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==o){let b=n===null?[]:$(n),i;e[6]!==l||e[7]!==o?(i=l(o),e[6]=l,e[7]=o,e[8]=i):i=e[8];let p;e[9]!==i?(p=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i})}),e[9]=i,e[10]=p):p=e[10];let m;e[11]!==r||e[12]!==l?(m=r&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:l("Loading\u2026")}),e[11]=r,e[12]=l,e[13]=m):m=e[13];let h;e[14]!==t||e[15]!==r?(h=!r&&t!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:t}),e[14]=t,e[15]=r,e[16]=h):h=e[16];let f;e[17]!==t||e[18]!==r||e[19]!==n||e[20]!==l?(f=!r&&t===null&&n!==null&&n.length===0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:l("No data points yet.")}),e[17]=t,e[18]=r,e[19]=n,e[20]=l,e[21]=f):f=e[21],c=(0,a.jsxs)(L,{className:"gap-0 py-0","data-testid":`analytics-panel-${o}`,children:[p,m,h,f,!r&&t===null&&n!==null&&n.length>0&&(0,a.jsxs)(q,{children:[(0,a.jsx)(M,{children:(0,a.jsx)(w,{children:b.map(W)})}),(0,a.jsx)(A,{children:n.map((V,B)=>(0,a.jsx)(w,{children:b.map(k=>(0,a.jsx)(E,{className:"font-mono text-xs",children:N(V[k])},k))},B))})]})]}),e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=c}else c=e[5];return c},"V"),G=u(({runQuery:s}={})=>{let e=g(),[y,o]=(0,d.useState)({}),l=(0,d.useCallback)(async t=>{if(s!==void 0)for(let r of O){if(t.cancelled)return;o(n=>({...n,[r]:P}));try{let{rows:n}=await s(r);t.cancelled||o(c=>({...c,[r]:{error:null,loading:!1,rows:n}}))}catch(n){t.cancelled||o(c=>({...c,[r]:{error:v(n),loading:!1,rows:null}}))}}},[s]);return(0,d.useEffect)(()=>{let t={cancelled:!1};return j(l(t)),()=>{t.cancelled=!0}},[l]),s===void 0?(0,a.jsx)(S,{description:e("Analytics usage panels read through your worker, never from the browser. Pass studio.analyticsSqlQuery, a runner that calls an admin-only action running functionUsageQuery(panel) through ctx.analyticsSql, to enable these panels."),icon:(0,a.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"})}),testId:"analytics-not-configured",title:e("Analytics usage panels are not wired up.")}):(0,a.jsx)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:O.map(t=>(0,a.jsx)(U,{state:y[t]??P,title:T[t]},t))})},"X");function W(s){return(0,a.jsx)(C,{children:s},s)}u(W,"$");export{G as AnalyticsPanel};
1
+ import{a as S}from"./chunk-K7Z7UTJJ.js";import{a as q,b as M,c as A,d as w,e as C,f as E}from"./chunk-VSYZL2WH.js";import{a as L}from"./chunk-D76SLSGV.js";import{B as g,j as v,r as N,s as j}from"./chunk-OYCDWIG2.js";import"./chunk-PDBW6GTJ.js";import{a as I}from"./chunk-A6TVTNKO.js";import{a as H,b as R}from"./chunk-ADABTCDI.js";import{a as u,d as x}from"./chunk-5PEAXTYQ.js";var Q=x(I(),1),d=x(H(),1);var a=x(R(),1);var T={volume:"Request volume per function",latency:"Latency p50 / p95 per function",hotShards:"Hot shards"},O=Object.keys(T),P={error:null,loading:!0,rows:null},$=u(s=>Object.keys(s[0]??{}),"B"),U=u(s=>{let e=(0,Q.c)(22),{state:y,title:o}=s,l=g(),{error:t,loading:r,rows:n}=y,c;if(e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==o){let b=n===null?[]:$(n),i;e[6]!==l||e[7]!==o?(i=l(o),e[6]=l,e[7]=o,e[8]=i):i=e[8];let p;e[9]!==i?(p=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i})}),e[9]=i,e[10]=p):p=e[10];let m;e[11]!==r||e[12]!==l?(m=r&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:l("Loading\u2026")}),e[11]=r,e[12]=l,e[13]=m):m=e[13];let h;e[14]!==t||e[15]!==r?(h=!r&&t!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:t}),e[14]=t,e[15]=r,e[16]=h):h=e[16];let f;e[17]!==t||e[18]!==r||e[19]!==n||e[20]!==l?(f=!r&&t===null&&n!==null&&n.length===0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:l("No data points yet.")}),e[17]=t,e[18]=r,e[19]=n,e[20]=l,e[21]=f):f=e[21],c=(0,a.jsxs)(L,{className:"gap-0 py-0","data-testid":`analytics-panel-${o}`,children:[p,m,h,f,!r&&t===null&&n!==null&&n.length>0&&(0,a.jsxs)(q,{children:[(0,a.jsx)(M,{children:(0,a.jsx)(w,{children:b.map(W)})}),(0,a.jsx)(A,{children:n.map((V,B)=>(0,a.jsx)(w,{children:b.map(k=>(0,a.jsx)(E,{className:"font-mono text-xs",children:N(V[k])},k))},B))})]})]}),e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=c}else c=e[5];return c},"V"),G=u(({runQuery:s}={})=>{let e=g(),[y,o]=(0,d.useState)({}),l=(0,d.useCallback)(async t=>{if(s!==void 0)for(let r of O){if(t.cancelled)return;o(n=>({...n,[r]:P}));try{let{rows:n}=await s(r);t.cancelled||o(c=>({...c,[r]:{error:null,loading:!1,rows:n}}))}catch(n){t.cancelled||o(c=>({...c,[r]:{error:v(n),loading:!1,rows:null}}))}}},[s]);return(0,d.useEffect)(()=>{let t={cancelled:!1};return j(l(t)),()=>{t.cancelled=!0}},[l]),s===void 0?(0,a.jsx)(S,{description:e("Analytics usage panels read through your worker, never from the browser. Pass studio.analyticsSqlQuery, a runner that calls an admin-only action running functionUsageQuery(panel) through ctx.analyticsSql, to enable these panels."),icon:(0,a.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"})}),testId:"analytics-not-configured",title:e("Analytics usage panels are not wired up.")}):(0,a.jsx)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:O.map(t=>(0,a.jsx)(U,{state:y[t]??P,title:T[t]},t))})},"X");function W(s){return(0,a.jsx)(C,{children:s},s)}u(W,"$");export{G as AnalyticsPanel};
@@ -1 +1 @@
1
- import{b as Me}from"./chunk-ASD6UAND.js";import{a as ve}from"./chunk-YORPLSI5.js";import{b as ye,c as we}from"./chunk-ONTGYVAN.js";import{a as xe}from"./chunk-WSG35SRF.js";import{a as Ne}from"./chunk-7SNL633X.js";import"./chunk-NGVP66OH.js";import"./chunk-QAOZXPLU.js";import{a as be}from"./chunk-J45HAKBU.js";import{a as fe}from"./chunk-645S7KRU.js";import{b as pe}from"./chunk-3D67ZJRW.js";import"./chunk-ZSWW2UGP.js";import{i as ue}from"./chunk-MWYGLPDV.js";import"./chunk-HFBSWKJS.js";import"./chunk-4EPW63HS.js";import"./chunk-JMZT3CEW.js";import"./chunk-VUOEJJUH.js";import{a as he}from"./chunk-FWOOA2ZR.js";import{b as ce}from"./chunk-M4TCBPSY.js";import"./chunk-YUVGMKHG.js";import{a as ge}from"./chunk-N7EIHD3H.js";import"./chunk-F5WJCL3F.js";import"./chunk-FGZ73BFG.js";import"./chunk-RUQTILJN.js";import"./chunk-4PI2OSSP.js";import{a as ie}from"./chunk-6A6AELDJ.js";import{c as de}from"./chunk-TUFOWHEF.js";import"./chunk-ODLNNVP2.js";import"./chunk-ZPQBVYNN.js";import{B as U,p as me,w as oe,x as te}from"./chunk-PUK3H4RN.js";import"./chunk-PDBW6GTJ.js";import{a as Le}from"./chunk-GWNGVKLG.js";import{a as Ce,b as Te}from"./chunk-6G3E4PJ2.js";import{a as m,d as le}from"./chunk-5PEAXTYQ.js";var O=le(Le(),1),A=le(Ce(),1);var s=le(Te(),1);var Pe=.5,Ie=4,Se=m(n=>Math.min(100,Math.max(0,n)),"ce"),Ke=m((n,e)=>{if(!Number.isFinite(e)||e<=0)return{leftPercent:0,widthPercent:100};let t=Se(n.offsetMs/e*100),a=n.durationMs/e*100,l=Math.max(Pe,Math.min(Se(a),100-t));return{leftPercent:t,widthPercent:l}},"Ce"),De=m((n,e,t=!1)=>{let a=e.trim().toLowerCase(),l=t?n.filter(r=>!r.ok):n;return a===""?[...l]:l.filter(r=>r.rootName.toLowerCase().includes(a)||r.functionPath.toLowerCase().includes(a)||r.traceId.toLowerCase().includes(a)||r.spans.some(o=>o.name.toLowerCase().includes(a)||o.spanId.toLowerCase().includes(a)))},"Ee"),G=m(n=>Number.isFinite(n)?n>0&&n<1?`${n.toFixed(2)}ms`:`${String(Math.round(n))}ms`:"\u2014","q"),Fe=m(n=>!Number.isFinite(n)||n<=0?[]:Array.from({length:Ie},(e,t)=>{let a=(t+1)/Ie;return{label:G(n*a),percent:a*100}}),"Pe"),ke=m(n=>{if(typeof n=="string")return n;try{return JSON.stringify(n,me)}catch{return String(n)}},"ue"),ee=m(n=>{let e=(0,O.c)(7),{label:t,value:a}=n,l;e[0]!==t?(l=(0,s.jsx)("dt",{className:"w-40 shrink-0 text-muted-foreground",children:t}),e[0]=t,e[1]=l):l=e[1];let r;e[2]!==a?(r=(0,s.jsx)("dd",{className:"min-w-0 break-all",children:a}),e[2]=a,e[3]=r):r=e[3];let o;return e[4]!==l||e[5]!==r?(o=(0,s.jsxs)("div",{className:"flex gap-2",children:[l,r]}),e[4]=l,e[5]=r,e[6]=o):o=e[6],o},"Y"),je=m(n=>{let e=(0,O.c)(68),{span:t}=n,a=U(),l,r,o,d,i,u;if(e[0]!==t.attributes||e[1]!==t.durationMs||e[2]!==t.error||e[3]!==t.events||e[4]!==t.kind||e[5]!==t.offsetMs||e[6]!==t.parentSpanId||e[7]!==t.spanId||e[8]!==a){let $=Object.entries(t.attributes??{}),_;e[15]!==t.events?(_=t.events??[],e[15]=t.events,e[16]=_):_=e[16],l=_,r="border-t border-border bg-background/60 px-3 py-2 font-mono text-xs",o="tr-span-detail";let y;e[17]!==a?(y=a("Span ID"),e[17]=a,e[18]=y):y=e[18];let w;e[19]!==t.spanId||e[20]!==y?(w=(0,s.jsx)(ee,{label:y,value:t.spanId}),e[19]=t.spanId,e[20]=y,e[21]=w):w=e[21];let M;e[22]!==a?(M=a("Parent span ID"),e[22]=a,e[23]=M):M=e[23];let h;e[24]!==t.parentSpanId||e[25]!==a?(h=t.parentSpanId===""?a("\u2014 (trace root)"):t.parentSpanId,e[24]=t.parentSpanId,e[25]=a,e[26]=h):h=e[26];let p;e[27]!==h||e[28]!==M?(p=(0,s.jsx)(ee,{label:M,value:h}),e[27]=h,e[28]=M,e[29]=p):p=e[29];let b;e[30]!==a?(b=a("Kind"),e[30]=a,e[31]=b):b=e[31];let C=t.kind??"internal",S;e[32]!==b||e[33]!==C?(S=(0,s.jsx)(ee,{label:b,value:C}),e[32]=b,e[33]=C,e[34]=S):S=e[34];let I;e[35]!==a?(I=a("Started at"),e[35]=a,e[36]=I):I=e[36];let g;e[37]!==t.offsetMs||e[38]!==a?(g=a("+{offset}",{offset:G(t.offsetMs)}),e[37]=t.offsetMs,e[38]=a,e[39]=g):g=e[39];let x;e[40]!==I||e[41]!==g?(x=(0,s.jsx)(ee,{label:I,value:g}),e[40]=I,e[41]=g,e[42]=x):x=e[42];let k;e[43]!==a?(k=a("Duration"),e[43]=a,e[44]=k):k=e[44];let f;e[45]!==t.durationMs?(f=G(t.durationMs),e[45]=t.durationMs,e[46]=f):f=e[46];let N;e[47]!==k||e[48]!==f?(N=(0,s.jsx)(ee,{label:k,value:f}),e[47]=k,e[48]=f,e[49]=N):N=e[49],e[50]!==p||e[51]!==S||e[52]!==x||e[53]!==N||e[54]!==w?(d=(0,s.jsxs)("dl",{className:"flex flex-col gap-1",children:[w,p,S,x,N]}),e[50]=p,e[51]=S,e[52]=x,e[53]=N,e[54]=w,e[55]=d):d=e[55],e[56]!==t.error?(i=t.error!==void 0&&(0,s.jsxs)("div",{className:"mt-2 rounded-md border border-destructive/40 bg-destructive/10 px-2 py-1.5","data-testid":"tr-detail-error",children:[(0,s.jsx)("span",{className:"font-semibold text-destructive",children:t.error.type}),(0,s.jsx)("p",{className:"whitespace-pre-wrap break-all text-destructive",children:t.error.message})]}),e[56]=t.error,e[57]=i):i=e[57],u=$.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-attributes",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Attributes")}),(0,s.jsx)("dl",{className:"flex flex-col gap-1",children:$.map(Ee)})]}),e[0]=t.attributes,e[1]=t.durationMs,e[2]=t.error,e[3]=t.events,e[4]=t.kind,e[5]=t.offsetMs,e[6]=t.parentSpanId,e[7]=t.spanId,e[8]=a,e[9]=l,e[10]=r,e[11]=o,e[12]=d,e[13]=i,e[14]=u}else l=e[9],r=e[10],o=e[11],d=e[12],i=e[13],u=e[14];let c;e[58]!==l||e[59]!==a?(c=l.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-events",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Events")}),(0,s.jsx)("ul",{className:"flex flex-col gap-1",children:l.map(Oe)})]}),e[58]=l,e[59]=a,e[60]=c):c=e[60];let v;return e[61]!==r||e[62]!==o||e[63]!==d||e[64]!==i||e[65]!==u||e[66]!==c?(v=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,i,u,c]}),e[61]=r,e[62]=o,e[63]=d,e[64]=i,e[65]=u,e[66]=c,e[67]=v):v=e[67],v},"Ke");function Ee(n){let[e,t]=n;return(0,s.jsx)(ee,{label:e,value:ke(t)},e)}m(Ee,"Fe");function Ae(n){let[e,t]=n;return`${e}=${ke(t)}`}m(Ae,"Re");function Oe(n){return(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:oe(n.ts)}),(0,s.jsx)(ce,{variant:"secondary",children:n.name}),(0,s.jsx)("span",{className:"min-w-0 break-all text-muted-foreground",children:Object.entries(n.attributes??{}).map(Ae).join(" ")})]},`${n.name}:${String(n.ts)}`)}m(Oe,"Ae");var Be=14,_e="grid grid-cols-[14rem_1fr_4rem_16rem_16rem] items-center gap-2 px-3",We=m(n=>{let e=(0,O.c)(17),{traceDurationMs:t}=n,a,l,r,o,d,i;if(e[0]!==t){i=Symbol.for("react.early_return_sentinel");e:{let v=Fe(t);if(v.length===0){i=null;break e}e[7]===Symbol.for("react.memo_cache_sentinel")?(r=te(_e,"border-b border-border py-1 font-mono text-[10px] text-muted-foreground"),e[7]=r):r=e[7],o="tr-ruler",e[8]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)("span",{}),e[8]=d):d=e[8],a="relative h-3",l=v.map(Je)}e[0]=t,e[1]=a,e[2]=l,e[3]=r,e[4]=o,e[5]=d,e[6]=i}else a=e[1],l=e[2],r=e[3],o=e[4],d=e[5],i=e[6];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;e[9]!==a||e[10]!==l?(u=(0,s.jsx)("span",{className:a,children:l}),e[9]=a,e[10]=l,e[11]=u):u=e[11];let c;return e[12]!==r||e[13]!==o||e[14]!==d||e[15]!==u?(c=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,u]}),e[12]=r,e[13]=o,e[14]=d,e[15]=u,e[16]=c):c=e[16],c},"je"),qe=m(n=>{let e=(0,O.c)(60),{span:t,traceDurationMs:a}=n,l=U(),[r,o]=(0,A.useState)(!1),d;e[0]!==t||e[1]!==a?(d=Ke(t,a),e[0]=t,e[1]=a,e[2]=d):d=e[2];let{leftPercent:i,widthPercent:u}=d,c;e[3]!==t.attributes?(c=ve(t.attributes),e[3]=t.attributes,e[4]=c):c=e[4];let v=c,$=t.depth*Be,_;e[5]!==$?(_={paddingLeft:$},e[5]=$,e[6]=_):_=e[6];let y=_,w=`${String(i)}%`,M=`${String(u)}%`,h;e[7]!==w||e[8]!==M?(h={left:w,width:M},e[7]=w,e[8]=M,e[9]=h):h=e[9];let p=h,b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=m(()=>{o(Ue)},"h"),e[10]=b):b=e[10];let C=b,S=t.depth,I=`tr-span-detail-${t.spanId}`,g;e[11]!==t.durationMs||e[12]!==t.error||e[13]!==t.name||e[14]!==t.offsetMs||e[15]!==l?(g=l("{name}, {duration}, starts {offset} in{failure}",{duration:G(t.durationMs),failure:t.error===void 0?"":l(", failed: {message}",{message:t.error.message}),name:t.name,offset:G(t.offsetMs)}),e[11]=t.durationMs,e[12]=t.error,e[13]=t.name,e[14]=t.offsetMs,e[15]=l,e[16]=g):g=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=te(_e,"w-full border-b border-border py-1.5 text-left font-mono text-xs hover:bg-muted/50"),e[17]=x):x=e[17];let k=`tr-span-toggle-${t.spanId}`,f;e[18]!==t.ok?(f=t.ok?null:(0,s.jsx)("span",{"aria-hidden":"true",className:"mr-1 text-destructive","data-testid":"tr-span-error",children:"\u25CF"}),e[18]=t.ok,e[19]=f):f=e[19];let N;e[20]!==y||e[21]!==t.name||e[22]!==f?(N=(0,s.jsxs)("span",{className:"truncate",style:y,title:t.name,children:[f,t.name]}),e[20]=y,e[21]=t.name,e[22]=f,e[23]=N):N=e[23];let B=t.ok?"bg-primary/70":"bg-destructive",L;e[24]!==B?(L=te("absolute inset-y-0 rounded-sm",B),e[24]=B,e[25]=L):L=e[25];let E;e[26]!==p||e[27]!==i||e[28]!==L||e[29]!==u?(E=(0,s.jsx)("span",{"aria-hidden":"true",className:"relative h-3 overflow-hidden rounded-sm bg-muted",children:(0,s.jsx)("span",{className:L,"data-left":i,"data-testid":"tr-span-bar","data-width":u,style:p})}),e[26]=p,e[27]=i,e[28]=L,e[29]=u,e[30]=E):E=e[30];let W;e[31]!==t.durationMs?(W=G(t.durationMs),e[31]=t.durationMs,e[32]=W):W=e[32];let D;e[33]!==W?(D=(0,s.jsx)("span",{className:"text-right tabular-nums text-muted-foreground",children:W}),e[33]=W,e[34]=D):D=e[34];let q;e[35]!==t.error?(q=t.error===void 0?null:(0,s.jsx)("span",{className:"text-destructive","data-testid":"tr-span-error-message",title:t.error.message,children:`${t.error.type}: ${t.error.message}`}),e[35]=t.error,e[36]=q):q=e[36];let T;e[37]!==q?(T=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:q}),e[37]=q,e[38]=T):T=e[38];let z;e[39]!==v?(z=v===""?null:(0,s.jsx)("span",{"data-testid":"tr-span-attributes",title:v,children:v}),e[39]=v,e[40]=z):z=e[40];let P;e[41]!==z?(P=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:z}),e[41]=z,e[42]=P):P=e[42];let J;e[43]!==r||e[44]!==I||e[45]!==g||e[46]!==k||e[47]!==N||e[48]!==E||e[49]!==D||e[50]!==T||e[51]!==P?(J=(0,s.jsxs)("button",{"aria-controls":I,"aria-expanded":r,"aria-label":g,className:x,"data-testid":k,onClick:C,type:"button",children:[N,E,D,T,P]}),e[43]=r,e[44]=I,e[45]=g,e[46]=k,e[47]=N,e[48]=E,e[49]=D,e[50]=T,e[51]=P,e[52]=J):J=e[52];let F;e[53]!==r||e[54]!==t?(F=r&&(0,s.jsx)("div",{id:`tr-span-detail-${t.spanId}`,children:(0,s.jsx)(je,{span:t})}),e[53]=r,e[54]=t,e[55]=F):F=e[55];let K;return e[56]!==t.depth||e[57]!==J||e[58]!==F?(K=(0,s.jsxs)("li",{"data-depth":S,"data-testid":"tr-span-row",children:[J,F]}),e[56]=t.depth,e[57]=J,e[58]=F,e[59]=K):K=e[59],K},"Be"),ze=m(n=>{let e=(0,O.c)(15),{durationMs:t,spans:a}=n,l=U(),r;e[0]!==t?(r=(0,s.jsx)(We,{traceDurationMs:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==l?(o=l("Trace waterfall"),e[2]=l,e[3]=o):o=e[3];let d;if(e[4]!==t||e[5]!==a){let c;e[7]!==t?(c=m(v=>(0,s.jsx)(qe,{span:v,traceDurationMs:t},v.spanId),"c"),e[7]=t,e[8]=c):c=e[8],d=a.map(c),e[4]=t,e[5]=a,e[6]=d}else d=e[6];let i;e[9]!==o||e[10]!==d?(i=(0,s.jsx)("ul",{"aria-label":o,children:d}),e[9]=o,e[10]=d,e[11]=i):i=e[11];let u;return e[12]!==r||e[13]!==i?(u=(0,s.jsxs)(s.Fragment,{children:[r,i]}),e[12]=r,e[13]=i,e[14]=u):u=e[14],u},"Oe");function Je(n){return(0,s.jsx)("span",{className:te("absolute inset-y-0 border-l border-border/70",n.percent===100?"-translate-x-full pr-1":"pl-1"),style:{left:`${String(n.percent)}%`},children:n.label},n.percent)}m(Je,"We");function Ue(n){return!n}m(Ue,"Ue");var Ge=m(n=>Array.isArray(n?.traces)?n.traces:[],"qe"),He=m(n=>{let e=(0,O.c)(12),{entries:t}=n,a=U(),l;e[0]!==t.length||e[1]!==a?(l=a("Logs ({count})",{count:t.length}),e[0]=t.length,e[1]=a,e[2]=l):l=e[2];let r;e[3]!==l?(r=(0,s.jsx)("p",{className:"mb-1 font-mono text-xs text-muted-foreground",children:l}),e[3]=l,e[4]=r):r=e[4];let o;e[5]!==t?(o=t.map(Ve),e[5]=t,e[6]=o):o=e[6];let d;e[7]!==o?(d=(0,s.jsx)("div",{role:"grid",children:o}),e[7]=o,e[8]=d):d=e[8];let i;return e[9]!==r||e[10]!==d?(i=(0,s.jsxs)("div",{className:"border-t border-border px-3 py-2","data-testid":"tr-logs",children:[r,d]}),e[9]=r,e[10]=d,e[11]=i):i=e[11],i},"ze"),Qe=m(n=>{let e=(0,O.c)(50),{expanded:t,logs:a,onToggle:l,trace:r}=n,o=U(),d;e[0]!==l||e[1]!==r.traceId?(d=m(()=>{l(r.traceId)},"i"),e[0]=l,e[1]=r.traceId,e[2]=d):d=e[2];let i=d,u=`tr-row-${r.traceId}`,c=`tr-waterfall-${r.traceId}`,v=`tr-toggle-${r.traceId}`,$=t?"\u25BE":"\u25B8",_;e[3]!==$?(_=(0,s.jsx)("span",{"aria-hidden":"true",className:"w-3 shrink-0 text-xs text-muted-foreground",children:$}),e[3]=$,e[4]=_):_=e[4];let y;e[5]!==r.rootName?(y=(0,s.jsx)("span",{className:"w-56 shrink-0 truncate text-sm font-medium",title:r.rootName,children:r.rootName}),e[5]=r.rootName,e[6]=y):y=e[6];let w;e[7]!==r.functionPath?(w=(0,s.jsx)("span",{className:"w-48 shrink-0 truncate font-mono text-xs text-muted-foreground",title:r.functionPath,children:r.functionPath}),e[7]=r.functionPath,e[8]=w):w=e[8];let M;e[9]!==r.durationMs?(M=G(r.durationMs),e[9]=r.durationMs,e[10]=M):M=e[10];let h;e[11]!==M?(h=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:M}),e[11]=M,e[12]=h):h=e[12];let p;e[13]!==o||e[14]!==r.spans.length?(p=o("{count} spans",{count:r.spans.length}),e[13]=o,e[14]=r.spans.length,e[15]=p):p=e[15];let b;e[16]!==p?(b=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:p}),e[16]=p,e[17]=b):b=e[17];let C=r.ok?"secondary":"destructive",S;e[18]!==o||e[19]!==r.ok?(S=r.ok?o("ok"):o("error"),e[18]=o,e[19]=r.ok,e[20]=S):S=e[20];let I;e[21]!==C||e[22]!==S?(I=(0,s.jsx)("span",{className:"shrink-0",children:(0,s.jsx)(ce,{variant:C,children:S})}),e[21]=C,e[22]=S,e[23]=I):I=e[23];let g;e[24]!==r.startTs?(g=oe(r.startTs),e[24]=r.startTs,e[25]=g):g=e[25];let x;e[26]!==g?(x=(0,s.jsx)("span",{className:"flex-1 truncate text-right font-mono text-xs tabular-nums text-muted-foreground",children:g}),e[26]=g,e[27]=x):x=e[27];let k;e[28]!==t||e[29]!==i||e[30]!==h||e[31]!==b||e[32]!==I||e[33]!==x||e[34]!==c||e[35]!==v||e[36]!==_||e[37]!==y||e[38]!==w?(k=(0,s.jsxs)("button",{"aria-controls":c,"aria-expanded":t,className:"flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-muted/50","data-testid":v,onClick:i,type:"button",children:[_,y,w,h,b,I,x]}),e[28]=t,e[29]=i,e[30]=h,e[31]=b,e[32]=I,e[33]=x,e[34]=c,e[35]=v,e[36]=_,e[37]=y,e[38]=w,e[39]=k):k=e[39];let f;e[40]!==t||e[41]!==a||e[42]!==r.durationMs||e[43]!==r.spans||e[44]!==r.traceId?(f=t&&(0,s.jsxs)("div",{className:"bg-muted/20","data-testid":`tr-waterfall-${r.traceId}`,id:`tr-waterfall-${r.traceId}`,children:[(0,s.jsx)(ze,{durationMs:r.durationMs,spans:r.spans}),a.length>0&&(0,s.jsx)(He,{entries:a})]}),e[40]=t,e[41]=a,e[42]=r.durationMs,e[43]=r.spans,e[44]=r.traceId,e[45]=f):f=e[45];let N;return e[46]!==k||e[47]!==f||e[48]!==u?(N=(0,s.jsxs)("div",{className:"border-b border-border last:border-b-0","data-testid":u,children:[k,f]}),e[46]=k,e[47]=f,e[48]=u,e[49]=N):N=e[49],N},"Ge"),bt=m(n=>{let e=(0,O.c)(60),{initialShardKey:t}=n,a=U(),[l]=(0,A.useState)(ye),{queryShardKey:r,setShardKey:o,shardKey:d}=be(l?.shardKey!==void 0&&l.shardKey!==""?l.shardKey:t??""),[i,u]=(0,A.useState)(l?.traceId??""),[c,v]=(0,A.useState)(!1),[$,_]=(0,A.useState)(Xe),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0],(0,A.useEffect)(Ye,y);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={},e[1]=w):w=e[1];let M;e[2]!==r?(M={live:!0,shardKey:r},e[2]=r,e[3]=M):M=e[3];let{data:h,error:p,errorSource:b,isLoading:C,liveError:S}=de(ie.getTraces,w,M),I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I={},e[4]=I):I=e[4];let g=$.size>0,x;e[5]!==r||e[6]!==g?(x={enabled:g,live:!0,shardKey:r},e[5]=r,e[6]=g,e[7]=x):x=e[7];let{data:k}=de(ie.getLogs,I,x),f,N;e[8]!==h||e[9]!==r?(f=m(()=>{h!==void 0&&pe(r)},"p"),N=[h,r],e[8]=h,e[9]=r,e[10]=f,e[11]=N):(f=e[10],N=e[11]),(0,A.useEffect)(f,N);let B;if(e[12]!==h||e[13]!==p||e[14]!==b||e[15]!==$||e[16]!==C||e[17]!==S||e[18]!==k?.entries||e[19]!==c||e[20]!==r||e[21]!==i||e[22]!==o||e[23]!==d||e[24]!==a){let L=Ge(h),E=h?.total??L.length,W=E>L.length,D=De(L,i,c),q=Map.groupBy((k?.entries??[]).toReversed(),Ze),T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=m(j=>{u(j.target.value)},"C"),e[26]=T):T=e[26];let z=T,P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=m(j=>{_($e=>{let ne=new Set($e);return ne.has(j)?ne.delete(j):ne.add(j),ne})},"E"),e[27]=P):P=e[27];let J=P,F=p===null&&D.length===0&&!C,K;e[28]!==o||e[29]!==d?(K=(0,s.jsx)(fe,{onChange:o,testId:"tr-shard-input",value:d}),e[28]=o,e[29]=d,e[30]=K):K=e[30];let H;e[31]!==a?(H=a("Search traces"),e[31]=a,e[32]=H):H=e[32];let Q;e[33]!==a?(Q=a("search trace, span, or function"),e[33]=a,e[34]=Q):Q=e[34];let V;e[35]!==i||e[36]!==H||e[37]!==Q?(V=(0,s.jsx)(ue,{"aria-label":H,className:"h-8 w-56","data-testid":"tr-search",onChange:z,placeholder:Q,value:i}),e[35]=i,e[36]=H,e[37]=Q,e[38]=V):V=e[38];let X;e[39]!==c?(X=(0,s.jsx)(xe,{checked:c,"data-testid":"tr-only-errors",id:"tr-only-errors",onCheckedChange:v}),e[39]=c,e[40]=X):X=e[40];let Y;e[41]!==a?(Y=a("Errors only"),e[41]=a,e[42]=Y):Y=e[42];let Z;e[43]!==X||e[44]!==Y?(Z=(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",htmlFor:"tr-only-errors",children:[X,Y]}),e[43]=X,e[44]=Y,e[45]=Z):Z=e[45];let R;e[46]!==S?(R=(0,s.jsx)(Ne,{message:S,prefix:"tr"}),e[46]=S,e[47]=R):R=e[47];let re;e[48]!==K||e[49]!==V||e[50]!==Z||e[51]!==R?(re=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K,V,Z,R]}),e[48]=K,e[49]=V,e[50]=Z,e[51]=R,e[52]=re):re=e[52];let ae;e[53]!==p||e[54]!==b||e[55]!==r?(ae=p!==null&&(0,s.jsx)(ge,{error:b,shardKey:r,testId:"tr-error"}),e[53]=p,e[54]=b,e[55]=r,e[56]=ae):ae=e[56];let se;e[57]!==F||e[58]!==a?(se=F&&(0,s.jsx)(he,{description:a("Traces recorded with ctx.trace show up here as your app handles traffic. The span buffer resets when the shard hibernates."),icon:(0,s.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M4 6h10M7 12h13M10 18h7"})}),testId:"tr-empty",title:a("No traces")}),e[57]=F,e[58]=a,e[59]=se):se=e[59],B=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-traces-panel",children:[re,ae,se,p===null&&W&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"tr-truncated",children:a("Showing the {shown} most recent of {total} traces in the buffer.",{shown:L.length,total:E})}),p===null&&D.length>0&&(0,s.jsx)("div",{"aria-label":a("Recent traces"),className:"overflow-hidden rounded-xl border border-border shadow-xs","data-testid":"tr-list",children:D.map(j=>(0,s.jsx)(Qe,{expanded:$.has(j.traceId),logs:q.get(j.traceId)??[],onToggle:J,trace:j},j.traceId))})]}),e[12]=h,e[13]=p,e[14]=b,e[15]=$,e[16]=C,e[17]=S,e[18]=k?.entries,e[19]=c,e[20]=r,e[21]=i,e[22]=o,e[23]=d,e[24]=a,e[25]=B}else B=e[25];return B},"bt");function Ve(n,e){return(0,s.jsx)("div",{className:"flex items-center border-b border-border py-1 font-mono text-xs last:border-b-0","data-testid":"tr-log-row",role:"row",children:(0,s.jsx)(Me,{entry:n})},`${String(e)}:${String(n.timestamp)}`)}m(Ve,"He");function Xe(){return new Set}m(Xe,"Je");function Ye(){we()}m(Ye,"Qe");function Ze(n){return n.traceId}m(Ze,"Ve");export{bt as default};
1
+ import{b as Me}from"./chunk-M7EHYZ6R.js";import{a as ve}from"./chunk-YORPLSI5.js";import{b as ye,c as we}from"./chunk-QLZGKBOW.js";import{a as xe}from"./chunk-JUTXPZQK.js";import{a as Ne}from"./chunk-BS77NGL6.js";import"./chunk-QHVUXMRV.js";import"./chunk-2NUCBQFU.js";import{a as be}from"./chunk-2KTN53PK.js";import{a as fe}from"./chunk-7VZPHPTH.js";import{b as pe}from"./chunk-EDL46BPM.js";import"./chunk-4KPATTV6.js";import{i as ue}from"./chunk-VB3BKQCE.js";import"./chunk-4SY2N2RS.js";import"./chunk-4AG356VE.js";import"./chunk-SCTYLLJT.js";import"./chunk-OZID3UYF.js";import{a as he}from"./chunk-K7Z7UTJJ.js";import{b as ce}from"./chunk-XMJB5JOF.js";import"./chunk-L27FKJTG.js";import{a as ge}from"./chunk-2BCNWFC5.js";import"./chunk-CTIZP3XO.js";import"./chunk-GWRKSV2Q.js";import"./chunk-IAVAD545.js";import"./chunk-EOFWXI3T.js";import{a as ie}from"./chunk-LYVYUTQY.js";import{c as de}from"./chunk-P37L55FP.js";import"./chunk-K24LZAP2.js";import"./chunk-ZPQBVYNN.js";import{B as U,p as me,w as oe,x as te}from"./chunk-OYCDWIG2.js";import"./chunk-PDBW6GTJ.js";import{a as Le}from"./chunk-A6TVTNKO.js";import{a as Ce,b as Te}from"./chunk-ADABTCDI.js";import{a as m,d as le}from"./chunk-5PEAXTYQ.js";var O=le(Le(),1),A=le(Ce(),1);var s=le(Te(),1);var Pe=.5,Ie=4,Se=m(n=>Math.min(100,Math.max(0,n)),"ce"),Ke=m((n,e)=>{if(!Number.isFinite(e)||e<=0)return{leftPercent:0,widthPercent:100};let t=Se(n.offsetMs/e*100),a=n.durationMs/e*100,l=Math.max(Pe,Math.min(Se(a),100-t));return{leftPercent:t,widthPercent:l}},"Ce"),De=m((n,e,t=!1)=>{let a=e.trim().toLowerCase(),l=t?n.filter(r=>!r.ok):n;return a===""?[...l]:l.filter(r=>r.rootName.toLowerCase().includes(a)||r.functionPath.toLowerCase().includes(a)||r.traceId.toLowerCase().includes(a)||r.spans.some(o=>o.name.toLowerCase().includes(a)||o.spanId.toLowerCase().includes(a)))},"Ee"),G=m(n=>Number.isFinite(n)?n>0&&n<1?`${n.toFixed(2)}ms`:`${String(Math.round(n))}ms`:"\u2014","q"),Fe=m(n=>!Number.isFinite(n)||n<=0?[]:Array.from({length:Ie},(e,t)=>{let a=(t+1)/Ie;return{label:G(n*a),percent:a*100}}),"Pe"),ke=m(n=>{if(typeof n=="string")return n;try{return JSON.stringify(n,me)}catch{return String(n)}},"ue"),ee=m(n=>{let e=(0,O.c)(7),{label:t,value:a}=n,l;e[0]!==t?(l=(0,s.jsx)("dt",{className:"w-40 shrink-0 text-muted-foreground",children:t}),e[0]=t,e[1]=l):l=e[1];let r;e[2]!==a?(r=(0,s.jsx)("dd",{className:"min-w-0 break-all",children:a}),e[2]=a,e[3]=r):r=e[3];let o;return e[4]!==l||e[5]!==r?(o=(0,s.jsxs)("div",{className:"flex gap-2",children:[l,r]}),e[4]=l,e[5]=r,e[6]=o):o=e[6],o},"Y"),je=m(n=>{let e=(0,O.c)(68),{span:t}=n,a=U(),l,r,o,d,i,u;if(e[0]!==t.attributes||e[1]!==t.durationMs||e[2]!==t.error||e[3]!==t.events||e[4]!==t.kind||e[5]!==t.offsetMs||e[6]!==t.parentSpanId||e[7]!==t.spanId||e[8]!==a){let $=Object.entries(t.attributes??{}),_;e[15]!==t.events?(_=t.events??[],e[15]=t.events,e[16]=_):_=e[16],l=_,r="border-t border-border bg-background/60 px-3 py-2 font-mono text-xs",o="tr-span-detail";let y;e[17]!==a?(y=a("Span ID"),e[17]=a,e[18]=y):y=e[18];let w;e[19]!==t.spanId||e[20]!==y?(w=(0,s.jsx)(ee,{label:y,value:t.spanId}),e[19]=t.spanId,e[20]=y,e[21]=w):w=e[21];let M;e[22]!==a?(M=a("Parent span ID"),e[22]=a,e[23]=M):M=e[23];let h;e[24]!==t.parentSpanId||e[25]!==a?(h=t.parentSpanId===""?a("\u2014 (trace root)"):t.parentSpanId,e[24]=t.parentSpanId,e[25]=a,e[26]=h):h=e[26];let p;e[27]!==h||e[28]!==M?(p=(0,s.jsx)(ee,{label:M,value:h}),e[27]=h,e[28]=M,e[29]=p):p=e[29];let b;e[30]!==a?(b=a("Kind"),e[30]=a,e[31]=b):b=e[31];let C=t.kind??"internal",S;e[32]!==b||e[33]!==C?(S=(0,s.jsx)(ee,{label:b,value:C}),e[32]=b,e[33]=C,e[34]=S):S=e[34];let I;e[35]!==a?(I=a("Started at"),e[35]=a,e[36]=I):I=e[36];let g;e[37]!==t.offsetMs||e[38]!==a?(g=a("+{offset}",{offset:G(t.offsetMs)}),e[37]=t.offsetMs,e[38]=a,e[39]=g):g=e[39];let x;e[40]!==I||e[41]!==g?(x=(0,s.jsx)(ee,{label:I,value:g}),e[40]=I,e[41]=g,e[42]=x):x=e[42];let k;e[43]!==a?(k=a("Duration"),e[43]=a,e[44]=k):k=e[44];let f;e[45]!==t.durationMs?(f=G(t.durationMs),e[45]=t.durationMs,e[46]=f):f=e[46];let N;e[47]!==k||e[48]!==f?(N=(0,s.jsx)(ee,{label:k,value:f}),e[47]=k,e[48]=f,e[49]=N):N=e[49],e[50]!==p||e[51]!==S||e[52]!==x||e[53]!==N||e[54]!==w?(d=(0,s.jsxs)("dl",{className:"flex flex-col gap-1",children:[w,p,S,x,N]}),e[50]=p,e[51]=S,e[52]=x,e[53]=N,e[54]=w,e[55]=d):d=e[55],e[56]!==t.error?(i=t.error!==void 0&&(0,s.jsxs)("div",{className:"mt-2 rounded-md border border-destructive/40 bg-destructive/10 px-2 py-1.5","data-testid":"tr-detail-error",children:[(0,s.jsx)("span",{className:"font-semibold text-destructive",children:t.error.type}),(0,s.jsx)("p",{className:"whitespace-pre-wrap break-all text-destructive",children:t.error.message})]}),e[56]=t.error,e[57]=i):i=e[57],u=$.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-attributes",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Attributes")}),(0,s.jsx)("dl",{className:"flex flex-col gap-1",children:$.map(Ee)})]}),e[0]=t.attributes,e[1]=t.durationMs,e[2]=t.error,e[3]=t.events,e[4]=t.kind,e[5]=t.offsetMs,e[6]=t.parentSpanId,e[7]=t.spanId,e[8]=a,e[9]=l,e[10]=r,e[11]=o,e[12]=d,e[13]=i,e[14]=u}else l=e[9],r=e[10],o=e[11],d=e[12],i=e[13],u=e[14];let c;e[58]!==l||e[59]!==a?(c=l.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-events",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Events")}),(0,s.jsx)("ul",{className:"flex flex-col gap-1",children:l.map(Oe)})]}),e[58]=l,e[59]=a,e[60]=c):c=e[60];let v;return e[61]!==r||e[62]!==o||e[63]!==d||e[64]!==i||e[65]!==u||e[66]!==c?(v=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,i,u,c]}),e[61]=r,e[62]=o,e[63]=d,e[64]=i,e[65]=u,e[66]=c,e[67]=v):v=e[67],v},"Ke");function Ee(n){let[e,t]=n;return(0,s.jsx)(ee,{label:e,value:ke(t)},e)}m(Ee,"Fe");function Ae(n){let[e,t]=n;return`${e}=${ke(t)}`}m(Ae,"Re");function Oe(n){return(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:oe(n.ts)}),(0,s.jsx)(ce,{variant:"secondary",children:n.name}),(0,s.jsx)("span",{className:"min-w-0 break-all text-muted-foreground",children:Object.entries(n.attributes??{}).map(Ae).join(" ")})]},`${n.name}:${String(n.ts)}`)}m(Oe,"Ae");var Be=14,_e="grid grid-cols-[14rem_1fr_4rem_16rem_16rem] items-center gap-2 px-3",We=m(n=>{let e=(0,O.c)(17),{traceDurationMs:t}=n,a,l,r,o,d,i;if(e[0]!==t){i=Symbol.for("react.early_return_sentinel");e:{let v=Fe(t);if(v.length===0){i=null;break e}e[7]===Symbol.for("react.memo_cache_sentinel")?(r=te(_e,"border-b border-border py-1 font-mono text-[10px] text-muted-foreground"),e[7]=r):r=e[7],o="tr-ruler",e[8]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)("span",{}),e[8]=d):d=e[8],a="relative h-3",l=v.map(Je)}e[0]=t,e[1]=a,e[2]=l,e[3]=r,e[4]=o,e[5]=d,e[6]=i}else a=e[1],l=e[2],r=e[3],o=e[4],d=e[5],i=e[6];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;e[9]!==a||e[10]!==l?(u=(0,s.jsx)("span",{className:a,children:l}),e[9]=a,e[10]=l,e[11]=u):u=e[11];let c;return e[12]!==r||e[13]!==o||e[14]!==d||e[15]!==u?(c=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,u]}),e[12]=r,e[13]=o,e[14]=d,e[15]=u,e[16]=c):c=e[16],c},"je"),qe=m(n=>{let e=(0,O.c)(60),{span:t,traceDurationMs:a}=n,l=U(),[r,o]=(0,A.useState)(!1),d;e[0]!==t||e[1]!==a?(d=Ke(t,a),e[0]=t,e[1]=a,e[2]=d):d=e[2];let{leftPercent:i,widthPercent:u}=d,c;e[3]!==t.attributes?(c=ve(t.attributes),e[3]=t.attributes,e[4]=c):c=e[4];let v=c,$=t.depth*Be,_;e[5]!==$?(_={paddingLeft:$},e[5]=$,e[6]=_):_=e[6];let y=_,w=`${String(i)}%`,M=`${String(u)}%`,h;e[7]!==w||e[8]!==M?(h={left:w,width:M},e[7]=w,e[8]=M,e[9]=h):h=e[9];let p=h,b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=m(()=>{o(Ue)},"h"),e[10]=b):b=e[10];let C=b,S=t.depth,I=`tr-span-detail-${t.spanId}`,g;e[11]!==t.durationMs||e[12]!==t.error||e[13]!==t.name||e[14]!==t.offsetMs||e[15]!==l?(g=l("{name}, {duration}, starts {offset} in{failure}",{duration:G(t.durationMs),failure:t.error===void 0?"":l(", failed: {message}",{message:t.error.message}),name:t.name,offset:G(t.offsetMs)}),e[11]=t.durationMs,e[12]=t.error,e[13]=t.name,e[14]=t.offsetMs,e[15]=l,e[16]=g):g=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=te(_e,"w-full border-b border-border py-1.5 text-left font-mono text-xs hover:bg-muted/50"),e[17]=x):x=e[17];let k=`tr-span-toggle-${t.spanId}`,f;e[18]!==t.ok?(f=t.ok?null:(0,s.jsx)("span",{"aria-hidden":"true",className:"mr-1 text-destructive","data-testid":"tr-span-error",children:"\u25CF"}),e[18]=t.ok,e[19]=f):f=e[19];let N;e[20]!==y||e[21]!==t.name||e[22]!==f?(N=(0,s.jsxs)("span",{className:"truncate",style:y,title:t.name,children:[f,t.name]}),e[20]=y,e[21]=t.name,e[22]=f,e[23]=N):N=e[23];let B=t.ok?"bg-primary/70":"bg-destructive",L;e[24]!==B?(L=te("absolute inset-y-0 rounded-sm",B),e[24]=B,e[25]=L):L=e[25];let E;e[26]!==p||e[27]!==i||e[28]!==L||e[29]!==u?(E=(0,s.jsx)("span",{"aria-hidden":"true",className:"relative h-3 overflow-hidden rounded-sm bg-muted",children:(0,s.jsx)("span",{className:L,"data-left":i,"data-testid":"tr-span-bar","data-width":u,style:p})}),e[26]=p,e[27]=i,e[28]=L,e[29]=u,e[30]=E):E=e[30];let W;e[31]!==t.durationMs?(W=G(t.durationMs),e[31]=t.durationMs,e[32]=W):W=e[32];let D;e[33]!==W?(D=(0,s.jsx)("span",{className:"text-right tabular-nums text-muted-foreground",children:W}),e[33]=W,e[34]=D):D=e[34];let q;e[35]!==t.error?(q=t.error===void 0?null:(0,s.jsx)("span",{className:"text-destructive","data-testid":"tr-span-error-message",title:t.error.message,children:`${t.error.type}: ${t.error.message}`}),e[35]=t.error,e[36]=q):q=e[36];let T;e[37]!==q?(T=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:q}),e[37]=q,e[38]=T):T=e[38];let z;e[39]!==v?(z=v===""?null:(0,s.jsx)("span",{"data-testid":"tr-span-attributes",title:v,children:v}),e[39]=v,e[40]=z):z=e[40];let P;e[41]!==z?(P=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:z}),e[41]=z,e[42]=P):P=e[42];let J;e[43]!==r||e[44]!==I||e[45]!==g||e[46]!==k||e[47]!==N||e[48]!==E||e[49]!==D||e[50]!==T||e[51]!==P?(J=(0,s.jsxs)("button",{"aria-controls":I,"aria-expanded":r,"aria-label":g,className:x,"data-testid":k,onClick:C,type:"button",children:[N,E,D,T,P]}),e[43]=r,e[44]=I,e[45]=g,e[46]=k,e[47]=N,e[48]=E,e[49]=D,e[50]=T,e[51]=P,e[52]=J):J=e[52];let F;e[53]!==r||e[54]!==t?(F=r&&(0,s.jsx)("div",{id:`tr-span-detail-${t.spanId}`,children:(0,s.jsx)(je,{span:t})}),e[53]=r,e[54]=t,e[55]=F):F=e[55];let K;return e[56]!==t.depth||e[57]!==J||e[58]!==F?(K=(0,s.jsxs)("li",{"data-depth":S,"data-testid":"tr-span-row",children:[J,F]}),e[56]=t.depth,e[57]=J,e[58]=F,e[59]=K):K=e[59],K},"Be"),ze=m(n=>{let e=(0,O.c)(15),{durationMs:t,spans:a}=n,l=U(),r;e[0]!==t?(r=(0,s.jsx)(We,{traceDurationMs:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==l?(o=l("Trace waterfall"),e[2]=l,e[3]=o):o=e[3];let d;if(e[4]!==t||e[5]!==a){let c;e[7]!==t?(c=m(v=>(0,s.jsx)(qe,{span:v,traceDurationMs:t},v.spanId),"c"),e[7]=t,e[8]=c):c=e[8],d=a.map(c),e[4]=t,e[5]=a,e[6]=d}else d=e[6];let i;e[9]!==o||e[10]!==d?(i=(0,s.jsx)("ul",{"aria-label":o,children:d}),e[9]=o,e[10]=d,e[11]=i):i=e[11];let u;return e[12]!==r||e[13]!==i?(u=(0,s.jsxs)(s.Fragment,{children:[r,i]}),e[12]=r,e[13]=i,e[14]=u):u=e[14],u},"Oe");function Je(n){return(0,s.jsx)("span",{className:te("absolute inset-y-0 border-l border-border/70",n.percent===100?"-translate-x-full pr-1":"pl-1"),style:{left:`${String(n.percent)}%`},children:n.label},n.percent)}m(Je,"We");function Ue(n){return!n}m(Ue,"Ue");var Ge=m(n=>Array.isArray(n?.traces)?n.traces:[],"qe"),He=m(n=>{let e=(0,O.c)(12),{entries:t}=n,a=U(),l;e[0]!==t.length||e[1]!==a?(l=a("Logs ({count})",{count:t.length}),e[0]=t.length,e[1]=a,e[2]=l):l=e[2];let r;e[3]!==l?(r=(0,s.jsx)("p",{className:"mb-1 font-mono text-xs text-muted-foreground",children:l}),e[3]=l,e[4]=r):r=e[4];let o;e[5]!==t?(o=t.map(Ve),e[5]=t,e[6]=o):o=e[6];let d;e[7]!==o?(d=(0,s.jsx)("div",{role:"grid",children:o}),e[7]=o,e[8]=d):d=e[8];let i;return e[9]!==r||e[10]!==d?(i=(0,s.jsxs)("div",{className:"border-t border-border px-3 py-2","data-testid":"tr-logs",children:[r,d]}),e[9]=r,e[10]=d,e[11]=i):i=e[11],i},"ze"),Qe=m(n=>{let e=(0,O.c)(50),{expanded:t,logs:a,onToggle:l,trace:r}=n,o=U(),d;e[0]!==l||e[1]!==r.traceId?(d=m(()=>{l(r.traceId)},"i"),e[0]=l,e[1]=r.traceId,e[2]=d):d=e[2];let i=d,u=`tr-row-${r.traceId}`,c=`tr-waterfall-${r.traceId}`,v=`tr-toggle-${r.traceId}`,$=t?"\u25BE":"\u25B8",_;e[3]!==$?(_=(0,s.jsx)("span",{"aria-hidden":"true",className:"w-3 shrink-0 text-xs text-muted-foreground",children:$}),e[3]=$,e[4]=_):_=e[4];let y;e[5]!==r.rootName?(y=(0,s.jsx)("span",{className:"w-56 shrink-0 truncate text-sm font-medium",title:r.rootName,children:r.rootName}),e[5]=r.rootName,e[6]=y):y=e[6];let w;e[7]!==r.functionPath?(w=(0,s.jsx)("span",{className:"w-48 shrink-0 truncate font-mono text-xs text-muted-foreground",title:r.functionPath,children:r.functionPath}),e[7]=r.functionPath,e[8]=w):w=e[8];let M;e[9]!==r.durationMs?(M=G(r.durationMs),e[9]=r.durationMs,e[10]=M):M=e[10];let h;e[11]!==M?(h=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:M}),e[11]=M,e[12]=h):h=e[12];let p;e[13]!==o||e[14]!==r.spans.length?(p=o("{count} spans",{count:r.spans.length}),e[13]=o,e[14]=r.spans.length,e[15]=p):p=e[15];let b;e[16]!==p?(b=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:p}),e[16]=p,e[17]=b):b=e[17];let C=r.ok?"secondary":"destructive",S;e[18]!==o||e[19]!==r.ok?(S=r.ok?o("ok"):o("error"),e[18]=o,e[19]=r.ok,e[20]=S):S=e[20];let I;e[21]!==C||e[22]!==S?(I=(0,s.jsx)("span",{className:"shrink-0",children:(0,s.jsx)(ce,{variant:C,children:S})}),e[21]=C,e[22]=S,e[23]=I):I=e[23];let g;e[24]!==r.startTs?(g=oe(r.startTs),e[24]=r.startTs,e[25]=g):g=e[25];let x;e[26]!==g?(x=(0,s.jsx)("span",{className:"flex-1 truncate text-right font-mono text-xs tabular-nums text-muted-foreground",children:g}),e[26]=g,e[27]=x):x=e[27];let k;e[28]!==t||e[29]!==i||e[30]!==h||e[31]!==b||e[32]!==I||e[33]!==x||e[34]!==c||e[35]!==v||e[36]!==_||e[37]!==y||e[38]!==w?(k=(0,s.jsxs)("button",{"aria-controls":c,"aria-expanded":t,className:"flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-muted/50","data-testid":v,onClick:i,type:"button",children:[_,y,w,h,b,I,x]}),e[28]=t,e[29]=i,e[30]=h,e[31]=b,e[32]=I,e[33]=x,e[34]=c,e[35]=v,e[36]=_,e[37]=y,e[38]=w,e[39]=k):k=e[39];let f;e[40]!==t||e[41]!==a||e[42]!==r.durationMs||e[43]!==r.spans||e[44]!==r.traceId?(f=t&&(0,s.jsxs)("div",{className:"bg-muted/20","data-testid":`tr-waterfall-${r.traceId}`,id:`tr-waterfall-${r.traceId}`,children:[(0,s.jsx)(ze,{durationMs:r.durationMs,spans:r.spans}),a.length>0&&(0,s.jsx)(He,{entries:a})]}),e[40]=t,e[41]=a,e[42]=r.durationMs,e[43]=r.spans,e[44]=r.traceId,e[45]=f):f=e[45];let N;return e[46]!==k||e[47]!==f||e[48]!==u?(N=(0,s.jsxs)("div",{className:"border-b border-border last:border-b-0","data-testid":u,children:[k,f]}),e[46]=k,e[47]=f,e[48]=u,e[49]=N):N=e[49],N},"Ge"),bt=m(n=>{let e=(0,O.c)(60),{initialShardKey:t}=n,a=U(),[l]=(0,A.useState)(ye),{queryShardKey:r,setShardKey:o,shardKey:d}=be(l?.shardKey!==void 0&&l.shardKey!==""?l.shardKey:t??""),[i,u]=(0,A.useState)(l?.traceId??""),[c,v]=(0,A.useState)(!1),[$,_]=(0,A.useState)(Xe),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0],(0,A.useEffect)(Ye,y);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={},e[1]=w):w=e[1];let M;e[2]!==r?(M={live:!0,shardKey:r},e[2]=r,e[3]=M):M=e[3];let{data:h,error:p,errorSource:b,isLoading:C,liveError:S}=de(ie.getTraces,w,M),I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I={},e[4]=I):I=e[4];let g=$.size>0,x;e[5]!==r||e[6]!==g?(x={enabled:g,live:!0,shardKey:r},e[5]=r,e[6]=g,e[7]=x):x=e[7];let{data:k}=de(ie.getLogs,I,x),f,N;e[8]!==h||e[9]!==r?(f=m(()=>{h!==void 0&&pe(r)},"p"),N=[h,r],e[8]=h,e[9]=r,e[10]=f,e[11]=N):(f=e[10],N=e[11]),(0,A.useEffect)(f,N);let B;if(e[12]!==h||e[13]!==p||e[14]!==b||e[15]!==$||e[16]!==C||e[17]!==S||e[18]!==k?.entries||e[19]!==c||e[20]!==r||e[21]!==i||e[22]!==o||e[23]!==d||e[24]!==a){let L=Ge(h),E=h?.total??L.length,W=E>L.length,D=De(L,i,c),q=Map.groupBy((k?.entries??[]).toReversed(),Ze),T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=m(j=>{u(j.target.value)},"C"),e[26]=T):T=e[26];let z=T,P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=m(j=>{_($e=>{let ne=new Set($e);return ne.has(j)?ne.delete(j):ne.add(j),ne})},"E"),e[27]=P):P=e[27];let J=P,F=p===null&&D.length===0&&!C,K;e[28]!==o||e[29]!==d?(K=(0,s.jsx)(fe,{onChange:o,testId:"tr-shard-input",value:d}),e[28]=o,e[29]=d,e[30]=K):K=e[30];let H;e[31]!==a?(H=a("Search traces"),e[31]=a,e[32]=H):H=e[32];let Q;e[33]!==a?(Q=a("search trace, span, or function"),e[33]=a,e[34]=Q):Q=e[34];let V;e[35]!==i||e[36]!==H||e[37]!==Q?(V=(0,s.jsx)(ue,{"aria-label":H,className:"h-8 w-56","data-testid":"tr-search",onChange:z,placeholder:Q,value:i}),e[35]=i,e[36]=H,e[37]=Q,e[38]=V):V=e[38];let X;e[39]!==c?(X=(0,s.jsx)(xe,{checked:c,"data-testid":"tr-only-errors",id:"tr-only-errors",onCheckedChange:v}),e[39]=c,e[40]=X):X=e[40];let Y;e[41]!==a?(Y=a("Errors only"),e[41]=a,e[42]=Y):Y=e[42];let Z;e[43]!==X||e[44]!==Y?(Z=(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",htmlFor:"tr-only-errors",children:[X,Y]}),e[43]=X,e[44]=Y,e[45]=Z):Z=e[45];let R;e[46]!==S?(R=(0,s.jsx)(Ne,{message:S,prefix:"tr"}),e[46]=S,e[47]=R):R=e[47];let re;e[48]!==K||e[49]!==V||e[50]!==Z||e[51]!==R?(re=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K,V,Z,R]}),e[48]=K,e[49]=V,e[50]=Z,e[51]=R,e[52]=re):re=e[52];let ae;e[53]!==p||e[54]!==b||e[55]!==r?(ae=p!==null&&(0,s.jsx)(ge,{error:b,shardKey:r,testId:"tr-error"}),e[53]=p,e[54]=b,e[55]=r,e[56]=ae):ae=e[56];let se;e[57]!==F||e[58]!==a?(se=F&&(0,s.jsx)(he,{description:a("Traces recorded with ctx.trace show up here as your app handles traffic. The span buffer resets when the shard hibernates."),icon:(0,s.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M4 6h10M7 12h13M10 18h7"})}),testId:"tr-empty",title:a("No traces")}),e[57]=F,e[58]=a,e[59]=se):se=e[59],B=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-traces-panel",children:[re,ae,se,p===null&&W&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"tr-truncated",children:a("Showing the {shown} most recent of {total} traces in the buffer.",{shown:L.length,total:E})}),p===null&&D.length>0&&(0,s.jsx)("div",{"aria-label":a("Recent traces"),className:"overflow-hidden rounded-xl border border-border shadow-xs","data-testid":"tr-list",children:D.map(j=>(0,s.jsx)(Qe,{expanded:$.has(j.traceId),logs:q.get(j.traceId)??[],onToggle:J,trace:j},j.traceId))})]}),e[12]=h,e[13]=p,e[14]=b,e[15]=$,e[16]=C,e[17]=S,e[18]=k?.entries,e[19]=c,e[20]=r,e[21]=i,e[22]=o,e[23]=d,e[24]=a,e[25]=B}else B=e[25];return B},"bt");function Ve(n,e){return(0,s.jsx)("div",{className:"flex items-center border-b border-border py-1 font-mono text-xs last:border-b-0","data-testid":"tr-log-row",role:"row",children:(0,s.jsx)(Me,{entry:n})},`${String(e)}:${String(n.timestamp)}`)}m(Ve,"He");function Xe(){return new Set}m(Xe,"Je");function Ye(){we()}m(Ye,"Qe");function Ze(n){return n.traceId}m(Ze,"Ve");export{bt as default};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-3D67ZJRW.js";import{i as j}from"./chunk-MWYGLPDV.js";import{B as b}from"./chunk-PUK3H4RN.js";import{a as $}from"./chunk-GWNGVKLG.js";import{a as w,b as A}from"./chunk-6G3E4PJ2.js";import{a as m,d as S}from"./chunk-5PEAXTYQ.js";var y=S($(),1),h=S(w(),1);var a=S(A(),1);var z=m(i=>{let t=(0,y.c)(21),{id:f,onChange:g,testId:e,value:v}=i,s=b(),u=(0,h.useId)(),[d]=(0,h.useState)(F),c;t[0]!==g?(c=m(C=>{g(C.target.value)},"d"),t[0]=g,t[1]=c):c=t[1];let I=c,o;t[2]!==s?(o=s("Shard key"),t[2]=s,t[3]=o):o=t[3];let x=d.length>0?u:void 0,r;t[4]!==s?(r=s("shard key (optional)"),t[4]=s,t[5]=r):r=t[5];let l;t[6]!==f||t[7]!==I||t[8]!==o||t[9]!==x||t[10]!==r||t[11]!==e||t[12]!==v?(l=(0,a.jsx)(j,{"aria-label":o,className:"h-8 w-48","data-testid":e,id:f,list:x,onChange:I,placeholder:r,value:v}),t[6]=f,t[7]=I,t[8]=o,t[9]=x,t[10]=r,t[11]=e,t[12]=v,t[13]=l):l=t[13];let n;t[14]!==u||t[15]!==d||t[16]!==e?(n=d.length>0&&(0,a.jsx)("datalist",{"data-testid":`${e}-recents`,id:u,children:d.map(N)}),t[14]=u,t[15]=d,t[16]=e,t[17]=n):n=t[17];let p;return t[18]!==l||t[19]!==n?(p=(0,a.jsxs)(a.Fragment,{children:[l,n]}),t[18]=l,t[19]=n,t[20]=p):p=t[20],p},"A");function F(){return k()}m(F,"$");function N(i){return(0,a.jsx)("option",{"aria-label":i,value:i},i)}m(N,"w");export{z as a};
1
+ import{a as k}from"./chunk-EDL46BPM.js";import{i as j}from"./chunk-VB3BKQCE.js";import{B as b}from"./chunk-OYCDWIG2.js";import{a as $}from"./chunk-A6TVTNKO.js";import{a as w,b as A}from"./chunk-ADABTCDI.js";import{a as m,d as S}from"./chunk-5PEAXTYQ.js";var y=S($(),1),h=S(w(),1);var a=S(A(),1);var z=m(i=>{let t=(0,y.c)(21),{id:f,onChange:g,testId:e,value:v}=i,s=b(),u=(0,h.useId)(),[d]=(0,h.useState)(F),c;t[0]!==g?(c=m(C=>{g(C.target.value)},"d"),t[0]=g,t[1]=c):c=t[1];let I=c,o;t[2]!==s?(o=s("Shard key"),t[2]=s,t[3]=o):o=t[3];let x=d.length>0?u:void 0,r;t[4]!==s?(r=s("shard key (optional)"),t[4]=s,t[5]=r):r=t[5];let l;t[6]!==f||t[7]!==I||t[8]!==o||t[9]!==x||t[10]!==r||t[11]!==e||t[12]!==v?(l=(0,a.jsx)(j,{"aria-label":o,className:"h-8 w-48","data-testid":e,id:f,list:x,onChange:I,placeholder:r,value:v}),t[6]=f,t[7]=I,t[8]=o,t[9]=x,t[10]=r,t[11]=e,t[12]=v,t[13]=l):l=t[13];let n;t[14]!==u||t[15]!==d||t[16]!==e?(n=d.length>0&&(0,a.jsx)("datalist",{"data-testid":`${e}-recents`,id:u,children:d.map(N)}),t[14]=u,t[15]=d,t[16]=e,t[17]=n):n=t[17];let p;return t[18]!==l||t[19]!==n?(p=(0,a.jsxs)(a.Fragment,{children:[l,n]}),t[18]=l,t[19]=n,t[20]=p):p=t[20],p},"A");function F(){return k()}m(F,"$");function N(i){return(0,a.jsx)("option",{"aria-label":i,value:i},i)}m(N,"w");export{z as a};
@@ -0,0 +1,2 @@
1
+ import{b as ur}from"./chunk-N7FOBAV3.js";import{a as B,b as Q}from"./chunk-ADABTCDI.js";import{a,d as T}from"./chunk-5PEAXTYQ.js";var ko=T(B(),1),Yt=ko.createContext(null);var Io=T(B(),1);function M(t){let e=Io.useContext(Yt);return e||void 0,e}a(M,"useRouter");function et(t){return t[t.length-1]}a(et,"last");function mt(t,e){return typeof t=="function"?t(e):t}a(mt,"functionalUpdate");var Zt=Object.prototype.hasOwnProperty;function Tt(t){for(let e in t)if(Zt.call(t,e))return!0;return!1}a(Tt,"hasKeys");var Mt=a(()=>Object.create(null),"createNull"),gt=a((t,e)=>tt(t,e,!0),"nullReplaceEqualDeep");function tt(t,e,o,n=0){if(!1)return e;if(t===e)return t;if(n++>500)return e;let r=Array.isArray(t)&&Array.isArray(e);if(!r&&!(Xt(t)&&Xt(e)))return e;let i=Object.keys(t),s=i.length,c=Object.keys(e),l=c.length;if(r?s!==t.length||l!==e.length||s&&et(i)!==`${s-1}`||l&&et(c)!==`${l-1}`:s!==Object.getOwnPropertyNames(t).length||l!==Object.getOwnPropertyNames(e).length||Object.getOwnPropertySymbols(e).length)return e;let u=0,f,d,h;if(r){for(;u<l&&(h=u,d=t[h],f=e[h],f=d===f?d:typeof d=="object"?tt(d,f,o,n):f,f===d);u++);if(u===l&&s===l)return t}else{let m=s===l,g=!0;for(;u<l;u++){h=c[u],d=t[h];let S=e[h];f=d===S?d:typeof d=="object"?tt(d,S,o,n):S,m&&=f===d&&(i[u]===h||Zt.call(t,h)),g&&=Object.is(f,S),i[u]=f}if(m)return Object.getOwnPropertySymbols(t).length?e:t;if(g)return e}let p=r?c.fill(0):o?Mt():{};for(let m=0;m<l;m++)h=r?m:c[m],r?(d=t[h],m>u&&(f=e[h],f=d===f?d:typeof d=="object"?tt(d,f,o,n):f),p[h]=m<u?d:f):p[h]=i[m];return p}a(tt,"replaceEqualDeep");function Xt(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}a(Xt,"isPlainObject");function J(t,e,o,n){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++){let s=t[r],c=e[r];if(s!==c&&!J(s,c,o,n))return!1}return!0}if(Xt(t)&&Xt(e)){if(o){for(let i in e)if((n||e[i]!==void 0)&&!J(t[i],e[i],o,n))return!1;return!0}let r=0;if(n)r=Object.keys(t).length;else for(let i in t)t[i]!==void 0&&r++;for(let i in e)if((n||e[i]!==void 0)&&(r--===0||!J(t[i],e[i],o,n)))return!1;return r===0}return!1}a(J,"deepEqual");var fr=/[\x00-\x1f\x7f"<>`{}]/g;function dr(t){return t.replace(fr,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}a(dr,"sanitizePathSegment");function Oo(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,o=>{try{return decodeURI(o)}catch{return o}})}return dr(e)}a(Oo,"decodeSegment");var Le=["http:","https:","mailto:","tel:"];function it(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}a(it,"getUrlScheme");var ke=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Dt(t,e){if(!t)return!1;if(ke.test(t))return!0;let o=it(t);return o?!e.has(o):!1}a(Dt,"isDangerousProtocol");function bt(t){if(!t)return t;let e=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){let o=/%25|%5C/gi,n=0,r;for(e="";(r=o.exec(t))!==null;)e+=Oo(t.slice(n,r.index))+r[0],n=o.lastIndex;e+=Oo(n?t.slice(n):t)}return e}a(bt,"decodePath");function No(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}a(No,"encodePathLikeUrl");function Fo(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}a(Fo,"arraysEqual");function ut(){throw new Error("Invariant failed")}a(ut,"invariant");function at(t){return t.replace(/\/{2,}/g,"/")}a(at,"cleanPath");function Qt(t){return t==="/"?t:t.replace(/^\/+/,"")}a(Qt,"trimPathLeft");function H(t){let e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/+$/,""):t}a(H,"trimPathRight");function At(t){return H(Qt(t))}a(At,"trimPath");function te(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}a(te,"removeTrailingSlash");function ee(t,e,o="never",n){if(e.includes("//")&&(e=at(e)),e.startsWith("/"))return e.length===1||o==="preserve"?e:o==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;let r=e===".",i;if(n){i=r?t:t+"\0"+e;let u=n.get(i);if(u)return u}let s;if(r)s=t.split("/");else{for(t.includes("//")&&(t=at(t)),s=t.split("/");s.length>1&&et(s)==="";)s.pop();let u=e.split("/");for(let f=0,d=u.length;f<d;f++){let h=u[f];h===""?f?f===d-1&&s.push(h):s=[h]:h===".."?s.length>1?s.pop():s=[""]:h==="."||s.push(h)}}s.length>1&&(et(s)===""?o==="never"&&s.pop():o==="always"&&s.push(""));let c=s.join("/"),l=(r?at(c):c)||"/";return i&&n&&n.set(i,l),l}a(ee,"resolvePath");function To(t){let e=new Map(t.map(n=>[encodeURIComponent(n),n])),o=new RegExp([...e.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return n=>n.replace(o,r=>e.get(r)??r)}a(To,"compileDecodeCharMap");function hr(t){return t==null||t===""}a(hr,"isMissingSplat");function pr(t,e,o){if(typeof e!="string")return""+(e??void 0);let n=t==="_splat";if(n&&(!e||/^[a-zA-Z0-9\-._~!/]*$/.test(e)))return e;let r=encodeURIComponent(e);return n&&(r=r.replaceAll("%2F","/")),o?o(r):r}a(pr,"encodeParam");function oe(t,e,o,n,r){let i=t.endsWith("/")?"/":"",s="";for(let c of e){if(typeof c=="string"){s+=c;continue}let[l,u,f,d]=c,h=l===2,p=h&&d!==void 0?d+i:d,m=o[u];if(!(l===3&&m==null)){if(r&&(r[u]=m,h&&(r["*"]=m)),h&&hr(m)){if(f==="/"&&!p)continue;m=""}s+=f+pr(u,m,n)+(p||"")}}return s+i||"/"}a(oe,"interpolatePath");function q(t){return t?.isNotFound===!0}a(q,"isNotFound");function mr(){try{return sessionStorage}catch{return}}a(mr,"getSafeSessionStorage");var gr="tsr-scroll-restoration-v1_3",Ao=mr();function yr(){try{return JSON.parse(Ao?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}a(yr,"createScrollRestorationCache");var Ct=yr(),Mo="data-scroll-restoration-id",vr=a(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Sr(t){let e=t.getAttribute(Mo);if(e)return`[${Mo}="${e}"]`;let o="",n=t,r;for(;r=n.parentNode;){let i=1,s=n;for(;s=s.previousElementSibling;)i++;let c=`${n.localName}:nth-child(${i})`;o=o?`${c} > ${o}`:c,n=r}return o}a(Sr,"getScrollRestorationSelector");var ne=!1,re="window";function Ie(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}a(Ie,"getElement");function Do(t){let e=new Set;for(let o of t){if(o===re)continue;let n=Ie(o);n&&e.add(n)}return e}a(Do,"getScrollToTopElements");function $o(t,e){let o=e??t.options.scrollRestoration,n=t._scroll;if(o&&(n.e=!0),!1)return;let r=t.options.getScrollRestorationKey||vr,i=new Set,s=a(c=>{let l=Ct[c]||={};for(let u of i)u===document?l[re]={scrollX,scrollY}:u.isConnected&&(l[Sr(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})},"snapshotCurrentScrollTargets");o&&!n.s&&(n.s=!0,ne=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{ne||i.add(c.target)},!0),t.subscribe("onBeforeLoad",c=>{c.fromLocation&&s(r(c.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",s(r(t.stores.resolvedLocation.get()??t.stores.location.get()));try{Ao?.setItem(gr,JSON.stringify(Ct))}catch{}}),addEventListener("pageshow",c=>{c.persisted&&(history.scrollRestoration="manual")})),!n.r&&(n.r=!0,t.subscribe("onRendered",c=>{let l=t.options.scrollRestorationBehavior,u=t.options.scrollToTopSelectors,f=n.n,d=n.h,h;if(i.clear(),n.n=!0,n.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let p=r(c.toLocation),m=c.fromLocation&&r(c.fromLocation);if(n.e&&m&&m!==p){let g=Ct[m];if(g){let S=Ct[p];for(let y in g){if(y===re){if(f)continue}else{let R=Ie(y);if(!R||f&&u&&(h??=Do(u),h.has(R)))continue}S||(S=Ct[p]={}),S[y]??=g[y]}}}ne=!0;try{let g=c.toLocation.hash,S=c.toLocation.state.__hashScrollIntoViewOptions??!0,y=!1;if(f){!g&&u&&(h??=Do(u));let R=g&&S&&d,b=n.e?Ct[p]:void 0;if(b)for(let w in b){let{scrollX:C,scrollY:_}=b[w];if(w===re){if(R)continue;scrollTo({top:_,left:C,behavior:l}),y=!0}else{let v=Ie(w);v&&(v.scrollLeft=C,v.scrollTop=_,h?.delete(v))}}if(!g){let w={top:0,left:0,behavior:l};if(y||scrollTo(w),h)for(let C of h)C.scrollTo(w)}}!y&&g&&S&&document.getElementById(g)?.scrollIntoView(S)}finally{ne=!1}}))}a($o,"setupScrollRestoration");function Bo(t,e=String){let o;for(let n in t){let r=t[n];r!==void 0&&(o||=new URLSearchParams).set(n,e(r))}return o?o.toString():""}a(Bo,"encode");function Oe(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}a(Oe,"toValue");function Vo(t){let e=new URLSearchParams(t),o=Object.create(null);for(let[n,r]of e.entries()){let i=o[n];i==null?o[n]=Oe(r):Array.isArray(i)?i.push(Oe(r)):o[n]=[i,Oe(r)]}return o}a(Vo,"decode");var Ho=/^(?:\s|["[{\d-]|fa|nu|tr)/,zo=Rr(JSON.parse),Uo=_r(JSON.stringify,JSON.parse);function Rr(t){let e=t===JSON.parse;return o=>{o[0]==="?"&&(o=o.slice(1));let n=Vo(o);for(let r in n){let i=n[r];if(typeof i=="string"){if(e&&!Ho.test(i))continue;try{n[r]=t(i)}catch{}}}return n}}a(Rr,"parseSearchWith");function _r(t,e){let o=e===JSON.parse;function n(r){if(r&&typeof r=="object")try{return t(r)}catch{}else if(e&&typeof r=="string"){if(o&&!Ho.test(r))return r;try{return e(r),t(r)}catch{}}return r}return a(n,"stringifyValue"),r=>{let i=Bo(r,n);return i?`?${i}`:""}}a(_r,"stringifySearchWith");var Y="__root__";function Wo(t){t.statusCode=t.statusCode||t.code||307;let e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);let o=new Response(null,{status:t.statusCode,headers:e});if(o.options=t,t.throw)throw o;return o}a(Wo,"redirect");function se(t){return t instanceof Response&&!!t.options}a(se,"isRedirect");function Pt(t){let e=new Map,o,n;return{get(r){let i=e.get(r);if(i)return i.visited=!0,i.value},set(r,i){let s=e.get(r);if(s){s.value=i;return}if(e.size>=t){let l=o?.next().value;for(;!l||l.visited;)l?l.visited=!1:o=e.values(),l=o.next().value;l===n&&(o=void 0),e.delete(l.key)}let c={key:r,value:i,visited:!1};n=c,e.set(r,c)},clear(){e.clear(),o=void 0,n=void 0}}}a(Pt,"createSieveCache");var ft=4,Ko=5;function wr(t){let e=t.names;if(e)return e;let o=[];for(let n of t)typeof n!="string"&&o.push(n[1]);return t.names=o}a(wr,"getParamNames");function xr(t,e,o){let n=t.slice(e,o);if(n.charCodeAt(0)===36)return n.length===1?[2,"_splat","",void 0]:[1,n.slice(1),"",""];let r=n.indexOf("{");if(r>=0){let i=n.indexOf("}",r),s=n.charCodeAt(r+1)===45,c=r+(s?3:2);if(i>=0&&n.charCodeAt(c-1)===36&&(!s||c<i)){let l=n.slice(c,i);return[s?3:l?1:2,l||"_splat",n.slice(0,r),t.slice(e+i+1,l?o:t.length)]}}return n}a(xr,"parseSegment");function Et(t,e,o,n,r,i){let s=o,c=e.fullPath??e.from,l=e.options,u=c.length,f=c.endsWith("/")?u-1:u,d=l?.caseSensitive??t,h=l?.params?.parse??l?.parseParams,p,m=i?o-1:0;if(!n||c.includes("$")){p=i?.slice()??[];let y=et(p);y&&typeof y!="string"&&y[0]===2&&(p[p.length-1]=[y[0],y[1],y[2],y[3]===void 0?void 0:y[3]+c.substring(o-(c[o-2]==="/"?2:1),f)],m=u)}for(;s<u;){let y=s,R=c.indexOf("/",y),b=R===-1?u:R,w=xr(c,y,b);s=b+1;let C;if(typeof w=="string"){if(!n)continue;let _=w,v;d?v=n.static??=new Map:(_=w.toLowerCase(),v=n.staticInsensitive??=new Map);let x=v.get(_);if(x)C=x;else{let P=yt(n);C=P,v.set(_,P)}}else{let _=w[0],v=w[2],x=w[3]??"";if(_===2&&(b=u,s=b+1),p&&m<b&&(m<y-1&&p.push(c.slice(m,y-1)),w[2]="/"+v,_===2&&w[3]!==void 0&&f<u&&(w[3]=x.slice(0,-1)),p.push(w),m=b),!n)continue;let P=d&&!!(v||x);d||(v=v.toLowerCase(),x=x.toLowerCase());let L=_===1?n.dynamic??=[]:_===3?n.optional??=[]:n.wildcard??=[],k=_!==2&&!h&&L.find(E=>!E.parse&&E.caseSensitive===P&&E.prefix===v&&E.suffix===x);if(k)C=k;else{let E=yt(n,_,P,v,x);C=E,L.push(E),L.length===2&&r?.push(L)}}n=C}p&&m<f&&p.push(c.slice(m,f));let g=p?.slice();if(!n)return g;if(h&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){let y=yt(n,Ko);(n.pathless??=[]).push(y),n=y}let S=(e.path||!e.children)&&!e.isRoot;if(S&&f<u){let y=yt(n,ft);n.index=y,n=y}return n.parse=h??null,n.priority=l?.params?.priority??0,n.route||(n.data=g,S&&(n.route=e)),[n,s,g]}a(Et,"parseSegments");function qo(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}a(qo,"sortDynamic");function yt(t,e=0,o,n,r){return{kind:e,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:o,prefix:n,suffix:r}}a(yt,"createSegmentNode");function Go(t,e){let o=yt(),n=[];function r(i,s,c,l){let[u,f,d]=Et(!1,i,s,c,n,l);if(i.children)for(let h of i.children)r(h,f,u,d)}a(r,"visit");for(let i of t)r(i,1,o);for(let i of n)i.sort(qo);e.masksTree=o,e.flatCache=Pt(1e3)}a(Go,"processRouteMasks");function Jo(t,e){t||="/";let o=e.flatCache.get(t);if(o!==void 0)return o;let n=Ne(t,e.masksTree);return e.flatCache.set(t,n),n}a(Jo,"findFlatMatch");function Yo(t,e,o,n,r){t||="/",n||="/";let i=e?`case\0${t}`:t,s=r.singleCache.get(i);return s||(s=yt(),Et(e,{from:t},1,s),r.singleCache.set(i,s)),Ne(n,s,o)}a(Yo,"findSingleMatch");function Xo(t,e,o=!1){let n=o?t:`nofuzz\0${t}`,r=e.matchCache.get(n);if(r!==void 0)return r;t||="/";let i;try{i=Ne(t,e.segmentTree,o)}catch(s){if(s instanceof URIError)i=null;else throw s}return i&&(i.branch=Fe(i.route)),e.matchCache.set(n,i),i}a(Xo,"findRouteMatch");function Zo(t,e=!1){let o=yt(),n=[],r={},i={},s=0;function c(l,u,f,d){if(l.init(s),l.id in r&&ut(),r[l.id]=l,s!==0&&l.path){let g=H(l.fullPath);(!i[g]||l.fullPath.endsWith("/"))&&(i[g]=l)}s++;let[h,p,m]=Et(e,l,u,f,n,d);if(l._interpolation=m,l.children)for(let g of l.children)c(g,p,h,m)}a(c,"visit"),c(t,1,o);for(let l of n)l.sort(qo);return{processedTree:{segmentTree:o,singleCache:Pt(1e3),matchCache:Pt(1e3),flatCache:null,masksTree:null},routesById:r,routesByPath:i}}a(Zo,"processRouteTree");function Ne(t,e,o=!1){let n=t.split("/"),r=Cr(t,n,e,o);if(!r)return null;let[i]=Qo(t,n,r);return{route:r.node.route,rawParams:i}}a(Ne,"findMatch");function Qo(t,e,o){let n=br(o.node),r=o.node.data&&wr(o.node.data),i=Object.create(null),s=o.extract?.part??0,c=o.extract?.node??0,l=o.extract?.path??0,u=o.extract?.param??0;for(;c<n.length;s++,c++,l++){let f=n[c];if(f.kind===ft)break;if(f.kind===Ko){s--,l--;continue}let d=e[s],h=l;if(d&&(l+=d.length),f.kind===1||f.kind===3){let p=r[u++];if(f.kind===3&&o.skipped&1<<c){s--,l=h-1;continue}let m=f.suffix||f.prefix?d.substring(f.prefix.length,d.length-f.suffix.length):d;(m||f.kind===1)&&(i[p]=decodeURIComponent(m))}else if(f.kind===2){let p=f,m=t.substring(h+p.prefix.length,t.length-p.suffix.length),g=decodeURIComponent(m);i["*"]=g,i._splat=g;break}}return o.rawParams&&Object.assign(i,o.rawParams),[i,{part:s,node:c,path:l,param:u}]}a(Qo,"extractParams");function Fe(t){let e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}a(Fe,"buildRouteBranch");function br(t){let e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}a(br,"buildBranch");function Cr(t,e,o,n){if(t==="/"&&o.index)return{node:o.index,skipped:0};let r=!et(e),i=r&&t!=="/",s=e.length-(r?1:0),c=[{node:o,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let f=c.pop(),{node:d,index:h,skipped:p,statics:m,dynamics:g,optionals:S}=f,{extract:y,rawParams:R}=f;if(d.kind===2&&d.route&&!ae(u,f))continue;if(d.parse){if(!jo(t,e,f))continue;R=f.rawParams,y=f.extract}n&&d.route&&d.kind!==ft&&ae(l,f)&&(l=f);let b=h===s;if(b&&(d.route&&(!i||d.kind===ft||d.kind===2)&&ae(u,f)&&(u=f),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;let w=b?void 0:e[h],C;if(b&&d.index){let _={node:d.index,index:h,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R},v=!0;if(d.index.parse&&(jo(t,e,_)||(v=!1)),v){if(!g&&!S&&!p&&Pr(m,s))return _;ae(u,_)&&(u=_)}}if(d.wildcard)for(let _=d.wildcard.length-1;_>=0;_--){let v=d.wildcard[_],{prefix:x,suffix:P}=v;if(!(x&&(b||!(v.caseSensitive?w:C??=w.toLowerCase()).startsWith(x)))){if(P){if(b)continue;let L=e.slice(h).join("/"),k=L.slice(-P.length);if((v.caseSensitive?k:k.toLowerCase())!==P||L.length-P.length<x.length)continue}c.push({node:v,index:s,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}}if(d.optional){let _=p|1<<d.depth+1;for(let v=d.optional.length-1;v>=0;v--){let x=d.optional[v];c.push({node:x,index:h,skipped:_,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}if(!b)for(let v=d.optional.length-1;v>=0;v--){let x=d.optional[v],{prefix:P,suffix:L}=x;if(P||L){let k=x.caseSensitive?w:C??=w.toLowerCase();if(P&&!k.startsWith(P)||L&&k.indexOf(L,k.length-L.length)<P.length)continue}c.push({node:x,index:h+1,skipped:p,statics:m,dynamics:g,optionals:S+ie(s,h),extract:y,rawParams:R})}}if(!b&&d.dynamic&&w)for(let _=d.dynamic.length-1;_>=0;_--){let v=d.dynamic[_],{prefix:x,suffix:P}=v;if(x||P){let L=v.caseSensitive?w:C??=w.toLowerCase();if(x&&!L.startsWith(x)||P&&L.indexOf(P,L.length-P.length)<x.length)continue}c.push({node:v,index:h+1,skipped:p,statics:m,dynamics:g+ie(s,h),optionals:S,extract:y,rawParams:R})}if(!b&&d.staticInsensitive){let _=d.staticInsensitive.get(C??=w.toLowerCase());_&&c.push({node:_,index:h+1,skipped:p,statics:m+ie(s,h),dynamics:g,optionals:S,extract:y,rawParams:R})}if(!b&&d.static){let _=d.static.get(w);_&&c.push({node:_,index:h+1,skipped:p,statics:m+ie(s,h),dynamics:g,optionals:S,extract:y,rawParams:R})}if(d.pathless)for(let _=d.pathless.length-1;_>=0;_--){let v=d.pathless[_];c.push({node:v,index:h,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}}if(u)return u;if(n&&l){let f=l.index;for(let h=0;h<l.index;h++)f+=e[h].length;let d=f===t.length?"/":t.slice(f);return l.rawParams??=Object.create(null),l.rawParams["**"]=decodeURIComponent(d),l}return null}a(Cr,"getNodeMatch");function ie(t,e){return 2**(t-e-1)}a(ie,"segmentScore");function Pr(t,e){return t===2**(e-1)-1}a(Pr,"isPerfectStaticMatch");function jo(t,e,o){let n,r;try{[n,r]=Qo(t,e,o)}catch{return null}if(o.rawParams=n,o.extract=r,!o.node.parse)return!0;try{if(o.node.parse(n)===!1)return null}catch{}return!0}a(jo,"validateParseParams");function ae(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===ft)>(t.node.kind===ft)||e.node.kind===ft==(t.node.kind===ft)&&e.node.depth>t.node.depth))):!0}a(ae,"isFrameMoreSpecific");function tn(t,e,o){let n=At(t),r=`/${n}`,i=e?r:r.toLowerCase(),s=`${i}/`,c={input:a(({url:l})=>{let u=e?l.pathname:l.pathname.toLowerCase();return u===i?l.pathname="/":u.startsWith(s)&&(l.pathname=l.pathname.slice(r.length)),l},"input"),output:a(({url:l})=>(l.pathname=at(`/${n}${l.pathname}`),l),"output")};return o?{input:a(({url:l})=>ce(o,c.input({url:l})),"input"),output:a(({url:l})=>c.output({url:Te(o,l)}),"output")}:c}a(tn,"rewriteBasepath");function ce(t,e){let o=t?.input?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(ce,"executeRewriteInput");function Te(t,e){let o=t?.output?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(Te,"executeRewriteOutput");function Me(t){let e=t;return{get(){return e},set(o){e=mt(o,e)}}}a(Me,"createNonReactiveMutableStore");function De(t){return{get(){return t()}}}a(De,"createNonReactiveReadonlyStore");function en(t,e){let{createMutableStore:o,createReadonlyStore:n,batch:r}=e,i=new Map,s=o("idle"),c=o(t),l=o(void 0),u=o([]),f=n(()=>u.get().map(g=>i.get(g).get())),d=n(()=>({status:s.get(),isLoading:s.get()==="pending",matches:f.get(),location:c.get(),resolvedLocation:l.get()}));function h(g){let S=i.get(g);return S||(S=o(void 0),i.set(g,S)),S}a(h,"getMatchStore");let p={status:s,location:c,resolvedLocation:l,ids:u,matches:f,byRoute:i,__store:d,getMatchStore:h,setMatches:m};function m(g){let S=u.get(),y=g.map(R=>R.routeId);r(()=>{Fo(S,y)||u.set(y);for(let R of S)y.includes(R)||i.get(R).set(()=>{});for(let R of g){let b=h(R.routeId);b.get()!==R&&b.set(R)}})}return a(m,"setMatches"),p}a(en,"createRouterStores");var dt="__TSR_index",on="popstate",nn="beforeunload",Er=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function $t(t){let e=Er.exec(t);return e?"/"+t.slice(e[0].length):t}a($t,"normalizeProtocolRelative");function $e(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,e=>`
2
+ \r`.includes(e)?"":encodeURIComponent(e))),$t(t)}a($e,"normalizeHref");function Be(t){let e=t.getLocation(),o=new Set,n=a(s=>{e=t.getLocation(),o.forEach(c=>c({location:e,action:s}))},"notify"),r=a(s=>{t.notifyOnIndexChange??!0?n(s):e=t.getLocation()},"handleIndexChange"),i=a(async s=>{let c=s.navigateOpts?.ignoreBlocker?void 0:t.getBlockers?.();if(typeof document<"u"&&c?.length&&(s.type==="PUSH"||s.type==="REPLACE"))for(let l of c){let u=Lt(s.path,s.state);if(await l.blockerFn({currentLocation:e,nextLocation:u,action:s.type})){t.onBlocked?.();return}}s.task()},"tryNavigation");return{get location(){return e},get length(){return t.getLength()},subscribers:o,subscribe:a(s=>(o.add(s),()=>{o.delete(s)}),"subscribe"),push:a((s,c,l)=>{let u=e.state[dt];c=Ae(u+1,c),i({task:a(()=>{t.pushState(s,c),n({type:"PUSH"})},"task"),navigateOpts:l,type:"PUSH",path:s,state:c})},"push"),replace:a((s,c,l)=>{let u=e.state[dt];c=Ae(u,c),i({task:a(()=>{t.replaceState(s,c),n({type:"REPLACE"})},"task"),navigateOpts:l,type:"REPLACE",path:s,state:c})},"replace"),go:a((s,c)=>{i({task:a(()=>{t.go(s,c?.ignoreBlocker??!1),r({type:"GO",index:s})},"task"),navigateOpts:c,type:"GO"})},"go"),back:a(s=>{i({task:a(()=>{t.back(s?.ignoreBlocker??!1),r({type:"BACK"})},"task"),navigateOpts:s,type:"BACK"})},"back"),forward:a(s=>{i({task:a(()=>{t.forward(s?.ignoreBlocker??!1),r({type:"FORWARD"})},"task"),navigateOpts:s,type:"FORWARD"})},"forward"),canGoBack:a(()=>e.state[dt]!==0,"canGoBack"),createHref:a(s=>t.createHref(s),"createHref"),block:a(s=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,s]),()=>{let l=t.getBlockers?.()??[];t.setBlockers?.(l.filter(u=>u!==s))}},"block"),flush:a(()=>t.flush?.(),"flush"),destroy:a(()=>t.destroy?.(),"destroy"),notify:n,_getBlockers:a(()=>t.getBlockers?.()??[],"_getBlockers")}}a(Be,"createHistory");function Ae(t,e){let o=He();return{...e,key:o,__TSR_key:o,[dt]:t}}a(Ae,"assignKeyAndIndex");function Ve(t){let e=t?.window??(typeof document<"u"?window:void 0),o=e.history.pushState,n=e.history.replaceState,r=[],i=a(()=>r,"_getBlockers"),s=a(v=>r=v,"_setBlockers"),c=a(v=>$e(t?.createHref?t.createHref(v):v),"createHref"),l=t?.parseLocation??(()=>Lt(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){let v=He();e.history.replaceState({[dt]:0,key:v,__TSR_key:v},"")}let u=l(),f,d=!1,h=!1,p=!1,m=!1,g=a(()=>u,"getLocation"),S,y=a(()=>{S&&(_._ignoreSubscribers=!0,(S[2]?e.history.pushState:e.history.replaceState)(S[1],"",S[0]),_._ignoreSubscribers=!1,S=void 0,f=void 0)},"flush"),R=a((v,x,P)=>{let L=t?.createHref?c(x):void 0,k=!!S;k||(f=u),u=Lt(x,P),S=[L??u.href,P,S?.[2]||v],k||queueMicrotask(()=>y())},"queueHistoryAction"),b=a(v=>{u=l(),_.notify({type:v})},"onPushPop"),w=a(async()=>{if(m=!1,h){h=!1;return}let v=l(),x=v.state[dt]-u.state[dt],P=x===1,L=x===-1,k=!P&&!L||d;d=!1;let E=k?"GO":L?"BACK":"FORWARD",O=k?{type:"GO",index:x}:{type:L?"BACK":"FORWARD"};if(p)p=!1;else{let F=i();if(typeof document<"u"&&F.length){for(let N of F)if(await N.blockerFn({currentLocation:u,nextLocation:v,action:E})){h=!0,e.history.go(-x),_.notify(O);return}}}u=l(),_.notify(O)},"onPushPopEvent"),C=a(v=>{if(m){m=!1;return}let x=!1,P=i();if(typeof document<"u"&&P.length)for(let L of P){let k=L.enableBeforeUnload??!0;if(k===!0){x=!0;break}if(typeof k=="function"&&k()===!0){x=!0;break}}if(x)return v.preventDefault(),v.returnValue=""},"onBeforeUnload"),_=Be({getLocation:g,getLength:a(()=>e.history.length,"getLength"),pushState:a((v,x)=>R(!0,v,x),"pushState"),replaceState:a((v,x)=>R(!1,v,x),"replaceState"),back:a(v=>(v&&(p=!0,m=!0),e.history.back()),"back"),forward:a(v=>{v&&(p=!0,m=!0),e.history.forward()},"forward"),go:a((v,x)=>{d=!0,x&&(p=!0,m=!0),e.history.go(v)},"go"),createHref:c,flush:y,destroy:a(()=>{e.history.pushState=o,e.history.replaceState=n,e.removeEventListener(nn,C,{capture:!0}),e.removeEventListener(on,w)},"destroy"),onBlocked:a(()=>{f&&u!==f&&(u=f)},"onBlocked"),getBlockers:i,setBlockers:s,notifyOnIndexChange:!1});return _._ignoreNextBeforeUnload=v=>{m=!1;try{v=new URL(v,e.document.baseURI).href,m=/^https?:/.test(v)&&(!v.includes("#")||v.split("#")[0]!==e.location.href.split("#")[0])}catch{}},e.addEventListener(nn,C,{capture:!0}),e.addEventListener(on,w),e.history.pushState=function(...v){let x=o.apply(e.history,v);return _._ignoreSubscribers||b("PUSH"),x},e.history.replaceState=function(...v){let x=n.apply(e.history,v);return _._ignoreSubscribers||b("REPLACE"),x},_}a(Ve,"createBrowserHistory");function Lr(t={initialEntries:["/"]}){let e=t.initialEntries,o=t.initialIndex?Math.min(Math.max(t.initialIndex,0),e.length-1):e.length-1,n=e.map((l,u)=>Ae(u,void 0)),r=a(()=>Lt(e[o],n[o]),"getLocation"),i=[];return Be({getLocation:r,getLength:a(()=>e.length,"getLength"),pushState:a((l,u)=>{o=o<e.length-1?o+1:e.length,n[o]=u,e[o]=l,o<e.length-1&&(e.length=o+1,n.length=o+1)},"pushState"),replaceState:a((l,u)=>{n[o]=u,e[o]=l},"replaceState"),back:a(()=>{o=Math.max(o-1,0)},"back"),forward:a(()=>{o=Math.min(o+1,e.length-1)},"forward"),go:a(l=>{o=Math.min(Math.max(o+l,0),e.length-1)},"go"),createHref:$e,getBlockers:a(()=>i,"_getBlockers"),setBlockers:a(l=>i=l,"_setBlockers")})}a(Lr,"createMemoryHistory");function Lt(t,e){let o=$e(t),n=o.indexOf("#"),r=o.indexOf("?");if(!e){let i=He();e={[dt]:0,key:i,__TSR_key:i}}return{href:o,pathname:o.slice(0,n>-1?r>-1?Math.min(n,r):n:r>-1?r:o.length),hash:n>-1?o.slice(n):"",search:r>-1?o.slice(r,n===-1?void 0:n):"",state:e}}a(Lt,"parseHref");function He(){return(Math.random()+1).toString(36).slice(7)}a(He,"createRandomKey");function ze(t,e){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==e||!!t.username||!!t.password}a(ze,"isExternalUrl");function Ue(t){return t.pathname+t.search+t.hash}a(Ue,"getUrlPath");function rn(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}a(rn,"routeNeedsLoad");function vt(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}a(vt,"getLocationChangeInfo");function sn({key:t,__TSR_key:e,__TSR_index:o,__hashScrollIntoViewOptions:n,...r}){return r}a(sn,"_getUserHistoryState");function ln(t){return t.findIndex(e=>e.status==="error"||e.status==="notFound"||e._notFound)+1}a(ln,"lifecycleEnd");function un(t,e,o,n,r,i){n&&(e=e.slice(0,n)),r&&(o=o.slice(0,r));for(let s of e){if(i&&t._tx!==i)return;o.some(c=>c.routeId===s.routeId)||t.routesById[s.routeId].options.onLeave?.(s)}for(let s of o){if(i&&t._tx!==i)return;t.routesById[s.routeId].options[e.some(c=>c.routeId===s.routeId)?"onStay":"onEnter"]?.(s)}}a(un,"runRouteLifecycle");var Ke=class{static{a(this,"RouterCore")}constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async o=>(o(),!1),this.update=o=>{let n=this.options;this.options={...n,...o},this.isServer=this.options.isServer??!1??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ve()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");let r=this.options.basepath??"/",i=this.options.rewrite,s=this.basepath!==r||n?.rewrite!==i||n?.caseSensitive!==this.options.caseSensitive;if(s&&(this.basepath=r,this.rewrite=r!=="/"&&At(r)?tn(r,this.options.caseSensitive,i):i),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||!1){this.routeTree=this.options.routeTree;let c;c=this.buildRouteTree(),!1,this.setRoutes(c)}if(this.stores)s&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let c=this.getStoreConfig(this);this.batch=c.batch,this.stores=en(this.latestLocation,c),$o(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let o=Zo(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Go(this.options.routeMasks,o.processedTree),{...o,resolvePathCache:Pt(1e3)}},this.subscribe=(o,n)=>{let r={eventType:o,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=o=>{for(let n of this.subscribers)if(n.eventType===o.type)try{n.fn(o)}catch(r){console.error(r)}},this.parseLocation=(o,n)=>{let r=a(({pathname:l,search:u,hash:f,href:d},h)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){let S=this.options.parseSearch(u),y=this.options.stringifySearch(S);return{href:l+y+f,publicHref:l+y+f,pathname:bt(l),external:!1,searchStr:y,search:gt(n?.search,S),hash:bt(f.slice(1)),state:tt(n?.state,h)}}let p=ce(this.rewrite,new URL(d,this.origin)),m=this.options.parseSearch(p.search),g=this.options.stringifySearch(m);return p.search=g,{href:p.href.replace(p.origin,""),publicHref:d,pathname:bt($t(p.pathname)),external:!!this.rewrite&&ze(p,this.origin),searchStr:g,search:gt(n?.search,m),hash:bt(p.hash.slice(1)),state:tt(n?.state,h)}},"parse"),i=r(o,o.state),{__tempLocation:s,__tempKey:c}=i.state;if(s&&(!c||c===this.tempLocationKey)){let l=r(s,{...s.state,__tempLocation:void 0,key:i.state.key,__TSR_key:i.state.__TSR_key});return l.maskedLocation=i,l}return i},this.matchRoutes=(o,n,r)=>typeof o=="string"?this.matchRoutesInternal({pathname:o,search:n},r):this.matchRoutesInternal(o,n),this.getMatchedRoutes=o=>{let n=Object.create(null),r=Xo(H(o),this.processedTree,!0);return r&&Object.assign(n,r.rawParams),[r?.branch||[this.routesById.__root__],n,r?.route]},this.buildLocation=o=>{if(!!1){let s=this.staticLocations.get(o);if(s)return s}let n=!1,r=a((s={})=>{if(s.href){let F=Lt(s.href,{});s={...s,to:ce(this.rewrite,new URL(F.pathname,this.origin)).pathname,search:this.options.parseSearch(F.search),hash:F.hash.slice(1)}}let c=o._fromLocation||this._pendingLocation||this.latestLocation,l,u=a(()=>(n=!0,c),"current"),f=a(()=>l??=this.matchRoutesLightweight(u()),"currentMatch"),d=s.to?`${s.to}`:".",h=ee(d[0]==="/"?"":s.unsafeRelative==="path"?u().pathname:s.from??f()[1],d,this.options.trailingSlash,this.resolvePathCache),p=this.routesByPath[H(h)],m=h.includes("$"),g;if(p)g=p._branch??=Fe(p);else if(m)g=[];else{let[F,N,D]=this.getMatchedRoutes(h);g=F,this.options.notFoundRoute&&(!D||D.path!=="/"&&N["**"])&&(g=[...g,this.options.notFoundRoute])}let S=m?p?._interpolation??Et(!1,{fullPath:h},0):void 0,y;for(let F of g){let N=F.options.params?.stringify??F.options.stringifyParams;if(N){let D=f()[3];if(y??=We(s.params,D),!Tt(y))break;y===D&&(y=Object.assign(Mt(),y));try{Object.assign(y,N(y))}catch{}}}y??=We(s.params,kr(s.params,S)?f()[3]:je);let R=o.leaveParams?h:$t(bt(S?oe(h,S,y,this.pathParamsDecoder):h)),b=Ir(g,o._includeValidateSearch),w=a(()=>{let F=f()[2];if(o._includeValidateSearch&&this.options.search?.strict){let N={};g.forEach(D=>{if(D.options.validateSearch)try{Object.assign(N,le(D.options.validateSearch,{...N,...F}))}catch{}}),F=N}return F},"fromSearch"),C=b.length?Or(b,w(),s):s.search===!0?w():typeof s.search=="function"?s.search(w()):s.search||je,_=this.options.stringifySearch(C),v=s.hash===!0?u().hash:typeof s.hash=="function"?s.hash(u().hash):s.hash||void 0,x=v?`#${v}`:"",P=s.state?s.state===!0?u().state:typeof s.state=="function"?s.state(u().state):s.state:je,L=`${R}${_}${x}`,k,E,O=!1;if(this.rewrite){let F=new URL(L,this.origin),N=F.origin,D=Te(this.rewrite,F);k=Ue(F),ze(D,N)?(E=D.href,O=!0):E=$t(Ue(D))}else k=No(L),E=k;return{publicHref:E,href:k,pathname:R,search:C,searchStr:_,state:P,hash:v??"",external:O,unmaskOnReload:s.unmaskOnReload}},"build"),i=r(o);if(o.mask)i.maskedLocation=r({from:o.from,...o.mask});else if(this.options.routeMasks){let s=Jo(i.pathname,this.processedTree);if(s){let c=Object.assign(Mt(),s.rawParams),{from:l,params:u,...f}=s.route,d=We(u,c);i.maskedLocation=r({from:o.from,...f,params:d})}}return!!1&&!n&&o._fromLocation&&this.staticLocations.set(o,i),i},this.commitLocation=async({viewTransition:o,ignoreBlocker:n,...r})=>{if(!1)return;let i=r.maskedLocation??r;if(i.external&&!!1)return an(this,i.publicHref,{replace:r.replace,ignoreBlocker:n});let s,c=H(this.latestLocation.href)===H(r.href)&&J(sn(r.state),sn(this.latestLocation.state)),l=this._commitPromise,u,f=new Promise(d=>{u=d});if(f.resolve=()=>{u(),l?.resolve()},this._commitPromise=f,c)this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...p}=r;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state={...p.state,__hashScrollIntoViewOptions:h??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=o,s=r.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:s}})}return this._scroll.n=r.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:o,resetScroll:n,hashScrollIntoView:r,viewTransition:i,ignoreBlocker:s,...c}={})=>{if(!1)return Promise.resolve();let l=this.buildLocation({...c,_includeValidateSearch:!0});this._pendingLocation=l;let u=this.commitLocation({...l,viewTransition:i,replace:o,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:s});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:o,reloadDocument:n,href:r,publicHref:i,...s})=>{if(!1)return;let c=r?it(r):void 0;if(c||n){if(o!==void 0||!r){let u=this.buildLocation({to:o,...s}),f=u.maskedLocation??u;r??=f.publicHref,i??=f.publicHref}return an(this,!c&&i?i:r,s)}return this.buildAndCommitLocation({...s,href:r,to:o,_isNavigate:!0})},this.load=async o=>{if(!1)return(void 0)(this,o);this.updateLatestLocation(),o?.action&&(this._scroll.h=o.action.type==="PUSH"||o.action.type==="REPLACE"),await dn(this,o)},this.startViewTransition=o=>{let n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&!!1&&typeof document.startViewTransition=="function"){let r;if(typeof n=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){let i=this.latestLocation,s=this.stores.resolvedLocation.get(),c=typeof n.types=="function"?n.types(vt(i,s)):n.types;if(c===!1)return o();r={update:o,types:c}}else r=o;return document.startViewTransition(r).updateCallbackDone}return o()},this.invalidate=o=>{let n=this._committed,r=o?.filter,i=this._preloads,s=new Set,c=a(f=>{(!r||r(f))&&s.add(f.id)},"consider");n.forEach(c),this._cache.forEach(c),i?.forEach(f=>f.forEach(c)),this._tx?.[3].forEach(c);let l=[];for(let[f,d]of i??[])d.some(h=>s.has(h.id))&&(i.delete(f),l.push(f));let u=a(f=>{if(s.has(f.id)){let d=this.routesById[f.routeId],h={...f,invalid:!0,...(o?.forcePending||f.status==="error"||f.status==="notFound")&&rn(d)?{status:"pending",error:void 0}:void 0};return f._flight=void 0,h}return f},"invalidate");this._committed=n.map(u);for(let[f,d]of this._cache)s.has(f)&&(d.invalid=!0,o?.forcePending&&(d.status="pending"));for(let f of s){let d=this._flights?.get(f);this._flights?.delete(f),d&&!d[2]&&l.push(d[1])}for(let f of l)f.abort();return this.shouldViewTransition=!1,this.load({sync:o?.sync})},this.resolveRedirect=o=>{let n=o.options,r=o.headers.get("Location")||n.href;if(!r){let s=this.buildLocation(n);r=(s.maskedLocation??s).publicHref||"/"}let i;if(ke.test(r)||(i=it(r))&&!this.protocolAllowlist.has(i))throw new Error("Redirect blocked: unsafe protocol");if(i==="http:"||i==="https:"){let s=new URL(r);s.pathname.startsWith("//")?r=s.href:ze(s,this.origin)||(r=Ue(s),i=void 0)}return i&&(n.reloadDocument=!0),n.href=r,o.headers.set("Location",r),o},this.clearCache=o=>{let n=this._cache,r=this._preloads,i=o?.filter,s=[],c=[];for(let[u,f]of n)(!i||i(f))&&(c.push(u),s.push(f));let l=[];for(let[u,f]of r??[])(!i||f.some(i))&&(l.push(u),s.push(...f));for(let u of c)n.delete(u);for(let u of l)r.delete(u);for(let u of s){let f=u._flight;u._flight=void 0,f&&!--f[2]&&(this._flights?.get(u.id)===f&&this._flights.delete(u.id),l.push(f[1]))}for(let u of l)u.abort()},this.loadRouteChunk=St,this.preloadRoute=o=>hn(this,o),this.matchRoute=(o,n)=>{let r={...o,to:o.to?ee(o.from||"",o.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:o.params||{},leaveParams:!0},i=this.buildLocation(r),s=this.stores.status.get()==="pending";if(n?.pending&&!s)return!1;let c=n?.pending??!s?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=Yo(i.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,c.pathname,this.processedTree);return!l||o.params&&!J(l.rawParams,o.params,!0)?!1:n?.includeSearch??!0?J(c.search,i.search,!0)?l.rawParams:!1:l.rawParams},this.getStoreConfig=e,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=To(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Uo,parseSearch:t.parseSearch??zo,protocolAllowlist:t.protocolAllowlist??Le}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let e=this.options.notFoundRoute;e&&(e.init(99999999999),this.routesById[e.id]!==e&&(e._interpolation=Et(!1,e,0)),this.routesById[e.id]=e)}matchRoutesInternal(t,e){let[o,n,r]=this.getMatchedRoutes(t.pathname),i=o,s=!1;(r?r.path!=="/"&&n["**"]:H(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:s=!0);let c=s?Nr(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=this._committed,f=a((h,p)=>{let m=u[p];return m?.routeId===h.id?m:h===this.options.notFoundRoute?u.find(g=>g.routeId===h.id):void 0},"previousAt"),d;for(let h=0;h<i.length;h++){let p=i[h],m=l[h-1],g,S,y;{let O=m?.search??t.search,F=m?._strictSearch??void 0;try{let N=le(p.options.validateSearch,{...O})??void 0;g={...O,...N},S={...F,...N}}catch(N){let D=N;if(N instanceof Bt||(D=new Bt(N.message,{cause:N})),e?.throwOnError)throw D;g=O,S={},y=D}}let R="",b="";try{R=p.options.loaderDeps?.({search:g})??"",b=R&&JSON.stringify(R)||""}catch(O){if(e?.throwOnError)throw O;y??=O}let w=Mt(),C=p._interpolation?oe(p.fullPath,p._interpolation,n,this.pathParamsDecoder,w):p.fullPath,_=p.id+C+b,v=f(p,h),x=this._cache.get(_)??(v?.id===_?v:void 0);d=x?._strictParams??Object.assign(w,d);let P;if(!x)try{cn(p,d)}catch(O){if(q(O)||se(O)?P=O:P=new fn(O.message,{cause:O}),e?.throwOnError)throw P}let L=v?"stay":"enter",k;if(x)k={...x,cause:L,search:v?gt(v.search,g):gt(x.search,g),_strictSearch:S,searchError:y};else{let O=rn(p)?"pending":"success";k={id:_,ssr:p.options.ssr,index:h,routeId:p.id,params:v?.params??d,_strictParams:d,pathname:C,updatedAt:Date.now(),search:v?gt(v.search,g):g,_strictSearch:S,searchError:y,status:O,isFetching:!1,error:void 0,paramsError:P,context:{},abortController:e?._controller??new AbortController,cause:L,loaderDeps:v?tt(v.loaderDeps,R):R,invalid:!1,preload:!1,staticData:p.options.staticData||{},fullPath:p.fullPath}}let E=c===p.id;k._notFound&&!E&&(k.error=void 0),k._notFound=E,l[h]=k}for(let h=0;h<l.length;h++){let p=l[h];p.params=p.cause==="stay"?gt(p.params,d):d,e?._controller&&(p.context={})}return l}matchRoutesLightweight(t){let e=et(this.stores.ids.get()),o=e?this.stores.byRoute.get(e).get():void 0,n=o?.id,r=this.lightweightCache.get(t);if(r&&r[0]===n)return r[1];let[i,s]=this.getMatchedRoutes(t.pathname),c=et(i),l={...t.search};for(let h of i)try{Object.assign(l,le(h.options.validateSearch,l))}catch{}let u=o&&o.routeId===c.id&&o.pathname===t.pathname,f;if(u)f=o.params;else{let h=s;for(let p of i)try{cn(p,h)}catch{}f=h}let d=[i,c.fullPath,l,f];return this.lightweightCache.set(t,[n,d]),d}};async function an(t,e,{replace:o,ignoreBlocker:n}){if(!Dt(e,t.protocolAllowlist)){if(!n){let r=t.history._getBlockers();for(let i of r)if(i?.blockerFn&&await i.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:o?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(e),o?window.location.replace(e):window.location.href=e}}a(an,"documentNavigation");var Bt=class extends Error{static{a(this,"SearchParamError")}},fn=class extends Error{static{a(this,"PathParamError")}};function le(t,e){if(t==null)return{};if("~standard"in t){let o=t["~standard"].validate(e);if(o instanceof Promise)throw new Bt("Async validation not supported");if(o.issues)throw new Bt(JSON.stringify(o.issues,void 0,2),{cause:o});return o.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}a(le,"validateSearch");function We(t,e){if(t===void 0||t===!0)return e;let o=Object.create(null);return t===!1||t===null?o:typeof t=="function"?(Object.assign(o,e),Object.assign(o,t(o))):Object.assign(o,e,t)}a(We,"resolveNextParams");function kr(t,e){return typeof t=="function"?!0:!e||t===!1||t===null?!1:t===void 0||t===!0||e.some(o=>typeof o!="string"&&!Zt.call(t,o[1]))}a(kr,"needsInheritedParams");var je=Object.freeze({});function Ir(t,e){let o=[];for(let n=0;n<t.length;n++){let r=t[n].options;if("search"in r)r.search?.middlewares&&o.push(...r.search.middlewares);else if(r.preSearchFilters||r.postSearchFilters){let s=a(({search:c,next:l})=>{let u=l(r.preSearchFilters?r.preSearchFilters.reduce((f,d)=>d(f),c):c);return r.postSearchFilters?r.postSearchFilters.reduce((f,d)=>d(f),u):u},"legacyMiddleware");o.push(s)}let i=r.validateSearch;if(e&&i){let s=a(({search:c,next:l,meta:u})=>{let f=l(c);try{let d=le(i,f);if(u&&d)for(let h in d)h in f||(u.defaulted||=new Map).set(h,d[h]);return{...f,...d}}catch{}return f},"validate");o.push(s)}}return o}a(Ir,"getSearchMiddlewares");function Or(t,e,o){let n=a((r,i,s)=>{if(r>=t.length){if(!o.search)return{};if(o.search===!0)return i;let l=mt(o.search,i);return s&&(s.explicit=l),l}let c=a((l,u)=>{if(u){let f=s||{};return{search:n(r+1,l,f),meta:f}}return n(r+1,l,s)},"next");return t[r]({search:i,next:c,meta:s})},"applyNext");return n(0,e)}a(Or,"applySearchMiddleware");function Nr(t,e){if(t!=="root"){let o;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.options.notFoundComponent)return r.id;o||=r.children&&r.id}if(o)return o}return Y}a(Nr,"findGlobalNotFoundRouteId");function cn(t,e){let o=t.options.params?.parse??t.options.parseParams;o&&Object.assign(e,o(e))}a(cn,"extractStrictParams");function qe(t,e){return t.options[e]?.preload?.()}a(qe,"preloadComponent");function Fr(t,e){let o=qe(t,"component"),n=qe(t,"pendingComponent");return e&&(n?n=n.then(e):e()),o&&n?Promise.all([o,n]).then(()=>{}):o??n}a(Fr,"loadComponents");function St(t,e,o){let n=a(()=>e===!1?void 0:e?qe(t,e):Fr(t,o),"afterLazy"),r=t._lazy;if(r)return r===!0?n():r.then(n);if(!t.lazyFn)return n();let i=t.lazyFn().then(s=>{{let{id:c,...l}=s.options;Object.assign(t.options,l),t._lazy=!0}},s=>{throw t._lazy=void 0,s});return t._lazy=i,i.then(n)}a(St,"loadRouteChunk");function fe(t){let e=t.findIndex(o=>o.status!=="success"||o._notFound)+1;return e&&e<t.length?t.slice(0,e):t}a(fe,"_getRenderedMatches");function Ye(t,e,o){let n=t._tx;return e&&n?.[2]===o&&!n[3].some(r=>r.routeId===e)}a(Ye,"_isRouteDeparting");var rt=0,lt=1,de=2,z=3,ht=[4];function zt(t){return typeof t[0]=="number"}a(zt,"isControl");function _t(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((o,n)=>{let r=a(()=>n(e),"abort");e.addEventListener("abort",r,{once:!0}),Promise.resolve(t).then(o,n).then(()=>e.removeEventListener("abort",r))})}a(_t,"waitFor");function wt(t,e){return t.routesById[e.routeId]}a(wt,"getRoute");function Ut(t,e,o){return se(t)?[z,t]:q(t)?(t.routeId||=o,[de,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[lt,t]):[rt,t]}a(Ut,"normalize");function Xe(t,e){let o=Ut(e,!0,t.id);if(o[0]!==lt)return o;try{t.options.onError?.(o[1])}catch(n){o=Ut(n,!0,t.id)}return o}a(Xe,"normalizeError");function Ht(t,e,o,n,r){return r[0].signal.aborted?ht:to(t,e,o,Xe(o,n),r)}a(Ht,"normalizeLaneError");async function Tr(t,e,o,n,r,i){let[s,c]=e,l=o[0].signal,u=!!o[3];for(let f=o[6]??0;f<n;f++){let d=c[f],h=wt(t,d);d.abortController=o[0];let p=c[f-1]?.context??t.options.context??{},m={params:d.params,location:s,navigate:a(R=>t.navigate({...R,_fromLocation:s}),"navigate"),buildLocation:t.buildLocation,cause:u?"preload":d.cause,abortController:o[0],preload:u,matches:c,routeId:h.id};try{let R=d._ctx||=h.options.context?h.options.context({...m,deps:d.loaderDeps,context:p})||{}:void 0;d.context={...p,...R}}catch(R){return ct(t,d),[f,Ht(t,e,h,R,o)]}if(l.aborted)return[f,ht];let g=d.paramsError??d.searchError;if(g!==void 0)return ct(t,d),[f,Ht(t,e,h,g,o)];let S=h.options.beforeLoad;if(!S)continue;let y=d.status;f>=i&&(d.status="pending",o[7]?.());try{Wt(t,d,"beforeLoad",o[0]);let R=S({...m,search:d.search,context:d.context,...t.options.additionalContext}),b=await(typeof R?.then=="function"?_t(R,l):R);if(l.aborted)return[f,ht];let w=to(t,e,h,Ut(b,!1,h.id),o);if(w[0]!==rt)return ct(t,d),[f,w];d.context={...d.context,...b}}catch(R){return ct(t,d),[f,Ht(t,e,h,R,o)]}finally{d.status=y,Wt(t,d,!1,o[0])}}r()}a(Tr,"contextualize");function Ze(t,e,o){if(!(!o||--o[2])){if(t._flights?.get(e.id)===o){let n=t._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(e)&&n[3].some(r=>r.id===e.id)&&n[3].some(r=>r.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return o[1]}}a(Ze,"releaseOwnedFlight");function ct(t,e){let o=e._flight;e._flight=void 0,Ze(t,e,o)?.abort()}a(ct,"releaseFlight");function U(t,e,o,n){let r=[];for(let i of e)if(!o?.includes(i)){let s=i._flight;if(i._flight=void 0,n&&s?.[2]===1&&t._flights?.get(i.id)===s&&o?.some(c=>c.id===i.id))s[2]=0;else{let c=Ze(t,i,s);c&&r.push(c)}}for(let i of r)i.abort()}a(U,"transferMatchResources");function Qe(t){for(let e of t){let o=e._flight;o&&o[2]++}}a(Qe,"acquireMatchResources");function Wt(t,e,o,n){if(e.isFetching=o,n&&t._tx?.[0]!==n)return;let r=t.stores.byRoute.get(e.routeId),i=r?.get();i?.id===e.id&&r.set({...i,isFetching:o})}a(Wt,"setFetching");function Sn(t,e,o,n,r,i,s){let c=e[0];return{params:o.params,location:c,navigate:a(l=>t.navigate({...l,_fromLocation:c}),"navigate"),cause:s?"preload":o.cause,abortController:r,preload:s,deps:o.loaderDeps,parentMatchPromise:i,context:o.context,route:n,...t.options.additionalContext}}a(Sn,"getLoaderContext");async function pn(t,e,o,n,r,i,s){let c=s[0],l=c.signal;if(l.aborted)return ht;if(!r)return[rt,void 0];let u=o._flight;Wt(t,o,"loader",c);try{if(!u){let f=new AbortController;u=[Promise.resolve().then(()=>r(Sn(t,e,o,n,f,i,!!s[3]))).then(d=>Ut(d,!1,n.id),d=>Ut(d,!0,n.id)).then(d=>(d[0]!==rt&&t._flights?.get(o.id)===u&&(t._flights.delete(o.id),u[2]||f.abort()),d[0]===lt&&u[2]?Xe(n,d[1]):d)),f,1],(t._flights??=new Map).set(o.id,u)}return o._flight=u,o.abortController=u[1],to(t,e,n,await _t(u[0],l),s)}catch(f){if(f!==l||!l.aborted)throw f;return ct(t,o),ht}finally{Wt(t,o,!1,c)}}a(pn,"loadResource");function mn(t,e,o){e[0]!==z&&(t.status="success",t.error=void 0,e[0]===rt?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=o):t.invalid=!0)}a(mn,"settleInto");function Mr(t,e,o){let n=t._cache.get(e.id);if(n!==o||t._committed.some(i=>i.id===e.id&&i._flight===e._flight))return;let r={...e,_notFound:void 0,context:{}};r._flight&&r._flight[2]++,t._cache.set(e.id,r),n&&ct(t,n)}a(Mr,"cacheLoaderMatch");function gn(t,e){return e[0]===lt||e[0]===de?{...t,status:e[0]===lt?"error":"notFound",error:e[1],_flight:void 0}:t}a(gn,"getParentSnapshot");function Dr(t,e,o,n,r,i,s){let c=e[1][o],l=wt(t,c),u=!!i[3],f=t._cache.get(c.id),d,h=!1,p;try{if(c.status==="success"&&(d=l.options.shouldReload,typeof d=="function"&&(d=d(Sn(t,e,c,l,i[0],r,u))),i[0].signal.aborted&&(p=ht)),!p)if(c.status!=="success")h=!0;else{let E=u||c.preload?l.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:l.options.staleTime??t.options.defaultStaleTime??0;h=!!(c.invalid||d||d===void 0&&Date.now()-c.updatedAt>=E&&(i[5]||c.cause==="enter"||i[2].some(O=>O.routeId===c.routeId&&O.id!==c.id)))}}catch(E){c.invalid=!0,ct(t,c),p=Ht(t,e,l,E,i)}let m=l.options.loader,g=typeof m=="function",S=g?m:m?.handler,y=!u||l.options.preload!==!1,R=y&&m?t._flights?.get(c.id):void 0;R===c._flight||p?R=void 0:R&&!h&&!u&&d===void 0?h=!0:h||(R=void 0);let b=!!(m&&h&&c.status==="success"&&!u&&!i[4]&&((g?void 0:m.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),w=h&&y,C=w&&!b&&(c.status!=="success"||!!m),_=o>=s?i[7]:void 0,v=l.lazyFn&&l._lazy!==!0?_:void 0;if(w&&!m&&(c.invalid=!1,c.updatedAt=Date.now()),R&&R[2]++,C){let E=c._flight;c._flight=R,Ze(t,c,E)?.abort(),o>=s&&(c.status="pending"),_?.()}w||(c.isFetching=!1);let x=!p&&C?pn(t,e,c,l,S,r,i).then(E=>(mn(c,E,u),E[0]===rt&&(m&&!i[0].signal.aborted&&Mr(t,c,f),o>=s&&(c.status="pending")),E)):Promise.resolve(p??[rt,c.loaderData]),P=(async()=>{try{let O=St(l,void 0,v);O&&await _t(O,i[0].signal)}catch(O){if(!e[1].some((F,N)=>N<=o&&(F.status==="error"||F.status==="notFound"||F._notFound)))return[o,Ht(t,e,l,O,i)]}let E=await x;C&&E[0]===rt&&c.status==="pending"&&!i[0].signal.aborted&&(c.status="success",_?.())})();if(n.push([o,x,P]),!b)return x.then(E=>gn(c,E));let L={...c,status:"pending",preload:!1,_flight:R};c.invalid=!1,c.isFetching="loader";let k=pn(t,e,L,l,S,r,i).then(E=>(c.isFetching=!1,mn(L,E,!1),E));return(e[2]??=[]).push([o,k,P,L]),k.then(E=>gn(L,E))}a(Dr,"createLoaderTask");async function Ge(t,e,o,n,r=0){let i=o?.[1][1],s=i?.routeId?e.findIndex(c=>c.routeId===i.routeId):o?.[0]??e.length-1;s<0&&(s=0);for(let c=s;c>=0;c--){let l=wt(t,e[c]);try{let u=St(l,!1);u&&await _t(u,n)}catch(u){if(u===n&&n.aborted)throw u}if(l.options.notFoundComponent)return c}return i?.routeId?s:r}a(Ge,"getNotFoundBoundary");function Rt(t,e){e[2]&&(U(t,e[2].map(o=>o[3])),e[2]=void 0)}a(Rt,"discardBackground");async function yn(t,e,o,n){let r;try{await Promise.all(t.map(i=>i[1].then(async s=>{let c=i[0];if(!(n&&c>=await n)){if(s[0]>=z)throw[c,s];!r&&s[0]!==rt&&(r=[c,s],await Promise.all((o??[]).map(l=>{if(!(l[0]<=c))return l[1].then(u=>{if(u[0]===z)throw[l[0],u]})})))}})))}catch(i){return i}return e??r}a(yn,"settleTasks");function to(t,e,o,n,r,i){for(;n[0]===z;){let s=n[1],c=s.options;try{if((c.href||s.headers.has("Location"))&&(t.resolveRedirect(s),c.reloadDocument)||(c.reloadDocument?r[3]:r[1]>=20))return n;let l=t.buildLocation({...c,_fromLocation:e[0],_includeValidateSearch:!0}),u=l.maskedLocation??l;if(u.external){let f=s.clone();return f.options={...c},f.headers.set("Location",u.publicHref),t.resolveRedirect(f),r[3]?[z,f]:[z,f,u]}return[z,s,l]}catch(l){n=i?[lt,l]:Xe(o,l),i=!0}}return n}a(to,"materializeRedirect");async function Rn(t,e,o,n,r,i){let s=e[1],c=await r,l=!1,u=s.findIndex(p=>p._notFound),f=a(p=>p[1][0]===de?Ge(t,s,p,n.signal):p[0],"boundaryOf"),d=u<0?s.length:u;if((c?.[1][0]??0)>=z)d=0;else if(c){d=c[2]??=await f(c);for(let p of o){if(p[0]>=d)break;let m=await p[1];if(m[0]!==rt&&m[0]<z&&!("loaderData"in s[p[0]])){c=[p[0],m],d=c[2]=await f(c);break}}}for(let p of o){if(p[0]>=d)break;let m=await p[2];if(m){c=m;break}}if((c?.[1][0]??0)>=z){let p=c[1];if(p[0]!==z||p[1].options.reloadDocument||p[2])return Rt(t,e),p;l=!0,c=[0,[lt,new Error("Too many redirects")]]}let h=c?c[2]??await f(c):u;if(h>=0){let p=c?.[1],m=p?.[0],g=s[h],S=p?.[1],y=a(()=>{p&&(g._notFound=void 0,m===lt?g.status="error":(S.routeId=g.routeId,g.routeId===t.routeTree.id?(g.status="success",g._notFound=!0):g.status="notFound"),g.error=S,g.isFetching=!1)},"install");y(),p||i?.();let R=wt(t,g);try{await _t(p?Promise.resolve().then(()=>St(R,m===lt?"errorComponent":"notFoundComponent")):Promise.all([St(R),St(R,"notFoundComponent")]),n.signal)}catch(b){if(b===n.signal&&n.signal.aborted)return Rt(t,e),ht}p?l&&(n.abort(),await Promise.all([...o.map(b=>b[1]),...o.map(b=>b[2]),...(e[2]??[]).map(b=>b[1])]),Rt(t,e),U(t,s),y()):g.status="success"}return e}a(Rn,"reduceLane");async function _n(t,e,o,n=0,r=e[1].length){let i=e[1];for(let s=n;s<r;s++){let c=i[s],l=wt(t,c).options;if(l.head||l.scripts)try{let u={ssr:t.options.ssr,matches:i,match:c,params:c.params,loaderData:c.loaderData},[f,d]=await _t(Promise.all([l.head?.(u),l.scripts?.(u)]),o);c.meta=f?.meta,c.links=f?.links,c.headScripts=f?.scripts,c.styles=f?.styles,c.scripts=d}catch(u){if(u===o&&o.aborted)break;console.error(u)}if(c.status!=="success"||c._notFound)break}return e}a(_n,"projectLane");async function wn(t,e,o,n){let r=[e,o],i=n[0].signal,s;try{let c=t.stores.matches.get(),l=o.findIndex(y=>y._notFound);if(t.options.notFoundMode!=="root"&&l>=0){let y=await Ge(t,o,void 0,i,l);o[l]._notFound=void 0,o[y]._notFound=!0,l=y}let u=l<0?o.length:l+1,f=0;for(;f<u&&f!==l;){let y=o[f],R=n[2][f],b=c[f];if(R?.id!==y.id||R.status!=="success"||y.preload||b?.id!==y.id||b.status!=="success"||(f++,R._notFound||b._notFound))break}let d=[],h=n[6]??0,p=h?Promise.resolve(o[h-1]):void 0,m=a(()=>{for(let y=h;y<u&&!i.aborted;y++)p=Dr(t,r,y,d,p,n,f)},"planSuccessfulLane"),g=await Tr(t,r,n,u,m,f);if(g){if(n[4]=!0,u=g[0],g[1][0]===de){let y=await Ge(t,o,g,i);g[2]=y,u=Math.min(u,y+1)}else g[1][0]>=z&&(u=0);m()}if(!i.aborted&&!n[3]){let y=[];for(let[R,b]of t._flights??[])b[2]||(t._flights.delete(R),y.push(b[1]));for(let R of y)R.abort()}let S=Rn(t,r,d,n[0],yn(d,g,r[2]),n[7]);r[2]?.length&&(r[3]=yn(r[2],void 0,void 0,S.then(y=>zt(y)?0:fe(o).length,()=>0))),s=await S}catch(c){if(Rt(t,r),c===i&&i.aborted)return ht;throw c}return zt(s)?s:_n(t,s,i,n[6]===o.length?n[6]:0)}a(wn,"executeClientLane");function Je(t,e){if(t._tx!==e)return;let o=e[3],n=t.stores.matches.get(),r=t._pending;for(let i=0;i<o.length;i++){let s=o[i],c=s.status==="success"&&!s._notFound,l=n[i]?.id===s.id&&n[i]?.status==="pending";if(c&&!l)continue;let u=wt(t,s),f=c||s.invalid?0:u.options.pendingMs??t.options.defaultPendingMs,d=u.options.pendingComponent??t.options.defaultPendingComponent;if(!d||typeof f!="number"||f===1/0){r&&(r[0]=e,r[2]=0,r[4]=!0);return}let h=u.options.pendingMinMs??t.options.defaultPendingMinMs??0,p=!1;if(r?.[1]===s.id?(p=r[0]!==e,r[0]=e):(clearTimeout(r?.[3]),t._pending=r=void 0),r||(t._pending=r=[e,s.id,l?Date.now()+h:e[4]+f,void 0,l||void 0,d]),r[4]&&!p&&r[5]===d)return;if(r[5]=d,!r[4]){clearTimeout(r[3]);let S=r[2]-Date.now();if(S>0){r[3]=setTimeout(()=>Je(t,e),S);return}r[2]=0}let m=o.map(S=>({...S,_flight:void 0}));m[i].status="pending";let g=r[4]=t.startTransition(()=>t.stores.setMatches(m),m).then(S=>(S&&t._pending===r&&r[4]===g&&!r[2]&&(r[2]=Date.now()+h),S));return}}a(Je,"offerPending");function Vt(t,e){let o=t._pending;(t._tx===e||!t._tx?.[3].some(n=>n.id===o?.[1]))&&(clearTimeout(o?.[3]),t._pending=void 0)}a(Vt,"finishPending");async function vn(t,e){let o=t._pending;if(!o)return;clearTimeout(o[3]);let n=o[2]-Date.now();if(!o[4]||n<=0||!fe(e[3]).some(i=>i.id===o[1]))return;let r;try{await _t(new Promise(i=>{r=setTimeout(i,n)}),e[0].signal)}catch{}clearTimeout(r)}a(vn,"awaitPendingMinimum");function xn(t,e){t._committed=e,t.stores.setMatches(e)}a(xn,"publishMatches");function Ar(t,e,o,n){let r=t._committed,i=t._lifecycleEnd,s=t._cache;for(let f of o)f.preload=!1,n&&(f._assetEnd=void 0);let c=fe(o).length,l=new Map;{let f=Date.now(),d=new Set;for(let h=0;h<o.length;h++){let p=o[h];(h<c||p.status==="success")&&d.add(p.id)}for(let h of[...r,...s.values()]){if(h.status!=="success"||d.has(h.id))continue;let p=wt(t,h);!p.options.loader||f-h.updatedAt>=(h.preload?p.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:p.options.gcTime??t.options.defaultGcTime??3e5)||l.set(h.id,s.get(h.id)===h?h:{...h,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=l;let u=t._lifecycleEnd=ln(o);xn(t,o),U(t,[...s.values(),...r].filter(f=>f._flight&&l.get(f.id)!==f),o),un(t,r,o,i,u,e)}a(Ar,"commitMatches");async function ue(t,e){let o=t._tx;for(;o&&o!==e;)e=o,await o[5],o=t._tx}a(ue,"awaitCurrent");function bn(t,e,o){let n=o[1].options,r=o[2];if(!r)return t.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return t.navigate({href:(r.maskedLocation??r).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});r._redirects=e[1]+1,t._pendingLocation=r;let i=t.commitLocation({...r,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===r&&(t._pendingLocation=void 0)}),i}a(bn,"followRedirect");async function $r(t,e,o,n,r){let i=o.map(l=>({...l}));Qe(i);for(let l of n)ct(t,i[l[0]]),i[l[0]]=l[3];let s=[e[2],i],c;try{c=await Rn(t,s,n,e[0],r)}catch(l){throw U(t,i),l}if(zt(c)){U(t,i),c[0]===z&&t._tx===e&&t._committed===o&&await bn(t,e,c);return}if(await _n(t,c,e[0].signal),t._tx!==e||t._committed!==o){U(t,i);return}for(let l of i){let u=t._cache.get(l.id);u?._flight&&u._flight===l._flight&&(t._cache.delete(l.id),ct(t,u))}xn(t,i),U(t,o,i)}a($r,"runBackground");async function Br(t,e,o,n,r,i){let s=await wn(t,e[2],e[3],[e[0],e[1],t._committed,void 0,r,o,i,n]);if(zt(s)){let d=s[0]===z&&t._tx===e;if((!d||s[1].options.reloadDocument)&&Vt(t,e),U(t,e[3]),e[3]=[],!d)return;if(t._tx!==e){Vt(t,e);return}await bn(t,e,s);return}let c=s[1];if(t._tx===e&&await vn(t,e),t._tx!==e){Vt(t,e),U(t,c),Rt(t,s);return}let l=e[2],u=vt(l,t.stores.resolvedLocation.get()),f=s[2];await t.startViewTransition(async()=>{if(t._tx===e&&await vn(t,e),t._tx!==e){Vt(t,e),U(t,c),Rt(t,s);return}let d=a(()=>{Vt(t,e),Ar(t,e,c,i),t._tx===e&&(t.emit({type:"onLoad",...u}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...u}))},"commit"),h=await t.startTransition(d,c);if(t._tx!==e){Rt(t,s);return}f?.length&&$r(t,e,c,f,s[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(l),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...u}),h&&t._tx===e&&t.emit({type:"onRendered",...u})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}a(Br,"runClientTransaction");async function dn(t,e){let o=!1,n=t._tx,r=t.stores.resolvedLocation.get(),i=r??t.stores.location.get(),s=t.latestLocation,c=t._pendingLocation,l=c?.href===s.href?c._redirects??0:0,u=t._handoff,f=o?void 0:u?.[0](),d=new AbortController,h=t._preflight;if(t._preflight=d,!o&&!f&&u?.[1](),h?.abort(),!d.signal.aborted){let C=vt(s,r);t.emit({type:"onBeforeNavigate",...C}),d.signal.aborted||t.emit({type:"onBeforeLoad",...C})}if(d.signal.aborted){await ue(t,n);return}let p=i.href===s.href,m=d,g=t.matchRoutes(s,{_controller:d});Qe(g);let S=f?u[1](g):void 0;if(S?m=f:f?.abort(),d.signal.aborted){U(t,g),await ue(t,n);return}t._preflight=void 0;let y,R=a(()=>Br(t,w,p,()=>Je(t,w),e?.sync,S),"run"),b=e?.sync?new Promise(C=>y=C):Promise.resolve().then(R),w=[m,l,s,g,Date.now(),b.then(()=>ue(t,w))];if(t._tx=w,n){for(let C of t.stores.matches.get()){if(t._tx!==w)break;C.isFetching&&Wt(t,C,!1)}n[0].abort(),U(t,n[3],w[3],!0)}if(t._tx!==w){U(t,w[3]),w[3]=[],y?.(),await ue(t,w);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(s)}),(S||!t._committed.length&&g[0]?.status!=="success"&&!g.some(C=>C._notFound))&&Je(t,w),y?.(R()),await w[5]}a(dn,"loadClientRoute");async function hn(t,e){let o=t.buildLocation(e);for(let n=0;;n++){let r=t._committed,i=new AbortController,s,c,l;try{try{s=t.matchRoutes(o,{_controller:i}),Qe(s),c=(t._preloads??=new Map).set(i,s),l=await wn(t,o,s,[i,n,r,!0])}finally{c&&(c=c.delete(i),U(t,s)),i.abort()}if(!zt(l))return l[1];if(!c||l.length<3)return;o=l[2]}catch(u){q(u)||console.error(u);return}}}a(hn,"preloadClientRoute");var eo="Error preloading route! \u261D\uFE0F";var he=class{static{a(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let o=this.options,n=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Y:this.parentRoute||ut();let r=n?Y:o?.path;r&&r!=="/"&&(r=Qt(r));let i=o?.id||r,s=n?Y:at((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(i??""));r==="__root__"&&(r="/");let c=s==="__root__"?"/":r===void 0?this.parentRoute.fullPath:at(this.parentRoute.fullPath+"/"+r);this._path=r,this._id=s,this._fullPath=c,this._to=H(c)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Wo({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var oo=class extends he{static{a(this,"BaseRootRoute")}constructor(t){super(t)}};var no=T(B(),1);function Cn(t,e){let o=t.stores.location,n=new Set,r,i,s=a(c=>{Ye(t,e,c)||(r=c,n.forEach(l=>l()))},"update");return[()=>r??o.get(),c=>(n.size||(r=o.get(),i=o.subscribe(s).unsubscribe),n.add(c),()=>{n.delete(c),n.size||(i(),r=void 0)})]}a(Cn,"createLinkScope");var pt=no.createContext(void 0),Pn=no.createContext(void 0);var ve=T(B(),1);function En({update:t,notify:e,unwatched:o}){return{link:n,unlink:r,propagate:i,checkDirty:s,shallowPropagate:c};function n(u,f,d){let h=f.depsTail;if(h!==void 0&&h.dep===u)return;let p=h!==void 0?h.nextDep:f.deps;if(p!==void 0&&p.dep===u){p.version=d,f.depsTail=p;return}let m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===f)return;let g=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=g),h!==void 0?h.nextDep=g:f.deps=g,m!==void 0?m.nextSub=g:u.subs=g}function r(u,f=u.sub){let d=u.dep,h=u.prevDep,p=u.nextDep,m=u.nextSub,g=u.prevSub;return p!==void 0?p.prevDep=h:f.depsTail=h,h!==void 0?h.nextDep=p:f.deps=p,m!==void 0?m.prevSub=g:d.subsTail=g,g!==void 0?g.nextSub=m:(d.subs=m)===void 0&&o(d),p}function i(u){let f=u.nextSub,d;t:do{let h=u.sub,p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(u,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&e(h),p&1){let m=h.subs;if(m!==void 0){let g=(u=m).nextSub;g!==void 0&&(d={value:f,prev:d},f=g);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue t}break}while(!0)}function s(u,f){let d,h=0,p=!1;t:do{let m=u.dep,g=m.flags;if(f.flags&16)p=!0;else if((g&17)===17){if(t(m)){let S=m.subs;S.nextSub!==void 0&&c(S),p=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,f=m,++h;continue}if(!p){let S=u.nextDep;if(S!==void 0){u=S;continue}}for(;h--;){let S=f.subs,y=S.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=S,p){if(t(f)){y&&c(S),f=u.sub;continue}p=!1}else f.flags&=-33;f=u.sub;let R=u.nextDep;if(R!==void 0){u=R;continue t}}return p}while(!0)}function c(u){do{let f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&e(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}a(En,"createReactiveSystem");function In(t,e,o){let n=typeof t=="object",r=n?t:void 0;return{next:(n?t.next:t)?.bind(r),error:(n?t.error:e)?.bind(r),complete:(n?t.complete:o)?.bind(r)}}a(In,"toObserver");var ro=[],me=0,{link:Ln,unlink:zr,propagate:Ur,checkDirty:On,shallowPropagate:kn}=En({update(t){return t._update()},notify(t){ro[so++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,ge(t))}}),pe=0,so=0,ot,io=0;function ao(t){try{++io,t()}finally{--io||co()}}a(ao,"batch");function ge(t){let e=t.depsTail,o=e!==void 0?e.nextDep:t.deps;for(;o!==void 0;)o=zr(o,t)}a(ge,"purgeDeps");function co(){if(!(io>0)){for(;pe<so;){let t=ro[pe];ro[pe++]=void 0,t.notify()}pe=0,so=0}}a(co,"flush");function ye(t,e){let o=typeof t=="function",n=t,r={_snapshot:o?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:o?0:1,get(){return ot!==void 0&&Ln(r,ot,me),r._snapshot},subscribe(i){let s=In(i),c={current:!1},l=Wr(()=>{r.get(),c.current?(ot=void 0,s.next?.(r._snapshot)):c.current=!0});return{unsubscribe:a(()=>{l.stop()},"unsubscribe")}},_update(i){let s=ot,c=e?.compare??Object.is;if(o)ot=r,++me,r.depsTail=void 0;else if(i===void 0)return!1;o&&(r.flags=5);try{let l=r._snapshot,u=typeof i=="function"?i(l):i===void 0&&o?n(l):i;return l===void 0||!c(l,u)?(r._snapshot=u,!0):!1}finally{ot=s,o&&(r.flags&=-5),ge(r)}}};return o?(r.flags=17,r.get=function(){let i=r.flags;if(i&16||i&32&&On(r.deps,r)){if(r._update()){let s=r.subs;s!==void 0&&kn(s)}}else i&32&&(r.flags=i&-33);return ot!==void 0&&Ln(r,ot,me),r._snapshot}):r.set=function(i){if(r._update(i)){let s=r.subs;s!==void 0&&(Ur(s),kn(s),co())}},r}a(ye,"createAtom");function Wr(t){let e=a(()=>{let n=ot;ot=o,++me,o.depsTail=void 0,o.flags=6;try{return t()}finally{ot=n,o.flags&=-5,ge(o)}},"run"),o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let n=this.flags;n&16||n&32&&On(this.deps,this)?e():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ge(this)}};return e(),o}a(Wr,"effect");function jr(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(let[n,r]of t)if(!e.has(n)||!Object.is(r,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();let o=Nn(t);if(o.length!==Nn(e).length)return!1;for(let n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(e,o[n])||!Object.is(t[o[n]],e[o[n]]))return!1;return!0}a(jr,"shallow");function Nn(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}a(Nn,"getOwnKeys");var lo=T(B(),1),Fn=T(ur(),1);function Kr(t,e){return t===e}a(Kr,"defaultCompare");function W(t,e=n=>n,o){let n=o?.compare??Kr,r=(0,lo.useCallback)(s=>{let{unsubscribe:c}=t.subscribe(s);return c},[t]),i=(0,lo.useCallback)(()=>t.get(),[t]);return(0,Fn.useSyncExternalStoreWithSelector)(r,i,i,e,n)}a(W,"useSelector");var Tn={};function uo(t,e){let o=ve.useRef();return n=>{let r=t?.select?t.select(n):n;return t?.structuralSharing??e.options.defaultStructuralSharing?o.current=tt(o.current,r):r}}a(uo,"useStructuralSharing");function G(t){let e=M(),o=ve.useContext(t.from?Pn:pt),n=t.from??o,r=e.stores.getMatchStore(n);if(!1){let c=r.get();if(!c){(t.shouldThrow??!0)&&ut();return}return t.select?t.select(c):c}let i=uo(t,e),s=W(r,c=>c?i(c):Tn);if(s!==Tn)return s;(t.shouldThrow??!0)&&ut()}a(G,"useMatch");function Se(t){return G({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.search):e.search,"select")})}a(Se,"useSearch");var jt=T(B(),1);var Re=jt.useLayoutEffect;var fo=T(B(),1);function _e(t){let e=M();return fo.useCallback(o=>e.navigate({...o,from:o.from??t?.from}),[t?.from,e])}a(_e,"useNavigate");var kt=T(B(),1),st=T(Q(),1);var xt=class extends kt.Component{static{a(this,"CatchBoundary")}constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,e){let o=t.getResetKey();return e.error&&e.resetKey!==o?{resetKey:o,error:0}:{resetKey:o}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){let t=this.state.error;return t?kt.createElement(this.props.errorComponent??ho,{error:t[0],reset:this.reset}):this.props.children}};function ho({error:t}){let[e,o]=kt.useState(!1);return(0,st.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,st.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,st.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,st.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:a(()=>o(n=>!n),"onClick"),children:e?"Hide Error":"Show Error"})]}),(0,st.jsx)("div",{style:{height:".25rem"}}),e?(0,st.jsx)("div",{children:(0,st.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?(0,st.jsx)("code",{children:t.message}):null})}):null]})}a(ho,"ErrorComponent");var po=T(B(),1),Dn=T(Q(),1);var Mn=a(()=>!0,"getSnapshot"),qr=a(()=>!1,"getServerSnapshot");function An({children:t,fallback:e=null}){return(0,Dn.jsx)(po.default.Fragment,{children:Gr()?t:e})}a(An,"ClientOnly");function Gr(t=!0){return po.default.useSyncExternalStore(Jr,Mn,t?qr:Mn)}a(Gr,"useHydrated");function Jr(){return()=>{}}a(Jr,"subscribe");function mo(t){return G({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.loaderData):e.loaderData,"select")})}a(mo,"useLoaderData");function go(t){let{select:e,...o}=t;return G({...o,select:a(n=>e?e(n.loaderDeps):n.loaderDeps,"select")})}a(go,"useLoaderDeps");function yo(t){return G({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:a(e=>{let o=t.strict===!1?e.params:e._strictParams;return t.select?t.select(o):o},"select")})}a(yo,"useParams");function vo(t){return G({...t,select:a(e=>t.select?t.select(e.context):e.context,"select")})}a(vo,"useRouteContext");var A=T(B(),1);var Yr=T(Q(),1);function Xr(...t){let e=A.useRef(t),o=e.current;return t.forEach((n,r)=>{J(o[r],n,!1,!0)||(o[r]=n)}),e.current}a(Xr,"useStableValues");function we(t,e){t.preloadRoute(e).catch(o=>{console.warn(o),console.warn(eo)})}a(we,"preloadLink");function $n(t,e){let o=typeof t=="string"&&it(t);if(o)return e.has(o)?t:null}a($n,"resolveExternalLink");function Bn(t,e,o,n){let r=te(t.pathname,n),i=te(e.pathname,n);return(o?.exact?r!==i:!(r.startsWith(i)&&(r.length===i.length||r[i.length]==="/")))||(o?.includeSearch??!0)&&!J(t.search,e.search,!o?.exact,o?.explicitUndefined)?!1:!o?.includeHash||t.hash===e.hash}a(Bn,"resolveIsActive");function Zr(t,e,o){let n=M();if(!1)return es(n,t,e,o);let r=A.useRef(null),i=A.useCallback($=>{if(r.current=$,typeof e=="function")return e($);e&&(e.current=$)},[e]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:f,target:d,onClick:h,onBlur:p,onFocus:m,onMouseEnter:g,onMouseLeave:S,onTouchStart:y}=t,[R,b,w]=Xr(t.search,t.params,s),C=A.useContext(pt),_=(n.stores._linkScopes??={})[C]??=Cn(n,C),[v,x,P]=A.useMemo(()=>{let $=$n(c,n.protocolAllowlist);if($!==void 0){let nt=[$??void 0];return[t,()=>nt]}let K={...t},Gt,Ft,lr,Po=a(()=>{let nt=_[0]();if(nt!==Gt){K._fromLocation=nt;let Eo=n.buildLocation(K),Jt=Un(Eo,n,f),Lo=f||Jt&&!it(Jt)?Bn(nt,Eo,w,n.basepath):void 0;(!Ft||Ft[0]!==Jt||Ft[1]!==Lo)&&(Ft=[Jt,Lo]),Gt=nt}return Ft},"getLinkState");return[K,Po,w?.includeHash&&(()=>{let nt=Po();return nt[1]?lr??=[nt[0],!1]:nt})]},[n,_,t.from,t.hash,t.href,c,R,b,t.state,t.mask,t.unsafeRelative,w,f]),[L,k]=A.useSyncExternalStore(_[1],x,P||x),E=k===void 0&&L,O=f||L===void 0,F=A.useRef(!1),N=t.reloadDocument||E||O?!1:l??n.options.defaultPreload,D=u??n.options.defaultPreloadDelay??0,Nt=A.useCallback($=>{let K=$?.isIntersecting;if(!(K??N==="intent")){K===!1&&xe(r);return}if(!D){we(n,v);return}r.t??=setTimeout(()=>{r.t=void 0,we(n,v)},D)},[n,v,r,N,D]);A.useEffect(()=>{if(!N)return;N==="render"&&!F.current&&(F.current=!0,we(n,v));let $=!0,K;return N==="viewport"&&r.current&&typeof IntersectionObserver=="function"&&(K=new IntersectionObserver(Gt=>{$&&Nt(Gt.pop())},{rootMargin:"100px"}),K.observe(r.current)),()=>{$=!1,K?.disconnect(),xe(r)}},[n,v,N,Nt,r]);let Z=Hn(t,o);if(Z.ref=e?i:r,E)return Z.href=E,Z;let Ee=a($=>{let K=d??$.currentTarget.getAttribute("target");!O&&!($.metaKey||$.altKey||$.ctrlKey||$.shiftKey)&&!$.defaultPrevented&&(!K||K==="_self")&&$.button===0&&($.preventDefault(),xe(r),n.navigate({...t,_fromLocation:v._fromLocation}))},"handleClick"),cr=a(()=>{N==="intent"&&we(n,v)},"handleTouchStart"),Co=a(()=>{N==="intent"&&xe(r)},"handleLeave");return Z.onClick=It(h,Ee),Z.onBlur=It(p,Co),Z.onFocus=It(m,Nt),Z.onMouseEnter=It(g,Nt),Z.onMouseLeave=It(S,Co),Z.onTouchStart=It(y,cr),zn(Z,t,k,L,O,o)}a(Zr,"useLinkProps");var Qr={},ts={className:"active"},Vn=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function Hn(t,e){let o={};for(let n in t)Vn.has(n)||n==="type"&&e!==void 0||n==="disabled"&&e==="a"||(o[n]=t[n]);return o}a(Hn,"collectElementProps");function zn(t,e,o,n,r,i){let{activeProps:s,inactiveProps:c,className:l,style:u,target:f}=e,d=mt(o?s:c,{})??(o?ts:Qr);Object.assign(t,d),t.href=n,i!=="a"&&(t.disabled=r),t.target=f;let h=d.style;(u||h)&&(t.style=u&&h?{...u,...h}:u||h);let p=d.className;return(l||p)&&(t.className=l?p?`${l} ${p}`:l:p),r&&(t.role="link",t["aria-disabled"]=!0),o&&(t["data-status"]="active",t["aria-current"]="page"),t}a(zn,"applyLinkState");function es(t,e,o,n){let{to:r,disabled:i,activeOptions:s}=e,c=$n(r,t.protocolAllowlist),l=c===void 0?t.buildLocation(e):void 0,u=l?Un(l,t,i):c??void 0,f=i||!u,d=c??(u&&it(u)?u:void 0),h=Hn(e,n);return h.ref=o,d?(h.href=d,h):zn(h,e,!!l&&!(!i&&!u)&&!s?.includeHash&&Bn(t.stores.location.get(),l,s,t.basepath),u,f,n)}a(es,"getServerLinkProps");var xe=a(t=>{clearTimeout(t.t),t.t=void 0},"cancelPreload"),It=a((t,e)=>t?o=>o.defaultPrevented||(t(o),o.defaultPrevented||e(o)):e,"composeHandlers");function Un(t,e,o){if(o)return;let n=t.maskedLocation??t,r=n.external?n.publicHref:e.history.createHref(n.publicHref)||"/";if(!((n.external||r!==n.publicHref)&&Dt(r,e.protocolAllowlist)))return r}a(Un,"getHrefOption");var So=A.memo(A.forwardRef((t,e)=>{let o=t._asChild||"a",n=Zr(t,e,o),r=typeof t.children=="function"?t.children({isActive:n["data-status"]==="active"}):t.children;return A.createElement(o,n,r)}),os);function os(t,e){let o=0;for(let n in e)if(o++,t[n]!==e[n]&&(!Vn.has(n)||!J(t[n],e[n],!1,!0)))return!1;for(let n in t)o--;return o===0}a(os,"areLinkPropsEqual");var Ro=T(B(),1),_o=T(Q(),1);var Wn=class extends he{static{a(this,"Route")}constructor(t){super(t),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>vo({...e,from:this.id}),this.useSearch=e=>Se({...e,from:this.id}),this.useParams=e=>yo({...e,from:this.id}),this.useLoaderDeps=e=>go({...e,from:this.id}),this.useLoaderData=e=>mo({...e,from:this.id}),this.useNavigate=()=>_e({from:this.fullPath}),this.Link=Ro.default.forwardRef((e,o)=>(0,_o.jsx)(So,{ref:o,from:this.fullPath,...e}))}};function ns(t){return new Wn(t)}a(ns,"createRoute");var jn=class extends oo{static{a(this,"RootRoute")}constructor(t){super(t),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>vo({...e,from:this.id}),this.useSearch=e=>Se({...e,from:this.id}),this.useParams=e=>yo({...e,from:this.id}),this.useLoaderDeps=e=>go({...e,from:this.id}),this.useLoaderData=e=>mo({...e,from:this.id}),this.useNavigate=()=>_e({from:this.fullPath}),this.Link=Ro.default.forwardRef((e,o)=>(0,_o.jsx)(So,{ref:o,from:this.fullPath,...e}))}};function rs(t){return new jn(t)}a(rs,"createRootRoute");var vc=T(B(),1);var be=T(Q(),1);function Kn(t){let e=M();if(!1){let n=`not-found-${e.stores.location.get().pathname}-${e.stores.status.get()}`;return(0,be.jsx)(xt,{getResetKey:a(()=>n,"getResetKey"),onCatch:a((r,i)=>{if(q(r))t.onCatch?.(r,i);else throw r},"onCatch"),errorComponent:a(({error:r})=>{if(q(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}let o=`not-found-${W(e.stores.location,n=>n.pathname)}-${W(e.stores.status)}`;return(0,be.jsx)(xt,{getResetKey:a(()=>o,"getResetKey"),onCatch:a((n,r)=>{if(q(n))t.onCatch?.(n,r);else throw n},"onCatch"),errorComponent:a(({error:n})=>{if(q(n))return t.fallback?.(n);throw n},"errorComponent"),children:t.children})}a(Kn,"CatchNotFound");function qn(){return(0,be.jsx)("p",{children:"Not Found"})}a(qn,"DefaultGlobalNotFound");var Gn=T(Q(),1);function Jn({children:t}){let e=M();return null}a(Jn,"ScriptOnce");var Pc=T(B(),1),Ce=T(Q(),1);function wo(t,e,o){return e.options.notFoundComponent?(0,Ce.jsx)(e.options.notFoundComponent,{...o}):t.options.defaultNotFoundComponent?(0,Ce.jsx)(t.options.defaultNotFoundComponent,{...o}):(0,Ce.jsx)(qn,{})}a(wo,"renderRouteNotFound");var Xn=T(Q(),1);function Yn(t){return null}a(Yn,"getScrollRestorationScriptForRouter");function Zn(){let t=M(),e=Yn(t);return e?(0,Xn.jsx)(Jn,{children:e}):null}a(Zn,"ScrollRestoration");var j=T(B(),1);var V=T(Q(),1);function Kt(t,e){let o=e?.options.pendingComponent??t.options.defaultPendingComponent;return o?(0,V.jsx)(o,{}):null}a(Kt,"renderPending");var ss=a((t,e)=>t[0]===e[0]&&t[1]===e[1],"outletMatchSelectionEqual"),tr=a((t,e,o)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||o===!1||o==="data-only"||!t.ssr,"canWrapInSuspense"),Pe=j.memo(a(function({routeId:e}){let o=M();if(!1)return Qn(o,o.stores.byRoute.get(e).get());let n=o.stores.getMatchStore(e);return Qn(o,W(n))},"MatchImpl"));function Qn(t,e){let o=t.routesById[e.routeId],n=Kt(t,o),r=o.options.errorComponent??t.options.defaultErrorComponent,i=o.options.onCatch??t.options.defaultOnCatch,s=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,c=e.ssr===!1||e.ssr==="data-only",l=tr(t,o,e.ssr)&&(o.options.wrapInSuspense??n??(o.options.errorComponent?.preload||c)),u=(0,V.jsx)(is,{match:e});c&&(u=(0,V.jsx)(An,{fallback:n,children:u})),s&&(u=(0,V.jsx)(Kn,{fallback:a(h=>{if(h.routeId??=e.routeId,h.routeId!==e.routeId)throw h;return j.createElement(s,h)},"fallback"),children:u})),r&&(u=(0,V.jsx)(xt,{getResetKey:a(()=>e,"getResetKey"),errorComponent:r,onCatch:a((h,p)=>{if(q(h))throw h.routeId??=e.routeId,h;i?.(h,p)},"onCatch"),children:u})),l&&(u=(0,V.jsx)(j.Suspense,{fallback:n,children:u}));let f=null,d=o.isRoot&&o.options.shellComponent;return d?(0,V.jsx)(pt.Provider,{value:e.routeId,children:(0,V.jsxs)(d,{children:[u,f]})}):(0,V.jsxs)(pt.Provider,{value:e.routeId,children:[u,f]})}a(Qn,"matchView");var is=j.memo(a(function({match:e}){let o=M(),n=e.routeId,r=o.routesById[n],i=j.useMemo(()=>{let c=(r.options.remountDeps??o.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return c?JSON.stringify(c):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,o.options.defaultRemountDeps]),s=j.useMemo(()=>{let c=r.options.component??o.options.defaultComponent;return c?(0,V.jsx)(c,{},i):(0,V.jsx)(er,{})},[i,r.options.component,o.options.defaultComponent]);if(e.status==="pending"){if(o.ssr&&!tr(o,r,e.ssr))return s;if(o._tx)throw o._tx[5];return Kt(o,r)}if(e.status==="notFound")return wo(o,r,e.error);if(e.status==="error"){if(!1){let c=(r.options.errorComponent??o.options.defaultErrorComponent)||ho;return(0,V.jsx)(c,{error:e.error,reset:void 0,info:{componentStack:""}})}throw e.error}return s},"MatchInnerImpl")),er=j.memo(a(function(){let e=M(),o=j.useContext(pt),n,r,i;if(!1){let c=e.stores.matches.get(),l=c.findIndex(f=>f.routeId===o),u=c[l];n=!!u._notFound,r=u.error,i=c[l+1]?.routeId}else{let c=e.stores.getMatchStore(o);[n,r]=W(c,l=>[!!l._notFound,l.error],{compare:ss}),i=W(e.stores.ids,l=>l[l.indexOf(o)+1])}if(n)return wo(e,e.routesById[o],r);if(!i)return null;let s=(0,V.jsx)(Pe,{routeId:i});return o===Y?(0,V.jsx)(j.Suspense,{fallback:Kt(e),children:s}):s},"OutletImpl"));var xo=T(B(),1);function bo(t,e){let o=t[1];t.length=0,o?.(e)}a(bo,"settleOwner");function or({t}){let e=M(),o=e._rendered??=[],n=void 0;return e.startTransition=(r,i)=>new Promise(s=>{bo(o,!1),o.push(i,s),t(e),xo.startTransition(r)}),Re(()=>{let r=e.history.subscribe(e.load);if(n?.current)return r;n&&(n.current=!0),e.updateLatestLocation();let i=e.latestLocation,s=e.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(H(i.publicHref)!==H(s.publicHref))return e.commitLocation({...s,replace:!0,ignoreBlocker:!0}),r;let c=e.stores.resolvedLocation.get();return c?.href===i.href&&c.state.__TSR_key===i.state.__TSR_key?o.push(e.stores.matches.get(),l=>{l&&e.emit({type:"onRendered",...vt(c,c)})}):e._tx||e.load({sync:!0}).catch(console.error),r},[e,e.history]),null}a(or,"Transitioner");var Ot=T(B(),1);var X=T(Q(),1);function rr(){let t=M(),e=t.routesById[Y],o=Kt(t,e),n=(0,X.jsxs)(X.Fragment,{children:[!!1&&(0,X.jsx)(or,{t:Ot.useState()[1]}),t.ssr?(0,X.jsx)(nr,{}):(0,X.jsx)(Ot.Suspense,{fallback:o,children:(0,X.jsx)(nr,{})})]});return t.options.InnerWrap?(0,X.jsx)(t.options.InnerWrap,{children:n}):n}a(rr,"Matches");function nr(){let t=M(),e=t._rendered,o=W(t.stores.matches,s=>e[0]??s),n=o[0],r=n?.routeId;Re(()=>{e[0]===o&&bo(e,!0)},[e,o]);let i=r?(0,X.jsx)(Pe,{routeId:r}):null;return t.options.disableGlobalCatchBoundary?i:(0,X.jsx)(xt,{getResetKey:a(()=>n,"getResetKey"),onCatch:void 0,children:i})}a(nr,"MatchesInner");var sr=a(t=>({createMutableStore:ye,createReadonlyStore:ye,batch:ao}),"getStoreFactory");var as=a(t=>new ir(t),"createRouter"),ir=class extends Ke{static{a(this,"Router")}constructor(t){super(t,sr)}};var Sl=T(B(),1),qt=T(Q(),1);function ar({router:t,children:e,...o}){Tt(o)&&t.update({...t.options,...o,context:{...t.options.context,...o.context}});let n=(0,qt.jsx)(Yt.Provider,{value:t,children:e});return t.options.Wrap?(0,qt.jsx)(t.options.Wrap,{children:n}):n}a(ar,"RouterContextProvider");function cs({router:t,...e}){return(0,qt.jsx)(ar,{router:t,...e,children:(0,qt.jsx)(rr,{})})}a(cs,"RouterProvider");function ls(t){let e=M({warn:t?.router===void 0}),o=t?.router||e;if(!1){let n=o.stores.__store.get();return t?.select?t.select(n):n}return W(o.stores.__store,uo(t,o))}a(ls,"useRouterState");export{Ve as a,Lr as b,M as c,ao as d,ye as e,jr as f,W as g,Se as h,_e as i,ns as j,rs as k,er as l,as as m,cs as n,ls as o};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-6G3E4PJ2.js";import{b as e}from"./chunk-5PEAXTYQ.js";var t=e(r=>{"use strict";var u=c().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;r.c=function(_){return u.H.useMemoCache(_)}});var i=e((n,s)=>{"use strict";s.exports=t()});export{i as a};
1
+ import{a as c}from"./chunk-ADABTCDI.js";import{b as e}from"./chunk-5PEAXTYQ.js";var t=e(r=>{"use strict";var u=c().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;r.c=function(_){return u.H.useMemoCache(_)}});var i=e((n,s)=>{"use strict";s.exports=t()});export{i as a};
@@ -1 +1 @@
1
- import{a as i,b as a}from"./chunk-5PEAXTYQ.js";var x=a(u=>{"use strict";var m=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),V=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),J=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),K=Symbol.for("react.view_transition"),j=Symbol.iterator;function F(t){return t===null||typeof t!="object"?null:(t=j&&t[j]||t["@@iterator"],typeof t=="function"?t:null)}i(F,"getIteratorFn");var N={isMounted:i(function(){return!1},"isMounted"),enqueueForceUpdate:i(function(){},"enqueueForceUpdate"),enqueueReplaceState:i(function(){},"enqueueReplaceState"),enqueueSetState:i(function(){},"enqueueSetState")},g=Object.assign,$={};function E(t,e,n){this.props=t,this.context=e,this.refs=$,this.updater=n||N}i(E,"Component");E.prototype.isReactComponent={};E.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};E.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function h(){}i(h,"ComponentDummy");h.prototype=E.prototype;function C(t,e,n){this.props=t,this.context=e,this.refs=$,this.updater=n||N}i(C,"PureComponent");var d=C.prototype=new h;d.constructor=C;g(d,E.prototype);d.isPureReactComponent=!0;var w=Array.isArray;function R(){}i(R,"noop");var f={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function A(t,e,n){var r=n.ref;return{$$typeof:m,type:t,key:e,ref:r!==void 0?r:null,props:n}}i(A,"ReactElement");function tt(t,e){return A(t.type,e,t.props)}i(tt,"cloneAndReplaceKey");function S(t){return typeof t=="object"&&t!==null&&t.$$typeof===m}i(S,"isValidElement");function et(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}i(et,"escape");var P=/\/+/g;function T(t,e){return typeof t=="object"&&t!==null&&t.key!=null?et(""+t.key):e.toString(36)}i(T,"getElementKey");function nt(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(R,R):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}i(nt,"resolveThenable");function _(t,e,n,r,o){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var c=!1;if(t===null)c=!0;else switch(s){case"bigint":case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case m:case z:c=!0;break;case H:return c=t._init,_(c(t._payload),e,n,r,o)}}if(c)return o=o(t),c=r===""?"."+T(t,0):r,w(o)?(n="",c!=null&&(n=c.replace(P,"$&/")+"/"),_(o,e,n,"",function(q){return q})):o!=null&&(S(o)&&(o=tt(o,n+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace(P,"$&/")+"/")+c)),e.push(o)),1;c=0;var l=r===""?".":r+":";if(w(t))for(var p=0;p<t.length;p++)r=t[p],s=l+T(r,p),c+=_(r,e,n,s,o);else if(p=F(t),typeof p=="function")for(t=p.call(t),p=0;!(r=t.next()).done;)r=r.value,s=l+T(r,p++),c+=_(r,e,n,s,o);else if(s==="object"){if(typeof t.then=="function")return _(nt(t),e,n,r,o);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return c}i(_,"mapIntoArray");function y(t,e,n){if(t==null)return t;var r=[],o=0;return _(t,r,"","",function(s){return e.call(n,s,o++)}),r}i(y,"mapChildren");function rt(t){if(t._status===-1){var e=t._result,n=e();n.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r,n.status===void 0&&(n.status="fulfilled",n.value=r))},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r,n.status===void 0&&(n.status="rejected",n.reason=r))}),t._status===-1&&(t._status=0,t._result=n)}if(t._status===1)return t._result.default;throw t._result}i(rt,"lazyInitializer");var O=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function I(t){var e=f.T,n={};n.types=e!==null?e.types:null,f.T=n;try{var r=t(),o=f.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(R,O)}catch(s){O(s)}finally{e!==null&&n.types!==null&&(e.types=n.types),f.T=e}}i(I,"startTransition");function k(t){var e=f.T;if(e!==null){var n=e.types;n===null?e.types=[t]:n.indexOf(t)===-1&&n.push(t)}else I(k.bind(null,t))}i(k,"addTransitionType");var ut={map:y,forEach:i(function(t,e,n){y(t,function(){e.apply(this,arguments)},n)},"forEach"),count:i(function(t){var e=0;return y(t,function(){e++}),e},"count"),toArray:i(function(t){return y(t,function(e){return e})||[]},"toArray"),only:i(function(t){if(!S(t))throw Error("React.Children.only expected to receive a single React element child.");return t},"only")};u.Activity=b;u.Children=ut;u.Component=E;u.Fragment=G;u.Profiler=B;u.PureComponent=C;u.StrictMode=W;u.Suspense=Z;u.ViewTransition=K;u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f;u.__COMPILER_RUNTIME={__proto__:null,c:i(function(t){return f.H.useMemoCache(t)},"c")};u.addTransitionType=k;u.cache=function(t){return function(){return t.apply(null,arguments)}};u.cacheSignal=function(){return null};u.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var r=g({},t.props),o=t.key;if(e!=null)for(s in e.key!==void 0&&(o=""+e.key),e)!Y.call(e,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&e.ref===void 0||(r[s]=e[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];r.children=c}return A(t.type,o,r)};u.createContext=function(t){return t={$$typeof:V,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Q,_context:t},t};u.createElement=function(t,e,n){var r,o={},s=null;if(e!=null)for(r in e.key!==void 0&&(s=""+e.key),e)Y.call(e,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=e[r]);var c=arguments.length-2;if(c===1)o.children=n;else if(1<c){for(var l=Array(c),p=0;p<c;p++)l[p]=arguments[p+2];o.children=l}if(t&&t.defaultProps)for(r in c=t.defaultProps,c)o[r]===void 0&&(o[r]=c[r]);return A(t,s,o)};u.createRef=function(){return{current:null}};u.forwardRef=function(t){return{$$typeof:X,render:t}};u.isValidElement=S;u.lazy=function(t){return{$$typeof:H,_payload:{_status:-1,_result:t},_init:rt}};u.memo=function(t,e){return{$$typeof:J,type:t,compare:e===void 0?null:e}};u.startTransition=I;u.unstable_useCacheRefresh=function(){return f.H.useCacheRefresh()};u.use=function(t){return f.H.use(t)};u.useActionState=function(t,e,n){return f.H.useActionState(t,e,n)};u.useCallback=function(t,e){return f.H.useCallback(t,e)};u.useContext=function(t){return f.H.useContext(t)};u.useDebugValue=function(){};u.useDeferredValue=function(t,e){return f.H.useDeferredValue(t,e)};u.useEffect=function(t,e){return f.H.useEffect(t,e)};u.useEffectEvent=function(t){return f.H.useEffectEvent(t)};u.useId=function(){return f.H.useId()};u.useImperativeHandle=function(t,e,n){return f.H.useImperativeHandle(t,e,n)};u.useInsertionEffect=function(t,e){return f.H.useInsertionEffect(t,e)};u.useLayoutEffect=function(t,e){return f.H.useLayoutEffect(t,e)};u.useMemo=function(t,e){return f.H.useMemo(t,e)};u.useOptimistic=function(t,e){return f.H.useOptimistic(t,e)};u.useReducer=function(t,e,n){return f.H.useReducer(t,e,n)};u.useRef=function(t){return f.H.useRef(t)};u.useState=function(t){return f.H.useState(t)};u.useSyncExternalStore=function(t,e,n){return f.H.useSyncExternalStore(t,e,n)};u.useTransition=function(){return f.H.useTransition()};u.version="19.3.0"});var ot=a((lt,M)=>{"use strict";M.exports=x()});var U=a(v=>{"use strict";var st=Symbol.for("react.transitional.element"),it=Symbol.for("react.fragment");function L(t,e,n){var r=null;if(n!==void 0&&(r=""+n),e.key!==void 0&&(r=""+e.key),"key"in e){n={};for(var o in e)o!=="key"&&(n[o]=e[o])}else n=e;return e=n.ref,{$$typeof:st,type:t,key:r,ref:e!==void 0?e:null,props:n}}i(L,"jsxProd");v.Fragment=it;v.jsx=L;v.jsxs=L});var ft=a((at,D)=>{"use strict";D.exports=U()});export{ot as a,ft as b};
1
+ import{a as i,b as a}from"./chunk-5PEAXTYQ.js";var x=a(u=>{"use strict";var m=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),V=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),J=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),K=Symbol.for("react.view_transition"),j=Symbol.iterator;function F(t){return t===null||typeof t!="object"?null:(t=j&&t[j]||t["@@iterator"],typeof t=="function"?t:null)}i(F,"getIteratorFn");var N={isMounted:i(function(){return!1},"isMounted"),enqueueForceUpdate:i(function(){},"enqueueForceUpdate"),enqueueReplaceState:i(function(){},"enqueueReplaceState"),enqueueSetState:i(function(){},"enqueueSetState")},g=Object.assign,$={};function E(t,e,n){this.props=t,this.context=e,this.refs=$,this.updater=n||N}i(E,"Component");E.prototype.isReactComponent={};E.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};E.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function h(){}i(h,"ComponentDummy");h.prototype=E.prototype;function C(t,e,n){this.props=t,this.context=e,this.refs=$,this.updater=n||N}i(C,"PureComponent");var d=C.prototype=new h;d.constructor=C;g(d,E.prototype);d.isPureReactComponent=!0;var w=Array.isArray;function R(){}i(R,"noop");var f={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function A(t,e,n){var r=n.ref;return{$$typeof:m,type:t,key:e,ref:r!==void 0?r:null,props:n}}i(A,"ReactElement");function tt(t,e){return A(t.type,e,t.props)}i(tt,"cloneAndReplaceKey");function S(t){return typeof t=="object"&&t!==null&&t.$$typeof===m}i(S,"isValidElement");function et(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}i(et,"escape");var P=/\/+/g;function T(t,e){return typeof t=="object"&&t!==null&&t.key!=null?et(""+t.key):e.toString(36)}i(T,"getElementKey");function nt(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(R,R):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}i(nt,"resolveThenable");function _(t,e,n,r,o){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var c=!1;if(t===null)c=!0;else switch(s){case"bigint":case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case m:case z:c=!0;break;case H:return c=t._init,_(c(t._payload),e,n,r,o)}}if(c)return o=o(t),c=r===""?"."+T(t,0):r,w(o)?(n="",c!=null&&(n=c.replace(P,"$&/")+"/"),_(o,e,n,"",function(q){return q})):o!=null&&(S(o)&&(o=tt(o,n+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace(P,"$&/")+"/")+c)),e.push(o)),1;c=0;var l=r===""?".":r+":";if(w(t))for(var p=0;p<t.length;p++)r=t[p],s=l+T(r,p),c+=_(r,e,n,s,o);else if(p=F(t),typeof p=="function")for(t=p.call(t),p=0;!(r=t.next()).done;)r=r.value,s=l+T(r,p++),c+=_(r,e,n,s,o);else if(s==="object"){if(typeof t.then=="function")return _(nt(t),e,n,r,o);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return c}i(_,"mapIntoArray");function y(t,e,n){if(t==null)return t;var r=[],o=0;return _(t,r,"","",function(s){return e.call(n,s,o++)}),r}i(y,"mapChildren");function rt(t){if(t._status===-1){var e=t._result,n=e();n.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r,n.status===void 0&&(n.status="fulfilled",n.value=r))},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r,n.status===void 0&&(n.status="rejected",n.reason=r))}),t._status===-1&&(t._status=0,t._result=n)}if(t._status===1)return t._result.default;throw t._result}i(rt,"lazyInitializer");var O=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function I(t){var e=f.T,n={};n.types=e!==null?e.types:null,f.T=n;try{var r=t(),o=f.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(R,O)}catch(s){O(s)}finally{e!==null&&n.types!==null&&(e.types=n.types),f.T=e}}i(I,"startTransition");function k(t){var e=f.T;if(e!==null){var n=e.types;n===null?e.types=[t]:n.indexOf(t)===-1&&n.push(t)}else I(k.bind(null,t))}i(k,"addTransitionType");var ut={map:y,forEach:i(function(t,e,n){y(t,function(){e.apply(this,arguments)},n)},"forEach"),count:i(function(t){var e=0;return y(t,function(){e++}),e},"count"),toArray:i(function(t){return y(t,function(e){return e})||[]},"toArray"),only:i(function(t){if(!S(t))throw Error("React.Children.only expected to receive a single React element child.");return t},"only")};u.Activity=b;u.Children=ut;u.Component=E;u.Fragment=G;u.Profiler=B;u.PureComponent=C;u.StrictMode=W;u.Suspense=Z;u.ViewTransition=K;u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f;u.__COMPILER_RUNTIME={__proto__:null,c:i(function(t){return f.H.useMemoCache(t)},"c")};u.addTransitionType=k;u.cache=function(t){return function(){return t.apply(null,arguments)}};u.cacheSignal=function(){return null};u.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var r=g({},t.props),o=t.key;if(e!=null)for(s in e.key!==void 0&&(o=""+e.key),e)!Y.call(e,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&e.ref===void 0||(r[s]=e[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];r.children=c}return A(t.type,o,r)};u.createContext=function(t){return t={$$typeof:V,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Q,_context:t},t};u.createElement=function(t,e,n){var r,o={},s=null;if(e!=null)for(r in e.key!==void 0&&(s=""+e.key),e)Y.call(e,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=e[r]);var c=arguments.length-2;if(c===1)o.children=n;else if(1<c){for(var l=Array(c),p=0;p<c;p++)l[p]=arguments[p+2];o.children=l}if(t&&t.defaultProps)for(r in c=t.defaultProps,c)o[r]===void 0&&(o[r]=c[r]);return A(t,s,o)};u.createRef=function(){return{current:null}};u.forwardRef=function(t){return{$$typeof:X,render:t}};u.isValidElement=S;u.lazy=function(t){return{$$typeof:H,_payload:{_status:-1,_result:t},_init:rt}};u.memo=function(t,e){return{$$typeof:J,type:t,compare:e===void 0?null:e}};u.startTransition=I;u.unstable_useCacheRefresh=function(){return f.H.useCacheRefresh()};u.use=function(t){return f.H.use(t)};u.useActionState=function(t,e,n){return f.H.useActionState(t,e,n)};u.useCallback=function(t,e){return f.H.useCallback(t,e)};u.useContext=function(t){return f.H.useContext(t)};u.useDebugValue=function(){};u.useDeferredValue=function(t,e){return f.H.useDeferredValue(t,e)};u.useEffect=function(t,e){return f.H.useEffect(t,e)};u.useEffectEvent=function(t){return f.H.useEffectEvent(t)};u.useId=function(){return f.H.useId()};u.useImperativeHandle=function(t,e,n){return f.H.useImperativeHandle(t,e,n)};u.useInsertionEffect=function(t,e){return f.H.useInsertionEffect(t,e)};u.useLayoutEffect=function(t,e){return f.H.useLayoutEffect(t,e)};u.useMemo=function(t,e){return f.H.useMemo(t,e)};u.useOptimistic=function(t,e){return f.H.useOptimistic(t,e)};u.useReducer=function(t,e,n){return f.H.useReducer(t,e,n)};u.useRef=function(t){return f.H.useRef(t)};u.useState=function(t){return f.H.useState(t)};u.useSyncExternalStore=function(t,e,n){return f.H.useSyncExternalStore(t,e,n)};u.useTransition=function(){return f.H.useTransition()};u.version="19.3.1"});var ot=a((lt,M)=>{"use strict";M.exports=x()});var U=a(v=>{"use strict";var st=Symbol.for("react.transitional.element"),it=Symbol.for("react.fragment");function L(t,e,n){var r=null;if(n!==void 0&&(r=""+n),e.key!==void 0&&(r=""+e.key),"key"in e){n={};for(var o in e)o!=="key"&&(n[o]=e[o])}else n=e;return e=n.ref,{$$typeof:st,type:t,key:r,ref:e!==void 0?e:null,props:n}}i(L,"jsxProd");v.Fragment=it;v.jsx=L;v.jsxs=L});var ft=a((at,D)=>{"use strict";D.exports=U()});export{ot as a,ft as b};
@@ -1,4 +1,4 @@
1
- import{a as nt,b as ot}from"./chunk-42RZZFLX.js";import"./chunk-BQS3C5V3.js";import"./chunk-IJNP6YSD.js";import{d as tt}from"./chunk-CAEJQOMU.js";import"./chunk-D3DZZHZA.js";import{a as Ae}from"./chunk-CVSIFPI5.js";import{a as Ze}from"./chunk-QMULO5AP.js";import"./chunk-Y2YLTUMD.js";import"./chunk-OVEOTKK5.js";import"./chunk-UBX5ZPLV.js";import"./chunk-VNH4OBJS.js";import{a as et}from"./chunk-2DT3QG6Q.js";import"./chunk-KTK4NDWQ.js";import"./chunk-XLYFGUEF.js";import"./chunk-D65UVZIA.js";import"./chunk-NGVP66OH.js";import"./chunk-QAOZXPLU.js";import"./chunk-BG2CJOVS.js";import{a as Ye}from"./chunk-645S7KRU.js";import{b as Ve}from"./chunk-3D67ZJRW.js";import"./chunk-6YBEKVUG.js";import{c as Xe,d as we,e as Ne,f as Ee,g as Me}from"./chunk-ZSWW2UGP.js";import"./chunk-QRA7AKYO.js";import{i as ye}from"./chunk-MWYGLPDV.js";import"./chunk-HFBSWKJS.js";import"./chunk-4EPW63HS.js";import"./chunk-KBYFBEG2.js";import"./chunk-JMZT3CEW.js";import"./chunk-VUOEJJUH.js";import"./chunk-YUVGMKHG.js";import{a as Je}from"./chunk-F5WJCL3F.js";import"./chunk-VXZAS5VS.js";import{b as Ge}from"./chunk-RUQTILJN.js";import{a as ve}from"./chunk-6A6AELDJ.js";import"./chunk-TUFOWHEF.js";import{n as Ce}from"./chunk-ODLNNVP2.js";import"./chunk-ZPQBVYNN.js";import{B as J,h as ge,i as xe,j as Ke,r as Ue,s as le,x as ie}from"./chunk-PUK3H4RN.js";import"./chunk-PDBW6GTJ.js";import{a as Et}from"./chunk-GWNGVKLG.js";import{a as Nt,b as Lt}from"./chunk-6G3E4PJ2.js";import{a as d,d as De}from"./chunk-5PEAXTYQ.js";var V=De(Et(),1),j=De(Nt(),1);var u=De(Lt(),1);var Se=class{static{d(this,"Diff")}diff(e,n,t={}){let o;typeof t=="function"?(o=t,t={}):"callback"in t&&(o=t.callback);let r=this.castInput(e,t),l=this.castInput(n,t),i=this.removeEmpty(this.tokenize(r,t)),a=this.removeEmpty(this.tokenize(l,t));return this.diffWithOptionsObj(i,a,t,o)}diffWithOptionsObj(e,n,t,o){var r;let l=d(h=>{if(h=this.postProcess(h,t),o){setTimeout(function(){o(h)},0);return}else return h},"done"),i=n.length,a=e.length,c=1,m=i+a;t.maxEditLength!=null&&(m=Math.min(m,t.maxEditLength));let p=(r=t.timeout)!==null&&r!==void 0?r:1/0,f=Date.now()+p,b=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(b[0],n,e,0,t);if(b[0].oldPos+1>=a&&g+1>=i)return l(this.buildValues(b[0].lastComponent,n,e));let k=-1/0,q=1/0,N=d(()=>{for(let h=Math.max(k,-c);h<=Math.min(q,c);h+=2){let S,x=b[h-1],v=b[h+1];x&&(b[h-1]=void 0);let y=!1;if(v){let E=v.oldPos-h;y=v&&0<=E&&E<i}let w=x&&x.oldPos+1<a;if(!y&&!w){b[h]=void 0;continue}if(!w||y&&x.oldPos<v.oldPos?S=this.addToPath(v,!0,!1,0,t):S=this.addToPath(x,!1,!0,1,t),g=this.extractCommon(S,n,e,h,t),S.oldPos+1>=a&&g+1>=i)return l(this.buildValues(S.lastComponent,n,e))||!0;b[h]=S,S.oldPos+1>=a&&(q=Math.min(q,h-1)),g+1>=i&&(k=Math.max(k,h+1))}c++},"execEditLength");if(o)d(function h(){setTimeout(function(){if(c>m||Date.now()>f)return o(void 0);N()||h()},0)},"exec")();else for(;c<=m&&Date.now()<=f;){let h=N();if(h)return h}}addToPath(e,n,t,o,r){let l=e.lastComponent;return l&&!r.oneChangePerToken&&l.added===n&&l.removed===t?{oldPos:e.oldPos+o,lastComponent:{count:l.count+1,added:n,removed:t,previousComponent:l.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:n,removed:t,previousComponent:l}}}extractCommon(e,n,t,o,r){let l=n.length,i=t.length,a=e.oldPos,c=a-o,m=0;for(;c+1<l&&a+1<i&&this.equals(t[a+1],n[c+1],r);)c++,a++,m++,r.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return m&&!r.oneChangePerToken&&(e.lastComponent={count:m,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,c}equals(e,n,t){return t.comparator?t.comparator(e,n):e===n||!!t.ignoreCase&&e.toLowerCase()===n.toLowerCase()}removeEmpty(e){let n=[];for(let t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n}castInput(e,n){return e}tokenize(e,n){return Array.from(e)}join(e){return e.join("")}postProcess(e,n){return e}get useLongestToken(){return!1}buildValues(e,n,t){let o=[],r;for(;e;)o.push(e),r=e.previousComponent,delete e.previousComponent,e=r;o.reverse();let l=o.length,i=0,a=0,c=0;for(;i<l;i++){let m=o[i];if(m.removed)m.value=this.join(t.slice(c,c+m.count)),c+=m.count;else{if(!m.added&&this.useLongestToken){let p=n.slice(a,a+m.count);p=p.map(function(f,b){let g=t[c+b];return g.length>f.length?g:f}),m.value=this.join(p)}else m.value=this.join(n.slice(a,a+m.count));a+=m.count,m.added||(c+=m.count)}}return o}};var $e=class extends Se{static{d(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=_t}equals(e,n,t){return t.ignoreWhitespace?((!t.newlineIsToken||!e.includes(`
1
+ import{a as nt,b as ot}from"./chunk-MBA6SBBO.js";import"./chunk-3FVWKQLT.js";import"./chunk-GBVYBBIF.js";import{d as tt}from"./chunk-MXYZQCDR.js";import"./chunk-MAZES4KJ.js";import{a as Ae}from"./chunk-CVSIFPI5.js";import{a as Ze}from"./chunk-RQFK2LYP.js";import"./chunk-Y2YLTUMD.js";import"./chunk-CD6Y4HMA.js";import"./chunk-LMCBMC2V.js";import"./chunk-QF743FSL.js";import{a as et}from"./chunk-DRHZZ7IN.js";import"./chunk-IQ5CIBXJ.js";import"./chunk-YNCZVYCO.js";import"./chunk-OWRWDDJT.js";import"./chunk-QHVUXMRV.js";import"./chunk-2NUCBQFU.js";import"./chunk-R3RIZDUS.js";import{a as Ye}from"./chunk-7VZPHPTH.js";import{b as Ve}from"./chunk-EDL46BPM.js";import"./chunk-KMA6JR2E.js";import{c as Xe,d as we,e as Ne,f as Ee,g as Me}from"./chunk-4KPATTV6.js";import"./chunk-N7FOBAV3.js";import{i as ye}from"./chunk-VB3BKQCE.js";import"./chunk-4SY2N2RS.js";import"./chunk-4AG356VE.js";import"./chunk-553O7ESU.js";import"./chunk-SCTYLLJT.js";import"./chunk-OZID3UYF.js";import"./chunk-L27FKJTG.js";import{a as Je}from"./chunk-CTIZP3XO.js";import"./chunk-VSYZL2WH.js";import{b as Ge}from"./chunk-IAVAD545.js";import{a as ve}from"./chunk-LYVYUTQY.js";import"./chunk-P37L55FP.js";import{n as Ce}from"./chunk-K24LZAP2.js";import"./chunk-ZPQBVYNN.js";import{B as J,h as ge,i as xe,j as Ke,r as Ue,s as le,x as ie}from"./chunk-OYCDWIG2.js";import"./chunk-PDBW6GTJ.js";import{a as Et}from"./chunk-A6TVTNKO.js";import{a as Nt,b as Lt}from"./chunk-ADABTCDI.js";import{a as d,d as De}from"./chunk-5PEAXTYQ.js";var V=De(Et(),1),j=De(Nt(),1);var u=De(Lt(),1);var Se=class{static{d(this,"Diff")}diff(e,n,t={}){let o;typeof t=="function"?(o=t,t={}):"callback"in t&&(o=t.callback);let r=this.castInput(e,t),l=this.castInput(n,t),i=this.removeEmpty(this.tokenize(r,t)),a=this.removeEmpty(this.tokenize(l,t));return this.diffWithOptionsObj(i,a,t,o)}diffWithOptionsObj(e,n,t,o){var r;let l=d(h=>{if(h=this.postProcess(h,t),o){setTimeout(function(){o(h)},0);return}else return h},"done"),i=n.length,a=e.length,c=1,m=i+a;t.maxEditLength!=null&&(m=Math.min(m,t.maxEditLength));let p=(r=t.timeout)!==null&&r!==void 0?r:1/0,f=Date.now()+p,b=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(b[0],n,e,0,t);if(b[0].oldPos+1>=a&&g+1>=i)return l(this.buildValues(b[0].lastComponent,n,e));let k=-1/0,q=1/0,N=d(()=>{for(let h=Math.max(k,-c);h<=Math.min(q,c);h+=2){let S,x=b[h-1],v=b[h+1];x&&(b[h-1]=void 0);let y=!1;if(v){let E=v.oldPos-h;y=v&&0<=E&&E<i}let w=x&&x.oldPos+1<a;if(!y&&!w){b[h]=void 0;continue}if(!w||y&&x.oldPos<v.oldPos?S=this.addToPath(v,!0,!1,0,t):S=this.addToPath(x,!1,!0,1,t),g=this.extractCommon(S,n,e,h,t),S.oldPos+1>=a&&g+1>=i)return l(this.buildValues(S.lastComponent,n,e))||!0;b[h]=S,S.oldPos+1>=a&&(q=Math.min(q,h-1)),g+1>=i&&(k=Math.max(k,h+1))}c++},"execEditLength");if(o)d(function h(){setTimeout(function(){if(c>m||Date.now()>f)return o(void 0);N()||h()},0)},"exec")();else for(;c<=m&&Date.now()<=f;){let h=N();if(h)return h}}addToPath(e,n,t,o,r){let l=e.lastComponent;return l&&!r.oneChangePerToken&&l.added===n&&l.removed===t?{oldPos:e.oldPos+o,lastComponent:{count:l.count+1,added:n,removed:t,previousComponent:l.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:n,removed:t,previousComponent:l}}}extractCommon(e,n,t,o,r){let l=n.length,i=t.length,a=e.oldPos,c=a-o,m=0;for(;c+1<l&&a+1<i&&this.equals(t[a+1],n[c+1],r);)c++,a++,m++,r.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return m&&!r.oneChangePerToken&&(e.lastComponent={count:m,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,c}equals(e,n,t){return t.comparator?t.comparator(e,n):e===n||!!t.ignoreCase&&e.toLowerCase()===n.toLowerCase()}removeEmpty(e){let n=[];for(let t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n}castInput(e,n){return e}tokenize(e,n){return Array.from(e)}join(e){return e.join("")}postProcess(e,n){return e}get useLongestToken(){return!1}buildValues(e,n,t){let o=[],r;for(;e;)o.push(e),r=e.previousComponent,delete e.previousComponent,e=r;o.reverse();let l=o.length,i=0,a=0,c=0;for(;i<l;i++){let m=o[i];if(m.removed)m.value=this.join(t.slice(c,c+m.count)),c+=m.count;else{if(!m.added&&this.useLongestToken){let p=n.slice(a,a+m.count);p=p.map(function(f,b){let g=t[c+b];return g.length>f.length?g:f}),m.value=this.join(p)}else m.value=this.join(n.slice(a,a+m.count));a+=m.count,m.added||(c+=m.count)}}return o}};var $e=class extends Se{static{d(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=_t}equals(e,n,t){return t.ignoreWhitespace?((!t.newlineIsToken||!e.includes(`
2
2
  `))&&(e=e.trim()),(!t.newlineIsToken||!n.includes(`
3
3
  `))&&(n=n.trim())):t.ignoreNewlineAtEof&&!t.newlineIsToken&&(e.endsWith(`
4
4
  `)&&(e=e.slice(0,-1)),n.endsWith(`
@@ -1 +1 @@
1
- import{b as p,c as l}from"./chunk-ZSWW2UGP.js";import{a as h}from"./chunk-6G3E4PJ2.js";import{a as t,d as g}from"./chunk-5PEAXTYQ.js";var u=g(h(),1);var a={console:"`",palette:"k"},c="lunora-studio-shortcuts",r=new Set,w=t(o=>{let n=typeof o?.console=="string"?o.console.toLowerCase():void 0,s=typeof o?.palette=="string"?o.palette.toLowerCase():void 0;return n?.length===1&&s?.length===1&&n!==s?{console:n,palette:s}:a},"p"),e=a,m=t(()=>{e=w(p(c)[0]);for(let o of r)o()},"S");m();var y=t(o=>(r.add(o),()=>{r.delete(o)}),"g"),i=t(()=>e,"a"),S=t(()=>(0,u.useSyncExternalStore)(y,i,i),"w"),L=t((o,n)=>{if(n.length!==1)return;let s=n.toLowerCase(),f=o==="console"?"palette":"console";e=e[f]===s?{...e,[o]:s,[f]:e[o]}:{...e,[o]:s},l(c,[e]);for(let d of r)d()},"y"),v=t(()=>{e=a,l(c,[e]);for(let o of r)o()},"C");export{S as a,L as b,v as c};
1
+ import{b as p,c as l}from"./chunk-4KPATTV6.js";import{a as h}from"./chunk-ADABTCDI.js";import{a as t,d as g}from"./chunk-5PEAXTYQ.js";var u=g(h(),1);var a={console:"`",palette:"k"},c="lunora-studio-shortcuts",r=new Set,w=t(o=>{let n=typeof o?.console=="string"?o.console.toLowerCase():void 0,s=typeof o?.palette=="string"?o.palette.toLowerCase():void 0;return n?.length===1&&s?.length===1&&n!==s?{console:n,palette:s}:a},"p"),e=a,m=t(()=>{e=w(p(c)[0]);for(let o of r)o()},"S");m();var y=t(o=>(r.add(o),()=>{r.delete(o)}),"g"),i=t(()=>e,"a"),S=t(()=>(0,u.useSyncExternalStore)(y,i,i),"w"),L=t((o,n)=>{if(n.length!==1)return;let s=n.toLowerCase(),f=o==="console"?"palette":"console";e=e[f]===s?{...e,[o]:s,[f]:e[o]}:{...e,[o]:s},l(c,[e]);for(let d of r)d()},"y"),v=t(()=>{e=a,l(c,[e]);for(let o of r)o()},"C");export{S as a,L as b,v as c};
@@ -1 +1 @@
1
- import{j as g}from"./chunk-PUK3H4RN.js";import{a as y}from"./chunk-GWNGVKLG.js";import{a as x}from"./chunk-6G3E4PJ2.js";import{a,d as b}from"./chunk-5PEAXTYQ.js";var k=b(y(),1),n=b(x(),1);var _=a(function(o,d,s){let t=(0,k.c)(15),c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={kind:"loading"},t[0]=c):c=t[0];let[h,E]=(0,n.useState)(c),r;t[1]!==d?(r=a(async()=>d(),"f"),t[1]=d,t[2]=r):r=t[2];let p=(0,n.useEffectEvent)(r),f;t[3]!==s?(f=a(e=>s(e),"m"),t[3]=s,t[4]=f):f=t[4];let v=(0,n.useEffectEvent)(f),i;t[5]!==v||t[6]!==p||t[7]!==o?(i=a(()=>{if(o!==void 0)return;let e=!1;return p().then(l=>(e||E(v(l)),l)).catch(l=>{e||E({kind:"error",message:g(l)})}),()=>{e=!0}},"u"),t[5]=v,t[6]=p,t[7]=o,t[8]=i):i=t[8];let m;t[9]!==o?(m=[o],t[9]=o,t[10]=m):m=t[10],(0,n.useEffect)(i,m);let u;return t[11]!==s||t[12]!==h||t[13]!==o?(u=o===void 0?h:s(o),t[11]=s,t[12]=h,t[13]=o,t[14]=u):u=t[14],u},"$");export{_ as a};
1
+ import{j as g}from"./chunk-OYCDWIG2.js";import{a as y}from"./chunk-A6TVTNKO.js";import{a as x}from"./chunk-ADABTCDI.js";import{a,d as b}from"./chunk-5PEAXTYQ.js";var k=b(y(),1),n=b(x(),1);var _=a(function(o,d,s){let t=(0,k.c)(15),c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={kind:"loading"},t[0]=c):c=t[0];let[h,E]=(0,n.useState)(c),r;t[1]!==d?(r=a(async()=>d(),"f"),t[1]=d,t[2]=r):r=t[2];let p=(0,n.useEffectEvent)(r),f;t[3]!==s?(f=a(e=>s(e),"m"),t[3]=s,t[4]=f):f=t[4];let v=(0,n.useEffectEvent)(f),i;t[5]!==v||t[6]!==p||t[7]!==o?(i=a(()=>{if(o!==void 0)return;let e=!1;return p().then(l=>(e||E(v(l)),l)).catch(l=>{e||E({kind:"error",message:g(l)})}),()=>{e=!0}},"u"),t[5]=v,t[6]=p,t[7]=o,t[8]=i):i=t[8];let m;t[9]!==o?(m=[o],t[9]=o,t[10]=m):m=t[10],(0,n.useEffect)(i,m);let u;return t[11]!==s||t[12]!==h||t[13]!==o?(u=o===void 0?h:s(o),t[11]=s,t[12]=h,t[13]=o,t[14]=u):u=t[14],u},"$");export{_ as a};
@@ -1 +1 @@
1
- import{a as O}from"./chunk-SUUBCPUD.js";import{a as C}from"./chunk-RDS46R5R.js";import{a as c}from"./chunk-FWOOA2ZR.js";import{b as N}from"./chunk-M4TCBPSY.js";import"./chunk-YUVGMKHG.js";import{a as k}from"./chunk-N7EIHD3H.js";import"./chunk-F5WJCL3F.js";import{a as w,b as T,c as A,d as f,e as s,f as l}from"./chunk-VXZAS5VS.js";import"./chunk-FGZ73BFG.js";import"./chunk-RUQTILJN.js";import"./chunk-4PI2OSSP.js";import{a as v}from"./chunk-6A6AELDJ.js";import{c as p}from"./chunk-TUFOWHEF.js";import{a as b,e as S}from"./chunk-OSHODLMU.js";import"./chunk-ODLNNVP2.js";import"./chunk-ZPQBVYNN.js";import{B as y}from"./chunk-PUK3H4RN.js";import"./chunk-PDBW6GTJ.js";import"./chunk-GWNGVKLG.js";import{a as R,b as V}from"./chunk-6G3E4PJ2.js";import{a as n,d as x}from"./chunk-5PEAXTYQ.js";var F=x(R(),1);var e=x(V(),1);var $=n(a=>{let t=a.trim();if(t.length===0)return{context:void 0,error:null};try{let o=JSON.parse(t);return o===null||typeof o!="object"||Array.isArray(o)?{context:void 0,error:"Targeting context must be a JSON object."}:{context:o,error:null}}catch{return{context:void 0,error:"Targeting context is not valid JSON."}}},"H"),q='{ "targetingKey": "user-123", "plan": "premium" }',D=n(a=>a.type==="object"?JSON.stringify(a.value):String(a.value),"R"),Y=n(({initialShardKey:a=""})=>{let t=y(),[o,j]=(0,F.useState)(""),{context:g,error:m}=$(o),I=g===void 0?{}:{context:g},{data:i,error:J,errorSource:K,liveError:E}=p(v.listFlags,I,{live:!0,shardKey:a}),u=i!==void 0,L=i?.configured??!1,h=Array.isArray(i?.flags)?[...i.flags].toSorted((r,B)=>r.key.localeCompare(B.key)):[],d;return u&&!L?d=(0,e.jsx)(c,{description:t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),testId:"flags-unconfigured",title:t("No flags provider configured")}):u&&h.length===0?d=(0,e.jsx)(c,{description:t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),testId:"flags-empty",title:t("No flags read")}):d=(0,e.jsx)(b,{className:"overflow-hidden py-0",children:(0,e.jsx)(S,{className:"px-0",children:(0,e.jsxs)(w,{"data-testid":"flags-table",children:[(0,e.jsx)(T,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(s,{children:t("Key")}),(0,e.jsx)(s,{children:t("Type")}),(0,e.jsx)(s,{children:t("Value")}),(0,e.jsx)(s,{children:t("Reason")}),(0,e.jsx)(s,{children:t("Variant")})]})}),(0,e.jsx)(A,{children:h.map(r=>(0,e.jsxs)(f,{"data-testid":`flags-row-${r.key}`,children:[(0,e.jsx)(l,{className:"font-mono text-xs",children:r.key}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.type}),(0,e.jsx)(l,{className:"font-mono text-xs",children:D(r)}),(0,e.jsx)(l,{children:r.errorCode===void 0?(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:r.reason??"\u2014"}):(0,e.jsx)(N,{"data-testid":`flags-error-${r.key}`,variant:"destructive",children:r.errorCode})}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.variant??"\u2014"})]},r.key))})]})})}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-flags-panel",children:[J!==null&&(0,e.jsx)(k,{error:K,shardKey:a,testId:"flags-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(C,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),(0,e.jsx)(O,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:n(r=>{j(r.target.value)},"onChange"),placeholder:q,rows:3,value:o}),m!==null&&(0,e.jsx)("p",{className:"text-xs text-destructive","data-testid":"flags-context-error",role:"alert",children:t(m)}),E!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"flags-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")})]}),d]})},"W");export{Y as default};
1
+ import{a as O}from"./chunk-O6HYP4FT.js";import{a as C}from"./chunk-BMDQFH65.js";import{a as c}from"./chunk-K7Z7UTJJ.js";import{b as N}from"./chunk-XMJB5JOF.js";import"./chunk-L27FKJTG.js";import{a as k}from"./chunk-2BCNWFC5.js";import"./chunk-CTIZP3XO.js";import{a as w,b as T,c as A,d as f,e as s,f as l}from"./chunk-VSYZL2WH.js";import"./chunk-GWRKSV2Q.js";import"./chunk-IAVAD545.js";import"./chunk-EOFWXI3T.js";import{a as v}from"./chunk-LYVYUTQY.js";import{c as p}from"./chunk-P37L55FP.js";import{a as b,e as S}from"./chunk-D76SLSGV.js";import"./chunk-K24LZAP2.js";import"./chunk-ZPQBVYNN.js";import{B as y}from"./chunk-OYCDWIG2.js";import"./chunk-PDBW6GTJ.js";import"./chunk-A6TVTNKO.js";import{a as R,b as V}from"./chunk-ADABTCDI.js";import{a as n,d as x}from"./chunk-5PEAXTYQ.js";var F=x(R(),1);var e=x(V(),1);var $=n(a=>{let t=a.trim();if(t.length===0)return{context:void 0,error:null};try{let o=JSON.parse(t);return o===null||typeof o!="object"||Array.isArray(o)?{context:void 0,error:"Targeting context must be a JSON object."}:{context:o,error:null}}catch{return{context:void 0,error:"Targeting context is not valid JSON."}}},"H"),q='{ "targetingKey": "user-123", "plan": "premium" }',D=n(a=>a.type==="object"?JSON.stringify(a.value):String(a.value),"R"),Y=n(({initialShardKey:a=""})=>{let t=y(),[o,j]=(0,F.useState)(""),{context:g,error:m}=$(o),I=g===void 0?{}:{context:g},{data:i,error:J,errorSource:K,liveError:E}=p(v.listFlags,I,{live:!0,shardKey:a}),u=i!==void 0,L=i?.configured??!1,h=Array.isArray(i?.flags)?[...i.flags].toSorted((r,B)=>r.key.localeCompare(B.key)):[],d;return u&&!L?d=(0,e.jsx)(c,{description:t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),testId:"flags-unconfigured",title:t("No flags provider configured")}):u&&h.length===0?d=(0,e.jsx)(c,{description:t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),testId:"flags-empty",title:t("No flags read")}):d=(0,e.jsx)(b,{className:"overflow-hidden py-0",children:(0,e.jsx)(S,{className:"px-0",children:(0,e.jsxs)(w,{"data-testid":"flags-table",children:[(0,e.jsx)(T,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(s,{children:t("Key")}),(0,e.jsx)(s,{children:t("Type")}),(0,e.jsx)(s,{children:t("Value")}),(0,e.jsx)(s,{children:t("Reason")}),(0,e.jsx)(s,{children:t("Variant")})]})}),(0,e.jsx)(A,{children:h.map(r=>(0,e.jsxs)(f,{"data-testid":`flags-row-${r.key}`,children:[(0,e.jsx)(l,{className:"font-mono text-xs",children:r.key}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.type}),(0,e.jsx)(l,{className:"font-mono text-xs",children:D(r)}),(0,e.jsx)(l,{children:r.errorCode===void 0?(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:r.reason??"\u2014"}):(0,e.jsx)(N,{"data-testid":`flags-error-${r.key}`,variant:"destructive",children:r.errorCode})}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.variant??"\u2014"})]},r.key))})]})})}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-flags-panel",children:[J!==null&&(0,e.jsx)(k,{error:K,shardKey:a,testId:"flags-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(C,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),(0,e.jsx)(O,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:n(r=>{j(r.target.value)},"onChange"),placeholder:q,rows:3,value:o}),m!==null&&(0,e.jsx)("p",{className:"text-xs text-destructive","data-testid":"flags-context-error",role:"alert",children:t(m)}),E!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"flags-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")})]}),d]})},"W");export{Y as default};
@@ -1 +1 @@
1
- import{a as ne}from"./chunk-SUUBCPUD.js";import{a as A}from"./chunk-RDS46R5R.js";import{a as re}from"./chunk-645S7KRU.js";import{b as te}from"./chunk-3D67ZJRW.js";import{a as Q}from"./chunk-6YBEKVUG.js";import"./chunk-ZSWW2UGP.js";import{i as ee}from"./chunk-MWYGLPDV.js";import"./chunk-HFBSWKJS.js";import"./chunk-4EPW63HS.js";import{a as w}from"./chunk-KBYFBEG2.js";import"./chunk-JMZT3CEW.js";import"./chunk-VUOEJJUH.js";import{b as j}from"./chunk-M4TCBPSY.js";import"./chunk-YUVGMKHG.js";import{a as X}from"./chunk-6A6AELDJ.js";import{c as I,d as P,n as H}from"./chunk-ODLNNVP2.js";import"./chunk-ZPQBVYNN.js";import{B as Y,g as U,h as q,j as O,p as W,s as G,w as V}from"./chunk-PUK3H4RN.js";import"./chunk-PDBW6GTJ.js";import"./chunk-GWNGVKLG.js";import{a as he,b as ge}from"./chunk-6G3E4PJ2.js";import{a as o,d as M}from"./chunk-5PEAXTYQ.js";var c=M(he(),1);var n=M(ge(),1);var be=o(t=>t.kind==="id"?t.table===void 0?"id":`id<${t.table}>`:t.kind==="array"?t.element===void 0?"array":`${t.element}[]`:t.kind,"me"),xe=o(t=>t===void 0||t.length===0?"()":`(${t.map(e=>`${e.name}${e.optional?"?":""}: ${be(e)}`).join(", ")})`,"ge"),ye=o(t=>{switch(t){case"array":return[];case"bigint":return I(0n);case"boolean":return!1;case"bytes":return I(new ArrayBuffer(0));case"number":return 0;case"object":case"record":return{};default:return""}},"be"),ve=o(t=>{let e={};for(let r of t??[])r.optional||(e[r.name]=ye(r.kind));return JSON.stringify(e,void 0,2)},"xe"),Ne=q(X.runAs),h="\xABsensitive\xBB",we=o(t=>(t??[]).filter(e=>e.sensitive===!0).map(e=>e.name),"ve"),Ae=o((t,e)=>{if(e.length===0)return t;try{let r=JSON.parse(t);if(typeof r!="object"||r===null||Array.isArray(r))return"";let l={...r};for(let i of e)Object.hasOwn(l,i)&&(l[i]=h);return JSON.stringify(l,null,2)}catch{return""}},"Ne"),Se=4,ke=o(t=>{let e=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{return new TextDecoder("utf-8",{fatal:!0}).decode(e)}catch{return}},"Ae"),$e=o(t=>Array.isArray(t)?[]:Object.keys(t).filter(e=>e.length>0),"we"),Ie=o(t=>{let e=[],r=new Set,l=[t];for(;l.length>0;){let i=l.pop();if(typeof i=="string")i.length>0&&e.push(i);else if(typeof i=="number"||typeof i=="bigint")e.push(String(i));else if(i instanceof ArrayBuffer||ArrayBuffer.isView(i)){let u=ke(i);u!==void 0&&u.length>0&&e.push(u)}else typeof i=="object"&&i!==null&&!r.has(i)&&(r.add(i),e.push(...$e(i)),l.push(...Object.values(i)))}return e},"ke"),Oe=o((t,e)=>{let r=[],l=new Set,i=[[t,e]];for(;i.length>0;){let[u,s]=i.pop()??[void 0,void 0];typeof s=="boolean"?r.push({key:u,text:s?"true":"false"}):typeof s=="object"&&s!==null&&!l.has(s)&&(l.add(s),Array.isArray(s)?i.push(...s.map(p=>[void 0,p])):i.push(...Object.entries(s)))}return r},"Re"),ae=o(t=>t.replaceAll(/[$()*+.?[\\\]^{|}]/gu,String.raw`\$&`),"P"),je=o((t,e)=>e.length>=Se?t.replaceAll(e,h):t.replaceAll(new RegExp(`(?<![A-Za-z0-9])${ae(e)}(?![A-Za-z0-9])`,"gu"),h),"Oe"),Re=o((t,e)=>{let r=t.replaceAll(`"${e.text}"`,h);if(e.key===void 0)return r;let l=ae(e.key);return r.replaceAll(new RegExp(`(?<![A-Za-z0-9_])${l}=${e.text}(?![A-Za-z0-9_])`,"gu"),`${e.key}=${h}`).replaceAll(new RegExp(String.raw`"${l}":\s*${e.text}(?![A-Za-z0-9_])`,"gu"),`"${e.key}":${h}`)},"Ie"),Ce=o((t,e,r)=>{if(r.length===0||typeof e!="object"||e===null)return t;let l=r.flatMap(s=>Oe(s,e[s])),i=r.flatMap(s=>Ie(e[s])).flatMap(s=>{let p=JSON.stringify(s).slice(1,-1);return p===s?[s]:[s,p]}).toSorted((s,p)=>p.length-s.length),u=t;for(let s of l)u=Re(u,s);for(let s of i)u=je(u,s);return u},"$e"),Te=10,Fe=o(t=>t===void 0?"undefined":JSON.stringify(t,W,2),"Ce"),ze=o((t,e)=>[{argsText:Ae(e.argsText,e.sensitive),at:Date.now(),id:(t[0]?.id??0)+1,kind:e.selected.kind,path:e.selected.path,redacted:e.sensitive.length>0,shardKey:e.shardKey,status:e.runStatus},...t].slice(0,Te),"Ee"),Ge=o(({functions:t,runAsIdentity:e=!1}={})=>{let r=Y(),l=H(),[i,u]=(0,c.useState)(null),[s,p]=(0,c.useState)(null),S=t??i??[],[R,C]=(0,c.useState)(""),[y,k]=(0,c.useState)("{}"),[g,T]=(0,c.useState)(""),[b,se]=(0,c.useState)(""),[$,x]=(0,c.useState)("idle"),[ie,v]=(0,c.useState)(void 0),[F,N]=(0,c.useState)(null),[z,oe]=(0,c.useState)([]);(0,c.useEffect)(()=>{if(t!==void 0)return;let a=!1;return l.listFunctions().then(f=>(a||u(f),f)).catch(f=>{a||p(O(f))}),()=>{a=!0}},[l,t]);let B=R===""?S[0]?.path??"":R,d=S.find(a=>a.path===B),le=o(async()=>{if(!d)return;let a;try{a=y.trim()===""?{}:P(JSON.parse(y))}catch(m){x("error"),v(void 0),N(r("Invalid JSON args: {message}",{message:m.message}));return}let f={__lunoraRef:d.path},E=g.trim()===""?{}:{shardKey:g.trim()},K=e?b.trim():"",Z=we(d.args),D=o(m=>{oe(me=>ze(me,{argsText:y,runStatus:m,selected:d,sensitive:Z,shardKey:g}))},"M");x("running"),N(null);try{let m=K===""?await U(l,d.kind,f,a,E):await l.query(Ne,{args:a,functionPath:d.path,userId:K},E);te(g),v(m),x("success"),D("success")}catch(m){v(void 0),N(Ce(O(m),a,Z)),x("error"),D("error")}},"H"),de=o(a=>{if(C(a.path),T(a.shardKey),a.redacted){v(void 0),N(r("Re-enter the sensitive values before running this again.")),x("error");return}k(a.argsText)},"G"),ue=o(a=>{C(a.target.value)},"W"),ce=o(a=>{k(a.target.value)},"X"),fe=o(a=>{se(a.target.value)},"Y"),J=o(()=>{G(le())},"j"),L=e?b.trim():"",_=$==="running"||d===void 0,pe=o(()=>{k(ve(d?.args))},"_");return(0,n.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-runner",children:[s!==null&&(0,n.jsx)("p",{className:"text-sm text-destructive","data-testid":"function-discover-error",role:"alert",children:s}),(0,n.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsx)(A,{htmlFor:"function-select",children:r("Function")}),(0,n.jsx)("select",{"aria-label":r("Function"),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"function-select",id:"function-select",onChange:ue,value:B,children:S.map(a=>(0,n.jsxs)("option",{value:a.path,children:[a.path," (",a.kind,")"]},a.path))}),d!==void 0&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,n.jsx)("span",{className:"mr-1.5 font-medium",children:r("Signature")}),(0,n.jsx)("code",{className:"font-mono","data-testid":"function-signature",children:xe(d.args)})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)(A,{htmlFor:"args-input",children:r("Arguments")}),(0,n.jsx)(w,{"data-testid":"prefill-button",disabled:d===void 0,onClick:pe,size:"xs",type:"button",variant:"ghost",children:r("Prefill")})]}),(0,n.jsx)(ne,{"aria-label":r("Arguments"),className:"font-mono text-xs","data-testid":"args-input",id:"args-input",onChange:ce,value:y})]}),(0,n.jsx)(re,{onChange:T,testId:"shard-input",value:g}),e&&(0,n.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"run-as-field",children:[(0,n.jsx)(A,{htmlFor:"run-as-input",children:r("Run as identity (userId)")}),(0,n.jsx)(ee,{"aria-label":r("Run as identity (userId)"),className:"font-mono text-xs","data-testid":"run-as-input",id:"run-as-input",onChange:fe,placeholder:r("Leave empty to run as admin"),value:b}),(0,n.jsx)("p",{className:"text-[11px] text-muted-foreground",children:r("Dev only: runs the function as this user so you can test auth and RLS. Forged over the admin gate.")})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[L!==""&&d!==void 0&&d.kind!=="query"?(0,n.jsx)(Q,{confirmLabel:r("This will execute `{functionPath}` as user `{userId}`.",{functionPath:d.path,userId:L}),disabled:_,onConfirm:J,testId:"run-button",children:r("Run")}):(0,n.jsx)(w,{"data-testid":"run-button",disabled:_,onClick:J,type:"button",children:r("Run")}),d!==void 0&&(0,n.jsx)(j,{variant:"outline",children:d.kind}),e&&b.trim()!==""&&(0,n.jsx)(j,{"data-testid":"run-as-badge",variant:"secondary",children:r("as {userId}",{userId:b.trim()})})]})]}),$==="error"&&F!==null&&(0,n.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs text-destructive","data-testid":"error",role:"alert",children:F}),$==="success"&&(0,n.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"result",children:Fe(ie)}),z.length>0&&(0,n.jsx)("ul",{className:"flex flex-col overflow-hidden rounded-xl border border-border","data-testid":"fn-history",children:z.map((a,f)=>(0,n.jsxs)("li",{className:"flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-sm last:border-b-0","data-testid":"fn-history-row",children:[(0,n.jsx)("span",{className:a.status==="success"?"text-success":"text-destructive","data-testid":`fn-history-status-${f.toString()}`,children:a.status==="success"?"\u2713":"\u2717"})," ",(0,n.jsxs)("span",{className:"font-mono text-xs",children:[a.path," (",a.kind,")"]})," ",(0,n.jsx)("time",{className:"text-xs text-muted-foreground",children:V(a.at)})," ",(0,n.jsx)(w,{className:"ml-auto","data-testid":`fn-history-load-${f.toString()}`,onClick:o(()=>{de(a)},"onClick"),size:"xs",type:"button",variant:"ghost",children:r("Load")})]},a.id))})]})},"Ge");export{Ge as FunctionRunner};
1
+ import{a as ne}from"./chunk-O6HYP4FT.js";import{a as A}from"./chunk-BMDQFH65.js";import{a as re}from"./chunk-7VZPHPTH.js";import{b as te}from"./chunk-EDL46BPM.js";import{a as Q}from"./chunk-KMA6JR2E.js";import"./chunk-4KPATTV6.js";import{i as ee}from"./chunk-VB3BKQCE.js";import"./chunk-4SY2N2RS.js";import"./chunk-4AG356VE.js";import{a as w}from"./chunk-553O7ESU.js";import"./chunk-SCTYLLJT.js";import"./chunk-OZID3UYF.js";import{b as j}from"./chunk-XMJB5JOF.js";import"./chunk-L27FKJTG.js";import{a as X}from"./chunk-LYVYUTQY.js";import{c as I,d as P,n as H}from"./chunk-K24LZAP2.js";import"./chunk-ZPQBVYNN.js";import{B as Y,g as U,h as q,j as O,p as W,s as G,w as V}from"./chunk-OYCDWIG2.js";import"./chunk-PDBW6GTJ.js";import"./chunk-A6TVTNKO.js";import{a as he,b as ge}from"./chunk-ADABTCDI.js";import{a as o,d as M}from"./chunk-5PEAXTYQ.js";var c=M(he(),1);var n=M(ge(),1);var be=o(t=>t.kind==="id"?t.table===void 0?"id":`id<${t.table}>`:t.kind==="array"?t.element===void 0?"array":`${t.element}[]`:t.kind,"me"),xe=o(t=>t===void 0||t.length===0?"()":`(${t.map(e=>`${e.name}${e.optional?"?":""}: ${be(e)}`).join(", ")})`,"ge"),ye=o(t=>{switch(t){case"array":return[];case"bigint":return I(0n);case"boolean":return!1;case"bytes":return I(new ArrayBuffer(0));case"number":return 0;case"object":case"record":return{};default:return""}},"be"),ve=o(t=>{let e={};for(let r of t??[])r.optional||(e[r.name]=ye(r.kind));return JSON.stringify(e,void 0,2)},"xe"),Ne=q(X.runAs),h="\xABsensitive\xBB",we=o(t=>(t??[]).filter(e=>e.sensitive===!0).map(e=>e.name),"ve"),Ae=o((t,e)=>{if(e.length===0)return t;try{let r=JSON.parse(t);if(typeof r!="object"||r===null||Array.isArray(r))return"";let l={...r};for(let i of e)Object.hasOwn(l,i)&&(l[i]=h);return JSON.stringify(l,null,2)}catch{return""}},"Ne"),Se=4,ke=o(t=>{let e=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{return new TextDecoder("utf-8",{fatal:!0}).decode(e)}catch{return}},"Ae"),$e=o(t=>Array.isArray(t)?[]:Object.keys(t).filter(e=>e.length>0),"we"),Ie=o(t=>{let e=[],r=new Set,l=[t];for(;l.length>0;){let i=l.pop();if(typeof i=="string")i.length>0&&e.push(i);else if(typeof i=="number"||typeof i=="bigint")e.push(String(i));else if(i instanceof ArrayBuffer||ArrayBuffer.isView(i)){let u=ke(i);u!==void 0&&u.length>0&&e.push(u)}else typeof i=="object"&&i!==null&&!r.has(i)&&(r.add(i),e.push(...$e(i)),l.push(...Object.values(i)))}return e},"ke"),Oe=o((t,e)=>{let r=[],l=new Set,i=[[t,e]];for(;i.length>0;){let[u,s]=i.pop()??[void 0,void 0];typeof s=="boolean"?r.push({key:u,text:s?"true":"false"}):typeof s=="object"&&s!==null&&!l.has(s)&&(l.add(s),Array.isArray(s)?i.push(...s.map(p=>[void 0,p])):i.push(...Object.entries(s)))}return r},"Re"),ae=o(t=>t.replaceAll(/[$()*+.?[\\\]^{|}]/gu,String.raw`\$&`),"P"),je=o((t,e)=>e.length>=Se?t.replaceAll(e,h):t.replaceAll(new RegExp(`(?<![A-Za-z0-9])${ae(e)}(?![A-Za-z0-9])`,"gu"),h),"Oe"),Re=o((t,e)=>{let r=t.replaceAll(`"${e.text}"`,h);if(e.key===void 0)return r;let l=ae(e.key);return r.replaceAll(new RegExp(`(?<![A-Za-z0-9_])${l}=${e.text}(?![A-Za-z0-9_])`,"gu"),`${e.key}=${h}`).replaceAll(new RegExp(String.raw`"${l}":\s*${e.text}(?![A-Za-z0-9_])`,"gu"),`"${e.key}":${h}`)},"Ie"),Ce=o((t,e,r)=>{if(r.length===0||typeof e!="object"||e===null)return t;let l=r.flatMap(s=>Oe(s,e[s])),i=r.flatMap(s=>Ie(e[s])).flatMap(s=>{let p=JSON.stringify(s).slice(1,-1);return p===s?[s]:[s,p]}).toSorted((s,p)=>p.length-s.length),u=t;for(let s of l)u=Re(u,s);for(let s of i)u=je(u,s);return u},"$e"),Te=10,Fe=o(t=>t===void 0?"undefined":JSON.stringify(t,W,2),"Ce"),ze=o((t,e)=>[{argsText:Ae(e.argsText,e.sensitive),at:Date.now(),id:(t[0]?.id??0)+1,kind:e.selected.kind,path:e.selected.path,redacted:e.sensitive.length>0,shardKey:e.shardKey,status:e.runStatus},...t].slice(0,Te),"Ee"),Ge=o(({functions:t,runAsIdentity:e=!1}={})=>{let r=Y(),l=H(),[i,u]=(0,c.useState)(null),[s,p]=(0,c.useState)(null),S=t??i??[],[R,C]=(0,c.useState)(""),[y,k]=(0,c.useState)("{}"),[g,T]=(0,c.useState)(""),[b,se]=(0,c.useState)(""),[$,x]=(0,c.useState)("idle"),[ie,v]=(0,c.useState)(void 0),[F,N]=(0,c.useState)(null),[z,oe]=(0,c.useState)([]);(0,c.useEffect)(()=>{if(t!==void 0)return;let a=!1;return l.listFunctions().then(f=>(a||u(f),f)).catch(f=>{a||p(O(f))}),()=>{a=!0}},[l,t]);let B=R===""?S[0]?.path??"":R,d=S.find(a=>a.path===B),le=o(async()=>{if(!d)return;let a;try{a=y.trim()===""?{}:P(JSON.parse(y))}catch(m){x("error"),v(void 0),N(r("Invalid JSON args: {message}",{message:m.message}));return}let f={__lunoraRef:d.path},E=g.trim()===""?{}:{shardKey:g.trim()},K=e?b.trim():"",Z=we(d.args),D=o(m=>{oe(me=>ze(me,{argsText:y,runStatus:m,selected:d,sensitive:Z,shardKey:g}))},"M");x("running"),N(null);try{let m=K===""?await U(l,d.kind,f,a,E):await l.query(Ne,{args:a,functionPath:d.path,userId:K},E);te(g),v(m),x("success"),D("success")}catch(m){v(void 0),N(Ce(O(m),a,Z)),x("error"),D("error")}},"H"),de=o(a=>{if(C(a.path),T(a.shardKey),a.redacted){v(void 0),N(r("Re-enter the sensitive values before running this again.")),x("error");return}k(a.argsText)},"G"),ue=o(a=>{C(a.target.value)},"W"),ce=o(a=>{k(a.target.value)},"X"),fe=o(a=>{se(a.target.value)},"Y"),J=o(()=>{G(le())},"j"),L=e?b.trim():"",_=$==="running"||d===void 0,pe=o(()=>{k(ve(d?.args))},"_");return(0,n.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-runner",children:[s!==null&&(0,n.jsx)("p",{className:"text-sm text-destructive","data-testid":"function-discover-error",role:"alert",children:s}),(0,n.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsx)(A,{htmlFor:"function-select",children:r("Function")}),(0,n.jsx)("select",{"aria-label":r("Function"),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"function-select",id:"function-select",onChange:ue,value:B,children:S.map(a=>(0,n.jsxs)("option",{value:a.path,children:[a.path," (",a.kind,")"]},a.path))}),d!==void 0&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,n.jsx)("span",{className:"mr-1.5 font-medium",children:r("Signature")}),(0,n.jsx)("code",{className:"font-mono","data-testid":"function-signature",children:xe(d.args)})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)(A,{htmlFor:"args-input",children:r("Arguments")}),(0,n.jsx)(w,{"data-testid":"prefill-button",disabled:d===void 0,onClick:pe,size:"xs",type:"button",variant:"ghost",children:r("Prefill")})]}),(0,n.jsx)(ne,{"aria-label":r("Arguments"),className:"font-mono text-xs","data-testid":"args-input",id:"args-input",onChange:ce,value:y})]}),(0,n.jsx)(re,{onChange:T,testId:"shard-input",value:g}),e&&(0,n.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"run-as-field",children:[(0,n.jsx)(A,{htmlFor:"run-as-input",children:r("Run as identity (userId)")}),(0,n.jsx)(ee,{"aria-label":r("Run as identity (userId)"),className:"font-mono text-xs","data-testid":"run-as-input",id:"run-as-input",onChange:fe,placeholder:r("Leave empty to run as admin"),value:b}),(0,n.jsx)("p",{className:"text-[11px] text-muted-foreground",children:r("Dev only: runs the function as this user so you can test auth and RLS. Forged over the admin gate.")})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[L!==""&&d!==void 0&&d.kind!=="query"?(0,n.jsx)(Q,{confirmLabel:r("This will execute `{functionPath}` as user `{userId}`.",{functionPath:d.path,userId:L}),disabled:_,onConfirm:J,testId:"run-button",children:r("Run")}):(0,n.jsx)(w,{"data-testid":"run-button",disabled:_,onClick:J,type:"button",children:r("Run")}),d!==void 0&&(0,n.jsx)(j,{variant:"outline",children:d.kind}),e&&b.trim()!==""&&(0,n.jsx)(j,{"data-testid":"run-as-badge",variant:"secondary",children:r("as {userId}",{userId:b.trim()})})]})]}),$==="error"&&F!==null&&(0,n.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs text-destructive","data-testid":"error",role:"alert",children:F}),$==="success"&&(0,n.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"result",children:Fe(ie)}),z.length>0&&(0,n.jsx)("ul",{className:"flex flex-col overflow-hidden rounded-xl border border-border","data-testid":"fn-history",children:z.map((a,f)=>(0,n.jsxs)("li",{className:"flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-sm last:border-b-0","data-testid":"fn-history-row",children:[(0,n.jsx)("span",{className:a.status==="success"?"text-success":"text-destructive","data-testid":`fn-history-status-${f.toString()}`,children:a.status==="success"?"\u2713":"\u2717"})," ",(0,n.jsxs)("span",{className:"font-mono text-xs",children:[a.path," (",a.kind,")"]})," ",(0,n.jsx)("time",{className:"text-xs text-muted-foreground",children:V(a.at)})," ",(0,n.jsx)(w,{className:"ml-auto","data-testid":`fn-history-load-${f.toString()}`,onClick:o(()=>{de(a)},"onClick"),size:"xs",type:"button",variant:"ghost",children:r("Load")})]},a.id))})]})},"Ge");export{Ge as FunctionRunner};
@@ -1 +1 @@
1
- import{x as i}from"./chunk-PUK3H4RN.js";import{a as c}from"./chunk-GWNGVKLG.js";import{b as m}from"./chunk-6G3E4PJ2.js";import{a as s,d as n}from"./chunk-5PEAXTYQ.js";var d=n(c(),1);var p=n(m(),1);function b(r){let e=(0,d.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=i("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=(0,p.jsx)("label",{"data-slot":"label",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}s(b,"m");export{b as a};
1
+ import{x as i}from"./chunk-OYCDWIG2.js";import{a as c}from"./chunk-A6TVTNKO.js";import{b as m}from"./chunk-ADABTCDI.js";import{a as s,d as n}from"./chunk-5PEAXTYQ.js";var d=n(c(),1);var p=n(m(),1);function b(r){let e=(0,d.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=i("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=(0,p.jsx)("label",{"data-slot":"label",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}s(b,"m");export{b as a};
@@ -1 +1 @@
1
- import{b as f}from"./chunk-4PI2OSSP.js";import{B as p}from"./chunk-PUK3H4RN.js";import{a as g}from"./chunk-GWNGVKLG.js";import{b as h}from"./chunk-6G3E4PJ2.js";import{a as v,d}from"./chunk-5PEAXTYQ.js";var x=d(g(),1);var c=d(h(),1);var y=v(b=>{let e=(0,x.c)(14),{message:i,prefix:n}=b,r=p(),t=f(),l;e[0]!==t?(l=v(()=>{t?.openConsole({errorsOnly:!0})},"l"),e[0]=t,e[1]=l):l=e[1];let u=l;if(i===void 0)return null;let m=`${n}-live-error`,o;e[2]!==i||e[3]!==r?(o=r("Live unavailable: {liveError}",{liveError:i}),e[2]=i,e[3]=r,e[4]=o):o=e[4];let s;e[5]!==t||e[6]!==n||e[7]!==u||e[8]!==r?(s=t===void 0?null:(0,c.jsx)("button",{className:"underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":`${n}-live-error-console`,onClick:u,type:"button",children:r("Show in console")}),e[5]=t,e[6]=n,e[7]=u,e[8]=r,e[9]=s):s=e[9];let a;return e[10]!==m||e[11]!==o||e[12]!==s?(a=(0,c.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-destructive","data-testid":m,role:"status",children:[o,s]}),e[10]=m,e[11]=o,e[12]=s,e[13]=a):a=e[13],a},"E");export{y as a};
1
+ import{b as f}from"./chunk-EOFWXI3T.js";import{B as p}from"./chunk-OYCDWIG2.js";import{a as g}from"./chunk-A6TVTNKO.js";import{b as h}from"./chunk-ADABTCDI.js";import{a as v,d}from"./chunk-5PEAXTYQ.js";var x=d(g(),1);var c=d(h(),1);var y=v(b=>{let e=(0,x.c)(14),{message:i,prefix:n}=b,r=p(),t=f(),l;e[0]!==t?(l=v(()=>{t?.openConsole({errorsOnly:!0})},"l"),e[0]=t,e[1]=l):l=e[1];let u=l;if(i===void 0)return null;let m=`${n}-live-error`,o;e[2]!==i||e[3]!==r?(o=r("Live unavailable: {liveError}",{liveError:i}),e[2]=i,e[3]=r,e[4]=o):o=e[4];let s;e[5]!==t||e[6]!==n||e[7]!==u||e[8]!==r?(s=t===void 0?null:(0,c.jsx)("button",{className:"underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":`${n}-live-error-console`,onClick:u,type:"button",children:r("Show in console")}),e[5]=t,e[6]=n,e[7]=u,e[8]=r,e[9]=s):s=e[9];let a;return e[10]!==m||e[11]!==o||e[12]!==s?(a=(0,c.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-destructive","data-testid":m,role:"status",children:[o,s]}),e[10]=m,e[11]=o,e[12]=s,e[13]=a):a=e[13],a},"E");export{y as a};