@seriousgaming/sdk-tools 1.10.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/agent/guidance.md +35 -23
  2. package/dist/{cli-F2D4GGUA.js → cli-2BKEIIA3.js} +66 -0
  3. package/dist/{cli-NQSL2CIH.js → cli-2QGTDHRX.js} +21 -21
  4. package/dist/{cli-33MZSPPK.js → cli-2SDG3SZ7.js} +21 -21
  5. package/dist/{cli-CLO7HKEQ.js → cli-2VXP34R5.js} +5 -3
  6. package/dist/{cli-P3NUTOPK.js → cli-2W4B6PD5.js} +1 -1
  7. package/dist/{cli-SOO6SEIS.js → cli-2X7DKSXN.js} +28 -25
  8. package/dist/{cli-LNEZ6KDW.js → cli-2ZP4N7HK.js} +19 -19
  9. package/dist/{cli-5O7XENQY.js → cli-3GJYZH4C.js} +5 -5
  10. package/dist/{cli-NAZTYKZT.js → cli-3GO3M2MX.js} +30 -14
  11. package/dist/{cli-YZJBFKRI.js → cli-3LDLUNME.js} +17 -17
  12. package/dist/{cli-J42N4PJG.js → cli-3WY6L2WP.js} +31 -29
  13. package/dist/{cli-WG7MAOCS.js → cli-44MBABRD.js} +25 -25
  14. package/dist/{cli-MGZYQDCH.js → cli-4IO7MKLR.js} +20 -20
  15. package/dist/{cli-HNDFANQG.js → cli-4U2PY7W3.js} +1 -1
  16. package/dist/{cli-4JNF3O5N.js → cli-4WI4LTBI.js} +2 -2
  17. package/dist/{cli-OTBCA54D.js → cli-55EIGGZK.js} +1 -1
  18. package/dist/{cli-5TKPT3CY.js → cli-5AQV6FTL.js} +18 -18
  19. package/dist/{cli-KNXY43YV.js → cli-5CW7BEU7.js} +3 -3
  20. package/dist/{cli-5V4N4BR4.js → cli-5JUVHNZF.js} +12 -12
  21. package/dist/{cli-F3YJKP6D.js → cli-5KERL6HV.js} +9 -4
  22. package/dist/{cli-HN442ZVK.js → cli-5KSA24NQ.js} +24 -24
  23. package/dist/{cli-5VZBFMCK.js → cli-5PIFO3EN.js} +8 -0
  24. package/dist/{cli-IQBY7Z7Q.js → cli-5QN2Z43X.js} +20 -20
  25. package/dist/cli-5XSPAA5X.js +69 -0
  26. package/dist/{cli-QW7VXL2V.js → cli-62KAYGXO.js} +20 -20
  27. package/dist/{cli-TDLIPYKT.js → cli-6IMV5ZZU.js} +26 -26
  28. package/dist/{cli-UULZSQBV.js → cli-6KWCIAN2.js} +764 -66
  29. package/dist/{cli-2ANX6E3A.js → cli-6NWETIX5.js} +20 -20
  30. package/dist/{cli-EXUPHPDJ.js → cli-774W3MN5.js} +26 -26
  31. package/dist/cli-7BUD3VAD.js +16 -0
  32. package/dist/{cli-7NUFHMGE.js → cli-7KEP57S7.js} +12 -12
  33. package/dist/{cli-6CYAOUYT.js → cli-7OYFJMA6.js} +18 -18
  34. package/dist/{cli-ILHHJR2S.js → cli-7ZNEDQ3G.js} +20 -20
  35. package/dist/{cli-5RRPUL6V.js → cli-AFK6OUID.js} +12 -12
  36. package/dist/{cli-A3AJQZEN.js → cli-AIYQFWXN.js} +25 -25
  37. package/dist/{cli-B5DWKRZ4.js → cli-ARAAEWIQ.js} +2 -2
  38. package/dist/cli-AVQYV3N4.js +36 -0
  39. package/dist/{cli-35GV2F6R.js → cli-B54Z6CXH.js} +16 -16
  40. package/dist/{cli-467VRXGP.js → cli-B5TC4MEL.js} +5 -5
  41. package/dist/{cli-5Z4D3F6Y.js → cli-BCXGOLU3.js} +3 -3
  42. package/dist/{cli-G2GLW5Z4.js → cli-BHAODVTZ.js} +1 -1
  43. package/dist/{cli-XR3O2YTV.js → cli-BPS2JG74.js} +20 -20
  44. package/dist/{cli-W3RG2MRI.js → cli-BVO55SR2.js} +2 -2
  45. package/dist/{cli-PYAST3G5.js → cli-CFH3JZP5.js} +21 -21
  46. package/dist/{cli-VZVHS5AP.js → cli-CTK2OIK6.js} +20 -20
  47. package/dist/{cli-ATWJCB2G.js → cli-CW5MV4VX.js} +4 -4
  48. package/dist/{cli-TCQJL2GY.js → cli-D5VOSJZ7.js} +1 -1
  49. package/dist/{cli-KIZTASLL.js → cli-DAEPMK7A.js} +5 -5
  50. package/dist/{cli-44CM2AH2.js → cli-DAHR7PKB.js} +1 -1
  51. package/dist/{cli-XW3JLRSA.js → cli-DWDSBTYL.js} +1 -1
  52. package/dist/cli-DYSDPGXW.js +95 -0
  53. package/dist/{cli-GRSQRFRG.js → cli-DZCLRZXJ.js} +9 -2
  54. package/dist/{cli-RSF5R3HC.js → cli-EJ47IE45.js} +28 -25
  55. package/dist/{cli-QDBYFITU.js → cli-EK4OSJHA.js} +2 -2
  56. package/dist/{cli-GO64NABP.js → cli-FCJHNXDA.js} +1 -1
  57. package/dist/{cli-ZNQBF4Z3.js → cli-FNESSE3L.js} +1 -1
  58. package/dist/{cli-MUOLHQNL.js → cli-FTLH4WCE.js} +17 -17
  59. package/dist/{cli-JHLWBRXB.js → cli-FYV77YS2.js} +18 -18
  60. package/dist/cli-GMJX6Q4Q.js +36 -0
  61. package/dist/{cli-7JUNA74L.js → cli-GRBVNGDW.js} +1 -1
  62. package/dist/{cli-XKAIDYIE.js → cli-HAFCFY77.js} +33 -19
  63. package/dist/{cli-OXLOGXT3.js → cli-HCJLYI24.js} +3 -3
  64. package/dist/{cli-HHRP6FP6.js → cli-HCXS5EXU.js} +25 -25
  65. package/dist/cli-HEUNNHDH.js +36 -0
  66. package/dist/{cli-36GABN2A.js → cli-HNUTIWDZ.js} +19 -19
  67. package/dist/{cli-JXQLHJO2.js → cli-HXT25ETJ.js} +244 -243
  68. package/dist/{cli-5EH4WTH4.js → cli-IGEL7UJQ.js} +5 -5
  69. package/dist/{cli-JMNPMDXH.js → cli-IO32YA5N.js} +26 -26
  70. package/dist/cli-IPTGZDBB.js +36 -0
  71. package/dist/{cli-L54SXUK6.js → cli-J25TYFKB.js} +19 -19
  72. package/dist/{cli-CQ4ZR3ZQ.js → cli-J7XYMEMX.js} +20 -20
  73. package/dist/{cli-5DWR7RPQ.js → cli-JC5OJRID.js} +2 -2
  74. package/dist/{cli-25SJZI7N.js → cli-JD563OF4.js} +126 -27
  75. package/dist/{cli-JAVMRERQ.js → cli-JRJF2WHU.js} +20 -20
  76. package/dist/{cli-UQC46YSV.js → cli-JTFLIMIG.js} +3 -3
  77. package/dist/{cli-2AH6D32V.js → cli-K2BSJ2PK.js} +2 -2
  78. package/dist/{cli-XB5PI2XT.js → cli-K4QTYMN2.js} +25 -25
  79. package/dist/{cli-5SHG2M7E.js → cli-KFJDD4C4.js} +20 -20
  80. package/dist/{cli-WW54THXN.js → cli-KVQ2JPVD.js} +1 -1
  81. package/dist/{cli-O5WYATAI.js → cli-L6AHMW2Z.js} +4 -2
  82. package/dist/{cli-IKSLPAZN.js → cli-LCYUBCVY.js} +4 -4
  83. package/dist/{cli-HGCOEL5T.js → cli-LEWSCDH5.js} +4 -4
  84. package/dist/{cli-HNG6PZW2.js → cli-LI6G7GND.js} +27 -27
  85. package/dist/{cli-2AVPNSAX.js → cli-LU2GCWIU.js} +21 -21
  86. package/dist/{cli-UEQMK4WX.js → cli-M3Z2KOEB.js} +1 -1
  87. package/dist/{cli-226ZJ72R.js → cli-M6E3E3I2.js} +170 -3
  88. package/dist/{cli-OXU6TTEN.js → cli-MCRPA4Z6.js} +20 -20
  89. package/dist/{cli-BQ36DV5C.js → cli-MI2DEDMA.js} +3 -3
  90. package/dist/{cli-6O7YCK2M.js → cli-MITZ6SE7.js} +3 -3
  91. package/dist/{cli-VALLLE6Y.js → cli-MTIYD3BX.js} +26 -26
  92. package/dist/{cli-5M6KDNVX.js → cli-MTZUJGBK.js} +2 -2
  93. package/dist/{cli-GSOV26O5.js → cli-NCLMUXLC.js} +14 -14
  94. package/dist/{cli-Z3DITVBE.js → cli-NLS3DKWH.js} +26 -26
  95. package/dist/{cli-AH6AMAIB.js → cli-NMDGS7IE.js} +1 -1
  96. package/dist/cli-O3DJO2CS.js +30 -0
  97. package/dist/{cli-BC67QHD5.js → cli-O47D5BFN.js} +2 -2
  98. package/dist/{cli-MDVC5ZNM.js → cli-OBRZ36VP.js} +14 -14
  99. package/dist/{cli-267QJ2DS.js → cli-OMG4E53H.js} +20 -20
  100. package/dist/{cli-C32Q5E5I.js → cli-P6V3NSU4.js} +1 -1
  101. package/dist/{cli-PBSLPO6G.js → cli-PAMQMTHK.js} +21 -21
  102. package/dist/{cli-RUEPTOWG.js → cli-PKTHOCT3.js} +26 -26
  103. package/dist/{cli-PTXOKO2Y.js → cli-QK7QAP5H.js} +18 -18
  104. package/dist/cli-QQ432JEN.js +36 -0
  105. package/dist/{cli-YFLQ7XOO.js → cli-QVNDPTBU.js} +20 -20
  106. package/dist/{cli-KJA6GLZI.js → cli-R2DFD6ZZ.js} +15 -15
  107. package/dist/{cli-6BLVI2JM.js → cli-RMVJMOWU.js} +111 -7
  108. package/dist/{cli-M6AZFIMV.js → cli-RQISHMJF.js} +88 -23
  109. package/dist/{cli-X64BNBQH.js → cli-RVZH462G.js} +585 -8
  110. package/dist/{cli-LLJQI2QP.js → cli-SEEOQVUL.js} +12 -12
  111. package/dist/{cli-QTCTWYCM.js → cli-SO354HPI.js} +3 -3
  112. package/dist/{cli-URCHZDTS.js → cli-T76HDH7F.js} +90 -5
  113. package/dist/{cli-ZJW6HQ6N.js → cli-TIS7DWRR.js} +7 -7
  114. package/dist/{cli-WOFYI7HZ.js → cli-TY3B6XS7.js} +21 -21
  115. package/dist/{cli-4FJL3KQZ.js → cli-UKEZJFIT.js} +2 -2
  116. package/dist/cli-VQAMW4RF.js +95 -0
  117. package/dist/{cli-4A7RWFNO.js → cli-W4LMRVZT.js} +78 -47
  118. package/dist/cli-W7I5KGIB.js +84 -0
  119. package/dist/{cli-B3EFE7ZF.js → cli-WXGJFA4F.js} +1 -1
  120. package/dist/{cli-IPTHJT3J.js → cli-XCG33I77.js} +28 -25
  121. package/dist/{cli-WLSACMYA.js → cli-YHLSG5HB.js} +30 -28
  122. package/dist/cli-YNH5DTHY.js +36 -0
  123. package/dist/cli-YPMJWPDA.js +69 -0
  124. package/dist/{cli-PXQYY6KM.js → cli-YSXIR7EM.js} +0 -0
  125. package/dist/cli-ZPFWO4VW.js +85 -0
  126. package/dist/cli.js +53 -53
  127. package/dist/client/index.d.ts +1 -1
  128. package/dist/client/test-session.d.ts +44 -6
  129. package/dist/client.js +1934 -286
  130. package/dist/core/assessment-moves.d.ts +32 -0
  131. package/dist/core/assessment-reports.d.ts +38 -0
  132. package/dist/core/assessment-settings.d.ts +15 -0
  133. package/dist/core/benchmark-samples.d.ts +28 -0
  134. package/dist/core/session-host.d.ts +4 -0
  135. package/dist/core/session-roster.d.ts +6 -0
  136. package/dist/core/session-timers.d.ts +40 -0
  137. package/dist/core/session.d.ts +14 -1
  138. package/dist/core/tick-timer.d.ts +18 -0
  139. package/dist/dev/console/assets/{index-Ch6HHb2T.js → index-zd--5H1f.js} +26 -26
  140. package/dist/dev/console/index.html +1 -1
  141. package/dist/dev/shell.d.ts +8 -0
  142. package/dist/dev/view/commands.d.ts +3 -1
  143. package/dist/docs/api/index.md +4 -2
  144. package/dist/docs/api/sdk-commands.md +29 -0
  145. package/dist/docs/api/sdk-e2e.md +30 -0
  146. package/dist/docs/api/sdk-projection.md +5 -0
  147. package/dist/docs/api/sdk-tools-client.md +68 -6
  148. package/dist/docs/api/sdk-tools-vite.md +21 -0
  149. package/dist/docs/api/sdk-ui.md +7 -0
  150. package/dist/docs/api/sdk.md +834 -19
  151. package/dist/docs/changelog.md +67 -0
  152. package/dist/docs/cli-error-codes.md +5 -1
  153. package/dist/docs/cli-reference.md +76 -2
  154. package/dist/docs/concepts/index.md +2 -0
  155. package/dist/docs/concepts/terminology.md +12 -0
  156. package/dist/docs/guides/assessments.md +248 -0
  157. package/dist/docs/guides/benchmarks.md +241 -0
  158. package/dist/docs/guides/endpoints.md +1 -1
  159. package/dist/docs/guides/engine-testing.md +49 -14
  160. package/dist/docs/guides/engine.md +10 -2
  161. package/dist/docs/guides/index.md +2 -0
  162. package/dist/docs/guides/presentation.md +11 -9
  163. package/dist/docs/guides/session-hooks.md +24 -22
  164. package/dist/docs/guides/testing.md +3 -8
  165. package/dist/docs/guides/tick-controller.md +22 -1
  166. package/dist/docs/guides/ui.md +24 -0
  167. package/dist/docs/guides/upgrading.md +36 -0
  168. package/dist/docs/page-index.md +18 -13
  169. package/dist/docs/recipes/create-assessment.md +124 -0
  170. package/dist/docs/recipes/create-benchmark.md +115 -0
  171. package/dist/docs/recipes/create-game.md +1 -1
  172. package/dist/docs/recipes/fix-duplicate-packages.md +8 -19
  173. package/dist/docs/recipes/index.md +2 -0
  174. package/dist/execution/context-composition.d.ts +39 -4
  175. package/dist/execution/engine-state.d.ts +13 -0
  176. package/dist/execution/executor.d.ts +16 -0
  177. package/dist/execution/logic-result.d.ts +13 -2
  178. package/dist/help-examples.d.ts +12 -0
  179. package/dist/host/adapter.d.ts +24 -1
  180. package/dist/host/protocol.d.ts +115 -1
  181. package/dist/host.js +29 -1
  182. package/dist/oxlint/logic.json +184 -0
  183. package/dist/playwright.js +1928 -280
  184. package/dist/runtime/index.d.ts +3 -1
  185. package/dist/runtime/manifest-version.d.ts +1 -1
  186. package/dist/runtime.js +298 -16
  187. package/dist/schema.json +189 -0
  188. package/dist/templates/package/README.md.liquid +1 -0
  189. package/dist/templates/package/claude/rules/workflow-create-engine.md +1 -1
  190. package/dist/templates/package/claude/rules/workflow-create-user-interface.md +1 -1
  191. package/dist/templates/package/claude/rules/workflow-test-engine-or-ui.md +1 -1
  192. package/dist/templates/package/claude/rules/workflow-update-sdk-version.md +2 -2
  193. package/dist/templates/package/claude/settings.json.template +1 -0
  194. package/dist/templates/package/oxfmtrc.json.template +8 -1
  195. package/dist/templates/package/oxlintrc.json.template +1 -180
  196. package/dist/templates/package/package.json.liquid +1 -0
  197. package/dist/templates/package/vite.config.ts.liquid +2 -8
  198. package/dist/templates/package/vitest.config.ts.liquid +2 -8
  199. package/dist/templates/starter-game/package.json +2 -1
  200. package/dist/templates/starter-game/testing/engine/game.engine.test.ts +62 -37
  201. package/dist/templates/starter-game/vite.config.ts +2 -8
  202. package/dist/templates/starter-game/vitest.config.ts +4 -3
  203. package/dist/templating/resource-metadata.d.ts +1 -1
  204. package/dist/utils/error-codes.d.ts +9 -1
  205. package/dist/utils/resource-scan.d.ts +5 -0
  206. package/dist/validation/assessment-validation.d.ts +34 -0
  207. package/dist/validation/benchmark-validation.d.ts +20 -0
  208. package/dist/validation/schema-validation.d.ts +4 -0
  209. package/dist/vite/index.d.ts +30 -0
  210. package/dist/vite.js +12 -0
  211. package/package.json +12 -4
  212. package/dist/cli-27Z5T52R.js +0 -30
  213. package/dist/cli-5XE4OMFL.js +0 -36
  214. package/dist/cli-BB6CU4ZC.js +0 -36
  215. package/dist/cli-FGP6YYM7.js +0 -36
  216. package/dist/cli-I3ZAZYWP.js +0 -36
  217. package/dist/cli-RFAPPYXK.js +0 -36
  218. package/dist/cli-WZNIW6ZO.js +0 -16
  219. package/dist/cli-XEEOJGBL.js +0 -36
@@ -167,42 +167,42 @@ Error generating stack: `+e.message+`
167
167
  animation: ${Qu} 1.4s linear infinite;
168
168
  `,td=typeof $u==`string`?null:or`
169
169
  animation: ${$u} 1.4s ease-in-out infinite;
170
- `,nd=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return W({root:[`root`,n,`color${Y(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},Xu,t)},rd=K(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Y(n.color)}`]]}})(J(({theme:e})=>{let t=Xs(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...Zs(e,`transform`)}},{props:{variant:`indeterminate`},style:ed||{animation:`${Qu} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),id=K(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),ad=K(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(J(({theme:e})=>{let t=Xs(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...Zs(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:td||{animation:`${$u} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),od=K(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(J(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),sd=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:c,size:l=40,style:u,thickness:d=3.6,value:f=n.min??0,variant:p=`indeterminate`,...m}=n,h=s??0,g=c??100,_={...n,color:i,disableShrink:a,size:l,thickness:d,value:f,variant:p,enableTrackSlot:o},v=nd(_),y={},b={},x={};if(p===`determinate`){let e=2*Math.PI*((Zu-d)/2),t=g-h;y.strokeDasharray=e.toFixed(3),y.strokeDashoffset=t>0?`${((g-f)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,b.transform=`rotate(-90deg)`,x[`aria-valuenow`]=f,x[`aria-valuemin`]=h,x[`aria-valuemax`]=g}return(0,V.jsx)(rd,{className:H(v.root,r),style:{width:l,height:l,...b,...u},ownerState:_,ref:t,role:`progressbar`,...x,...m,children:(0,V.jsxs)(id,{className:v.svg,ownerState:_,viewBox:`${Zu/2} ${Zu/2} ${Zu} ${Zu}`,children:[o?(0,V.jsx)(od,{className:v.track,ownerState:_,cx:Zu,cy:Zu,r:(Zu-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,V.jsx)(ad,{className:v.circle,style:y,ownerState:_,cx:Zu,cy:Zu,r:(Zu-d)/2,fill:`none`,strokeWidth:d})]})})});function cd(e){return zr(`MuiIconButton`,e)}var ld=U(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),ud=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return W({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${Y(r)}`,i&&`edge${Y(i)}`,`size${Y(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},cd,t)},dd=K(Uu,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Y(n.color)}`],n.edge&&t[`edge${Y(n.edge)}`],t[`size${Y(n.size)}`]]}})(J(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,...Zs(e,`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),J(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${ld.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${ld.loading}`]:{color:`transparent`}}))),fd=K(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),pd=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=Ml(u),h=f??(0,V.jsx)(sd,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=ud(g);return(0,V.jsxs)(dd,{id:d?m:u,className:H(_.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,V.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,V.jsx)(fd,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),md=Dl((0,V.jsx)(`path`,{d:`M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z`}),`SuccessOutlined`),hd=Dl((0,V.jsx)(`path`,{d:`M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z`}),`ReportProblemOutlined`),gd=Dl((0,V.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`ErrorOutline`),_d=Dl((0,V.jsx)(`path`,{d:`M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z`}),`InfoOutlined`),vd=Dl((0,V.jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),yd=e=>{let{variant:t,color:n,severity:r,classes:i}=e;return W({root:[`root`,`color${Y(n||r)}`,`${t}`],icon:[`icon`],message:[`message`],action:[`action`]},Ju,i)},bd=K(fu,{name:`MuiAlert`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant]]}})(J(({theme:e})=>{let t=e.palette.mode===`light`?e.darken:e.lighten,n=e.palette.mode===`light`?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:`transparent`,display:`flex`,padding:`6px 16px`,variants:[...Object.entries(e.palette).filter(qu([`light`])).map(([r])=>({props:{colorSeverity:r,variant:`standard`},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Yu.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(qu([`light`])).map(([n])=>({props:{colorSeverity:n,variant:`outlined`},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${Yu.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(qu([`dark`])).map(([t])=>({props:{colorSeverity:t,variant:`filled`},style:{...e.focusVisible&&Za(`0 0 0 4px ${(e.vars||e).palette.background.default}`),fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:e.palette.mode===`dark`?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),xd=K(`div`,{name:`MuiAlert`,slot:`Icon`})({marginRight:12,padding:`7px 0`,display:`flex`,fontSize:22,opacity:.9}),Sd=K(`div`,{name:`MuiAlert`,slot:`Message`})({padding:`8px 0`,minWidth:0,overflow:`auto`}),Cd=K(`div`,{name:`MuiAlert`,slot:`Action`})({display:`flex`,alignItems:`flex-start`,padding:`4px 0 0 16px`,marginLeft:`auto`,marginRight:-8}),wd={success:(0,V.jsx)(md,{fontSize:`inherit`}),warning:(0,V.jsx)(hd,{fontSize:`inherit`}),error:(0,V.jsx)(gd,{fontSize:`inherit`}),info:(0,V.jsx)(_d,{fontSize:`inherit`})},Td=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiAlert`}),{action:r,children:i,className:a,closeText:o=`Close`,color:s,icon:c,iconMapping:l=wd,onClose:u,role:d=`alert`,severity:f=`success`,slotProps:p={},slots:m={},variant:h=`standard`,...g}=n,_={...n,color:s,severity:f,variant:h,colorSeverity:s||f},v=yd(_),y={slots:m,slotProps:p},[b,x]=X(`root`,{ref:t,shouldForwardComponentProp:!0,className:H(v.root,a),elementType:bd,externalForwardedProps:{...y,...g},ownerState:_,additionalProps:{role:d,elevation:0}}),[S,C]=X(`icon`,{className:v.icon,elementType:xd,externalForwardedProps:y,ownerState:_}),[w,T]=X(`message`,{className:v.message,elementType:Sd,externalForwardedProps:y,ownerState:_}),[E,D]=X(`action`,{className:v.action,elementType:Cd,externalForwardedProps:y,ownerState:_}),[O,k]=X(`closeButton`,{elementType:pd,externalForwardedProps:y,ownerState:_}),[A,j]=X(`closeIcon`,{elementType:vd,externalForwardedProps:y,ownerState:_});return(0,V.jsxs)(b,{...x,children:[c===!1?null:(0,V.jsx)(S,{...C,children:c||l[f]||wd[f]}),(0,V.jsx)(w,{...T,children:i}),r==null?null:(0,V.jsx)(E,{...D,children:r}),r==null&&u?(0,V.jsx)(E,{...D,children:(0,V.jsx)(O,{size:`small`,"aria-label":o,title:o,color:`inherit`,onClick:u,...k,children:(0,V.jsx)(A,{fontSize:`small`,...j})})}):null]})});function Ed(e){return zr(`MuiTypography`,e)}var Dd=U(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]),Od=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return W({root:[`root`,i,e.align!==`inherit`&&`align${Y(t)}`,n&&`gutterBottom`,r&&`noWrap`]},Ed,a)},kd=K(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${Y(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(J(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${Y(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}}]}))),Ad={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},Z=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:a,component:o,gutterBottom:s=!1,noWrap:c=!1,variant:l=`body1`,variantMapping:u=Ad,...d}=n,f={...n,align:i,color:r,className:a,component:o,gutterBottom:s,noWrap:c,variant:l,variantMapping:u},p=o||u[l]||Ad[l]||`span`,m=Od(f);return(0,V.jsx)(kd,{as:p,ref:t,className:H(m.root,a),...d,ownerState:f,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...d.style}})});function jd(e){return zr(`MuiAppBar`,e)}U(`MuiAppBar`,[`root`,`positionFixed`,`positionAbsolute`,`positionSticky`,`positionStatic`,`positionRelative`,`colorDefault`,`colorPrimary`,`colorSecondary`,`colorInherit`,`colorTransparent`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`]);var Md=e=>{let{color:t,position:n,classes:r}=e;return W({root:[`root`,`color${Y(t)}`,`position${Y(n)}`]},jd,r)},Nd=(e,t)=>e?`${e.replace(`)`,``)}, ${t})`:t,Pd=K(fu,{name:`MuiAppBar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${Y(n.position)}`],t[`color${Y(n.color)}`]]}})(J(({theme:e})=>({display:`flex`,flexDirection:`column`,width:`100%`,boxSizing:`border-box`,flexShrink:0,variants:[{props:{position:`fixed`},style:{position:`fixed`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0,"@media print":{position:`absolute`}}},{props:{position:`absolute`},style:{position:`absolute`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`sticky`},style:{position:`sticky`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`static`},style:{position:`static`}},{props:{position:`relative`},style:{position:`relative`}},{props:{color:`inherit`},style:{"--AppBar-color":`inherit`,color:`var(--AppBar-color)`}},{props:{color:`default`},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles(`dark`,{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(qu([`contrastText`])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText,...e.focusVisible&&Za(`0 0 0 4px ${(e.vars||e).palette.background.default}`)}})),{props:e=>e.enableColorOnDark===!0&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`}},{props:e=>e.enableColorOnDark===!1&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundColor:e.vars?Nd(e.vars.palette.AppBar.darkBg,`var(--AppBar-background)`):null,color:e.vars?Nd(e.vars.palette.AppBar.darkColor,`var(--AppBar-color)`):null})}},{props:{color:`transparent`},style:{"--AppBar-background":`transparent`,"--AppBar-color":`inherit`,backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundImage:`none`})}}]}))),Fd=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiAppBar`}),{className:r,color:i=`primary`,enableColorOnDark:a=!1,position:o=`fixed`,...s}=n,c={...n,color:i,position:o,enableColorOnDark:a},l=Md(c);return(0,V.jsx)(Pd,{square:!0,component:`header`,ownerState:c,elevation:4,className:H(l.root,r,o===`fixed`&&`mui-fixed`),ref:t,...s})});function Id(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var Ld=`bottom`,Rd=`right`,zd=`left`,Bd=`auto`,Vd=[`top`,Ld,Rd,zd],Hd=`start`,Ud=`clippingParents`,Wd=`viewport`,Gd=`popper`,Kd=`reference`,qd=Vd.reduce(function(e,t){return e.concat([t+`-`+Hd,t+`-end`])},[]),Jd=[].concat(Vd,[Bd]).reduce(function(e,t){return e.concat([t,t+`-`+Hd,t+`-end`])},[]),Yd=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Xd(e){return e?(e.nodeName||``).toLowerCase():null}function Zd(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qd(e){return e instanceof Zd(e).Element||e instanceof Element}function $d(e){return e instanceof Zd(e).HTMLElement||e instanceof HTMLElement}function ef(e){return typeof ShadowRoot>`u`?!1:e instanceof Zd(e).ShadowRoot||e instanceof ShadowRoot}function tf(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];$d(i)&&Xd(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function nf(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});$d(r)&&Xd(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var rf={name:`applyStyles`,enabled:!0,phase:`write`,fn:tf,effect:nf,requires:[`computeStyles`]};function af(e){return e.split(`-`)[0]}var of=Math.max,sf=Math.min,cf=Math.round;function lf(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function uf(){return!/^((?!chrome|android).)*safari/i.test(lf())}function df(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&$d(e)&&(i=e.offsetWidth>0&&cf(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&cf(r.height)/e.offsetHeight||1);var o=(Qd(e)?Zd(e):window).visualViewport,s=!uf()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function ff(e){var t=df(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function pf(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ef(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mf(e){return Zd(e).getComputedStyle(e)}function hf(e){return[`table`,`td`,`th`].indexOf(Xd(e))>=0}function gf(e){return((Qd(e)?e.ownerDocument:e.document)||window.document).documentElement}function _f(e){return Xd(e)===`html`?e:e.assignedSlot||e.parentNode||(ef(e)?e.host:null)||gf(e)}function vf(e){return!$d(e)||mf(e).position===`fixed`?null:e.offsetParent}function yf(e){var t=/firefox/i.test(lf());if(/Trident/i.test(lf())&&$d(e)&&mf(e).position===`fixed`)return null;var n=_f(e);for(ef(n)&&(n=n.host);$d(n)&&[`html`,`body`].indexOf(Xd(n))<0;){var r=mf(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function bf(e){for(var t=Zd(e),n=vf(e);n&&hf(n)&&mf(n).position===`static`;)n=vf(n);return n&&(Xd(n)===`html`||Xd(n)===`body`&&mf(n).position===`static`)?t:n||yf(e)||t}function xf(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function Sf(e,t,n){return of(e,sf(t,n))}function Cf(e,t,n){var r=Sf(e,t,n);return r>n?n:r}function wf(){return{top:0,right:0,bottom:0,left:0}}function Tf(e){return Object.assign({},wf(),e)}function Ef(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Df=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,Tf(typeof e==`number`?Ef(e,Vd):e)};function Of(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=af(n.placement),c=xf(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(a&&o){var u=Df(i.padding,n),d=ff(a),f=c===`y`?`top`:zd,p=c===`y`?Ld:Rd,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=bf(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=Sf(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function kf(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||pf(t.elements.popper,r)&&(t.elements.arrow=r))}var Af={name:`arrow`,enabled:!0,phase:`main`,fn:Of,effect:kf,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function jf(e){return e.split(`-`)[1]}var Mf={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function Nf(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:cf(n*i)/i||0,y:cf(r*i)/i||0}}function Pf(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=zd,b=`top`,x=window;if(l){var S=bf(n),C=`clientHeight`,w=`clientWidth`;if(S===Zd(n)&&(S=gf(n),mf(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=Ld;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=Rd;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&Mf),O=u===!0?Nf({x:p,y:h},Zd(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function Ff(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:af(t.placement),variation:jf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Pf(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Pf(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var If={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:Ff,data:{}},Lf={passive:!0};function Rf(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=Zd(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,Lf)}),s&&c.addEventListener(`resize`,n.update,Lf),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,Lf)}),s&&c.removeEventListener(`resize`,n.update,Lf)}}var zf={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:Rf,data:{}},Bf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Vf(e){return e.replace(/left|right|bottom|top/g,function(e){return Bf[e]})}var Hf={start:`end`,end:`start`};function Uf(e){return e.replace(/start|end/g,function(e){return Hf[e]})}function Wf(e){var t=Zd(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Gf(e){return df(gf(e)).left+Wf(e).scrollLeft}function Kf(e,t){var n=Zd(e),r=gf(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=uf();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Gf(e),y:c}}function qf(e){var t=gf(e),n=Wf(e),r=e.ownerDocument?.body,i=of(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=of(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+Gf(e),s=-n.scrollTop;return mf(r||t).direction===`rtl`&&(o+=of(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function Jf(e){var t=mf(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Yf(e){return[`html`,`body`,`#document`].indexOf(Xd(e))>=0?e.ownerDocument.body:$d(e)&&Jf(e)?e:Yf(_f(e))}function Xf(e,t){t===void 0&&(t=[]);var n=Yf(e),r=n===e.ownerDocument?.body,i=Zd(n),a=r?[i].concat(i.visualViewport||[],Jf(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Xf(_f(a)))}function Zf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Qf(e,t){var n=df(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function $f(e,t,n){return t===`viewport`?Zf(Kf(e,n)):Qd(t)?Qf(t,n):Zf(qf(gf(e)))}function ep(e){var t=Xf(_f(e)),n=[`absolute`,`fixed`].indexOf(mf(e).position)>=0&&$d(e)?bf(e):e;return Qd(n)?t.filter(function(e){return Qd(e)&&pf(e,n)&&Xd(e)!==`body`}):[]}function tp(e,t,n,r){var i=t===`clippingParents`?ep(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=$f(e,n,r);return t.top=of(i.top,t.top),t.right=sf(i.right,t.right),t.bottom=sf(i.bottom,t.bottom),t.left=of(i.left,t.left),t},$f(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function np(e){var t=e.reference,n=e.element,r=e.placement,i=r?af(r):null,a=r?jf(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case Ld:c={x:o,y:t.y+t.height};break;case Rd:c={x:t.x+t.width,y:s};break;case zd:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?xf(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case Hd:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2)}}return c}function rp(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?Ud:s,l=n.rootBoundary,u=l===void 0?Wd:l,d=n.elementContext,f=d===void 0?Gd:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=Tf(typeof g==`number`?Ef(g,Vd):g),v=f===`popper`?Kd:Gd,y=e.rects.popper,b=e.elements[m?v:f],x=tp(Qd(b)?b:b.contextElement||gf(e.elements.popper),c,u,o),S=df(e.elements.reference),C=np({reference:S,element:y,strategy:`absolute`,placement:i}),w=Zf(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function ip(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Jd:c,u=jf(r),d=u?s?qd:qd.filter(function(e){return jf(e)===u}):Vd,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=rp(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[af(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function ap(e){if(af(e)===`auto`)return[];var t=Vf(e);return[Uf(e),t,Uf(t)]}function op(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=af(g)===g,v=c||(_||!m?[Vf(g)]:ap(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(af(n)===`auto`?ip(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=af(E),O=jf(E)===Hd,k=[`top`,Ld].indexOf(D)>=0,A=k?`width`:`height`,j=rp(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?Rd:zd:O?Ld:`top`;b[A]>x[A]&&(M=Vf(M));var N=Vf(M),P=[];if(a&&P.push(j[D]<=0),s&&P.push(j[M]<=0,j[N]<=0),P.every(function(e){return e})){w=E,C=!1;break}S.set(E,P)}if(C)for(var F=m?3:1,ee=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},te=F;te>0&&ee(te)!==`break`;te--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var sp={name:`flip`,enabled:!0,phase:`main`,fn:op,requiresIfExists:[`offset`],data:{_skip:!1}};function cp(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function lp(e){return[`top`,Rd,Ld,zd].some(function(t){return e[t]>=0})}function up(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=rp(t,{elementContext:`reference`}),s=rp(t,{altBoundary:!0}),c=cp(o,r),l=cp(s,i,a),u=lp(c),d=lp(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var dp={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:up};function fp(e,t,n){var r=af(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function pp(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Jd.reduce(function(e,n){return e[n]=fp(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var mp={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:pp};function hp(e){var t=e.state,n=e.name;t.modifiersData[n]=np({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var gp={name:`popperOffsets`,enabled:!0,phase:`read`,fn:hp,data:{}};function _p(e){return e===`x`?`y`:`x`}function vp(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=rp(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=af(t.placement),v=jf(t.placement),y=!v,b=xf(_),x=_p(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:zd,A=b===`y`?Ld:Rd,j=b===`y`?`height`:`width`,M=S[b],N=M+g[k],P=M-g[A],F=p?-w[j]/2:0,ee=v===`start`?C[j]:w[j],te=v===`start`?-w[j]:-C[j],I=t.elements.arrow,ne=p&&I?ff(I):{width:0,height:0},re=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:wf(),ie=re[k],ae=re[A],oe=Sf(0,C[j],ne[j]),se=y?C[j]/2-F-oe-ie-E.mainAxis:ee-oe-ie-E.mainAxis,ce=y?-C[j]/2+F+oe+ae+E.mainAxis:te+oe+ae+E.mainAxis,le=t.elements.arrow&&bf(t.elements.arrow),ue=le?b===`y`?le.clientTop||0:le.clientLeft||0:0,de=D?.[b]??0,L=M+se-de-ue,R=M+ce-de,fe=Sf(p?sf(N,L):N,M,p?of(P,R):P);S[b]=fe,O[b]=fe-M}if(s){var pe=b===`x`?`top`:zd,me=b===`x`?Ld:Rd,he=S[x],z=x===`y`?`height`:`width`,ge=he+g[pe],_e=he-g[me],ve=[`top`,zd].indexOf(_)!==-1,ye=D?.[x]??0,be=ve?ge:he-C[z]-w[z]-ye+E.altAxis,xe=ve?he+C[z]+w[z]-ye-E.altAxis:_e,Se=p&&ve?Cf(be,he,xe):Sf(p?be:ge,he,p?xe:_e);S[x]=Se,O[x]=Se-he}t.modifiersData[r]=O}}var yp={name:`preventOverflow`,enabled:!0,phase:`main`,fn:vp,requiresIfExists:[`offset`]};function bp(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function xp(e){return e===Zd(e)||!$d(e)?Wf(e):bp(e)}function Sp(e){var t=e.getBoundingClientRect(),n=cf(t.width)/e.offsetWidth||1,r=cf(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Cp(e,t,n){n===void 0&&(n=!1);var r=$d(t),i=$d(t)&&Sp(t),a=gf(t),o=df(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Xd(t)!==`body`||Jf(a))&&(s=xp(t)),$d(t)?(c=df(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Gf(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function wp(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function Tp(e){var t=wp(e);return Yd.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function Ep(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function Dp(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var Op={placement:`bottom`,modifiers:[],strategy:`absolute`};function kp(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function Ap(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Op:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},Op,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:Qd(e)?Xf(e):e.contextElement?Xf(e.contextElement):[],popper:Xf(t)};var s=Tp(Dp([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(kp(t,n)){i.rects={reference:Cp(t,bf(n),i.options.strategy===`fixed`),popper:ff(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(i.reset===!0)i.reset=!1,r=-1;else{var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:Ep(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!kp(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var jp=Ap({defaultModifiers:[zf,gp,If,rf,mp,sp,yp,Af,dp]});function Mp(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:au(n,r),{props:s,internalRef:c}=cu({...a,externalSlotProps:o}),l=ms(c,o?.ref,e.additionalProps?.ref);return iu(t,{...s,ref:l},r)}function Np(e){return e?.props?.ref||null}var Pp=l(Pc(),1);function Fp(e){return typeof e==`function`?e():e}var Ip=E.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=E.useState(null),s=ms(E.isValidElement(n)?Np(n):null,t);if(ti(()=>{i||o(Fp(r)||document.body)},[r,i]),ti(()=>{if(a&&!i)return jl(t,a),()=>{jl(t,null)}},[t,a,i]),i){if(E.isValidElement(n)){let e={ref:s};return E.cloneElement(n,e)}return n}return a&&Pp.createPortal(n,a)});function Lp(e){return zr(`MuiPopper`,e)}U(`MuiPopper`,[`root`]);function Rp(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function zp(e){return typeof e==`function`?e():e}function Bp(e){return e.nodeType!==void 0}var Vp=e=>{let{classes:t}=e;return W({root:[`root`]},Lp,t)},Hp={},Up=E.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=E.useRef(null),_=ms(g,t),v=E.useRef(null),y=ms(v,u),b=E.useRef(y);ti(()=>{b.current=y},[y]),E.useImperativeHandle(u,()=>v.current,[]);let x=Rp(c,i),[S,C]=E.useState(x),w=E.useMemo(()=>zp(n),[n]);E.useEffect(()=>{v.current&&v.current.forceUpdate()}),ti(()=>{if(!w||!s)return;let e=e=>{C(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=jp(w,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[w,a,o,s,l,x]);let T={placement:S};p!==null&&(T.TransitionProps=p);let D=Vp(e),O=f.root??`div`,k=Mp({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root});return(0,V.jsx)(O,{...k,children:typeof r==`function`?r(T):r})}),Wp=K(E.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=Hp,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=E.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=zp(n);S=e&&Bp(e)?gs(e).body:gs(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,V.jsx)(Ip,{disablePortal:o,container:S,children:(0,V.jsx)(Up,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),Gp=E.forwardRef(function(e,t){let n=ji(),{anchorEl:r,component:i,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,slots:m,slotProps:h,...g}=q({props:e,name:`MuiPopper`}),_={anchorEl:r,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,...g};return(0,V.jsx)(Wp,{as:i,direction:n?`rtl`:`ltr`,slots:m,slotProps:h,..._,ref:t})}),Kp=Dl((0,V.jsx)(`path`,{d:`M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z`}),`Cancel`);function qp(e){return zr(`MuiChip`,e)}var Jp=U(`MuiChip`,[`root`,`sizeSmall`,`sizeMedium`,`colorDefault`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`disabled`,`clickable`,`deletable`,`outlined`,`filled`,`avatar`,`icon`,`label`,`deleteIcon`,`focusVisible`]),Yp=e=>{let{classes:t,disabled:n,size:r,color:i,onDelete:a,clickable:o,variant:s}=e;return W({root:[`root`,s,n&&`disabled`,`size${Y(r)}`,`color${Y(i)}`,o&&`clickable`,a&&`deletable`],label:[`label`],avatar:[`avatar`],icon:[`icon`],deleteIcon:[`deleteIcon`]},qp,t)},Xp=K(`div`,{name:`MuiChip`,slot:`Root`,shouldForwardProp:e=>ns(e)&&e!==`focusableWhenDisabled`&&e!==`skipFocusWhenDisabled`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,clickable:i,onDelete:a,size:o,variant:s}=n;return[{[`& .${Jp.avatar}`]:t.avatar},{[`& .${Jp.icon}`]:t.icon},{[`& .${Jp.deleteIcon}`]:t.deleteIcon},t.root,t[`size${Y(o)}`],t[`color${Y(r)}`],i&&t.clickable,a&&t.deletable,t[s]]}})(J(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:`100%`,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:`inline-flex`,alignItems:`center`,justifyContent:`center`,height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:`nowrap`,...Zs(e,[`background-color`,`box-shadow`]),cursor:`unset`,outline:0,textDecoration:`none`,border:0,padding:0,verticalAlign:`middle`,boxSizing:`border-box`,[`&.${Jp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`& .${Jp.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Jp.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Jp.deleteIcon}`]:{WebkitTapHighlightColor:`transparent`,color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:`pointer`,margin:`0 5px 0 -6px`,"&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{color:`primary`},style:{[`& .${Jp.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:`secondary`},style:{[`& .${Jp.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:`small`},style:{height:24,[`& .${Jp.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Jp.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Jp.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(qu([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${Jp.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${Jp.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&e.color!=="default",style:{[`& .${Jp.icon}`]:{color:`inherit`}}},{props:{onDelete:!0},style:!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(qu([`dark`])).map(([t])=>({props:{color:t,onDelete:!0},style:!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:`none`,WebkitTapHighlightColor:`transparent`,cursor:`pointer`,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},...!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(qu([`dark`])).map(([t])=>({props:{color:t,clickable:!0},style:{"&:hover":{backgroundColor:(e.vars||e).palette[t].dark},...!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}}})),{props:{variant:`outlined`},style:{backgroundColor:`transparent`,border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Jp.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},...!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`& .${Jp.avatar}`]:{marginLeft:4},[`& .${Jp.icon}`]:{marginLeft:4},[`& .${Jp.deleteIcon}`]:{marginRight:5}}},{props:{size:`small`,variant:`outlined`},style:{[`& .${Jp.avatar}`]:{marginLeft:2},[`& .${Jp.icon}`]:{marginLeft:2},[`& .${Jp.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{variant:`outlined`,color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${Jp.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},...!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)}},[`& .${Jp.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),Zp=K(`span`,{name:`MuiChip`,slot:`Label`})({overflow:`hidden`,textOverflow:`ellipsis`,paddingLeft:12,paddingRight:12,whiteSpace:`nowrap`,variants:[{props:{variant:`outlined`},style:{paddingLeft:11,paddingRight:11}},{props:{size:`small`},style:{paddingLeft:8,paddingRight:8}},{props:{size:`small`,variant:`outlined`},style:{paddingLeft:7,paddingRight:7}}]});function Qp(e){return e.key===`Backspace`||e.key===`Delete`}var $p=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiChip`}),{avatar:r,className:i,clickable:a,color:o=`default`,component:s,deleteIcon:c,disabled:l=!1,icon:u,label:d,onClick:f,onDelete:p,onKeyDown:m,onKeyUp:h,size:g=`medium`,variant:_=`filled`,tabIndex:v,skipFocusWhenDisabled:y=!1,slots:b={},slotProps:x={},...S}=n,{nativeButton:C,...w}=S,T=Ts(E.useRef(null),t),D=e=>{e.stopPropagation(),p(e)},O=e=>{e.currentTarget===e.target&&Qp(e)&&e.preventDefault(),m&&m(e)},k=e=>{e.currentTarget===e.target&&p&&Qp(e)&&p(e),h&&h(e)},A=a!==!1&&f?!0:a,j=A||p?Uu:s||`div`,M={...n,component:j,disabled:l,size:g,color:o,iconColor:E.isValidElement(u)&&u.props.color||o,onDelete:!!p,clickable:A,variant:_},N=Yp(M),P=j===Uu?{component:s||`div`,internalNativeButton:!1,focusVisibleClassName:N.focusVisible,...p&&{disableRipple:!0},...C!==void 0&&{nativeButton:C}}:{},F=null;p&&(F=c&&E.isValidElement(c)?E.cloneElement(c,{className:H(c.props.className,N.deleteIcon),onClick:D}):(0,V.jsx)(Kp,{className:N.deleteIcon,onClick:D}));let ee=null;r&&E.isValidElement(r)&&(ee=E.cloneElement(r,{className:H(N.avatar,r.props.className)}));let te=null;u&&E.isValidElement(u)&&(te=E.cloneElement(u,{className:H(N.icon,u.props.className)}));let I={slots:b,slotProps:x},[ne,re]=X(`root`,{elementType:Xp,externalForwardedProps:{...I,...w},ownerState:M,shouldForwardComponentProp:!0,ref:T,className:H(N.root,i),additionalProps:{disabled:A&&l?!0:void 0,tabIndex:y&&l?-1:v,...P},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),O(t)},onKeyUp:t=>{e.onKeyUp?.(t),k(t)}})}),[ie,ae]=X(`label`,{elementType:Zp,externalForwardedProps:I,ownerState:M,className:N.label});return(0,V.jsxs)(ne,{as:j,...re,children:[ee||te,(0,V.jsx)(ie,{...ae,children:d}),F]})}),em=Dl((0,V.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),tm={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},nm={opacity:0,visibility:`hidden`},rm=E.forwardRef(function(e,t){let n=$o(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,disablePrefersReducedMotion:s=!1,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:_=r,...v}=e,y=ru(n.motion.reducedMotion,s),b=E.useRef(null),x=Ts(b,Np(o),t),S=qs(b,f),C=qs(b,(e,t)=>{y.shouldReduceMotion||Ls(e);let r=Ys({style:g,timeout:_,easing:c},{mode:`enter`}),i=y.getTransitionTiming({duration:r.duration,delay:r.delay});e.style.transition=n.transitions.create(`opacity`,{duration:i.duration,easing:r.easing,delay:i.delay}),u&&u(e,t)}),w=qs(b,d),T=qs(b,h),D=qs(b,e=>{let t=Ys({style:g,timeout:_,easing:c},{mode:`exit`}),r=y.getTransitionTiming({duration:t.duration,delay:t.delay});e.style.transition=n.transitions.create(`opacity`,{duration:r.duration,easing:t.easing,delay:r.delay}),p&&p(e)}),O=qs(b,e=>{e.style.transition=``,m&&m(e)});return(0,V.jsx)(Gl,{appear:a,in:l,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:D,onExited:O,onExiting:T,addEndListener:i?e=>{i(b.current,e)}:void 0,reduceMotion:y.shouldReduceMotion,timeout:_,...v,children:(e,{ownerState:t,...n})=>{let r=Js(e,l,tm,nm,g,o.props.style);return E.cloneElement(o,{style:r,ref:x,...n})}})});function im(e){return zr(`MuiBackdrop`,e)}U(`MuiBackdrop`,[`root`,`invisible`]);var am=e=>{let{classes:t,invisible:n}=e;return W({root:[`root`,n&&`invisible`]},im,t)},om=K(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),sm=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,slotProps:c={},slots:l={},transitionDuration:u,...d}=n,f={...n,component:a,invisible:o},p=am(f),m={component:a,slots:l,slotProps:c},[h,g]=X(`root`,{elementType:om,externalForwardedProps:m,className:H(p.root,i),ownerState:f}),[_,v]=X(`transition`,{elementType:rm,externalForwardedProps:m,ownerState:f});return(0,V.jsx)(_,{in:s,timeout:u,...d,...v,children:(0,V.jsx)(h,{...g,ref:t,children:r})})}),cm=U(`MuiBox`,[`root`]),lm=Lr({themeId:Qo,defaultTheme:Xo(),defaultClassName:cm.root,generateClassName:Fr.generate});function um(e){return zr(`MuiButton`,e)}var dm=U(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),fm=E.createContext({}),pm=E.createContext(void 0),mm=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=W({root:[`root`,o&&`loading`,a,`size${Y(i)}`,`color${Y(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${Y(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},um,c);return{...c,...l}},hm=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],gm=K(Uu,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Y(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(J(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,...Zs(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${dm.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${dm.focusVisible}`]:{...e.focusVisible,boxShadow:e.focusVisible?.boxShadow?`${(e.vars||e).shadows[6]}, ${e.focusVisible.boxShadow}`:(e.vars||e).shadows[6]},[`&.${dm.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${dm.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${dm.focusVisible}`]:{boxShadow:e.focusVisible?.boxShadow??`none`},"&:active":{boxShadow:`none`},[`&.${dm.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loading:!0,loadingPosition:`center`},style:{...Zs(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${dm.loading}`]:{color:`transparent`}}}]}})),_m=K(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...Zs(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...hm]})),vm=K(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{...Zs(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...hm]})),ym=K(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),bm=K(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),xm=E.forwardRef(function(e,t){let n=E.useContext(fm),r=E.useContext(pm),i=q({props:Qr(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=Ml(h),T=_??(0,V.jsx)(sd,{"aria-labelledby":w,color:`inherit`,size:16}),D={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},O=mm(D),k=(b||g&&v===`start`)&&(0,V.jsx)(_m,{className:O.startIcon,ownerState:D,children:b||(0,V.jsx)(bm,{className:O.loadingIconPlaceholder,ownerState:D})}),A=(f||g&&v===`end`)&&(0,V.jsx)(vm,{className:O.endIcon,ownerState:D,children:f||(0,V.jsx)(bm,{className:O.loadingIconPlaceholder,ownerState:D})}),j=r||``,M=typeof g==`boolean`?(0,V.jsx)(`span`,{className:O.loadingWrapper,style:{display:`contents`},children:g&&(0,V.jsx)(ym,{className:O.loadingIndicator,ownerState:D,children:T})}):null,{root:N,...P}=O;return(0,V.jsxs)(gm,{ownerState:D,className:H(n.className,O.root,c,j),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:H(O.focusVisible,p),ref:t,internalNativeButton:!0,type:x,id:g?w:h,...C,classes:P,children:[k,v!==`end`&&M,a,v===`end`&&M,A]})});function Sm(e){return zr(`MuiCard`,e)}U(`MuiCard`,[`root`]);var Cm=e=>{let{classes:t}=e;return W({root:[`root`]},Sm,t)},wm=K(fu,{name:`MuiCard`,slot:`Root`})({overflow:`hidden`}),Tm=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiCard`}),{className:r,raised:i=!1,...a}=n,o={...n,raised:i},s=Cm(o);return(0,V.jsx)(wm,{className:H(s.root,r),elevation:i?8:void 0,ref:t,ownerState:o,...a})});function Em(e){return zr(`MuiCardActionArea`,e)}var Dm=U(`MuiCardActionArea`,[`root`,`focusVisible`,`focusHighlight`]),Om=e=>{let{classes:t}=e;return W({root:[`root`],focusHighlight:[`focusHighlight`]},Em,t)},km=K(Uu,{name:`MuiCardActionArea`,slot:`Root`})(J(({theme:e})=>({display:`block`,textAlign:`inherit`,borderRadius:`inherit`,width:`100%`,[`&:hover .${Dm.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},...e.focusVisible?Qa(1):{[`&.${Dm.focusVisible} .${Dm.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}}))),Am=K(`span`,{name:`MuiCardActionArea`,slot:`FocusHighlight`})(J(({theme:e})=>({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`,opacity:0,backgroundColor:`currentcolor`,...Zs(e,`opacity`,{duration:e.transitions.duration.short})}))),jm=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiCardActionArea`}),{children:r,className:i,focusVisibleClassName:a,slots:o={},slotProps:s={},...c}=n,l=n,u=Om(l),d={slots:o,slotProps:s},[f,p]=X(`root`,{elementType:km,externalForwardedProps:{...d,...c},shouldForwardComponentProp:!0,ownerState:l,ref:t,className:H(u.root,i),additionalProps:{internalNativeButton:!0,focusVisibleClassName:H(a,u.focusVisible)}}),[m,h]=X(`focusHighlight`,{elementType:Am,externalForwardedProps:d,ownerState:l,className:u.focusHighlight});return(0,V.jsxs)(f,{...p,children:[r,(0,V.jsx)(m,{...h})]})});function Mm(e){return e.substring(2).toLowerCase()}function Nm(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Pm(e){let{children:t,disableReactTree:n=!1,mouseEvent:r=`onClick`,onClickAway:i,touchEvent:a=`onTouchEnd`}=e,o=E.useRef(!1),s=E.useRef(null),c=E.useRef(!1),l=E.useRef(!1);E.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);let u=ms(Np(t),s),d=hs(e=>{let t=l.current;l.current=!1;let r=gs(s.current);if(!c.current||!s.current||`clientX`in e&&Nm(e,r))return;if(o.current){o.current=!1;return}let a;a=e.composedPath?e.composedPath().includes(s.current):!Id(r.documentElement,e.target)||Id(s.current,e.target),a||!n&&t||i(e)}),f=e=>n=>{l.current=!0;let r=t.props[e];r&&r(n)},p={ref:u};return a!==!1&&(p[a]=f(a)),E.useEffect(()=>{if(a!==!1){let e=Mm(a),t=gs(s.current),n=()=>{o.current=!0};return t.addEventListener(e,d),t.addEventListener(`touchmove`,n),()=>{t.removeEventListener(e,d),t.removeEventListener(`touchmove`,n)}}},[d,a]),r!==!1&&(p[r]=f(r)),E.useEffect(()=>{if(r!==!1){let e=Mm(r),t=gs(s.current);return t.addEventListener(e,d),()=>{t.removeEventListener(e,d)}}},[d,r]),E.cloneElement(t,p)}function Fm(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Im(e){let t=gs(e);return e===t.body||e===t.documentElement?_s(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Lm(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function Rm(e){return parseFloat(_s(e).getComputedStyle(e).paddingRight)||0}function zm(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function Bm(e,t){let n=new Set,r=e;for(;r&&r!==t;)n.add(r),r=r.parentElement;return r===t?n:new Set}function Vm(e,t,n,r){[].forEach.call(e.children,e=>{e===t||zm(e)||(n.has(e)?Vm(e,t,n,r):r.add(e))})}function Hm(e){let{container:t,modals:n}=e,r=n[n.length-1].modalRef,i=new Set;Vm(t,r,Bm(r,t),i),i.forEach(t=>{!e.hiddenSet.has(t)&&t.getAttribute(`aria-hidden`)===`true`&&i.delete(t)}),e.hiddenSet.forEach(e=>{i.has(e)||Lm(e,!1)}),i.forEach(e=>Lm(e,!0)),r&&Lm(r,!1),e.hiddenSet=i}function Um(e,t){let n=[],r=e.container;if(!t.disableScrollLock){let e;if(r.parentNode instanceof DocumentFragment)e=gs(r).body;else{let t=r.parentElement,n=_s(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}if(Im(e)){let t=Fm(_s(e));n.push({value:e.style.paddingRight,property:`padding-right`,el:e}),e.style.paddingRight=`${Rm(e)+t}px`;let i=gs(r).querySelectorAll(`.mui-fixed`);[].forEach.call(i,e=>{n.push({value:e.style.paddingRight,property:`padding-right`,el:e}),e.style.paddingRight=`${Rm(e)+t}px`})}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}var Wm=class{containers=[];modals=[];add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Lm(e.modalRef,!1);let r=this.containers.findIndex(e=>e.container===t);if(r!==-1)return this.containers[r].modals.push(e),Hm(this.containers[r]),n;let i={modals:[e],container:t,restore:null,hiddenSet:new Set};return this.containers.push(i),Hm(i),n}mount(e,t){let n=this.containers.findIndex(t=>t.modals.includes(e)),r=this.containers[n];r.restore||=Um(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=this.containers.findIndex(t=>t.modals.includes(e)),i=this.containers[r];return i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0?(i.restore&&i.restore(),e.modalRef&&Lm(e.modalRef,t),i.hiddenSet.forEach(e=>Lm(e,!1)),i.hiddenSet.clear(),this.containers.splice(r,1)):(Hm(i),e.modalRef&&Lm(e.modalRef,t)),n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},Gm=Id,Km=`data-mui-focusable`;function qm(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${Km}]`):null}var Jm=`input,select,textarea,a[href],button,[tabindex],audio[controls],video[controls],[contenteditable]:not([contenteditable="false"])`;function Ym(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function Xm(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function Zm(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||Xm(e))}function Qm(e){let t=[],n=[];return Array.from(e.querySelectorAll(Jm)).forEach((e,r)=>{let i=Ym(e);i!==-1&&Zm(e)&&(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function $m(){return!0}function eh(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Qm,isEnabled:o=$m,open:s}=e,c=E.useRef(!1),l=E.useRef(null),u=E.useRef(null),d=E.useRef(null),f=E.useRef(null),p=E.useRef(!1),m=E.useRef(null),h=ms(Np(t),m),g=E.useRef(null);E.useEffect(()=>{s&&m.current&&(p.current=!n)},[n,s]),E.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=ks(gs(m.current)),t=qm(m.current)??m.current;return Gm(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{!i&&d.current&&(c.current=!0,d.current.focus(),d.current=null)}},[s]),E.useEffect(()=>{if(!s||!m.current)return;let e=gs(m.current),t=t=>{if(g.current=t,r||!o()||t.key!==`Tab`)return;let n=m.current,i=ks(e);if(n===null)return;let s=qm(n);if(i===n||i===s){let e=a(n);if(e.length===0)return;t.preventDefault(),t.shiftKey?e[e.length-1].focus():e[0].focus()}else if(Gm(n,i)){let e=a(n),r=e.indexOf(i);if(r===-1||!e.some(e=>Ym(e)>0))return;t.preventDefault();let o=0;o=t.shiftKey?r<=0?e.length-1:r-1:r===e.length-1?0:r+1,e[o].focus()}},n=()=>{let t=m.current;if(t===null)return;let n=ks(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(Gm(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=ks(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,V.jsxs)(E.Fragment,{children:[(0,V.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),E.cloneElement(t,{ref:h,onFocus:_}),(0,V.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function th(e){return typeof e==`function`?e():e}function nh(e){return e?e.props.hasOwnProperty(`in`):!1}var rh=()=>{},ih=new Wm;function ah(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:o,onClose:s,open:c,rootRef:l}=e,u=E.useRef({}),d=E.useRef(null),f=E.useRef(null),p=E.useRef(null),m=ms(p,l),[h,g]=E.useState(!c),_=nh(o),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>gs(d.current),b=()=>(u.current.modalRef=p.current,u.current.mount=d.current,u.current),x=()=>{ih.mount(b(),{disableScrollLock:n}),p.current&&(p.current.scrollTop=0)},S=hs(()=>{let e=th(t)||y().body;ih.add(b(),e),p.current&&x()}),C=()=>ih.isTopModal(b()),w=hs(e=>{d.current=e,e&&(f.current=e,c&&C()?x():p.current&&Lm(p.current,v))}),T=E.useCallback(()=>{ih.remove(b(),v)},[v]);E.useEffect(()=>()=>{T()},[T]),E.useEffect(()=>{c?S():_&&r||T()},[c,T,_,r,S]);let D=e=>t=>{e.onKeyDown?.(t),t.key===`Escape`&&t.which!==229&&C()&&(t.stopPropagation(),s&&s(t,`escapeKeyDown`))},O=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&s&&s(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=ou(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:D(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:O(t),open:c}},getTransitionProps:()=>({onEnter:Sl(()=>{g(!1),i&&i()},o?.props.onEnter??rh),onExited:Sl(()=>{g(!0),a&&a(),r&&T()},o?.props.onExited??rh)}),rootRef:m,portalRef:w,portalContainer:!c&&_&&!h?f.current??t:t,isTopModal:C,exited:h,hasTransition:_}}function oh(e){return zr(`MuiModal`,e)}U(`MuiModal`,[`root`,`hidden`,`backdrop`]);var sh=e=>{let{open:t,exited:n,classes:r}=e;return W({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},oh,r)},ch=K(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(J(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),lh=K(sm,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),uh=E.forwardRef(function(e,t){let n=q({name:`MuiModal`,props:e}),{classes:r,className:i,closeAfterTransition:a=!1,children:o,container:s,component:c,disableAutoFocus:l=!1,disableEnforceFocus:u=!1,disablePortal:d=!1,disableRestoreFocus:f=!1,disableScrollLock:p=!1,hideBackdrop:m=!1,keepMounted:h=!1,onClose:g,onTransitionEnter:_,onTransitionExited:v,open:y,slotProps:b={},slots:x={},theme:S,...C}=n,w={...n,closeAfterTransition:a,disableAutoFocus:l,disableEnforceFocus:u,disablePortal:d,disableRestoreFocus:f,disableScrollLock:p,hideBackdrop:m,keepMounted:h},{getRootProps:T,getBackdropProps:D,getTransitionProps:O,portalRef:k,portalContainer:A,isTopModal:j,exited:M,hasTransition:N}=ah({...w,rootRef:t}),P={...w,exited:M},F=sh(P),ee={};if(o.props.tabIndex===void 0&&(ee.tabIndex=`-1`),N){let{onEnter:e,onExited:t}=O();ee.onEnter=e,ee.onExited=t}let te={slots:x,slotProps:b},[I,ne]=X(`root`,{ref:t,elementType:ch,externalForwardedProps:{...te,...C,component:c},getSlotProps:T,ownerState:P,className:H(i,F?.root,!P.open&&P.exited&&F?.hidden)}),[re,ie]=X(`backdrop`,{elementType:lh,externalForwardedProps:te,shouldForwardComponentProp:!0,getSlotProps:e=>D({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:F?.backdrop,ownerState:P});return!h&&!y&&(!N||M)?null:(0,V.jsx)(Ip,{ref:k,container:A,disablePortal:d,children:(0,V.jsxs)(I,{...ne,children:[m?null:(0,V.jsx)(re,{...ie}),(0,V.jsx)(eh,{disableEnforceFocus:u,disableAutoFocus:l,disableRestoreFocus:f,isEnabled:j,open:y,children:E.cloneElement(o,ee)})]})})});function dh(e){return zr(`MuiDialog`,e)}U(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]);var fh=E.createContext({}),ph=K(sm,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),mh=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return W({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${Y(n)}`],paper:[`paper`,`paperWidth${Y(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},dh,t)},hh=K(uh,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),gh=K(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${Y(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),_h=K(fu,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperWidth${Y(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(J(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,outline:0,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:`xs`,scroll:`body`},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t,scroll:`body`},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0}},{props:({ownerState:e})=>e.fullScreen&&e.scroll===`body`,style:{margin:0,maxWidth:`100%`}}]}))),vh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDialog`}),r=$o(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,children:c,className:l,fullScreen:u=!1,fullWidth:d=!1,maxWidth:f=`sm`,onClick:p,onClose:m,open:h,PaperComponent:g=fu,role:_=`dialog`,scroll:v=`paper`,slots:y={},slotProps:b={},transitionDuration:x=i,...S}=n,C={...n,fullScreen:u,fullWidth:d,maxWidth:f,scroll:v},w=mh(C),T=E.useRef(),D=e=>{T.current=e.target===e.currentTarget},O=e=>{p&&p(e),T.current&&(T.current=null,m&&m(e,`backdropClick`))},k=zi(o),A=E.useMemo(()=>({titleId:k}),[k]),j={slots:y,slotProps:b},[M,N]=X(`root`,{elementType:hh,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:C,className:H(w.root,l),ref:t}),[P,F]=X(`backdrop`,{elementType:ph,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:C,className:w.backdrop}),[ee,te]=X(`paper`,{elementType:_h,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:C,className:w.paper,additionalProps:{elevation:24,role:_,"aria-describedby":a,"aria-labelledby":k,"aria-modal":s,tabIndex:-1,[Km]:``}}),[I,ne]=X(`container`,{elementType:gh,externalForwardedProps:j,ownerState:C,className:w.container}),[re,ie]=X(`transition`,{elementType:rm,externalForwardedProps:j,ownerState:C,additionalProps:{appear:!0,in:h,timeout:x,role:`presentation`}});return(0,V.jsx)(M,{closeAfterTransition:!0,slots:{backdrop:P},slotProps:{backdrop:{transitionDuration:x,...F}},onClose:m,open:h,onClick:O,...N,...S,children:(0,V.jsx)(re,{...ie,children:(0,V.jsx)(I,{onMouseDown:D,...ne,children:(0,V.jsx)(ee,{as:g,...te,children:(0,V.jsx)(fh.Provider,{value:A,children:c})})})})})});function yh(e){return zr(`MuiDialogActions`,e)}U(`MuiDialogActions`,[`root`,`spacing`]);var bh=e=>{let{classes:t,disableSpacing:n}=e;return W({root:[`root`,!n&&`spacing`]},yh,t)},xh=K(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Sh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=bh(o);return(0,V.jsx)(xh,{className:H(s.root,r),ownerState:o,ref:t,...a})});function Ch(e){return zr(`MuiDialogContent`,e)}U(`MuiDialogContent`,[`root`,`dividers`]);function wh(e){return zr(`MuiDialogTitle`,e)}var Th=U(`MuiDialogTitle`,[`root`]),Eh=e=>{let{classes:t,dividers:n}=e;return W({root:[`root`,n&&`dividers`]},Ch,t)},Dh=K(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(J(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,...e.focusVisible&&{"&:focus-visible":{...Qa(1),...e.focusVisible}},variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${Th.root} + &`]:{paddingTop:0}}}]}))),Oh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=Eh(o);return(0,V.jsx)(Dh,{className:H(s.root,r),ownerState:o,ref:t,...a})}),kh=e=>{let{classes:t}=e;return W({root:[`root`]},wh,t)},Ah=K(Z,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),jh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=kh(o),{titleId:c=i}=E.useContext(fh);return(0,V.jsx)(Ah,{component:`h2`,className:H(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function Mh(e){return zr(`MuiDivider`,e)}var Nh=U(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`vertical`,`withChildren`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),Ph=e=>{let{absolute:t,children:n,classes:r,flexItem:i,orientation:a,textAlign:o,variant:s}=e;return W({root:[`root`,t&&`absolute`,s,a===`vertical`&&`vertical`,i&&`flexItem`,n&&`withChildren`,o===`right`&&a!==`vertical`&&`textAlignRight`,o===`left`&&a!==`vertical`&&`textAlignLeft`],wrapper:[`wrapper`,a===`vertical`&&`wrapperVertical`]},Mh,r)},Fh=K(`div`,{name:`MuiDivider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.orientation===`vertical`&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.textAlign===`right`&&n.orientation!==`vertical`&&t.textAlignRight,n.textAlign===`left`&&n.orientation!==`vertical`&&t.textAlignLeft]}})(J(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:`solid`,borderColor:(e.vars||e).palette.divider,borderBottomWidth:`thin`,variants:[{props:{absolute:!0},style:{position:`absolute`,bottom:0,left:0,width:`100%`}},{props:{variant:`inset`},style:{marginLeft:72}},{props:{variant:`middle`,orientation:`horizontal`},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:`middle`,orientation:`vertical`},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:`vertical`},style:{height:`100%`,borderBottomWidth:0,borderRightWidth:`thin`}},{props:{flexItem:!0},style:{alignSelf:`stretch`,height:`auto`}},{props:({ownerState:e})=>!!e.children,style:{display:`flex`,textAlign:`center`,border:0,borderTopStyle:`solid`,borderLeftStyle:`solid`,"&::before, &::after":{content:`""`,alignSelf:`center`}}},{props:({ownerState:e})=>e.children&&e.orientation!==`vertical`,style:{"&::before, &::after":{width:`100%`,borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:`inherit`}}},{props:({ownerState:e})=>e.orientation===`vertical`&&e.children,style:{flexDirection:`column`,"&::before, &::after":{height:`100%`,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:`inherit`}}},{props:({ownerState:e})=>e.textAlign===`right`&&e.orientation!==`vertical`,style:{"&::before":{width:`90%`},"&::after":{width:`10%`}}},{props:({ownerState:e})=>e.textAlign===`left`&&e.orientation!==`vertical`,style:{"&::before":{width:`10%`},"&::after":{width:`90%`}}}]}))),Ih=K(`span`,{name:`MuiDivider`,slot:`Wrapper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,n.orientation===`vertical`&&t.wrapperVertical]}})(J(({theme:e})=>({display:`inline-block`,paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:`nowrap`,variants:[{props:{orientation:`vertical`},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Lh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDivider`}),{absolute:r=!1,children:i,className:a,orientation:o=`horizontal`,component:s=i||o===`vertical`?`div`:`hr`,flexItem:c=!1,role:l=s===`hr`?void 0:`separator`,textAlign:u=`center`,variant:d=`fullWidth`,...f}=n,p={...n,absolute:r,component:s,flexItem:c,orientation:o,role:l,textAlign:u,variant:d},m=Ph(p);return(0,V.jsx)(Fh,{as:s,className:H(m.root,a),role:l,ref:t,ownerState:p,"aria-orientation":l===`separator`&&(s!==`hr`||o===`vertical`)?o:void 0,...f,children:i?(0,V.jsx)(Ih,{className:m.wrapper,ownerState:p,children:i}):null})}),Rh={visibility:`hidden`},zh={};function Bh(e){return typeof e==`string`&&/^translate\(.+,\s*.+\)$/.test(e)}function Vh(e,t,n,r=zh){let{resetInlineTransform:i=!0}=r,a=n&&n.getBoundingClientRect(),o=Al(t),s,c;if(i){let e=t.style.transform,n=t.style.transition;t.style.transition=``,t.style.transform=``,s=t.getBoundingClientRect(),c=o.getComputedStyle(t).getPropertyValue(`transform`),t.style.transform=e,t.style.transition=n}else s=t.getBoundingClientRect(),c=o.getComputedStyle(t).getPropertyValue(`transform`);let{offsetX:l,offsetY:u}=Ks(c);return e===`left`?a?`translateX(${a.right+l-s.left}px)`:`translateX(${o.innerWidth+l-s.left}px)`:e===`right`?a?`translateX(-${s.right-a.left-l}px)`:`translateX(-${s.left+s.width-l}px)`:e===`up`?a?`translateY(${a.bottom+u-s.top}px)`:`translateY(${o.innerHeight+u-s.top}px)`:a?`translateY(-${s.top-a.top+s.height-u}px)`:`translateY(-${s.top+s.height-u}px)`}function Hh(e){return typeof e==`function`?e():e}function Uh(e,t,n,r){let i=Vh(e,t,Hh(n),r);i&&(t.style.transform=i)}var Wh=E.forwardRef(function(e,t){let n=$o(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:o=!0,children:s,container:c,disablePrefersReducedMotion:l=!1,direction:u=`down`,easing:d=r,in:f,onEnter:p,onEntered:m,onEntering:h,onExit:g,onExited:_,onExiting:v,style:y,timeout:b=i,...x}=e,S=ru(n.motion.reducedMotion,l),C=E.useRef(null),w=E.useRef(!1),T=Ts(Np(s),C,t),D=qs(C,(e,t)=>{Uh(u,e,c),S.shouldReduceMotion||Ls(e),p&&p(e,t)}),O=qs(C,(e,t)=>{let r=Ys({timeout:b,style:y,easing:d},{mode:`enter`}),i=S.getTransitionTiming({duration:r.duration,delay:r.delay});e.style.transition=n.transitions.create(`transform`,{duration:i.duration,easing:r.easing,delay:i.delay}),e.style.transform=`none`,h&&h(e,t)}),k=qs(C,m),A=qs(C,v),j=qs(C,e=>{let t=Ys({timeout:b,style:y,easing:d},{mode:`exit`}),r=S.getTransitionTiming({duration:t.duration,delay:t.delay});e.style.transition=n.transitions.create(`transform`,{duration:r.duration,easing:t.easing,delay:r.delay});let i=Bh(e.style.transform);w.current=i,Uh(u,e,c,{resetInlineTransform:!i}),g&&g(e)}),M=qs(C,e=>{w.current=!1,e.style.transition=``,_&&_(e)}),N=a?e=>{a(C.current,e)}:void 0,P=E.useCallback(()=>{C.current&&Uh(u,C.current,c)},[u,c]);return E.useEffect(()=>{if(f||u===`down`||u===`right`)return;let e=Ol(()=>{C.current&&Uh(u,C.current,c)}),t=Al(C.current);return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[u,f,c]),E.useEffect(()=>{!f&&!w.current&&P()},[f,P]),(0,V.jsx)(Gl,{nodeRef:C,onEnter:D,onEntered:k,onEntering:O,onExit:j,onExited:M,onExiting:A,addEndListener:N,appear:o,in:f,reduceMotion:S.shouldReduceMotion,timeout:b,...x,children:(e,{ownerState:t,...n})=>{let r;return r=e===`exited`&&!f?y||s.props.style?{visibility:`hidden`,...y,...s.props.style}:Rh:y&&s.props.style?{...y,...s.props.style}:y||s.props.style,E.cloneElement(s,{ref:T,style:r,...n})}})});function Gh(e){return zr(`MuiDrawer`,e)}U(`MuiDrawer`,[`root`,`docked`,`paper`,`anchorLeft`,`anchorRight`,`anchorTop`,`anchorBottom`,`modal`]);var Kh=(e,t)=>{let{ownerState:n}=e;return[t.root,(n.variant===`permanent`||n.variant===`persistent`)&&t.docked,n.variant===`temporary`&&t.modal]},qh=e=>{let{classes:t,anchor:n,variant:r}=e;return W({root:[`root`,`anchor${Y(n)}`],docked:[(r===`permanent`||r===`persistent`)&&`docked`],modal:[`modal`],paper:[`paper`]},Gh,t)},Jh=K(uh,{name:`MuiDrawer`,slot:`Root`,overridesResolver:Kh})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Yh=K(`div`,{shouldForwardProp:ns,name:`MuiDrawer`,slot:`Docked`,skipVariantsResolver:!1,overridesResolver:Kh})({flex:`0 0 auto`}),Xh=K(fu,{name:`MuiDrawer`,slot:`Paper`})(J(({theme:e})=>({overflowY:`auto`,display:`flex`,flexDirection:`column`,height:`100%`,flex:`1 0 auto`,zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:`touch`,position:`fixed`,top:0,outline:0,variants:[{props:{anchor:`left`},style:{left:0}},{props:{anchor:`top`},style:{top:0,left:0,right:0,height:`auto`,maxHeight:`100%`}},{props:{anchor:`right`},style:{right:0}},{props:{anchor:`bottom`},style:{top:`auto`,left:0,bottom:0,right:0,height:`auto`,maxHeight:`100%`}},{props:({ownerState:e})=>e.anchor===`left`&&e.variant!==`temporary`,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>e.anchor===`top`&&e.variant!==`temporary`,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>e.anchor===`right`&&e.variant!==`temporary`,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>e.anchor===`bottom`&&e.variant!==`temporary`,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Zh={left:`right`,right:`left`,top:`down`,bottom:`up`};function Qh(e){return[`left`,`right`].includes(e)}function $h({direction:e},t){return e===`rtl`&&Qh(t)?Zh[t]:t}var eg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDrawer`}),r=$o(),i=ji(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:o=`left`,children:s,className:c,elevation:l=16,hideBackdrop:u=!1,ModalProps:d={},onClose:f,open:p=!1,transitionDuration:m=a,variant:h=`temporary`,slots:g={},slotProps:_={},...v}=n,y=E.useRef(!1),b=E.useRef(null),x=Ts(t,b);E.useEffect(()=>{y.current=!0},[]);let S=E.useCallback(()=>b.current,[]),C=$h({direction:i?`rtl`:`ltr`},o),w=o,T={...n,anchor:w,elevation:l,open:p,variant:h,...v},D=qh(T),O={slots:g,slotProps:{..._,backdrop:Ll(_.backdrop,{transitionDuration:m})}},[k,A]=X(`root`,{ref:x,elementType:Jh,className:H(D.root,D.modal,c),shouldForwardComponentProp:!0,ownerState:T,externalForwardedProps:{...O,...v,...d},additionalProps:{closeAfterTransition:!0,open:p,onClose:f,hideBackdrop:u,slots:{backdrop:O.slots.backdrop},slotProps:{backdrop:O.slotProps.backdrop}}}),[j,M]=X(`paper`,{elementType:Xh,shouldForwardComponentProp:!0,className:D.paper,ownerState:T,externalForwardedProps:O,additionalProps:{elevation:h===`temporary`?l:0,square:!0,...h===`temporary`&&{role:`dialog`,"aria-modal":`true`,"data-mui-focusable":``,tabIndex:-1}}}),[N,P]=X(`docked`,{elementType:Yh,ref:x,className:H(D.root,D.docked,c),ownerState:T,externalForwardedProps:O,additionalProps:v}),[F,ee]=X(`transition`,{elementType:Wh,ownerState:T,externalForwardedProps:O,additionalProps:{in:p,direction:Zh[C],timeout:m,appear:y.current,...h===`temporary`&&(g.transition==null||g.transition===Wh)&&{container:S}}}),te=(0,V.jsx)(j,{...M,children:s});if(h===`permanent`)return(0,V.jsx)(N,{...P,children:te});let I=(0,V.jsx)(F,{...ee,children:te});return h===`persistent`?(0,V.jsx)(N,{...P,children:I}):(0,V.jsx)(k,{...A,children:I})});function tg(e){return zr(`MuiFab`,e)}var ng=U(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),rg=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=W({root:[`root`,n,`size${Y(i)}`,t===`inherit`?`colorInherit`:t]},tg,r);return{...r,...a}},ig=K(Uu,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>ns(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Y(n.size)}`],n.color===`inherit`&&t.colorInherit,t[Y(n.size)],t[n.color]]}})(J(({theme:e})=>({...e.typography.button,minHeight:36,...Zs(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),borderRadius:`50%`,padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:`none`},[`&.${ng.focusVisible}`]:{...e.focusVisible,boxShadow:e.focusVisible?.boxShadow?`${(e.vars||e).shadows[6]}, ${e.focusVisible.boxShadow}`:(e.vars||e).shadows[6]},variants:[{props:{size:`small`},style:{width:40,height:40}},{props:{size:`medium`},style:{width:48,height:48}},{props:{variant:`extended`},style:{borderRadius:24,padding:`0 16px`,width:`auto`,minHeight:`auto`,minWidth:48,height:48}},{props:{variant:`extended`,size:`small`},style:{width:`auto`,padding:`0 8px`,borderRadius:17,minWidth:34,height:34}},{props:{variant:`extended`,size:`medium`},style:{width:`auto`,padding:`0 16px`,borderRadius:20,minWidth:40,height:40}},{props:{color:`inherit`},style:{color:`inherit`}}]})),J(({theme:e})=>({variants:[...Object.entries(e.palette).filter(qu([`dark`,`contrastText`])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),J(({theme:e})=>({[`&.${ng.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),ag=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFab`}),{children:r,className:i,color:a=`default`,component:o=`button`,disabled:s=!1,disableFocusRipple:c=!1,focusVisibleClassName:l,size:u=`large`,variant:d=`circular`,...f}=n,p={...n,color:a,component:o,disabled:s,disableFocusRipple:c,size:u,variant:d},m=rg(p),{root:h,...g}=m;return(0,V.jsx)(ig,{className:H(m.root,i),component:o,internalNativeButton:!0,disabled:s,focusRipple:!c,focusVisibleClassName:H(m.focusVisible,l),ownerState:p,ref:t,...f,classes:g,children:r})});function og(e){return zr(`MuiSelect`,e)}var sg=U(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`nativeInput`,`error`]),cg=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=W({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${Y(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},cc,t);return{...t,...c}},lg=K(ic,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...tc(e,t),!n.disableUnderline&&t.underline]}})(J(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,...Zs(e,`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${lc.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${lc.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...Zs(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${lc.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${lc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...Zs(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${lc.disabled}, .${lc.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${lc.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{"--_trailingPad":`12px`,paddingRight:`var(--_trailingPad)`,[`&.${sg.root}`]:{"--_trailingPad":`0px`}}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),ug=K(ac,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:nc})(J(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`,...e.vars&&{WebkitBoxShadow:e.vars.palette.Input.autofillWebkitBoxShadow,...e.applyStyles(`dark`,{WebkitTextFillColor:`#fff`,caretColor:`#fff`})}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),dg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,fullWidth:i=!1,hiddenLabel:a,inputComponent:o=`input`,multiline:s=!1,notched:c,slotProps:l,slots:u={},type:d=`text`,...f}=n,p={...n,disableUnderline:r,fullWidth:i,inputComponent:o,multiline:s,type:d},m=cg(n),h={root:{ownerState:p},input:{ownerState:p}},g=l?A(h,l):h,_=u.root??lg,v=u.input??ug;return(0,V.jsx)(sc,{slots:{root:_,input:v},slotProps:g,fullWidth:i,inputComponent:o,multiline:s,ref:t,type:d,...f,classes:m})});dg.muiName=`Input`;function fg(e){return zr(`MuiFormControl`,e)}U(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var pg=e=>{let{classes:t,margin:n,fullWidth:r}=e;return W({root:[`root`,n!==`none`&&`margin${Y(n)}`,r&&`fullWidth`]},fg,t)},mg=K(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${Y(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),hg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=pg(_),[y,b]=E.useState(()=>{let e=!1;return r&&E.Children.forEach(r,t=>{if(!kl(t,[`Input`,`Select`]))return;let n=kl(t,[`Select`])?t.props.input:t;n&&Ms(n.props)&&(e=!0)}),e}),[x,S]=E.useState(()=>{let e=!1;return r&&E.Children.forEach(r,t=>{kl(t,[`Input`,`Select`])&&(js(t.props,!0)||js(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=E.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C,D;E.useRef(!1);let O=E.useCallback(()=>{S(!0)},[]),k=E.useCallback(()=>{S(!1)},[]),A=E.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:k,onFilled:O,registerEffect:D,required:p,variant:h}),[y,a,s,c,x,T,u,d,D,k,O,p,m,h]);return(0,V.jsx)(Cs.Provider,{value:A,children:(0,V.jsx)(mg,{as:o,ownerState:_,className:H(v.root,i),ref:t,...g,children:r})})}),gg,_g=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return W({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${Y(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},uc,t)},vg=K(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${Y(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(J(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${dc.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${dc.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),yg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,[m]=ws({props:n,states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};delete h.ownerState;let g=_g(h);return(0,V.jsx)(vg,{as:a,className:H(g.root,i),ref:t,...p,ownerState:h,children:r===` `?gg||=(0,V.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):r})}),bg=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return W({root:[`root`,`color${Y(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},fc,t)},xg=K(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(J(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{[`&.${pc.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${pc.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${pc.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Sg=K(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(J(({theme:e})=>({[`&.${pc.error}`]:{color:(e.vars||e).palette.error.main}}))),Cg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,[p]=ws({props:n,states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=bg(m);return(0,V.jsxs)(xg,{as:o,ownerState:m,className:H(h.root,i),ref:t,...f,children:[r,p.required&&(0,V.jsxs)(Sg,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function wg(e){return`scale(${e}, ${e**2})`}var Tg={entering:{opacity:1,transform:wg(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:wg(.75)},exited:{opacity:0,transform:wg(.75)}},Eg={opacity:0,transform:wg(.75),visibility:`hidden`},Dg=E.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,disablePrefersReducedMotion:a=!1,easing:o,in:s,onEnter:c,onEntered:l,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:h=`auto`,...g}=e,_=E.useRef(null),v=$o(),y=ru(v.motion.reducedMotion,a),b=E.useRef(null),x=Ts(b,Np(i),t),S=qs(b,u),C=qs(b,(e,t)=>{y.shouldReduceMotion||Ls(e);let{duration:n,delay:r,easing:i}=Ys({style:m,timeout:h,easing:o},{mode:`enter`}),a;h===`auto`&&!y.shouldReduceMotion?(a=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=a):(a=n,_.current=null);let s=y.getTransitionTiming({duration:a,delay:r});e.style.transition=[v.transitions.create(`opacity`,{duration:s.duration,delay:s.delay}),v.transitions.create(`transform`,{duration:typeof s.duration==`string`?s.duration:s.duration*.666,delay:s.delay,easing:i})].join(`,`),c&&c(e,t)}),w=qs(b,l),T=qs(b,p),D=qs(b,e=>{let{duration:t,delay:n,easing:r}=Ys({style:m,timeout:h,easing:o},{mode:`exit`}),i;h===`auto`&&!y.shouldReduceMotion?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):(i=t,_.current=null);let a=y.getTransitionTiming({duration:i,delay:n});e.style.transition=[v.transitions.create(`opacity`,{duration:a.duration,delay:a.delay}),v.transitions.create(`transform`,{duration:typeof a.duration==`string`?a.duration:a.duration*.666,delay:a.delay||(typeof a.duration==`string`?a.duration:a.duration*.333),easing:r})].join(`,`),e.style.opacity=0,e.style.transform=wg(.75),d&&d(e)}),O=qs(b,e=>{e.style.transition=``,f&&f(e)});return(0,V.jsx)(Gl,{appear:r,in:s,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:D,onExited:O,onExiting:T,addEndListener:n?e=>{n(b.current,e)}:void 0,getAutoTimeout:h===`auto`?()=>_.current:void 0,reduceMotion:y.shouldReduceMotion,timeout:h===`auto`?null:h,...g,children:(e,{ownerState:t,...n})=>{let r=Js(e,s,Tg,Eg,m,i.props.style);return E.cloneElement(i,{style:r,ref:x,...n})}})});Dg&&(Dg.muiSupportAuto=!0);function Og(e){return zr(`MuiInputLabel`,e)}var kg=U(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),Ag=e=>{let{classes:t,disableUnderline:n}=e,r=W({root:[`root`,!n&&`underline`],input:[`input`]},mc,t);return{...t,...r}},jg=K(ic,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...tc(e,t),!n.disableUnderline&&t.underline]}})(J(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{[`label + &, .${kg.root} + &`]:{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...Zs(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${hc.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${hc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...Zs(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${hc.disabled}, .${hc.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${hc.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),Mg=K(ac,{name:`MuiInput`,slot:`Input`,overridesResolver:nc})({}),Ng=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiInput`}),{disableUnderline:r=!1,fullWidth:i=!1,inputComponent:a=`input`,multiline:o=!1,notched:s,slotProps:c,slots:l={},type:u=`text`,...d}=n,f=Ag(n),p={root:{ownerState:{disableUnderline:r}}},m=c?A(c,p):p,h=l.root??jg,g=l.input??Mg;return(0,V.jsx)(sc,{slots:{root:h,input:g},slotProps:m,fullWidth:i,inputComponent:a,multiline:o,ref:t,type:u,...d,classes:f})});Ng.muiName=`Input`;var Pg=U(`MuiInputAdornment`,[`root`,`filled`,`standard`,`outlined`,`positionStart`,`positionEnd`,`disablePointerEvents`,`hiddenLabel`,`sizeSmall`]),Fg=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=W({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${Y(r)}`,o],asterisk:[s&&`asterisk`]},Og,t);return{...t,...c}},Ig=K(Cg,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${pc.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(J(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{...Zs(e,[`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),Lg=E.forwardRef(function(e,t){let n=q({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,[l,u]=ws({props:n,states:[`size`,`variant`,`required`,`focused`]}),d=a;d===void 0&&u&&(d=u.filled||u.focused||u.adornedStart);let f={...n,disableAnimation:r,formControl:u,shrink:d,size:l.size,variant:l.variant,required:l.required,focused:l.focused},p=Fg(f);return(0,V.jsx)(Ig,{"data-shrink":d,ref:t,className:H(p.root,s),...c,ownerState:f,classes:p})}),Rg=E.createContext({});function zg(e){return zr(`MuiList`,e)}U(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var Bg=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return W({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},zg,t)},Vg=K(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0,isolation:`isolate`}}]}),Hg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=E.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=Bg(d);return(0,V.jsx)(Rg.Provider,{value:u,children:(0,V.jsxs)(Vg,{as:a,className:H(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),Ug=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Wg=e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:a,divider:o,selected:s}=e,c=W({root:[`root`,r&&`dense`,!a&&`gutters`,o&&`divider`,i&&`disabled`,t===`flex-start`&&`alignItemsFlexStart`,s&&`selected`]},gc,n);return{...n,...c}},Gg=K(Uu,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiListItemButton`,slot:`Root`,overridesResolver:Ug})(J(({theme:e})=>({display:`flex`,flexGrow:1,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minWidth:0,boxSizing:`border-box`,textAlign:`left`,paddingTop:8,paddingBottom:8,...Zs(e,`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${_c.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),...!e.focusVisible&&{[`&.${_c.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},[`&.${_c.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},...e.focusVisible?Qa(1):{[`&.${_c.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`&.${_c.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Kg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiListItemButton`}),{alignItems:r=`center`,autoFocus:i=!1,component:a=`div`,children:o,dense:s=!1,disableGutters:c=!1,divider:l=!1,focusVisibleClassName:u,selected:d=!1,className:f,...p}=n,m=E.useContext(Rg),h=E.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:c}),[r,m.dense,s,c]),g=E.useRef(null);Es(()=>{i&&g.current&&g.current.focus()},[i]);let _={...n,alignItems:r,dense:h.dense,disableGutters:c,divider:l,selected:d},v=Wg(_),{root:y,...b}=v,x=Ts(g,t);return(0,V.jsx)(Rg.Provider,{value:h,children:(0,V.jsx)(Gg,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&a===`div`?`button`:a,internalNativeButton:!1,focusVisibleClassName:H(v.focusVisible,u),ownerState:_,className:H(v.root,f),...p,classes:b,children:o})})}),qg=U(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]);function Jg(e){return zr(`MuiListItemText`,e)}var Yg=U(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),Xg=e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return W({root:[`root`,n&&`inset`,a&&`dense`,r&&i&&`multiline`],primary:[`primary`],secondary:[`secondary`]},Jg,t)},Zg=K(`div`,{name:`MuiListItemText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Yg.primary}`]:t.primary},{[`& .${Yg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:`1 1 auto`,minWidth:0,marginTop:4,marginBottom:4,[`.${Dd.root}:where(& .${Yg.primary})`]:{display:`block`},[`.${Dd.root}:where(& .${Yg.secondary})`]:{display:`block`},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Qg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiListItemText`}),{children:r,className:i,disableTypography:a=!1,inset:o=!1,primary:s,secondary:c,slots:l={},slotProps:u={},...d}=n,{dense:f}=E.useContext(Rg),p=s??r,m=c,h={...n,disableTypography:a,inset:o,primary:!!p,secondary:!!m,dense:f},g=Xg(h),_={slots:l,slotProps:u},[v,y]=X(`root`,{className:H(g.root,i),elementType:Zg,externalForwardedProps:{..._,...d},ownerState:h,ref:t}),[b,x]=X(`primary`,{className:g.primary,elementType:Z,externalForwardedProps:_,ownerState:h}),[S,C]=X(`secondary`,{className:g.secondary,elementType:Z,externalForwardedProps:_,ownerState:h});return p!=null&&p.type!==Z&&!a&&(p=(0,V.jsx)(b,{variant:f?`body2`:`body1`,component:x?.variant?void 0:`span`,...x,children:p})),m!=null&&m.type!==Z&&!a&&(m=(0,V.jsx)(S,{variant:`body2`,color:`textSecondary`,...C,children:m})),(0,V.jsxs)(v,{...y,children:[p,m]})}),$g=E.createContext(void 0);function e_(){let e=E.useContext($g);if(e===void 0)throw Error(`MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.`);return e}var t_=Object.is;function n_(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!t_(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var r_=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`,`Home`,`End`];function i_(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:i=!1,isItemFocusable:a=v_,wrap:o=!0}=e,[s,c]=E.useState(t),[l,u]=E.useState(t),d=s;t!==l&&(u(t),t!==void 0&&t!==s&&(d=t,c(t)));let f=E.useRef(null),p=E.useRef(new Map),[m,h]=E.useState(0),g=E.useMemo(()=>h_(p.current),[m]),_=o_(d,g,a,n),v=E.useRef(_);v.current=_;let y=E.useCallback(()=>{let e=h_(p.current);return f_(e,o_(v.current,e,a,n))},[n,a]),b=E.useCallback(()=>p.current,[]),x=hs(e=>{n_(p.current.get(e.id)??null,e)||(p.current.set(e.id,e),h(e=>e+1))}),S=hs(e=>{p.current.delete(e)&&h(e=>e+1)}),C=hs(e=>{c(e)}),w=E.useCallback(e=>v.current===e,[]),T=E.useCallback((e,t,n,r)=>{let i=u_(g_(p.current),e,t,n,r??a);return i?(i.element?.focus(),c(i.id),i):null},[a]),D=E.useCallback((e,t,n)=>({onFocus:e=>{t?.(e);let n=g_(p.current),r=m_(n,e.target);r!==-1&&c(n[r].id)},onKeyDown:e=>{if(n?.(e),e.defaultPrevented||e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!r_.includes(e.key))return;let t=r===`horizontal`?`ArrowLeft`:`ArrowUp`,a=r===`horizontal`?`ArrowRight`:`ArrowDown`;r===`horizontal`&&i&&(t=`ArrowRight`,a=`ArrowLeft`);let s=g_(p.current),c=Os(gs(f.current)),l=c===f.current,u=l_(s,c,v.current),d=`next`;switch(e.key){case t:d=`previous`,e.preventDefault(),l&&(u=s.length);break;case a:e.preventDefault(),l&&(u=-1);break;case`Home`:e.preventDefault(),u=-1;break;case`End`:e.preventDefault(),d=`previous`,u=s.length;break;default:return}T(u,d,o)},ref:x_(e,e=>{f.current=e})}),[T,i,r,o]),O=E.useCallback(e=>{let t=g_(p.current),n=Os(gs(f.current)),r=n===f.current?-1:l_(t,n,v.current);return T(r,`next`,!0,e)?.id??null},[T]);return E.useMemo(()=>({activeItemId:_,focusNext:O,getActiveItem:y,getContainerProps:D,getItemMap:b,isItemActive:w,registerItem:x,setActiveItemId:C,unregisterItem:S}),[_,O,y,D,b,w,x,C,S])}function a_(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=e_(),i=E.useRef(null),a=E.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),o=E.useRef(a);o.current=a;let s=E.useCallback(t=>{i.current=t,t==null?queueMicrotask(()=>{i.current??r(e.id)}):n({...o.current,element:t})},[e.id,n,r]),c=ms(e.ref,s);return ti(()=>{i.current&&n({...a,element:i.current})},[a,n]),ti(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:c,tabIndex:t===e.id?0:-1}}function o_(e,t,n,r){return e==null?c_(t,n,r):s_(e,t,n)}function s_(e,t,n){let r=p_(t,e);return r===-1?d_(t,n):n(t[r])?t[r].id:u_(t,r,`next`,!1,n)?.id??null}function c_(e,t,n){let r=n?.(e);if(r!=null){let n=f_(e,r);if(n&&t(n))return n.id}return d_(e,t)}function l_(e,t,n){if(t){let n=m_(e,t);if(n!==-1)return n}return p_(e,n)}function u_(e,t,n,r,i){let a=e.length-1;if(a===-1)return null;let o=!1,s=__(t,a,n,r),c=s;for(;s!==-1;){if(s===c){if(o)return null;o=!0}let t=e[s];if(!t||!i(t))s=__(s,a,n,r);else return t}return null}function d_(e,t){return e.find(e=>t(e))?.id??null}function f_(e,t){return t==null?null:e.find(e=>e.id===t)??null}function p_(e,t){return t==null?-1:e.findIndex(e=>e.id===t)}function m_(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function h_(e){let t=Array.from(e.values());if(t.every(e=>e.element==null))return t;let n=t.filter(y_).sort((e,t)=>b_(e.element,t.element)),r=t.filter(e=>!y_(e));return[...n,...r]}function g_(e){return h_(e).filter(y_)}function __(e,t,n,r=!0){return n===`next`?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function v_(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute(`disabled`)&&e.element.getAttribute(`aria-disabled`)!==`true`&&e.element.hasAttribute(`tabindex`):!1}function y_(e){return e.element!=null&&e.element.isConnected}function b_(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function x_(...e){return t=>{e.forEach(e=>{jl(e??null,t)})}}var S_=Fm;function C_(e,t){if(t==null)e.focus();else try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}function w_(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function T_(e){return e==null||typeof e==`string`&&!e.trim()}function E_(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var D_=E.createContext(null);function O_(){return E.useContext(D_)}var k_=D_.Provider,A_=E.createContext(void 0);function j_(){let e=E.useContext(A_);if(e===void 0)throw Error(`MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.`);return e}function M_(e){let t=e?.element??e;if(!t)return``;if(e?.textValue!==void 0)return e.textValue;let n=t.innerText;return n===void 0&&(n=t.textContent),n??``}function N_(e,t){if(t===void 0)return!0;let n=M_(e);return n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function P_(e,t){return N_(e,t)?v_(e):!1}function F_(e,t){C_(e,t)}var I_=E.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=q({props:e,name:`MuiMenuList`}),f=E.useRef(null),p=E.useRef(!1),[m,h]=E.useState(!1),g=O_(),_=E.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=i_({activeItemId:void 0,getDefaultActiveItemId:E.useCallback(e=>u===`selectedMenu`?e.find(e=>e.selected&&v_(e))?.id??e.find(e=>v_(e))?.id??null:e.find(e=>v_(e))?.id??null,[u]),orientation:`vertical`,wrap:!c}),{activeItemId:y,focusNext:b,getActiveItem:x,getContainerProps:S,getItemMap:C}=v,w=Fl((e=!1)=>{if(!f.current||!e&&p.current)return null;if(i){let e=x();if(e?.element){let t=Array.from(C().values()).some(e=>e.selected),n=u===`menu`&&t&&!e.selected&&g==null;return h(n),F_(e.element,g),p.current=!0,e.element}return r?(h(!1),f.current.focus(),f.current):null}return r?(h(!1),f.current.focus(),p.current=!0,f.current):(h(!1),null)});Es(()=>{!r&&!i?(p.current=!1,h(!1)):w()},[y,i,r,w]),E.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=Al(e),r=S_(n);if(r>0){let e=`${r}px`,i=t===`rtl`?`paddingLeft`:`paddingRight`,a=parseFloat(n.getComputedStyle(f.current)[i])||0;f.current.style[i]=`${a+r}px`,f.current.style.width=`calc(100% + ${e})`}}return f.current},focusInitialTarget:()=>{if(!f.current)return null;let e=ks(Ds(f.current));return e&&Gm(f.current,e)?e:w(!0)}}),[w]);let T=S(void 0,d.onFocus),D=Ts(f,T.ref,t),O=E.useMemo(()=>({itemsFocusableWhenDisabled:s,suppressInitialFocusVisible:m,variant:u}),[s,m,u]),k=Fl(e=>{if(m&&h(!1),(e.ctrlKey||e.metaKey||e.altKey)&&l)l(e);else{if(T.onKeyDown(e),e.key.length===1){let t=_.current,n=e.key.toLowerCase(),r=performance.now();t.keys.length>0&&(r-t.lastTime>500?(t.keys=[],t.repeating=!0,t.previousKeyMatched=!0):t.repeating&&n!==t.keys[0]&&(t.repeating=!1)),t.lastTime=r,t.keys.push(n);let i=ks(Ds(f.current)),a=i&&!t.repeating&&N_(i,t);t.previousKeyMatched&&(a||b(e=>P_(e,t))!=null)?e.preventDefault():t.previousKeyMatched=!1}l&&l(e)}});return(0,V.jsx)(Hg,{role:`menu`,ref:D,className:o,onKeyDown:k,tabIndex:-1,...d,onFocus:T.onFocus,children:(0,V.jsx)(A_.Provider,{value:O,children:(0,V.jsx)($g.Provider,{value:v,children:a})})})});function L_(e){return zr(`MuiPopover`,e)}U(`MuiPopover`,[`root`,`paper`]);function R_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function z_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function B_(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function V_(e){return typeof e==`function`?e():e}var H_=e=>{let{classes:t}=e;return W({root:[`root`],paper:[`paper`]},L_,t)},U_=K(uh,{name:`MuiPopover`,slot:`Root`})({}),W_=K(fu,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),G_=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,disableAutoFocus:d=!1,elevation:f=8,marginThreshold:p=16,open:m,slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},transitionDuration:v=`auto`,disableScrollLock:y=!1,...b}=n,x=E.useRef(),S={...n,anchorOrigin:a,anchorReference:s,elevation:f,marginThreshold:p,transformOrigin:_,transitionDuration:v},C=H_(S),w=E.useCallback(()=>{if(s===`anchorPosition`)return o;let e=V_(i),t=(e&&e.nodeType===1?e:Ds(x.current).body).getBoundingClientRect();return{top:t.top+R_(t,a.vertical),left:t.left+z_(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),T=E.useCallback(e=>({vertical:R_(e,_.vertical),horizontal:z_(e,_.horizontal)}),[_.horizontal,_.vertical]),D=E.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if(s===`none`)return{top:null,left:null,transformOrigin:B_(n)};let r=w(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Al(V_(i)),d=u.innerHeight-p,f=u.innerWidth-p;if(p!=null&&a<p){let e=a-p;a-=e,n.vertical+=e}else if(p!=null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(p!=null&&o<p){let e=o-p;o-=e,n.horizontal+=e}else if(l>f){let e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:B_(n)}},[i,s,w,T,p]),[O,k]=E.useState(m),A=E.useCallback(()=>{let e=x.current;if(!e)return;let t=D(e);t.top!=null&&e.style.setProperty(`top`,t.top),t.left!=null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,k(!0)},[D]);E.useEffect(()=>(y&&window.addEventListener(`scroll`,A),()=>window.removeEventListener(`scroll`,A)),[i,y,A]);let j=()=>{A()},M=()=>{k(!1)};E.useEffect(()=>{m&&A()}),E.useImperativeHandle(r,()=>m?{updatePosition:()=>{A()}}:null,[m,A]),E.useEffect(()=>{if(!m)return;let e=Ol(()=>{A()}),t=Al(V_(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,m,A]);let N=v,P={slots:h,slotProps:g},[F,ee]=X(`transition`,{elementType:Dg,externalForwardedProps:P,ownerState:S,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),j()},onExited:t=>{e.onExited?.(t),M()}}),additionalProps:{appear:!0,in:m}});v===`auto`&&!F.muiSupportAuto&&(N=void 0);let te=u||(i?Ds(V_(i)).body:void 0),[I,{slots:ne,slotProps:re,...ie}]=X(`root`,{ref:t,elementType:U_,externalForwardedProps:{...P,...b},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Ll(typeof g.backdrop==`function`?g.backdrop(S):g.backdrop,{invisible:!0})},container:te,open:m},ownerState:S,className:H(C.root,l)}),[ae,oe]=X(`paper`,{ref:x,className:C.paper,elementType:W_,externalForwardedProps:P,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:O?void 0:{opacity:0}},ownerState:S});return(0,V.jsx)(I,{...ie,...!fs(I)&&{slots:ne,slotProps:re,disableAutoFocus:d,disableScrollLock:y},children:(0,V.jsx)(F,{...ee,timeout:N,children:(0,V.jsx)(ae,{...oe,children:c})})})});function K_(e){return zr(`MuiMenu`,e)}U(`MuiMenu`,[`root`,`paper`,`list`]);var q_={vertical:`top`,horizontal:`right`},J_={vertical:`top`,horizontal:`left`},Y_=e=>{let{classes:t}=e;return W({root:[`root`],paper:[`paper`],list:[`list`]},K_,t)},X_=K(G_,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),Z_=K(W_,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Q_=K(I_,{name:`MuiMenu`,slot:`List`})({outline:0}),$_=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,onClose:s,open:c,PopoverClasses:l,transitionDuration:u=`auto`,variant:d=`selectedMenu`,slots:f={},slotProps:p={},...m}=n,h=ji(),g={...n,autoFocus:r,disableAutoFocusItem:o,transitionDuration:u,variant:d},_=Y_(g),v=r&&c,y=v&&!o,b=E.useRef(null),x=(e,t)=>{b.current&&(b.current.adjustStyleForScrollbar(e,{direction:h?`rtl`:`ltr`}),v&&b.current.focusInitialTarget?.())},S=e=>{e.key===`Tab`&&(e.preventDefault(),s&&s(e,`tabKeyDown`))},C={slots:f,slotProps:p},w=Mp({elementType:f.root,externalSlotProps:p.root,ownerState:g,className:[_.root,a]}),[T,D]=X(`paper`,{className:_.paper,elementType:Z_,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:g}),[O,k]=X(`list`,{className:_.list,elementType:Q_,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:e=>({...e,onKeyDown:t=>{S(t),e.onKeyDown?.(t)}}),ownerState:g}),A=typeof p.transition==`function`?p.transition(g):p.transition;return(0,V.jsx)(X_,{disableAutoFocus:r,onClose:s,anchorOrigin:{vertical:`bottom`,horizontal:h?`right`:`left`},transformOrigin:h?q_:J_,slots:{root:f.root,paper:T,backdrop:f.backdrop,transition:f.transition},slotProps:{root:w,paper:D,backdrop:typeof p.backdrop==`function`?p.backdrop(g):p.backdrop,transition:{...A,onEntering:(...e)=>{x(...e),A?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:u,ownerState:g,...m,classes:l,children:(0,V.jsx)(O,{actions:b,autoFocus:v,autoFocusItem:y,variant:d,...k,children:i})})}),ev=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},tv=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=W({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},vc,o);return{...o,...s}},nv=K(Uu,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:ev})(J(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${yc.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),...!e.focusVisible&&{[`&.${yc.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},[`&.${yc.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},...e.focusVisible?Qa(1):{[`&.${yc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`&.${yc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Nh.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Nh.inset}`]:{marginLeft:52},[`& .${Yg.root}`]:{marginTop:0,marginBottom:0},[`& .${Yg.inset}`]:{paddingLeft:36},[`& .${qg.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${qg.root} svg`]:{fontSize:`1.25rem`}}}]}))),rv=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=l===`menuitemcheckbox`||l===`menuitemradio`?!!n.selected:void 0,m=O_(),h=E.useContext(Rg),g=E.useMemo(()=>({dense:a||h.dense||!1,disableGutters:s}),[h.dense,a,s]),_=j_(),v=Ml(),y=_.suppressInitialFocusVisible,b=_.itemsFocusableWhenDisabled,x=E.useRef(null);Es(()=>{r&&x.current&&C_(x.current,m)},[r]);let S={...n,dense:g.dense,divider:o,disableGutters:s},C=tv(n),{root:w,...T}=C,D=a_({id:v,ref:t,disabled:n.disabled,focusableWhenDisabled:b,selected:n.selected}),O=Ts(x,D.ref),k;return u===void 0?_.variant===`selectedMenu`?k=D.tabIndex:(!n.disabled||b)&&(k=-1):k=u,(0,V.jsx)(Rg.Provider,{value:g,children:(0,V.jsx)(nv,{ref:O,role:l,"aria-checked":p,tabIndex:k,component:i,internalNativeButton:!1,focusableWhenDisabled:b,suppressFocusVisible:y,focusVisibleClassName:H(C.focusVisible,c),className:H(C.root,d),...f,ownerState:S,classes:T})})}),iv=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return W({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${Y(n)}`,a&&`iconOpen`,r&&`disabled`]},bc,t)},av=K(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${xc.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},[`& ~ .${Pg.root}`]:{position:`absolute`,top:`50%`,transform:`translateY(-50%)`,right:`calc(var(--_caret, 24px) + (var(--_endAdornment, 28px) - 1.5rem)/2)`},[`.${Ps.root}:has(> &)`]:{"--_endAdornment":`0px`},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{[`.${Ps.root}:has(> &)`]:{"--_caret":`24px`},[`.${Ps.root}:has(> & ~ .${Pg.root})`]:{"--_endAdornment":`28px`},"&&&":{paddingRight:`calc(var(--_caret, 24px) + var(--_endAdornment, 0px))`,minWidth:16}}},{props:{variant:`filled`},style:{[`.${Ps.root}:has(> &)`]:{"--_caret":`32px`},[`.${Ps.root}:has(> & ~ .${Pg.root})`]:{"--_endAdornment":`28px`},"&&&":{paddingRight:`calc(var(--_caret, 32px) + var(--_endAdornment, 0px))`}}},{props:{variant:`outlined`},style:{[`.${Ps.root}:has(> &)`]:{"--_caret":`32px`},[`.${Ps.root}:has(> & ~ .${Pg.root})`]:{"--_endAdornment":`28px`},borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:`calc(var(--_caret, 32px) + var(--_endAdornment, 0px))`}}}]})),ov=K(av,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:ns,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${xc.multiple}`]:t.multiple}]}})({}),sv=K(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${xc.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),cv=K(sv,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Y(n.variant)}`],n.open&&t.iconOpen]}})({}),lv=E.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=iv(l);return(0,V.jsxs)(E.Fragment,{children:[(0,V.jsx)(ov,{ownerState:l,className:H(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,V.jsx)(cv,{as:a,ownerState:l,className:u.icon})]})}),uv,dv=K(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:ns})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),fv=K(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:ns})(J(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,...Zs(e,`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,...Zs(e,`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,...Zs(e,`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function pv(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,V.jsx)(dv,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,V.jsx)(fv,{ownerState:c,children:s?(0,V.jsx)(`span`,{children:i}):uv||=(0,V.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`})})})}var mv=e=>{let{classes:t}=e,n=W({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Sc,t);return{...t,...n}},hv=K(ic,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:tc})(J(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Cc.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Cc.focused} .${Cc.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{[`&.${Cc.focused} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Cc.error} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Cc.disabled} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{"--_trailingPad":`14px`,paddingRight:`var(--_trailingPad)`,[`&.${sg.root}`]:{"--_trailingPad":`0px`}}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),gv=K(pv,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(J(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),_v=K(ac,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:nc})(J(({theme:e})=>({padding:`16.5px 14px`,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderRadius:`inherit`,...e.vars&&{WebkitBoxShadow:e.vars.palette.Input.autofillWebkitBoxShadow,...e.applyStyles(`dark`,{WebkitTextFillColor:`#fff`,caretColor:`#fff`})}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),vv=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiOutlinedInput`}),{fullWidth:r=!1,inputComponent:i=`input`,label:a,multiline:o=!1,notched:s,slots:c={},slotProps:l={},type:u=`text`,...d}=n,f=mv(n),[p,m]=ws({props:n,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),h={...n,color:p.color||`primary`,disabled:p.disabled,error:p.error,focused:p.focused,formControl:m,fullWidth:r,hiddenLabel:p.hiddenLabel,multiline:o,size:p.size,type:u},g=c.root??hv,_=c.input??_v,[v,y]=X(`notchedOutline`,{elementType:gv,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:c,slotProps:l},additionalProps:{label:a!=null&&a!==``&&p.required?(0,V.jsxs)(E.Fragment,{children:[a,` `,`*`]}):a}});return(0,V.jsx)(sc,{slots:{root:g,input:_},slotProps:l,renderSuffix:e=>(0,V.jsx)(v,{...y,notched:s===void 0?!!(e.startAdornment||e.filled||e.focused):s}),fullWidth:r,inputComponent:i,multiline:o,ref:t,type:u,...d,classes:{...f,notchedOutline:null}})});vv.muiName=`Input`;function yv(e){return Object.prototype.hasOwnProperty.call(e.props,`value`)}function bv(e){if(typeof e==`string`||typeof e==`number`)return String(e);let t=``;return E.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=String(e):E.isValidElement(e)&&(t+=bv(e.props.children))}),t}function xv(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length;for(let n=0;n<e.length;n+=1){let i=(r+n)%e.length;if(e[i].label.startsWith(t))return i}return-1}function Sv(e,t){return!e.some(e=>e.label[0]===t&&e.label[1]===t)}function Cv(e,t){let n=[],r=-1;for(let i=0;i<e.length;i+=1){let a=e[i];if(!E.isValidElement(a)||!yv(a)||a.props.disabled)continue;let o=bv(a.props.children).trim().toLowerCase();o!==``&&(r===-1&&E_(t,a.props.value)&&(r=n.length),n.push({child:a,label:o,value:a.props.value}))}return{options:n,selectedIndex:r}}var wv,Tv=2,Ev=400,Dv=200,Ov=750,kv=` `,Av=`ArrowUp`,jv=`ArrowDown`,Mv=`Enter`;function Nv(e,t){if(!t)return!1;if(e.composedPath().includes(t)||e.target?.nodeType&&t.contains(e.target))return!0;let n=t.getBoundingClientRect();return n.width===0&&n.height===0?!1:e.clientX>=n.left-Tv&&e.clientX<=n.right+Tv&&e.clientY>=n.top-Tv&&e.clientY<=n.bottom+Tv}var Pv=K(av,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${sg.select}`]:t.select},{[`&.${sg.select}`]:t[n.variant]},{[`&.${sg.error}`]:t.error},{[`&.${sg.multiple}`]:t.multiple}]}})({[`&.${sg.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),Fv=K(sv,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.open&&t.iconOpen]}})({}),Iv=K(`input`,{shouldForwardProp:e=>ts(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),Lv=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return W({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},og,t)},Rv=E.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:S,onFocus:C,onKeyDown:w,onMouseDown:T,onOpen:D,open:O,readOnly:k,renderValue:A,required:j,SelectDisplayProps:M={},tabIndex:N,type:P,value:F,variant:ee=`standard`,...te}=e,[I,ne]=Pl({controlled:F,default:l,name:`Select`}),[re,ie]=Pl({controlled:O,default:c,name:`Select`}),ae=E.useRef(null),oe=E.useRef(null),se=E.useRef(null),ce=E.useRef(!1),le=E.useRef(!1),ue=E.useRef(null),de=E.useRef(!1),L=E.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),R=E.useRef({buffer:``,previousSearchIndex:null,matchedIndex:null}),fe=Cu(),pe=Cu(),me=Cu(),[he,z]=E.useState(null),{current:ge}=E.useRef(O!=null),[_e,ve]=E.useState(),[ye,be]=E.useState(null),xe=Ts(t,m),Se=E.useCallback(e=>{oe.current=e,e&&z(e)},[]),Ce=he?.parentNode;E.useImperativeHandle(xe,()=>({focus:()=>{oe.current.focus()},node:ae.current,value:I}),[I]);let we=he!==null&&re,Te=E.useCallback(()=>{me.clear(),R.current.buffer=``,R.current.previousSearchIndex=null,R.current.matchedIndex=null},[me]);Es(()=>{ce.current=we,we&&Te()},[we,Te]);let Ee=E.useCallback(()=>{fe.clear(),pe.clear()},[fe,pe]),De=E.useCallback(()=>{Ee(),de.current=!1,L.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[Ee]),Oe=E.useCallback(()=>{ue.current&&=(ue.current(),null)},[]);E.useEffect(()=>{we||(De(),Oe())},[we,De,Oe]),E.useEffect(()=>()=>{De(),Oe(),Te()},[De,Oe,Te]),E.useEffect(()=>{if(!we||!Ce||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ve(Ce.clientWidth)});return e.observe(Ce),()=>{e.disconnect()}},[we,Ce,a]),E.useEffect(()=>{c&&re&&he&&!ge&&(ve(a?null:Ce.clientWidth),oe.current.focus())},[he,a]),E.useEffect(()=>{i&&oe.current.focus()},[i]),E.useEffect(()=>{if(!h)return;let e=Ds(oe.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&oe.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let ke=Fl((e,t)=>{e||(De(),Oe()),e?(Te(),be(w_(t)),D&&D(t)):(be(null),S&&S(t)),ge||(ce.current=e,ve(a?null:Ce.clientWidth),ie(e))}),Ae=()=>{De(),le.current?(pe.start(Dv,()=>{L.current.allowUnselectedMouseUp=!0}),fe.start(Ev,()=>{L.current.allowSelectedMouseUp=!0})):fe.start(Ev,()=>{L.current.allowSelectedMouseUp=!0,L.current.allowUnselectedMouseUp=!0})},je=e=>{if(T?.(e),e.button!==0||(e.preventDefault(),!oe.current))return;oe.current.focus();let t=Ds(e.currentTarget);Ae(),Oe();let n=e=>{ue.current=null,oe.current&&(Nv(e,oe.current)||Nv(e,se.current)||(ce.current||!ge)&&ke(!1,e))};t.addEventListener(`mouseup`,n,{capture:!0,once:!0}),ue.current=()=>{t.removeEventListener(`mouseup`,n,!0)},ke(!0,e)},Me=e=>{ke(!1,e)},Ne=E.Children.toArray(o),Pe=e=>{let t=Ne.find(t=>t.props.value===e.target.value);t!==void 0&&(ne(t.props.value),b&&b(e,t))},Fe=(e,t,n)=>{if(ne(n),b){let r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,t)}},Ie=e=>t=>{de.current=!1;let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(I)?I.slice():[];let t=I.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),I!==n&&Fe(t,e,n),_||ke(!1,t)}},Le=(e,t)=>n=>{if(e.props.onMouseUp?.(n),de.current){de.current=!1;return}let r=!L.current.allowSelectedMouseUp&&t,i=!L.current.allowUnselectedMouseUp&&!t;r||i||n.currentTarget.click()},Re=e=>{let t=R.current,n=t.buffer!==``;if(we||_||u||e.defaultPrevented||e.nativeEvent?.isComposing||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey||e.key===kv&&!n)return!1;e.key===kv&&e.preventDefault();let r=t.buffer===``,{options:i,selectedIndex:a}=Cv(Ne,I);if(i.length===0)return e.key!==kv&&Te(),!0;r&&(t.previousSearchIndex=a);let o=e.key.toLowerCase();t.buffer===o&&Sv(i,o)&&(t.buffer=``,t.previousSearchIndex=t.matchedIndex),t.buffer+=o,me.start(Ov,Te);let s=xv(i,t.buffer,(t.previousSearchIndex??-1)+1);if(s!==-1){let n=i[s];return t.matchedIndex=s,E_(I,n.value)||Fe(e,n.child,n.value),!0}return e.key!==kv&&Te(),!0},ze=e=>{if(!k){let t=Re(e),n=e.key===kv||e.key===Av||e.key===jv||e.key===Mv;!t&&n&&(e.preventDefault(),ke(!0,e)),w?.(e)}},Be=e=>{Te(),!we&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:I,name:v}}),y(e))},Ve=e=>t=>{e?.props?.onKeyDown?.(t),t.key===kv&&t.target===t.currentTarget&&!t.defaultPrevented&&(t.preventDefault(),t.repeat||t.currentTarget.click())};delete te[`aria-invalid`];let He,Ue,We=[],Ge=!1,Ke=!1;(js({value:I})||d)&&(A?He=A(I):Ge=!0);let qe=Ne.map(e=>{if(!E.isValidElement(e))return null;let t;if(_){if(!Array.isArray(I))throw Error(x(2));t=I.some(t=>E_(t,e.props.value)),t&&Ge&&We.push(e.props.children)}else t=E_(I,e.props.value),t&&Ge&&(Ue=e.props.children);return t&&(Ke=!0),E.cloneElement(e,{"aria-selected":t?`true`:`false`,onMouseDown:t=>{de.current=!0,e.props.onMouseDown?.(t)},onPointerDown:t=>{de.current=!0,e.props.onPointerDown?.(t)},onClick:Ie(e),onMouseUp:Le(e,t),onKeyUp:t=>{t.key===kv&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},onKeyDown:Ve(e),role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Es(()=>{le.current=Ke,we||_||Ke||Te()},[Ke,_,we,Te]),Ge&&(He=_?We.length===0?null:We.reduce((e,t,n)=>(e.push(t),n<We.length-1&&e.push(`, `),e),[]):Ue);let Je=_e;!a&&ge&&he&&(Je=Ce.clientWidth);let Ye;Ye=N===void 0?u?null:0:N;let Xe=M.id||(v?`mui-component-select-${v}`:void 0),Ze={...e,variant:ee,value:I,open:we,error:f},Qe=Lv(Ze),$e=typeof g.slotProps?.paper==`function`?g.slotProps.paper(Ze):g.slotProps?.paper,et=Ts($e?.ref,se),tt=typeof g.slotProps?.list==`function`?g.slotProps.list(Ze):g.slotProps?.list,nt=zi(),rt=zi();return(0,V.jsxs)(E.Fragment,{children:[(0,V.jsx)(Pv,{as:`div`,ref:Se,tabIndex:Ye,role:`combobox`,"aria-controls":we?nt:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":we?`true`:`false`,"aria-haspopup":`listbox`,"aria-readonly":k?`true`:void 0,"aria-label":r,"aria-labelledby":h,"aria-describedby":n,"aria-required":j?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:ze,onMouseDown:u||k?null:je,onBlur:Be,onFocus:C,...M,ownerState:Ze,className:H(M.className,Qe.select,s),id:Xe,children:T_(He)?wv||=(0,V.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):He}),(0,V.jsx)(Iv,{"aria-invalid":f,value:Array.isArray(I)?I.join(`,`):I,name:v,ref:ae,"aria-hidden":!0,onChange:Pe,tabIndex:-1,disabled:u,readOnly:k,className:Qe.nativeInput,autoFocus:i,required:j,...te,id:te.id??rt,ownerState:Ze}),(0,V.jsx)(Fv,{as:p,className:Qe.icon,ownerState:Ze}),(0,V.jsx)(k_,{value:ye,children:(0,V.jsx)($_,{id:`menu-${v||``}`,anchorEl:Ce,open:we,onClose:Me,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:nt,...tt},paper:{...$e,ref:et,style:{minWidth:Je,...$e?.style}}},children:qe})})]})}),zv=e=>{let{classes:t}=e,n=W({root:[`root`]},og,t);return{...t,...n}},Bv={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>ns(e)&&e!==`variant`},Vv=K(Ng,Bv)(``),Hv=K(vv,Bv)(``),Uv=K(dg,Bv)(``),Wv=E.forwardRef(function(e,t){let n=q({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=em,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?lv:Rv,[D]=ws({props:n,states:[`variant`,`error`]}),O=D.variant||C,k={...n,variant:O,classes:a},j=zv(k),{root:M,...N}=j,P=d||{standard:(0,V.jsx)(Vv,{ownerState:k}),outlined:(0,V.jsx)(Hv,{label:p,ownerState:k}),filled:(0,V.jsx)(Uv,{ownerState:k})}[O],F=Ts(t,Np(P));return(0,V.jsx)(E.Fragment,{children:E.cloneElement(P,{inputComponent:T,inputProps:{children:i,error:D.error,IconComponent:l,variant:O,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?A(N,f.classes):N,...d?d.props.inputProps:{}},...(g&&_||c)&&O===`outlined`?{notched:!0}:{},ref:F,className:H(P.props.className,o,j.root),...!d&&{variant:O},...w})})});Wv.muiName=`Select`;function Gv(e={}){let{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:a}=e,o=Cu();E.useEffect(()=>{if(!i)return;function e(e){e.defaultPrevented||e.key===`Escape`&&r?.(e,`escapeKeyDown`)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[i,r]);let s=hs((e,t)=>{r?.(e,t)}),c=hs(e=>{r&&e!=null&&o.start(e,()=>{s(null,`timeout`)})});E.useEffect(()=>(i&&c(t),o.clear),[i,t,c,o]);let l=e=>{r?.(e,`clickaway`)},u=o.clear,d=E.useCallback(()=>{t!=null&&c(a??t*.5)},[t,a,c]),f=e=>t=>{let n=e.onBlur;n?.(t),d()},p=e=>t=>{let n=e.onFocus;n?.(t),u()},m=e=>t=>{let n=e.onMouseEnter;n?.(t),u()},h=e=>t=>{let n=e.onMouseLeave;n?.(t),d()};return E.useEffect(()=>{if(!n&&i)return window.addEventListener(`focus`,d),window.addEventListener(`blur`,u),()=>{window.removeEventListener(`focus`,d),window.removeEventListener(`blur`,u)}},[n,i,d,u]),{getRootProps:(t={})=>{let n={...ou(e),...ou(t)};return{role:`presentation`,...t,...n,onBlur:f(n),onFocus:p(n),onMouseEnter:m(n),onMouseLeave:h(n)}},onClickAway:l}}function Kv(e){return zr(`MuiSnackbarContent`,e)}U(`MuiSnackbarContent`,[`root`,`message`,`action`]);var qv=e=>{let{classes:t}=e;return W({root:[`root`],action:[`action`],message:[`message`]},Kv,t)},Jv=K(fu,{name:`MuiSnackbarContent`,slot:`Root`})(J(({theme:e})=>{let t=e.palette.mode===`light`?.8:.98;return{...e.focusVisible&&Za(`0 0 0 4px ${(e.vars||e).palette.background.default}`),...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(Si(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Si(e.palette.background.default,t),display:`flex`,alignItems:`center`,flexWrap:`wrap`,padding:`6px 16px`,flexGrow:1,[e.breakpoints.up(`sm`)]:{flexGrow:`initial`,minWidth:288}}})),Yv=K(`div`,{name:`MuiSnackbarContent`,slot:`Message`})({padding:`8px 0`}),Xv=K(`div`,{name:`MuiSnackbarContent`,slot:`Action`})({display:`flex`,alignItems:`center`,marginLeft:`auto`,paddingLeft:16,marginRight:-8}),Zv=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiSnackbarContent`}),{action:r,className:i,message:a,role:o=`alert`,...s}=n,c=n,l=qv(c);return(0,V.jsxs)(Jv,{role:o,elevation:6,className:H(l.root,i),ownerState:c,ref:t,...s,children:[(0,V.jsx)(Yv,{className:l.message,ownerState:c,children:a}),r?(0,V.jsx)(Xv,{className:l.action,ownerState:c,children:r}):null]})});function Qv(e){return zr(`MuiSnackbar`,e)}U(`MuiSnackbar`,[`root`,`anchorOriginTopCenter`,`anchorOriginBottomCenter`,`anchorOriginTopRight`,`anchorOriginBottomRight`,`anchorOriginTopLeft`,`anchorOriginBottomLeft`]);var $v=e=>{let{classes:t,anchorOrigin:n}=e;return W({root:[`root`,`anchorOrigin${Y(n.vertical)}${Y(n.horizontal)}`]},Qv,t)},ey=K(`div`,{name:`MuiSnackbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`anchorOrigin${Y(n.anchorOrigin.vertical)}${Y(n.anchorOrigin.horizontal)}`]]}})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:`fixed`,display:`flex`,left:8,right:8,justifyContent:`center`,alignItems:`center`,variants:[{props:({ownerState:e})=>e.anchorOrigin.vertical===`top`,style:{top:8,[e.breakpoints.up(`sm`)]:{top:24}}},{props:({ownerState:e})=>e.anchorOrigin.vertical!==`top`,style:{bottom:8,[e.breakpoints.up(`sm`)]:{bottom:24}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`left`,style:{justifyContent:`flex-start`,[e.breakpoints.up(`sm`)]:{left:24,right:`auto`}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`right`,style:{justifyContent:`flex-end`,[e.breakpoints.up(`sm`)]:{right:24,left:`auto`}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`center`,style:{[e.breakpoints.up(`sm`)]:{left:`50%`,right:`auto`,transform:`translateX(-50%)`}}}]}))),ty=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiSnackbar`}),r=$o(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:o,horizontal:s}={vertical:`bottom`,horizontal:`left`},autoHideDuration:c=null,children:l,className:u,disableWindowBlurListener:d=!1,message:f,onBlur:p,onClose:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,open:v,resumeHideDuration:y,slots:b={},slotProps:x={},transitionDuration:S=i,...C}=n,w={...n,anchorOrigin:{vertical:o,horizontal:s},autoHideDuration:c,disableWindowBlurListener:d,transitionDuration:S},T=$v(w),{getRootProps:D,onClickAway:O}=Gv(w),[k,A]=E.useState(!0),j={slots:b,slotProps:x},[M,N]=X(`root`,{ref:t,className:[T.root,u],elementType:ey,getSlotProps:D,externalForwardedProps:{...j,...C},ownerState:w}),[P,{ownerState:F,...ee}]=X(`clickAwayListener`,{elementType:Pm,externalForwardedProps:j,getSlotProps:e=>({onClickAway:(...t)=>{let n=t[0];e.onClickAway?.(...t),n?.defaultMuiPrevented||O(...t)}}),ownerState:w}),[te,I]=X(`content`,{elementType:Zv,shouldForwardComponentProp:!0,externalForwardedProps:j,additionalProps:{message:f,action:a},ownerState:w}),[ne,re]=X(`transition`,{elementType:Dg,externalForwardedProps:j,getSlotProps:e=>({onEnter:(...t)=>{e.onEnter?.(...t),A(!1)},onExited:(...t)=>{e.onExited?.(...t),A(!0)}}),additionalProps:{appear:!0,in:v,timeout:S,direction:o===`top`?`down`:`up`},ownerState:w});return!v&&k?null:(0,V.jsx)(P,{...ee,...b.clickAwayListener&&{ownerState:F},children:(0,V.jsx)(M,{...N,children:(0,V.jsx)(ne,{...re,children:l||(0,V.jsx)(te,{...I})})})})});function ny(e){return zr(`MuiTooltip`,e)}var ry=U(`MuiTooltip`,[`popper`,`popperInteractive`,`popperArrow`,`popperClose`,`tooltip`,`tooltipArrow`,`touch`,`tooltipPlacementLeft`,`tooltipPlacementRight`,`tooltipPlacementTop`,`tooltipPlacementBottom`,`arrow`]);function iy(e){return Math.round(e*1e5)/1e5}var ay=e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a,open:o}=e;return W({popper:[`popper`,!n&&`popperInteractive`,r&&`popperArrow`,!o&&`popperClose`],tooltip:[`tooltip`,r&&`tooltipArrow`,i&&`touch`,`tooltipPlacement${Y(a.split(`-`)[0])}`],arrow:[`arrow`]},ny,t)},oy=K(Gp,{name:`MuiTooltip`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:`none`,variants:[{props:({ownerState:e})=>e.open&&!e.disableInteractive,style:{pointerEvents:`auto`}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${ry.arrow}`]:{top:0,marginTop:`-0.71em`,"&::before":{transformOrigin:`0 100%`}},[`&[data-popper-placement*="top"] .${ry.arrow}`]:{bottom:0,marginBottom:`-0.71em`,"&::before":{transformOrigin:`100% 0`}},[`&[data-popper-placement*="right"] .${ry.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineStart:0,marginInlineStart:`-0.71em`,"&::before":{transformOrigin:`100% 100%`}},[`&[data-popper-placement*="left"] .${ry.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineEnd:0,marginInlineEnd:`-0.71em`,"&::before":{transformOrigin:`0 0`}}}}]}))),sy=K(`div`,{name:`MuiTooltip`,slot:`Tooltip`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Y(n.placement.split(`-`)[0])}`]]}})(J(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:`4px 8px`,fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:`break-word`,fontWeight:e.typography.fontWeightMedium,[`.${ry.popper}[data-popper-placement*="left"] &`]:{transformOrigin:`right center`,marginInlineEnd:`14px`},[`.${ry.popper}[data-popper-placement*="right"] &`]:{transformOrigin:`left center`,marginInlineStart:`14px`},[`.${ry.popper}[data-popper-placement*="top"] &`]:{transformOrigin:`center bottom`,marginBottom:`14px`},[`.${ry.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:`center top`,marginTop:`14px`},variants:[{props:({ownerState:e})=>e.arrow,style:{position:`relative`,marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:`8px 16px`,fontSize:e.typography.pxToRem(14),lineHeight:`${iy(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${ry.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:`24px`},[`.${ry.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:`24px`},[`.${ry.popper}[data-popper-placement*="top"] &`]:{marginBottom:`24px`},[`.${ry.popper}[data-popper-placement*="bottom"] &`]:{marginTop:`24px`}}}]}))),cy=K(`span`,{name:`MuiTooltip`,slot:`Arrow`})(J(({theme:e})=>({overflow:`hidden`,position:`absolute`,width:`1em`,height:`0.71em`,boxSizing:`border-box`,color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:`""`,margin:`auto`,display:`block`,width:`100%`,height:`100%`,backgroundColor:`currentColor`,transform:`rotate(45deg)`}}))),ly=!1,uy=new Su,dy={x:0,y:0};function fy(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var py=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTooltip`}),{arrow:r=!1,children:i,classes:a,describeChild:o=!1,disableFocusListener:s=!1,disableHoverListener:c=!1,disableInteractive:l=!1,disableTouchListener:u=!1,enterDelay:d=100,enterNextDelay:f=0,enterTouchDelay:p=700,followCursor:m=!1,id:h,leaveDelay:g=0,leaveTouchDelay:_=1500,onClose:v,onOpen:y,open:b,placement:x=`bottom`,slotProps:S={},slots:C={},title:w,...T}=n,D=E.isValidElement(i)?i:(0,V.jsx)(`span`,{children:i}),O=$o(),[k,A]=E.useState(),[j,M]=E.useState(null),N=E.useRef(!1),P=E.useRef(!1),F=l||m,ee=Cu(),te=Cu(),I=Cu(),ne=Cu(),[re,ie]=Pl({controlled:b,default:!1,name:`Tooltip`,state:`open`}),ae=re,{current:oe}=E.useRef(b!==void 0),se=Ml(h),ce=E.useRef(),le=Fl(()=>{ce.current!==void 0&&(document.body.style.WebkitUserSelect=ce.current,ce.current=void 0),ne.clear()});E.useEffect(()=>le,[le]);let ue=e=>{uy.clear(),ly=!0,ie(!0),y&&!ae&&y(e)},de=Fl(e=>{P.current=!1,uy.start(800+g,()=>{ly=!1}),ie(!1),v&&ae&&v(e),ee.start(O.transitions.duration.shortest,()=>{N.current=!1})}),L=e=>{N.current&&e.type!==`touchstart`||(k&&k.removeAttribute(`title`),te.clear(),I.clear(),d||ly&&f?te.start(ly?f:d,()=>{ue(e)}):ue(e))},R=e=>{if(k?.disabled&&!oe){if(ae&&!P.current)return;P.current=!0}else P.current=!1;L(e)},fe=e=>{(!k?.disabled||oe||P.current)&&L(e)},pe=e=>{te.clear(),I.start(g,()=>{de(e)})},[,me]=E.useState(!1),he=e=>{let t=e?.target??k;if(!t||t.disabled||!pu(t)){me(!1);let n=e??new Event(`blur`);!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),pe(n)}},z=e=>{if(k||A(e.currentTarget),P.current=!1,pu(e.target)){let t=e=>{e.target.disabled&&he(e),e.target.removeEventListener(`blur`,t)};e.target.addEventListener(`blur`,t),me(!0),L(e)}},ge=e=>{N.current=!0;let t=D.props;t.onTouchStart&&t.onTouchStart(e)},_e=e=>{ge(e),I.clear(),ee.clear(),le(),ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect=`none`,ne.start(p,()=>{document.body.style.WebkitUserSelect=ce.current,R(e)})},ve=e=>{D.props.onTouchEnd&&D.props.onTouchEnd(e),le(),I.start(_,()=>{de(e)})};E.useEffect(()=>{if(!ae)return;function e(e){e.key===`Escape`&&de(e)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[de,ae]);let ye=Ts(Np(D),A,t);!w&&w!==0&&(ae=!1);let be=E.useRef(),xe=e=>{let t=D.props;t.onMouseMove&&t.onMouseMove(e),dy={x:e.clientX,y:e.clientY},be.current&&be.current.update()},Se={},Ce=typeof w==`string`;o?(Se.title=!ae&&Ce&&!c?w:null,Se[`aria-describedby`]=ae?se:null):(Se[`aria-label`]=Ce?w:null,Se[`aria-labelledby`]=ae&&!Ce?se:null);let we={...Se,...T,...D.props,className:H(T.className,D.props.className),onTouchStart:ge,ref:ye,...m?{onMouseMove:xe}:{}},Te={};u||(we.onTouchStart=_e,we.onTouchEnd=ve),c||(we.onMouseOver=fy(R,we.onMouseOver),we.onMouseLeave=fy(pe,we.onMouseLeave),F||(Te.onMouseOver=fe,Te.onMouseLeave=pe)),s||(we.onFocus=fy(z,we.onFocus),we.onBlur=fy(he,we.onBlur),F||(Te.onFocus=z,Te.onBlur=he));let Ee={...n,arrow:r,disableInteractive:F,open:ae,placement:x,touch:N.current},De=typeof S.popper==`function`?S.popper(Ee):S.popper,Oe=E.useMemo(()=>{let e=[{name:`arrow`,enabled:!!j,options:{element:j,padding:4}}];return De?.popperOptions?.modifiers&&(e=e.concat(De.popperOptions.modifiers)),{...De?.popperOptions,modifiers:e}},[j,De?.popperOptions]),ke=ay(Ee),Ae={slots:C,slotProps:{arrow:S.arrow,popper:De,tooltip:S.tooltip,transition:S.transition}},[je,Me]=X(`popper`,{elementType:oy,externalForwardedProps:Ae,ownerState:Ee,className:ke.popper}),[Ne,Pe]=X(`transition`,{elementType:Dg,externalForwardedProps:Ae,ownerState:Ee}),[Fe,Ie]=X(`tooltip`,{elementType:sy,className:ke.tooltip,externalForwardedProps:Ae,ownerState:Ee}),[Le,Re]=X(`arrow`,{elementType:cy,className:ke.arrow,externalForwardedProps:Ae,ownerState:Ee,ref:M});return(0,V.jsxs)(E.Fragment,{children:[E.cloneElement(D,we),(0,V.jsx)(je,{as:Gp,placement:x,anchorEl:m?{getBoundingClientRect:()=>({top:dy.y,left:dy.x,right:dy.x,bottom:dy.y,width:0,height:0})}:k,popperRef:be,open:k?ae:!1,id:se,transition:!0,...Te,...Me,popperOptions:Oe,children:({TransitionProps:e})=>(0,V.jsx)(Ne,{timeout:O.transitions.duration.shorter,...e,...Pe,children:(0,V.jsxs)(Fe,{...Ie,children:[w,r?(0,V.jsx)(Le,{...Re}):null]})})})]})}),my=Sa({createStyledComponent:K(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>q({props:e,name:`MuiStack`})});function hy(e){return zr(`MuiTab`,e)}var gy=U(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),_y=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return W({root:[`root`,a&&o&&`labelIcon`,`textColor${Y(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]},hy,t)},vy=K(Uu,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Y(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${gy.icon}`]:t.icon}]}})(J(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,...e.focusVisible&&Qa(3),variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${gy.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${gy.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${gy.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${gy.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${gy.selected}`]:{opacity:1},...e.focusVisible&&{[`&.${Bu.focusVisible}`]:{opacity:1}},[`&.${gy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${gy.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${gy.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${gy.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${gy.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),yy=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b=e_(),x=a_({id:_,ref:t,disabled:i,selected:m}),S=b.getItemMap().size===0&&m?0:x.tabIndex,C={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},w=_y(C),T=s&&u&&E.isValidElement(s)?E.cloneElement(s,{className:H(w.icon,s.props.className)}):s;return(0,V.jsxs)(vy,{internalNativeButton:!0,focusRipple:!a,className:H(w.root,r),ref:x.ref,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},tabIndex:S,ownerState:C,...y,children:[c===`top`||c===`start`?(0,V.jsxs)(E.Fragment,{children:[T,u]}):(0,V.jsxs)(E.Fragment,{children:[u,T]}),l]})});function by(e){return zr(`MuiToolbar`,e)}U(`MuiToolbar`,[`root`,`gutters`,`regular`,`dense`]);var xy=e=>{let{classes:t,disableGutters:n,variant:r}=e;return W({root:[`root`,!n&&`gutters`,r]},by,t)},Sy=K(`div`,{name:`MuiToolbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(J(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up(`sm`)]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:`dense`},style:{minHeight:48}},{props:{variant:`regular`},style:e.mixins.toolbar}]}))),Cy=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiToolbar`}),{className:r,component:i=`div`,disableGutters:a=!1,variant:o=`regular`,...s}=n,c={...n,component:i,disableGutters:a,variant:o},l=xy(c);return(0,V.jsx)(Sy,{as:i,className:H(l.root,r),ref:t,ownerState:c,...s})}),wy=Dl((0,V.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),Ty=Dl((0,V.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function Ey(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Dy(e,t,n,r={},i=()=>{}){let{ease:a=Ey,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);t[e]=a(u)*(n-c)+c,requestAnimationFrame(u>=1?()=>{i(null)}:d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var Oy={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function ky(e){let{onChange:t,...n}=e,r=E.useRef(),i=E.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Es(()=>{let e=Ol(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=Al(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),E.useEffect(()=>{a(),t(r.current)},[t]),(0,V.jsx)(`div`,{style:Oy,...n,ref:i})}function Ay(e){return zr(`MuiTabScrollButton`,e)}var jy=U(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),My=e=>{let{classes:t,orientation:n,disabled:r}=e;return W({root:[`root`,n,r&&`disabled`]},Ay,t)},Ny=K(Uu,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${jy.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),Py=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,{nativeButton:u,...d}=l,f=ji(),p={isRtl:f,...n},m=My(p),h=i.StartScrollButtonIcon??wy,g=i.EndScrollButtonIcon??Ty,_=Mp({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p}),v=Mp({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p});return(0,V.jsx)(Ny,{component:`div`,className:H(m.root,r),ref:t,role:null,ownerState:p,tabIndex:null,...d,style:{...d.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:o===`left`?(0,V.jsx)(h,{..._}):(0,V.jsx)(g,{...v})})});function Fy(e){return zr(`MuiTabs`,e)}var Iy=U(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Ly=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return W({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},Fy,c)},Ry=K(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Iy.scrollButtons}`]:t.scrollButtons},{[`& .${Iy.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(J(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Iy.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),zy=K(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),By=K(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),Vy=K(`span`,{name:`MuiTabs`,slot:`Indicator`})(J(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,...Zs(e),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),Hy=K(ky)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),Uy={};function Wy(e,t){let n=parseFloat(e);return Number.isNaN(n)?0:e.endsWith(`%`)?n/100*t:n}var Gy=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTabs`}),r=$o(),i=ji(),a=ru(r.motion.reducedMotion,!1),{"aria-label":o,"aria-labelledby":s,action:c,centered:l=!1,children:u,className:d,component:f=`div`,allowScrollButtonsMobile:p=!1,indicatorColor:m=`primary`,onChange:h,orientation:g=`horizontal`,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},textColor:x=`primary`,value:S,variant:C=`standard`,visibleScrollbar:w=!1,...T}=n,D=C===`scrollable`,O=g===`vertical`,k=O?`scrollTop`:`scrollLeft`,A=O?`top`:`left`,j=O?`bottom`:`right`,M=O?`clientHeight`:`clientWidth`,N=O?`height`:`width`,P={...n,component:f,allowScrollButtonsMobile:p,indicatorColor:m,orientation:g,vertical:O,scrollButtons:_,textColor:x,variant:C,visibleScrollbar:w,fixed:!D,hideScrollbar:D&&!w,scrollableX:D&&!O,scrollableY:D&&O,centered:l&&!D,scrollButtonsHideMobile:!p},F=Ly(P),ee=Mp({elementType:y.startScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:P}),te=Mp({elementType:y.endScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:P}),[I,ne]=E.useState(Uy),[re,ie]=E.useState(!1),[ae,oe]=E.useState(!1),[se,ce]=E.useState(!1),le=S===!1?null:S,[ue,de]=E.useState(!1),[L,R]=E.useState({overflow:`hidden`,scrollbarWidth:0}),fe=new Map,pe=E.useRef(null),me=E.useRef(null),he=I!==Uy,z={slots:y,slotProps:b},ge=()=>{let e=pe.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,clientHeight:e.clientHeight,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&S!==!1){let e=me.current.children;if(e.length>0){let t=e[fe.get(S)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},_e=Fl(()=>{let{tabsMeta:e,tabMeta:t}=ge(),n=0,r;O?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[N]:t?t[N]:0};if(typeof I[r]!=`number`||typeof I[N]!=`number`)ne(a);else{let e=Math.abs(I[r]-a[r]),t=Math.abs(I[N]-a[N]);(e>=1||t>=1)&&ne(a)}}),ve=(e,{animation:t=!0}={})=>{t&&!a.shouldReduceMotion?Dy(k,pe.current,e,{duration:r.transitions.duration.standard}):pe.current[k]=e},ye=e=>{let t=pe.current[k];t+=O?e:e*(i?-1:1),ve(t)},be=()=>{let e=pe.current[M],t=0,n=Array.from(me.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[M]>e){r===0&&(t=e);break}t+=i[M]}return t},xe=()=>{ye(-1*be())},Se=()=>{ye(be())},[Ce,{onChange:we,...Te}]=X(`scrollbar`,{className:H(F.scrollableX,F.hideScrollbar),elementType:Hy,shouldForwardComponentProp:!0,externalForwardedProps:z,ownerState:P}),Ee=E.useCallback(e=>{we?.(e),R({overflow:null,scrollbarWidth:e})},[we]),[De,Oe]=X(`scrollButtons`,{className:F.scrollButtons,elementType:Py,externalForwardedProps:z,ownerState:P,additionalProps:{orientation:g,slots:{StartScrollButtonIcon:y.startScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon},slotProps:{startScrollButtonIcon:ee,endScrollButtonIcon:te}}}),ke=()=>{let e={};e.scrollbarSizeListener=D?(0,V.jsx)(Ce,{...Te,onChange:Ee}):null;let t=D&&(_===`auto`&&(re||ae)||_===!0);return e.scrollButtonStart=t?(0,V.jsx)(De,{direction:i?`right`:`left`,onClick:xe,disabled:!re,...Oe}):null,e.scrollButtonEnd=t?(0,V.jsx)(De,{direction:i?`left`:`right`,onClick:Se,disabled:!ae,...Oe}):null,e},Ae=Fl(e=>{let{tabsMeta:t,tabMeta:n}=ge();if(!n||!t)return;let r=Al(pe.current).getComputedStyle(pe.current),i=O?t.clientHeight:t.clientWidth,a=Wy(r[O?`scrollPaddingTop`:`scrollPaddingLeft`],i),o=Wy(r[O?`scrollPaddingBottom`:`scrollPaddingRight`],i),s=t[A]+a,c=t[j]-o,l=t[k]+(n[A]-s);n[A]<s?ve(l,{animation:e}):n[j]>c&&(n[j]-n[A]>c-s?ve(l,{animation:e}):ve(t[k]+(n[j]-c),{animation:e}))}),je=Fl(()=>{D&&_!==!1&&ce(!se)});E.useEffect(()=>{let e=Ol(()=>{pe.current&&_e()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),je()},r=Al(pe.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(me.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(me.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[_e,je]),E.useEffect(()=>{let e=Array.from(me.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&D&&_!==!1){let n=e[0],r=e[t-1],i={root:pe.current,threshold:.99},a=new IntersectionObserver(e=>{ie(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{oe(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[D,_,se,u?.length]),E.useEffect(()=>{_e()}),E.useEffect(()=>{Ae(Uy!==I)},[Ae,I]),E.useEffect(()=>{if(typeof ResizeObserver>`u`||!D||_!==`auto`)return;let e=new ResizeObserver(()=>{Ae(!1)});return e.observe(pe.current),()=>{e.disconnect()}},[D,_,Ae]),E.useImperativeHandle(c,()=>({updateIndicator:_e,updateScrollButtons:je}),[_e,je]);let[Me,Ne]=X(`indicator`,{className:F.indicator,elementType:Vy,externalForwardedProps:z,ownerState:P,additionalProps:{style:I}}),Pe=(0,V.jsx)(Me,{...Ne}),Fe=i_({activeItemId:ue?void 0:le,orientation:g,isRtl:i}),Ie=Fe.getContainerProps(),Le=E.Children.toArray(u).filter(E.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return fe.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===S;return E.cloneElement(e,{fullWidth:C===`fullWidth`,indicator:n&&!he&&Pe,selected:n,selectionFollowsFocus:v,onChange:h,textColor:x,value:t})}),Re=ke(),[ze,Be]=X(`root`,{ref:t,className:H(F.root,d),elementType:Ry,externalForwardedProps:{...z,...T,component:f},ownerState:P}),[Ve,He]=X(`scroller`,{ref:pe,className:F.scroller,elementType:zy,externalForwardedProps:z,ownerState:P,additionalProps:{style:{overflow:L.overflow,[O?`margin${i?`Left`:`Right`}`:`marginBottom`]:w?void 0:-L.scrollbarWidth}}}),Ue=Ts(Ie.ref,me),We=e=>{let t=me.current;ks(Ds(t))?.getAttribute(`role`)===`tab`&&Ie.onKeyDown(e)},[Ge,Ke]=X(`list`,{ref:Ue,className:F.list,elementType:By,externalForwardedProps:z,ownerState:P,getSlotProps:e=>({...e,onBlur:t=>{Gm(t.currentTarget,t.relatedTarget)||de(!1),e.onBlur?.(t)},onKeyDown:t=>{We(t),e.onKeyDown?.(t)},onFocus:t=>{de(!0),Ie.onFocus(t),e.onFocus?.(t)}})});return(0,V.jsxs)(ze,{...Be,children:[Re.scrollButtonStart,Re.scrollbarSizeListener,(0,V.jsxs)(Ve,{...He,children:[(0,V.jsx)(Ge,{"aria-label":o,"aria-labelledby":s,"aria-orientation":g===`vertical`?`vertical`:null,role:`tablist`,...Ke,children:(0,V.jsx)($g.Provider,{value:Fe,children:Le})}),he&&Pe]}),Re.scrollButtonEnd]})});function Ky(e){return zr(`MuiTextField`,e)}U(`MuiTextField`,[`root`]);var qy={standard:Ng,filled:dg,outlined:vv},Jy=e=>{let{classes:t}=e;return W({root:[`root`]},Ky,t)},Yy=K(hg,{name:`MuiTextField`,slot:`Root`})({}),Xy=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,fullWidth:d=!1,helperText:f,id:p,inputRef:m,label:h,maxRows:g,minRows:_,multiline:v=!1,name:y,onBlur:b,onChange:x,onFocus:S,placeholder:C,required:w=!1,rows:T,select:E=!1,slots:D={},slotProps:O={},type:k,value:A,variant:j=`outlined`,...M}=n,N={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:d,multiline:v,required:w,select:E,variant:j},P=Jy(N),F=zi(p),ee=f&&F?`${F}-helper-text`:void 0,te=h&&F?`${F}-label`:void 0,I=qy[j],ne={slots:D,slotProps:O},[re,ie]=X(`select`,{elementType:Wv,externalForwardedProps:ne,ownerState:N}),ae=E&&ie.native,[oe,se]=X(`inputLabel`,{elementType:Lg,externalForwardedProps:ne,ownerState:N}),ce={};j===`outlined`&&(se.shrink!==void 0&&(ce.notched=se.shrink),ce.label=h),E&&(ae||(ce.id=void 0),ce[`aria-describedby`]=void 0);let[le,ue]=X(`root`,{elementType:Yy,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,...M},ownerState:N,className:H(P.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:d,required:w,color:s,variant:j}}),[de,L]=X(`input`,{elementType:I,externalForwardedProps:ne,additionalProps:ce,ownerState:N}),[R,fe]=X(`htmlInput`,{elementType:`input`,externalForwardedProps:ne,ownerState:N}),[pe,me]=X(`formHelperText`,{elementType:yg,externalForwardedProps:ne,ownerState:N}),he=(0,V.jsx)(de,{"aria-describedby":ee,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:d,multiline:v,name:y,rows:T,maxRows:g,minRows:_,type:k,value:A,id:F,inputRef:m,onBlur:b,onChange:x,onFocus:S,placeholder:C,inputProps:fe,slots:{input:D.htmlInput?R:void 0},...L});return(0,V.jsxs)(le,{...ue,children:[h!=null&&h!==``&&(0,V.jsx)(oe,{htmlFor:E&&!ae?void 0:F,id:te,...E&&!ae&&{component:`div`},...se,children:h}),E?(0,V.jsx)(re,{"aria-describedby":ee,id:F,labelId:te,value:A,input:he,...ie,children:a}):he,f&&(0,V.jsx)(pe,{id:ee,...me,children:f})]})}),Zy=ai({themeId:Qo}),Qy=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9IkxvYWRpbmciPgogIDwhLS0gVGhlIFNlcmlvdXMgR2FtaW5nIGxvYWRlcjogdGhlIGljb24ncyBvd24gYmFyIGZpbGxzIGZyb20gdGhlIGxlZnQsIGhvbGRzLAogICAgICAgZHJhaW5zIHRvIHRoZSByaWdodCBhbmQgcmVzdHMsIGV2ZXJ5IDEwMCBmcmFtZXMgYXQgNjBmcHMsIGFzIHRoZSBsb2dvcwogICAgICAgcmVwb3NpdG9yeSdzIG1ha2VfbG9nby5weSBidWlsZHMgaXQgZm9yIExvdHRpZS4gLS0+CiAgPHN0eWxlPgogICAgLmZpbGwgewogICAgICB0cmFuc2Zvcm0tYm94OiBmaWxsLWJveDsKICAgICAgdHJhbnNmb3JtLW9yaWdpbjogMCA1MCU7CiAgICAgIGFuaW1hdGlvbjogc2ctbG9hZCAxLjY2N3MgaW5maW5pdGU7CiAgICB9CiAgICBAa2V5ZnJhbWVzIHNnLWxvYWQgewogICAgICAwJSB7IHRyYW5zZm9ybTogdHJhbnNsYXRlWCgwKSBzY2FsZVgoMCk7IGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjY1LCAwLCAwLjM1LCAxKTsgfQogICAgICA0MCUgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMCkgc2NhbGVYKDEpOyB9CiAgICAgIDUwJSB7IHRyYW5zZm9ybTogdHJhbnNsYXRlWCgwKSBzY2FsZVgoMSk7IGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjY1LCAwLCAwLjM1LCAxKTsgfQogICAgICA5MCUsIDEwMCUgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMTAwJSkgc2NhbGVYKDApOyB9CiAgICB9CiAgICBAbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkgewogICAgICAuZmlsbCB7IGFuaW1hdGlvbjogbm9uZTsgdHJhbnNmb3JtOiBzY2FsZVgoMC44MTQ0KTsgfQogICAgfQogIDwvc3R5bGU+CiAgPHBhdGggZmlsbD0iI2ZmZmZmZiIgZD0iTTEzNC45NywzOS40M3Y0MC4xSDYwLjkydjE3LjM4aDM5LjAzYzEyLjAzLDAsMjIuMTksNC4yOCwzMC40OCwxMi41NnMxMi41NiwxOC4xOCwxMi41NiwzMC4yMXYxNy4zOGMwLDEyLjAzLTQuMjgsMjIuMTktMTIuNTYsMzAuNDgtOC4yOSw4LjI5LTE4LjE4LDEyLjMtMzAuMjEsMTIuM0gyMC44MnYtNDAuMWg3OS40di0yMC4wNWgtMzkuMDNjLTEyLjAzLDAtMjIuMTktNC4wMS0zMC43NC0xMi4zLTguMjktOC4yOS0xMi41Ni0xOC40NS0xMi41Ni0zMC4yMXYtMTQuN2MwLTEyLjAzLDQuMjgtMjIuMTksMTIuNTYtMzAuNDgsOC4yOS04LjI5LDE4LjQ1LTEyLjU2LDMwLjQ3LTEyLjU2aDc0LjA1WiIvPgogIDxwYXRoIGZpbGw9IiNmZmZmZmYiIGQ9Ik0yNzYuODIsMzkuNDN2NDIuNzdoLTc0Ljg1djc0Ljg1aDM3LjQydi0xNy4zOGgtMjEuMTJ2LTMxLjgxaDYzLjg5djQ5LjE5YzAsMTIuMDMtNC4yOCwyMi4xOS0xMi41NiwzMC40Ny04LjI5LDguMjktMTguMTgsMTIuMy0zMC4yMSwxMi4zaC0zNy4xNmMtMTIuMDMsMC0yMi4xOS00LjI4LTMwLjQ3LTEyLjU2LTguMjktOC4yOS0xMi41Ni0xOC40NS0xMi41Ni0zMC40OHYtNzQuNThjMC0xMi4wMyw0LjAxLTIxLjkyLDEyLjMtMzAuMjEsOC4yOS04LjI5LDE4LjQ1LTEyLjU2LDMwLjQ3LTEyLjU2aDc0Ljg1WiIvPgogIDxyZWN0IGNsYXNzPSJmaWxsIiBmaWxsPSIjNmIwMGZmIiB4PSIyMS4xOSIgeT0iMjIxLjgiIHdpZHRoPSIyNTcuNjYiIGhlaWdodD0iMzUuODciLz4KICA8cGF0aCBmaWxsPSIjZmZmZmZmIiBkPSJNMjczLjE2LDIyOC4yNHYyMy4zMkgyNi44OHYtMjMuMzJoMjQ2LjI4Wk0yODIuMTYsMjE5LjI0SDE3Ljg4djQxLjMyaDI2NC4yOHYtNDEuMzJoMFoiLz4KPC9zdmc+Cg==`,$y=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9IkxvYWRpbmciPgogIDwhLS0gVGhlIFNlcmlvdXMgR2FtaW5nIGxvYWRlcjogdGhlIGljb24ncyBvd24gYmFyIGZpbGxzIGZyb20gdGhlIGxlZnQsIGhvbGRzLAogICAgICAgZHJhaW5zIHRvIHRoZSByaWdodCBhbmQgcmVzdHMsIGV2ZXJ5IDEwMCBmcmFtZXMgYXQgNjBmcHMsIGFzIHRoZSBsb2dvcwogICAgICAgcmVwb3NpdG9yeSdzIG1ha2VfbG9nby5weSBidWlsZHMgaXQgZm9yIExvdHRpZS4gLS0+CiAgPHN0eWxlPgogICAgLmZpbGwgewogICAgICB0cmFuc2Zvcm0tYm94OiBmaWxsLWJveDsKICAgICAgdHJhbnNmb3JtLW9yaWdpbjogMCA1MCU7CiAgICAgIGFuaW1hdGlvbjogc2ctbG9hZCAxLjY2N3MgaW5maW5pdGU7CiAgICB9CiAgICBAa2V5ZnJhbWVzIHNnLWxvYWQgewogICAgICAwJSB7IHRyYW5zZm9ybTogdHJhbnNsYXRlWCgwKSBzY2FsZVgoMCk7IGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjY1LCAwLCAwLjM1LCAxKTsgfQogICAgICA0MCUgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMCkgc2NhbGVYKDEpOyB9CiAgICAgIDUwJSB7IHRyYW5zZm9ybTogdHJhbnNsYXRlWCgwKSBzY2FsZVgoMSk7IGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjY1LCAwLCAwLjM1LCAxKTsgfQogICAgICA5MCUsIDEwMCUgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMTAwJSkgc2NhbGVYKDApOyB9CiAgICB9CiAgICBAbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkgewogICAgICAuZmlsbCB7IGFuaW1hdGlvbjogbm9uZTsgdHJhbnNmb3JtOiBzY2FsZVgoMC44MTQ0KTsgfQogICAgfQogIDwvc3R5bGU+CiAgPHBhdGggZmlsbD0iIzQxNDA0MiIgZD0iTTEzNC45NywzOS40M3Y0MC4xSDYwLjkydjE3LjM4aDM5LjAzYzEyLjAzLDAsMjIuMTksNC4yOCwzMC40OCwxMi41NnMxMi41NiwxOC4xOCwxMi41NiwzMC4yMXYxNy4zOGMwLDEyLjAzLTQuMjgsMjIuMTktMTIuNTYsMzAuNDgtOC4yOSw4LjI5LTE4LjE4LDEyLjMtMzAuMjEsMTIuM0gyMC44MnYtNDAuMWg3OS40di0yMC4wNWgtMzkuMDNjLTEyLjAzLDAtMjIuMTktNC4wMS0zMC43NC0xMi4zLTguMjktOC4yOS0xMi41Ni0xOC40NS0xMi41Ni0zMC4yMXYtMTQuN2MwLTEyLjAzLDQuMjgtMjIuMTksMTIuNTYtMzAuNDgsOC4yOS04LjI5LDE4LjQ1LTEyLjU2LDMwLjQ3LTEyLjU2aDc0LjA1WiIvPgogIDxwYXRoIGZpbGw9IiM0MTQwNDIiIGQ9Ik0yNzYuODIsMzkuNDN2NDIuNzdoLTc0Ljg1djc0Ljg1aDM3LjQydi0xNy4zOGgtMjEuMTJ2LTMxLjgxaDYzLjg5djQ5LjE5YzAsMTIuMDMtNC4yOCwyMi4xOS0xMi41NiwzMC40Ny04LjI5LDguMjktMTguMTgsMTIuMy0zMC4yMSwxMi4zaC0zNy4xNmMtMTIuMDMsMC0yMi4xOS00LjI4LTMwLjQ3LTEyLjU2LTguMjktOC4yOS0xMi41Ni0xOC40NS0xMi41Ni0zMC40OHYtNzQuNThjMC0xMi4wMyw0LjAxLTIxLjkyLDEyLjMtMzAuMjEsOC4yOS04LjI5LDE4LjQ1LTEyLjU2LDMwLjQ3LTEyLjU2aDc0Ljg1WiIvPgogIDxyZWN0IGNsYXNzPSJmaWxsIiBmaWxsPSIjNmIwMGZmIiB4PSIyMS4xOSIgeT0iMjIxLjgiIHdpZHRoPSIyNTcuNjYiIGhlaWdodD0iMzUuODciLz4KICA8cGF0aCBmaWxsPSIjNDE0MDQyIiBkPSJNMjczLjE2LDIyOC4yNHYyMy4zMkgyNi44OHYtMjMuMzJoMjQ2LjI4Wk0yODIuMTYsMjE5LjI0SDE3Ljg4djQxLjMyaDI2NC4yOHYtNDEuMzJoMFoiLz4KPC9zdmc+Cg==`,eb=[`conflict`,`denied`,`llm-failure`,`hook-throw`,`endpoint-timeout`,`tick-failure`],tb=Dl((0,V.jsx)(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z`}),`BugReport`),nb=Dl((0,V.jsx)(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),rb=Dl((0,V.jsx)(`path`,{d:`M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z`}),`OpenInNew`),ib=`embed-scheme`,ab=`embed-brand`;function ob(e){return e===`light`||e===`dark`||e===`system`}function sb(e){try{return window[e]}catch{return null}}function cb(e,t){try{return e?.getItem(t)??null}catch{return null}}function lb(e,t,n){try{n===null?e?.removeItem(t):e?.setItem(t,n)}catch{}}function ub(e,t,n){let r=new URLSearchParams(e).get(`scheme`);if(ob(r))return lb(t,ib,r),r;let i=cb(t,ib);if(ob(i))return i;let a=cb(n,`theme`);return ob(a)?a:`light`}function db(e,t){lb(e,ib,t)}function fb(e,t,n){lb(e,ib,null),lb(t,`theme`,n)}function pb(e){if(typeof e!=`object`||!e)return null;let{type:t,scheme:n}=e;return t===`sg-dev-scheme`&&ob(n)?n:null}function mb(e,t){let n=new URLSearchParams(e).get(`brand`);return n?(lb(t,ab,n),n):cb(t,ab)}function hb(e){lb(e,ab,null)}var gb=`brand`,_b=(0,E.createContext)({brands:[],selected:void 0,select:()=>{}});function vb(){try{let e=localStorage.getItem(gb);return e?JSON.parse(e):null}catch{return null}}function yb(e){try{localStorage.setItem(gb,JSON.stringify(e))}catch{}}function bb(e,t,n=null){let r=e[0]?.id;if(r)return n&&e.some(e=>e.id===n)?n:t&&t.first===r&&e.some(e=>e.id===t.id)?t.id:r}function xb({children:e}){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)(void 0);(0,E.useEffect)(()=>{let e=!1;return fetch(Gc(`/api/brands`,location.search)).then(e=>e.ok?e.json():{brands:[]}).catch(()=>({brands:[]})).then(t=>{if(e)return;let r=t.brands??[];n(r),i(bb(r,vb(),mb(location.search,sb(`sessionStorage`))))}),()=>{e=!0}},[]);let a=(0,E.useCallback)(e=>{i(e),hb(sb(`sessionStorage`));let n=t?.[0]?.id;n&&yb({id:e,first:n})},[t]);if(t===null)return null;let o=t.find(e=>e.id===r);return(0,V.jsx)(_b.Provider,{value:{brands:t,selected:o,select:a},children:e})}function Sb(){return(0,E.useContext)(_b)}var Cb=`loadingHold`,wb=new Set([`setTheme`,`themePreferenceChanged`]);function Tb(e,t){return t===`surface`?e.filter(e=>wb.has(e.type)):e}var Eb=(0,E.createContext)({hold:`none`,setHold:()=>{}});function Db(){try{let e=sessionStorage.getItem(Cb);return e===`host`||e===`surface`?e:`none`}catch{return`none`}}function Ob({children:e}){let[t,n]=(0,E.useState)(Db),r=(0,E.useCallback)(e=>{n(e);try{sessionStorage.setItem(Cb,e)}catch{}},[]);return(0,V.jsx)(Eb.Provider,{value:{hold:t,setHold:r},children:e})}function kb(){return(0,E.useContext)(Eb)}var Ab=`min(70vh, 420px)`;function jb(e){let{state:t,connected:n,transients:r}=e,[i,a]=(0,E.useState)(!1),[o,s]=(0,E.useState)(0),[c,l]=(0,E.useState)(Gb),[u,d]=(0,E.useState)(null),f=(0,E.useCallback)(e=>{l(e);try{localStorage.setItem(Ub,e)}catch{}},[]);return(0,E.useEffect)(()=>{let e=e=>{if(e.key!=="`"||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;t&&/^(INPUT|TEXTAREA)$/.test(t.tagName)||(e.preventDefault(),a(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Kb,{open:i,connected:n,corner:c,processing:r.processing.size>0,errors:r.errors.length,onToggle:()=>a(e=>!e)}),(0,V.jsx)(eg,{anchor:`bottom`,open:i,onClose:()=>a(!1),slotProps:{paper:{sx:{height:Ab,maxHeight:`85vh`}}},children:(0,V.jsxs)(lm,{"data-testid":`dev-drawer`,sx:{display:`contents`},children:[(0,V.jsxs)(my,{direction:`row`,sx:{alignItems:`center`,pr:1},children:[(0,V.jsxs)(Gy,{value:o,onChange:(e,t)=>s(t),variant:`scrollable`,scrollButtons:`auto`,allowScrollButtonsMobile:!0,sx:{flex:1,minWidth:0},children:[(0,V.jsx)(yy,{label:`Session`}),(0,V.jsx)(yy,{label:`Scenario`}),(0,V.jsx)(yy,{label:`Surfaces`}),(0,V.jsx)(yy,{label:`State`}),(0,V.jsx)(yy,{label:`Faults`}),r.errors.length>0&&(0,V.jsx)(yy,{label:`Errors (${r.errors.length})`})]}),(0,V.jsx)(pd,{size:`small`,"aria-label":`Close dev tools`,"data-testid":`dev-drawer-close`,onClick:()=>a(!1),children:(0,V.jsx)(nb,{fontSize:`small`})})]}),(0,V.jsx)(Lh,{}),u&&(0,V.jsx)(Td,{severity:`warning`,square:!0,"data-testid":`drawer-refusal`,onClose:()=>d(null),sx:{borderRadius:0},children:u}),(0,V.jsxs)(lm,{sx:{p:2,overflow:`auto`,flex:1},children:[o===0&&(0,V.jsx)(qb,{...e,corner:c,onMove:f,onRefusal:d}),o===1&&(0,V.jsx)(Jb,{...e}),o===2&&(0,V.jsx)(Qb,{state:t,inSetup:e.inSetup,configurable:e.configurable}),o===3&&(0,V.jsx)(tx,{state:t}),o===4&&(0,V.jsx)(nx,{...e,onRefusal:d}),o===5&&(0,V.jsx)(rx,{errors:r.errors})]})]})})]})}var Mb={size:`small`,sx:{minHeight:36,px:1.25}},Nb={...Mb,variant:`contained`},Pb={...Mb,variant:`outlined`},Fb={...Mb,color:`warning`},Ib={...Mb,color:`error`};function Lb({on:e,onClick:t,children:n,...r}){return(0,V.jsx)(xm,{...Mb,...r,onClick:t,sx:{...Mb.sx,color:e?`text.primary`:`text.secondary`},startIcon:(0,V.jsx)(lm,{sx:{width:8,height:8,borderRadius:`50%`,bgcolor:e?`text.primary`:`transparent`,border:1,borderColor:e?`text.primary`:`divider`}}),children:n})}var Rb=6e4;function zb({paused:e,scheduled:t,teamIndex:n,run:r}){let i=n===void 0?{}:{teamIndex:n};return(0,V.jsxs)(my,{direction:`row`,spacing:.5,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)(Lb,{on:!e,"data-testid":n===void 0?`drawer-timer`:void 0,onClick:()=>r({type:e?`resumeTimer`:`pauseTimer`,...i}),children:e?`Timer paused`:`Timer running`}),(0,V.jsx)(xm,{...Mb,disabled:e||!t,onClick:()=>r({type:`extendTick`,byMs:Rb,...i}),children:`+1 min`})]})}function Bb(e,t){return(0,E.useCallback)(n=>{t(null),e(n).then(e=>{`ok`in e&&!e.ok&&t(Vb(e.outcome,n.type))})},[e,t])}function Vb(e,t){return e.kind===`validation-rejected`?e.rejections[0]?.message??`"${t}" was rejected by a validator`:e.kind===`conflict`?e.message??`"${t}" conflicted with a concurrent tick`:e.message}var Hb=[{value:`bottom-right`,label:`Bottom right`},{value:`bottom-left`,label:`Bottom left`},{value:`top-right`,label:`Top right`},{value:`top-left`,label:`Top left`}],Ub=`seriousgaming.devDrawerCorner`;function Wb(e){let[t,n]=e.split(`-`);return{[t]:12,[n]:12}}function Gb(){try{let e=localStorage.getItem(Ub);return Hb.some(t=>t.value===e)?e:`bottom-right`}catch{return`bottom-right`}}function Kb({open:e,connected:t,corner:n,processing:r,errors:i,onToggle:a}){let o=t?i>0?`warning.main`:r?`info.main`:`success.main`:`error.main`;return(0,V.jsx)(lm,{sx:{position:`fixed`,...Wb(n),zIndex:e=>e.zIndex.drawer+1,display:e?`none`:`block`},children:(0,V.jsx)(py,{title:i>0?`Dev tools (\`) — ${i} error${i===1?``:`s`}`:"Dev tools (`)",placement:n.endsWith(`right`)?`left`:`right`,children:(0,V.jsxs)(ag,{onClick:a,"data-testid":`dev-drawer-handle`,"aria-label":`Dev tools`,sx:e=>({bgcolor:e.palette.mode===`dark`?`grey.800`:`grey.200`,color:`text.primary`,"&:hover":{bgcolor:e.palette.mode===`dark`?`grey.700`:`grey.300`}}),children:[(0,V.jsx)(tb,{}),(0,V.jsx)(lm,{sx:{position:`absolute`,top:10,right:10,width:10,height:10,borderRadius:`50%`,bgcolor:o,border:2,borderColor:`background.paper`}})]})})})}function qb({state:e,send:t,mode:n,onModeChange:r,configurable:i,inSetup:a,corner:o,onMove:s,onRefusal:c}){let l=Bb(t,c),u=e.teams.some(e=>e.canUndo),d=e.session.mode===`independent`,f=!e.session.complete&&e.teams.some(e=>!e.complete);return(0,V.jsxs)(my,{spacing:2,children:[(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)(xm,{...Nb,disabled:!f,onClick:()=>l({type:`tick`}),children:`Tick`}),(0,V.jsx)(xm,{...Fb,disabled:!u,onClick:()=>l({type:`undo`}),children:`Undo`}),(0,V.jsx)(xm,{...Ib,onClick:()=>l({type:`reset`}),children:`Reset`}),(0,V.jsx)(Lb,{on:e.session.waitingRoomOpen,onClick:()=>l({type:`setWaitingRoom`,open:!e.session.waitingRoomOpen}),children:`Waiting room`}),(0,V.jsx)(xm,{...Pb,onClick:()=>l({type:`addTeam`}),children:`Add team`}),i&&!a&&(0,V.jsx)(xm,{...Pb,"data-testid":`drawer-reconfigure`,onClick:()=>l({type:`reconfigure`}),children:`Reconfigure`})]}),(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)($p,{size:`small`,variant:`outlined`,label:`tick ${e.session.completedTicks}`}),(0,V.jsx)($p,{size:`small`,variant:`outlined`,label:e.session.mode}),(0,V.jsx)($p,{size:`small`,variant:`outlined`,label:`scenario ${e.game.scenarioId??`none`}`})]}),e.timer?.enabled&&(0,V.jsx)(zb,{paused:e.timer.paused,scheduled:e.timer.nextTickAt!==null,run:l}),(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)(Zb,{state:e,send:t}),(0,V.jsxs)(Wv,{size:`small`,value:n,"aria-label":`Colour scheme`,onChange:e=>r(e.target.value),children:[(0,V.jsx)(rv,{value:`light`,children:`Light`}),(0,V.jsx)(rv,{value:`dark`,children:`Dark`}),(0,V.jsx)(rv,{value:`system`,children:`System`})]}),(0,V.jsx)(ix,{}),(0,V.jsx)(ax,{}),(0,V.jsx)(Wv,{size:`small`,value:o,"aria-label":`Handle position`,"data-testid":`dev-drawer-corner`,onChange:e=>s(e.target.value),children:Hb.map(e=>(0,V.jsx)(rv,{value:e.value,children:e.label},e.value))})]}),(0,V.jsx)(Lh,{}),(0,V.jsx)(my,{spacing:1,children:e.teams.map(t=>(0,V.jsxs)(lm,{children:[(0,V.jsxs)(Z,{variant:`body2`,children:[t.name,` `,(0,V.jsxs)(Z,{component:`span`,color:`text.secondary`,variant:`caption`,children:[`tick `,t.completedTicks,t.complete?` · complete`:``,` · `,t.participants.length,` `,`participant`,t.participants.length===1?``:`s`]})]}),(0,V.jsxs)(my,{direction:`row`,spacing:.5,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[d&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(xm,{...Pb,disabled:t.complete,onClick:()=>l({type:`tick`,teamIndex:t.index}),children:`Tick`}),(0,V.jsx)(xm,{...Fb,onClick:()=>l({type:`undo`,teamIndex:t.index}),disabled:!t.canUndo,children:`Undo`}),(0,V.jsx)(xm,{...Ib,onClick:()=>l({type:`reset`,teamIndex:t.index}),children:`Reset`}),(0,V.jsx)(xm,{...Ib,onClick:()=>l({type:`removeTeam`,teamIndex:t.index}),children:`Delete team`})]}),(0,V.jsx)(xm,{...Mb,onClick:()=>l({type:`addParticipant`,teamId:t.teamId}),children:`Add participant`}),e.timer===null&&t.timer?.enabled&&(0,V.jsx)(zb,{paused:t.timer.paused,scheduled:t.timer.nextTickAt!==null,teamIndex:t.index,run:l})]})]},t.teamId))})]})}function Jb({state:e,send:t}){let[n,r]=(0,E.useState)([]),[i,a]=(0,E.useState)(null),[o,s]=(0,E.useState)(null),[c,l]=(0,E.useState)(null),[u,d]=(0,E.useState)(void 0),[f,p]=(0,E.useState)(!1),m=(0,E.useCallback)(async()=>{let e=await(await fetch(`/api/scenarios`)).json();r(e.scenarios)},[]);(0,E.useEffect)(()=>{m()},[m,e.game.scenarioId]);let h=(0,E.useCallback)(async e=>{a(null),s(null);let t=await fetch(`/api/scenarios/${encodeURIComponent(e)}`,{method:`DELETE`});if(t.ok)s(`Deleted "${e}"`),await m();else{let e=await t.json();a(e.error??`The scenario could not be deleted`)}},[m]),g=(0,E.useCallback)(e=>{window.open(qc({kind:`scenario-editor`,scenario:e}),`_blank`,`noreferrer`)},[]),_=e.game.scenarioId;return(0,V.jsxs)(my,{spacing:2,children:[(0,V.jsxs)(my,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,sx:{flex:1},children:`A scenario is a different set of starting conditions, so switching one restarts the session: every team returns to tick 0, and a game with a configuration step returns to it.`}),(0,V.jsx)(xm,{...Nb,"data-testid":`add-scenario`,onClick:()=>p(!0),children:`Add scenario`})]}),(0,V.jsxs)(my,{spacing:1,children:[n.map(t=>(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,V.jsxs)(Lb,{on:_===t.id,onClick:()=>d(t.id),disabled:_===t.id,children:[Xb(t,e.session.locale),t.default?` (default)`:``]}),(0,V.jsxs)(Z,{variant:`caption`,color:`text.secondary`,sx:{flex:1},children:[t.id,_===t.id?` · active`:``]}),(0,V.jsx)(xm,{...Pb,onClick:()=>g(t.id),children:`Edit`}),(0,V.jsx)(xm,{...Ib,disabled:_===t.id,onClick:()=>l(t.id),children:`Delete`})]},t.id)),!n.some(e=>e.default)&&(0,V.jsxs)(my,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,V.jsx)(Lb,{on:_===null,disabled:_===null,onClick:()=>d(null),children:`None`}),(0,V.jsx)(Z,{variant:`caption`,color:`text.secondary`,children:`the package's own configuration, with no scenario over it`})]})]}),o&&(0,V.jsx)(Z,{variant:`body2`,children:o}),i&&(0,V.jsx)(Z,{variant:`body2`,color:`error`,children:i}),(0,V.jsx)(Yb,{open:f,scenarios:n,locale:e.session.locale,onClose:()=>p(!1),onCreated:async e=>{p(!1),await m(),window.open(qc({kind:`scenario-editor`,scenario:e}),`_blank`,`noreferrer`)},onFailure:a,send:t}),(0,V.jsxs)(vh,{open:u!==void 0,onClose:()=>d(void 0),children:[(0,V.jsx)(jh,{children:`Restart on this scenario?`}),(0,V.jsx)(Oh,{children:(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`A scenario's overrides reach the game through Init, so switching restarts the session: every team returns to tick 0, and a game with a configuration step returns to it.`})}),(0,V.jsxs)(Sh,{children:[(0,V.jsx)(xm,{onClick:()=>d(void 0),children:`Cancel`}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`confirm-scenario`,onClick:()=>{let e=u;d(void 0),e!==void 0&&t({type:`selectScenario`,scenarioId:e})},children:`Restart`})]})]}),(0,V.jsxs)(vh,{open:c!==null,onClose:()=>l(null),children:[(0,V.jsxs)(jh,{children:[`Delete "`,c??``,`"?`]}),(0,V.jsx)(Oh,{children:(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`This removes the scenario directory, and its assets, from the package on disk. It cannot be undone from here.`})}),(0,V.jsxs)(Sh,{children:[(0,V.jsx)(xm,{onClick:()=>l(null),children:`Cancel`}),(0,V.jsx)(xm,{variant:`contained`,color:`error`,"data-testid":`confirm-scenario`,onClick:()=>{let e=c;l(null),e&&h(e)},children:`Delete`})]})]})]})}function Yb({open:e,scenarios:t,onClose:n,onCreated:r,onFailure:i,send:a,locale:o}){let[s,c]=(0,E.useState)(``),[l,u]=(0,E.useState)(``),[d,f]=(0,E.useState)(!1),p=Zy(`(max-width:600px)`),m=async()=>{f(!0);try{await a({type:`selectScenario`,scenarioId:l===``?null:l});let e=await fetch(`/api/scenarios`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({identifier:s,name:s})}),t=await e.json();if(!e.ok){i(t.error??`The scenario could not be created`),n();return}c(``),u(``),await r(t.identifier??s)}finally{f(!1)}};return(0,V.jsxs)(vh,{open:e,onClose:n,fullWidth:!0,maxWidth:`xs`,fullScreen:p,children:[(0,V.jsx)(jh,{children:`Add a scenario`}),(0,V.jsx)(Oh,{children:(0,V.jsxs)(my,{spacing:2,sx:{pt:1},children:[(0,V.jsx)(Xy,{size:`small`,label:`Identifier`,placeholder:`hard-mode`,helperText:`A short lowercase name. It names the directory, and the scenario.`,value:s,onChange:e=>c(e.target.value)}),(0,V.jsxs)(Xy,{select:!0,size:`small`,label:`Start from`,value:l,onChange:e=>u(e.target.value),children:[(0,V.jsx)(rv,{value:``,children:`Scratch: the package's own settings`}),t.map(e=>(0,V.jsxs)(rv,{value:e.id,children:[`A copy of `,Xb(e,o)]},e.id))]}),(0,V.jsx)(Z,{variant:`caption`,color:`text.secondary`,children:`The session restarts on the starting point, and the scenario editor opens in a new tab.`})]})}),(0,V.jsxs)(Sh,{children:[(0,V.jsx)(xm,{onClick:n,children:`Cancel`}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`create-scenario`,disabled:d||s.trim().length===0,onClick:()=>void m(),children:`Create and edit`})]})]})}function Xb(e,t){return e.locales[t]?.name??Object.values(e.locales).find(e=>e.name)?.name??e.id}function Zb({state:e,send:t}){let[n,r]=(0,E.useState)([]);return(0,E.useEffect)(()=>{fetch(`/api/locales`).then(e=>e.json()).then(e=>r(e.supported))},[]),(0,V.jsx)(Wv,{size:`small`,"data-testid":`locale`,value:n.includes(e.session.locale)?e.session.locale:``,onChange:e=>void t({type:`setLocale`,locale:e.target.value}),children:n.map(e=>(0,V.jsx)(rv,{value:e,children:e},e))})}function Qb({state:e,inSetup:t,configurable:n}){return(0,V.jsxs)(my,{spacing:2,children:[(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)(ex,{href:`/`,children:`Session`}),n&&t&&(0,V.jsx)(ex,{href:`/setup`,children:`Setup`}),(0,V.jsx)(ex,{href:`/guide`,children:`Guide`}),(0,V.jsx)(ex,{href:`/print`,children:`Print sheets`}),(0,V.jsx)(ex,{href:`/presentation`,children:`Presentation`}),(0,V.jsx)(ex,{href:`/presentation?preview`,children:`Presentation (no session)`}),(0,V.jsx)(ex,{href:`/walkthrough`,children:`Walkthrough`}),!t&&$b(e)&&(0,V.jsx)(ex,{href:qc({kind:`session-join`,bare:!0}),children:`Session join link`})]}),t&&(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`Player surfaces open once the session starts.`}),!t&&e.teams.map(e=>(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,V.jsx)(Z,{sx:{minWidth:140},children:e.name}),e.participants.slice(0,4).map((t,n)=>(0,V.jsx)(ex,{href:qc({kind:`player`,teamIndex:e.index,participant:n+1}),children:t.name},t.id)),(0,V.jsx)(ex,{href:qc({kind:`observer`,teamIndex:e.index}),children:`Observe`}),(0,V.jsx)(ex,{href:qc({kind:`waiting-room`,teamIndex:e.index}),children:`Waiting room`}),(0,V.jsx)(ex,{href:qc({kind:`join`,teamIndex:e.index}),children:`Join link`})]},e.teamId))]})}function $b(e){return e.settings.game?.teams?.sessionJoin!==!1}function ex({href:e,children:t}){return(0,V.jsx)(xm,{...Mb,href:e,target:`_blank`,rel:`noreferrer`,endIcon:(0,V.jsx)(rb,{sx:{fontSize:14}}),children:t})}function tx({state:e}){return(0,V.jsx)(lm,{component:`pre`,sx:{m:0,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:JSON.stringify(e,null,2)})}function nx({state:e,send:t,onRefusal:n}){let r=Bb(t,n),i=new Set(e.faults.map(e=>e.kind));return(0,V.jsxs)(my,{spacing:2,children:[(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`Arm a failure the platform can produce and this runtime cannot. It fires once, on the next operation of that kind.`}),(0,V.jsx)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:eb.map(e=>(0,V.jsx)(Lb,{on:i.has(e),onClick:()=>r(i.has(e)?{type:`disarmFault`,fault:e}:{type:`armFault`,fault:e}),children:e},e))})]})}function rx({errors:e}){return(0,V.jsx)(my,{spacing:1,children:e.map((e,t)=>(0,V.jsx)(Z,{variant:`body2`,sx:{fontFamily:`monospace`},children:e},t))})}function ix(){let{brands:e,selected:t,select:n}=Sb();return e.length===0||!t?null:(0,V.jsx)(Wv,{size:`small`,value:t.id,"aria-label":`Brand`,"data-testid":`dev-drawer-brand`,onChange:e=>n(e.target.value),children:e.map(e=>(0,V.jsx)(rv,{value:e.id,children:e.name},e.id))})}function ax(){let{hold:e,setHold:t}=kb();return(0,V.jsxs)(Wv,{size:`small`,value:e,"aria-label":`Loading screens`,"data-testid":`dev-drawer-loading-hold`,onChange:e=>t(e.target.value),children:[(0,V.jsx)(rv,{value:`none`,children:`Load normally`}),(0,V.jsx)(rv,{value:`host`,children:`Hold the host's loading screen`}),(0,V.jsx)(rv,{value:`surface`,children:`Hold the game's loading screen`})]})}function ox(e){let t=Object.keys(e);return t.includes(`en`)?`en`:t[0]}function sx(e,t,n){let r=Object.keys(e),i=[...new Set([n,`en`,r[0]])];return(t[ox(e)]??[]).flatMap(e=>{let n=i.find(n=>t[n]?.includes(e));return n?[{file:e,locale:n}]:[]})}var cx=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,lx=Object.hasOwnProperty,ux=class{constructor(){this.occurrences,this.reset()}slug(e,t){let n=this,r=dx(e,t===!0),i=r;for(;lx.call(n.occurrences,r);)n.occurrences[i]++,r=i+`-`+n.occurrences[i];return n.occurrences[r]=0,r}reset(){this.occurrences=Object.create(null)}};function dx(e,t){return typeof e==`string`?(t||(e=e.toLowerCase()),e.replace(cx,``).replace(/ /g,`-`)):``}var fx={};function px(e,t){let n=t||fx;return mx(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function mx(e,t,n){if(gx(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return hx(e.children,t,n)}return Array.isArray(e)?hx(e,t,n):``}function hx(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=mx(e[i],t,n);return r.join(``)}function gx(e){return!!(e&&typeof e==`object`)}function _x(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var vx=kx(/[A-Za-z]/),yx=kx(/[\dA-Za-z]/),bx=kx(/[#-'*+\--9=?A-Z^-~]/);function xx(e){return e!==null&&(e<32||e===127)}var Sx=kx(/\d/),Cx=kx(/[\dA-Fa-f]/),wx=kx(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function Tx(e){return e!==null&&(e<0||e===32)}function Ex(e){return e===-2||e===-1||e===32}var Dx=kx(/\p{P}|\p{S}/u),Ox=kx(/\s/);function kx(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var Ax=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),jx={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function Mx(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function Nx(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Px(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Fx(e){return Px(e)||Mx(e)}var Ix=document.createElement(`i`);function Lx(e){let t=`&`+e+`;`;Ix.innerHTML=t;let n=Ix.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var Rx=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function zx(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?Fx:u===`decimal`?Mx:Nx;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&Ax.includes(y)&&(_=y,v=Lx(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&Lx(y);e&&(_=y,v=e)}let S=1+l-o,C=``;if(x||n.nonTerminated!==!1){if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):Fx(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(Bx(e))h(7,S),C=`�`;else if(e in jx)h(6,S),C=jx[e];else{let t=``;Vx(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,Rx[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function Bx(e){return e>=55296&&e<=57343||e>1114111}function Vx(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var Hx=/["&'<>`]/g,Ux=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wx=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Gx=/[|\\{}()[\]^$+*?.]/g,Kx=new WeakMap;function qx(e,t){return e=e.replace(t.subset?Jx(t.subset):Hx,r),t.subset||t.escapeOnly?e:e.replace(Ux,n).replace(Wx,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Jx(e){let t=Kx.get(e);return t||(t=Yx(e),Kx.set(e,t)),t}function Yx(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Gx,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function Xx(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Zx(e,t){return qx(e,Object.assign({format:Xx},t))}var Qx={}.hasOwnProperty,$x={},eS={},tS=/^[^\t\n\r "#'.<=>`}]+$/,nS=/^[^\t\n\r "'<=>`}]+$/;function rS(e){let t=e||$x;return{canContainEols:[`textDirective`],enter:{directiveContainer:aS,directiveContainerAttributes:pS,directiveContainerLabel:uS,directiveLeaf:oS,directiveLeafAttributes:pS,directiveText:sS,directiveTextAttributes:pS},exit:{directiveContainer:wS,directiveContainerAttributeClass:mS,directiveContainerAttributeClassValue:_S,directiveContainerAttributeId:mS,directiveContainerAttributeIdValue:gS,directiveContainerAttributeName:yS,directiveContainerAttributeValue:vS,directiveContainerAttributeValueLiteral:hS,directiveContainerAttributes:bS,directiveContainerLabel:dS,directiveContainerName:lS,directiveContainerSequence:n,directiveLeaf:wS,directiveLeafAttributeClass:mS,directiveLeafAttributeClassValue:_S,directiveLeafAttributeId:mS,directiveLeafAttributeIdValue:gS,directiveLeafAttributeName:yS,directiveLeafAttributeValue:vS,directiveLeafAttributeValueLiteral:hS,directiveLeafAttributes:bS,directiveLeafLabel:fS,directiveLeafName:lS,directiveLeafSequence:n,directiveText:wS,directiveTextAttributeClass:mS,directiveTextAttributeClassValue:_S,directiveTextAttributeId:mS,directiveTextAttributeIdValue:gS,directiveTextAttributeName:yS,directiveTextAttributeValue:vS,directiveTextAttributeValueLiteral:hS,directiveTextAttributes:bS,directiveTextLabel:fS,directiveTextMarker:n,directiveTextName:lS}};function n(e){if(!t.verbose)return;let n=this.stack[this.stack.length-1];n.type===`containerDirective`||n.type===`leafDirective`||n.type;let r={start:CS(e.start),end:CS(e.end)};n.data&&n.data.position?(n.type,n.data.position.closing=r):n.data={position:{opening:r}}}}function iS(e){let t=e||eS;if(t.quote!==`"`&&t.quote!==`'`&&t.quote!==null&&t.quote!==void 0)throw Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=TS,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:`\r`,inConstruct:[`leafDirectiveLabel`,`containerDirectiveLabel`]},{character:`
171
- `,inConstruct:[`leafDirectiveLabel`,`containerDirectiveLabel`]},{after:`[^\\s\\p{P}\\p{S}]`,before:`[^:]`,character:`:`,inConstruct:[`phrasing`],unicode:!0},{afterNode:`textDirective`,character:`:`,inConstruct:[`phrasing`]},{atBreak:!0,before:`:+`,character:`:`}]};function n(e,t,n,i){let a=n.createTracker(i),o=n.enter(e.type),s;if(e.type===`containerDirective`){let t=(e.children||[])[0],r=DS(t)?e.children.slice(1):e.children;if(r&&r.length>0){let t=a.current();s=n.containerFlow({...e,children:r},{now:{line:t.now.line+1,column:1+t.lineShift},lineShift:t.lineShift})}}let c=OS(e,s?kS(s):0),l=a.move(c+(e.name||``)),u=r(e,n),d=i.after.charCodeAt(0),f;if(e.type===`containerDirective`){let t=(e.children||[])[0];f=DS(t)?t:void 0}else f=e;if(f&&f.children&&f.children.length>0){let t=n.enter(`label`),r=`${e.type}Label`,i=n.enter(r);l+=a.move(`[`),l+=a.move(n.containerPhrasing(f,{...a.current(),before:l,after:`]`})),l+=a.move(`]`),i(),t()}else u||d!==45&&d!==95&&(Dx(d)||Ox(d))||(l+=a.move(`[]`));return l+=a.move(u||(d===123?`{}`:``)),e.type===`containerDirective`&&(s&&(l+=a.move(`
170
+ `,nd=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return W({root:[`root`,n,`color${Y(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},Xu,t)},rd=K(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Y(n.color)}`]]}})(J(({theme:e})=>{let t=Xs(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...Zs(e,`transform`)}},{props:{variant:`indeterminate`},style:ed||{animation:`${Qu} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),id=K(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),ad=K(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(J(({theme:e})=>{let t=Xs(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...Zs(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:td||{animation:`${$u} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),od=K(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(J(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),sd=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:c,size:l=40,style:u,thickness:d=3.6,value:f=n.min??0,variant:p=`indeterminate`,...m}=n,h=s??0,g=c??100,_={...n,color:i,disableShrink:a,size:l,thickness:d,value:f,variant:p,enableTrackSlot:o},v=nd(_),y={},b={},x={};if(p===`determinate`){let e=2*Math.PI*((Zu-d)/2),t=g-h;y.strokeDasharray=e.toFixed(3),y.strokeDashoffset=t>0?`${((g-f)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,b.transform=`rotate(-90deg)`,x[`aria-valuenow`]=f,x[`aria-valuemin`]=h,x[`aria-valuemax`]=g}return(0,V.jsx)(rd,{className:H(v.root,r),style:{width:l,height:l,...b,...u},ownerState:_,ref:t,role:`progressbar`,...x,...m,children:(0,V.jsxs)(id,{className:v.svg,ownerState:_,viewBox:`${Zu/2} ${Zu/2} ${Zu} ${Zu}`,children:[o?(0,V.jsx)(od,{className:v.track,ownerState:_,cx:Zu,cy:Zu,r:(Zu-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,V.jsx)(ad,{className:v.circle,style:y,ownerState:_,cx:Zu,cy:Zu,r:(Zu-d)/2,fill:`none`,strokeWidth:d})]})})});function cd(e){return zr(`MuiIconButton`,e)}var ld=U(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),ud=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return W({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${Y(r)}`,i&&`edge${Y(i)}`,`size${Y(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},cd,t)},dd=K(Uu,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Y(n.color)}`],n.edge&&t[`edge${Y(n.edge)}`],t[`size${Y(n.size)}`]]}})(J(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,...Zs(e,`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),J(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${ld.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${ld.loading}`]:{color:`transparent`}}))),fd=K(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),pd=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=Ml(u),h=f??(0,V.jsx)(sd,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=ud(g);return(0,V.jsxs)(dd,{id:d?m:u,className:H(_.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,V.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,V.jsx)(fd,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),md=Dl((0,V.jsx)(`path`,{d:`M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z`}),`SuccessOutlined`),hd=Dl((0,V.jsx)(`path`,{d:`M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z`}),`ReportProblemOutlined`),gd=Dl((0,V.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`ErrorOutline`),_d=Dl((0,V.jsx)(`path`,{d:`M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z`}),`InfoOutlined`),vd=Dl((0,V.jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),yd=e=>{let{variant:t,color:n,severity:r,classes:i}=e;return W({root:[`root`,`color${Y(n||r)}`,`${t}`],icon:[`icon`],message:[`message`],action:[`action`]},Ju,i)},bd=K(fu,{name:`MuiAlert`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant]]}})(J(({theme:e})=>{let t=e.palette.mode===`light`?e.darken:e.lighten,n=e.palette.mode===`light`?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:`transparent`,display:`flex`,padding:`6px 16px`,variants:[...Object.entries(e.palette).filter(qu([`light`])).map(([r])=>({props:{colorSeverity:r,variant:`standard`},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Yu.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(qu([`light`])).map(([n])=>({props:{colorSeverity:n,variant:`outlined`},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${Yu.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(qu([`dark`])).map(([t])=>({props:{colorSeverity:t,variant:`filled`},style:{...e.focusVisible&&Za(`0 0 0 4px ${(e.vars||e).palette.background.default}`),fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:e.palette.mode===`dark`?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),xd=K(`div`,{name:`MuiAlert`,slot:`Icon`})({marginRight:12,padding:`7px 0`,display:`flex`,fontSize:22,opacity:.9}),Sd=K(`div`,{name:`MuiAlert`,slot:`Message`})({padding:`8px 0`,minWidth:0,overflow:`auto`}),Cd=K(`div`,{name:`MuiAlert`,slot:`Action`})({display:`flex`,alignItems:`flex-start`,padding:`4px 0 0 16px`,marginLeft:`auto`,marginRight:-8}),wd={success:(0,V.jsx)(md,{fontSize:`inherit`}),warning:(0,V.jsx)(hd,{fontSize:`inherit`}),error:(0,V.jsx)(gd,{fontSize:`inherit`}),info:(0,V.jsx)(_d,{fontSize:`inherit`})},Td=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiAlert`}),{action:r,children:i,className:a,closeText:o=`Close`,color:s,icon:c,iconMapping:l=wd,onClose:u,role:d=`alert`,severity:f=`success`,slotProps:p={},slots:m={},variant:h=`standard`,...g}=n,_={...n,color:s,severity:f,variant:h,colorSeverity:s||f},v=yd(_),y={slots:m,slotProps:p},[b,x]=X(`root`,{ref:t,shouldForwardComponentProp:!0,className:H(v.root,a),elementType:bd,externalForwardedProps:{...y,...g},ownerState:_,additionalProps:{role:d,elevation:0}}),[S,C]=X(`icon`,{className:v.icon,elementType:xd,externalForwardedProps:y,ownerState:_}),[w,T]=X(`message`,{className:v.message,elementType:Sd,externalForwardedProps:y,ownerState:_}),[E,D]=X(`action`,{className:v.action,elementType:Cd,externalForwardedProps:y,ownerState:_}),[O,k]=X(`closeButton`,{elementType:pd,externalForwardedProps:y,ownerState:_}),[A,j]=X(`closeIcon`,{elementType:vd,externalForwardedProps:y,ownerState:_});return(0,V.jsxs)(b,{...x,children:[c===!1?null:(0,V.jsx)(S,{...C,children:c||l[f]||wd[f]}),(0,V.jsx)(w,{...T,children:i}),r==null?null:(0,V.jsx)(E,{...D,children:r}),r==null&&u?(0,V.jsx)(E,{...D,children:(0,V.jsx)(O,{size:`small`,"aria-label":o,title:o,color:`inherit`,onClick:u,...k,children:(0,V.jsx)(A,{fontSize:`small`,...j})})}):null]})});function Ed(e){return zr(`MuiTypography`,e)}var Dd=U(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]),Od=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return W({root:[`root`,i,e.align!==`inherit`&&`align${Y(t)}`,n&&`gutterBottom`,r&&`noWrap`]},Ed,a)},kd=K(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${Y(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(J(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${Y(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}}]}))),Ad={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},Z=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:a,component:o,gutterBottom:s=!1,noWrap:c=!1,variant:l=`body1`,variantMapping:u=Ad,...d}=n,f={...n,align:i,color:r,className:a,component:o,gutterBottom:s,noWrap:c,variant:l,variantMapping:u},p=o||u[l]||Ad[l]||`span`,m=Od(f);return(0,V.jsx)(kd,{as:p,ref:t,className:H(m.root,a),...d,ownerState:f,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...d.style}})});function jd(e){return zr(`MuiAppBar`,e)}U(`MuiAppBar`,[`root`,`positionFixed`,`positionAbsolute`,`positionSticky`,`positionStatic`,`positionRelative`,`colorDefault`,`colorPrimary`,`colorSecondary`,`colorInherit`,`colorTransparent`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`]);var Md=e=>{let{color:t,position:n,classes:r}=e;return W({root:[`root`,`color${Y(t)}`,`position${Y(n)}`]},jd,r)},Nd=(e,t)=>e?`${e.replace(`)`,``)}, ${t})`:t,Pd=K(fu,{name:`MuiAppBar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${Y(n.position)}`],t[`color${Y(n.color)}`]]}})(J(({theme:e})=>({display:`flex`,flexDirection:`column`,width:`100%`,boxSizing:`border-box`,flexShrink:0,variants:[{props:{position:`fixed`},style:{position:`fixed`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0,"@media print":{position:`absolute`}}},{props:{position:`absolute`},style:{position:`absolute`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`sticky`},style:{position:`sticky`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`static`},style:{position:`static`}},{props:{position:`relative`},style:{position:`relative`}},{props:{color:`inherit`},style:{"--AppBar-color":`inherit`,color:`var(--AppBar-color)`}},{props:{color:`default`},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles(`dark`,{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(qu([`contrastText`])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText,...e.focusVisible&&Za(`0 0 0 4px ${(e.vars||e).palette.background.default}`)}})),{props:e=>e.enableColorOnDark===!0&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`}},{props:e=>e.enableColorOnDark===!1&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundColor:e.vars?Nd(e.vars.palette.AppBar.darkBg,`var(--AppBar-background)`):null,color:e.vars?Nd(e.vars.palette.AppBar.darkColor,`var(--AppBar-color)`):null})}},{props:{color:`transparent`},style:{"--AppBar-background":`transparent`,"--AppBar-color":`inherit`,backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundImage:`none`})}}]}))),Fd=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiAppBar`}),{className:r,color:i=`primary`,enableColorOnDark:a=!1,position:o=`fixed`,...s}=n,c={...n,color:i,position:o,enableColorOnDark:a},l=Md(c);return(0,V.jsx)(Pd,{square:!0,component:`header`,ownerState:c,elevation:4,className:H(l.root,r,o===`fixed`&&`mui-fixed`),ref:t,...s})});function Id(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var Ld=`bottom`,Rd=`right`,zd=`left`,Bd=`auto`,Vd=[`top`,Ld,Rd,zd],Hd=`start`,Ud=`clippingParents`,Wd=`viewport`,Gd=`popper`,Kd=`reference`,qd=Vd.reduce(function(e,t){return e.concat([t+`-`+Hd,t+`-end`])},[]),Jd=[].concat(Vd,[Bd]).reduce(function(e,t){return e.concat([t,t+`-`+Hd,t+`-end`])},[]),Yd=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Xd(e){return e?(e.nodeName||``).toLowerCase():null}function Zd(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qd(e){return e instanceof Zd(e).Element||e instanceof Element}function $d(e){return e instanceof Zd(e).HTMLElement||e instanceof HTMLElement}function ef(e){return typeof ShadowRoot>`u`?!1:e instanceof Zd(e).ShadowRoot||e instanceof ShadowRoot}function tf(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];$d(i)&&Xd(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function nf(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});$d(r)&&Xd(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var rf={name:`applyStyles`,enabled:!0,phase:`write`,fn:tf,effect:nf,requires:[`computeStyles`]};function af(e){return e.split(`-`)[0]}var of=Math.max,sf=Math.min,cf=Math.round;function lf(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function uf(){return!/^((?!chrome|android).)*safari/i.test(lf())}function df(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&$d(e)&&(i=e.offsetWidth>0&&cf(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&cf(r.height)/e.offsetHeight||1);var o=(Qd(e)?Zd(e):window).visualViewport,s=!uf()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function ff(e){var t=df(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function pf(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ef(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mf(e){return Zd(e).getComputedStyle(e)}function hf(e){return[`table`,`td`,`th`].indexOf(Xd(e))>=0}function gf(e){return((Qd(e)?e.ownerDocument:e.document)||window.document).documentElement}function _f(e){return Xd(e)===`html`?e:e.assignedSlot||e.parentNode||(ef(e)?e.host:null)||gf(e)}function vf(e){return!$d(e)||mf(e).position===`fixed`?null:e.offsetParent}function yf(e){var t=/firefox/i.test(lf());if(/Trident/i.test(lf())&&$d(e)&&mf(e).position===`fixed`)return null;var n=_f(e);for(ef(n)&&(n=n.host);$d(n)&&[`html`,`body`].indexOf(Xd(n))<0;){var r=mf(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function bf(e){for(var t=Zd(e),n=vf(e);n&&hf(n)&&mf(n).position===`static`;)n=vf(n);return n&&(Xd(n)===`html`||Xd(n)===`body`&&mf(n).position===`static`)?t:n||yf(e)||t}function xf(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function Sf(e,t,n){return of(e,sf(t,n))}function Cf(e,t,n){var r=Sf(e,t,n);return r>n?n:r}function wf(){return{top:0,right:0,bottom:0,left:0}}function Tf(e){return Object.assign({},wf(),e)}function Ef(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Df=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,Tf(typeof e==`number`?Ef(e,Vd):e)};function Of(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=af(n.placement),c=xf(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(a&&o){var u=Df(i.padding,n),d=ff(a),f=c===`y`?`top`:zd,p=c===`y`?Ld:Rd,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=bf(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=Sf(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function kf(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||pf(t.elements.popper,r)&&(t.elements.arrow=r))}var Af={name:`arrow`,enabled:!0,phase:`main`,fn:Of,effect:kf,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function jf(e){return e.split(`-`)[1]}var Mf={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function Nf(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:cf(n*i)/i||0,y:cf(r*i)/i||0}}function Pf(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=zd,b=`top`,x=window;if(l){var S=bf(n),C=`clientHeight`,w=`clientWidth`;if(S===Zd(n)&&(S=gf(n),mf(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=Ld;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=Rd;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&Mf),O=u===!0?Nf({x:p,y:h},Zd(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function Ff(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:af(t.placement),variation:jf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Pf(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Pf(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var If={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:Ff,data:{}},Lf={passive:!0};function Rf(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=Zd(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,Lf)}),s&&c.addEventListener(`resize`,n.update,Lf),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,Lf)}),s&&c.removeEventListener(`resize`,n.update,Lf)}}var zf={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:Rf,data:{}},Bf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Vf(e){return e.replace(/left|right|bottom|top/g,function(e){return Bf[e]})}var Hf={start:`end`,end:`start`};function Uf(e){return e.replace(/start|end/g,function(e){return Hf[e]})}function Wf(e){var t=Zd(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Gf(e){return df(gf(e)).left+Wf(e).scrollLeft}function Kf(e,t){var n=Zd(e),r=gf(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=uf();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Gf(e),y:c}}function qf(e){var t=gf(e),n=Wf(e),r=e.ownerDocument?.body,i=of(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=of(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+Gf(e),s=-n.scrollTop;return mf(r||t).direction===`rtl`&&(o+=of(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function Jf(e){var t=mf(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Yf(e){return[`html`,`body`,`#document`].indexOf(Xd(e))>=0?e.ownerDocument.body:$d(e)&&Jf(e)?e:Yf(_f(e))}function Xf(e,t){t===void 0&&(t=[]);var n=Yf(e),r=n===e.ownerDocument?.body,i=Zd(n),a=r?[i].concat(i.visualViewport||[],Jf(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Xf(_f(a)))}function Zf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Qf(e,t){var n=df(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function $f(e,t,n){return t===`viewport`?Zf(Kf(e,n)):Qd(t)?Qf(t,n):Zf(qf(gf(e)))}function ep(e){var t=Xf(_f(e)),n=[`absolute`,`fixed`].indexOf(mf(e).position)>=0&&$d(e)?bf(e):e;return Qd(n)?t.filter(function(e){return Qd(e)&&pf(e,n)&&Xd(e)!==`body`}):[]}function tp(e,t,n,r){var i=t===`clippingParents`?ep(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=$f(e,n,r);return t.top=of(i.top,t.top),t.right=sf(i.right,t.right),t.bottom=sf(i.bottom,t.bottom),t.left=of(i.left,t.left),t},$f(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function np(e){var t=e.reference,n=e.element,r=e.placement,i=r?af(r):null,a=r?jf(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case Ld:c={x:o,y:t.y+t.height};break;case Rd:c={x:t.x+t.width,y:s};break;case zd:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?xf(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case Hd:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2)}}return c}function rp(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?Ud:s,l=n.rootBoundary,u=l===void 0?Wd:l,d=n.elementContext,f=d===void 0?Gd:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=Tf(typeof g==`number`?Ef(g,Vd):g),v=f===`popper`?Kd:Gd,y=e.rects.popper,b=e.elements[m?v:f],x=tp(Qd(b)?b:b.contextElement||gf(e.elements.popper),c,u,o),S=df(e.elements.reference),C=np({reference:S,element:y,strategy:`absolute`,placement:i}),w=Zf(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function ip(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Jd:c,u=jf(r),d=u?s?qd:qd.filter(function(e){return jf(e)===u}):Vd,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=rp(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[af(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function ap(e){if(af(e)===`auto`)return[];var t=Vf(e);return[Uf(e),t,Uf(t)]}function op(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=af(g)===g,v=c||(_||!m?[Vf(g)]:ap(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(af(n)===`auto`?ip(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=af(E),O=jf(E)===Hd,k=[`top`,Ld].indexOf(D)>=0,A=k?`width`:`height`,j=rp(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?Rd:zd:O?Ld:`top`;b[A]>x[A]&&(M=Vf(M));var N=Vf(M),P=[];if(a&&P.push(j[D]<=0),s&&P.push(j[M]<=0,j[N]<=0),P.every(function(e){return e})){w=E,C=!1;break}S.set(E,P)}if(C)for(var F=m?3:1,ee=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},te=F;te>0&&ee(te)!==`break`;te--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var sp={name:`flip`,enabled:!0,phase:`main`,fn:op,requiresIfExists:[`offset`],data:{_skip:!1}};function cp(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function lp(e){return[`top`,Rd,Ld,zd].some(function(t){return e[t]>=0})}function up(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=rp(t,{elementContext:`reference`}),s=rp(t,{altBoundary:!0}),c=cp(o,r),l=cp(s,i,a),u=lp(c),d=lp(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var dp={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:up};function fp(e,t,n){var r=af(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function pp(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Jd.reduce(function(e,n){return e[n]=fp(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var mp={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:pp};function hp(e){var t=e.state,n=e.name;t.modifiersData[n]=np({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var gp={name:`popperOffsets`,enabled:!0,phase:`read`,fn:hp,data:{}};function _p(e){return e===`x`?`y`:`x`}function vp(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=rp(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=af(t.placement),v=jf(t.placement),y=!v,b=xf(_),x=_p(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:zd,A=b===`y`?Ld:Rd,j=b===`y`?`height`:`width`,M=S[b],N=M+g[k],P=M-g[A],F=p?-w[j]/2:0,ee=v===`start`?C[j]:w[j],te=v===`start`?-w[j]:-C[j],I=t.elements.arrow,ne=p&&I?ff(I):{width:0,height:0},re=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:wf(),ie=re[k],ae=re[A],oe=Sf(0,C[j],ne[j]),se=y?C[j]/2-F-oe-ie-E.mainAxis:ee-oe-ie-E.mainAxis,ce=y?-C[j]/2+F+oe+ae+E.mainAxis:te+oe+ae+E.mainAxis,le=t.elements.arrow&&bf(t.elements.arrow),ue=le?b===`y`?le.clientTop||0:le.clientLeft||0:0,de=D?.[b]??0,L=M+se-de-ue,R=M+ce-de,fe=Sf(p?sf(N,L):N,M,p?of(P,R):P);S[b]=fe,O[b]=fe-M}if(s){var pe=b===`x`?`top`:zd,me=b===`x`?Ld:Rd,he=S[x],z=x===`y`?`height`:`width`,ge=he+g[pe],_e=he-g[me],ve=[`top`,zd].indexOf(_)!==-1,ye=D?.[x]??0,be=ve?ge:he-C[z]-w[z]-ye+E.altAxis,xe=ve?he+C[z]+w[z]-ye-E.altAxis:_e,Se=p&&ve?Cf(be,he,xe):Sf(p?be:ge,he,p?xe:_e);S[x]=Se,O[x]=Se-he}t.modifiersData[r]=O}}var yp={name:`preventOverflow`,enabled:!0,phase:`main`,fn:vp,requiresIfExists:[`offset`]};function bp(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function xp(e){return e===Zd(e)||!$d(e)?Wf(e):bp(e)}function Sp(e){var t=e.getBoundingClientRect(),n=cf(t.width)/e.offsetWidth||1,r=cf(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Cp(e,t,n){n===void 0&&(n=!1);var r=$d(t),i=$d(t)&&Sp(t),a=gf(t),o=df(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Xd(t)!==`body`||Jf(a))&&(s=xp(t)),$d(t)?(c=df(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Gf(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function wp(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function Tp(e){var t=wp(e);return Yd.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function Ep(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function Dp(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var Op={placement:`bottom`,modifiers:[],strategy:`absolute`};function kp(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function Ap(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Op:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},Op,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:Qd(e)?Xf(e):e.contextElement?Xf(e.contextElement):[],popper:Xf(t)};var s=Tp(Dp([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(kp(t,n)){i.rects={reference:Cp(t,bf(n),i.options.strategy===`fixed`),popper:ff(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(i.reset===!0)i.reset=!1,r=-1;else{var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:Ep(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!kp(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var jp=Ap({defaultModifiers:[zf,gp,If,rf,mp,sp,yp,Af,dp]});function Mp(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:au(n,r),{props:s,internalRef:c}=cu({...a,externalSlotProps:o}),l=ms(c,o?.ref,e.additionalProps?.ref);return iu(t,{...s,ref:l},r)}function Np(e){return e?.props?.ref||null}var Pp=l(Pc(),1);function Fp(e){return typeof e==`function`?e():e}var Ip=E.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=E.useState(null),s=ms(E.isValidElement(n)?Np(n):null,t);if(ti(()=>{i||o(Fp(r)||document.body)},[r,i]),ti(()=>{if(a&&!i)return jl(t,a),()=>{jl(t,null)}},[t,a,i]),i){if(E.isValidElement(n)){let e={ref:s};return E.cloneElement(n,e)}return n}return a&&Pp.createPortal(n,a)});function Lp(e){return zr(`MuiPopper`,e)}U(`MuiPopper`,[`root`]);function Rp(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function zp(e){return typeof e==`function`?e():e}function Bp(e){return e.nodeType!==void 0}var Vp=e=>{let{classes:t}=e;return W({root:[`root`]},Lp,t)},Hp={},Up=E.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=E.useRef(null),_=ms(g,t),v=E.useRef(null),y=ms(v,u),b=E.useRef(y);ti(()=>{b.current=y},[y]),E.useImperativeHandle(u,()=>v.current,[]);let x=Rp(c,i),[S,C]=E.useState(x),w=E.useMemo(()=>zp(n),[n]);E.useEffect(()=>{v.current&&v.current.forceUpdate()}),ti(()=>{if(!w||!s)return;let e=e=>{C(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=jp(w,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[w,a,o,s,l,x]);let T={placement:S};p!==null&&(T.TransitionProps=p);let D=Vp(e),O=f.root??`div`,k=Mp({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root});return(0,V.jsx)(O,{...k,children:typeof r==`function`?r(T):r})}),Wp=K(E.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=Hp,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=E.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=zp(n);S=e&&Bp(e)?gs(e).body:gs(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,V.jsx)(Ip,{disablePortal:o,container:S,children:(0,V.jsx)(Up,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),Gp=E.forwardRef(function(e,t){let n=ji(),{anchorEl:r,component:i,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,slots:m,slotProps:h,...g}=q({props:e,name:`MuiPopper`}),_={anchorEl:r,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,...g};return(0,V.jsx)(Wp,{as:i,direction:n?`rtl`:`ltr`,slots:m,slotProps:h,..._,ref:t})}),Kp=Dl((0,V.jsx)(`path`,{d:`M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z`}),`Cancel`);function qp(e){return zr(`MuiChip`,e)}var Jp=U(`MuiChip`,[`root`,`sizeSmall`,`sizeMedium`,`colorDefault`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`disabled`,`clickable`,`deletable`,`outlined`,`filled`,`avatar`,`icon`,`label`,`deleteIcon`,`focusVisible`]),Yp=e=>{let{classes:t,disabled:n,size:r,color:i,onDelete:a,clickable:o,variant:s}=e;return W({root:[`root`,s,n&&`disabled`,`size${Y(r)}`,`color${Y(i)}`,o&&`clickable`,a&&`deletable`],label:[`label`],avatar:[`avatar`],icon:[`icon`],deleteIcon:[`deleteIcon`]},qp,t)},Xp=K(`div`,{name:`MuiChip`,slot:`Root`,shouldForwardProp:e=>ns(e)&&e!==`focusableWhenDisabled`&&e!==`skipFocusWhenDisabled`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,clickable:i,onDelete:a,size:o,variant:s}=n;return[{[`& .${Jp.avatar}`]:t.avatar},{[`& .${Jp.icon}`]:t.icon},{[`& .${Jp.deleteIcon}`]:t.deleteIcon},t.root,t[`size${Y(o)}`],t[`color${Y(r)}`],i&&t.clickable,a&&t.deletable,t[s]]}})(J(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:`100%`,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:`inline-flex`,alignItems:`center`,justifyContent:`center`,height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:`nowrap`,...Zs(e,[`background-color`,`box-shadow`]),cursor:`unset`,outline:0,textDecoration:`none`,border:0,padding:0,verticalAlign:`middle`,boxSizing:`border-box`,[`&.${Jp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`& .${Jp.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Jp.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Jp.deleteIcon}`]:{WebkitTapHighlightColor:`transparent`,color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:`pointer`,margin:`0 5px 0 -6px`,"&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{color:`primary`},style:{[`& .${Jp.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:`secondary`},style:{[`& .${Jp.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:`small`},style:{height:24,[`& .${Jp.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Jp.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Jp.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(qu([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${Jp.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${Jp.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&e.color!=="default",style:{[`& .${Jp.icon}`]:{color:`inherit`}}},{props:{onDelete:!0},style:!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(qu([`dark`])).map(([t])=>({props:{color:t,onDelete:!0},style:!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:`none`,WebkitTapHighlightColor:`transparent`,cursor:`pointer`,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},...!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(qu([`dark`])).map(([t])=>({props:{color:t,clickable:!0},style:{"&:hover":{backgroundColor:(e.vars||e).palette[t].dark},...!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}}})),{props:{variant:`outlined`},style:{backgroundColor:`transparent`,border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Jp.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},...!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`& .${Jp.avatar}`]:{marginLeft:4},[`& .${Jp.icon}`]:{marginLeft:4},[`& .${Jp.deleteIcon}`]:{marginRight:5}}},{props:{size:`small`,variant:`outlined`},style:{[`& .${Jp.avatar}`]:{marginLeft:2},[`& .${Jp.icon}`]:{marginLeft:2},[`& .${Jp.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{variant:`outlined`,color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${Jp.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},...!e.focusVisible&&{[`&.${Jp.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)}},[`& .${Jp.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),Zp=K(`span`,{name:`MuiChip`,slot:`Label`})({overflow:`hidden`,textOverflow:`ellipsis`,paddingLeft:12,paddingRight:12,whiteSpace:`nowrap`,variants:[{props:{variant:`outlined`},style:{paddingLeft:11,paddingRight:11}},{props:{size:`small`},style:{paddingLeft:8,paddingRight:8}},{props:{size:`small`,variant:`outlined`},style:{paddingLeft:7,paddingRight:7}}]});function Qp(e){return e.key===`Backspace`||e.key===`Delete`}var $p=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiChip`}),{avatar:r,className:i,clickable:a,color:o=`default`,component:s,deleteIcon:c,disabled:l=!1,icon:u,label:d,onClick:f,onDelete:p,onKeyDown:m,onKeyUp:h,size:g=`medium`,variant:_=`filled`,tabIndex:v,skipFocusWhenDisabled:y=!1,slots:b={},slotProps:x={},...S}=n,{nativeButton:C,...w}=S,T=Ts(E.useRef(null),t),D=e=>{e.stopPropagation(),p(e)},O=e=>{e.currentTarget===e.target&&Qp(e)&&e.preventDefault(),m&&m(e)},k=e=>{e.currentTarget===e.target&&p&&Qp(e)&&p(e),h&&h(e)},A=a!==!1&&f?!0:a,j=A||p?Uu:s||`div`,M={...n,component:j,disabled:l,size:g,color:o,iconColor:E.isValidElement(u)&&u.props.color||o,onDelete:!!p,clickable:A,variant:_},N=Yp(M),P=j===Uu?{component:s||`div`,internalNativeButton:!1,focusVisibleClassName:N.focusVisible,...p&&{disableRipple:!0},...C!==void 0&&{nativeButton:C}}:{},F=null;p&&(F=c&&E.isValidElement(c)?E.cloneElement(c,{className:H(c.props.className,N.deleteIcon),onClick:D}):(0,V.jsx)(Kp,{className:N.deleteIcon,onClick:D}));let ee=null;r&&E.isValidElement(r)&&(ee=E.cloneElement(r,{className:H(N.avatar,r.props.className)}));let te=null;u&&E.isValidElement(u)&&(te=E.cloneElement(u,{className:H(N.icon,u.props.className)}));let I={slots:b,slotProps:x},[ne,re]=X(`root`,{elementType:Xp,externalForwardedProps:{...I,...w},ownerState:M,shouldForwardComponentProp:!0,ref:T,className:H(N.root,i),additionalProps:{disabled:A&&l?!0:void 0,tabIndex:y&&l?-1:v,...P},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),O(t)},onKeyUp:t=>{e.onKeyUp?.(t),k(t)}})}),[ie,ae]=X(`label`,{elementType:Zp,externalForwardedProps:I,ownerState:M,className:N.label});return(0,V.jsxs)(ne,{as:j,...re,children:[ee||te,(0,V.jsx)(ie,{...ae,children:d}),F]})}),em=Dl((0,V.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),tm={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},nm={opacity:0,visibility:`hidden`},rm=E.forwardRef(function(e,t){let n=$o(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,disablePrefersReducedMotion:s=!1,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:_=r,...v}=e,y=ru(n.motion.reducedMotion,s),b=E.useRef(null),x=Ts(b,Np(o),t),S=qs(b,f),C=qs(b,(e,t)=>{y.shouldReduceMotion||Ls(e);let r=Ys({style:g,timeout:_,easing:c},{mode:`enter`}),i=y.getTransitionTiming({duration:r.duration,delay:r.delay});e.style.transition=n.transitions.create(`opacity`,{duration:i.duration,easing:r.easing,delay:i.delay}),u&&u(e,t)}),w=qs(b,d),T=qs(b,h),D=qs(b,e=>{let t=Ys({style:g,timeout:_,easing:c},{mode:`exit`}),r=y.getTransitionTiming({duration:t.duration,delay:t.delay});e.style.transition=n.transitions.create(`opacity`,{duration:r.duration,easing:t.easing,delay:r.delay}),p&&p(e)}),O=qs(b,e=>{e.style.transition=``,m&&m(e)});return(0,V.jsx)(Gl,{appear:a,in:l,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:D,onExited:O,onExiting:T,addEndListener:i?e=>{i(b.current,e)}:void 0,reduceMotion:y.shouldReduceMotion,timeout:_,...v,children:(e,{ownerState:t,...n})=>{let r=Js(e,l,tm,nm,g,o.props.style);return E.cloneElement(o,{style:r,ref:x,...n})}})});function im(e){return zr(`MuiBackdrop`,e)}U(`MuiBackdrop`,[`root`,`invisible`]);var am=e=>{let{classes:t,invisible:n}=e;return W({root:[`root`,n&&`invisible`]},im,t)},om=K(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),sm=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,slotProps:c={},slots:l={},transitionDuration:u,...d}=n,f={...n,component:a,invisible:o},p=am(f),m={component:a,slots:l,slotProps:c},[h,g]=X(`root`,{elementType:om,externalForwardedProps:m,className:H(p.root,i),ownerState:f}),[_,v]=X(`transition`,{elementType:rm,externalForwardedProps:m,ownerState:f});return(0,V.jsx)(_,{in:s,timeout:u,...d,...v,children:(0,V.jsx)(h,{...g,ref:t,children:r})})}),cm=U(`MuiBox`,[`root`]),lm=Lr({themeId:Qo,defaultTheme:Xo(),defaultClassName:cm.root,generateClassName:Fr.generate});function um(e){return zr(`MuiButton`,e)}var dm=U(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),fm=E.createContext({}),pm=E.createContext(void 0),mm=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=W({root:[`root`,o&&`loading`,a,`size${Y(i)}`,`color${Y(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${Y(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},um,c);return{...c,...l}},hm=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],gm=K(Uu,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Y(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(J(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,...Zs(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${dm.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${dm.focusVisible}`]:{...e.focusVisible,boxShadow:e.focusVisible?.boxShadow?`${(e.vars||e).shadows[6]}, ${e.focusVisible.boxShadow}`:(e.vars||e).shadows[6]},[`&.${dm.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${dm.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${dm.focusVisible}`]:{boxShadow:e.focusVisible?.boxShadow??`none`},"&:active":{boxShadow:`none`},[`&.${dm.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loading:!0,loadingPosition:`center`},style:{...Zs(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${dm.loading}`]:{color:`transparent`}}}]}})),_m=K(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...Zs(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...hm]})),vm=K(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{...Zs(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...hm]})),ym=K(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),bm=K(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),xm=E.forwardRef(function(e,t){let n=E.useContext(fm),r=E.useContext(pm),i=q({props:Qr(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=Ml(h),T=_??(0,V.jsx)(sd,{"aria-labelledby":w,color:`inherit`,size:16}),D={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},O=mm(D),k=(b||g&&v===`start`)&&(0,V.jsx)(_m,{className:O.startIcon,ownerState:D,children:b||(0,V.jsx)(bm,{className:O.loadingIconPlaceholder,ownerState:D})}),A=(f||g&&v===`end`)&&(0,V.jsx)(vm,{className:O.endIcon,ownerState:D,children:f||(0,V.jsx)(bm,{className:O.loadingIconPlaceholder,ownerState:D})}),j=r||``,M=typeof g==`boolean`?(0,V.jsx)(`span`,{className:O.loadingWrapper,style:{display:`contents`},children:g&&(0,V.jsx)(ym,{className:O.loadingIndicator,ownerState:D,children:T})}):null,{root:N,...P}=O;return(0,V.jsxs)(gm,{ownerState:D,className:H(n.className,O.root,c,j),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:H(O.focusVisible,p),ref:t,internalNativeButton:!0,type:x,id:g?w:h,...C,classes:P,children:[k,v!==`end`&&M,a,v===`end`&&M,A]})});function Sm(e){return zr(`MuiCard`,e)}U(`MuiCard`,[`root`]);var Cm=e=>{let{classes:t}=e;return W({root:[`root`]},Sm,t)},wm=K(fu,{name:`MuiCard`,slot:`Root`})({overflow:`hidden`}),Tm=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiCard`}),{className:r,raised:i=!1,...a}=n,o={...n,raised:i},s=Cm(o);return(0,V.jsx)(wm,{className:H(s.root,r),elevation:i?8:void 0,ref:t,ownerState:o,...a})});function Em(e){return zr(`MuiCardActionArea`,e)}var Dm=U(`MuiCardActionArea`,[`root`,`focusVisible`,`focusHighlight`]),Om=e=>{let{classes:t}=e;return W({root:[`root`],focusHighlight:[`focusHighlight`]},Em,t)},km=K(Uu,{name:`MuiCardActionArea`,slot:`Root`})(J(({theme:e})=>({display:`block`,textAlign:`inherit`,borderRadius:`inherit`,width:`100%`,[`&:hover .${Dm.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},...e.focusVisible?Qa(1):{[`&.${Dm.focusVisible} .${Dm.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}}))),Am=K(`span`,{name:`MuiCardActionArea`,slot:`FocusHighlight`})(J(({theme:e})=>({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`,opacity:0,backgroundColor:`currentcolor`,...Zs(e,`opacity`,{duration:e.transitions.duration.short})}))),jm=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiCardActionArea`}),{children:r,className:i,focusVisibleClassName:a,slots:o={},slotProps:s={},...c}=n,l=n,u=Om(l),d={slots:o,slotProps:s},[f,p]=X(`root`,{elementType:km,externalForwardedProps:{...d,...c},shouldForwardComponentProp:!0,ownerState:l,ref:t,className:H(u.root,i),additionalProps:{internalNativeButton:!0,focusVisibleClassName:H(a,u.focusVisible)}}),[m,h]=X(`focusHighlight`,{elementType:Am,externalForwardedProps:d,ownerState:l,className:u.focusHighlight});return(0,V.jsxs)(f,{...p,children:[r,(0,V.jsx)(m,{...h})]})});function Mm(e){return e.substring(2).toLowerCase()}function Nm(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Pm(e){let{children:t,disableReactTree:n=!1,mouseEvent:r=`onClick`,onClickAway:i,touchEvent:a=`onTouchEnd`}=e,o=E.useRef(!1),s=E.useRef(null),c=E.useRef(!1),l=E.useRef(!1);E.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);let u=ms(Np(t),s),d=hs(e=>{let t=l.current;l.current=!1;let r=gs(s.current);if(!c.current||!s.current||`clientX`in e&&Nm(e,r))return;if(o.current){o.current=!1;return}let a;a=e.composedPath?e.composedPath().includes(s.current):!Id(r.documentElement,e.target)||Id(s.current,e.target),a||!n&&t||i(e)}),f=e=>n=>{l.current=!0;let r=t.props[e];r&&r(n)},p={ref:u};return a!==!1&&(p[a]=f(a)),E.useEffect(()=>{if(a!==!1){let e=Mm(a),t=gs(s.current),n=()=>{o.current=!0};return t.addEventListener(e,d),t.addEventListener(`touchmove`,n),()=>{t.removeEventListener(e,d),t.removeEventListener(`touchmove`,n)}}},[d,a]),r!==!1&&(p[r]=f(r)),E.useEffect(()=>{if(r!==!1){let e=Mm(r),t=gs(s.current);return t.addEventListener(e,d),()=>{t.removeEventListener(e,d)}}},[d,r]),E.cloneElement(t,p)}function Fm(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Im(e){let t=gs(e);return e===t.body||e===t.documentElement?_s(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Lm(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function Rm(e){return parseFloat(_s(e).getComputedStyle(e).paddingRight)||0}function zm(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function Bm(e,t){let n=new Set,r=e;for(;r&&r!==t;)n.add(r),r=r.parentElement;return r===t?n:new Set}function Vm(e,t,n,r){[].forEach.call(e.children,e=>{e===t||zm(e)||(n.has(e)?Vm(e,t,n,r):r.add(e))})}function Hm(e){let{container:t,modals:n}=e,r=n[n.length-1].modalRef,i=new Set;Vm(t,r,Bm(r,t),i),i.forEach(t=>{!e.hiddenSet.has(t)&&t.getAttribute(`aria-hidden`)===`true`&&i.delete(t)}),e.hiddenSet.forEach(e=>{i.has(e)||Lm(e,!1)}),i.forEach(e=>Lm(e,!0)),r&&Lm(r,!1),e.hiddenSet=i}function Um(e,t){let n=[],r=e.container;if(!t.disableScrollLock){let e;if(r.parentNode instanceof DocumentFragment)e=gs(r).body;else{let t=r.parentElement,n=_s(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}if(Im(e)){let t=Fm(_s(e));n.push({value:e.style.paddingRight,property:`padding-right`,el:e}),e.style.paddingRight=`${Rm(e)+t}px`;let i=gs(r).querySelectorAll(`.mui-fixed`);[].forEach.call(i,e=>{n.push({value:e.style.paddingRight,property:`padding-right`,el:e}),e.style.paddingRight=`${Rm(e)+t}px`})}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}var Wm=class{containers=[];modals=[];add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Lm(e.modalRef,!1);let r=this.containers.findIndex(e=>e.container===t);if(r!==-1)return this.containers[r].modals.push(e),Hm(this.containers[r]),n;let i={modals:[e],container:t,restore:null,hiddenSet:new Set};return this.containers.push(i),Hm(i),n}mount(e,t){let n=this.containers.findIndex(t=>t.modals.includes(e)),r=this.containers[n];r.restore||=Um(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=this.containers.findIndex(t=>t.modals.includes(e)),i=this.containers[r];return i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0?(i.restore&&i.restore(),e.modalRef&&Lm(e.modalRef,t),i.hiddenSet.forEach(e=>Lm(e,!1)),i.hiddenSet.clear(),this.containers.splice(r,1)):(Hm(i),e.modalRef&&Lm(e.modalRef,t)),n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},Gm=Id,Km=`data-mui-focusable`;function qm(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${Km}]`):null}var Jm=`input,select,textarea,a[href],button,[tabindex],audio[controls],video[controls],[contenteditable]:not([contenteditable="false"])`;function Ym(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function Xm(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function Zm(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||Xm(e))}function Qm(e){let t=[],n=[];return Array.from(e.querySelectorAll(Jm)).forEach((e,r)=>{let i=Ym(e);i!==-1&&Zm(e)&&(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function $m(){return!0}function eh(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Qm,isEnabled:o=$m,open:s}=e,c=E.useRef(!1),l=E.useRef(null),u=E.useRef(null),d=E.useRef(null),f=E.useRef(null),p=E.useRef(!1),m=E.useRef(null),h=ms(Np(t),m),g=E.useRef(null);E.useEffect(()=>{s&&m.current&&(p.current=!n)},[n,s]),E.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=ks(gs(m.current)),t=qm(m.current)??m.current;return Gm(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{!i&&d.current&&(c.current=!0,d.current.focus(),d.current=null)}},[s]),E.useEffect(()=>{if(!s||!m.current)return;let e=gs(m.current),t=t=>{if(g.current=t,r||!o()||t.key!==`Tab`)return;let n=m.current,i=ks(e);if(n===null)return;let s=qm(n);if(i===n||i===s){let e=a(n);if(e.length===0)return;t.preventDefault(),t.shiftKey?e[e.length-1].focus():e[0].focus()}else if(Gm(n,i)){let e=a(n),r=e.indexOf(i);if(r===-1||!e.some(e=>Ym(e)>0))return;t.preventDefault();let o=0;o=t.shiftKey?r<=0?e.length-1:r-1:r===e.length-1?0:r+1,e[o].focus()}},n=()=>{let t=m.current;if(t===null)return;let n=ks(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(Gm(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=ks(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,V.jsxs)(E.Fragment,{children:[(0,V.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),E.cloneElement(t,{ref:h,onFocus:_}),(0,V.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function th(e){return typeof e==`function`?e():e}function nh(e){return e?e.props.hasOwnProperty(`in`):!1}var rh=()=>{},ih=new Wm;function ah(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:o,onClose:s,open:c,rootRef:l}=e,u=E.useRef({}),d=E.useRef(null),f=E.useRef(null),p=E.useRef(null),m=ms(p,l),[h,g]=E.useState(!c),_=nh(o),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>gs(d.current),b=()=>(u.current.modalRef=p.current,u.current.mount=d.current,u.current),x=()=>{ih.mount(b(),{disableScrollLock:n}),p.current&&(p.current.scrollTop=0)},S=hs(()=>{let e=th(t)||y().body;ih.add(b(),e),p.current&&x()}),C=()=>ih.isTopModal(b()),w=hs(e=>{d.current=e,e&&(f.current=e,c&&C()?x():p.current&&Lm(p.current,v))}),T=E.useCallback(()=>{ih.remove(b(),v)},[v]);E.useEffect(()=>()=>{T()},[T]),E.useEffect(()=>{c?S():_&&r||T()},[c,T,_,r,S]);let D=e=>t=>{e.onKeyDown?.(t),t.key===`Escape`&&t.which!==229&&C()&&(t.stopPropagation(),s&&s(t,`escapeKeyDown`))},O=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&s&&s(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=ou(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:D(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:O(t),open:c}},getTransitionProps:()=>({onEnter:Sl(()=>{g(!1),i&&i()},o?.props.onEnter??rh),onExited:Sl(()=>{g(!0),a&&a(),r&&T()},o?.props.onExited??rh)}),rootRef:m,portalRef:w,portalContainer:!c&&_&&!h?f.current??t:t,isTopModal:C,exited:h,hasTransition:_}}function oh(e){return zr(`MuiModal`,e)}U(`MuiModal`,[`root`,`hidden`,`backdrop`]);var sh=e=>{let{open:t,exited:n,classes:r}=e;return W({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},oh,r)},ch=K(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(J(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),lh=K(sm,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),uh=E.forwardRef(function(e,t){let n=q({name:`MuiModal`,props:e}),{classes:r,className:i,closeAfterTransition:a=!1,children:o,container:s,component:c,disableAutoFocus:l=!1,disableEnforceFocus:u=!1,disablePortal:d=!1,disableRestoreFocus:f=!1,disableScrollLock:p=!1,hideBackdrop:m=!1,keepMounted:h=!1,onClose:g,onTransitionEnter:_,onTransitionExited:v,open:y,slotProps:b={},slots:x={},theme:S,...C}=n,w={...n,closeAfterTransition:a,disableAutoFocus:l,disableEnforceFocus:u,disablePortal:d,disableRestoreFocus:f,disableScrollLock:p,hideBackdrop:m,keepMounted:h},{getRootProps:T,getBackdropProps:D,getTransitionProps:O,portalRef:k,portalContainer:A,isTopModal:j,exited:M,hasTransition:N}=ah({...w,rootRef:t}),P={...w,exited:M},F=sh(P),ee={};if(o.props.tabIndex===void 0&&(ee.tabIndex=`-1`),N){let{onEnter:e,onExited:t}=O();ee.onEnter=e,ee.onExited=t}let te={slots:x,slotProps:b},[I,ne]=X(`root`,{ref:t,elementType:ch,externalForwardedProps:{...te,...C,component:c},getSlotProps:T,ownerState:P,className:H(i,F?.root,!P.open&&P.exited&&F?.hidden)}),[re,ie]=X(`backdrop`,{elementType:lh,externalForwardedProps:te,shouldForwardComponentProp:!0,getSlotProps:e=>D({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:F?.backdrop,ownerState:P});return!h&&!y&&(!N||M)?null:(0,V.jsx)(Ip,{ref:k,container:A,disablePortal:d,children:(0,V.jsxs)(I,{...ne,children:[m?null:(0,V.jsx)(re,{...ie}),(0,V.jsx)(eh,{disableEnforceFocus:u,disableAutoFocus:l,disableRestoreFocus:f,isEnabled:j,open:y,children:E.cloneElement(o,ee)})]})})});function dh(e){return zr(`MuiDialog`,e)}U(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]);var fh=E.createContext({}),ph=K(sm,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),mh=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return W({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${Y(n)}`],paper:[`paper`,`paperWidth${Y(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},dh,t)},hh=K(uh,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),gh=K(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${Y(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),_h=K(fu,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperWidth${Y(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(J(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,outline:0,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:`xs`,scroll:`body`},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t,scroll:`body`},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0}},{props:({ownerState:e})=>e.fullScreen&&e.scroll===`body`,style:{margin:0,maxWidth:`100%`}}]}))),vh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDialog`}),r=$o(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,children:c,className:l,fullScreen:u=!1,fullWidth:d=!1,maxWidth:f=`sm`,onClick:p,onClose:m,open:h,PaperComponent:g=fu,role:_=`dialog`,scroll:v=`paper`,slots:y={},slotProps:b={},transitionDuration:x=i,...S}=n,C={...n,fullScreen:u,fullWidth:d,maxWidth:f,scroll:v},w=mh(C),T=E.useRef(),D=e=>{T.current=e.target===e.currentTarget},O=e=>{p&&p(e),T.current&&(T.current=null,m&&m(e,`backdropClick`))},k=zi(o),A=E.useMemo(()=>({titleId:k}),[k]),j={slots:y,slotProps:b},[M,N]=X(`root`,{elementType:hh,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:C,className:H(w.root,l),ref:t}),[P,F]=X(`backdrop`,{elementType:ph,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:C,className:w.backdrop}),[ee,te]=X(`paper`,{elementType:_h,shouldForwardComponentProp:!0,externalForwardedProps:j,ownerState:C,className:w.paper,additionalProps:{elevation:24,role:_,"aria-describedby":a,"aria-labelledby":k,"aria-modal":s,tabIndex:-1,[Km]:``}}),[I,ne]=X(`container`,{elementType:gh,externalForwardedProps:j,ownerState:C,className:w.container}),[re,ie]=X(`transition`,{elementType:rm,externalForwardedProps:j,ownerState:C,additionalProps:{appear:!0,in:h,timeout:x,role:`presentation`}});return(0,V.jsx)(M,{closeAfterTransition:!0,slots:{backdrop:P},slotProps:{backdrop:{transitionDuration:x,...F}},onClose:m,open:h,onClick:O,...N,...S,children:(0,V.jsx)(re,{...ie,children:(0,V.jsx)(I,{onMouseDown:D,...ne,children:(0,V.jsx)(ee,{as:g,...te,children:(0,V.jsx)(fh.Provider,{value:A,children:c})})})})})});function yh(e){return zr(`MuiDialogActions`,e)}U(`MuiDialogActions`,[`root`,`spacing`]);var bh=e=>{let{classes:t,disableSpacing:n}=e;return W({root:[`root`,!n&&`spacing`]},yh,t)},xh=K(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Sh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=bh(o);return(0,V.jsx)(xh,{className:H(s.root,r),ownerState:o,ref:t,...a})});function Ch(e){return zr(`MuiDialogContent`,e)}U(`MuiDialogContent`,[`root`,`dividers`]);function wh(e){return zr(`MuiDialogTitle`,e)}var Th=U(`MuiDialogTitle`,[`root`]),Eh=e=>{let{classes:t,dividers:n}=e;return W({root:[`root`,n&&`dividers`]},Ch,t)},Dh=K(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(J(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,...e.focusVisible&&{"&:focus-visible":{...Qa(1),...e.focusVisible}},variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${Th.root} + &`]:{paddingTop:0}}}]}))),Oh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=Eh(o);return(0,V.jsx)(Dh,{className:H(s.root,r),ownerState:o,ref:t,...a})}),kh=e=>{let{classes:t}=e;return W({root:[`root`]},wh,t)},Ah=K(Z,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),jh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=kh(o),{titleId:c=i}=E.useContext(fh);return(0,V.jsx)(Ah,{component:`h2`,className:H(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function Mh(e){return zr(`MuiDivider`,e)}var Nh=U(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`vertical`,`withChildren`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),Ph=e=>{let{absolute:t,children:n,classes:r,flexItem:i,orientation:a,textAlign:o,variant:s}=e;return W({root:[`root`,t&&`absolute`,s,a===`vertical`&&`vertical`,i&&`flexItem`,n&&`withChildren`,o===`right`&&a!==`vertical`&&`textAlignRight`,o===`left`&&a!==`vertical`&&`textAlignLeft`],wrapper:[`wrapper`,a===`vertical`&&`wrapperVertical`]},Mh,r)},Fh=K(`div`,{name:`MuiDivider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.orientation===`vertical`&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.textAlign===`right`&&n.orientation!==`vertical`&&t.textAlignRight,n.textAlign===`left`&&n.orientation!==`vertical`&&t.textAlignLeft]}})(J(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:`solid`,borderColor:(e.vars||e).palette.divider,borderBottomWidth:`thin`,variants:[{props:{absolute:!0},style:{position:`absolute`,bottom:0,left:0,width:`100%`}},{props:{variant:`inset`},style:{marginLeft:72}},{props:{variant:`middle`,orientation:`horizontal`},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:`middle`,orientation:`vertical`},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:`vertical`},style:{height:`100%`,borderBottomWidth:0,borderRightWidth:`thin`}},{props:{flexItem:!0},style:{alignSelf:`stretch`,height:`auto`}},{props:({ownerState:e})=>!!e.children,style:{display:`flex`,textAlign:`center`,border:0,borderTopStyle:`solid`,borderLeftStyle:`solid`,"&::before, &::after":{content:`""`,alignSelf:`center`}}},{props:({ownerState:e})=>e.children&&e.orientation!==`vertical`,style:{"&::before, &::after":{width:`100%`,borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:`inherit`}}},{props:({ownerState:e})=>e.orientation===`vertical`&&e.children,style:{flexDirection:`column`,"&::before, &::after":{height:`100%`,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:`inherit`}}},{props:({ownerState:e})=>e.textAlign===`right`&&e.orientation!==`vertical`,style:{"&::before":{width:`90%`},"&::after":{width:`10%`}}},{props:({ownerState:e})=>e.textAlign===`left`&&e.orientation!==`vertical`,style:{"&::before":{width:`10%`},"&::after":{width:`90%`}}}]}))),Ih=K(`span`,{name:`MuiDivider`,slot:`Wrapper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,n.orientation===`vertical`&&t.wrapperVertical]}})(J(({theme:e})=>({display:`inline-block`,paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:`nowrap`,variants:[{props:{orientation:`vertical`},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Lh=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDivider`}),{absolute:r=!1,children:i,className:a,orientation:o=`horizontal`,component:s=i||o===`vertical`?`div`:`hr`,flexItem:c=!1,role:l=s===`hr`?void 0:`separator`,textAlign:u=`center`,variant:d=`fullWidth`,...f}=n,p={...n,absolute:r,component:s,flexItem:c,orientation:o,role:l,textAlign:u,variant:d},m=Ph(p);return(0,V.jsx)(Fh,{as:s,className:H(m.root,a),role:l,ref:t,ownerState:p,"aria-orientation":l===`separator`&&(s!==`hr`||o===`vertical`)?o:void 0,...f,children:i?(0,V.jsx)(Ih,{className:m.wrapper,ownerState:p,children:i}):null})}),Rh={visibility:`hidden`},zh={};function Bh(e){return typeof e==`string`&&/^translate\(.+,\s*.+\)$/.test(e)}function Vh(e,t,n,r=zh){let{resetInlineTransform:i=!0}=r,a=n&&n.getBoundingClientRect(),o=Al(t),s,c;if(i){let e=t.style.transform,n=t.style.transition;t.style.transition=``,t.style.transform=``,s=t.getBoundingClientRect(),c=o.getComputedStyle(t).getPropertyValue(`transform`),t.style.transform=e,t.style.transition=n}else s=t.getBoundingClientRect(),c=o.getComputedStyle(t).getPropertyValue(`transform`);let{offsetX:l,offsetY:u}=Ks(c);return e===`left`?a?`translateX(${a.right+l-s.left}px)`:`translateX(${o.innerWidth+l-s.left}px)`:e===`right`?a?`translateX(-${s.right-a.left-l}px)`:`translateX(-${s.left+s.width-l}px)`:e===`up`?a?`translateY(${a.bottom+u-s.top}px)`:`translateY(${o.innerHeight+u-s.top}px)`:a?`translateY(-${s.top-a.top+s.height-u}px)`:`translateY(-${s.top+s.height-u}px)`}function Hh(e){return typeof e==`function`?e():e}function Uh(e,t,n,r){let i=Vh(e,t,Hh(n),r);i&&(t.style.transform=i)}var Wh=E.forwardRef(function(e,t){let n=$o(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:o=!0,children:s,container:c,disablePrefersReducedMotion:l=!1,direction:u=`down`,easing:d=r,in:f,onEnter:p,onEntered:m,onEntering:h,onExit:g,onExited:_,onExiting:v,style:y,timeout:b=i,...x}=e,S=ru(n.motion.reducedMotion,l),C=E.useRef(null),w=E.useRef(!1),T=Ts(Np(s),C,t),D=qs(C,(e,t)=>{Uh(u,e,c),S.shouldReduceMotion||Ls(e),p&&p(e,t)}),O=qs(C,(e,t)=>{let r=Ys({timeout:b,style:y,easing:d},{mode:`enter`}),i=S.getTransitionTiming({duration:r.duration,delay:r.delay});e.style.transition=n.transitions.create(`transform`,{duration:i.duration,easing:r.easing,delay:i.delay}),e.style.transform=`none`,h&&h(e,t)}),k=qs(C,m),A=qs(C,v),j=qs(C,e=>{let t=Ys({timeout:b,style:y,easing:d},{mode:`exit`}),r=S.getTransitionTiming({duration:t.duration,delay:t.delay});e.style.transition=n.transitions.create(`transform`,{duration:r.duration,easing:t.easing,delay:r.delay});let i=Bh(e.style.transform);w.current=i,Uh(u,e,c,{resetInlineTransform:!i}),g&&g(e)}),M=qs(C,e=>{w.current=!1,e.style.transition=``,_&&_(e)}),N=a?e=>{a(C.current,e)}:void 0,P=E.useCallback(()=>{C.current&&Uh(u,C.current,c)},[u,c]);return E.useEffect(()=>{if(f||u===`down`||u===`right`)return;let e=Ol(()=>{C.current&&Uh(u,C.current,c)}),t=Al(C.current);return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[u,f,c]),E.useEffect(()=>{!f&&!w.current&&P()},[f,P]),(0,V.jsx)(Gl,{nodeRef:C,onEnter:D,onEntered:k,onEntering:O,onExit:j,onExited:M,onExiting:A,addEndListener:N,appear:o,in:f,reduceMotion:S.shouldReduceMotion,timeout:b,...x,children:(e,{ownerState:t,...n})=>{let r;return r=e===`exited`&&!f?y||s.props.style?{visibility:`hidden`,...y,...s.props.style}:Rh:y&&s.props.style?{...y,...s.props.style}:y||s.props.style,E.cloneElement(s,{ref:T,style:r,...n})}})});function Gh(e){return zr(`MuiDrawer`,e)}U(`MuiDrawer`,[`root`,`docked`,`paper`,`anchorLeft`,`anchorRight`,`anchorTop`,`anchorBottom`,`modal`]);var Kh=(e,t)=>{let{ownerState:n}=e;return[t.root,(n.variant===`permanent`||n.variant===`persistent`)&&t.docked,n.variant===`temporary`&&t.modal]},qh=e=>{let{classes:t,anchor:n,variant:r}=e;return W({root:[`root`,`anchor${Y(n)}`],docked:[(r===`permanent`||r===`persistent`)&&`docked`],modal:[`modal`],paper:[`paper`]},Gh,t)},Jh=K(uh,{name:`MuiDrawer`,slot:`Root`,overridesResolver:Kh})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Yh=K(`div`,{shouldForwardProp:ns,name:`MuiDrawer`,slot:`Docked`,skipVariantsResolver:!1,overridesResolver:Kh})({flex:`0 0 auto`}),Xh=K(fu,{name:`MuiDrawer`,slot:`Paper`})(J(({theme:e})=>({overflowY:`auto`,display:`flex`,flexDirection:`column`,height:`100%`,flex:`1 0 auto`,zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:`touch`,position:`fixed`,top:0,outline:0,variants:[{props:{anchor:`left`},style:{left:0}},{props:{anchor:`top`},style:{top:0,left:0,right:0,height:`auto`,maxHeight:`100%`}},{props:{anchor:`right`},style:{right:0}},{props:{anchor:`bottom`},style:{top:`auto`,left:0,bottom:0,right:0,height:`auto`,maxHeight:`100%`}},{props:({ownerState:e})=>e.anchor===`left`&&e.variant!==`temporary`,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>e.anchor===`top`&&e.variant!==`temporary`,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>e.anchor===`right`&&e.variant!==`temporary`,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>e.anchor===`bottom`&&e.variant!==`temporary`,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Zh={left:`right`,right:`left`,top:`down`,bottom:`up`};function Qh(e){return[`left`,`right`].includes(e)}function $h({direction:e},t){return e===`rtl`&&Qh(t)?Zh[t]:t}var eg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiDrawer`}),r=$o(),i=ji(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:o=`left`,children:s,className:c,elevation:l=16,hideBackdrop:u=!1,ModalProps:d={},onClose:f,open:p=!1,transitionDuration:m=a,variant:h=`temporary`,slots:g={},slotProps:_={},...v}=n,y=E.useRef(!1),b=E.useRef(null),x=Ts(t,b);E.useEffect(()=>{y.current=!0},[]);let S=E.useCallback(()=>b.current,[]),C=$h({direction:i?`rtl`:`ltr`},o),w=o,T={...n,anchor:w,elevation:l,open:p,variant:h,...v},D=qh(T),O={slots:g,slotProps:{..._,backdrop:Ll(_.backdrop,{transitionDuration:m})}},[k,A]=X(`root`,{ref:x,elementType:Jh,className:H(D.root,D.modal,c),shouldForwardComponentProp:!0,ownerState:T,externalForwardedProps:{...O,...v,...d},additionalProps:{closeAfterTransition:!0,open:p,onClose:f,hideBackdrop:u,slots:{backdrop:O.slots.backdrop},slotProps:{backdrop:O.slotProps.backdrop}}}),[j,M]=X(`paper`,{elementType:Xh,shouldForwardComponentProp:!0,className:D.paper,ownerState:T,externalForwardedProps:O,additionalProps:{elevation:h===`temporary`?l:0,square:!0,...h===`temporary`&&{role:`dialog`,"aria-modal":`true`,"data-mui-focusable":``,tabIndex:-1}}}),[N,P]=X(`docked`,{elementType:Yh,ref:x,className:H(D.root,D.docked,c),ownerState:T,externalForwardedProps:O,additionalProps:v}),[F,ee]=X(`transition`,{elementType:Wh,ownerState:T,externalForwardedProps:O,additionalProps:{in:p,direction:Zh[C],timeout:m,appear:y.current,...h===`temporary`&&(g.transition==null||g.transition===Wh)&&{container:S}}}),te=(0,V.jsx)(j,{...M,children:s});if(h===`permanent`)return(0,V.jsx)(N,{...P,children:te});let I=(0,V.jsx)(F,{...ee,children:te});return h===`persistent`?(0,V.jsx)(N,{...P,children:I}):(0,V.jsx)(k,{...A,children:I})});function tg(e){return zr(`MuiFab`,e)}var ng=U(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),rg=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=W({root:[`root`,n,`size${Y(i)}`,t===`inherit`?`colorInherit`:t]},tg,r);return{...r,...a}},ig=K(Uu,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>ns(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Y(n.size)}`],n.color===`inherit`&&t.colorInherit,t[Y(n.size)],t[n.color]]}})(J(({theme:e})=>({...e.typography.button,minHeight:36,...Zs(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),borderRadius:`50%`,padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:`none`},[`&.${ng.focusVisible}`]:{...e.focusVisible,boxShadow:e.focusVisible?.boxShadow?`${(e.vars||e).shadows[6]}, ${e.focusVisible.boxShadow}`:(e.vars||e).shadows[6]},variants:[{props:{size:`small`},style:{width:40,height:40}},{props:{size:`medium`},style:{width:48,height:48}},{props:{variant:`extended`},style:{borderRadius:24,padding:`0 16px`,width:`auto`,minHeight:`auto`,minWidth:48,height:48}},{props:{variant:`extended`,size:`small`},style:{width:`auto`,padding:`0 8px`,borderRadius:17,minWidth:34,height:34}},{props:{variant:`extended`,size:`medium`},style:{width:`auto`,padding:`0 16px`,borderRadius:20,minWidth:40,height:40}},{props:{color:`inherit`},style:{color:`inherit`}}]})),J(({theme:e})=>({variants:[...Object.entries(e.palette).filter(qu([`dark`,`contrastText`])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),J(({theme:e})=>({[`&.${ng.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),ag=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFab`}),{children:r,className:i,color:a=`default`,component:o=`button`,disabled:s=!1,disableFocusRipple:c=!1,focusVisibleClassName:l,size:u=`large`,variant:d=`circular`,...f}=n,p={...n,color:a,component:o,disabled:s,disableFocusRipple:c,size:u,variant:d},m=rg(p),{root:h,...g}=m;return(0,V.jsx)(ig,{className:H(m.root,i),component:o,internalNativeButton:!0,disabled:s,focusRipple:!c,focusVisibleClassName:H(m.focusVisible,l),ownerState:p,ref:t,...f,classes:g,children:r})});function og(e){return zr(`MuiSelect`,e)}var sg=U(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`nativeInput`,`error`]),cg=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=W({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${Y(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},cc,t);return{...t,...c}},lg=K(ic,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...tc(e,t),!n.disableUnderline&&t.underline]}})(J(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,...Zs(e,`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${lc.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${lc.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...Zs(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${lc.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${lc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...Zs(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${lc.disabled}, .${lc.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${lc.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{"--_trailingPad":`12px`,paddingRight:`var(--_trailingPad)`,[`&.${sg.root}`]:{"--_trailingPad":`0px`}}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),ug=K(ac,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:nc})(J(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`,...e.vars&&{WebkitBoxShadow:e.vars.palette.Input.autofillWebkitBoxShadow,...e.applyStyles(`dark`,{WebkitTextFillColor:`#fff`,caretColor:`#fff`})}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),dg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,fullWidth:i=!1,hiddenLabel:a,inputComponent:o=`input`,multiline:s=!1,notched:c,slotProps:l,slots:u={},type:d=`text`,...f}=n,p={...n,disableUnderline:r,fullWidth:i,inputComponent:o,multiline:s,type:d},m=cg(n),h={root:{ownerState:p},input:{ownerState:p}},g=l?A(h,l):h,_=u.root??lg,v=u.input??ug;return(0,V.jsx)(sc,{slots:{root:_,input:v},slotProps:g,fullWidth:i,inputComponent:o,multiline:s,ref:t,type:d,...f,classes:m})});dg.muiName=`Input`;function fg(e){return zr(`MuiFormControl`,e)}U(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var pg=e=>{let{classes:t,margin:n,fullWidth:r}=e;return W({root:[`root`,n!==`none`&&`margin${Y(n)}`,r&&`fullWidth`]},fg,t)},mg=K(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${Y(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),hg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=pg(_),[y,b]=E.useState(()=>{let e=!1;return r&&E.Children.forEach(r,t=>{if(!kl(t,[`Input`,`Select`]))return;let n=kl(t,[`Select`])?t.props.input:t;n&&Ms(n.props)&&(e=!0)}),e}),[x,S]=E.useState(()=>{let e=!1;return r&&E.Children.forEach(r,t=>{kl(t,[`Input`,`Select`])&&(js(t.props,!0)||js(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=E.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C,D;E.useRef(!1);let O=E.useCallback(()=>{S(!0)},[]),k=E.useCallback(()=>{S(!1)},[]),A=E.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:k,onFilled:O,registerEffect:D,required:p,variant:h}),[y,a,s,c,x,T,u,d,D,k,O,p,m,h]);return(0,V.jsx)(Cs.Provider,{value:A,children:(0,V.jsx)(mg,{as:o,ownerState:_,className:H(v.root,i),ref:t,...g,children:r})})}),gg,_g=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return W({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${Y(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},uc,t)},vg=K(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${Y(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(J(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${dc.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${dc.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),yg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,[m]=ws({props:n,states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};delete h.ownerState;let g=_g(h);return(0,V.jsx)(vg,{as:a,className:H(g.root,i),ref:t,...p,ownerState:h,children:r===` `?gg||=(0,V.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):r})}),bg=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return W({root:[`root`,`color${Y(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},fc,t)},xg=K(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(J(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{[`&.${pc.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${pc.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${pc.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Sg=K(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(J(({theme:e})=>({[`&.${pc.error}`]:{color:(e.vars||e).palette.error.main}}))),Cg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,[p]=ws({props:n,states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=bg(m);return(0,V.jsxs)(xg,{as:o,ownerState:m,className:H(h.root,i),ref:t,...f,children:[r,p.required&&(0,V.jsxs)(Sg,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function wg(e){return`scale(${e}, ${e**2})`}var Tg={entering:{opacity:1,transform:wg(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:wg(.75)},exited:{opacity:0,transform:wg(.75)}},Eg={opacity:0,transform:wg(.75),visibility:`hidden`},Dg=E.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,disablePrefersReducedMotion:a=!1,easing:o,in:s,onEnter:c,onEntered:l,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:h=`auto`,...g}=e,_=E.useRef(null),v=$o(),y=ru(v.motion.reducedMotion,a),b=E.useRef(null),x=Ts(b,Np(i),t),S=qs(b,u),C=qs(b,(e,t)=>{y.shouldReduceMotion||Ls(e);let{duration:n,delay:r,easing:i}=Ys({style:m,timeout:h,easing:o},{mode:`enter`}),a;h===`auto`&&!y.shouldReduceMotion?(a=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=a):(a=n,_.current=null);let s=y.getTransitionTiming({duration:a,delay:r});e.style.transition=[v.transitions.create(`opacity`,{duration:s.duration,delay:s.delay}),v.transitions.create(`transform`,{duration:typeof s.duration==`string`?s.duration:s.duration*.666,delay:s.delay,easing:i})].join(`,`),c&&c(e,t)}),w=qs(b,l),T=qs(b,p),D=qs(b,e=>{let{duration:t,delay:n,easing:r}=Ys({style:m,timeout:h,easing:o},{mode:`exit`}),i;h===`auto`&&!y.shouldReduceMotion?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):(i=t,_.current=null);let a=y.getTransitionTiming({duration:i,delay:n});e.style.transition=[v.transitions.create(`opacity`,{duration:a.duration,delay:a.delay}),v.transitions.create(`transform`,{duration:typeof a.duration==`string`?a.duration:a.duration*.666,delay:a.delay||(typeof a.duration==`string`?a.duration:a.duration*.333),easing:r})].join(`,`),e.style.opacity=0,e.style.transform=wg(.75),d&&d(e)}),O=qs(b,e=>{e.style.transition=``,f&&f(e)});return(0,V.jsx)(Gl,{appear:r,in:s,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:D,onExited:O,onExiting:T,addEndListener:n?e=>{n(b.current,e)}:void 0,getAutoTimeout:h===`auto`?()=>_.current:void 0,reduceMotion:y.shouldReduceMotion,timeout:h===`auto`?null:h,...g,children:(e,{ownerState:t,...n})=>{let r=Js(e,s,Tg,Eg,m,i.props.style);return E.cloneElement(i,{style:r,ref:x,...n})}})});Dg&&(Dg.muiSupportAuto=!0);function Og(e){return zr(`MuiInputLabel`,e)}var kg=U(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),Ag=e=>{let{classes:t,disableUnderline:n}=e,r=W({root:[`root`,!n&&`underline`],input:[`input`]},mc,t);return{...t,...r}},jg=K(ic,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...tc(e,t),!n.disableUnderline&&t.underline]}})(J(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{[`label + &, .${kg.root} + &`]:{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...Zs(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${hc.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${hc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...Zs(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${hc.disabled}, .${hc.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${hc.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),Mg=K(ac,{name:`MuiInput`,slot:`Input`,overridesResolver:nc})({}),Ng=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiInput`}),{disableUnderline:r=!1,fullWidth:i=!1,inputComponent:a=`input`,multiline:o=!1,notched:s,slotProps:c,slots:l={},type:u=`text`,...d}=n,f=Ag(n),p={root:{ownerState:{disableUnderline:r}}},m=c?A(c,p):p,h=l.root??jg,g=l.input??Mg;return(0,V.jsx)(sc,{slots:{root:h,input:g},slotProps:m,fullWidth:i,inputComponent:a,multiline:o,ref:t,type:u,...d,classes:f})});Ng.muiName=`Input`;var Pg=U(`MuiInputAdornment`,[`root`,`filled`,`standard`,`outlined`,`positionStart`,`positionEnd`,`disablePointerEvents`,`hiddenLabel`,`sizeSmall`]),Fg=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=W({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${Y(r)}`,o],asterisk:[s&&`asterisk`]},Og,t);return{...t,...c}},Ig=K(Cg,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${pc.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(J(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{...Zs(e,[`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),Lg=E.forwardRef(function(e,t){let n=q({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,[l,u]=ws({props:n,states:[`size`,`variant`,`required`,`focused`]}),d=a;d===void 0&&u&&(d=u.filled||u.focused||u.adornedStart);let f={...n,disableAnimation:r,formControl:u,shrink:d,size:l.size,variant:l.variant,required:l.required,focused:l.focused},p=Fg(f);return(0,V.jsx)(Ig,{"data-shrink":d,ref:t,className:H(p.root,s),...c,ownerState:f,classes:p})}),Rg=E.createContext({});function zg(e){return zr(`MuiList`,e)}U(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var Bg=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return W({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},zg,t)},Vg=K(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0,isolation:`isolate`}}]}),Hg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=E.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=Bg(d);return(0,V.jsx)(Rg.Provider,{value:u,children:(0,V.jsxs)(Vg,{as:a,className:H(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),Ug=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Wg=e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:a,divider:o,selected:s}=e,c=W({root:[`root`,r&&`dense`,!a&&`gutters`,o&&`divider`,i&&`disabled`,t===`flex-start`&&`alignItemsFlexStart`,s&&`selected`]},gc,n);return{...n,...c}},Gg=K(Uu,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiListItemButton`,slot:`Root`,overridesResolver:Ug})(J(({theme:e})=>({display:`flex`,flexGrow:1,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minWidth:0,boxSizing:`border-box`,textAlign:`left`,paddingTop:8,paddingBottom:8,...Zs(e,`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${_c.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),...!e.focusVisible&&{[`&.${_c.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},[`&.${_c.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},...e.focusVisible?Qa(1):{[`&.${_c.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`&.${_c.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Kg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiListItemButton`}),{alignItems:r=`center`,autoFocus:i=!1,component:a=`div`,children:o,dense:s=!1,disableGutters:c=!1,divider:l=!1,focusVisibleClassName:u,selected:d=!1,className:f,...p}=n,m=E.useContext(Rg),h=E.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:c}),[r,m.dense,s,c]),g=E.useRef(null);Es(()=>{i&&g.current&&g.current.focus()},[i]);let _={...n,alignItems:r,dense:h.dense,disableGutters:c,divider:l,selected:d},v=Wg(_),{root:y,...b}=v,x=Ts(g,t);return(0,V.jsx)(Rg.Provider,{value:h,children:(0,V.jsx)(Gg,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&a===`div`?`button`:a,internalNativeButton:!1,focusVisibleClassName:H(v.focusVisible,u),ownerState:_,className:H(v.root,f),...p,classes:b,children:o})})}),qg=U(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]);function Jg(e){return zr(`MuiListItemText`,e)}var Yg=U(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),Xg=e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return W({root:[`root`,n&&`inset`,a&&`dense`,r&&i&&`multiline`],primary:[`primary`],secondary:[`secondary`]},Jg,t)},Zg=K(`div`,{name:`MuiListItemText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Yg.primary}`]:t.primary},{[`& .${Yg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:`1 1 auto`,minWidth:0,marginTop:4,marginBottom:4,[`.${Dd.root}:where(& .${Yg.primary})`]:{display:`block`},[`.${Dd.root}:where(& .${Yg.secondary})`]:{display:`block`},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Qg=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiListItemText`}),{children:r,className:i,disableTypography:a=!1,inset:o=!1,primary:s,secondary:c,slots:l={},slotProps:u={},...d}=n,{dense:f}=E.useContext(Rg),p=s??r,m=c,h={...n,disableTypography:a,inset:o,primary:!!p,secondary:!!m,dense:f},g=Xg(h),_={slots:l,slotProps:u},[v,y]=X(`root`,{className:H(g.root,i),elementType:Zg,externalForwardedProps:{..._,...d},ownerState:h,ref:t}),[b,x]=X(`primary`,{className:g.primary,elementType:Z,externalForwardedProps:_,ownerState:h}),[S,C]=X(`secondary`,{className:g.secondary,elementType:Z,externalForwardedProps:_,ownerState:h});return p!=null&&p.type!==Z&&!a&&(p=(0,V.jsx)(b,{variant:f?`body2`:`body1`,component:x?.variant?void 0:`span`,...x,children:p})),m!=null&&m.type!==Z&&!a&&(m=(0,V.jsx)(S,{variant:`body2`,color:`textSecondary`,...C,children:m})),(0,V.jsxs)(v,{...y,children:[p,m]})}),$g=E.createContext(void 0);function e_(){let e=E.useContext($g);if(e===void 0)throw Error(`MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.`);return e}var t_=Object.is;function n_(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!t_(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var r_=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`,`Home`,`End`];function i_(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:i=!1,isItemFocusable:a=v_,wrap:o=!0}=e,[s,c]=E.useState(t),[l,u]=E.useState(t),d=s;t!==l&&(u(t),t!==void 0&&t!==s&&(d=t,c(t)));let f=E.useRef(null),p=E.useRef(new Map),[m,h]=E.useState(0),g=E.useMemo(()=>h_(p.current),[m]),_=o_(d,g,a,n),v=E.useRef(_);v.current=_;let y=E.useCallback(()=>{let e=h_(p.current);return f_(e,o_(v.current,e,a,n))},[n,a]),b=E.useCallback(()=>p.current,[]),x=hs(e=>{n_(p.current.get(e.id)??null,e)||(p.current.set(e.id,e),h(e=>e+1))}),S=hs(e=>{p.current.delete(e)&&h(e=>e+1)}),C=hs(e=>{c(e)}),w=E.useCallback(e=>v.current===e,[]),T=E.useCallback((e,t,n,r)=>{let i=u_(g_(p.current),e,t,n,r??a);return i?(i.element?.focus(),c(i.id),i):null},[a]),D=E.useCallback((e,t,n)=>({onFocus:e=>{t?.(e);let n=g_(p.current),r=m_(n,e.target);r!==-1&&c(n[r].id)},onKeyDown:e=>{if(n?.(e),e.defaultPrevented||e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!r_.includes(e.key))return;let t=r===`horizontal`?`ArrowLeft`:`ArrowUp`,a=r===`horizontal`?`ArrowRight`:`ArrowDown`;r===`horizontal`&&i&&(t=`ArrowRight`,a=`ArrowLeft`);let s=g_(p.current),c=Os(gs(f.current)),l=c===f.current,u=l_(s,c,v.current),d=`next`;switch(e.key){case t:d=`previous`,e.preventDefault(),l&&(u=s.length);break;case a:e.preventDefault(),l&&(u=-1);break;case`Home`:e.preventDefault(),u=-1;break;case`End`:e.preventDefault(),d=`previous`,u=s.length;break;default:return}T(u,d,o)},ref:x_(e,e=>{f.current=e})}),[T,i,r,o]),O=E.useCallback(e=>{let t=g_(p.current),n=Os(gs(f.current)),r=n===f.current?-1:l_(t,n,v.current);return T(r,`next`,!0,e)?.id??null},[T]);return E.useMemo(()=>({activeItemId:_,focusNext:O,getActiveItem:y,getContainerProps:D,getItemMap:b,isItemActive:w,registerItem:x,setActiveItemId:C,unregisterItem:S}),[_,O,y,D,b,w,x,C,S])}function a_(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=e_(),i=E.useRef(null),a=E.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),o=E.useRef(a);o.current=a;let s=E.useCallback(t=>{i.current=t,t==null?queueMicrotask(()=>{i.current??r(e.id)}):n({...o.current,element:t})},[e.id,n,r]),c=ms(e.ref,s);return ti(()=>{i.current&&n({...a,element:i.current})},[a,n]),ti(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:c,tabIndex:t===e.id?0:-1}}function o_(e,t,n,r){return e==null?c_(t,n,r):s_(e,t,n)}function s_(e,t,n){let r=p_(t,e);return r===-1?d_(t,n):n(t[r])?t[r].id:u_(t,r,`next`,!1,n)?.id??null}function c_(e,t,n){let r=n?.(e);if(r!=null){let n=f_(e,r);if(n&&t(n))return n.id}return d_(e,t)}function l_(e,t,n){if(t){let n=m_(e,t);if(n!==-1)return n}return p_(e,n)}function u_(e,t,n,r,i){let a=e.length-1;if(a===-1)return null;let o=!1,s=__(t,a,n,r),c=s;for(;s!==-1;){if(s===c){if(o)return null;o=!0}let t=e[s];if(!t||!i(t))s=__(s,a,n,r);else return t}return null}function d_(e,t){return e.find(e=>t(e))?.id??null}function f_(e,t){return t==null?null:e.find(e=>e.id===t)??null}function p_(e,t){return t==null?-1:e.findIndex(e=>e.id===t)}function m_(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function h_(e){let t=Array.from(e.values());if(t.every(e=>e.element==null))return t;let n=t.filter(y_).sort((e,t)=>b_(e.element,t.element)),r=t.filter(e=>!y_(e));return[...n,...r]}function g_(e){return h_(e).filter(y_)}function __(e,t,n,r=!0){return n===`next`?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function v_(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute(`disabled`)&&e.element.getAttribute(`aria-disabled`)!==`true`&&e.element.hasAttribute(`tabindex`):!1}function y_(e){return e.element!=null&&e.element.isConnected}function b_(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function x_(...e){return t=>{e.forEach(e=>{jl(e??null,t)})}}var S_=Fm;function C_(e,t){if(t==null)e.focus();else try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}function w_(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function T_(e){return e==null||typeof e==`string`&&!e.trim()}function E_(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var D_=E.createContext(null);function O_(){return E.useContext(D_)}var k_=D_.Provider,A_=E.createContext(void 0);function j_(){let e=E.useContext(A_);if(e===void 0)throw Error(`MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.`);return e}function M_(e){let t=e?.element??e;if(!t)return``;if(e?.textValue!==void 0)return e.textValue;let n=t.innerText;return n===void 0&&(n=t.textContent),n??``}function N_(e,t){if(t===void 0)return!0;let n=M_(e);return n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function P_(e,t){return N_(e,t)?v_(e):!1}function F_(e,t){C_(e,t)}var I_=E.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=q({props:e,name:`MuiMenuList`}),f=E.useRef(null),p=E.useRef(!1),[m,h]=E.useState(!1),g=O_(),_=E.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=i_({activeItemId:void 0,getDefaultActiveItemId:E.useCallback(e=>u===`selectedMenu`?e.find(e=>e.selected&&v_(e))?.id??e.find(e=>v_(e))?.id??null:e.find(e=>v_(e))?.id??null,[u]),orientation:`vertical`,wrap:!c}),{activeItemId:y,focusNext:b,getActiveItem:x,getContainerProps:S,getItemMap:C}=v,w=Fl((e=!1)=>{if(!f.current||!e&&p.current)return null;if(i){let e=x();if(e?.element){let t=Array.from(C().values()).some(e=>e.selected),n=u===`menu`&&t&&!e.selected&&g==null;return h(n),F_(e.element,g),p.current=!0,e.element}return r?(h(!1),f.current.focus(),f.current):null}return r?(h(!1),f.current.focus(),p.current=!0,f.current):(h(!1),null)});Es(()=>{!r&&!i?(p.current=!1,h(!1)):w()},[y,i,r,w]),E.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=Al(e),r=S_(n);if(r>0){let e=`${r}px`,i=t===`rtl`?`paddingLeft`:`paddingRight`,a=parseFloat(n.getComputedStyle(f.current)[i])||0;f.current.style[i]=`${a+r}px`,f.current.style.width=`calc(100% + ${e})`}}return f.current},focusInitialTarget:()=>{if(!f.current)return null;let e=ks(Ds(f.current));return e&&Gm(f.current,e)?e:w(!0)}}),[w]);let T=S(void 0,d.onFocus),D=Ts(f,T.ref,t),O=E.useMemo(()=>({itemsFocusableWhenDisabled:s,suppressInitialFocusVisible:m,variant:u}),[s,m,u]),k=Fl(e=>{if(m&&h(!1),(e.ctrlKey||e.metaKey||e.altKey)&&l)l(e);else{if(T.onKeyDown(e),e.key.length===1){let t=_.current,n=e.key.toLowerCase(),r=performance.now();t.keys.length>0&&(r-t.lastTime>500?(t.keys=[],t.repeating=!0,t.previousKeyMatched=!0):t.repeating&&n!==t.keys[0]&&(t.repeating=!1)),t.lastTime=r,t.keys.push(n);let i=ks(Ds(f.current)),a=i&&!t.repeating&&N_(i,t);t.previousKeyMatched&&(a||b(e=>P_(e,t))!=null)?e.preventDefault():t.previousKeyMatched=!1}l&&l(e)}});return(0,V.jsx)(Hg,{role:`menu`,ref:D,className:o,onKeyDown:k,tabIndex:-1,...d,onFocus:T.onFocus,children:(0,V.jsx)(A_.Provider,{value:O,children:(0,V.jsx)($g.Provider,{value:v,children:a})})})});function L_(e){return zr(`MuiPopover`,e)}U(`MuiPopover`,[`root`,`paper`]);function R_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function z_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function B_(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function V_(e){return typeof e==`function`?e():e}var H_=e=>{let{classes:t}=e;return W({root:[`root`],paper:[`paper`]},L_,t)},U_=K(uh,{name:`MuiPopover`,slot:`Root`})({}),W_=K(fu,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),G_=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,disableAutoFocus:d=!1,elevation:f=8,marginThreshold:p=16,open:m,slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},transitionDuration:v=`auto`,disableScrollLock:y=!1,...b}=n,x=E.useRef(),S={...n,anchorOrigin:a,anchorReference:s,elevation:f,marginThreshold:p,transformOrigin:_,transitionDuration:v},C=H_(S),w=E.useCallback(()=>{if(s===`anchorPosition`)return o;let e=V_(i),t=(e&&e.nodeType===1?e:Ds(x.current).body).getBoundingClientRect();return{top:t.top+R_(t,a.vertical),left:t.left+z_(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),T=E.useCallback(e=>({vertical:R_(e,_.vertical),horizontal:z_(e,_.horizontal)}),[_.horizontal,_.vertical]),D=E.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if(s===`none`)return{top:null,left:null,transformOrigin:B_(n)};let r=w(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Al(V_(i)),d=u.innerHeight-p,f=u.innerWidth-p;if(p!=null&&a<p){let e=a-p;a-=e,n.vertical+=e}else if(p!=null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(p!=null&&o<p){let e=o-p;o-=e,n.horizontal+=e}else if(l>f){let e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:B_(n)}},[i,s,w,T,p]),[O,k]=E.useState(m),A=E.useCallback(()=>{let e=x.current;if(!e)return;let t=D(e);t.top!=null&&e.style.setProperty(`top`,t.top),t.left!=null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,k(!0)},[D]);E.useEffect(()=>(y&&window.addEventListener(`scroll`,A),()=>window.removeEventListener(`scroll`,A)),[i,y,A]);let j=()=>{A()},M=()=>{k(!1)};E.useEffect(()=>{m&&A()}),E.useImperativeHandle(r,()=>m?{updatePosition:()=>{A()}}:null,[m,A]),E.useEffect(()=>{if(!m)return;let e=Ol(()=>{A()}),t=Al(V_(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,m,A]);let N=v,P={slots:h,slotProps:g},[F,ee]=X(`transition`,{elementType:Dg,externalForwardedProps:P,ownerState:S,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),j()},onExited:t=>{e.onExited?.(t),M()}}),additionalProps:{appear:!0,in:m}});v===`auto`&&!F.muiSupportAuto&&(N=void 0);let te=u||(i?Ds(V_(i)).body:void 0),[I,{slots:ne,slotProps:re,...ie}]=X(`root`,{ref:t,elementType:U_,externalForwardedProps:{...P,...b},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Ll(typeof g.backdrop==`function`?g.backdrop(S):g.backdrop,{invisible:!0})},container:te,open:m},ownerState:S,className:H(C.root,l)}),[ae,oe]=X(`paper`,{ref:x,className:C.paper,elementType:W_,externalForwardedProps:P,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:O?void 0:{opacity:0}},ownerState:S});return(0,V.jsx)(I,{...ie,...!fs(I)&&{slots:ne,slotProps:re,disableAutoFocus:d,disableScrollLock:y},children:(0,V.jsx)(F,{...ee,timeout:N,children:(0,V.jsx)(ae,{...oe,children:c})})})});function K_(e){return zr(`MuiMenu`,e)}U(`MuiMenu`,[`root`,`paper`,`list`]);var q_={vertical:`top`,horizontal:`right`},J_={vertical:`top`,horizontal:`left`},Y_=e=>{let{classes:t}=e;return W({root:[`root`],paper:[`paper`],list:[`list`]},K_,t)},X_=K(G_,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),Z_=K(W_,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Q_=K(I_,{name:`MuiMenu`,slot:`List`})({outline:0}),$_=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,onClose:s,open:c,PopoverClasses:l,transitionDuration:u=`auto`,variant:d=`selectedMenu`,slots:f={},slotProps:p={},...m}=n,h=ji(),g={...n,autoFocus:r,disableAutoFocusItem:o,transitionDuration:u,variant:d},_=Y_(g),v=r&&c,y=v&&!o,b=E.useRef(null),x=(e,t)=>{b.current&&(b.current.adjustStyleForScrollbar(e,{direction:h?`rtl`:`ltr`}),v&&b.current.focusInitialTarget?.())},S=e=>{e.key===`Tab`&&(e.preventDefault(),s&&s(e,`tabKeyDown`))},C={slots:f,slotProps:p},w=Mp({elementType:f.root,externalSlotProps:p.root,ownerState:g,className:[_.root,a]}),[T,D]=X(`paper`,{className:_.paper,elementType:Z_,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:g}),[O,k]=X(`list`,{className:_.list,elementType:Q_,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:e=>({...e,onKeyDown:t=>{S(t),e.onKeyDown?.(t)}}),ownerState:g}),A=typeof p.transition==`function`?p.transition(g):p.transition;return(0,V.jsx)(X_,{disableAutoFocus:r,onClose:s,anchorOrigin:{vertical:`bottom`,horizontal:h?`right`:`left`},transformOrigin:h?q_:J_,slots:{root:f.root,paper:T,backdrop:f.backdrop,transition:f.transition},slotProps:{root:w,paper:D,backdrop:typeof p.backdrop==`function`?p.backdrop(g):p.backdrop,transition:{...A,onEntering:(...e)=>{x(...e),A?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:u,ownerState:g,...m,classes:l,children:(0,V.jsx)(O,{actions:b,autoFocus:v,autoFocusItem:y,variant:d,...k,children:i})})}),ev=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},tv=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=W({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},vc,o);return{...o,...s}},nv=K(Uu,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:ev})(J(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${yc.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),...!e.focusVisible&&{[`&.${yc.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},[`&.${yc.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},...e.focusVisible?Qa(1):{[`&.${yc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`&.${yc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Nh.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Nh.inset}`]:{marginLeft:52},[`& .${Yg.root}`]:{marginTop:0,marginBottom:0},[`& .${Yg.inset}`]:{paddingLeft:36},[`& .${qg.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${qg.root} svg`]:{fontSize:`1.25rem`}}}]}))),rv=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=l===`menuitemcheckbox`||l===`menuitemradio`?!!n.selected:void 0,m=O_(),h=E.useContext(Rg),g=E.useMemo(()=>({dense:a||h.dense||!1,disableGutters:s}),[h.dense,a,s]),_=j_(),v=Ml(),y=_.suppressInitialFocusVisible,b=_.itemsFocusableWhenDisabled,x=E.useRef(null);Es(()=>{r&&x.current&&C_(x.current,m)},[r]);let S={...n,dense:g.dense,divider:o,disableGutters:s},C=tv(n),{root:w,...T}=C,D=a_({id:v,ref:t,disabled:n.disabled,focusableWhenDisabled:b,selected:n.selected}),O=Ts(x,D.ref),k;return u===void 0?_.variant===`selectedMenu`?k=D.tabIndex:(!n.disabled||b)&&(k=-1):k=u,(0,V.jsx)(Rg.Provider,{value:g,children:(0,V.jsx)(nv,{ref:O,role:l,"aria-checked":p,tabIndex:k,component:i,internalNativeButton:!1,focusableWhenDisabled:b,suppressFocusVisible:y,focusVisibleClassName:H(C.focusVisible,c),className:H(C.root,d),...f,ownerState:S,classes:T})})}),iv=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return W({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${Y(n)}`,a&&`iconOpen`,r&&`disabled`]},bc,t)},av=K(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${xc.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},[`& ~ .${Pg.root}`]:{position:`absolute`,top:`50%`,transform:`translateY(-50%)`,right:`calc(var(--_caret, 24px) + (var(--_endAdornment, 28px) - 1.5rem)/2)`},[`.${Ps.root}:has(> &)`]:{"--_endAdornment":`0px`},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{[`.${Ps.root}:has(> &)`]:{"--_caret":`24px`},[`.${Ps.root}:has(> & ~ .${Pg.root})`]:{"--_endAdornment":`28px`},"&&&":{paddingRight:`calc(var(--_caret, 24px) + var(--_endAdornment, 0px))`,minWidth:16}}},{props:{variant:`filled`},style:{[`.${Ps.root}:has(> &)`]:{"--_caret":`32px`},[`.${Ps.root}:has(> & ~ .${Pg.root})`]:{"--_endAdornment":`28px`},"&&&":{paddingRight:`calc(var(--_caret, 32px) + var(--_endAdornment, 0px))`}}},{props:{variant:`outlined`},style:{[`.${Ps.root}:has(> &)`]:{"--_caret":`32px`},[`.${Ps.root}:has(> & ~ .${Pg.root})`]:{"--_endAdornment":`28px`},borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:`calc(var(--_caret, 32px) + var(--_endAdornment, 0px))`}}}]})),ov=K(av,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:ns,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${xc.multiple}`]:t.multiple}]}})({}),sv=K(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${xc.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),cv=K(sv,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Y(n.variant)}`],n.open&&t.iconOpen]}})({}),lv=E.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=iv(l);return(0,V.jsxs)(E.Fragment,{children:[(0,V.jsx)(ov,{ownerState:l,className:H(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,V.jsx)(cv,{as:a,ownerState:l,className:u.icon})]})}),uv,dv=K(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:ns})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),fv=K(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:ns})(J(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,...Zs(e,`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,...Zs(e,`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,...Zs(e,`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function pv(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,V.jsx)(dv,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,V.jsx)(fv,{ownerState:c,children:s?(0,V.jsx)(`span`,{children:i}):uv||=(0,V.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`})})})}var mv=e=>{let{classes:t}=e,n=W({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Sc,t);return{...t,...n}},hv=K(ic,{shouldForwardProp:e=>ns(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:tc})(J(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Cc.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Cc.focused} .${Cc.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(qu()).map(([t])=>({props:{color:t},style:{[`&.${Cc.focused} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Cc.error} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Cc.disabled} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{"--_trailingPad":`14px`,paddingRight:`var(--_trailingPad)`,[`&.${sg.root}`]:{"--_trailingPad":`0px`}}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),gv=K(pv,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(J(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),_v=K(ac,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:nc})(J(({theme:e})=>({padding:`16.5px 14px`,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderRadius:`inherit`,...e.vars&&{WebkitBoxShadow:e.vars.palette.Input.autofillWebkitBoxShadow,...e.applyStyles(`dark`,{WebkitTextFillColor:`#fff`,caretColor:`#fff`})}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),vv=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiOutlinedInput`}),{fullWidth:r=!1,inputComponent:i=`input`,label:a,multiline:o=!1,notched:s,slots:c={},slotProps:l={},type:u=`text`,...d}=n,f=mv(n),[p,m]=ws({props:n,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),h={...n,color:p.color||`primary`,disabled:p.disabled,error:p.error,focused:p.focused,formControl:m,fullWidth:r,hiddenLabel:p.hiddenLabel,multiline:o,size:p.size,type:u},g=c.root??hv,_=c.input??_v,[v,y]=X(`notchedOutline`,{elementType:gv,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:c,slotProps:l},additionalProps:{label:a!=null&&a!==``&&p.required?(0,V.jsxs)(E.Fragment,{children:[a,` `,`*`]}):a}});return(0,V.jsx)(sc,{slots:{root:g,input:_},slotProps:l,renderSuffix:e=>(0,V.jsx)(v,{...y,notched:s===void 0?!!(e.startAdornment||e.filled||e.focused):s}),fullWidth:r,inputComponent:i,multiline:o,ref:t,type:u,...d,classes:{...f,notchedOutline:null}})});vv.muiName=`Input`;function yv(e){return Object.prototype.hasOwnProperty.call(e.props,`value`)}function bv(e){if(typeof e==`string`||typeof e==`number`)return String(e);let t=``;return E.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=String(e):E.isValidElement(e)&&(t+=bv(e.props.children))}),t}function xv(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length;for(let n=0;n<e.length;n+=1){let i=(r+n)%e.length;if(e[i].label.startsWith(t))return i}return-1}function Sv(e,t){return!e.some(e=>e.label[0]===t&&e.label[1]===t)}function Cv(e,t){let n=[],r=-1;for(let i=0;i<e.length;i+=1){let a=e[i];if(!E.isValidElement(a)||!yv(a)||a.props.disabled)continue;let o=bv(a.props.children).trim().toLowerCase();o!==``&&(r===-1&&E_(t,a.props.value)&&(r=n.length),n.push({child:a,label:o,value:a.props.value}))}return{options:n,selectedIndex:r}}var wv,Tv=2,Ev=400,Dv=200,Ov=750,kv=` `,Av=`ArrowUp`,jv=`ArrowDown`,Mv=`Enter`;function Nv(e,t){if(!t)return!1;if(e.composedPath().includes(t)||e.target?.nodeType&&t.contains(e.target))return!0;let n=t.getBoundingClientRect();return n.width===0&&n.height===0?!1:e.clientX>=n.left-Tv&&e.clientX<=n.right+Tv&&e.clientY>=n.top-Tv&&e.clientY<=n.bottom+Tv}var Pv=K(av,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${sg.select}`]:t.select},{[`&.${sg.select}`]:t[n.variant]},{[`&.${sg.error}`]:t.error},{[`&.${sg.multiple}`]:t.multiple}]}})({[`&.${sg.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),Fv=K(sv,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.open&&t.iconOpen]}})({}),Iv=K(`input`,{shouldForwardProp:e=>ts(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),Lv=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return W({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},og,t)},Rv=E.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:S,onFocus:C,onKeyDown:w,onMouseDown:T,onOpen:D,open:O,readOnly:k,renderValue:A,required:j,SelectDisplayProps:M={},tabIndex:N,type:P,value:F,variant:ee=`standard`,...te}=e,[I,ne]=Pl({controlled:F,default:l,name:`Select`}),[re,ie]=Pl({controlled:O,default:c,name:`Select`}),ae=E.useRef(null),oe=E.useRef(null),se=E.useRef(null),ce=E.useRef(!1),le=E.useRef(!1),ue=E.useRef(null),de=E.useRef(!1),L=E.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),R=E.useRef({buffer:``,previousSearchIndex:null,matchedIndex:null}),fe=Cu(),pe=Cu(),me=Cu(),[he,z]=E.useState(null),{current:ge}=E.useRef(O!=null),[_e,ve]=E.useState(),[ye,be]=E.useState(null),xe=Ts(t,m),Se=E.useCallback(e=>{oe.current=e,e&&z(e)},[]),Ce=he?.parentNode;E.useImperativeHandle(xe,()=>({focus:()=>{oe.current.focus()},node:ae.current,value:I}),[I]);let we=he!==null&&re,Te=E.useCallback(()=>{me.clear(),R.current.buffer=``,R.current.previousSearchIndex=null,R.current.matchedIndex=null},[me]);Es(()=>{ce.current=we,we&&Te()},[we,Te]);let Ee=E.useCallback(()=>{fe.clear(),pe.clear()},[fe,pe]),De=E.useCallback(()=>{Ee(),de.current=!1,L.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[Ee]),Oe=E.useCallback(()=>{ue.current&&=(ue.current(),null)},[]);E.useEffect(()=>{we||(De(),Oe())},[we,De,Oe]),E.useEffect(()=>()=>{De(),Oe(),Te()},[De,Oe,Te]),E.useEffect(()=>{if(!we||!Ce||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ve(Ce.clientWidth)});return e.observe(Ce),()=>{e.disconnect()}},[we,Ce,a]),E.useEffect(()=>{c&&re&&he&&!ge&&(ve(a?null:Ce.clientWidth),oe.current.focus())},[he,a]),E.useEffect(()=>{i&&oe.current.focus()},[i]),E.useEffect(()=>{if(!h)return;let e=Ds(oe.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&oe.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let ke=Fl((e,t)=>{e||(De(),Oe()),e?(Te(),be(w_(t)),D&&D(t)):(be(null),S&&S(t)),ge||(ce.current=e,ve(a?null:Ce.clientWidth),ie(e))}),Ae=()=>{De(),le.current?(pe.start(Dv,()=>{L.current.allowUnselectedMouseUp=!0}),fe.start(Ev,()=>{L.current.allowSelectedMouseUp=!0})):fe.start(Ev,()=>{L.current.allowSelectedMouseUp=!0,L.current.allowUnselectedMouseUp=!0})},je=e=>{if(T?.(e),e.button!==0||(e.preventDefault(),!oe.current))return;oe.current.focus();let t=Ds(e.currentTarget);Ae(),Oe();let n=e=>{ue.current=null,oe.current&&(Nv(e,oe.current)||Nv(e,se.current)||(ce.current||!ge)&&ke(!1,e))};t.addEventListener(`mouseup`,n,{capture:!0,once:!0}),ue.current=()=>{t.removeEventListener(`mouseup`,n,!0)},ke(!0,e)},Me=e=>{ke(!1,e)},Ne=E.Children.toArray(o),Pe=e=>{let t=Ne.find(t=>t.props.value===e.target.value);t!==void 0&&(ne(t.props.value),b&&b(e,t))},Fe=(e,t,n)=>{if(ne(n),b){let r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,t)}},Ie=e=>t=>{de.current=!1;let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(I)?I.slice():[];let t=I.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),I!==n&&Fe(t,e,n),_||ke(!1,t)}},Le=(e,t)=>n=>{if(e.props.onMouseUp?.(n),de.current){de.current=!1;return}let r=!L.current.allowSelectedMouseUp&&t,i=!L.current.allowUnselectedMouseUp&&!t;r||i||n.currentTarget.click()},Re=e=>{let t=R.current,n=t.buffer!==``;if(we||_||u||e.defaultPrevented||e.nativeEvent?.isComposing||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey||e.key===kv&&!n)return!1;e.key===kv&&e.preventDefault();let r=t.buffer===``,{options:i,selectedIndex:a}=Cv(Ne,I);if(i.length===0)return e.key!==kv&&Te(),!0;r&&(t.previousSearchIndex=a);let o=e.key.toLowerCase();t.buffer===o&&Sv(i,o)&&(t.buffer=``,t.previousSearchIndex=t.matchedIndex),t.buffer+=o,me.start(Ov,Te);let s=xv(i,t.buffer,(t.previousSearchIndex??-1)+1);if(s!==-1){let n=i[s];return t.matchedIndex=s,E_(I,n.value)||Fe(e,n.child,n.value),!0}return e.key!==kv&&Te(),!0},ze=e=>{if(!k){let t=Re(e),n=e.key===kv||e.key===Av||e.key===jv||e.key===Mv;!t&&n&&(e.preventDefault(),ke(!0,e)),w?.(e)}},Be=e=>{Te(),!we&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:I,name:v}}),y(e))},Ve=e=>t=>{e?.props?.onKeyDown?.(t),t.key===kv&&t.target===t.currentTarget&&!t.defaultPrevented&&(t.preventDefault(),t.repeat||t.currentTarget.click())};delete te[`aria-invalid`];let He,Ue,We=[],Ge=!1,Ke=!1;(js({value:I})||d)&&(A?He=A(I):Ge=!0);let qe=Ne.map(e=>{if(!E.isValidElement(e))return null;let t;if(_){if(!Array.isArray(I))throw Error(x(2));t=I.some(t=>E_(t,e.props.value)),t&&Ge&&We.push(e.props.children)}else t=E_(I,e.props.value),t&&Ge&&(Ue=e.props.children);return t&&(Ke=!0),E.cloneElement(e,{"aria-selected":t?`true`:`false`,onMouseDown:t=>{de.current=!0,e.props.onMouseDown?.(t)},onPointerDown:t=>{de.current=!0,e.props.onPointerDown?.(t)},onClick:Ie(e),onMouseUp:Le(e,t),onKeyUp:t=>{t.key===kv&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},onKeyDown:Ve(e),role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Es(()=>{le.current=Ke,we||_||Ke||Te()},[Ke,_,we,Te]),Ge&&(He=_?We.length===0?null:We.reduce((e,t,n)=>(e.push(t),n<We.length-1&&e.push(`, `),e),[]):Ue);let Je=_e;!a&&ge&&he&&(Je=Ce.clientWidth);let Ye;Ye=N===void 0?u?null:0:N;let Xe=M.id||(v?`mui-component-select-${v}`:void 0),Ze={...e,variant:ee,value:I,open:we,error:f},Qe=Lv(Ze),$e=typeof g.slotProps?.paper==`function`?g.slotProps.paper(Ze):g.slotProps?.paper,et=Ts($e?.ref,se),tt=typeof g.slotProps?.list==`function`?g.slotProps.list(Ze):g.slotProps?.list,nt=zi(),rt=zi();return(0,V.jsxs)(E.Fragment,{children:[(0,V.jsx)(Pv,{as:`div`,ref:Se,tabIndex:Ye,role:`combobox`,"aria-controls":we?nt:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":we?`true`:`false`,"aria-haspopup":`listbox`,"aria-readonly":k?`true`:void 0,"aria-label":r,"aria-labelledby":h,"aria-describedby":n,"aria-required":j?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:ze,onMouseDown:u||k?null:je,onBlur:Be,onFocus:C,...M,ownerState:Ze,className:H(M.className,Qe.select,s),id:Xe,children:T_(He)?wv||=(0,V.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):He}),(0,V.jsx)(Iv,{"aria-invalid":f,value:Array.isArray(I)?I.join(`,`):I,name:v,ref:ae,"aria-hidden":!0,onChange:Pe,tabIndex:-1,disabled:u,readOnly:k,className:Qe.nativeInput,autoFocus:i,required:j,...te,id:te.id??rt,ownerState:Ze}),(0,V.jsx)(Fv,{as:p,className:Qe.icon,ownerState:Ze}),(0,V.jsx)(k_,{value:ye,children:(0,V.jsx)($_,{id:`menu-${v||``}`,anchorEl:Ce,open:we,onClose:Me,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:nt,...tt},paper:{...$e,ref:et,style:{minWidth:Je,...$e?.style}}},children:qe})})]})}),zv=e=>{let{classes:t}=e,n=W({root:[`root`]},og,t);return{...t,...n}},Bv={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>ns(e)&&e!==`variant`},Vv=K(Ng,Bv)(``),Hv=K(vv,Bv)(``),Uv=K(dg,Bv)(``),Wv=E.forwardRef(function(e,t){let n=q({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=em,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?lv:Rv,[D]=ws({props:n,states:[`variant`,`error`]}),O=D.variant||C,k={...n,variant:O,classes:a},j=zv(k),{root:M,...N}=j,P=d||{standard:(0,V.jsx)(Vv,{ownerState:k}),outlined:(0,V.jsx)(Hv,{label:p,ownerState:k}),filled:(0,V.jsx)(Uv,{ownerState:k})}[O],F=Ts(t,Np(P));return(0,V.jsx)(E.Fragment,{children:E.cloneElement(P,{inputComponent:T,inputProps:{children:i,error:D.error,IconComponent:l,variant:O,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?A(N,f.classes):N,...d?d.props.inputProps:{}},...(g&&_||c)&&O===`outlined`?{notched:!0}:{},ref:F,className:H(P.props.className,o,j.root),...!d&&{variant:O},...w})})});Wv.muiName=`Select`;function Gv(e={}){let{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:a}=e,o=Cu();E.useEffect(()=>{if(!i)return;function e(e){e.defaultPrevented||e.key===`Escape`&&r?.(e,`escapeKeyDown`)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[i,r]);let s=hs((e,t)=>{r?.(e,t)}),c=hs(e=>{r&&e!=null&&o.start(e,()=>{s(null,`timeout`)})});E.useEffect(()=>(i&&c(t),o.clear),[i,t,c,o]);let l=e=>{r?.(e,`clickaway`)},u=o.clear,d=E.useCallback(()=>{t!=null&&c(a??t*.5)},[t,a,c]),f=e=>t=>{let n=e.onBlur;n?.(t),d()},p=e=>t=>{let n=e.onFocus;n?.(t),u()},m=e=>t=>{let n=e.onMouseEnter;n?.(t),u()},h=e=>t=>{let n=e.onMouseLeave;n?.(t),d()};return E.useEffect(()=>{if(!n&&i)return window.addEventListener(`focus`,d),window.addEventListener(`blur`,u),()=>{window.removeEventListener(`focus`,d),window.removeEventListener(`blur`,u)}},[n,i,d,u]),{getRootProps:(t={})=>{let n={...ou(e),...ou(t)};return{role:`presentation`,...t,...n,onBlur:f(n),onFocus:p(n),onMouseEnter:m(n),onMouseLeave:h(n)}},onClickAway:l}}function Kv(e){return zr(`MuiSnackbarContent`,e)}U(`MuiSnackbarContent`,[`root`,`message`,`action`]);var qv=e=>{let{classes:t}=e;return W({root:[`root`],action:[`action`],message:[`message`]},Kv,t)},Jv=K(fu,{name:`MuiSnackbarContent`,slot:`Root`})(J(({theme:e})=>{let t=e.palette.mode===`light`?.8:.98;return{...e.focusVisible&&Za(`0 0 0 4px ${(e.vars||e).palette.background.default}`),...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(Si(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Si(e.palette.background.default,t),display:`flex`,alignItems:`center`,flexWrap:`wrap`,padding:`6px 16px`,flexGrow:1,[e.breakpoints.up(`sm`)]:{flexGrow:`initial`,minWidth:288}}})),Yv=K(`div`,{name:`MuiSnackbarContent`,slot:`Message`})({padding:`8px 0`}),Xv=K(`div`,{name:`MuiSnackbarContent`,slot:`Action`})({display:`flex`,alignItems:`center`,marginLeft:`auto`,paddingLeft:16,marginRight:-8}),Zv=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiSnackbarContent`}),{action:r,className:i,message:a,role:o=`alert`,...s}=n,c=n,l=qv(c);return(0,V.jsxs)(Jv,{role:o,elevation:6,className:H(l.root,i),ownerState:c,ref:t,...s,children:[(0,V.jsx)(Yv,{className:l.message,ownerState:c,children:a}),r?(0,V.jsx)(Xv,{className:l.action,ownerState:c,children:r}):null]})});function Qv(e){return zr(`MuiSnackbar`,e)}U(`MuiSnackbar`,[`root`,`anchorOriginTopCenter`,`anchorOriginBottomCenter`,`anchorOriginTopRight`,`anchorOriginBottomRight`,`anchorOriginTopLeft`,`anchorOriginBottomLeft`]);var $v=e=>{let{classes:t,anchorOrigin:n}=e;return W({root:[`root`,`anchorOrigin${Y(n.vertical)}${Y(n.horizontal)}`]},Qv,t)},ey=K(`div`,{name:`MuiSnackbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`anchorOrigin${Y(n.anchorOrigin.vertical)}${Y(n.anchorOrigin.horizontal)}`]]}})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:`fixed`,display:`flex`,left:8,right:8,justifyContent:`center`,alignItems:`center`,variants:[{props:({ownerState:e})=>e.anchorOrigin.vertical===`top`,style:{top:8,[e.breakpoints.up(`sm`)]:{top:24}}},{props:({ownerState:e})=>e.anchorOrigin.vertical!==`top`,style:{bottom:8,[e.breakpoints.up(`sm`)]:{bottom:24}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`left`,style:{justifyContent:`flex-start`,[e.breakpoints.up(`sm`)]:{left:24,right:`auto`}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`right`,style:{justifyContent:`flex-end`,[e.breakpoints.up(`sm`)]:{right:24,left:`auto`}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`center`,style:{[e.breakpoints.up(`sm`)]:{left:`50%`,right:`auto`,transform:`translateX(-50%)`}}}]}))),ty=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiSnackbar`}),r=$o(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:o,horizontal:s}={vertical:`bottom`,horizontal:`left`},autoHideDuration:c=null,children:l,className:u,disableWindowBlurListener:d=!1,message:f,onBlur:p,onClose:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,open:v,resumeHideDuration:y,slots:b={},slotProps:x={},transitionDuration:S=i,...C}=n,w={...n,anchorOrigin:{vertical:o,horizontal:s},autoHideDuration:c,disableWindowBlurListener:d,transitionDuration:S},T=$v(w),{getRootProps:D,onClickAway:O}=Gv(w),[k,A]=E.useState(!0),j={slots:b,slotProps:x},[M,N]=X(`root`,{ref:t,className:[T.root,u],elementType:ey,getSlotProps:D,externalForwardedProps:{...j,...C},ownerState:w}),[P,{ownerState:F,...ee}]=X(`clickAwayListener`,{elementType:Pm,externalForwardedProps:j,getSlotProps:e=>({onClickAway:(...t)=>{let n=t[0];e.onClickAway?.(...t),n?.defaultMuiPrevented||O(...t)}}),ownerState:w}),[te,I]=X(`content`,{elementType:Zv,shouldForwardComponentProp:!0,externalForwardedProps:j,additionalProps:{message:f,action:a},ownerState:w}),[ne,re]=X(`transition`,{elementType:Dg,externalForwardedProps:j,getSlotProps:e=>({onEnter:(...t)=>{e.onEnter?.(...t),A(!1)},onExited:(...t)=>{e.onExited?.(...t),A(!0)}}),additionalProps:{appear:!0,in:v,timeout:S,direction:o===`top`?`down`:`up`},ownerState:w});return!v&&k?null:(0,V.jsx)(P,{...ee,...b.clickAwayListener&&{ownerState:F},children:(0,V.jsx)(M,{...N,children:(0,V.jsx)(ne,{...re,children:l||(0,V.jsx)(te,{...I})})})})});function ny(e){return zr(`MuiTooltip`,e)}var ry=U(`MuiTooltip`,[`popper`,`popperInteractive`,`popperArrow`,`popperClose`,`tooltip`,`tooltipArrow`,`touch`,`tooltipPlacementLeft`,`tooltipPlacementRight`,`tooltipPlacementTop`,`tooltipPlacementBottom`,`arrow`]);function iy(e){return Math.round(e*1e5)/1e5}var ay=e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a,open:o}=e;return W({popper:[`popper`,!n&&`popperInteractive`,r&&`popperArrow`,!o&&`popperClose`],tooltip:[`tooltip`,r&&`tooltipArrow`,i&&`touch`,`tooltipPlacement${Y(a.split(`-`)[0])}`],arrow:[`arrow`]},ny,t)},oy=K(Gp,{name:`MuiTooltip`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:`none`,variants:[{props:({ownerState:e})=>e.open&&!e.disableInteractive,style:{pointerEvents:`auto`}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${ry.arrow}`]:{top:0,marginTop:`-0.71em`,"&::before":{transformOrigin:`0 100%`}},[`&[data-popper-placement*="top"] .${ry.arrow}`]:{bottom:0,marginBottom:`-0.71em`,"&::before":{transformOrigin:`100% 0`}},[`&[data-popper-placement*="right"] .${ry.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineStart:0,marginInlineStart:`-0.71em`,"&::before":{transformOrigin:`100% 100%`}},[`&[data-popper-placement*="left"] .${ry.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineEnd:0,marginInlineEnd:`-0.71em`,"&::before":{transformOrigin:`0 0`}}}}]}))),sy=K(`div`,{name:`MuiTooltip`,slot:`Tooltip`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Y(n.placement.split(`-`)[0])}`]]}})(J(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:`4px 8px`,fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:`break-word`,fontWeight:e.typography.fontWeightMedium,[`.${ry.popper}[data-popper-placement*="left"] &`]:{transformOrigin:`right center`,marginInlineEnd:`14px`},[`.${ry.popper}[data-popper-placement*="right"] &`]:{transformOrigin:`left center`,marginInlineStart:`14px`},[`.${ry.popper}[data-popper-placement*="top"] &`]:{transformOrigin:`center bottom`,marginBottom:`14px`},[`.${ry.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:`center top`,marginTop:`14px`},variants:[{props:({ownerState:e})=>e.arrow,style:{position:`relative`,marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:`8px 16px`,fontSize:e.typography.pxToRem(14),lineHeight:`${iy(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${ry.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:`24px`},[`.${ry.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:`24px`},[`.${ry.popper}[data-popper-placement*="top"] &`]:{marginBottom:`24px`},[`.${ry.popper}[data-popper-placement*="bottom"] &`]:{marginTop:`24px`}}}]}))),cy=K(`span`,{name:`MuiTooltip`,slot:`Arrow`})(J(({theme:e})=>({overflow:`hidden`,position:`absolute`,width:`1em`,height:`0.71em`,boxSizing:`border-box`,color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:`""`,margin:`auto`,display:`block`,width:`100%`,height:`100%`,backgroundColor:`currentColor`,transform:`rotate(45deg)`}}))),ly=!1,uy=new Su,dy={x:0,y:0};function fy(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var py=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTooltip`}),{arrow:r=!1,children:i,classes:a,describeChild:o=!1,disableFocusListener:s=!1,disableHoverListener:c=!1,disableInteractive:l=!1,disableTouchListener:u=!1,enterDelay:d=100,enterNextDelay:f=0,enterTouchDelay:p=700,followCursor:m=!1,id:h,leaveDelay:g=0,leaveTouchDelay:_=1500,onClose:v,onOpen:y,open:b,placement:x=`bottom`,slotProps:S={},slots:C={},title:w,...T}=n,D=E.isValidElement(i)?i:(0,V.jsx)(`span`,{children:i}),O=$o(),[k,A]=E.useState(),[j,M]=E.useState(null),N=E.useRef(!1),P=E.useRef(!1),F=l||m,ee=Cu(),te=Cu(),I=Cu(),ne=Cu(),[re,ie]=Pl({controlled:b,default:!1,name:`Tooltip`,state:`open`}),ae=re,{current:oe}=E.useRef(b!==void 0),se=Ml(h),ce=E.useRef(),le=Fl(()=>{ce.current!==void 0&&(document.body.style.WebkitUserSelect=ce.current,ce.current=void 0),ne.clear()});E.useEffect(()=>le,[le]);let ue=e=>{uy.clear(),ly=!0,ie(!0),y&&!ae&&y(e)},de=Fl(e=>{P.current=!1,uy.start(800+g,()=>{ly=!1}),ie(!1),v&&ae&&v(e),ee.start(O.transitions.duration.shortest,()=>{N.current=!1})}),L=e=>{N.current&&e.type!==`touchstart`||(k&&k.removeAttribute(`title`),te.clear(),I.clear(),d||ly&&f?te.start(ly?f:d,()=>{ue(e)}):ue(e))},R=e=>{if(k?.disabled&&!oe){if(ae&&!P.current)return;P.current=!0}else P.current=!1;L(e)},fe=e=>{(!k?.disabled||oe||P.current)&&L(e)},pe=e=>{te.clear(),I.start(g,()=>{de(e)})},[,me]=E.useState(!1),he=e=>{let t=e?.target??k;if(!t||t.disabled||!pu(t)){me(!1);let n=e??new Event(`blur`);!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),pe(n)}},z=e=>{if(k||A(e.currentTarget),P.current=!1,pu(e.target)){let t=e=>{e.target.disabled&&he(e),e.target.removeEventListener(`blur`,t)};e.target.addEventListener(`blur`,t),me(!0),L(e)}},ge=e=>{N.current=!0;let t=D.props;t.onTouchStart&&t.onTouchStart(e)},_e=e=>{ge(e),I.clear(),ee.clear(),le(),ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect=`none`,ne.start(p,()=>{document.body.style.WebkitUserSelect=ce.current,R(e)})},ve=e=>{D.props.onTouchEnd&&D.props.onTouchEnd(e),le(),I.start(_,()=>{de(e)})};E.useEffect(()=>{if(!ae)return;function e(e){e.key===`Escape`&&de(e)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[de,ae]);let ye=Ts(Np(D),A,t);!w&&w!==0&&(ae=!1);let be=E.useRef(),xe=e=>{let t=D.props;t.onMouseMove&&t.onMouseMove(e),dy={x:e.clientX,y:e.clientY},be.current&&be.current.update()},Se={},Ce=typeof w==`string`;o?(Se.title=!ae&&Ce&&!c?w:null,Se[`aria-describedby`]=ae?se:null):(Se[`aria-label`]=Ce?w:null,Se[`aria-labelledby`]=ae&&!Ce?se:null);let we={...Se,...T,...D.props,className:H(T.className,D.props.className),onTouchStart:ge,ref:ye,...m?{onMouseMove:xe}:{}},Te={};u||(we.onTouchStart=_e,we.onTouchEnd=ve),c||(we.onMouseOver=fy(R,we.onMouseOver),we.onMouseLeave=fy(pe,we.onMouseLeave),F||(Te.onMouseOver=fe,Te.onMouseLeave=pe)),s||(we.onFocus=fy(z,we.onFocus),we.onBlur=fy(he,we.onBlur),F||(Te.onFocus=z,Te.onBlur=he));let Ee={...n,arrow:r,disableInteractive:F,open:ae,placement:x,touch:N.current},De=typeof S.popper==`function`?S.popper(Ee):S.popper,Oe=E.useMemo(()=>{let e=[{name:`arrow`,enabled:!!j,options:{element:j,padding:4}}];return De?.popperOptions?.modifiers&&(e=e.concat(De.popperOptions.modifiers)),{...De?.popperOptions,modifiers:e}},[j,De?.popperOptions]),ke=ay(Ee),Ae={slots:C,slotProps:{arrow:S.arrow,popper:De,tooltip:S.tooltip,transition:S.transition}},[je,Me]=X(`popper`,{elementType:oy,externalForwardedProps:Ae,ownerState:Ee,className:ke.popper}),[Ne,Pe]=X(`transition`,{elementType:Dg,externalForwardedProps:Ae,ownerState:Ee}),[Fe,Ie]=X(`tooltip`,{elementType:sy,className:ke.tooltip,externalForwardedProps:Ae,ownerState:Ee}),[Le,Re]=X(`arrow`,{elementType:cy,className:ke.arrow,externalForwardedProps:Ae,ownerState:Ee,ref:M});return(0,V.jsxs)(E.Fragment,{children:[E.cloneElement(D,we),(0,V.jsx)(je,{as:Gp,placement:x,anchorEl:m?{getBoundingClientRect:()=>({top:dy.y,left:dy.x,right:dy.x,bottom:dy.y,width:0,height:0})}:k,popperRef:be,open:k?ae:!1,id:se,transition:!0,...Te,...Me,popperOptions:Oe,children:({TransitionProps:e})=>(0,V.jsx)(Ne,{timeout:O.transitions.duration.shorter,...e,...Pe,children:(0,V.jsxs)(Fe,{...Ie,children:[w,r?(0,V.jsx)(Le,{...Re}):null]})})})]})}),my=Sa({createStyledComponent:K(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>q({props:e,name:`MuiStack`})});function hy(e){return zr(`MuiTab`,e)}var gy=U(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),_y=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return W({root:[`root`,a&&o&&`labelIcon`,`textColor${Y(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]},hy,t)},vy=K(Uu,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Y(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${gy.icon}`]:t.icon}]}})(J(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,...e.focusVisible&&Qa(3),variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${gy.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${gy.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${gy.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${gy.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${gy.selected}`]:{opacity:1},...e.focusVisible&&{[`&.${Bu.focusVisible}`]:{opacity:1}},[`&.${gy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${gy.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${gy.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${gy.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${gy.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),yy=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b=e_(),x=a_({id:_,ref:t,disabled:i,selected:m}),S=b.getItemMap().size===0&&m?0:x.tabIndex,C={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},w=_y(C),T=s&&u&&E.isValidElement(s)?E.cloneElement(s,{className:H(w.icon,s.props.className)}):s;return(0,V.jsxs)(vy,{internalNativeButton:!0,focusRipple:!a,className:H(w.root,r),ref:x.ref,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},tabIndex:S,ownerState:C,...y,children:[c===`top`||c===`start`?(0,V.jsxs)(E.Fragment,{children:[T,u]}):(0,V.jsxs)(E.Fragment,{children:[u,T]}),l]})});function by(e){return zr(`MuiToolbar`,e)}U(`MuiToolbar`,[`root`,`gutters`,`regular`,`dense`]);var xy=e=>{let{classes:t,disableGutters:n,variant:r}=e;return W({root:[`root`,!n&&`gutters`,r]},by,t)},Sy=K(`div`,{name:`MuiToolbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(J(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up(`sm`)]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:`dense`},style:{minHeight:48}},{props:{variant:`regular`},style:e.mixins.toolbar}]}))),Cy=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiToolbar`}),{className:r,component:i=`div`,disableGutters:a=!1,variant:o=`regular`,...s}=n,c={...n,component:i,disableGutters:a,variant:o},l=xy(c);return(0,V.jsx)(Sy,{as:i,className:H(l.root,r),ref:t,ownerState:c,...s})}),wy=Dl((0,V.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),Ty=Dl((0,V.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function Ey(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Dy(e,t,n,r={},i=()=>{}){let{ease:a=Ey,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);t[e]=a(u)*(n-c)+c,requestAnimationFrame(u>=1?()=>{i(null)}:d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var Oy={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function ky(e){let{onChange:t,...n}=e,r=E.useRef(),i=E.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Es(()=>{let e=Ol(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=Al(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),E.useEffect(()=>{a(),t(r.current)},[t]),(0,V.jsx)(`div`,{style:Oy,...n,ref:i})}function Ay(e){return zr(`MuiTabScrollButton`,e)}var jy=U(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),My=e=>{let{classes:t,orientation:n,disabled:r}=e;return W({root:[`root`,n,r&&`disabled`]},Ay,t)},Ny=K(Uu,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${jy.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),Py=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,{nativeButton:u,...d}=l,f=ji(),p={isRtl:f,...n},m=My(p),h=i.StartScrollButtonIcon??wy,g=i.EndScrollButtonIcon??Ty,_=Mp({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p}),v=Mp({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p});return(0,V.jsx)(Ny,{component:`div`,className:H(m.root,r),ref:t,role:null,ownerState:p,tabIndex:null,...d,style:{...d.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:o===`left`?(0,V.jsx)(h,{..._}):(0,V.jsx)(g,{...v})})});function Fy(e){return zr(`MuiTabs`,e)}var Iy=U(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Ly=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return W({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},Fy,c)},Ry=K(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Iy.scrollButtons}`]:t.scrollButtons},{[`& .${Iy.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(J(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Iy.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),zy=K(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),By=K(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),Vy=K(`span`,{name:`MuiTabs`,slot:`Indicator`})(J(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,...Zs(e),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),Hy=K(ky)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),Uy={};function Wy(e,t){let n=parseFloat(e);return Number.isNaN(n)?0:e.endsWith(`%`)?n/100*t:n}var Gy=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTabs`}),r=$o(),i=ji(),a=ru(r.motion.reducedMotion,!1),{"aria-label":o,"aria-labelledby":s,action:c,centered:l=!1,children:u,className:d,component:f=`div`,allowScrollButtonsMobile:p=!1,indicatorColor:m=`primary`,onChange:h,orientation:g=`horizontal`,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},textColor:x=`primary`,value:S,variant:C=`standard`,visibleScrollbar:w=!1,...T}=n,D=C===`scrollable`,O=g===`vertical`,k=O?`scrollTop`:`scrollLeft`,A=O?`top`:`left`,j=O?`bottom`:`right`,M=O?`clientHeight`:`clientWidth`,N=O?`height`:`width`,P={...n,component:f,allowScrollButtonsMobile:p,indicatorColor:m,orientation:g,vertical:O,scrollButtons:_,textColor:x,variant:C,visibleScrollbar:w,fixed:!D,hideScrollbar:D&&!w,scrollableX:D&&!O,scrollableY:D&&O,centered:l&&!D,scrollButtonsHideMobile:!p},F=Ly(P),ee=Mp({elementType:y.startScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:P}),te=Mp({elementType:y.endScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:P}),[I,ne]=E.useState(Uy),[re,ie]=E.useState(!1),[ae,oe]=E.useState(!1),[se,ce]=E.useState(!1),le=S===!1?null:S,[ue,de]=E.useState(!1),[L,R]=E.useState({overflow:`hidden`,scrollbarWidth:0}),fe=new Map,pe=E.useRef(null),me=E.useRef(null),he=I!==Uy,z={slots:y,slotProps:b},ge=()=>{let e=pe.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,clientHeight:e.clientHeight,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&S!==!1){let e=me.current.children;if(e.length>0){let t=e[fe.get(S)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},_e=Fl(()=>{let{tabsMeta:e,tabMeta:t}=ge(),n=0,r;O?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[N]:t?t[N]:0};if(typeof I[r]!=`number`||typeof I[N]!=`number`)ne(a);else{let e=Math.abs(I[r]-a[r]),t=Math.abs(I[N]-a[N]);(e>=1||t>=1)&&ne(a)}}),ve=(e,{animation:t=!0}={})=>{t&&!a.shouldReduceMotion?Dy(k,pe.current,e,{duration:r.transitions.duration.standard}):pe.current[k]=e},ye=e=>{let t=pe.current[k];t+=O?e:e*(i?-1:1),ve(t)},be=()=>{let e=pe.current[M],t=0,n=Array.from(me.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[M]>e){r===0&&(t=e);break}t+=i[M]}return t},xe=()=>{ye(-1*be())},Se=()=>{ye(be())},[Ce,{onChange:we,...Te}]=X(`scrollbar`,{className:H(F.scrollableX,F.hideScrollbar),elementType:Hy,shouldForwardComponentProp:!0,externalForwardedProps:z,ownerState:P}),Ee=E.useCallback(e=>{we?.(e),R({overflow:null,scrollbarWidth:e})},[we]),[De,Oe]=X(`scrollButtons`,{className:F.scrollButtons,elementType:Py,externalForwardedProps:z,ownerState:P,additionalProps:{orientation:g,slots:{StartScrollButtonIcon:y.startScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon},slotProps:{startScrollButtonIcon:ee,endScrollButtonIcon:te}}}),ke=()=>{let e={};e.scrollbarSizeListener=D?(0,V.jsx)(Ce,{...Te,onChange:Ee}):null;let t=D&&(_===`auto`&&(re||ae)||_===!0);return e.scrollButtonStart=t?(0,V.jsx)(De,{direction:i?`right`:`left`,onClick:xe,disabled:!re,...Oe}):null,e.scrollButtonEnd=t?(0,V.jsx)(De,{direction:i?`left`:`right`,onClick:Se,disabled:!ae,...Oe}):null,e},Ae=Fl(e=>{let{tabsMeta:t,tabMeta:n}=ge();if(!n||!t)return;let r=Al(pe.current).getComputedStyle(pe.current),i=O?t.clientHeight:t.clientWidth,a=Wy(r[O?`scrollPaddingTop`:`scrollPaddingLeft`],i),o=Wy(r[O?`scrollPaddingBottom`:`scrollPaddingRight`],i),s=t[A]+a,c=t[j]-o,l=t[k]+(n[A]-s);n[A]<s?ve(l,{animation:e}):n[j]>c&&(n[j]-n[A]>c-s?ve(l,{animation:e}):ve(t[k]+(n[j]-c),{animation:e}))}),je=Fl(()=>{D&&_!==!1&&ce(!se)});E.useEffect(()=>{let e=Ol(()=>{pe.current&&_e()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),je()},r=Al(pe.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(me.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(me.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[_e,je]),E.useEffect(()=>{let e=Array.from(me.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&D&&_!==!1){let n=e[0],r=e[t-1],i={root:pe.current,threshold:.99},a=new IntersectionObserver(e=>{ie(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{oe(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[D,_,se,u?.length]),E.useEffect(()=>{_e()}),E.useEffect(()=>{Ae(Uy!==I)},[Ae,I]),E.useEffect(()=>{if(typeof ResizeObserver>`u`||!D||_!==`auto`)return;let e=new ResizeObserver(()=>{Ae(!1)});return e.observe(pe.current),()=>{e.disconnect()}},[D,_,Ae]),E.useImperativeHandle(c,()=>({updateIndicator:_e,updateScrollButtons:je}),[_e,je]);let[Me,Ne]=X(`indicator`,{className:F.indicator,elementType:Vy,externalForwardedProps:z,ownerState:P,additionalProps:{style:I}}),Pe=(0,V.jsx)(Me,{...Ne}),Fe=i_({activeItemId:ue?void 0:le,orientation:g,isRtl:i}),Ie=Fe.getContainerProps(),Le=E.Children.toArray(u).filter(E.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return fe.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===S;return E.cloneElement(e,{fullWidth:C===`fullWidth`,indicator:n&&!he&&Pe,selected:n,selectionFollowsFocus:v,onChange:h,textColor:x,value:t})}),Re=ke(),[ze,Be]=X(`root`,{ref:t,className:H(F.root,d),elementType:Ry,externalForwardedProps:{...z,...T,component:f},ownerState:P}),[Ve,He]=X(`scroller`,{ref:pe,className:F.scroller,elementType:zy,externalForwardedProps:z,ownerState:P,additionalProps:{style:{overflow:L.overflow,[O?`margin${i?`Left`:`Right`}`:`marginBottom`]:w?void 0:-L.scrollbarWidth}}}),Ue=Ts(Ie.ref,me),We=e=>{let t=me.current;ks(Ds(t))?.getAttribute(`role`)===`tab`&&Ie.onKeyDown(e)},[Ge,Ke]=X(`list`,{ref:Ue,className:F.list,elementType:By,externalForwardedProps:z,ownerState:P,getSlotProps:e=>({...e,onBlur:t=>{Gm(t.currentTarget,t.relatedTarget)||de(!1),e.onBlur?.(t)},onKeyDown:t=>{We(t),e.onKeyDown?.(t)},onFocus:t=>{de(!0),Ie.onFocus(t),e.onFocus?.(t)}})});return(0,V.jsxs)(ze,{...Be,children:[Re.scrollButtonStart,Re.scrollbarSizeListener,(0,V.jsxs)(Ve,{...He,children:[(0,V.jsx)(Ge,{"aria-label":o,"aria-labelledby":s,"aria-orientation":g===`vertical`?`vertical`:null,role:`tablist`,...Ke,children:(0,V.jsx)($g.Provider,{value:Fe,children:Le})}),he&&Pe]}),Re.scrollButtonEnd]})});function Ky(e){return zr(`MuiTextField`,e)}U(`MuiTextField`,[`root`]);var qy={standard:Ng,filled:dg,outlined:vv},Jy=e=>{let{classes:t}=e;return W({root:[`root`]},Ky,t)},Yy=K(hg,{name:`MuiTextField`,slot:`Root`})({}),Xy=E.forwardRef(function(e,t){let n=q({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,fullWidth:d=!1,helperText:f,id:p,inputRef:m,label:h,maxRows:g,minRows:_,multiline:v=!1,name:y,onBlur:b,onChange:x,onFocus:S,placeholder:C,required:w=!1,rows:T,select:E=!1,slots:D={},slotProps:O={},type:k,value:A,variant:j=`outlined`,...M}=n,N={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:d,multiline:v,required:w,select:E,variant:j},P=Jy(N),F=zi(p),ee=f&&F?`${F}-helper-text`:void 0,te=h&&F?`${F}-label`:void 0,I=qy[j],ne={slots:D,slotProps:O},[re,ie]=X(`select`,{elementType:Wv,externalForwardedProps:ne,ownerState:N}),ae=E&&ie.native,[oe,se]=X(`inputLabel`,{elementType:Lg,externalForwardedProps:ne,ownerState:N}),ce={};j===`outlined`&&(se.shrink!==void 0&&(ce.notched=se.shrink),ce.label=h),E&&(ae||(ce.id=void 0),ce[`aria-describedby`]=void 0);let[le,ue]=X(`root`,{elementType:Yy,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,...M},ownerState:N,className:H(P.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:d,required:w,color:s,variant:j}}),[de,L]=X(`input`,{elementType:I,externalForwardedProps:ne,additionalProps:ce,ownerState:N}),[R,fe]=X(`htmlInput`,{elementType:`input`,externalForwardedProps:ne,ownerState:N}),[pe,me]=X(`formHelperText`,{elementType:yg,externalForwardedProps:ne,ownerState:N}),he=(0,V.jsx)(de,{"aria-describedby":ee,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:d,multiline:v,name:y,rows:T,maxRows:g,minRows:_,type:k,value:A,id:F,inputRef:m,onBlur:b,onChange:x,onFocus:S,placeholder:C,inputProps:fe,slots:{input:D.htmlInput?R:void 0},...L});return(0,V.jsxs)(le,{...ue,children:[h!=null&&h!==``&&(0,V.jsx)(oe,{htmlFor:E&&!ae?void 0:F,id:te,...E&&!ae&&{component:`div`},...se,children:h}),E?(0,V.jsx)(re,{"aria-describedby":ee,id:F,labelId:te,value:A,input:he,...ie,children:a}):he,f&&(0,V.jsx)(pe,{id:ee,...me,children:f})]})}),Zy=ai({themeId:Qo}),Qy=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9IkxvYWRpbmciPgogIDwhLS0gVGhlIFNlcmlvdXMgR2FtaW5nIGxvYWRlcjogdGhlIGljb24ncyBvd24gYmFyIGZpbGxzIGZyb20gdGhlIGxlZnQsIGhvbGRzLAogICAgICAgZHJhaW5zIHRvIHRoZSByaWdodCBhbmQgcmVzdHMsIGV2ZXJ5IDEwMCBmcmFtZXMgYXQgNjBmcHMsIGFzIHRoZSBsb2dvcwogICAgICAgcmVwb3NpdG9yeSdzIG1ha2VfbG9nby5weSBidWlsZHMgaXQgZm9yIExvdHRpZS4gLS0+CiAgPHN0eWxlPgogICAgLmZpbGwgewogICAgICB0cmFuc2Zvcm0tYm94OiBmaWxsLWJveDsKICAgICAgdHJhbnNmb3JtLW9yaWdpbjogMCA1MCU7CiAgICAgIGFuaW1hdGlvbjogc2ctbG9hZCAxLjY2N3MgaW5maW5pdGU7CiAgICB9CiAgICBAa2V5ZnJhbWVzIHNnLWxvYWQgewogICAgICAwJSB7IHRyYW5zZm9ybTogdHJhbnNsYXRlWCgwKSBzY2FsZVgoMCk7IGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjY1LCAwLCAwLjM1LCAxKTsgfQogICAgICA0MCUgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMCkgc2NhbGVYKDEpOyB9CiAgICAgIDUwJSB7IHRyYW5zZm9ybTogdHJhbnNsYXRlWCgwKSBzY2FsZVgoMSk7IGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjY1LCAwLCAwLjM1LCAxKTsgfQogICAgICA5MCUsIDEwMCUgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMTAwJSkgc2NhbGVYKDApOyB9CiAgICB9CiAgICBAbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkgewogICAgICAuZmlsbCB7IGFuaW1hdGlvbjogbm9uZTsgdHJhbnNmb3JtOiBzY2FsZVgoMC44MTQ0KTsgfQogICAgfQogIDwvc3R5bGU+CiAgPHBhdGggZmlsbD0iI2ZmZmZmZiIgZD0iTTEzNC45NywzOS40M3Y0MC4xSDYwLjkydjE3LjM4aDM5LjAzYzEyLjAzLDAsMjIuMTksNC4yOCwzMC40OCwxMi41NnMxMi41NiwxOC4xOCwxMi41NiwzMC4yMXYxNy4zOGMwLDEyLjAzLTQuMjgsMjIuMTktMTIuNTYsMzAuNDgtOC4yOSw4LjI5LTE4LjE4LDEyLjMtMzAuMjEsMTIuM0gyMC44MnYtNDAuMWg3OS40di0yMC4wNWgtMzkuMDNjLTEyLjAzLDAtMjIuMTktNC4wMS0zMC43NC0xMi4zLTguMjktOC4yOS0xMi41Ni0xOC40NS0xMi41Ni0zMC4yMXYtMTQuN2MwLTEyLjAzLDQuMjgtMjIuMTksMTIuNTYtMzAuNDgsOC4yOS04LjI5LDE4LjQ1LTEyLjU2LDMwLjQ3LTEyLjU2aDc0LjA1WiIvPgogIDxwYXRoIGZpbGw9IiNmZmZmZmYiIGQ9Ik0yNzYuODIsMzkuNDN2NDIuNzdoLTc0Ljg1djc0Ljg1aDM3LjQydi0xNy4zOGgtMjEuMTJ2LTMxLjgxaDYzLjg5djQ5LjE5YzAsMTIuMDMtNC4yOCwyMi4xOS0xMi41NiwzMC40Ny04LjI5LDguMjktMTguMTgsMTIuMy0zMC4yMSwxMi4zaC0zNy4xNmMtMTIuMDMsMC0yMi4xOS00LjI4LTMwLjQ3LTEyLjU2LTguMjktOC4yOS0xMi41Ni0xOC40NS0xMi41Ni0zMC40OHYtNzQuNThjMC0xMi4wMyw0LjAxLTIxLjkyLDEyLjMtMzAuMjEsOC4yOS04LjI5LDE4LjQ1LTEyLjU2LDMwLjQ3LTEyLjU2aDc0Ljg1WiIvPgogIDxyZWN0IGNsYXNzPSJmaWxsIiBmaWxsPSIjNmIwMGZmIiB4PSIyMS4xOSIgeT0iMjIxLjgiIHdpZHRoPSIyNTcuNjYiIGhlaWdodD0iMzUuODciLz4KICA8cGF0aCBmaWxsPSIjZmZmZmZmIiBkPSJNMjczLjE2LDIyOC4yNHYyMy4zMkgyNi44OHYtMjMuMzJoMjQ2LjI4Wk0yODIuMTYsMjE5LjI0SDE3Ljg4djQxLjMyaDI2NC4yOHYtNDEuMzJoMFoiLz4KPC9zdmc+Cg==`,$y=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9IkxvYWRpbmciPgogIDwhLS0gVGhlIFNlcmlvdXMgR2FtaW5nIGxvYWRlcjogdGhlIGljb24ncyBvd24gYmFyIGZpbGxzIGZyb20gdGhlIGxlZnQsIGhvbGRzLAogICAgICAgZHJhaW5zIHRvIHRoZSByaWdodCBhbmQgcmVzdHMsIGV2ZXJ5IDEwMCBmcmFtZXMgYXQgNjBmcHMsIGFzIHRoZSBsb2dvcwogICAgICAgcmVwb3NpdG9yeSdzIG1ha2VfbG9nby5weSBidWlsZHMgaXQgZm9yIExvdHRpZS4gLS0+CiAgPHN0eWxlPgogICAgLmZpbGwgewogICAgICB0cmFuc2Zvcm0tYm94OiBmaWxsLWJveDsKICAgICAgdHJhbnNmb3JtLW9yaWdpbjogMCA1MCU7CiAgICAgIGFuaW1hdGlvbjogc2ctbG9hZCAxLjY2N3MgaW5maW5pdGU7CiAgICB9CiAgICBAa2V5ZnJhbWVzIHNnLWxvYWQgewogICAgICAwJSB7IHRyYW5zZm9ybTogdHJhbnNsYXRlWCgwKSBzY2FsZVgoMCk7IGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjY1LCAwLCAwLjM1LCAxKTsgfQogICAgICA0MCUgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMCkgc2NhbGVYKDEpOyB9CiAgICAgIDUwJSB7IHRyYW5zZm9ybTogdHJhbnNsYXRlWCgwKSBzY2FsZVgoMSk7IGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjY1LCAwLCAwLjM1LCAxKTsgfQogICAgICA5MCUsIDEwMCUgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMTAwJSkgc2NhbGVYKDApOyB9CiAgICB9CiAgICBAbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkgewogICAgICAuZmlsbCB7IGFuaW1hdGlvbjogbm9uZTsgdHJhbnNmb3JtOiBzY2FsZVgoMC44MTQ0KTsgfQogICAgfQogIDwvc3R5bGU+CiAgPHBhdGggZmlsbD0iIzQxNDA0MiIgZD0iTTEzNC45NywzOS40M3Y0MC4xSDYwLjkydjE3LjM4aDM5LjAzYzEyLjAzLDAsMjIuMTksNC4yOCwzMC40OCwxMi41NnMxMi41NiwxOC4xOCwxMi41NiwzMC4yMXYxNy4zOGMwLDEyLjAzLTQuMjgsMjIuMTktMTIuNTYsMzAuNDgtOC4yOSw4LjI5LTE4LjE4LDEyLjMtMzAuMjEsMTIuM0gyMC44MnYtNDAuMWg3OS40di0yMC4wNWgtMzkuMDNjLTEyLjAzLDAtMjIuMTktNC4wMS0zMC43NC0xMi4zLTguMjktOC4yOS0xMi41Ni0xOC40NS0xMi41Ni0zMC4yMXYtMTQuN2MwLTEyLjAzLDQuMjgtMjIuMTksMTIuNTYtMzAuNDgsOC4yOS04LjI5LDE4LjQ1LTEyLjU2LDMwLjQ3LTEyLjU2aDc0LjA1WiIvPgogIDxwYXRoIGZpbGw9IiM0MTQwNDIiIGQ9Ik0yNzYuODIsMzkuNDN2NDIuNzdoLTc0Ljg1djc0Ljg1aDM3LjQydi0xNy4zOGgtMjEuMTJ2LTMxLjgxaDYzLjg5djQ5LjE5YzAsMTIuMDMtNC4yOCwyMi4xOS0xMi41NiwzMC40Ny04LjI5LDguMjktMTguMTgsMTIuMy0zMC4yMSwxMi4zaC0zNy4xNmMtMTIuMDMsMC0yMi4xOS00LjI4LTMwLjQ3LTEyLjU2LTguMjktOC4yOS0xMi41Ni0xOC40NS0xMi41Ni0zMC40OHYtNzQuNThjMC0xMi4wMyw0LjAxLTIxLjkyLDEyLjMtMzAuMjEsOC4yOS04LjI5LDE4LjQ1LTEyLjU2LDMwLjQ3LTEyLjU2aDc0Ljg1WiIvPgogIDxyZWN0IGNsYXNzPSJmaWxsIiBmaWxsPSIjNmIwMGZmIiB4PSIyMS4xOSIgeT0iMjIxLjgiIHdpZHRoPSIyNTcuNjYiIGhlaWdodD0iMzUuODciLz4KICA8cGF0aCBmaWxsPSIjNDE0MDQyIiBkPSJNMjczLjE2LDIyOC4yNHYyMy4zMkgyNi44OHYtMjMuMzJoMjQ2LjI4Wk0yODIuMTYsMjE5LjI0SDE3Ljg4djQxLjMyaDI2NC4yOHYtNDEuMzJoMFoiLz4KPC9zdmc+Cg==`,eb=[`conflict`,`denied`,`llm-failure`,`hook-throw`,`endpoint-timeout`,`tick-failure`],tb=Dl((0,V.jsx)(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z`}),`BugReport`),nb=Dl((0,V.jsx)(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),rb=Dl((0,V.jsx)(`path`,{d:`M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z`}),`OpenInNew`),ib=`embed-scheme`,ab=`embed-brand`;function ob(e){return e===`light`||e===`dark`||e===`system`}function sb(e){try{return window[e]}catch{return null}}function cb(e,t){try{return e?.getItem(t)??null}catch{return null}}function lb(e,t,n){try{n===null?e?.removeItem(t):e?.setItem(t,n)}catch{}}function ub(e,t,n){let r=new URLSearchParams(e).get(`scheme`);if(ob(r))return lb(t,ib,r),r;let i=cb(t,ib);if(ob(i))return i;let a=cb(n,`theme`);return ob(a)?a:`light`}function db(e,t){lb(e,ib,t)}function fb(e,t,n){lb(e,ib,null),lb(t,`theme`,n)}function pb(e){if(typeof e!=`object`||!e)return null;let{type:t,scheme:n}=e;return t===`sg-dev-scheme`&&ob(n)?n:null}function mb(e,t){let n=new URLSearchParams(e).get(`brand`);return n?(lb(t,ab,n),n):cb(t,ab)}function hb(e){lb(e,ab,null)}var gb=`brand`,_b=(0,E.createContext)({brands:[],selected:void 0,select:()=>{}});function vb(){try{let e=localStorage.getItem(gb);return e?JSON.parse(e):null}catch{return null}}function yb(e){try{localStorage.setItem(gb,JSON.stringify(e))}catch{}}function bb(e,t,n=null){let r=e[0]?.id;if(r)return n&&e.some(e=>e.id===n)?n:t&&t.first===r&&e.some(e=>e.id===t.id)?t.id:r}function xb({children:e}){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)(void 0);(0,E.useEffect)(()=>{let e=!1;return fetch(Gc(`/api/brands`,location.search)).then(e=>e.ok?e.json():{brands:[]}).catch(()=>({brands:[]})).then(t=>{if(e)return;let r=t.brands??[];n(r),i(bb(r,vb(),mb(location.search,sb(`sessionStorage`))))}),()=>{e=!0}},[]);let a=(0,E.useCallback)(e=>{i(e),hb(sb(`sessionStorage`));let n=t?.[0]?.id;n&&yb({id:e,first:n})},[t]);if(t===null)return null;let o=t.find(e=>e.id===r);return(0,V.jsx)(_b.Provider,{value:{brands:t,selected:o,select:a},children:e})}function Sb(){return(0,E.useContext)(_b)}var Cb=`loadingHold`,wb=new Set([`setTheme`,`themePreferenceChanged`]);function Tb(e,t){return t===`surface`?e.filter(e=>wb.has(e.type)):e}var Eb=(0,E.createContext)({hold:`none`,setHold:()=>{}});function Db(){try{let e=sessionStorage.getItem(Cb);return e===`host`||e===`surface`?e:`none`}catch{return`none`}}function Ob({children:e}){let[t,n]=(0,E.useState)(Db),r=(0,E.useCallback)(e=>{n(e);try{sessionStorage.setItem(Cb,e)}catch{}},[]);return(0,V.jsx)(Eb.Provider,{value:{hold:t,setHold:r},children:e})}function kb(){return(0,E.useContext)(Eb)}var Ab=`min(70vh, 420px)`;function jb(e){let{state:t,connected:n,transients:r}=e,[i,a]=(0,E.useState)(!1),[o,s]=(0,E.useState)(0),[c,l]=(0,E.useState)(Kb),[u,d]=(0,E.useState)(null),f=(0,E.useCallback)(e=>{l(e);try{localStorage.setItem(Wb,e)}catch{}},[]);return(0,E.useEffect)(()=>{let e=e=>{if(e.key!=="`"||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;t&&/^(INPUT|TEXTAREA)$/.test(t.tagName)||(e.preventDefault(),a(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(qb,{open:i,connected:n,corner:c,processing:r.processing.size>0,errors:r.errors.length,onToggle:()=>a(e=>!e)}),(0,V.jsx)(eg,{anchor:`bottom`,open:i,onClose:()=>a(!1),slotProps:{paper:{sx:{height:Ab,maxHeight:`85vh`}}},children:(0,V.jsxs)(lm,{"data-testid":`dev-drawer`,sx:{display:`contents`},children:[(0,V.jsxs)(my,{direction:`row`,sx:{alignItems:`center`,pr:1},children:[(0,V.jsxs)(Gy,{value:o,onChange:(e,t)=>s(t),variant:`scrollable`,scrollButtons:`auto`,allowScrollButtonsMobile:!0,sx:{flex:1,minWidth:0},children:[(0,V.jsx)(yy,{label:`Session`}),(0,V.jsx)(yy,{label:`Scenario`}),(0,V.jsx)(yy,{label:`Surfaces`}),(0,V.jsx)(yy,{label:`State`}),(0,V.jsx)(yy,{label:`Faults`}),r.errors.length>0&&(0,V.jsx)(yy,{label:`Errors (${r.errors.length})`})]}),(0,V.jsx)(pd,{size:`small`,"aria-label":`Close dev tools`,"data-testid":`dev-drawer-close`,onClick:()=>a(!1),children:(0,V.jsx)(nb,{fontSize:`small`})})]}),(0,V.jsx)(Lh,{}),u&&(0,V.jsx)(Td,{severity:`warning`,square:!0,"data-testid":`drawer-refusal`,onClose:()=>d(null),sx:{borderRadius:0},children:u}),(0,V.jsxs)(lm,{sx:{p:2,overflow:`auto`,flex:1},children:[o===0&&(0,V.jsx)(Jb,{...e,corner:c,onMove:f,onRefusal:d}),o===1&&(0,V.jsx)(Yb,{...e}),o===2&&(0,V.jsx)($b,{state:t,inSetup:e.inSetup,configurable:e.configurable}),o===3&&(0,V.jsx)(nx,{state:t}),o===4&&(0,V.jsx)(rx,{...e,onRefusal:d}),o===5&&(0,V.jsx)(ix,{errors:r.errors})]})]})})]})}var Mb={size:`small`,sx:{minHeight:36,px:1.25}},Nb={...Mb,variant:`contained`},Pb={...Mb,variant:`outlined`},Fb={...Mb,color:`warning`},Ib={...Mb,color:`error`};function Lb({on:e,onClick:t,children:n,...r}){return(0,V.jsx)(xm,{...Mb,...r,onClick:t,sx:{...Mb.sx,color:e?`text.primary`:`text.secondary`},startIcon:(0,V.jsx)(lm,{sx:{width:8,height:8,borderRadius:`50%`,bgcolor:e?`text.primary`:`transparent`,border:1,borderColor:e?`text.primary`:`divider`}}),children:n})}var Rb=6e4;function zb({paused:e,scheduled:t,teamIndex:n,run:r}){let i=n===void 0?{}:{teamIndex:n};return(0,V.jsxs)(my,{direction:`row`,spacing:.5,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)(Lb,{on:!e,"data-testid":n===void 0?`drawer-timer`:void 0,onClick:()=>r({type:e?`resumeTimer`:`pauseTimer`,...i}),children:e?`Timer paused`:`Timer running`}),(0,V.jsx)(xm,{...Mb,disabled:e||!t,onClick:()=>r({type:`extendTick`,byMs:Rb,...i}),children:`+1 min`})]})}function Bb({dormant:e,run:t}){return(0,V.jsx)(my,{direction:`row`,spacing:.5,useFlexGap:!0,sx:{flexWrap:`wrap`},children:(0,V.jsx)(xm,{...Mb,"data-testid":`drawer-make-dormant`,disabled:e,onClick:()=>t({type:`makeDormant`}),title:`Suspend automatic ticking as a host does for a session nobody has used in a day. Any write, tick, timer control, endpoint call or newly opened surface wakes it`,children:e?`Dormant until used`:`Make dormant`})})}function Vb(e,t){return(0,E.useCallback)(n=>{t(null),e(n).then(e=>{`ok`in e&&!e.ok&&t(Hb(e.outcome,n.type))})},[e,t])}function Hb(e,t){return e.kind===`validation-rejected`?e.rejections[0]?.message??`"${t}" was rejected by a validator`:e.kind===`conflict`?e.message??`"${t}" conflicted with a concurrent tick`:e.message}var Ub=[{value:`bottom-right`,label:`Bottom right`},{value:`bottom-left`,label:`Bottom left`},{value:`top-right`,label:`Top right`},{value:`top-left`,label:`Top left`}],Wb=`seriousgaming.devDrawerCorner`;function Gb(e){let[t,n]=e.split(`-`);return{[t]:12,[n]:12}}function Kb(){try{let e=localStorage.getItem(Wb);return Ub.some(t=>t.value===e)?e:`bottom-right`}catch{return`bottom-right`}}function qb({open:e,connected:t,corner:n,processing:r,errors:i,onToggle:a}){let o=t?i>0?`warning.main`:r?`info.main`:`success.main`:`error.main`;return(0,V.jsx)(lm,{sx:{position:`fixed`,...Gb(n),zIndex:e=>e.zIndex.drawer+1,display:e?`none`:`block`},children:(0,V.jsx)(py,{title:i>0?`Dev tools (\`) — ${i} error${i===1?``:`s`}`:"Dev tools (`)",placement:n.endsWith(`right`)?`left`:`right`,children:(0,V.jsxs)(ag,{onClick:a,"data-testid":`dev-drawer-handle`,"aria-label":`Dev tools`,sx:e=>({bgcolor:e.palette.mode===`dark`?`grey.800`:`grey.200`,color:`text.primary`,"&:hover":{bgcolor:e.palette.mode===`dark`?`grey.700`:`grey.300`}}),children:[(0,V.jsx)(tb,{}),(0,V.jsx)(lm,{sx:{position:`absolute`,top:10,right:10,width:10,height:10,borderRadius:`50%`,bgcolor:o,border:2,borderColor:`background.paper`}})]})})})}function Jb({state:e,send:t,mode:n,onModeChange:r,configurable:i,inSetup:a,corner:o,onMove:s,onRefusal:c}){let l=Vb(t,c),u=e.teams.some(e=>e.canUndo),d=e.session.mode===`independent`,f=!e.session.complete&&e.teams.some(e=>!e.complete);return(0,V.jsxs)(my,{spacing:2,children:[(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)(xm,{...Nb,disabled:!f,onClick:()=>l({type:`tick`}),children:`Tick`}),(0,V.jsx)(xm,{...Fb,disabled:!u,onClick:()=>l({type:`undo`}),children:`Undo`}),(0,V.jsx)(xm,{...Ib,onClick:()=>l({type:`reset`}),children:`Reset`}),(0,V.jsx)(Lb,{on:e.session.waitingRoomOpen,onClick:()=>l({type:`setWaitingRoom`,open:!e.session.waitingRoomOpen}),children:`Waiting room`}),(0,V.jsx)(xm,{...Pb,onClick:()=>l({type:`addTeam`}),children:`Add team`}),i&&!a&&(0,V.jsx)(xm,{...Pb,"data-testid":`drawer-reconfigure`,onClick:()=>l({type:`reconfigure`}),children:`Reconfigure`})]}),(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)($p,{size:`small`,variant:`outlined`,label:`tick ${e.session.completedTicks}`}),(0,V.jsx)($p,{size:`small`,variant:`outlined`,label:e.session.mode}),(0,V.jsx)($p,{size:`small`,variant:`outlined`,label:`scenario ${e.game.scenarioId??`none`}`})]}),e.timer?.enabled&&(0,V.jsx)(zb,{paused:e.timer.paused,scheduled:e.timer.nextTickAt!==null,run:l}),(e.timer?.enabled||e.teams.some(e=>e.timer?.enabled))&&(0,V.jsx)(Bb,{dormant:e.timer?.dormant===!0||e.teams.some(e=>e.timer?.dormant===!0),run:l}),(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)(Qb,{state:e,send:t}),(0,V.jsxs)(Wv,{size:`small`,value:n,"aria-label":`Colour scheme`,onChange:e=>r(e.target.value),children:[(0,V.jsx)(rv,{value:`light`,children:`Light`}),(0,V.jsx)(rv,{value:`dark`,children:`Dark`}),(0,V.jsx)(rv,{value:`system`,children:`System`})]}),(0,V.jsx)(ax,{}),(0,V.jsx)(ox,{}),(0,V.jsx)(Wv,{size:`small`,value:o,"aria-label":`Handle position`,"data-testid":`dev-drawer-corner`,onChange:e=>s(e.target.value),children:Ub.map(e=>(0,V.jsx)(rv,{value:e.value,children:e.label},e.value))})]}),(0,V.jsx)(Lh,{}),(0,V.jsx)(my,{spacing:1,children:e.teams.map(t=>(0,V.jsxs)(lm,{children:[(0,V.jsxs)(Z,{variant:`body2`,children:[t.name,` `,(0,V.jsxs)(Z,{component:`span`,color:`text.secondary`,variant:`caption`,children:[`tick `,t.completedTicks,t.complete?` · complete`:``,` · `,t.participants.length,` `,`participant`,t.participants.length===1?``:`s`]})]}),(0,V.jsxs)(my,{direction:`row`,spacing:.5,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[d&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(xm,{...Pb,disabled:t.complete,onClick:()=>l({type:`tick`,teamIndex:t.index}),children:`Tick`}),(0,V.jsx)(xm,{...Fb,onClick:()=>l({type:`undo`,teamIndex:t.index}),disabled:!t.canUndo,children:`Undo`}),(0,V.jsx)(xm,{...Ib,onClick:()=>l({type:`reset`,teamIndex:t.index}),children:`Reset`}),(0,V.jsx)(xm,{...Ib,onClick:()=>l({type:`removeTeam`,teamIndex:t.index}),children:`Delete team`})]}),(0,V.jsx)(xm,{...Mb,onClick:()=>l({type:`addParticipant`,teamId:t.teamId}),children:`Add participant`}),e.timer===null&&t.timer?.enabled&&(0,V.jsx)(zb,{paused:t.timer.paused,scheduled:t.timer.nextTickAt!==null,teamIndex:t.index,run:l})]})]},t.teamId))})]})}function Yb({state:e,send:t}){let[n,r]=(0,E.useState)([]),[i,a]=(0,E.useState)(null),[o,s]=(0,E.useState)(null),[c,l]=(0,E.useState)(null),[u,d]=(0,E.useState)(void 0),[f,p]=(0,E.useState)(!1),m=(0,E.useCallback)(async()=>{let e=await(await fetch(`/api/scenarios`)).json();r(e.scenarios)},[]);(0,E.useEffect)(()=>{m()},[m,e.game.scenarioId]);let h=(0,E.useCallback)(async e=>{a(null),s(null);let t=await fetch(`/api/scenarios/${encodeURIComponent(e)}`,{method:`DELETE`});if(t.ok)s(`Deleted "${e}"`),await m();else{let e=await t.json();a(e.error??`The scenario could not be deleted`)}},[m]),g=(0,E.useCallback)(e=>{window.open(qc({kind:`scenario-editor`,scenario:e}),`_blank`,`noreferrer`)},[]),_=e.game.scenarioId;return(0,V.jsxs)(my,{spacing:2,children:[(0,V.jsxs)(my,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,sx:{flex:1},children:`A scenario is a different set of starting conditions, so switching one restarts the session: every team returns to tick 0, and a game with a configuration step returns to it.`}),(0,V.jsx)(xm,{...Nb,"data-testid":`add-scenario`,onClick:()=>p(!0),children:`Add scenario`})]}),(0,V.jsxs)(my,{spacing:1,children:[n.map(t=>(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,V.jsxs)(Lb,{on:_===t.id,onClick:()=>d(t.id),disabled:_===t.id,children:[Zb(t,e.session.locale),t.default?` (default)`:``]}),(0,V.jsxs)(Z,{variant:`caption`,color:`text.secondary`,sx:{flex:1},children:[t.id,_===t.id?` · active`:``]}),(0,V.jsx)(xm,{...Pb,onClick:()=>g(t.id),children:`Edit`}),(0,V.jsx)(xm,{...Ib,disabled:_===t.id,onClick:()=>l(t.id),children:`Delete`})]},t.id)),!n.some(e=>e.default)&&(0,V.jsxs)(my,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,V.jsx)(Lb,{on:_===null,disabled:_===null,onClick:()=>d(null),children:`None`}),(0,V.jsx)(Z,{variant:`caption`,color:`text.secondary`,children:`the package's own configuration, with no scenario over it`})]})]}),o&&(0,V.jsx)(Z,{variant:`body2`,children:o}),i&&(0,V.jsx)(Z,{variant:`body2`,color:`error`,children:i}),(0,V.jsx)(Xb,{open:f,scenarios:n,locale:e.session.locale,onClose:()=>p(!1),onCreated:async e=>{p(!1),await m(),window.open(qc({kind:`scenario-editor`,scenario:e}),`_blank`,`noreferrer`)},onFailure:a,send:t}),(0,V.jsxs)(vh,{open:u!==void 0,onClose:()=>d(void 0),children:[(0,V.jsx)(jh,{children:`Restart on this scenario?`}),(0,V.jsx)(Oh,{children:(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`A scenario's overrides reach the game through Init, so switching restarts the session: every team returns to tick 0, and a game with a configuration step returns to it.`})}),(0,V.jsxs)(Sh,{children:[(0,V.jsx)(xm,{onClick:()=>d(void 0),children:`Cancel`}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`confirm-scenario`,onClick:()=>{let e=u;d(void 0),e!==void 0&&t({type:`selectScenario`,scenarioId:e})},children:`Restart`})]})]}),(0,V.jsxs)(vh,{open:c!==null,onClose:()=>l(null),children:[(0,V.jsxs)(jh,{children:[`Delete "`,c??``,`"?`]}),(0,V.jsx)(Oh,{children:(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`This removes the scenario directory, and its assets, from the package on disk. It cannot be undone from here.`})}),(0,V.jsxs)(Sh,{children:[(0,V.jsx)(xm,{onClick:()=>l(null),children:`Cancel`}),(0,V.jsx)(xm,{variant:`contained`,color:`error`,"data-testid":`confirm-scenario`,onClick:()=>{let e=c;l(null),e&&h(e)},children:`Delete`})]})]})]})}function Xb({open:e,scenarios:t,onClose:n,onCreated:r,onFailure:i,send:a,locale:o}){let[s,c]=(0,E.useState)(``),[l,u]=(0,E.useState)(``),[d,f]=(0,E.useState)(!1),p=Zy(`(max-width:600px)`),m=async()=>{f(!0);try{await a({type:`selectScenario`,scenarioId:l===``?null:l});let e=await fetch(`/api/scenarios`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({identifier:s,name:s})}),t=await e.json();if(!e.ok){i(t.error??`The scenario could not be created`),n();return}c(``),u(``),await r(t.identifier??s)}finally{f(!1)}};return(0,V.jsxs)(vh,{open:e,onClose:n,fullWidth:!0,maxWidth:`xs`,fullScreen:p,children:[(0,V.jsx)(jh,{children:`Add a scenario`}),(0,V.jsx)(Oh,{children:(0,V.jsxs)(my,{spacing:2,sx:{pt:1},children:[(0,V.jsx)(Xy,{size:`small`,label:`Identifier`,placeholder:`hard-mode`,helperText:`A short lowercase name. It names the directory, and the scenario.`,value:s,onChange:e=>c(e.target.value)}),(0,V.jsxs)(Xy,{select:!0,size:`small`,label:`Start from`,value:l,onChange:e=>u(e.target.value),children:[(0,V.jsx)(rv,{value:``,children:`Scratch: the package's own settings`}),t.map(e=>(0,V.jsxs)(rv,{value:e.id,children:[`A copy of `,Zb(e,o)]},e.id))]}),(0,V.jsx)(Z,{variant:`caption`,color:`text.secondary`,children:`The session restarts on the starting point, and the scenario editor opens in a new tab.`})]})}),(0,V.jsxs)(Sh,{children:[(0,V.jsx)(xm,{onClick:n,children:`Cancel`}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`create-scenario`,disabled:d||s.trim().length===0,onClick:()=>void m(),children:`Create and edit`})]})]})}function Zb(e,t){return e.locales[t]?.name??Object.values(e.locales).find(e=>e.name)?.name??e.id}function Qb({state:e,send:t}){let[n,r]=(0,E.useState)([]);return(0,E.useEffect)(()=>{fetch(`/api/locales`).then(e=>e.json()).then(e=>r(e.supported))},[]),(0,V.jsx)(Wv,{size:`small`,"data-testid":`locale`,value:n.includes(e.session.locale)?e.session.locale:``,onChange:e=>void t({type:`setLocale`,locale:e.target.value}),children:n.map(e=>(0,V.jsx)(rv,{value:e,children:e},e))})}function $b({state:e,inSetup:t,configurable:n}){return(0,V.jsxs)(my,{spacing:2,children:[(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:[(0,V.jsx)(tx,{href:`/`,children:`Session`}),n&&t&&(0,V.jsx)(tx,{href:`/setup`,children:`Setup`}),(0,V.jsx)(tx,{href:`/guide`,children:`Guide`}),(0,V.jsx)(tx,{href:`/print`,children:`Print sheets`}),(0,V.jsx)(tx,{href:`/presentation`,children:`Presentation`}),(0,V.jsx)(tx,{href:`/presentation?preview`,children:`Presentation (no session)`}),(0,V.jsx)(tx,{href:`/walkthrough`,children:`Walkthrough`}),!t&&ex(e)&&(0,V.jsx)(tx,{href:qc({kind:`session-join`,bare:!0}),children:`Session join link`})]}),t&&(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`Player surfaces open once the session starts.`}),!t&&e.teams.map(e=>(0,V.jsxs)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,V.jsx)(Z,{sx:{minWidth:140},children:e.name}),e.participants.slice(0,4).map((t,n)=>(0,V.jsx)(tx,{href:qc({kind:`player`,teamIndex:e.index,participant:n+1}),children:t.name},t.id)),(0,V.jsx)(tx,{href:qc({kind:`observer`,teamIndex:e.index}),children:`Observe`}),(0,V.jsx)(tx,{href:qc({kind:`waiting-room`,teamIndex:e.index}),children:`Waiting room`}),(0,V.jsx)(tx,{href:qc({kind:`join`,teamIndex:e.index}),children:`Join link`})]},e.teamId))]})}function ex(e){return e.settings.game?.teams?.sessionJoin!==!1}function tx({href:e,children:t}){return(0,V.jsx)(xm,{...Mb,href:e,target:`_blank`,rel:`noreferrer`,endIcon:(0,V.jsx)(rb,{sx:{fontSize:14}}),children:t})}function nx({state:e}){return(0,V.jsx)(lm,{component:`pre`,sx:{m:0,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:JSON.stringify(e,null,2)})}function rx({state:e,send:t,onRefusal:n}){let r=Vb(t,n),i=new Set(e.faults.map(e=>e.kind));return(0,V.jsxs)(my,{spacing:2,children:[(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`Arm a failure the platform can produce and this runtime cannot. It fires once, on the next operation of that kind.`}),(0,V.jsx)(my,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`},children:eb.map(e=>(0,V.jsx)(Lb,{on:i.has(e),onClick:()=>r(i.has(e)?{type:`disarmFault`,fault:e}:{type:`armFault`,fault:e}),children:e},e))})]})}function ix({errors:e}){return(0,V.jsx)(my,{spacing:1,children:e.map((e,t)=>(0,V.jsx)(Z,{variant:`body2`,sx:{fontFamily:`monospace`},children:e},t))})}function ax(){let{brands:e,selected:t,select:n}=Sb();return e.length===0||!t?null:(0,V.jsx)(Wv,{size:`small`,value:t.id,"aria-label":`Brand`,"data-testid":`dev-drawer-brand`,onChange:e=>n(e.target.value),children:e.map(e=>(0,V.jsx)(rv,{value:e.id,children:e.name},e.id))})}function ox(){let{hold:e,setHold:t}=kb();return(0,V.jsxs)(Wv,{size:`small`,value:e,"aria-label":`Loading screens`,"data-testid":`dev-drawer-loading-hold`,onChange:e=>t(e.target.value),children:[(0,V.jsx)(rv,{value:`none`,children:`Load normally`}),(0,V.jsx)(rv,{value:`host`,children:`Hold the host's loading screen`}),(0,V.jsx)(rv,{value:`surface`,children:`Hold the game's loading screen`})]})}function sx(e){let t=Object.keys(e);return t.includes(`en`)?`en`:t[0]}function cx(e,t,n){let r=Object.keys(e),i=[...new Set([n,`en`,r[0]])];return(t[sx(e)]??[]).flatMap(e=>{let n=i.find(n=>t[n]?.includes(e));return n?[{file:e,locale:n}]:[]})}var lx=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,ux=Object.hasOwnProperty,dx=class{constructor(){this.occurrences,this.reset()}slug(e,t){let n=this,r=fx(e,t===!0),i=r;for(;ux.call(n.occurrences,r);)n.occurrences[i]++,r=i+`-`+n.occurrences[i];return n.occurrences[r]=0,r}reset(){this.occurrences=Object.create(null)}};function fx(e,t){return typeof e==`string`?(t||(e=e.toLowerCase()),e.replace(lx,``).replace(/ /g,`-`)):``}var px={};function mx(e,t){let n=t||px;return hx(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function hx(e,t,n){if(_x(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return gx(e.children,t,n)}return Array.isArray(e)?gx(e,t,n):``}function gx(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=hx(e[i],t,n);return r.join(``)}function _x(e){return!!(e&&typeof e==`object`)}function vx(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var yx=Ax(/[A-Za-z]/),bx=Ax(/[\dA-Za-z]/),xx=Ax(/[#-'*+\--9=?A-Z^-~]/);function Sx(e){return e!==null&&(e<32||e===127)}var Cx=Ax(/\d/),wx=Ax(/[\dA-Fa-f]/),Tx=Ax(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function Ex(e){return e!==null&&(e<0||e===32)}function Dx(e){return e===-2||e===-1||e===32}var Ox=Ax(/\p{P}|\p{S}/u),kx=Ax(/\s/);function Ax(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var jx=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Mx={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function Nx(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function Px(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Fx(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Ix(e){return Fx(e)||Nx(e)}var Lx=document.createElement(`i`);function Rx(e){let t=`&`+e+`;`;Lx.innerHTML=t;let n=Lx.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var zx=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function Bx(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?Ix:u===`decimal`?Nx:Px;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&jx.includes(y)&&(_=y,v=Rx(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&Rx(y);e&&(_=y,v=e)}let S=1+l-o,C=``;if(x||n.nonTerminated!==!1){if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):Ix(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(Vx(e))h(7,S),C=`�`;else if(e in Mx)h(6,S),C=Mx[e];else{let t=``;Hx(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,zx[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function Vx(e){return e>=55296&&e<=57343||e>1114111}function Hx(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var Ux=/["&'<>`]/g,Wx=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Gx=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Kx=/[|\\{}()[\]^$+*?.]/g,qx=new WeakMap;function Jx(e,t){return e=e.replace(t.subset?Yx(t.subset):Ux,r),t.subset||t.escapeOnly?e:e.replace(Wx,n).replace(Gx,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Yx(e){let t=qx.get(e);return t||(t=Xx(e),qx.set(e,t)),t}function Xx(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Kx,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function Zx(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Qx(e,t){return Jx(e,Object.assign({format:Zx},t))}var $x={}.hasOwnProperty,eS={},tS={},nS=/^[^\t\n\r "#'.<=>`}]+$/,rS=/^[^\t\n\r "'<=>`}]+$/;function iS(e){let t=e||eS;return{canContainEols:[`textDirective`],enter:{directiveContainer:oS,directiveContainerAttributes:mS,directiveContainerLabel:dS,directiveLeaf:sS,directiveLeafAttributes:mS,directiveText:cS,directiveTextAttributes:mS},exit:{directiveContainer:TS,directiveContainerAttributeClass:hS,directiveContainerAttributeClassValue:vS,directiveContainerAttributeId:hS,directiveContainerAttributeIdValue:_S,directiveContainerAttributeName:bS,directiveContainerAttributeValue:yS,directiveContainerAttributeValueLiteral:gS,directiveContainerAttributes:xS,directiveContainerLabel:fS,directiveContainerName:uS,directiveContainerSequence:n,directiveLeaf:TS,directiveLeafAttributeClass:hS,directiveLeafAttributeClassValue:vS,directiveLeafAttributeId:hS,directiveLeafAttributeIdValue:_S,directiveLeafAttributeName:bS,directiveLeafAttributeValue:yS,directiveLeafAttributeValueLiteral:gS,directiveLeafAttributes:xS,directiveLeafLabel:pS,directiveLeafName:uS,directiveLeafSequence:n,directiveText:TS,directiveTextAttributeClass:hS,directiveTextAttributeClassValue:vS,directiveTextAttributeId:hS,directiveTextAttributeIdValue:_S,directiveTextAttributeName:bS,directiveTextAttributeValue:yS,directiveTextAttributeValueLiteral:gS,directiveTextAttributes:xS,directiveTextLabel:pS,directiveTextMarker:n,directiveTextName:uS}};function n(e){if(!t.verbose)return;let n=this.stack[this.stack.length-1];n.type===`containerDirective`||n.type===`leafDirective`||n.type;let r={start:wS(e.start),end:wS(e.end)};n.data&&n.data.position?(n.type,n.data.position.closing=r):n.data={position:{opening:r}}}}function aS(e){let t=e||tS;if(t.quote!==`"`&&t.quote!==`'`&&t.quote!==null&&t.quote!==void 0)throw Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=ES,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:`\r`,inConstruct:[`leafDirectiveLabel`,`containerDirectiveLabel`]},{character:`
171
+ `,inConstruct:[`leafDirectiveLabel`,`containerDirectiveLabel`]},{after:`[^\\s\\p{P}\\p{S}]`,before:`[^:]`,character:`:`,inConstruct:[`phrasing`],unicode:!0},{afterNode:`textDirective`,character:`:`,inConstruct:[`phrasing`]},{atBreak:!0,before:`:+`,character:`:`}]};function n(e,t,n,i){let a=n.createTracker(i),o=n.enter(e.type),s;if(e.type===`containerDirective`){let t=(e.children||[])[0],r=OS(t)?e.children.slice(1):e.children;if(r&&r.length>0){let t=a.current();s=n.containerFlow({...e,children:r},{now:{line:t.now.line+1,column:1+t.lineShift},lineShift:t.lineShift})}}let c=kS(e,s?AS(s):0),l=a.move(c+(e.name||``)),u=r(e,n),d=i.after.charCodeAt(0),f;if(e.type===`containerDirective`){let t=(e.children||[])[0];f=OS(t)?t:void 0}else f=e;if(f&&f.children&&f.children.length>0){let t=n.enter(`label`),r=`${e.type}Label`,i=n.enter(r);l+=a.move(`[`),l+=a.move(n.containerPhrasing(f,{...a.current(),before:l,after:`]`})),l+=a.move(`]`),i(),t()}else u||d!==45&&d!==95&&(Ox(d)||kx(d))||(l+=a.move(`[]`));return l+=a.move(u||(d===123?`{}`:``)),e.type===`containerDirective`&&(s&&(l+=a.move(`
172
172
  `+s)),l+=a.move(`
173
- `+c)),o(),l}function r(e,n){let r=e.attributes||{},a=[],o,s,c,l;for(l in r)if(Qx.call(r,l)&&r[l]!==void 0&&r[l]!==null){let u=ES(String(r[l]));if(l===`id`)c=t.preferShortcut!==!1&&tS.test(u)?`#`+u:i(`id`,u,e,n);else if(l===`class`){let r=u.split(/[\t\n\r ]+/),a=[],c=[];for(let e of r)(t.preferShortcut!==!1&&tS.test(e)?c:a).push(e);o=a.length>0?i(`class`,a.join(` `),e,n):``,s=c.length>0?`.`+c.join(`.`):``}else a.push(i(l,u,e,n))}return o&&a.unshift(o),s&&a.unshift(s),c&&a.unshift(c),a.length>0?`{`+a.join(` `)+`}`:``}function i(e,n,r,i){if(t.collapseEmptyAttributes!==!1&&!n)return e;if(t.preferUnquoted&&nS.test(n))return e+`=`+n;let a=t.quote||i.options.quote||`"`,o=a===`"`?`'`:`"`,s=t.quoteSmart&&_x(n,a)>_x(n,o)?o:a,c=r.type===`textDirective`?[s]:[s,`
174
- `,`\r`];return e+`=`+s+Zx(n,{subset:c})+s}}function aS(e){cS.call(this,`containerDirective`,e)}function oS(e){cS.call(this,`leafDirective`,e)}function sS(e){cS.call(this,`textDirective`,e)}function cS(e,t){this.enter({type:e,name:``,attributes:{},children:[]},t)}function lS(e){let t=this.stack[this.stack.length-1];t.type===`containerDirective`||t.type===`leafDirective`||t.type,t.name=this.sliceSerialize(e),xS(t,e)}function uS(e){this.enter({type:`paragraph`,data:{directiveLabel:!0},children:[]},e)}function dS(e){this.exit(e);let t=this.stack[this.stack.length-1];t.type,xS(t,e)}function fS(e){let t=this.stack[this.stack.length-1];t.type===`leafDirective`||t.type,xS(t,e)}function pS(){let e=this.stack[this.stack.length-1];e.type===`containerDirective`||e.type===`leafDirective`||e.type,e.data&&e.data.position&&(this.data.directiveAttributePositions={}),this.data.directiveAttributes=[],this.buffer()}function mS(e){let t=this.data.directiveAttributePositions;if(t){let n=this.data.directiveAttributes,r=n[n.length-1];t[r[0]]={start:CS(e.start),end:CS(e.end)}}}function hS(e){SS(this,e)}function gS(e){this.data.directiveAttributes.push([`id`,zx(this.sliceSerialize(e),{attribute:!0})])}function _S(e){this.data.directiveAttributes.push([`class`,zx(this.sliceSerialize(e),{attribute:!0})])}function vS(e){let t=this.data.directiveAttributes,n=t[t.length-1];n[1]=zx(this.sliceSerialize(e),{attribute:!0}),SS(this,e)}function yS(e){let t=this.data.directiveAttributes,n=this.sliceSerialize(e);t.push([n,``]);let r=this.data.directiveAttributePositions;r&&(r[n]={start:CS(e.start),end:CS(e.end)})}function bS(e){let t=this.data.directiveAttributes,n={};for(let e of t)e[0]===`class`&&n.class?n.class+=` `+e[1]:n[e[0]]=e[1];let r=this.data.directiveAttributePositions;this.data.directiveAttributePositions=void 0,this.data.directiveAttributes=void 0,this.resume();let i=this.stack[this.stack.length-1];i.type===`containerDirective`||i.type===`leafDirective`||i.type,i.attributes=n,r&&(i.data&&i.data.position,i.data.position.attributes=r),xS(i,e)}function xS(e,t){if(e.data&&e.data.position){let{opening:n}=e.data.position;n.end=CS(t.end)}}function SS(e,t){let n=e.data.directiveAttributePositions;if(n){let r=e.data.directiveAttributes,i=n[r[r.length-1][0]];i.end=CS(t.end)}}function CS(e){return{line:e.line,column:e.column,offset:e.offset}}function wS(e){this.exit(e)}function TS(){return`:`}function ES(e){let t=[],n=0,r=e.indexOf(`&`);for(;r!==-1;){let i=e.charCodeAt(r+1);(i===35||vx(i))&&(t.push(e.slice(n,r),`&#x26;`),n=r+1),r=e.indexOf(`&`,r+1)}return t.push(e.slice(n)),t.join(``)}function DS(e){return!!(e&&e.type===`paragraph`&&e.data&&e.data.directiveLabel)}function OS(e,t){let n=0;return n=e.type===`containerDirective`?Math.max(3,t+1):e.type===`leafDirective`?2:1,`:`.repeat(n)}function kS(e){let t=0,n=0;for(;n<e.length;){let r=0,i=e.charCodeAt(n);for(;i===9||i===32;)i=e.charCodeAt(++n);for(;i===58;)r++,i=e.charCodeAt(++n);for(;i===9||i===32;)i=e.charCodeAt(++n);for(;!(i===10||i===13||Number.isNaN(i));)r=0,i=e.charCodeAt(++n);r>t&&(t=r),n++}return t}function AS(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Ex(r)?(e.enter(n),s(r)):t(r)}function s(r){return Ex(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function jS(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Ex(t)?(e.enter(r),c(t)):l(t)}function c(t){return Ex(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}function MS(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Ex(i)?AS(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}function NS(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){let h,g;return _;function _(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),v}function v(t){return t===35?(h=o,y(t)):t===46?(h=s,y(t)):m&&Ex(t)?AS(e,v,`whitespace`)(t):!m&&Tx(t)?MS(e,v)(t):t===null||Q(t)||Ox(t)||Dx(t)&&t!==45&&t!==95?A(t):(e.enter(a),e.enter(c),e.consume(t),S)}function y(t){let n=h+`Marker`;return e.enter(a),e.enter(h),e.enter(n),e.consume(t),e.exit(n),b}function b(t){if(t===null||t===34||t===35||t===39||t===46||t===60||t===61||t===62||t===96||t===125||Tx(t))return n(t);let r=h+`Value`;return e.enter(r),e.consume(t),x}function x(t){if(t===null||t===34||t===39||t===60||t===61||t===62||t===96)return n(t);if(t===35||t===46||t===125||Tx(t)){let n=h+`Value`;return e.exit(n),e.exit(h),e.exit(a),v(t)}return e.consume(t),x}function S(t){return t===null||Q(t)||Ox(t)||Dx(t)&&t!==45&&t!==46&&t!==58&&t!==95?(e.exit(c),m&&Ex(t)?AS(e,C,`whitespace`)(t):!m&&Tx(t)?MS(e,C)(t):C(t)):(e.consume(t),S)}function C(t){return t===61?(e.enter(l),e.consume(t),e.exit(l),w):(e.exit(a),v(t))}function w(t){return t===null||t===60||t===61||t===62||t===96||t===125||m&&Q(t)?n(t):t===34||t===39?(e.enter(u),e.enter(f),e.consume(t),e.exit(f),g=t,E):m&&Ex(t)?AS(e,w,`whitespace`)(t):!m&&Tx(t)?MS(e,w)(t):(e.enter(d),e.enter(p),e.consume(t),g=void 0,T)}function T(t){return t===null||t===34||t===39||t===60||t===61||t===62||t===96?n(t):t===125||Tx(t)?(e.exit(p),e.exit(d),e.exit(a),v(t)):(e.consume(t),T)}function E(t){return t===g?(e.enter(f),e.consume(t),e.exit(f),e.exit(u),e.exit(a),k):(e.enter(d),D(t))}function D(t){return t===g?(e.exit(d),E(t)):t===null?n(t):Q(t)?m?n(t):MS(e,D)(t):(e.enter(p),e.consume(t),O)}function O(t){return t===g||t===null||Q(t)?(e.exit(p),D(t)):(e.consume(t),O)}function k(e){return e===125||Tx(e)?v(e):A(e)}function A(a){return a===125?(e.enter(i),e.consume(a),e.exit(i),e.exit(r),t):n(a)}}function PS(e,t,n,r,i,a,o){let s=0,c=0,l;return u;function u(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),d}function d(n){return n===93?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),f(n))}function f(t){if(t===93&&!c)return h(t);let n=e.enter(`chunkText`,{_contentTypeTextTrailing:!0,contentType:`text`,previous:l});return l&&(l.next=n),l=n,p(t)}function p(t){return t===null||s>999||t===91&&++c>32?n(t):t===93&&!c--?(e.exit(`chunkText`),h(t)):Q(t)?o?n(t):(e.consume(t),e.exit(`chunkText`),f):(e.consume(t),t===92?m:p)}function m(t){return t===91||t===92||t===93?(e.consume(t),s++,p):p(t)}function h(n){return e.exit(a),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function FS(e,t,n,r){let i=this;return a;function a(t){return t===null||Q(t)||Dx(t)||Ox(t)?n(t):(e.enter(r),e.consume(t),o)}function o(a){return a===null||Q(a)||Ox(a)||Dx(a)&&a!==45&&a!==95?(e.exit(r),i.previous===45||i.previous===95?n(a):t(a)):(e.consume(a),o)}}var IS={tokenize:BS,concrete:!0},LS={tokenize:VS,partial:!0},RS={tokenize:HS,partial:!0},zS={tokenize:US,partial:!0};function BS(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0,s;return c;function c(t){return e.enter(`directiveContainer`),e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),l(t)}function l(t){return t===58?(e.consume(t),o++,l):o<3?n(t):(e.exit(`directiveContainerSequence`),FS.call(r,e,u,n,`directiveContainerName`)(t))}function u(t){return t===91?e.attempt(LS,d,d)(t):d(t)}function d(t){return t===123?e.attempt(RS,f,f)(t):f(t)}function f(t){return AS(e,p,`whitespace`)(t)}function p(i){return e.exit(`directiveContainerFence`),i===null?C(i):Q(i)?r.interrupt?t(i):e.attempt(zS,m,C)(i):n(i)}function m(t){return t===null?C(t):Q(t)?e.check(zS,y,C)(t):(e.enter(`directiveContainerContent`),h(t))}function h(t){return e.attempt({tokenize:w,partial:!0},S,a?AS(e,g,`linePrefix`,a+1):g)(t)}function g(t){return t===null?S(t):Q(t)?e.check(zS,v,S)(t):v(t)}function _(t){if(t===null){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}return Q(t)?e.check(zS,b,x)(t):(e.consume(t),_)}function v(t){let n=e.enter(`chunkDocument`,{contentType:`document`,previous:s});return s&&(s.next=n),s=n,_(t)}function y(t){return e.enter(`directiveContainerContent`),h(t)}function b(t){e.consume(t);let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,h}function x(t){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}function S(t){return e.exit(`directiveContainerContent`),C(t)}function C(n){return e.exit(`directiveContainer`),t(n)}function w(e,t,n){let i=0;return AS(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),s(t)}function s(t){return t===58?(e.consume(t),i++,s):i<o?n(t):(e.exit(`directiveContainerSequence`),AS(e,c,`whitespace`)(t))}function c(r){return r===null||Q(r)?(e.exit(`directiveContainerFence`),t(r)):n(r)}}}function VS(e,t,n){return PS(e,t,n,`directiveContainerLabel`,`directiveContainerLabelMarker`,`directiveContainerLabelString`,!0)}function HS(e,t,n){return NS(e,t,n,`directiveContainerAttributes`,`directiveContainerAttributesMarker`,`directiveContainerAttribute`,`directiveContainerAttributeId`,`directiveContainerAttributeClass`,`directiveContainerAttributeName`,`directiveContainerAttributeInitializerMarker`,`directiveContainerAttributeValueLiteral`,`directiveContainerAttributeValue`,`directiveContainerAttributeValueMarker`,`directiveContainerAttributeValueData`,!0)}function US(e,t,n){let r=this;return i;function i(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var WS={tokenize:qS},GS={tokenize:JS,partial:!0},KS={tokenize:YS,partial:!0};function qS(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveLeaf`),e.enter(`directiveLeafSequence`),e.consume(t),a}function a(t){return t===58?(e.consume(t),e.exit(`directiveLeafSequence`),FS.call(r,e,o,n,`directiveLeafName`)):n(t)}function o(t){return t===91?e.attempt(GS,s,s)(t):s(t)}function s(t){return t===123?e.attempt(KS,c,c)(t):c(t)}function c(t){return AS(e,l,`whitespace`)(t)}function l(r){return r===null||Q(r)?(e.exit(`directiveLeaf`),t(r)):n(r)}}function JS(e,t,n){return PS(e,t,n,`directiveLeafLabel`,`directiveLeafLabelMarker`,`directiveLeafLabelString`,!0)}function YS(e,t,n){return NS(e,t,n,`directiveLeafAttributes`,`directiveLeafAttributesMarker`,`directiveLeafAttribute`,`directiveLeafAttributeId`,`directiveLeafAttributeClass`,`directiveLeafAttributeName`,`directiveLeafAttributeInitializerMarker`,`directiveLeafAttributeValueLiteral`,`directiveLeafAttributeValue`,`directiveLeafAttributeValueMarker`,`directiveLeafAttributeValueData`,!0)}var XS={tokenize:eC,previous:$S},ZS={tokenize:tC,partial:!0},QS={tokenize:nC,partial:!0};function $S(e){return e!==58||this.events[this.events.length-1][1].type===`characterEscape`}function eC(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveText`),e.enter(`directiveTextMarker`),e.consume(t),e.exit(`directiveTextMarker`),FS.call(r,e,a,n,`directiveTextName`)}function a(t){return t===58?n(t):t===91?e.attempt(ZS,o,o)(t):o(t)}function o(t){return t===123?e.attempt(QS,s,s)(t):s(t)}function s(n){return e.exit(`directiveText`),t(n)}}function tC(e,t,n){return PS(e,t,n,`directiveTextLabel`,`directiveTextLabelMarker`,`directiveTextLabelString`)}function nC(e,t,n){return NS(e,t,n,`directiveTextAttributes`,`directiveTextAttributesMarker`,`directiveTextAttribute`,`directiveTextAttributeId`,`directiveTextAttributeClass`,`directiveTextAttributeName`,`directiveTextAttributeInitializerMarker`,`directiveTextAttributeValueLiteral`,`directiveTextAttributeValue`,`directiveTextAttributeValueMarker`,`directiveTextAttributeValueData`)}function rC(){return{text:{58:XS},flow:{58:[IS,WS]}}}function iC(){let e=this.data(),t=e.micromarkExtensions||=[],n=e.fromMarkdownExtensions||=[],r=e.toMarkdownExtensions||=[];t.push(rC()),n.push(rS()),r.push(iS())}function aC(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var oC=(function(e){if(e==null)return dC;if(typeof e==`function`)return uC(e);if(typeof e==`object`)return Array.isArray(e)?sC(e):cC(e);if(typeof e==`string`)return lC(e);throw Error(`Expected function, string, or object as test`)});function sC(e){let t=[],n=-1;for(;++n<e.length;)t[n]=oC(e[n]);return uC(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function cC(e){let t=e;return uC(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function lC(e){return uC(t);function t(t){return t&&t.type===e}}function uC(e){return t;function t(t,n,r){return!!(fC(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function dC(){return!0}function fC(e){return typeof e==`object`&&!!e&&`type`in e}function pC(e){return e}var mC=[],hC=`skip`;function gC(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=oC(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+pC(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=mC;if(s&&r&&(o=_C(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=_C(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function _C(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?mC:[e]}function vC(e,t,n){let r=oC((n||{}).ignore||[]),i=yC(t),a=-1;for(;++a<i.length;)gC(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return hC}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function yC(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([bC(e[0]),xC(e[1])])}return t}function bC(e){return typeof e==`string`?new RegExp(aC(e),`g`):e}function xC(e){return typeof e==`function`?e:function(){return e}}var SC=`phrasing`,CC=[`autolink`,`link`,`image`,`label`];function wC(){return{transforms:[MC],enter:{literalAutolink:EC,literalAutolinkEmail:DC,literalAutolinkHttp:DC,literalAutolinkWww:DC},exit:{literalAutolink:jC,literalAutolinkEmail:AC,literalAutolinkHttp:OC,literalAutolinkWww:kC}}}function TC(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:SC,notInConstruct:CC},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:SC,notInConstruct:CC},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:SC,notInConstruct:CC}]}}function EC(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function DC(e){this.config.enter.autolinkProtocol.call(this,e)}function OC(e){this.config.exit.autolinkProtocol.call(this,e)}function kC(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function AC(e){this.config.exit.autolinkEmail.call(this,e)}function jC(e){this.exit(e)}function MC(e){vC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,NC],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,PC]],{ignore:[`link`,`linkReference`]})}function NC(e,t,n,r,i){let a=``;if(!LC(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!FC(n)))return!1;let o=IC(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function PC(e,t,n,r){return!LC(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function FC(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function IC(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=_x(e,`(`),a=_x(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function LC(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Ox(n)||Dx(n))&&(!t||n!==47)}function RC(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}JC.peek=qC;function zC(){this.buffer()}function BC(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function VC(){this.buffer()}function HC(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function UC(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=RC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WC(e){this.exit(e)}function GC(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=RC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KC(e){this.exit(e)}function qC(){return`[`}function JC(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function YC(){return{enter:{gfmFootnoteCallString:zC,gfmFootnoteCall:BC,gfmFootnoteDefinitionLabelString:VC,gfmFootnoteDefinition:HC},exit:{gfmFootnoteCallString:UC,gfmFootnoteCall:WC,gfmFootnoteDefinitionLabelString:GC,gfmFootnoteDefinition:KC}}}function XC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:JC},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
175
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?QC:ZC))),s(),o}}function ZC(e,t,n){return t===0?e:QC(e,t,n)}function QC(e,t,n){return(n?``:` `)+e}var $C=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];iw.attention=aw,iw.peek=ow;function ew(){return{canContainEols:[`delete`],enter:{strikethrough:nw},exit:{strikethrough:rw}}}function tw(){return{handlers:{delete:iw},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:$C}]}}function nw(e){this.enter({type:`delete`,children:[],position:void 0},e)}function rw(e){this.exit(e)}function iw(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function aw(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function ow(){return`~`}function sw(e){return e.length}function cw(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||sw,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=lw(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=uw(r[d]);else{let e=uw(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
176
- `)}function lw(e){return e==null?``:String(e)}function uw(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var dw=oC([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function fw(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),pw);return i(),o}function pw(e,t,n){return`>`+(n?``:` `)+e}function mw(e,t){return hw(e,t.inConstruct,!0)&&!hw(e,t.notInConstruct,!1)}function hw(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function gw(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
177
- `&&!e.before&&!e.after&&mw(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
178
- `}function _w(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function vw(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function yw(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function bw(e,t,n,r){let i=yw(n),a=e.value||``;if(vw(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,xw);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(_w(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
173
+ `+c)),o(),l}function r(e,n){let r=e.attributes||{},a=[],o,s,c,l;for(l in r)if($x.call(r,l)&&r[l]!==void 0&&r[l]!==null){let u=DS(String(r[l]));if(l===`id`)c=t.preferShortcut!==!1&&nS.test(u)?`#`+u:i(`id`,u,e,n);else if(l===`class`){let r=u.split(/[\t\n\r ]+/),a=[],c=[];for(let e of r)(t.preferShortcut!==!1&&nS.test(e)?c:a).push(e);o=a.length>0?i(`class`,a.join(` `),e,n):``,s=c.length>0?`.`+c.join(`.`):``}else a.push(i(l,u,e,n))}return o&&a.unshift(o),s&&a.unshift(s),c&&a.unshift(c),a.length>0?`{`+a.join(` `)+`}`:``}function i(e,n,r,i){if(t.collapseEmptyAttributes!==!1&&!n)return e;if(t.preferUnquoted&&rS.test(n))return e+`=`+n;let a=t.quote||i.options.quote||`"`,o=a===`"`?`'`:`"`,s=t.quoteSmart&&vx(n,a)>vx(n,o)?o:a,c=r.type===`textDirective`?[s]:[s,`
174
+ `,`\r`];return e+`=`+s+Qx(n,{subset:c})+s}}function oS(e){lS.call(this,`containerDirective`,e)}function sS(e){lS.call(this,`leafDirective`,e)}function cS(e){lS.call(this,`textDirective`,e)}function lS(e,t){this.enter({type:e,name:``,attributes:{},children:[]},t)}function uS(e){let t=this.stack[this.stack.length-1];t.type===`containerDirective`||t.type===`leafDirective`||t.type,t.name=this.sliceSerialize(e),SS(t,e)}function dS(e){this.enter({type:`paragraph`,data:{directiveLabel:!0},children:[]},e)}function fS(e){this.exit(e);let t=this.stack[this.stack.length-1];t.type,SS(t,e)}function pS(e){let t=this.stack[this.stack.length-1];t.type===`leafDirective`||t.type,SS(t,e)}function mS(){let e=this.stack[this.stack.length-1];e.type===`containerDirective`||e.type===`leafDirective`||e.type,e.data&&e.data.position&&(this.data.directiveAttributePositions={}),this.data.directiveAttributes=[],this.buffer()}function hS(e){let t=this.data.directiveAttributePositions;if(t){let n=this.data.directiveAttributes,r=n[n.length-1];t[r[0]]={start:wS(e.start),end:wS(e.end)}}}function gS(e){CS(this,e)}function _S(e){this.data.directiveAttributes.push([`id`,Bx(this.sliceSerialize(e),{attribute:!0})])}function vS(e){this.data.directiveAttributes.push([`class`,Bx(this.sliceSerialize(e),{attribute:!0})])}function yS(e){let t=this.data.directiveAttributes,n=t[t.length-1];n[1]=Bx(this.sliceSerialize(e),{attribute:!0}),CS(this,e)}function bS(e){let t=this.data.directiveAttributes,n=this.sliceSerialize(e);t.push([n,``]);let r=this.data.directiveAttributePositions;r&&(r[n]={start:wS(e.start),end:wS(e.end)})}function xS(e){let t=this.data.directiveAttributes,n={};for(let e of t)e[0]===`class`&&n.class?n.class+=` `+e[1]:n[e[0]]=e[1];let r=this.data.directiveAttributePositions;this.data.directiveAttributePositions=void 0,this.data.directiveAttributes=void 0,this.resume();let i=this.stack[this.stack.length-1];i.type===`containerDirective`||i.type===`leafDirective`||i.type,i.attributes=n,r&&(i.data&&i.data.position,i.data.position.attributes=r),SS(i,e)}function SS(e,t){if(e.data&&e.data.position){let{opening:n}=e.data.position;n.end=wS(t.end)}}function CS(e,t){let n=e.data.directiveAttributePositions;if(n){let r=e.data.directiveAttributes,i=n[r[r.length-1][0]];i.end=wS(t.end)}}function wS(e){return{line:e.line,column:e.column,offset:e.offset}}function TS(e){this.exit(e)}function ES(){return`:`}function DS(e){let t=[],n=0,r=e.indexOf(`&`);for(;r!==-1;){let i=e.charCodeAt(r+1);(i===35||yx(i))&&(t.push(e.slice(n,r),`&#x26;`),n=r+1),r=e.indexOf(`&`,r+1)}return t.push(e.slice(n)),t.join(``)}function OS(e){return!!(e&&e.type===`paragraph`&&e.data&&e.data.directiveLabel)}function kS(e,t){let n=0;return n=e.type===`containerDirective`?Math.max(3,t+1):e.type===`leafDirective`?2:1,`:`.repeat(n)}function AS(e){let t=0,n=0;for(;n<e.length;){let r=0,i=e.charCodeAt(n);for(;i===9||i===32;)i=e.charCodeAt(++n);for(;i===58;)r++,i=e.charCodeAt(++n);for(;i===9||i===32;)i=e.charCodeAt(++n);for(;!(i===10||i===13||Number.isNaN(i));)r=0,i=e.charCodeAt(++n);r>t&&(t=r),n++}return t}function jS(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Dx(r)?(e.enter(n),s(r)):t(r)}function s(r){return Dx(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function MS(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Dx(t)?(e.enter(r),c(t)):l(t)}function c(t){return Dx(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}function NS(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Dx(i)?jS(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}function PS(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){let h,g;return _;function _(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),v}function v(t){return t===35?(h=o,y(t)):t===46?(h=s,y(t)):m&&Dx(t)?jS(e,v,`whitespace`)(t):!m&&Ex(t)?NS(e,v)(t):t===null||Q(t)||kx(t)||Ox(t)&&t!==45&&t!==95?A(t):(e.enter(a),e.enter(c),e.consume(t),S)}function y(t){let n=h+`Marker`;return e.enter(a),e.enter(h),e.enter(n),e.consume(t),e.exit(n),b}function b(t){if(t===null||t===34||t===35||t===39||t===46||t===60||t===61||t===62||t===96||t===125||Ex(t))return n(t);let r=h+`Value`;return e.enter(r),e.consume(t),x}function x(t){if(t===null||t===34||t===39||t===60||t===61||t===62||t===96)return n(t);if(t===35||t===46||t===125||Ex(t)){let n=h+`Value`;return e.exit(n),e.exit(h),e.exit(a),v(t)}return e.consume(t),x}function S(t){return t===null||Q(t)||kx(t)||Ox(t)&&t!==45&&t!==46&&t!==58&&t!==95?(e.exit(c),m&&Dx(t)?jS(e,C,`whitespace`)(t):!m&&Ex(t)?NS(e,C)(t):C(t)):(e.consume(t),S)}function C(t){return t===61?(e.enter(l),e.consume(t),e.exit(l),w):(e.exit(a),v(t))}function w(t){return t===null||t===60||t===61||t===62||t===96||t===125||m&&Q(t)?n(t):t===34||t===39?(e.enter(u),e.enter(f),e.consume(t),e.exit(f),g=t,E):m&&Dx(t)?jS(e,w,`whitespace`)(t):!m&&Ex(t)?NS(e,w)(t):(e.enter(d),e.enter(p),e.consume(t),g=void 0,T)}function T(t){return t===null||t===34||t===39||t===60||t===61||t===62||t===96?n(t):t===125||Ex(t)?(e.exit(p),e.exit(d),e.exit(a),v(t)):(e.consume(t),T)}function E(t){return t===g?(e.enter(f),e.consume(t),e.exit(f),e.exit(u),e.exit(a),k):(e.enter(d),D(t))}function D(t){return t===g?(e.exit(d),E(t)):t===null?n(t):Q(t)?m?n(t):NS(e,D)(t):(e.enter(p),e.consume(t),O)}function O(t){return t===g||t===null||Q(t)?(e.exit(p),D(t)):(e.consume(t),O)}function k(e){return e===125||Ex(e)?v(e):A(e)}function A(a){return a===125?(e.enter(i),e.consume(a),e.exit(i),e.exit(r),t):n(a)}}function FS(e,t,n,r,i,a,o){let s=0,c=0,l;return u;function u(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),d}function d(n){return n===93?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),f(n))}function f(t){if(t===93&&!c)return h(t);let n=e.enter(`chunkText`,{_contentTypeTextTrailing:!0,contentType:`text`,previous:l});return l&&(l.next=n),l=n,p(t)}function p(t){return t===null||s>999||t===91&&++c>32?n(t):t===93&&!c--?(e.exit(`chunkText`),h(t)):Q(t)?o?n(t):(e.consume(t),e.exit(`chunkText`),f):(e.consume(t),t===92?m:p)}function m(t){return t===91||t===92||t===93?(e.consume(t),s++,p):p(t)}function h(n){return e.exit(a),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function IS(e,t,n,r){let i=this;return a;function a(t){return t===null||Q(t)||Ox(t)||kx(t)?n(t):(e.enter(r),e.consume(t),o)}function o(a){return a===null||Q(a)||kx(a)||Ox(a)&&a!==45&&a!==95?(e.exit(r),i.previous===45||i.previous===95?n(a):t(a)):(e.consume(a),o)}}var LS={tokenize:VS,concrete:!0},RS={tokenize:HS,partial:!0},zS={tokenize:US,partial:!0},BS={tokenize:WS,partial:!0};function VS(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0,s;return c;function c(t){return e.enter(`directiveContainer`),e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),l(t)}function l(t){return t===58?(e.consume(t),o++,l):o<3?n(t):(e.exit(`directiveContainerSequence`),IS.call(r,e,u,n,`directiveContainerName`)(t))}function u(t){return t===91?e.attempt(RS,d,d)(t):d(t)}function d(t){return t===123?e.attempt(zS,f,f)(t):f(t)}function f(t){return jS(e,p,`whitespace`)(t)}function p(i){return e.exit(`directiveContainerFence`),i===null?C(i):Q(i)?r.interrupt?t(i):e.attempt(BS,m,C)(i):n(i)}function m(t){return t===null?C(t):Q(t)?e.check(BS,y,C)(t):(e.enter(`directiveContainerContent`),h(t))}function h(t){return e.attempt({tokenize:w,partial:!0},S,a?jS(e,g,`linePrefix`,a+1):g)(t)}function g(t){return t===null?S(t):Q(t)?e.check(BS,v,S)(t):v(t)}function _(t){if(t===null){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}return Q(t)?e.check(BS,b,x)(t):(e.consume(t),_)}function v(t){let n=e.enter(`chunkDocument`,{contentType:`document`,previous:s});return s&&(s.next=n),s=n,_(t)}function y(t){return e.enter(`directiveContainerContent`),h(t)}function b(t){e.consume(t);let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,h}function x(t){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}function S(t){return e.exit(`directiveContainerContent`),C(t)}function C(n){return e.exit(`directiveContainer`),t(n)}function w(e,t,n){let i=0;return jS(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),s(t)}function s(t){return t===58?(e.consume(t),i++,s):i<o?n(t):(e.exit(`directiveContainerSequence`),jS(e,c,`whitespace`)(t))}function c(r){return r===null||Q(r)?(e.exit(`directiveContainerFence`),t(r)):n(r)}}}function HS(e,t,n){return FS(e,t,n,`directiveContainerLabel`,`directiveContainerLabelMarker`,`directiveContainerLabelString`,!0)}function US(e,t,n){return PS(e,t,n,`directiveContainerAttributes`,`directiveContainerAttributesMarker`,`directiveContainerAttribute`,`directiveContainerAttributeId`,`directiveContainerAttributeClass`,`directiveContainerAttributeName`,`directiveContainerAttributeInitializerMarker`,`directiveContainerAttributeValueLiteral`,`directiveContainerAttributeValue`,`directiveContainerAttributeValueMarker`,`directiveContainerAttributeValueData`,!0)}function WS(e,t,n){let r=this;return i;function i(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var GS={tokenize:JS},KS={tokenize:YS,partial:!0},qS={tokenize:XS,partial:!0};function JS(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveLeaf`),e.enter(`directiveLeafSequence`),e.consume(t),a}function a(t){return t===58?(e.consume(t),e.exit(`directiveLeafSequence`),IS.call(r,e,o,n,`directiveLeafName`)):n(t)}function o(t){return t===91?e.attempt(KS,s,s)(t):s(t)}function s(t){return t===123?e.attempt(qS,c,c)(t):c(t)}function c(t){return jS(e,l,`whitespace`)(t)}function l(r){return r===null||Q(r)?(e.exit(`directiveLeaf`),t(r)):n(r)}}function YS(e,t,n){return FS(e,t,n,`directiveLeafLabel`,`directiveLeafLabelMarker`,`directiveLeafLabelString`,!0)}function XS(e,t,n){return PS(e,t,n,`directiveLeafAttributes`,`directiveLeafAttributesMarker`,`directiveLeafAttribute`,`directiveLeafAttributeId`,`directiveLeafAttributeClass`,`directiveLeafAttributeName`,`directiveLeafAttributeInitializerMarker`,`directiveLeafAttributeValueLiteral`,`directiveLeafAttributeValue`,`directiveLeafAttributeValueMarker`,`directiveLeafAttributeValueData`,!0)}var ZS={tokenize:tC,previous:eC},QS={tokenize:nC,partial:!0},$S={tokenize:rC,partial:!0};function eC(e){return e!==58||this.events[this.events.length-1][1].type===`characterEscape`}function tC(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveText`),e.enter(`directiveTextMarker`),e.consume(t),e.exit(`directiveTextMarker`),IS.call(r,e,a,n,`directiveTextName`)}function a(t){return t===58?n(t):t===91?e.attempt(QS,o,o)(t):o(t)}function o(t){return t===123?e.attempt($S,s,s)(t):s(t)}function s(n){return e.exit(`directiveText`),t(n)}}function nC(e,t,n){return FS(e,t,n,`directiveTextLabel`,`directiveTextLabelMarker`,`directiveTextLabelString`)}function rC(e,t,n){return PS(e,t,n,`directiveTextAttributes`,`directiveTextAttributesMarker`,`directiveTextAttribute`,`directiveTextAttributeId`,`directiveTextAttributeClass`,`directiveTextAttributeName`,`directiveTextAttributeInitializerMarker`,`directiveTextAttributeValueLiteral`,`directiveTextAttributeValue`,`directiveTextAttributeValueMarker`,`directiveTextAttributeValueData`)}function iC(){return{text:{58:ZS},flow:{58:[LS,GS]}}}function aC(){let e=this.data(),t=e.micromarkExtensions||=[],n=e.fromMarkdownExtensions||=[],r=e.toMarkdownExtensions||=[];t.push(iC()),n.push(iS()),r.push(aS())}function oC(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var sC=(function(e){if(e==null)return fC;if(typeof e==`function`)return dC(e);if(typeof e==`object`)return Array.isArray(e)?cC(e):lC(e);if(typeof e==`string`)return uC(e);throw Error(`Expected function, string, or object as test`)});function cC(e){let t=[],n=-1;for(;++n<e.length;)t[n]=sC(e[n]);return dC(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function lC(e){let t=e;return dC(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function uC(e){return dC(t);function t(t){return t&&t.type===e}}function dC(e){return t;function t(t,n,r){return!!(pC(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function fC(){return!0}function pC(e){return typeof e==`object`&&!!e&&`type`in e}function mC(e){return e}var hC=[],gC=`skip`;function _C(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=sC(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+mC(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=hC;if(s&&r&&(o=vC(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=vC(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function vC(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?hC:[e]}function yC(e,t,n){let r=sC((n||{}).ignore||[]),i=bC(t),a=-1;for(;++a<i.length;)_C(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return gC}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function bC(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([xC(e[0]),SC(e[1])])}return t}function xC(e){return typeof e==`string`?new RegExp(oC(e),`g`):e}function SC(e){return typeof e==`function`?e:function(){return e}}var CC=`phrasing`,wC=[`autolink`,`link`,`image`,`label`];function TC(){return{transforms:[NC],enter:{literalAutolink:DC,literalAutolinkEmail:OC,literalAutolinkHttp:OC,literalAutolinkWww:OC},exit:{literalAutolink:MC,literalAutolinkEmail:jC,literalAutolinkHttp:kC,literalAutolinkWww:AC}}}function EC(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:CC,notInConstruct:wC},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:CC,notInConstruct:wC},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:CC,notInConstruct:wC}]}}function DC(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function OC(e){this.config.enter.autolinkProtocol.call(this,e)}function kC(e){this.config.exit.autolinkProtocol.call(this,e)}function AC(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function jC(e){this.config.exit.autolinkEmail.call(this,e)}function MC(e){this.exit(e)}function NC(e){yC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,PC],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,FC]],{ignore:[`link`,`linkReference`]})}function PC(e,t,n,r,i){let a=``;if(!RC(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!IC(n)))return!1;let o=LC(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function FC(e,t,n,r){return!RC(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function IC(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function LC(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=vx(e,`(`),a=vx(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function RC(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||kx(n)||Ox(n))&&(!t||n!==47)}function zC(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}YC.peek=JC;function BC(){this.buffer()}function VC(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function HC(){this.buffer()}function UC(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function WC(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function GC(e){this.exit(e)}function KC(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qC(e){this.exit(e)}function JC(){return`[`}function YC(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function XC(){return{enter:{gfmFootnoteCallString:BC,gfmFootnoteCall:VC,gfmFootnoteDefinitionLabelString:HC,gfmFootnoteDefinition:UC},exit:{gfmFootnoteCallString:WC,gfmFootnoteCall:GC,gfmFootnoteDefinitionLabelString:KC,gfmFootnoteDefinition:qC}}}function ZC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:YC},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
175
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?$C:QC))),s(),o}}function QC(e,t,n){return t===0?e:$C(e,t,n)}function $C(e,t,n){return(n?``:` `)+e}var ew=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];aw.attention=ow,aw.peek=sw;function tw(){return{canContainEols:[`delete`],enter:{strikethrough:rw},exit:{strikethrough:iw}}}function nw(){return{handlers:{delete:aw},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:ew}]}}function rw(e){this.enter({type:`delete`,children:[],position:void 0},e)}function iw(e){this.exit(e)}function aw(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function ow(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function sw(){return`~`}function cw(e){return e.length}function lw(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cw,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=uw(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=dw(r[d]);else{let e=dw(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
176
+ `)}function uw(e){return e==null?``:String(e)}function dw(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var fw=sC([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function pw(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),mw);return i(),o}function mw(e,t,n){return`>`+(n?``:` `)+e}function hw(e,t){return gw(e,t.inConstruct,!0)&&!gw(e,t.notInConstruct,!1)}function gw(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function _w(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
177
+ `&&!e.before&&!e.after&&hw(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
178
+ `}function vw(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function yw(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function bw(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function xw(e,t,n,r){let i=bw(n),a=e.value||``;if(yw(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Sw);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(vw(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
179
179
  `,encode:["`"],...o.current()})),t()}return u+=o.move(`
180
180
  `),a&&(u+=o.move(a+`
181
- `)),u+=o.move(s),c(),u}function xw(e,t,n){return(n?``:` `)+e}function Sw(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Cw(e,t,n,r){let i=Sw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
182
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function ww(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Tw(e){if(e===null||Tx(e)||Ox(e))return 1;if(Dx(e))return 2}function Ew(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function Dw(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function Ow(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function kw(e,t,n){let r=Tw(e),i=Tw(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var Aw=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),jw=[`pre`,`script`,`style`,`textarea`];function Mw(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:vx(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!vx(a))return;for(;a===45||yx(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&jw.includes(o)?1:Aw.includes(o)?6:7}var Nw=new Map([[`*`,!1],[`_`,!0]]);function Pw(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function Fw(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=Nw.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=Tw(u.charCodeAt(u.length-1)),f=Tw((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(Rw(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:Pw(e,t,a),index:o}}}function Iw(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?Ew(n.value):Dw(n.value),i=Ow(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function Lw(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=Hw(e,c,r,i),u=Fw(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function Rw(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function zw(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!wx(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function Bw(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?Ew(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
183
- `)&&l.type===`html`&&Mw(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(Uw(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=Vw(l,f.attention,t,c);a.push(e),s=Dw(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=Dw(n)}}return r.pop(),a}function Vw(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=zw(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=Bw(e,n,{...r.current(),before:c,after:c});return r.move(Uw(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function Hw(e,t,n,r){let i=[],a,o=Dw(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===Ew(n)&&Iw([e],!0),a=void 0,i.push(e),e.value&&(o=Dw(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=Ew(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=Hw(n.children,t,c,c),m=p.length>0?p[0].value:``,h=kw(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&Iw(p,!0);let g=p.length>0?Dw(p[p.length-1].value):``,_=kw(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&Iw(p,!1),h.outside&&d!==`
184
- `&&d!==`\r`&&Iw(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function Uw(e,t,n){let r=new Map,i=Hw(e,r,t,n),a=i,o=Fw(a,t,n);for(;o;){let s=Lw(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}Ww.attention=Gw,Ww.peek=Kw;function Ww(e,t,n,r){let i=n.enter(`phrasing`),a=Uw([Vw(e,Gw,n,n.createTracker(r))],r.before,r.after);return i(),a}function Gw(e,t){return{construct:`emphasis`,markers:ww(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function Kw(e,t,n){return n.options.emphasis||`*`}function qw(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?gC(e,i,Yw(a),o):gC(e,i,Jw(a),o)}function Jw(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?Yw(e.enter):e.enter,exit:typeof e.exit==`function`?Yw(e.exit):e.exit}}function Yw(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}function Xw(e,t){let n=!1;return qw(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&px(e)&&(t.options.setext||n))}function Zw(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Xw(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
181
+ `)),u+=o.move(s),c(),u}function Sw(e,t,n){return(n?``:` `)+e}function Cw(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ww(e,t,n,r){let i=Cw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
182
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Tw(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ew(e){if(e===null||Ex(e)||kx(e))return 1;if(Ox(e))return 2}function Dw(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function Ow(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function kw(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Aw(e,t,n){let r=Ew(e),i=Ew(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var jw=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Mw=[`pre`,`script`,`style`,`textarea`];function Nw(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:yx(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!yx(a))return;for(;a===45||bx(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&Mw.includes(o)?1:jw.includes(o)?6:7}var Pw=new Map([[`*`,!1],[`_`,!0]]);function Fw(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function Iw(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=Pw.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=Ew(u.charCodeAt(u.length-1)),f=Ew((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(zw(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:Fw(e,t,a),index:o}}}function Lw(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?Dw(n.value):Ow(n.value),i=kw(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function Rw(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=Uw(e,c,r,i),u=Iw(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function zw(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function Bw(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Tx(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function Vw(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?Dw(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
183
+ `)&&l.type===`html`&&Nw(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(Ww(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=Hw(l,f.attention,t,c);a.push(e),s=Ow(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=Ow(n)}}return r.pop(),a}function Hw(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=Bw(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=Vw(e,n,{...r.current(),before:c,after:c});return r.move(Ww(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function Uw(e,t,n,r){let i=[],a,o=Ow(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===Dw(n)&&Lw([e],!0),a=void 0,i.push(e),e.value&&(o=Ow(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=Dw(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=Uw(n.children,t,c,c),m=p.length>0?p[0].value:``,h=Aw(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&Lw(p,!0);let g=p.length>0?Ow(p[p.length-1].value):``,_=Aw(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&Lw(p,!1),h.outside&&d!==`
184
+ `&&d!==`\r`&&Lw(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function Ww(e,t,n){let r=new Map,i=Uw(e,r,t,n),a=i,o=Iw(a,t,n);for(;o;){let s=Rw(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}Gw.attention=Kw,Gw.peek=qw;function Gw(e,t,n,r){let i=n.enter(`phrasing`),a=Ww([Hw(e,Kw,n,n.createTracker(r))],r.before,r.after);return i(),a}function Kw(e,t){return{construct:`emphasis`,markers:Tw(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function qw(e,t,n){return n.options.emphasis||`*`}function Jw(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?_C(e,i,Xw(a),o):_C(e,i,Yw(a),o)}function Yw(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?Xw(e.enter):e.enter,exit:typeof e.exit==`function`?Xw(e.exit):e.exit}}function Xw(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}function Zw(e,t){let n=!1;return Jw(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&mx(e)&&(t.options.setext||n))}function Qw(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Zw(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
185
185
  `,after:`
186
186
  `});return r(),t(),o+`
187
187
  `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
188
188
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
189
- `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Ow(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Qw.peek=$w;function Qw(e){return e.value||``}function $w(){return`<`}eT.peek=tT;function eT(e,t,n,r){let i=Sw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function tT(){return`!`}nT.peek=rT;function nT(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function rT(){return`!`}iT.peek=aT;function iT(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function aT(){return"`"}function oT(e,t){let n=px(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}sT.peek=cT;function sT(e,t,n,r){let i=Sw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(oT(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
190
- `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function cT(e,t,n){return oT(e,n)?`<`:`[`}lT.peek=uT;function lT(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function uT(){return`[`}function dT(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function fT(e){let t=dT(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function pT(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mT(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function hT(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?pT(n):dT(n),s=e.ordered?o===`.`?`)`:`.`:fT(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),mT(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function gT(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _T(e,t,n,r){let i=gT(n),a=n.bulletCurrent||dT(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function vT(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function yT(e,t,n,r){if(!e.children.some(function(e){return dw(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function bT(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}xT.attention=ST,xT.peek=CT;function xT(e,t,n,r){let i=n.enter(`phrasing`),a=Uw([Vw(e,ST,n,n.createTracker(r))],r.before,r.after);return i(),a}function ST(e,t){return{construct:`strong`,markers:bT(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function CT(e,t,n){return n.options.strong||`*`}function wT(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function TT(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ET(e,t,n){let r=(mT(n)+(n.options.ruleSpaces?` `:``)).repeat(TT(n));return n.options.ruleSpaces?r.slice(0,-1):r}var DT={blockquote:fw,break:gw,code:bw,definition:Cw,emphasis:Ww,hardBreak:gw,heading:Zw,html:Qw,image:eT,imageReference:nT,inlineCode:iT,link:sT,linkReference:lT,list:hT,listItem:_T,paragraph:vT,root:yT,strong:xT,text:wT,thematicBreak:ET};function OT(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var kT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AT(e){return e.replace(kT,jT)}function jT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return OT(n.slice(t?2:1),t?16:10)}return Lx(n)||e}function MT(){return{enter:{table:NT,tableData:LT,tableHeader:LT,tableRow:FT},exit:{codeText:RT,table:PT,tableData:IT,tableHeader:IT,tableRow:IT}}}function NT(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function PT(e){this.exit(e),this.data.inTable=void 0}function FT(e){this.enter({type:`tableRow`,children:[]},e)}function IT(e){this.exit(e)}function LT(e){this.enter({type:`tableCell`,children:[]},e)}function RT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zT));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function zT(e,t){return t===`|`?t:e}function BT(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
189
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=kw(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}$w.peek=eT;function $w(e){return e.value||``}function eT(){return`<`}tT.peek=nT;function tT(e,t,n,r){let i=Cw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function nT(){return`!`}rT.peek=iT;function rT(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function iT(){return`!`}aT.peek=oT;function aT(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function oT(){return"`"}function sT(e,t){let n=mx(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}cT.peek=lT;function cT(e,t,n,r){let i=Cw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(sT(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
190
+ `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function lT(e,t,n){return sT(e,n)?`<`:`[`}uT.peek=dT;function uT(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function dT(){return`[`}function fT(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function pT(e){let t=fT(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function mT(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function hT(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function gT(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?mT(n):fT(n),s=e.ordered?o===`.`?`)`:`.`:pT(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),hT(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function _T(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function vT(e,t,n,r){let i=_T(n),a=n.bulletCurrent||fT(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function yT(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function bT(e,t,n,r){if(!e.children.some(function(e){return fw(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function xT(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ST.attention=CT,ST.peek=wT;function ST(e,t,n,r){let i=n.enter(`phrasing`),a=Ww([Hw(e,CT,n,n.createTracker(r))],r.before,r.after);return i(),a}function CT(e,t){return{construct:`strong`,markers:xT(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function wT(e,t,n){return n.options.strong||`*`}function TT(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function ET(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function DT(e,t,n){let r=(hT(n)+(n.options.ruleSpaces?` `:``)).repeat(ET(n));return n.options.ruleSpaces?r.slice(0,-1):r}var OT={blockquote:pw,break:_w,code:xw,definition:ww,emphasis:Gw,hardBreak:_w,heading:Qw,html:$w,image:tT,imageReference:rT,inlineCode:aT,link:cT,linkReference:uT,list:gT,listItem:vT,paragraph:yT,root:bT,strong:ST,text:TT,thematicBreak:DT};function kT(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var AT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jT(e){return e.replace(AT,MT)}function MT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return kT(n.slice(t?2:1),t?16:10)}return Rx(n)||e}function NT(){return{enter:{table:PT,tableData:RT,tableHeader:RT,tableRow:IT},exit:{codeText:zT,table:FT,tableData:LT,tableHeader:LT,tableRow:LT}}}function PT(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function FT(e){this.exit(e),this.data.inTable=void 0}function IT(e){this.enter({type:`tableRow`,children:[]},e)}function LT(e){this.exit(e)}function RT(e){this.enter({type:`tableCell`,children:[]},e)}function zT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,BT));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function BT(e,t){return t===`|`?t:e}function VT(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
191
191
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
192
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return cw(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=DT.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function VT(){return{exit:{taskListCheckValueChecked:UT,taskListCheckValueUnchecked:UT,paragraph:WT}}}function HT(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:GT}}}function UT(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function WT(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function GT(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=DT.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function KT(){return[wC(),YC(),ew(),MT(),VT()]}function qT(e){return{extensions:[TC(),XC(e),tw(),BT(e),HT()]}}function JT(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function YT(e,t){return e.length>0?(JT(e,e.length,0,t),e):t}var XT={}.hasOwnProperty;function ZT(e){let t={},n=-1;for(;++n<e.length;)QT(t,e[n]);return t}function QT(e,t){let n;for(n in t){let r=(XT.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){XT.call(r,a)||(r[a]=[]);let e=i[a];$T(r[a],Array.isArray(e)?e:e?[e]:[])}}}function $T(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);JT(e,0,0,r)}var eE={tokenize:mE,partial:!0},tE={tokenize:hE,partial:!0},nE={tokenize:gE,partial:!0},rE={tokenize:_E,partial:!0},iE={tokenize:vE,partial:!0},aE={name:`wwwAutolink`,tokenize:fE,previous:yE},oE={name:`protocolAutolink`,tokenize:pE,previous:bE},sE={name:`emailAutolink`,tokenize:dE,previous:xE},cE={};function lE(){return{text:cE}}for(var uE=48;uE<123;)cE[uE]=sE,uE++,uE===58?uE=65:uE===91&&(uE=97);cE[43]=sE,cE[45]=sE,cE[46]=sE,cE[95]=sE,cE[72]=[sE,oE],cE[104]=[sE,oE],cE[87]=[sE,aE],cE[119]=[sE,aE];function dE(e,t,n){let r=this,i,a;return o;function o(t){return!SE(t)||!xE.call(r,r.previous)||CE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return SE(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(iE,u,l)(t):t===45||t===95||yx(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&vx(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function fE(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!yE.call(r,r.previous)||CE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(eE,e.attempt(tE,e.attempt(nE,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function pE(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&bE.call(r,r.previous)&&!CE(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(vx(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||xx(t)||Tx(t)||Ox(t)||Dx(t)?n(t):e.attempt(tE,e.attempt(nE,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function mE(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function hE(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(rE,c,s)(t):t===null||Tx(t)||Ox(t)||t!==45&&Dx(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function gE(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(rE,t,a)(o):o===null||Tx(o)||Ox(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function _E(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Tx(o)||Ox(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Tx(e)||Ox(e)?t(e):r(e)}function a(e){return vx(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):vx(t)?(e.consume(t),o):n(t)}}function vE(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return yx(e)?n(e):t(e)}}function yE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Tx(e)}function bE(e){return!vx(e)}function xE(e){return!(e===47||SE(e))}function SE(e){return e===43||e===45||e===46||e===95||yx(e)}function CE(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function wE(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&yx(e.charCodeAt(n+1))&&yx(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function TE(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var EE={name:`attention`,resolveAll:DE,tokenize:OE};function DE(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};kE(o,-a),kE(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=YT(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=YT(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=YT(r,TE(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=YT(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=YT(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),JT(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function OE(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Tw(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Tw(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function kE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var AE={name:`autolink`,tokenize:jE};function jE(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return vx(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||yx(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||yx(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||xx(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):bx(t)?(e.consume(t),l):n(t)}function u(e){return yx(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||yx(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var ME={partial:!0,tokenize:NE};function NE(e,t,n){return r;function r(t){return Ex(t)?AS(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var PE={continuation:{tokenize:IE},exit:LE,name:`blockQuote`,tokenize:FE};function FE(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Ex(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function IE(e,t,n){let r=this;return i;function i(t){return Ex(t)?AS(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(PE,t,n)(r)}}function LE(e){e.exit(`blockQuote`)}var RE={name:`characterEscape`,tokenize:zE};function zE(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return wx(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var BE={name:`characterReference`,tokenize:VE};function VE(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=yx,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Cx,u):(e.enter(`characterReferenceValue`),a=7,o=Sx,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===yx&&!Lx(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var HE={partial:!0,tokenize:UE};function UE(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var WE={concrete:!0,name:`codeFenced`,tokenize:GE};function GE(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Ex(t)?AS(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(HE,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Ex(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),AS(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Ex(t)?AS(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(HE,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Ex(t)?AS(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Ex(t)?AS(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var KE={name:`codeIndented`,tokenize:JE},qE={partial:!0,tokenize:YE};function JE(e,t,n){return r;function r(t){return e.enter(`codeIndented`),jS(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Q(t)?e.attempt(qE,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function YE(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Q(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):jS(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Q(e)?i(e):n(e)}}var XE={name:`codeText`,previous:QE,resolve:ZE,tokenize:$E};function ZE(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function QE(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function $E(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var eD=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&tD(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),tD(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),tD(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);tD(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);tD(this.left,t.reverse())}}}};function tD(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function nD(e){let t={},n=-1,r,i,a,o,s,c,l,u=new eD(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,rD(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return JT(e,0,1/0,u.slice(0)),!l}function rD(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var iD={resolve:oD,tokenize:sD},aD={partial:!0,tokenize:cD};function oD(e){return nD(e),e}function sD(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Q(t)?e.check(aD,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function cD(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),AS(e,a,`linePrefix`)}function a(i){if(i===null||Q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function lD(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||xx(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Tx(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||xx(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function uD(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Ex(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function dD(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),AS(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}var fD={name:`definition`,tokenize:mD},pD={partial:!0,tokenize:hD};function mD(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return uD.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=RC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Tx(t)?MS(e,l)(t):l(t)}function l(t){return lD(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(pD,d,d)(t)}function d(t){return Ex(t)?AS(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function hD(e,t,n){return r;function r(t){return Tx(t)?MS(e,i)(t):n(t)}function i(t){return dD(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Ex(t)?AS(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var gD={name:`hardBreakEscape`,tokenize:_D};function _D(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var vD={name:`headingAtx`,resolve:yD,tokenize:bD};function yD(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};JT(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function bD(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Tx(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):Ex(n)?AS(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Tx(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var xD={concrete:!0,name:`htmlFlow`,resolveTo:CD,tokenize:wD},SD={partial:!0,tokenize:TD};function CD(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function wD(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ee):vx(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):vx(a)?(e.consume(a),i=4,r.interrupt?t:ee):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ee):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return vx(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Tx(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&jw.includes(l)?(i=1,r.interrupt?t(s):O(s)):Aw.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||yx(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Ex(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||vx(t)?(e.consume(t),b):Ex(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||yx(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Ex(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Ex(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Tx(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Ex(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Q(t)?O(t):Ex(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),ee):t===93&&i===5?(e.consume(t),F):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(SD,I,k)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(HE,A,I)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Q(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),ee):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return jw.includes(n)?(e.consume(t),te):O(t)}return vx(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),ee):O(t)}function ee(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),ee):O(t)}function te(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),I(t)):(e.consume(t),te)}function I(n){return e.exit(`htmlFlow`),t(n)}}function TD(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(ME,t,n)}}var ED={name:`htmlText`,tokenize:DD};function DD(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):vx(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):vx(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Q(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Q(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Q(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return vx(t)?(e.consume(t),S):n(t)}function S(t){return t===45||yx(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,N(t)):Ex(t)?(e.consume(t),C):M(t)}function w(t){return t===45||yx(t)?(e.consume(t),w):t===47||t===62||Tx(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||vx(t)?(e.consume(t),E):Q(t)?(o=T,N(t)):Ex(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||yx(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,N(t)):Ex(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Q(t)?(o=O,N(t)):Ex(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Q(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Tx(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Tx(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Ex(t)?AS(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var OD={name:`labelEnd`,resolveAll:MD,resolveTo:ND,tokenize:PD},kD={tokenize:FD},AD={tokenize:ID},jD={tokenize:LD};function MD(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&JT(e,0,e.length,n),e}function ND(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=YT(o,e.slice(i+1,i+r+3)),o=YT(o,[[`enter`,l,t]]),o=YT(o,TE(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=YT(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=YT(o,e.slice(a+1)),o=YT(o,[[`exit`,s,t]]),JT(e,i,e.length,o),e}function PD(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(RC(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(kD,u,o?u:d)(t):t===91?e.attempt(AD,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(jD,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function FD(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Tx(t)?MS(e,a)(t):a(t)}function a(t){return t===41?u(t):lD(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Tx(t)?MS(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?dD(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Tx(t)?MS(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function ID(e,t,n){let r=this;return i;function i(t){return uD.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(RC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function LD(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var RD={name:`labelStartImage`,resolveAll:OD.resolveAll,tokenize:zD};function zD(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var BD={name:`labelStartLink`,resolveAll:OD.resolveAll,tokenize:VD};function VD(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var HD={name:`lineEnding`,tokenize:UD};function UD(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),AS(e,t,`linePrefix`)}}var WD={name:`thematicBreak`,tokenize:GD};function GD(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Ex(t)?AS(e,s,`whitespace`)(t):s(t))}}var KD={continuation:{tokenize:XD},exit:QD,name:`list`,tokenize:YD},qD={partial:!0,tokenize:$D},JD={partial:!0,tokenize:ZD};function YD(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Sx(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(WD,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Sx(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(ME,r.interrupt?n:u,e.attempt(qD,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Ex(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function XD(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(ME,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,AS(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Ex(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(JD,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,AS(e,e.attempt(KD,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ZD(e,t,n){let r=this;return AS(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function QD(e){e.exit(this.containerState.type)}function $D(e,t,n){let r=this;return AS(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Ex(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var eO=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){tO(this,e,t,n,!1)}addBefore(e,t,n){tO(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function tO(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var nO={name:`setextUnderline`,resolveTo:rO,tokenize:iO};function rO(e,t){let n=new eO,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function iO(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Ex(t)?AS(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var aO={tokenize:pO,partial:!0};function oO(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:uO,continuation:{tokenize:dO},exit:fO}},text:{91:{name:`gfmFootnoteCall`,tokenize:lO},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:sO,resolveTo:cO}}}}function sO(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=RC(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function cO(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function lO(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Tx(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(RC(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Tx(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function uO(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Tx(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=RC(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Tx(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),AS(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function dO(e,t,n){return e.check(ME,t,e.attempt(aO,t,n))}function fO(e){e.exit(`gfmFootnoteDefinition`)}function pO(e,t,n){let r=this;return AS(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function mO(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&JT(o,o.length,0,TE(s,e.slice(r+1,n),t)),JT(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),JT(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Tw(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Tw(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var hO=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){gO(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function gO(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function _O(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function vO(){return{flow:{null:{name:`table`,tokenize:yO,resolveAll:bO}}}}function yO(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Ex(t)?AS(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Tx(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Ex(t)?AS(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Ex(t)?AS(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Ex(t)?AS(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):Ex(n)?AS(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Tx(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function bO(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new hO;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(SO(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=xO(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=xO(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=xO(f,t,o,i,n,d)):(o[0]=o[1],d=xO(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&SO(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=_O(t.events,n))}return e}function xO(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},CO(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=CO(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=CO(t.events,n[2]),a=CO(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},CO(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function SO(e,t,n,r,i){let a=[],o=CO(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function CO(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var wO={name:`tasklistCheck`,tokenize:EO};function TO(){return{text:{91:wO}}}function EO(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Tx(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):Ex(r)?e.check({tokenize:DO},t,n)(r):n(r)}}function DO(e,t,n){return AS(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function OO(e){return ZT([lE(),oO(),mO(e),vO(),TO()])}var kO={};function AO(e){let t=this,n=e||kO,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(OO(n)),a.push(KT()),o.push(qT(n))}var jO={tokenize:MO};function MO(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),AS(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var NO={tokenize:FO},PO={tokenize:IO};function FO(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new eO;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(PO,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(PO,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return Q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new eO;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function IO(e,t,n){return AS(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var LO={tokenize:RO};function RO(e){let t=this,n=e.attempt(ME,r,e.attempt(this.parser.constructs.flowInitial,i,AS(e,e.attempt(this.parser.constructs.flow,i,e.attempt(iD,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var zO={resolveAll:UO()},BO=HO(`string`),VO=HO(`text`);function HO(e){return{resolveAll:UO(e===`text`?WO:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function UO(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function WO(e,t){let n=new eO,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var GO=s({attentionMarkers:()=>$O,contentInitial:()=>qO,disable:()=>ek,document:()=>KO,flow:()=>YO,flowInitial:()=>JO,insideSpan:()=>QO,string:()=>XO,text:()=>ZO}),KO={42:KD,43:KD,45:KD,48:KD,49:KD,50:KD,51:KD,52:KD,53:KD,54:KD,55:KD,56:KD,57:KD,62:PE},qO={91:fD},JO={[-2]:KE,[-1]:KE,32:KE},YO={35:vD,42:WD,45:[nO,WD],60:xD,61:nO,95:WD,96:WE,126:WE},XO={38:BE,92:RE},ZO={[-5]:HD,[-4]:HD,[-3]:HD,33:RD,38:BE,42:EE,60:[AE,ED],91:BD,92:[gD,RE],93:OD,95:EE,96:XE},QO={null:[EE,zO]},$O={null:[42,95]},ek={null:[]};function tk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=YT(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=TE(a,l.events,l),l.events):[]}function f(e,t){return rk(p(e),t)}function p(e){return nk(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&JT(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function nk(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function rk(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
192
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return lw(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=OT.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function HT(){return{exit:{taskListCheckValueChecked:WT,taskListCheckValueUnchecked:WT,paragraph:GT}}}function UT(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:KT}}}function WT(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function GT(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function KT(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=OT.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function qT(){return[TC(),XC(),tw(),NT(),HT()]}function JT(e){return{extensions:[EC(),ZC(e),nw(),VT(e),UT()]}}function YT(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function XT(e,t){return e.length>0?(YT(e,e.length,0,t),e):t}var ZT={}.hasOwnProperty;function QT(e){let t={},n=-1;for(;++n<e.length;)$T(t,e[n]);return t}function $T(e,t){let n;for(n in t){let r=(ZT.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ZT.call(r,a)||(r[a]=[]);let e=i[a];eE(r[a],Array.isArray(e)?e:e?[e]:[])}}}function eE(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);YT(e,0,0,r)}var tE={tokenize:hE,partial:!0},nE={tokenize:gE,partial:!0},rE={tokenize:_E,partial:!0},iE={tokenize:vE,partial:!0},aE={tokenize:yE,partial:!0},oE={name:`wwwAutolink`,tokenize:pE,previous:bE},sE={name:`protocolAutolink`,tokenize:mE,previous:xE},cE={name:`emailAutolink`,tokenize:fE,previous:SE},lE={};function uE(){return{text:lE}}for(var dE=48;dE<123;)lE[dE]=cE,dE++,dE===58?dE=65:dE===91&&(dE=97);lE[43]=cE,lE[45]=cE,lE[46]=cE,lE[95]=cE,lE[72]=[cE,sE],lE[104]=[cE,sE],lE[87]=[cE,oE],lE[119]=[cE,oE];function fE(e,t,n){let r=this,i,a;return o;function o(t){return!CE(t)||!SE.call(r,r.previous)||wE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return CE(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(aE,u,l)(t):t===45||t===95||bx(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&yx(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function pE(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!bE.call(r,r.previous)||wE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(tE,e.attempt(nE,e.attempt(rE,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function mE(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&xE.call(r,r.previous)&&!wE(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(yx(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Sx(t)||Ex(t)||kx(t)||Ox(t)?n(t):e.attempt(nE,e.attempt(rE,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function hE(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function gE(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(iE,c,s)(t):t===null||Ex(t)||kx(t)||t!==45&&Ox(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function _E(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(iE,t,a)(o):o===null||Ex(o)||kx(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function vE(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ex(o)||kx(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Ex(e)||kx(e)?t(e):r(e)}function a(e){return yx(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):yx(t)?(e.consume(t),o):n(t)}}function yE(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return bx(e)?n(e):t(e)}}function bE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ex(e)}function xE(e){return!yx(e)}function SE(e){return!(e===47||CE(e))}function CE(e){return e===43||e===45||e===46||e===95||bx(e)}function wE(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function TE(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&bx(e.charCodeAt(n+1))&&bx(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function EE(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var DE={name:`attention`,resolveAll:OE,tokenize:kE};function OE(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};AE(o,-a),AE(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=XT(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=XT(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=XT(r,EE(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=XT(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=XT(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),YT(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function kE(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ew(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Ew(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function AE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var jE={name:`autolink`,tokenize:ME};function ME(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return yx(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||bx(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||bx(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Sx(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):xx(t)?(e.consume(t),l):n(t)}function u(e){return bx(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||bx(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var NE={partial:!0,tokenize:PE};function PE(e,t,n){return r;function r(t){return Dx(t)?jS(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var FE={continuation:{tokenize:LE},exit:RE,name:`blockQuote`,tokenize:IE};function IE(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Dx(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function LE(e,t,n){let r=this;return i;function i(t){return Dx(t)?jS(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(FE,t,n)(r)}}function RE(e){e.exit(`blockQuote`)}var zE={name:`characterEscape`,tokenize:BE};function BE(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Tx(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var VE={name:`characterReference`,tokenize:HE};function HE(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=bx,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=wx,u):(e.enter(`characterReferenceValue`),a=7,o=Cx,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===bx&&!Rx(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var UE={partial:!0,tokenize:WE};function WE(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var GE={concrete:!0,name:`codeFenced`,tokenize:KE};function KE(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Dx(t)?jS(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(UE,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Dx(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),jS(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Dx(t)?jS(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(UE,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Dx(t)?jS(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Dx(t)?jS(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var qE={name:`codeIndented`,tokenize:YE},JE={partial:!0,tokenize:XE};function YE(e,t,n){return r;function r(t){return e.enter(`codeIndented`),MS(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Q(t)?e.attempt(JE,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function XE(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Q(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):MS(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Q(e)?i(e):n(e)}}var ZE={name:`codeText`,previous:$E,resolve:QE,tokenize:eD};function QE(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function $E(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function eD(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var tD=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&nD(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),nD(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),nD(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);nD(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);nD(this.left,t.reverse())}}}};function nD(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function rD(e){let t={},n=-1,r,i,a,o,s,c,l,u=new tD(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,iD(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return YT(e,0,1/0,u.slice(0)),!l}function iD(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var aD={resolve:sD,tokenize:cD},oD={partial:!0,tokenize:lD};function sD(e){return rD(e),e}function cD(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Q(t)?e.check(oD,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function lD(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),jS(e,a,`linePrefix`)}function a(i){if(i===null||Q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function uD(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Sx(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ex(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Sx(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function dD(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Dx(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function fD(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),jS(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}var pD={name:`definition`,tokenize:hD},mD={partial:!0,tokenize:gD};function hD(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return dD.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=zC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ex(t)?NS(e,l)(t):l(t)}function l(t){return uD(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(mD,d,d)(t)}function d(t){return Dx(t)?jS(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function gD(e,t,n){return r;function r(t){return Ex(t)?NS(e,i)(t):n(t)}function i(t){return fD(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Dx(t)?jS(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var _D={name:`hardBreakEscape`,tokenize:vD};function vD(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var yD={name:`headingAtx`,resolve:bD,tokenize:xD};function bD(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};YT(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function xD(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ex(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):Dx(n)?jS(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ex(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var SD={concrete:!0,name:`htmlFlow`,resolveTo:wD,tokenize:TD},CD={partial:!0,tokenize:ED};function wD(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function TD(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ee):yx(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):yx(a)?(e.consume(a),i=4,r.interrupt?t:ee):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ee):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return yx(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ex(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Mw.includes(l)?(i=1,r.interrupt?t(s):O(s)):jw.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||bx(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Dx(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||yx(t)?(e.consume(t),b):Dx(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||bx(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Dx(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Dx(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ex(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Dx(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Q(t)?O(t):Dx(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),ee):t===93&&i===5?(e.consume(t),F):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(CD,I,k)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(UE,A,I)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Q(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),ee):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Mw.includes(n)?(e.consume(t),te):O(t)}return yx(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),ee):O(t)}function ee(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),ee):O(t)}function te(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),I(t)):(e.consume(t),te)}function I(n){return e.exit(`htmlFlow`),t(n)}}function ED(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(NE,t,n)}}var DD={name:`htmlText`,tokenize:OD};function OD(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):yx(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):yx(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Q(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Q(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Q(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return yx(t)?(e.consume(t),S):n(t)}function S(t){return t===45||bx(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,N(t)):Dx(t)?(e.consume(t),C):M(t)}function w(t){return t===45||bx(t)?(e.consume(t),w):t===47||t===62||Ex(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||yx(t)?(e.consume(t),E):Q(t)?(o=T,N(t)):Dx(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||bx(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,N(t)):Dx(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Q(t)?(o=O,N(t)):Dx(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Q(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ex(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Ex(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Dx(t)?jS(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var kD={name:`labelEnd`,resolveAll:ND,resolveTo:PD,tokenize:FD},AD={tokenize:ID},jD={tokenize:LD},MD={tokenize:RD};function ND(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&YT(e,0,e.length,n),e}function PD(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=XT(o,e.slice(i+1,i+r+3)),o=XT(o,[[`enter`,l,t]]),o=XT(o,EE(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=XT(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=XT(o,e.slice(a+1)),o=XT(o,[[`exit`,s,t]]),YT(e,i,e.length,o),e}function FD(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(zC(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(AD,u,o?u:d)(t):t===91?e.attempt(jD,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(MD,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function ID(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Ex(t)?NS(e,a)(t):a(t)}function a(t){return t===41?u(t):uD(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Ex(t)?NS(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?fD(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Ex(t)?NS(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function LD(e,t,n){let r=this;return i;function i(t){return dD.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(zC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function RD(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var zD={name:`labelStartImage`,resolveAll:kD.resolveAll,tokenize:BD};function BD(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var VD={name:`labelStartLink`,resolveAll:kD.resolveAll,tokenize:HD};function HD(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var UD={name:`lineEnding`,tokenize:WD};function WD(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),jS(e,t,`linePrefix`)}}var GD={name:`thematicBreak`,tokenize:KD};function KD(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Dx(t)?jS(e,s,`whitespace`)(t):s(t))}}var qD={continuation:{tokenize:ZD},exit:$D,name:`list`,tokenize:XD},JD={partial:!0,tokenize:eO},YD={partial:!0,tokenize:QD};function XD(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Cx(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(GD,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Cx(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(NE,r.interrupt?n:u,e.attempt(JD,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Dx(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ZD(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(NE,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,jS(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Dx(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(YD,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,jS(e,e.attempt(qD,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function QD(e,t,n){let r=this;return jS(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function $D(e){e.exit(this.containerState.type)}function eO(e,t,n){let r=this;return jS(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Dx(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var tO=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){nO(this,e,t,n,!1)}addBefore(e,t,n){nO(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function nO(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var rO={name:`setextUnderline`,resolveTo:iO,tokenize:aO};function iO(e,t){let n=new tO,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function aO(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Dx(t)?jS(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var oO={tokenize:mO,partial:!0};function sO(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:dO,continuation:{tokenize:fO},exit:pO}},text:{91:{name:`gfmFootnoteCall`,tokenize:uO},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:cO,resolveTo:lO}}}}function cO(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=zC(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function lO(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function uO(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Ex(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(zC(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ex(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function dO(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Ex(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=zC(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ex(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),jS(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function fO(e,t,n){return e.check(NE,t,e.attempt(oO,t,n))}function pO(e){e.exit(`gfmFootnoteDefinition`)}function mO(e,t,n){let r=this;return jS(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function hO(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&YT(o,o.length,0,EE(s,e.slice(r+1,n),t)),YT(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),YT(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Ew(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ew(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var gO=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){_O(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function _O(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function vO(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function yO(){return{flow:{null:{name:`table`,tokenize:bO,resolveAll:xO}}}}function bO(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Dx(t)?jS(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Ex(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Dx(t)?jS(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Dx(t)?jS(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Dx(t)?jS(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):Dx(n)?jS(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Ex(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function xO(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new gO;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(CO(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=SO(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=SO(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=SO(f,t,o,i,n,d)):(o[0]=o[1],d=SO(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&CO(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=vO(t.events,n))}return e}function SO(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},wO(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=wO(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=wO(t.events,n[2]),a=wO(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},wO(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function CO(e,t,n,r,i){let a=[],o=wO(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function wO(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var TO={name:`tasklistCheck`,tokenize:DO};function EO(){return{text:{91:TO}}}function DO(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Ex(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):Dx(r)?e.check({tokenize:OO},t,n)(r):n(r)}}function OO(e,t,n){return jS(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function kO(e){return QT([uE(),sO(),hO(e),yO(),EO()])}var AO={};function jO(e){let t=this,n=e||AO,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(kO(n)),a.push(qT()),o.push(JT(n))}var MO={tokenize:NO};function NO(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),jS(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var PO={tokenize:IO},FO={tokenize:LO};function IO(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new tO;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(FO,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(FO,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return Q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new tO;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function LO(e,t,n){return jS(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var RO={tokenize:zO};function zO(e){let t=this,n=e.attempt(NE,r,e.attempt(this.parser.constructs.flowInitial,i,jS(e,e.attempt(this.parser.constructs.flow,i,e.attempt(aD,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var BO={resolveAll:WO()},VO=UO(`string`),HO=UO(`text`);function UO(e){return{resolveAll:WO(e===`text`?GO:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function WO(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function GO(e,t){let n=new tO,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var KO=s({attentionMarkers:()=>ek,contentInitial:()=>JO,disable:()=>tk,document:()=>qO,flow:()=>XO,flowInitial:()=>YO,insideSpan:()=>$O,string:()=>ZO,text:()=>QO}),qO={42:qD,43:qD,45:qD,48:qD,49:qD,50:qD,51:qD,52:qD,53:qD,54:qD,55:qD,56:qD,57:qD,62:FE},JO={91:pD},YO={[-2]:qE,[-1]:qE,32:qE},XO={35:yD,42:GD,45:[rO,GD],60:SD,61:rO,95:GD,96:GE,126:GE},ZO={38:VE,92:zE},QO={[-5]:UD,[-4]:UD,[-3]:UD,33:zD,38:VE,42:DE,60:[jE,DD],91:VD,92:[_D,zE],93:kD,95:DE,96:ZE},$O={null:[DE,BO]},ek={null:[42,95]},tk={null:[]};function nk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=XT(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=EE(a,l.events,l),l.events):[]}function f(e,t){return ik(p(e),t)}function p(e){return rk(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&YT(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function rk(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ik(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
193
193
  `;break;case-3:o=`\r
194
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function ik(e){let t={constructs:ZT([GO,...(e||{}).extensions||[]]),content:n(jO),defined:[],document:n(NO),flow:n(LO),lazy:{},string:n(BO),text:n(VO)};return t;function n(e){return n;function n(n){return tk(t,e,n)}}}function ak(e){for(;!nD(e););return e}var ok=/[\0\t\n\r]/g;function sk(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){ok.lastIndex=c;let n=ok.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function ck(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?uk(e.position):`start`in e||`end`in e?uk(e):`line`in e||`column`in e?lk(e):``}function lk(e){return dk(e&&e.line)+`:`+dk(e&&e.column)}function uk(e){return lk(e&&e.start)+`-`+lk(e&&e.end)}function dk(e){return e&&typeof e==`number`?e:1}var fk={}.hasOwnProperty;function pk(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),mk(n)(ak(ik(n).document().write(sk()(e,t,!0))))}function mk(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ge),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(pe),blockQuote:o(ue),characterEscape:E,characterReference:E,codeFenced:o(de),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(de,s),codeText:o(L,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(R),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(fe),hardBreakEscape:o(me),hardBreakTrailing:o(me),htmlFlow:o(he,s),htmlFlowData:E,htmlText:o(he,s),htmlTextData:E,image:o(z),label:s,link:o(ge),listItem:o(ve),listItemValue:p,listOrdered:o(_e,f),listUnordered:o(_e),paragraph:o(ye),reference:re,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(pe),strong:o(be),thematicBreak:o(Se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:ee,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:te,resourceTitleString:I,resource:ne,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};gk(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),fk.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||vk).call(o,void 0,e[0])}for(r.position={start:hk(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:hk(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:hk(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+ck({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||vk).call(this,e,r[0])),n.position.end=hk(e.end)}function d(){return px(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=RC(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=xe(),n.position={start:hk(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=hk(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=hk(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=AT(t),n.identifier=RC(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=RC(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=OT(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Lx(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=hk(e.end)}function ce(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[],position:void 0}}function de(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function L(){return{type:`inlineCode`,value:``,position:void 0}}function R(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function fe(){return{type:`emphasis`,children:[],position:void 0}}function pe(){return{type:`heading`,depth:0,children:[],position:void 0}}function me(){return{type:`break`,position:void 0}}function he(){return{type:`html`,value:``,position:void 0}}function z(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ge(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ye(){return{type:`paragraph`,children:[],position:void 0}}function be(){return{type:`strong`,children:[],position:void 0}}function xe(){return{type:`text`,value:``,position:void 0}}function Se(){return{type:`thematicBreak`,position:void 0}}}function hk(e){return{line:e.line,column:e.column,offset:e.offset}}function gk(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?gk(e,r):_k(e,r)}}function _k(e,t){let n;for(n in t)if(fk.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function vk(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ck({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ck({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ck({start:t.start,end:t.end})+`) is still open`)}function yk(e){let t=this;t.parser=n;function n(n){return pk(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function bk(e){if(e)throw e}var xk=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Sk(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ck(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?wk(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function wk(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Tk=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ck(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Tk.prototype.file=``,Tk.prototype.name=``,Tk.prototype.reason=``,Tk.prototype.message=``,Tk.prototype.stack=``,Tk.prototype.column=void 0,Tk.prototype.line=void 0,Tk.prototype.ancestors=void 0,Tk.prototype.cause=void 0,Tk.prototype.fatal=void 0,Tk.prototype.place=void 0,Tk.prototype.ruleId=void 0,Tk.prototype.source=void 0;var Ek={basename:Dk,dirname:Ok,extname:kk,join:Ak,sep:`/`};function Dk(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Nk(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Ok(e){if(Nk(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function kk(e){Nk(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Ak(...e){let t=-1,n;for(;++t<e.length;)Nk(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:jk(n)}function jk(e){Nk(e);let t=e.codePointAt(0)===47,n=Mk(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Mk(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Nk(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Pk={cwd:Fk};function Fk(){return`/`}function Ik(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Lk(e){if(typeof e==`string`)e=new URL(e);else if(!Ik(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Rk(e)}function Rk(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var zk=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Bk=class{constructor(e){let t;t=e?Ik(e)?{path:e}:typeof e==`string`||Wk(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Pk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<zk.length;){let e=zk[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)zk.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Ek.basename(this.path):void 0}set basename(e){Hk(e,`basename`),Vk(e,`basename`),this.path=Ek.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Ek.dirname(this.path):void 0}set dirname(e){Uk(this.basename,`dirname`),this.path=Ek.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Ek.extname(this.path):void 0}set extname(e){if(Vk(e,`extname`),Uk(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Ek.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Ik(e)&&(e=Lk(e)),Hk(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Ek.basename(this.path,this.extname):void 0}set stem(e){Hk(e,`stem`),Vk(e,`stem`),this.path=Ek.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Tk(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Vk(e,t){if(e&&e.includes(Ek.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Ek.sep+"`")}function Hk(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Uk(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Wk(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Gk=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Kk=l(xk(),1),qk={}.hasOwnProperty,Jk=new class e extends Gk{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ck()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Kk.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Zk(`data`,this.frozen),this.namespace[e]=t,this):qk.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Zk(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=eA(e),n=this.parser||this.Parser;return Yk(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Yk(`process`,this.parser||this.Parser),Xk(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=eA(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);nA(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Yk(`processSync`,this.parser||this.Parser),Xk(`processSync`,this.compiler||this.Compiler),this.process(e,r),$k(`processSync`,`process`,t),n;function r(e,r){t=!0,bk(e),n=r}}run(e,t,n){Qk(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=eA(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),$k(`runSync`,`run`,n),r;function i(e,t){bk(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=eA(t),r=this.compiler||this.Compiler;return Xk(`stringify`,r),Qk(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Zk(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Kk.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Sk(o)&&Sk(r)&&(r=(0,Kk.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Yk(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Xk(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Zk(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qk(e){if(!Sk(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function $k(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function eA(e){return tA(e)?e:new Bk(e)}function tA(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function nA(e){return typeof e==`string`||rA(e)}function rA(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var iA=[`note`,`warning`,`tip`,`say`,`do`,`timing`];function aA(e){return iA.includes(e)}function oA(){return e=>{qw(e,(e,t,n)=>{if(e.type!==`containerDirective`&&e.type!==`leafDirective`&&e.type!==`textDirective`)return;let r=e;if(r.type===`containerDirective`)r.data={...r.data,hName:`div`,hProperties:aA(r.name)?{dataAdmonition:r.name}:{dataAdmonitionUnknown:r.name}};else if(n&&typeof t==`number`){let e={type:`text`,value:`:${r.name}`},i=r.type===`leafDirective`?{type:`paragraph`,children:[e]}:e;return n.children.splice(t,1,i),[hC,t]}})}}function sA(){return e=>{qw(e,`html`,(e,t,n)=>{if(n&&typeof t==`number`){let r={type:`text`,value:e.value},i=n.type===`root`?{type:`paragraph`,children:[r]}:r;return n.children.splice(t,1,i),[hC,t]}})}}var cA=/[.[\]"\s]/u;function lA(e){return e!==``&&!cA.test(e)}function uA(e){let t=[],n=0;for(;n<e.length;){if(e[n]===`[`){let r=dA(e,n+1);if(r===void 0||e[r+1]!==`]`)return;let i;try{i=JSON.parse(e.slice(n+1,r+1))}catch{return}if(typeof i!=`string`)return;t.push(i),n=r+2;continue}if(t.length>0){if(e[n]!==`.`)return;n+=1}let r=n;for(;r<e.length&&e[r]!==`.`&&e[r]!==`[`;)r+=1;let i=e.slice(n,r);if(!lA(i))return;t.push(i),n=r}let[r,...i]=t;return r===void 0?void 0:{identifier:r,keys:i}}function dA(e,t){if(e[t]===`"`){for(let n=t+1;n<e.length;n+=1)if(e[n]===`\\`)n+=1;else if(e[n]===`"`)return n}}function fA(e,t){let n=uA(t);if(!n||n.keys.length===0)return{found:!1};let{identifier:r,keys:i}=n;if(!Object.prototype.hasOwnProperty.call(e,r))return{found:!1};let a=e[r];for(let e of i){if(typeof a!=`object`||!a||Array.isArray(a)||!Object.prototype.hasOwnProperty.call(a,e))return{found:!1};a=a[e]}return{found:!0,value:a}}function pA(e,t){if(typeof e==`number`)try{return new Intl.NumberFormat(t).format(e)}catch{return new Intl.NumberFormat(`en`).format(e)}return typeof e==`string`?e:null}function mA(e,t){let n=t.setting;if(!n)return{error:`:::when names no setting`};let r=fA(e,n);if(!r.found)return{error:`:::when names "${n}", which this guide is not given`};let{value:i}=r,a=t.not!==void 0&&t.not!==null,o;if(t.is===void 0||t.is===null){if(typeof i!=`boolean`)return{error:`:::when on "${n}" needs is="…", since it is not true or false`};o=i}else if(typeof i==`number`)o=t.is.trim()!==``&&Number(t.is)===i;else if(typeof i==`string`||typeof i==`boolean`)o=String(i)===t.is;else return{error:`:::when on "${n}" compares a value that is not a single value`};return{show:a?!o:o}}function hA(e){return{type:`emphasis`,data:{hName:`span`,hProperties:{dataGuideError:e}},children:[{type:`text`,value:e}]}}function gA(e){return{type:`paragraph`,data:{hName:`div`,hProperties:{dataGuideError:e}},children:[{type:`text`,value:e}]}}function _A(e){return t=>{qw(t,(t,n,r)=>{if(!r||typeof n!=`number`)return;let i=t;if(i.type===`containerDirective`&&i.name===`when`){let t=mA(e.settings,i.attributes??{}),a=`error`in t?[gA(t.error)]:t.show?i.children:[];return r.children.splice(n,1,...a),[hC,n]}if(i.type===`textDirective`&&i.name===`setting`){let t=vA(i),a=fA(e.settings,t),o=a.found?pA(a.value,e.locale):null,s=o===null?hA(a.found?`:setting[${t}] is not a number or text`:`:setting[${t}] is not given to this guide`):{type:`text`,value:o};return r.children.splice(n,1,s),[hC,n+1]}})}}function vA(e){return e.children.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``).trim()}var yA=/\s*\{-\}\s*$/;function bA(e){return e.replace(/\.md$/,``)}function xA(e,t){let n=new ux,r=bA(t),i=[];return qw(e,`heading`,e=>{let t=px(e),a=yA.test(t),o=t.replace(yA,``);i.push({node:e,id:`${r}--${n.slug(o)}`,text:o,omitted:a})}),i}function SA(e){let t=e.children[e.children.length-1];t?.type===`text`&&yA.test(t.value)&&(t.value=t.value.replace(yA,``))}function CA(e){return t=>{for(let n of xA(t,e.chapterFile))SA(n.node),n.node.data={...n.node.data,hProperties:{...n.node.data?.hProperties,id:n.id}}}}function wA(e,t,n){let r=n?.minDepth??2,i=n?.maxDepth??3,a=Jk().use(yk).use(AO).use(iC).parse(t);return _A({settings:n?.settings??{},locale:n?.locale??`en`})(a),oA()(a),xA(a,e).filter(e=>!e.omitted).filter(e=>e.node.depth===1||e.node.depth>=r&&e.node.depth<=i).map(e=>({id:e.id,text:e.text,depth:e.node.depth}))}var TA={youtube:{idPattern:/^[A-Za-z0-9_-]{11}$/,embedUrl:e=>`https://www.youtube-nocookie.com/embed/${e}`,embedHosts:[`www.youtube-nocookie.com`]}},EA=`file`,DA={src:[`mp4`,`webm`],poster:[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],captions:[`vtt`]},OA={youtube:new Set([`provider`,`id`]),[EA]:new Set([`provider`,`src`,`title`,`poster`,`captions`])},kA=[...Object.keys(TA),EA],AA=`https://guide.invalid/content/locale/chapter.md`;function jA(e){if(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`/`)||e.includes(`\\`)||/[?#]/.test(e))return;let t;try{t=new URL(e,AA)}catch{return}if(t.origin===`https://guide.invalid`&&t.pathname.startsWith(`/assets/`))try{let e=decodeURIComponent(t.pathname.slice(8));return e.split(`/`).some(e=>e===``||e===`.`||e===`..`||e.includes(`\\`))?void 0:e}catch{return}}function MA(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function NA(e){let t={};for(let n of e.split(`
195
- `)){let e=n.trim();if(e.length===0)continue;let r=e.match(/^([A-Za-z][A-Za-z0-9_-]*):\s*(.*)$/);if(!r)return{ok:!1,error:`Malformed line in video block: "${e}"`};let i=r[1],a=r[2].trim();if(i in t)return{ok:!1,error:`Duplicate key "${i}" in video block`};t[i]=a}let n=t.provider;if(!n)return{ok:!1,error:`Video block is missing "provider"`};let r=OA[n];if(!r)return{ok:!1,error:`Unknown video provider "${n}". Supported providers: ${kA.join(`, `)}`};for(let e of Object.keys(t))if(!r.has(e))return{ok:!1,error:`Unknown key "${e}" in video block`};if(n===`file`)return PA(t);let i=TA[n],a=t.id;return a?i.idPattern.test(a)?{ok:!0,kind:`embed`,provider:n,id:a,embedUrl:i.embedUrl(a)}:{ok:!1,error:`Video id "${a}" is not a valid ${n} id`}:{ok:!1,error:`Video block is missing "id"`}}function PA(e){if(!e.src)return{ok:!1,error:`Video block is missing "src"`};let t={};for(let n of Object.keys(DA)){let r=e[n];if(r===void 0)continue;let i=jA(r);if(!i)return{ok:!1,error:`Video ${n} "${r}" must be a file in the guide's assets/ directory`};let a=DA[n];if(!a.includes(MA(i)))return{ok:!1,error:`Video ${n} "${r}" must be a ${a.map(e=>`.${e}`).join(`, `)} file`};t[n]=i}return{ok:!0,kind:`file`,provider:EA,src:t.src,...t.poster?{poster:t.poster}:{},...t.captions?{captions:t.captions}:{},...e.title?{title:e.title}:{}}}var FA=Dl((0,V.jsx)(`path`,{d:`M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8`}),`InfoOutlined`),IA=Dl((0,V.jsx)(`path`,{d:`M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7m2.85 11.1-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1`}),`LightbulbOutlined`),LA=Dl([(0,V.jsx)(`circle`,{cx:`9`,cy:`9`,r:`4`},`0`),(0,V.jsx)(`path`,{d:`M9 15c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4m7.76-9.64-1.68 1.69c.84 1.18.84 2.71 0 3.89l1.68 1.69c2.02-2.02 2.02-5.07 0-7.27M20.07 2l-1.63 1.63c2.77 3.02 2.77 7.56 0 10.74L20.07 16c3.9-3.89 3.91-9.95 0-14`},`1`)],`RecordVoiceOver`),RA=Dl((0,V.jsx)(`path`,{d:`M22 5.18 10.59 16.6l-4.24-4.24 1.41-1.41 2.83 2.83 10-10zm-2.21 5.04c.13.57.21 1.17.21 1.78 0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8c1.58 0 3.04.46 4.28 1.25l1.44-1.44C16.1 2.67 14.13 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-1.19-.22-2.33-.6-3.39z`}),`TaskAlt`),zA=Dl((0,V.jsx)(`path`,{d:`M15 1H9v2h6zm-4 13h2V8h-2zm8.03-6.61 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61M12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7`}),`TimerOutlined`),BA=Dl([(0,V.jsx)(`path`,{d:`M12 5.99 19.53 19H4.47zM12 2 1 21h22z`},`0`),(0,V.jsx)(`path`,{d:`M13 16h-2v2h2zm0-6h-2v5h2z`},`1`)],`WarningAmber`);function VA(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var HA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WA={};function GA(e,t){return((t||WA).jsx?UA:HA).test(e)}var KA=/[ \t\n\f\r]/g;function qA(e){return typeof e==`object`?e.type===`text`&&JA(e.value):JA(e)}function JA(e){return e.replace(KA,``)===``}var YA=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};YA.prototype.normal={},YA.prototype.property={},YA.prototype.space=void 0;function XA(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new YA(n,r,t)}function ZA(e){return e.toLowerCase()}var QA=class{constructor(e,t){this.attribute=t,this.property=e}};QA.prototype.attribute=``,QA.prototype.booleanish=!1,QA.prototype.boolean=!1,QA.prototype.commaOrSpaceSeparated=!1,QA.prototype.commaSeparated=!1,QA.prototype.defined=!1,QA.prototype.mustUseProperty=!1,QA.prototype.number=!1,QA.prototype.overloadedBoolean=!1,QA.prototype.property=``,QA.prototype.spaceSeparated=!1,QA.prototype.space=void 0;var $A=s({boolean:()=>tj,booleanish:()=>nj,commaOrSpaceSeparated:()=>oj,commaSeparated:()=>aj,number:()=>$,overloadedBoolean:()=>rj,spaceSeparated:()=>ij}),ej=0,tj=sj(),nj=sj(),rj=sj(),$=sj(),ij=sj(),aj=sj(),oj=sj();function sj(){return 2**++ej}var cj=Object.keys($A),lj=class extends QA{constructor(e,t,n,r){let i=-1;if(super(e,t),uj(this,`space`,r),typeof n==`number`)for(;++i<cj.length;){let e=cj[i];uj(this,cj[i],(n&$A[e])===$A[e])}}};lj.prototype.defined=!0;function uj(e,t,n){n&&(e[t]=n)}function dj(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new lj(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ZA(r)]=r,n[ZA(a.attribute)]=r}return new YA(t,n,e.space)}var fj=dj({properties:{ariaActiveDescendant:null,ariaAtomic:nj,ariaAutoComplete:null,ariaBusy:nj,ariaChecked:nj,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:ij,ariaCurrent:null,ariaDescribedBy:ij,ariaDetails:null,ariaDisabled:nj,ariaDropEffect:ij,ariaErrorMessage:null,ariaExpanded:nj,ariaFlowTo:ij,ariaGrabbed:nj,ariaHasPopup:null,ariaHidden:nj,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ij,ariaLevel:$,ariaLive:null,ariaModal:nj,ariaMultiLine:nj,ariaMultiSelectable:nj,ariaOrientation:null,ariaOwns:ij,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:nj,ariaReadOnly:nj,ariaRelevant:null,ariaRequired:nj,ariaRoleDescription:ij,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:nj,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function pj(e,t){return t in e?e[t]:t}function mj(e,t){return pj(e,t.toLowerCase())}var hj=dj({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:aj,acceptCharset:ij,accessKey:ij,action:null,allow:null,allowFullScreen:tj,allowPaymentRequest:tj,allowUserMedia:tj,alpha:tj,alt:null,as:null,async:tj,autoCapitalize:null,autoComplete:ij,autoFocus:tj,autoPlay:tj,blocking:ij,capture:null,charSet:null,checked:tj,cite:null,className:ij,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:nj,controls:tj,controlsList:ij,coords:$|aj,crossOrigin:null,data:null,dateTime:null,decoding:null,default:tj,defer:tj,dir:null,dirName:null,disabled:tj,download:rj,draggable:nj,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:tj,formTarget:null,headers:ij,height:$,hidden:rj,high:$,href:null,hrefLang:null,htmlFor:ij,httpEquiv:ij,id:null,imageSizes:null,imageSrcSet:null,inert:tj,inputMode:null,integrity:null,is:null,isMap:tj,itemId:null,itemProp:ij,itemRef:ij,itemScope:tj,itemType:ij,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:tj,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:tj,muted:tj,name:null,nonce:null,noModule:tj,noValidate:tj,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:tj,optimum:$,pattern:null,ping:ij,placeholder:null,playsInline:tj,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:tj,referrerPolicy:null,rel:ij,required:tj,reversed:tj,rows:$,rowSpan:$,sandbox:ij,scope:null,scoped:tj,seamless:tj,selected:tj,shadowRootClonable:tj,shadowRootCustomElementRegistry:tj,shadowRootDelegatesFocus:tj,shadowRootMode:null,shadowRootSerializable:tj,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:nj,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:tj,useMap:null,value:nj,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ij,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:tj,declare:tj,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:tj,noHref:tj,noShade:tj,noWrap:tj,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:nj,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:tj,disablePictureInPicture:tj,disableRemotePlayback:tj,exportParts:aj,part:ij,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:mj}),gj=dj({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:oj,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:ij,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:tj,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:aj,g2:aj,glyphName:aj,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:oj,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ij,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oj,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oj,rev:oj,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oj,requiredFeatures:oj,requiredFonts:oj,requiredFormats:oj,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:oj,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oj,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oj,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:pj}),_j=dj({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),vj=dj({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:mj}),yj=dj({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),bj={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},xj=/[A-Z]/g,Sj=/-[a-z]/g,Cj=/^data[-\w.:]+$/i;function wj(e,t){let n=ZA(t),r=t,i=QA;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Cj.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Sj,Ej);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Sj.test(e)){let n=e.replace(xj,Tj);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=lj}return new i(r,t)}function Tj(e){return`-`+e.toLowerCase()}function Ej(e){return e.charAt(1).toUpperCase()}var Dj=XA([fj,hj,_j,vj,yj],`html`),Oj=XA([fj,gj,_j,vj,yj],`svg`);function kj(e){return e.join(` `).trim()}var Aj=/\/\*(?:[^*]|\*(?!\/))*\*\//g,jj=/\n/g,Mj=/^\s*/,Nj=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Pj=/^:\s*/,Fj=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Ij=/^[;\s]*/,Lj=`
196
- `,Rj=`/`,zj=`*`,Bj=``,Vj=`comment`,Hj=`declaration`;function Uj(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(jj);t&&(n+=t.length);var i=e.lastIndexOf(Lj);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Mj)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(Rj==e.charAt(0)&&zj==e.charAt(1)){for(var n=2;Bj!=e.charAt(n)&&(zj!=e.charAt(n)||Rj!=e.charAt(n+1));)++n;if(n+=2,Bj===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Vj,comment:o})}}function f(){var e=a(),t=c(Nj);if(t){if(d(),!c(Pj))return s(`property missing ':'`);var n=c(Fj),r=e({type:Hj,property:t[0].replace(Aj,Bj).trim(),value:n?n[0].replace(Aj,Bj).trim():Bj});return c(Ij),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function Wj(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Uj(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var Gj=qj(`end`),Kj=qj(`start`);function qj(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Jj(e){let t=Kj(e),n=Gj(e);if(t&&n)return{start:t,end:n}}var Yj={}.hasOwnProperty,Xj=new Map,Zj=/[A-Z]/g,Qj=/-([a-z])/g,$j=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),eM=new Set([`td`,`th`]),tM=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function nM(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=pM(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=fM(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Oj:Dj,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=rM(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function rM(e,t,n){if(t.type===`element`)return iM(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return aM(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return sM(e,t,n);if(t.type===`mdxjsEsm`)return oM(e,t);if(t.type===`root`)return cM(e,t,n);if(t.type===`text`)return lM(e,t)}function iM(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Oj,e.schema=i),e.ancestors.push(t);let a=yM(e,t.tagName,!1),o=mM(e,t),s=gM(e,t);return $j.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!qA(e)})),uM(e,o,a,t),dM(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function aM(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}bM(e,t.position)}function oM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bM(e,t.position)}function sM(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Oj,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:yM(e,t.name,!0),o=hM(e,t),s=gM(e,t);return uM(e,o,a,t),dM(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function cM(e,t,n){let r={};return dM(r,gM(e,t)),e.create(t,e.Fragment,r,n)}function lM(e,t){return t.value}function uM(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function dM(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function fM(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function pM(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Kj(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function mM(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Yj.call(t.properties,i)){let a=_M(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&eM.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function hM(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else bM(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else bM(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function gM(e,t){let n=[],r=-1,i=e.passKeys?new Map:Xj;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=rM(e,a,o);s!==void 0&&n.push(s)}return n}function _M(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=wj(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?VA(n):kj(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:xM(n):vM(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?bj[r.property]||r.property:r.attribute,n]}function vM(e,t){let n={};try{Wj(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(Qj,wM))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Tk("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=tM+`#cannot-parse-style-attribute`,r}return n}function yM(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=GA(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=GA(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Yj.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);bM(e)}function bM(e,t){let n=new Tk("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=tM+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function xM(e){let t={},n;for(n in e)Yj.call(e,n)&&(t[SM(n)]=e[n]);return t}function SM(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(Zj,CM);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function CM(e){return`-`+e.toLowerCase()}function wM(e,t){return t.toUpperCase()}var TM={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]};function EM(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function DM(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
197
- `}]}function OM(e,t){let n=t.value?t.value+`
198
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function kM(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AM(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jM(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=wE(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function MM(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NM(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function PM(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function FM(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PM(e,t);let i={src:wE(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function IM(e,t){let n={src:wE(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function LM(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function RM(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PM(e,t);let i={href:wE(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function zM(e,t){let n={href:wE(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function BM(e,t,n){let r=e.all(t),i=n?VM(n):HM(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
194
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function ak(e){let t={constructs:QT([KO,...(e||{}).extensions||[]]),content:n(MO),defined:[],document:n(PO),flow:n(RO),lazy:{},string:n(VO),text:n(HO)};return t;function n(e){return n;function n(n){return nk(t,e,n)}}}function ok(e){for(;!rD(e););return e}var sk=/[\0\t\n\r]/g;function ck(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){sk.lastIndex=c;let n=sk.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function lk(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?dk(e.position):`start`in e||`end`in e?dk(e):`line`in e||`column`in e?uk(e):``}function uk(e){return fk(e&&e.line)+`:`+fk(e&&e.column)}function dk(e){return uk(e&&e.start)+`-`+uk(e&&e.end)}function fk(e){return e&&typeof e==`number`?e:1}var pk={}.hasOwnProperty;function mk(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),hk(n)(ok(ak(n).document().write(ck()(e,t,!0))))}function hk(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ge),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(pe),blockQuote:o(ue),characterEscape:E,characterReference:E,codeFenced:o(de),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(de,s),codeText:o(L,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(R),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(fe),hardBreakEscape:o(me),hardBreakTrailing:o(me),htmlFlow:o(he,s),htmlFlowData:E,htmlText:o(he,s),htmlTextData:E,image:o(z),label:s,link:o(ge),listItem:o(ve),listItemValue:p,listOrdered:o(_e,f),listUnordered:o(_e),paragraph:o(ye),reference:re,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(pe),strong:o(be),thematicBreak:o(Se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:ee,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:te,resourceTitleString:I,resource:ne,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};_k(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),pk.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||yk).call(o,void 0,e[0])}for(r.position={start:gk(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:gk(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:gk(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+lk({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||yk).call(this,e,r[0])),n.position.end=gk(e.end)}function d(){return mx(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zC(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=xe(),n.position={start:gk(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=gk(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=gk(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=jT(t),n.identifier=zC(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zC(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=kT(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Rx(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=gk(e.end)}function ce(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[],position:void 0}}function de(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function L(){return{type:`inlineCode`,value:``,position:void 0}}function R(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function fe(){return{type:`emphasis`,children:[],position:void 0}}function pe(){return{type:`heading`,depth:0,children:[],position:void 0}}function me(){return{type:`break`,position:void 0}}function he(){return{type:`html`,value:``,position:void 0}}function z(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ge(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ye(){return{type:`paragraph`,children:[],position:void 0}}function be(){return{type:`strong`,children:[],position:void 0}}function xe(){return{type:`text`,value:``,position:void 0}}function Se(){return{type:`thematicBreak`,position:void 0}}}function gk(e){return{line:e.line,column:e.column,offset:e.offset}}function _k(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?_k(e,r):vk(e,r)}}function vk(e,t){let n;for(n in t)if(pk.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function yk(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+lk({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+lk({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+lk({start:t.start,end:t.end})+`) is still open`)}function bk(e){let t=this;t.parser=n;function n(n){return mk(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function xk(e){if(e)throw e}var Sk=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Ck(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function wk(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Tk(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Tk(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Ek=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=lk(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ek.prototype.file=``,Ek.prototype.name=``,Ek.prototype.reason=``,Ek.prototype.message=``,Ek.prototype.stack=``,Ek.prototype.column=void 0,Ek.prototype.line=void 0,Ek.prototype.ancestors=void 0,Ek.prototype.cause=void 0,Ek.prototype.fatal=void 0,Ek.prototype.place=void 0,Ek.prototype.ruleId=void 0,Ek.prototype.source=void 0;var Dk={basename:Ok,dirname:kk,extname:Ak,join:jk,sep:`/`};function Ok(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Pk(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function kk(e){if(Pk(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Ak(e){Pk(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function jk(...e){let t=-1,n;for(;++t<e.length;)Pk(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Mk(n)}function Mk(e){Pk(e);let t=e.codePointAt(0)===47,n=Nk(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Nk(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Pk(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Fk={cwd:Ik};function Ik(){return`/`}function Lk(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Rk(e){if(typeof e==`string`)e=new URL(e);else if(!Lk(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zk(e)}function zk(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Bk=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Vk=class{constructor(e){let t;t=e?Lk(e)?{path:e}:typeof e==`string`||Gk(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Fk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Bk.length;){let e=Bk[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Bk.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Dk.basename(this.path):void 0}set basename(e){Uk(e,`basename`),Hk(e,`basename`),this.path=Dk.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Dk.dirname(this.path):void 0}set dirname(e){Wk(this.basename,`dirname`),this.path=Dk.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Dk.extname(this.path):void 0}set extname(e){if(Hk(e,`extname`),Wk(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Dk.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Lk(e)&&(e=Rk(e)),Uk(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Dk.basename(this.path,this.extname):void 0}set stem(e){Uk(e,`stem`),Hk(e,`stem`),this.path=Dk.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Ek(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Hk(e,t){if(e&&e.includes(Dk.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Dk.sep+"`")}function Uk(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Wk(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Gk(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Kk=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),qk=l(Sk(),1),Jk={}.hasOwnProperty,Yk=new class e extends Kk{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=wk()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,qk.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Qk(`data`,this.frozen),this.namespace[e]=t,this):Jk.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Qk(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tA(e),n=this.parser||this.Parser;return Xk(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Xk(`process`,this.parser||this.Parser),Zk(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=tA(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);rA(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Xk(`processSync`,this.parser||this.Parser),Zk(`processSync`,this.compiler||this.Compiler),this.process(e,r),eA(`processSync`,`process`,t),n;function r(e,r){t=!0,xk(e),n=r}}run(e,t,n){$k(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=tA(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),eA(`runSync`,`run`,n),r;function i(e,t){xk(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=tA(t),r=this.compiler||this.Compiler;return Zk(`stringify`,r),$k(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Qk(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,qk.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ck(o)&&Ck(r)&&(r=(0,qk.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Xk(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Zk(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Qk(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $k(e){if(!Ck(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function eA(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tA(e){return nA(e)?e:new Vk(e)}function nA(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function rA(e){return typeof e==`string`||iA(e)}function iA(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var aA=[`note`,`warning`,`tip`,`say`,`do`,`timing`];function oA(e){return aA.includes(e)}function sA(){return e=>{Jw(e,(e,t,n)=>{if(e.type!==`containerDirective`&&e.type!==`leafDirective`&&e.type!==`textDirective`)return;let r=e;if(r.type===`containerDirective`)r.data={...r.data,hName:`div`,hProperties:oA(r.name)?{dataAdmonition:r.name}:{dataAdmonitionUnknown:r.name}};else if(n&&typeof t==`number`){let e={type:`text`,value:`:${r.name}`},i=r.type===`leafDirective`?{type:`paragraph`,children:[e]}:e;return n.children.splice(t,1,i),[gC,t]}})}}function cA(){return e=>{Jw(e,`html`,(e,t,n)=>{if(n&&typeof t==`number`){let r={type:`text`,value:e.value},i=n.type===`root`?{type:`paragraph`,children:[r]}:r;return n.children.splice(t,1,i),[gC,t]}})}}var lA=/[.[\]"\s]/u;function uA(e){return e!==``&&!lA.test(e)}function dA(e){let t=[],n=0;for(;n<e.length;){if(e[n]===`[`){let r=fA(e,n+1);if(r===void 0||e[r+1]!==`]`)return;let i;try{i=JSON.parse(e.slice(n+1,r+1))}catch{return}if(typeof i!=`string`)return;t.push(i),n=r+2;continue}if(t.length>0){if(e[n]!==`.`)return;n+=1}let r=n;for(;r<e.length&&e[r]!==`.`&&e[r]!==`[`;)r+=1;let i=e.slice(n,r);if(!uA(i))return;t.push(i),n=r}let[r,...i]=t;return r===void 0?void 0:{identifier:r,keys:i}}function fA(e,t){if(e[t]===`"`){for(let n=t+1;n<e.length;n+=1)if(e[n]===`\\`)n+=1;else if(e[n]===`"`)return n}}function pA(e,t){let n=dA(t);if(!n||n.keys.length===0)return{found:!1};let{identifier:r,keys:i}=n;if(!Object.prototype.hasOwnProperty.call(e,r))return{found:!1};let a=e[r];for(let e of i){if(typeof a!=`object`||!a||Array.isArray(a)||!Object.prototype.hasOwnProperty.call(a,e))return{found:!1};a=a[e]}return{found:!0,value:a}}function mA(e,t){if(typeof e==`number`)try{return new Intl.NumberFormat(t).format(e)}catch{return new Intl.NumberFormat(`en`).format(e)}return typeof e==`string`?e:null}function hA(e,t){let n=t.setting;if(!n)return{error:`:::when names no setting`};let r=pA(e,n);if(!r.found)return{error:`:::when names "${n}", which this guide is not given`};let{value:i}=r,a=t.not!==void 0&&t.not!==null,o;if(t.is===void 0||t.is===null){if(typeof i!=`boolean`)return{error:`:::when on "${n}" needs is="…", since it is not true or false`};o=i}else if(typeof i==`number`)o=t.is.trim()!==``&&Number(t.is)===i;else if(typeof i==`string`||typeof i==`boolean`)o=String(i)===t.is;else return{error:`:::when on "${n}" compares a value that is not a single value`};return{show:a?!o:o}}function gA(e){return{type:`emphasis`,data:{hName:`span`,hProperties:{dataGuideError:e}},children:[{type:`text`,value:e}]}}function _A(e){return{type:`paragraph`,data:{hName:`div`,hProperties:{dataGuideError:e}},children:[{type:`text`,value:e}]}}function vA(e){return t=>{Jw(t,(t,n,r)=>{if(!r||typeof n!=`number`)return;let i=t;if(i.type===`containerDirective`&&i.name===`when`){let t=hA(e.settings,i.attributes??{}),a=`error`in t?[_A(t.error)]:t.show?i.children:[];return r.children.splice(n,1,...a),[gC,n]}if(i.type===`textDirective`&&i.name===`setting`){let t=yA(i),a=pA(e.settings,t),o=a.found?mA(a.value,e.locale):null,s=o===null?gA(a.found?`:setting[${t}] is not a number or text`:`:setting[${t}] is not given to this guide`):{type:`text`,value:o};return r.children.splice(n,1,s),[gC,n+1]}})}}function yA(e){return e.children.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``).trim()}var bA=/\s*\{-\}\s*$/;function xA(e){return e.replace(/\.md$/,``)}function SA(e,t){let n=new dx,r=xA(t),i=[];return Jw(e,`heading`,e=>{let t=mx(e),a=bA.test(t),o=t.replace(bA,``);i.push({node:e,id:`${r}--${n.slug(o)}`,text:o,omitted:a})}),i}function CA(e){let t=e.children[e.children.length-1];t?.type===`text`&&bA.test(t.value)&&(t.value=t.value.replace(bA,``))}function wA(e){return t=>{for(let n of SA(t,e.chapterFile))CA(n.node),n.node.data={...n.node.data,hProperties:{...n.node.data?.hProperties,id:n.id}}}}function TA(e,t,n){let r=n?.minDepth??2,i=n?.maxDepth??3,a=Yk().use(bk).use(jO).use(aC).parse(t);return vA({settings:n?.settings??{},locale:n?.locale??`en`})(a),sA()(a),SA(a,e).filter(e=>!e.omitted).filter(e=>e.node.depth===1||e.node.depth>=r&&e.node.depth<=i).map(e=>({id:e.id,text:e.text,depth:e.node.depth}))}var EA={youtube:{idPattern:/^[A-Za-z0-9_-]{11}$/,embedUrl:e=>`https://www.youtube-nocookie.com/embed/${e}`,embedHosts:[`www.youtube-nocookie.com`]}},DA=`file`,OA={src:[`mp4`,`webm`],poster:[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],captions:[`vtt`]},kA={youtube:new Set([`provider`,`id`]),[DA]:new Set([`provider`,`src`,`title`,`poster`,`captions`])},AA=[...Object.keys(EA),DA],jA=`https://guide.invalid/content/locale/chapter.md`;function MA(e){if(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`/`)||e.includes(`\\`)||/[?#]/.test(e))return;let t;try{t=new URL(e,jA)}catch{return}if(t.origin===`https://guide.invalid`&&t.pathname.startsWith(`/assets/`))try{let e=decodeURIComponent(t.pathname.slice(8));return e.split(`/`).some(e=>e===``||e===`.`||e===`..`||e.includes(`\\`))?void 0:e}catch{return}}function NA(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function PA(e){let t={};for(let n of e.split(`
195
+ `)){let e=n.trim();if(e.length===0)continue;let r=e.match(/^([A-Za-z][A-Za-z0-9_-]*):\s*(.*)$/);if(!r)return{ok:!1,error:`Malformed line in video block: "${e}"`};let i=r[1],a=r[2].trim();if(i in t)return{ok:!1,error:`Duplicate key "${i}" in video block`};t[i]=a}let n=t.provider;if(!n)return{ok:!1,error:`Video block is missing "provider"`};let r=kA[n];if(!r)return{ok:!1,error:`Unknown video provider "${n}". Supported providers: ${AA.join(`, `)}`};for(let e of Object.keys(t))if(!r.has(e))return{ok:!1,error:`Unknown key "${e}" in video block`};if(n===`file`)return FA(t);let i=EA[n],a=t.id;return a?i.idPattern.test(a)?{ok:!0,kind:`embed`,provider:n,id:a,embedUrl:i.embedUrl(a)}:{ok:!1,error:`Video id "${a}" is not a valid ${n} id`}:{ok:!1,error:`Video block is missing "id"`}}function FA(e){if(!e.src)return{ok:!1,error:`Video block is missing "src"`};let t={};for(let n of Object.keys(OA)){let r=e[n];if(r===void 0)continue;let i=MA(r);if(!i)return{ok:!1,error:`Video ${n} "${r}" must be a file in the guide's assets/ directory`};let a=OA[n];if(!a.includes(NA(i)))return{ok:!1,error:`Video ${n} "${r}" must be a ${a.map(e=>`.${e}`).join(`, `)} file`};t[n]=i}return{ok:!0,kind:`file`,provider:DA,src:t.src,...t.poster?{poster:t.poster}:{},...t.captions?{captions:t.captions}:{},...e.title?{title:e.title}:{}}}var IA=Dl((0,V.jsx)(`path`,{d:`M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8`}),`InfoOutlined`),LA=Dl((0,V.jsx)(`path`,{d:`M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7m2.85 11.1-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1`}),`LightbulbOutlined`),RA=Dl([(0,V.jsx)(`circle`,{cx:`9`,cy:`9`,r:`4`},`0`),(0,V.jsx)(`path`,{d:`M9 15c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4m7.76-9.64-1.68 1.69c.84 1.18.84 2.71 0 3.89l1.68 1.69c2.02-2.02 2.02-5.07 0-7.27M20.07 2l-1.63 1.63c2.77 3.02 2.77 7.56 0 10.74L20.07 16c3.9-3.89 3.91-9.95 0-14`},`1`)],`RecordVoiceOver`),zA=Dl((0,V.jsx)(`path`,{d:`M22 5.18 10.59 16.6l-4.24-4.24 1.41-1.41 2.83 2.83 10-10zm-2.21 5.04c.13.57.21 1.17.21 1.78 0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8c1.58 0 3.04.46 4.28 1.25l1.44-1.44C16.1 2.67 14.13 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-1.19-.22-2.33-.6-3.39z`}),`TaskAlt`),BA=Dl((0,V.jsx)(`path`,{d:`M15 1H9v2h6zm-4 13h2V8h-2zm8.03-6.61 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61M12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7`}),`TimerOutlined`),VA=Dl([(0,V.jsx)(`path`,{d:`M12 5.99 19.53 19H4.47zM12 2 1 21h22z`},`0`),(0,V.jsx)(`path`,{d:`M13 16h-2v2h2zm0-6h-2v5h2z`},`1`)],`WarningAmber`);function HA(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var UA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GA={};function KA(e,t){return((t||GA).jsx?WA:UA).test(e)}var qA=/[ \t\n\f\r]/g;function JA(e){return typeof e==`object`?e.type===`text`&&YA(e.value):YA(e)}function YA(e){return e.replace(qA,``)===``}var XA=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};XA.prototype.normal={},XA.prototype.property={},XA.prototype.space=void 0;function ZA(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new XA(n,r,t)}function QA(e){return e.toLowerCase()}var $A=class{constructor(e,t){this.attribute=t,this.property=e}};$A.prototype.attribute=``,$A.prototype.booleanish=!1,$A.prototype.boolean=!1,$A.prototype.commaOrSpaceSeparated=!1,$A.prototype.commaSeparated=!1,$A.prototype.defined=!1,$A.prototype.mustUseProperty=!1,$A.prototype.number=!1,$A.prototype.overloadedBoolean=!1,$A.prototype.property=``,$A.prototype.spaceSeparated=!1,$A.prototype.space=void 0;var ej=s({boolean:()=>nj,booleanish:()=>rj,commaOrSpaceSeparated:()=>sj,commaSeparated:()=>oj,number:()=>$,overloadedBoolean:()=>ij,spaceSeparated:()=>aj}),tj=0,nj=cj(),rj=cj(),ij=cj(),$=cj(),aj=cj(),oj=cj(),sj=cj();function cj(){return 2**++tj}var lj=Object.keys(ej),uj=class extends $A{constructor(e,t,n,r){let i=-1;if(super(e,t),dj(this,`space`,r),typeof n==`number`)for(;++i<lj.length;){let e=lj[i];dj(this,lj[i],(n&ej[e])===ej[e])}}};uj.prototype.defined=!0;function dj(e,t,n){n&&(e[t]=n)}function fj(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new uj(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[QA(r)]=r,n[QA(a.attribute)]=r}return new XA(t,n,e.space)}var pj=fj({properties:{ariaActiveDescendant:null,ariaAtomic:rj,ariaAutoComplete:null,ariaBusy:rj,ariaChecked:rj,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:aj,ariaCurrent:null,ariaDescribedBy:aj,ariaDetails:null,ariaDisabled:rj,ariaDropEffect:aj,ariaErrorMessage:null,ariaExpanded:rj,ariaFlowTo:aj,ariaGrabbed:rj,ariaHasPopup:null,ariaHidden:rj,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:aj,ariaLevel:$,ariaLive:null,ariaModal:rj,ariaMultiLine:rj,ariaMultiSelectable:rj,ariaOrientation:null,ariaOwns:aj,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:rj,ariaReadOnly:rj,ariaRelevant:null,ariaRequired:rj,ariaRoleDescription:aj,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:rj,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function mj(e,t){return t in e?e[t]:t}function hj(e,t){return mj(e,t.toLowerCase())}var gj=fj({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:oj,acceptCharset:aj,accessKey:aj,action:null,allow:null,allowFullScreen:nj,allowPaymentRequest:nj,allowUserMedia:nj,alpha:nj,alt:null,as:null,async:nj,autoCapitalize:null,autoComplete:aj,autoFocus:nj,autoPlay:nj,blocking:aj,capture:null,charSet:null,checked:nj,cite:null,className:aj,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:rj,controls:nj,controlsList:aj,coords:$|oj,crossOrigin:null,data:null,dateTime:null,decoding:null,default:nj,defer:nj,dir:null,dirName:null,disabled:nj,download:ij,draggable:rj,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:nj,formTarget:null,headers:aj,height:$,hidden:ij,high:$,href:null,hrefLang:null,htmlFor:aj,httpEquiv:aj,id:null,imageSizes:null,imageSrcSet:null,inert:nj,inputMode:null,integrity:null,is:null,isMap:nj,itemId:null,itemProp:aj,itemRef:aj,itemScope:nj,itemType:aj,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:nj,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:nj,muted:nj,name:null,nonce:null,noModule:nj,noValidate:nj,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:nj,optimum:$,pattern:null,ping:aj,placeholder:null,playsInline:nj,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:nj,referrerPolicy:null,rel:aj,required:nj,reversed:nj,rows:$,rowSpan:$,sandbox:aj,scope:null,scoped:nj,seamless:nj,selected:nj,shadowRootClonable:nj,shadowRootCustomElementRegistry:nj,shadowRootDelegatesFocus:nj,shadowRootMode:null,shadowRootSerializable:nj,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:rj,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:nj,useMap:null,value:rj,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:aj,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:nj,declare:nj,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:nj,noHref:nj,noShade:nj,noWrap:nj,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:rj,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:nj,disablePictureInPicture:nj,disableRemotePlayback:nj,exportParts:oj,part:aj,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:hj}),_j=fj({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:sj,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:aj,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:nj,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:oj,g2:oj,glyphName:oj,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:sj,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:aj,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sj,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sj,rev:sj,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sj,requiredFeatures:sj,requiredFonts:sj,requiredFormats:sj,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:sj,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sj,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sj,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:mj}),vj=fj({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),yj=fj({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:hj}),bj=fj({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xj={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Sj=/[A-Z]/g,Cj=/-[a-z]/g,wj=/^data[-\w.:]+$/i;function Tj(e,t){let n=QA(t),r=t,i=$A;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&wj.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Cj,Dj);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Cj.test(e)){let n=e.replace(Sj,Ej);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=uj}return new i(r,t)}function Ej(e){return`-`+e.toLowerCase()}function Dj(e){return e.charAt(1).toUpperCase()}var Oj=ZA([pj,gj,vj,yj,bj],`html`),kj=ZA([pj,_j,vj,yj,bj],`svg`);function Aj(e){return e.join(` `).trim()}var jj=/\/\*(?:[^*]|\*(?!\/))*\*\//g,Mj=/\n/g,Nj=/^\s*/,Pj=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Fj=/^:\s*/,Ij=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Lj=/^[;\s]*/,Rj=`
196
+ `,zj=`/`,Bj=`*`,Vj=``,Hj=`comment`,Uj=`declaration`;function Wj(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Mj);t&&(n+=t.length);var i=e.lastIndexOf(Rj);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Nj)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(zj==e.charAt(0)&&Bj==e.charAt(1)){for(var n=2;Vj!=e.charAt(n)&&(Bj!=e.charAt(n)||zj!=e.charAt(n+1));)++n;if(n+=2,Vj===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Hj,comment:o})}}function f(){var e=a(),t=c(Pj);if(t){if(d(),!c(Fj))return s(`property missing ':'`);var n=c(Ij),r=e({type:Uj,property:t[0].replace(jj,Vj).trim(),value:n?n[0].replace(jj,Vj).trim():Vj});return c(Lj),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function Gj(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Wj(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var Kj=Jj(`end`),qj=Jj(`start`);function Jj(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Yj(e){let t=qj(e),n=Kj(e);if(t&&n)return{start:t,end:n}}var Xj={}.hasOwnProperty,Zj=new Map,Qj=/[A-Z]/g,$j=/-([a-z])/g,eM=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),tM=new Set([`td`,`th`]),nM=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function rM(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=mM(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=pM(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?kj:Oj,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=iM(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function iM(e,t,n){if(t.type===`element`)return aM(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return oM(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return cM(e,t,n);if(t.type===`mdxjsEsm`)return sM(e,t);if(t.type===`root`)return lM(e,t,n);if(t.type===`text`)return uM(e,t)}function aM(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=kj,e.schema=i),e.ancestors.push(t);let a=bM(e,t.tagName,!1),o=hM(e,t),s=_M(e,t);return eM.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!JA(e)})),dM(e,o,a,t),fM(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function oM(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}xM(e,t.position)}function sM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xM(e,t.position)}function cM(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=kj,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:bM(e,t.name,!0),o=gM(e,t),s=_M(e,t);return dM(e,o,a,t),fM(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function lM(e,t,n){let r={};return fM(r,_M(e,t)),e.create(t,e.Fragment,r,n)}function uM(e,t){return t.value}function dM(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fM(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function pM(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function mM(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=qj(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function hM(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Xj.call(t.properties,i)){let a=vM(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&tM.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function gM(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else xM(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else xM(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function _M(e,t){let n=[],r=-1,i=e.passKeys?new Map:Zj;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=iM(e,a,o);s!==void 0&&n.push(s)}return n}function vM(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=Tj(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?HA(n):Aj(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:SM(n):yM(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?xj[r.property]||r.property:r.attribute,n]}function yM(e,t){let n={};try{Gj(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace($j,TM))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ek("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=nM+`#cannot-parse-style-attribute`,r}return n}function bM(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=KA(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=KA(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Xj.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);xM(e)}function xM(e,t){let n=new Ek("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=nM+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function SM(e){let t={},n;for(n in e)Xj.call(e,n)&&(t[CM(n)]=e[n]);return t}function CM(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(Qj,wM);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function wM(e){return`-`+e.toLowerCase()}function TM(e,t){return t.toUpperCase()}var EM={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]};function DM(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function OM(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
197
+ `}]}function kM(e,t){let n=t.value?t.value+`
198
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function AM(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jM(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MM(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=TE(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function NM(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PM(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function FM(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function IM(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return FM(e,t);let i={src:TE(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function LM(e,t){let n={src:TE(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function RM(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function zM(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return FM(e,t);let i={href:TE(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function BM(e,t){let n={href:TE(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function VM(e,t,n){let r=e.all(t),i=n?HM(n):UM(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
199
199
  `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
200
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function VM(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=HM(n[r])}return t}function HM(e){return e.spread??e.children.length>1}function UM(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function WM(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GM(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function KM(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qM(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Kj(t.children[1]),o=Gj(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function JM(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function YM(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var XM=9,ZM=32;function QM(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push($M(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push($M(t.slice(i),i>0,!1)),a.join(``)}function $M(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===XM||t===ZM;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===XM||t===ZM;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function eN(e,t){let n={type:`text`,value:QM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function tN(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var nN={blockquote:EM,break:DM,code:OM,delete:kM,emphasis:AM,footnoteReference:jM,heading:MM,html:NM,imageReference:FM,image:IM,inlineCode:LM,linkReference:RM,link:zM,listItem:BM,list:UM,paragraph:WM,root:GM,strong:KM,table:qM,tableCell:YM,tableRow:JM,text:eN,thematicBreak:tN,toml:rN,yaml:rN,definition:rN,footnoteDefinition:rN};function rN(){}var{defineProperty:iN}=Object,aN=typeof self==`object`?self:globalThis,oN=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new aN[e](t)},sN=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?iN(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof aN[e]==`function`?oN(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(oN(a,o),i)};return r},cN=e=>sN(new Map,e)(0),lN=``,{toString:uN}={},{keys:dN,is:fN}=Object,pN=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=uN.call(e).slice(8,-1);switch(n){case`Array`:return[1,lN];case`Object`:return[2,lN];case`Date`:return[3,lN];case`RegExp`:return[4,lN];case`Map`:return[5,lN];case`Set`:return[6,lN];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},mN=([e,t])=>e===0&&(t===`function`||t===`symbol`),hN=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=pN(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&fN(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of dN(o))(e||!mN(pN(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?lN:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(mN(pN(n))||mN(pN(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!mN(pN(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},gN=(e,{json:t,lossy:n}={})=>{let r=[];return hN(!(t||n),!!t,new Map,r)(e),r},_N=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?cN(gN(e,t)):structuredClone(e):(e,t)=>cN(gN(e,t));function vN(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function yN(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function bN(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||vN,r=e.options.footnoteBackLabel||yN,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=wE(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{..._N(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
200
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function HM(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=UM(n[r])}return t}function UM(e){return e.spread??e.children.length>1}function WM(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function GM(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KM(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qM(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JM(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=qj(t.children[1]),o=Kj(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function YM(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function XM(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var ZM=9,QM=32;function $M(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(eN(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(eN(t.slice(i),i>0,!1)),a.join(``)}function eN(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===ZM||t===QM;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===ZM||t===QM;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function tN(e,t){let n={type:`text`,value:$M(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nN(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var rN={blockquote:DM,break:OM,code:kM,delete:AM,emphasis:jM,footnoteReference:MM,heading:NM,html:PM,imageReference:IM,image:LM,inlineCode:RM,linkReference:zM,link:BM,listItem:VM,list:WM,paragraph:GM,root:KM,strong:qM,table:JM,tableCell:XM,tableRow:YM,text:tN,thematicBreak:nN,toml:iN,yaml:iN,definition:iN,footnoteDefinition:iN};function iN(){}var{defineProperty:aN}=Object,oN=typeof self==`object`?self:globalThis,sN=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new oN[e](t)},cN=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?aN(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof oN[e]==`function`?sN(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(sN(a,o),i)};return r},lN=e=>cN(new Map,e)(0),uN=``,{toString:dN}={},{keys:fN,is:pN}=Object,mN=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=dN.call(e).slice(8,-1);switch(n){case`Array`:return[1,uN];case`Object`:return[2,uN];case`Date`:return[3,uN];case`RegExp`:return[4,uN];case`Map`:return[5,uN];case`Set`:return[6,uN];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},hN=([e,t])=>e===0&&(t===`function`||t===`symbol`),gN=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=mN(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&pN(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of fN(o))(e||!hN(mN(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?uN:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(hN(mN(n))||hN(mN(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!hN(mN(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},_N=(e,{json:t,lossy:n}={})=>{let r=[];return gN(!(t||n),!!t,new Map,r)(e),r},vN=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?lN(_N(e,t)):structuredClone(e):(e,t)=>lN(_N(e,t));function yN(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function bN(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function xN(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||yN,r=e.options.footnoteBackLabel||bN,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=TE(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...vN(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
201
201
  `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
202
- `}]}}var xN={}.hasOwnProperty,SN={};function CN(e,t){let n=t||SN,r=new Map,i=new Map,a={all:s,applyData:TN,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...nN,...n.handlers},one:o,options:n,patch:wN,wrap:DN};return qw(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(xN.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=_N(n);return r.children=a.all(e),r}return _N(e)}return(a.options.unknownHandler||EN)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=ON(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=ON(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function wN(e,t){e.position&&(t.position=Jj(e))}function TN(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,_N(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function EN(e,t){let n=t.data||{},r=`value`in t&&!(xN.call(n,`hProperties`)||xN.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function DN(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
202
+ `}]}}var SN={}.hasOwnProperty,CN={};function wN(e,t){let n=t||CN,r=new Map,i=new Map,a={all:s,applyData:EN,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...rN,...n.handlers},one:o,options:n,patch:TN,wrap:ON};return Jw(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(SN.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=vN(n);return r.children=a.all(e),r}return vN(e)}return(a.options.unknownHandler||DN)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=kN(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=kN(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function TN(e,t){e.position&&(t.position=Yj(e))}function EN(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,vN(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function DN(e,t){let n=t.data||{},r=`value`in t&&!(SN.call(n,`hProperties`)||SN.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ON(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
203
203
  `});++r<e.length;)r&&n.push({type:`text`,value:`
204
204
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
205
- `}),n}function ON(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function kN(e,t){let n=CN(e,t),r=n.one(e,void 0),i=bN(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
206
- `},i)),a}function AN(e,t){return e&&`run`in e?async function(n,r){let i=kN(n,{file:r,...t});await e.run(i,r)}:function(n,r){return kN(n,{file:r,...e||t})}}var jN=[],MN={allowDangerousHtml:!0},NN=/^(https?|ircs?|mailto|xmpp)$/i,PN=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function FN(e){let t=IN(e),n=LN(e);return RN(t.runSync(t.parse(n),n),e)}function IN(e){let t=e.rehypePlugins||jN,n=e.remarkPlugins||jN,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...MN}:MN;return Jk().use(yk).use(n).use(AN,r).use(t)}function LN(e){let t=e.children||``,n=new Bk;return typeof t==`string`?n.value=t:``+t,n}function RN(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||zN;for(let e of PN)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return qw(e,l),nM(e,{Fragment:V.Fragment,components:i,ignoreInvalidStyle:!0,jsx:V.jsx,jsxs:V.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in TM)if(Object.hasOwn(TM,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=TM[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function zN(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||NN.test(e.slice(0,t))?e:``}var BN={note:{label:`Note`,palette:`info`,icon:(0,V.jsx)(FA,{fontSize:`small`})},warning:{label:`Warning`,palette:`warning`,icon:(0,V.jsx)(BA,{fontSize:`small`})},tip:{label:`Tip`,palette:`success`,icon:(0,V.jsx)(IA,{fontSize:`small`})},say:{label:`Say`,palette:`primary`,icon:(0,V.jsx)(LA,{fontSize:`small`})},do:{label:`Do`,palette:`secondary`,icon:(0,V.jsx)(RA,{fontSize:`small`})},timing:{label:`Timing`,palette:`info`,icon:(0,V.jsx)(zA,{fontSize:`small`})}};function VN({type:e,children:t}){let n=BN[e];return(0,V.jsxs)(lm,{sx:e=>({my:2,px:2,py:1.5,borderLeft:3,borderColor:`${n.palette}.main`,borderRadius:1,bgcolor:gi(e.palette[n.palette].main,.08),"& p:first-of-type":{mt:0},"& p:last-of-type":{mb:0}}),"data-testid":`guide-admonition-${e}`,children:[(0,V.jsxs)(Z,{variant:`overline`,component:`p`,sx:{display:`flex`,alignItems:`center`,gap:.75,fontWeight:600,lineHeight:1.5,mb:.5,color:`${n.palette}.main`},children:[n.icon,n.label]}),t]})}function HN(e){return`/api/guide/assets/${e.split(`/`).map(encodeURIComponent).join(`/`)}`}function UN({body:e,locale:t}){let n=NA(e);return n.ok?n.kind===`file`?(0,V.jsxs)(lm,{component:`figure`,sx:{my:2,mx:0,maxWidth:720},"data-testid":`guide-video-file`,children:[(0,V.jsxs)(lm,{component:`video`,controls:!0,preload:`metadata`,playsInline:!0,src:HN(n.src),poster:n.poster?HN(n.poster):void 0,"aria-label":n.title,sx:{display:`block`,width:`100%`,"@media print":{display:`none`}},children:[n.captions&&(0,V.jsx)(`track`,{kind:`captions`,src:HN(n.captions),srcLang:t,label:t,default:!0}),n.title]}),(0,V.jsxs)(lm,{sx:{display:`none`,"@media print":{display:`block`}},children:[n.poster&&(0,V.jsx)(lm,{component:`img`,src:HN(n.poster),alt:``,sx:{display:`block`,maxWidth:`100%`}}),n.title&&(0,V.jsx)(Z,{component:`figcaption`,variant:`body2`,children:n.title})]})]}):(0,V.jsx)(lm,{sx:{my:2,position:`relative`,aspectRatio:`16 / 9`,maxWidth:720},"data-testid":`guide-video-embed`,children:(0,V.jsx)(lm,{component:`iframe`,src:n.embedUrl,title:`${n.provider} video`,sandbox:`allow-scripts allow-same-origin allow-presentation`,allow:`encrypted-media; fullscreen; picture-in-picture`,referrerPolicy:`strict-origin-when-cross-origin`,sx:{position:`absolute`,inset:0,width:`100%`,height:`100%`,border:0}})}):(0,V.jsxs)(Td,{severity:`error`,sx:{my:2},"data-testid":`guide-video-error`,children:[`Video block error: `,n.error]})}function WN(e){return e.children.map(e=>e.type===`text`?e.value:e.type===`element`?WN(e):``).join(``)}function GN({markdown:e,chapterFile:t,locale:n,settings:r}){return(0,V.jsx)(FN,{remarkPlugins:[AO,iC,[_A,{settings:r,locale:n}],oA,sA,[CA,{chapterFile:t}]],urlTransform:e=>{let r=zN(e);if(!r)return;if(/^[a-z][a-z0-9+.-]*:/i.test(r)||r.startsWith(`//`)||r.startsWith(`#`)||r.startsWith(`/`))return r;let i=new URL(`/api/guide/content/${n}/${t}`,window.location.origin),a=new URL(r,i);if(a.origin===window.location.origin&&a.pathname.startsWith(`/api/guide/`))return a.pathname+a.search},components:{pre({node:e,children:t,...r}){let i=e?.children[0];return i&&i.type===`element`&&i.tagName===`code`&&Array.isArray(i.properties?.className)&&i.properties.className.includes(`language-video`)?(0,V.jsx)(UN,{body:WN(i),locale:n}):(0,V.jsx)(`pre`,{...r,children:t})},span(e){let{node:t,children:n,...r}=e;return typeof r[`data-guide-error`]==`string`?(0,V.jsx)(lm,{component:`span`,"data-testid":`guide-setting-error`,sx:{color:`error.main`,fontStyle:`italic`},children:n}):(0,V.jsx)(`span`,{...r,children:n})},div(e){let{node:t,children:n,...r}=e,i=r;if(typeof i[`data-guide-error`]==`string`)return(0,V.jsx)(Td,{severity:`error`,sx:{my:2},"data-testid":`guide-setting-error`,children:n});let a=i[`data-admonition`];if(typeof a==`string`&&aA(a))return(0,V.jsx)(VN,{type:a,children:n});let o=i[`data-admonition-unknown`];return typeof o==`string`?(0,V.jsxs)(Td,{severity:`error`,sx:{my:2},"data-testid":`guide-admonition-unknown`,children:[`Unknown admonition type ":::`,o,`"`]}):(0,V.jsx)(`div`,{...e})},a({node:e,children:t,href:n,...r}){let i=typeof n==`string`&&/^https?:\/\//.test(n);return(0,V.jsx)(`a`,{href:n,...r,...i?{target:`_blank`,rel:`noreferrer noopener`}:{},children:t})}},children:e})}function KN(e){let t=e.replace(/\.md$/,``).replace(/^\d+[-_. ]*/,``).replace(/[-_]+/g,` `).trim();return t.charAt(0).toUpperCase()+t.slice(1)}function qN({locale:e,reloads:t}){let n=new URLSearchParams(window.location.search),[r,i]=(0,E.useState)(void 0),[a,o]=(0,E.useState)(n.get(`locale`)??e),[s,c]=(0,E.useState)(n.get(`chapter`)),[l,u]=(0,E.useState)(``);(0,E.useEffect)(()=>{fetch(`/api/guide`).then(e=>e.json()).then(e=>i(e.guide))},[t]);let d=(0,E.useMemo)(()=>Object.keys(r?.locales??{}),[r]),f=(0,E.useMemo)(()=>r?sx(r.locales,r.chapters,a):[],[r,a]),p=(0,E.useMemo)(()=>f.map(e=>e.file),[f]),m=f.find(e=>e.file===s)?.locale??a;(0,E.useEffect)(()=>{if(r){if(p.length===0)return c(null);s&&p.includes(s)||c(p[0])}},[r,p,s]),(0,E.useEffect)(()=>{if(!r||!s)return u(``);let e=!0;return fetch(`/api/guide/content/${encodeURIComponent(m)}/${encodeURIComponent(s)}`).then(e=>e.ok?e.text():`This chapter could not be read.`).then(t=>{e&&u(t)}),()=>{e=!1}},[r,m,s,t]);let h=(0,E.useMemo)(()=>s&&l&&r?wA(s,l,{settings:r.settings,locale:m}):[],[s,l,r,m]);return r===void 0?(0,V.jsx)(my,{sx:{alignItems:`center`,justifyContent:`center`,height:`100%`},children:(0,V.jsx)(sd,{size:28})}):r===null?(0,V.jsx)(my,{sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4},children:(0,V.jsx)(Z,{color:`text.secondary`,children:`This package declares no facilitator guide, or none of its chapters applies to this session.`})}):(0,V.jsxs)(my,{direction:`row`,sx:{height:`100%`},children:[(0,V.jsxs)(lm,{sx:{width:280,borderRight:1,borderColor:`divider`,overflow:`auto`,"@media print":{display:`none`}},children:[d.length>1&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(lm,{sx:{p:2},children:(0,V.jsx)(Wv,{size:`small`,fullWidth:!0,value:d.includes(a)?a:d[0]??``,onChange:e=>o(e.target.value),children:d.map(e=>(0,V.jsx)(rv,{value:e,children:r.locales[e]?.name??e},e))})}),(0,V.jsx)(Lh,{})]}),(0,V.jsxs)(Hg,{dense:!0,children:[p.map(e=>(0,V.jsx)(Kg,{selected:e===s,onClick:()=>c(e),children:(0,V.jsx)(Qg,{primary:KN(e)})},e)),p.length===0&&(0,V.jsx)(lm,{sx:{px:2,py:1},children:(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`This guide has no chapters yet.`})})]}),h.some(e=>e.depth>1)&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Lh,{}),(0,V.jsx)(Z,{variant:`overline`,color:`text.secondary`,sx:{display:`block`,px:2,pt:1.5},children:`On this page`}),(0,V.jsx)(Hg,{dense:!0,disablePadding:!0,sx:{pb:2},children:h.filter(e=>e.depth>1).map(e=>(0,V.jsx)(Kg,{dense:!0,sx:{pl:2+(e.depth-2)*1.5,py:.25},onClick:()=>document.getElementById(e.id)?.scrollIntoView({block:`start`}),children:(0,V.jsx)(Qg,{primary:e.text,slotProps:{primary:{variant:`body2`,color:`text.secondary`}}})},e.id))})]})]}),(0,V.jsx)(lm,{sx:{flex:1,minWidth:0,overflow:`auto`},children:(0,V.jsxs)(lm,{"data-testid":`guide-content`,sx:{maxWidth:780,mx:`auto`,px:4,py:3,"& img":{maxWidth:`100%`},"& pre":{p:2,borderRadius:1,overflow:`auto`,bgcolor:`action.hover`},"& table":{borderCollapse:`collapse`,width:`100%`},"& th, & td":{border:1,borderColor:`divider`,px:1,py:.5},"& h1, & h2, & h3":{scrollMarginTop:16},"@media print":{maxWidth:`none`,px:0,py:0}},children:[s&&m!==a&&(0,V.jsxs)(Td,{severity:`info`,"data-testid":`guide-untranslated`,sx:{mb:2,"@media print":{display:`none`}},children:[`This chapter is not yet translated into`,` `,r.locales[a]?.name??a,`, so it is shown in`,` `,r.locales[m]?.name??m,`.`]}),s&&(0,V.jsx)(GN,{markdown:l,chapterFile:s,locale:m,settings:r.settings})]})})]})}function JN({team:e,bare:t}){return e?e.participants.length===0?(0,V.jsxs)(YN,{children:[(0,V.jsxs)(my,{spacing:1,sx:{alignItems:`center`,maxWidth:420},children:[(0,V.jsx)(Z,{variant:`overline`,color:`text.secondary`,children:e.name}),(0,V.jsx)(Z,{variant:`h5`,children:`Nobody is on this team yet`}),(0,V.jsxs)(Z,{color:`text.secondary`,sx:{textAlign:`center`},children:[`Add a participant from the dev drawer, or with`,` `,(0,V.jsxs)(`code`,{children:[`sdk participant add --team `,e.index+1]}),`, and they will be listed here.`]})]}),(0,V.jsx)(xm,{size:`small`,href:qc({kind:`observer`,teamIndex:e.index,bare:t}),children:`Watch without joining`})]}):(0,V.jsxs)(YN,{children:[(0,V.jsxs)(my,{spacing:1,sx:{alignItems:`center`},children:[(0,V.jsx)(Z,{variant:`overline`,color:`text.secondary`,children:e.name}),(0,V.jsx)(Z,{variant:`h5`,children:`Who are you?`})]}),(0,V.jsx)(my,{spacing:1.5,sx:{width:`100%`,maxWidth:420},children:e.participants.map((n,r)=>(0,V.jsx)(Tm,{variant:`outlined`,"data-testid":`join-participant`,children:(0,V.jsxs)(jm,{href:qc({kind:`player`,teamIndex:e.index,participant:r+1,bare:t}),sx:{p:2},children:[(0,V.jsx)(Z,{variant:`subtitle1`,children:n.name}),(0,V.jsxs)(Z,{variant:`body2`,color:`text.secondary`,children:[`Participant `,r+1]})]})},n.id))}),(0,V.jsx)(xm,{size:`small`,href:qc({kind:`observer`,teamIndex:e.index,bare:t}),children:`Watch without joining`})]}):(0,V.jsxs)(YN,{children:[(0,V.jsx)(Z,{color:`text.secondary`,children:`This session has no such team. It may have been removed.`}),(0,V.jsx)(xm,{href:`/`,children:`Back to the session`})]})}function YN({children:e}){return(0,V.jsx)(my,{spacing:3,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4,bgcolor:`background.default`},children:(0,V.jsx)(lm,{sx:{display:`contents`},children:e})})}function XN({state:e}){let t=new URLSearchParams(window.location.search).get(`team`),n=t?e.teams.filter(e=>e.teamId===t):e.teams;return(0,E.useEffect)(()=>{let t=document.title;return document.title=`${e.game.name} — team sheets`,()=>{document.title=t}},[e.game.name]),(0,V.jsxs)(lm,{"data-testid":`print-sheets`,sx:{height:`100%`,overflow:`auto`,bgcolor:`background.default`,"@media print":{height:`auto`,overflow:`visible`}},children:[(0,V.jsxs)(my,{direction:`row`,spacing:2,sx:{alignItems:`center`,p:2,"@media print":{display:`none`}},children:[(0,V.jsx)(Z,{variant:`h6`,sx:{flex:1},children:`Team sheets`}),(0,V.jsx)(xm,{variant:`contained`,onClick:()=>window.print(),children:`Print`})]}),n.map(t=>(0,V.jsxs)(lm,{sx:{m:2,p:4,bgcolor:`background.paper`,border:1,borderColor:`divider`,borderRadius:1,"@media print":{breakAfter:`page`,breakInside:`avoid`,border:0,m:0}},children:[(0,V.jsx)(Z,{variant:`overline`,color:`text.secondary`,children:e.game.name}),(0,V.jsx)(Z,{variant:`h3`,gutterBottom:!0,children:t.name}),(0,V.jsx)(Lh,{sx:{my:2}}),(0,V.jsx)(Z,{variant:`subtitle2`,gutterBottom:!0,children:`Open your screen at`}),(0,V.jsx)(Z,{sx:{fontFamily:`monospace`,fontSize:18,mb:3,wordBreak:`break-all`},children:`${window.location.origin}${qc({kind:`player`,teamIndex:t.index,participant:1})}`}),(0,V.jsx)(Z,{variant:`subtitle2`,gutterBottom:!0,children:`On this team`}),(0,V.jsxs)(my,{spacing:.5,children:[t.participants.map((e,n)=>(0,V.jsxs)(Z,{children:[n+1,`. `,e.name,(0,V.jsx)(Z,{component:`span`,variant:`caption`,color:`text.secondary`,sx:{ml:1,fontFamily:`monospace`},children:qc({kind:`player`,teamIndex:t.index,participant:n+1})})]},e.id)),t.participants.length===0&&(0,V.jsx)(Z,{color:`text.secondary`,children:`Nobody yet.`})]})]},t.teamId))]})}var ZN={game:new Set([`updateData`,`requestTick`,`renameOwnTeam`,`renameSelf`]),"waiting-room":new Set([`updateData`,`requestTick`,`renameOwnTeam`,`renameSelf`]),session:new Set([`updateSessionData`,`updateSharedData`,`requestTick`,`undoTick`,`resetGame`,`resetWalkthrough`,`setWaitingRoom`,`setLocale`,`createTeam`,`renameTeam`,`renameParticipant`,`moveParticipant`,`deleteTeam`,`pauseTimer`,`resumeTimer`,`extendTick`]),setup:new Set([`updateSettings`,`requestPlay`]),"scenario-editor":new Set([`updateSettings`]),presentation:new Set},QN={setWaitingRoom:`The waiting room is session-wide, so setWaitingRoom takes no teamId`,renameOwnTeam:`renameOwnTeam renames the caller's own team, which the host resolves; it takes no teamId`,resetWalkthrough:`A walkthrough holds one team, so resetWalkthrough takes no teamId`,setLocale:`The locale is the session's, so setLocale takes no teamId`,renameSelf:`renameSelf renames the caller, whom the host resolves; it takes no teamId`},$N={game:new Set([`callEndpoint`,`getPastState`,`getAllTeamsParticipants`]),"waiting-room":new Set([`callEndpoint`,`getPastState`,`getAllTeamsParticipants`]),session:new Set([`callEndpoint`,`getPastState`]),setup:new Set([`callEndpoint`]),"scenario-editor":new Set([`callEndpoint`]),presentation:new Set([`getPastState`])};function eP(e){return e.teamIndex===void 0?{}:{teamIndex:e.teamIndex}}function tP(e){return e.participantId===void 0?{}:{participantId:e.participantId,teamId:`team-${(e.teamIndex??0)+1}`}}function nP(e){return e.role===void 0?{}:{viewerRole:e.role}}function rP(e){return{...eP(e),...tP(e),...nP(e)}}function iP(e){let t=typeof e==`string`?/^team-([1-9]\d*)$/.exec(e):null;return t?Number(t[1])-1:-1}function aP(e,t){return e.teamId===void 0?t:{teamIndex:iP(e.teamId)}}function oP(e){return typeof e==`object`&&!!e&&`refused`in e}function sP(e,t,n){if(!ZN[t.kind].has(e.type))return null;if(e.teamId!==void 0&&e.type in QN)return{refused:QN[e.type]};if(e.type===`renameSelf`&&e.participantId!==void 0)return{refused:`renameSelf renames the caller, whom the host resolves; it takes no participantId`};let r=eP(n),i=tP(n),a=nP(n);switch(e.type){case`updateData`:return{type:`updateContext`,uiIdentifier:t.identifier,payload:e.payload,...e.deletes?{deletes:e.deletes}:{},...r,...i,...a};case`updateSessionData`:return{type:`updateContext`,payload:e.payload,teamIndex:iP(e.teamId),sessionUiIdentifier:t.identifier,...e.deletes?{deletes:e.deletes}:{}};case`updateSharedData`:return{type:`updateSharedContext`,uiIdentifier:t.identifier,payload:e.payload,...e.deletes?{deletes:e.deletes}:{}};case`updateSettings`:return t.kind===`scenario-editor`?{type:`updateScenarioDraft`,scenarioId:n.scenario??null,payload:e.payload,uiIdentifier:t.identifier}:{type:`updateSettings`,payload:e.payload,uiIdentifier:t.identifier};case`requestTick`:return{type:`tick`,...aP(e,r),...t.kind===`session`?{}:{...i,...a}};case`undoTick`:return{type:`undo`,...aP(e,r)};case`resetGame`:return{type:`reset`,...aP(e,{})};case`setWaitingRoom`:return{type:`setWaitingRoom`,open:e.open===!0};case`setLocale`:return{type:`setLocale`,locale:String(e.locale)};case`resetWalkthrough`:return{type:`resetWalkthrough`};case`createTeam`:return{type:`addTeam`,...typeof e.name==`string`?{name:e.name}:{}};case`renameTeam`:return{type:`renameTeam`,teamId:String(e.teamId),name:String(e.name)};case`renameOwnTeam`:return{type:`renameOwnTeam`,name:String(e.name),...i};case`renameSelf`:return{type:`renameSelf`,name:String(e.name),...i};case`renameParticipant`:return{type:`renameParticipant`,participantId:String(e.participantId),name:String(e.name)};case`moveParticipant`:return{type:`moveParticipant`,participantId:String(e.participantId),teamId:String(e.teamId)};case`deleteTeam`:return{type:`removeTeam`,teamIndex:iP(e.teamId)};case`requestPlay`:return{type:`play`};case`pauseTimer`:return{type:`pauseTimer`,...aP(e,r)};case`resumeTimer`:return{type:`resumeTimer`,...aP(e,r)};case`extendTick`:return{type:`extendTick`,byMs:Number(e.byMs??0),...aP(e,r)};default:return null}}function cP(e,t,n){if(!$N[t.kind].has(e.type))return null;switch(e.type){case`callEndpoint`:return{type:`callEndpoint`,endpointIdentifier:String(e.endpointIdentifier),request:e.request,uiIdentifier:t.identifier,...rP(n),...t.kind===`scenario-editor`?{scenarioId:n.scenario??null}:{}};case`getPastState`:return{type:`getPastState`,query:e.query,uiIdentifier:t.identifier,...n.teamIndex===void 0?{}:{teamId:`team-${n.teamIndex+1}`}};case`getAllTeamsParticipants`:return{type:`getAllTeamsParticipants`,uiIdentifier:t.identifier};default:return null}}var lP={game:{required:[`stateChanged`,`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`,`setParticipant`],alsoSent:[`setTimer`,`setViewerRole`,`setOwnTeam`,`setOwnTeamJoinLink`,`setParticipantList`,`setTeamList`,`setRunKind`,`setScenarioName`,`setRoundProcessing`,`setCrossTeamData`,`themePreferenceChanged`],isPlayerSurface:!0},"waiting-room":{required:[`stateChanged`,`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`,`setParticipant`],alsoSent:[`setTimer`,`setViewerRole`,`setOwnTeam`,`setOwnTeamJoinLink`,`setParticipantList`,`setTeamList`,`setRunKind`,`setScenarioName`,`setCrossTeamData`,`themePreferenceChanged`],isPlayerSurface:!0},session:{required:[`setSessionMeta`,`setSessionData`,`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`,`setTeamConfiguration`],alsoSent:[`setTeamList`,`setParticipantList`,`setTeamLinks`,`setSessionJoinLink`,`setAvailableOverlays`,`setRunKind`,`setScenarioName`,`setWalkthroughLink`,`themePreferenceChanged`],isPlayerSurface:!1},presentation:{required:[`setPresentation`,`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`],alsoSent:[`themePreferenceChanged`],isPlayerSurface:!1},setup:{required:[`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`],alsoSent:[`themePreferenceChanged`],isPlayerSurface:!1},"scenario-editor":{required:[`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`],alsoSent:[`themePreferenceChanged`],isPlayerSurface:!1}};function uP(e,t={}){let{required:n,isPlayerSurface:r}=lP[e];return!t.observer||!r?n:n.filter(e=>e!==`setParticipant`)}var dP=new Set([`callEndpoint`,`uploadBlob`,`getPastState`,`getAllTeamsParticipants`]),fP=class{options;host;logger;port=null;readyListener=null;loadListener=null;handshakeTimer=null;disposed=!1;lastSent=new Map;sticky=new Map;outbound=[];pending=new Map;requestCounter=0;constructor(e){this.options=e,this.host=e.window??globalThis.window,this.logger=e.logger??console,this.listenForReady()}get connected(){return this.port!==null}send(e){this.disposed||(this.lastSent.set(e.type,pP(e)),this.port?this.port.postMessage(e):this.outbound.push(e))}sendState(e){this.disposed||(this.sticky.set(e.type,e),this.lastSent.set(e.type,pP(e)),this.port?.postMessage(e))}sendIfChanged(e){return this.disposed||this.lastSent.get(e.type)===pP(e)?!1:(this.sendState(e),!0)}sendInitialBatch(e){let t=uP(this.options.surface,{observer:this.options.observer}),n=new Set(e.map(e=>e.type)),r=t.filter(e=>!n.has(e));if(r.length>0)throw Error(`Initial batch for a "${this.options.surface}" surface is missing ${r.join(`, `)}. The guest blocks its first paint on ${t.join(`, `)}.`);for(let t of e)this.sendState(t)}request(e,t=3e4){let n=`host-${++this.requestCounter}`;return new Promise((r,i)=>{let a=setTimeout(()=>{this.pending.delete(n),i(Error(`Guest did not answer "${e.type}" in ${t}ms`))},t);this.pending.set(n,{resolve:()=>{clearTimeout(a),r()},reject:e=>{clearTimeout(a),i(e)}}),this.send({...e,requestId:n})})}dispose(){this.disposed||(this.disposed=!0,this.clearHandshakeTimer(),this.readyListener&&=(this.host.removeEventListener(`message`,this.readyListener),null),this.loadListener&&=(this.options.iframe.removeEventListener?.(`load`,this.loadListener),null),this.closePort(),this.rejectPending(`Channel disposed`),this.options.onTeardown?.(`disposed`))}listenForReady(){let e=e=>{if(this.disposed)return;let t=e.data;if(!t||t.type!==`ready`||e.source!==this.options.iframe.contentWindow)return;if(e.origin!==this.options.iframeOrigin){this.logger.warn(`[${this.options.uiIdentifier}] ignoring a handshake from ${e.origin}; this frame is pinned to ${this.options.iframeOrigin}`);return}let n=t.protocolVersion;typeof n==`number`&&n!==4&&this.logger.warn(`[${this.options.uiIdentifier}] host↔iframe protocol version mismatch: iframe ${n}, host 4`),this.connect(t.signalsRendered===!0)};this.readyListener=e,this.host.addEventListener(`message`,e),this.armHandshakeTimer(),this.listenForLoads()}listenForLoads(){let{iframe:e}=this.options;if(!e.addEventListener)return;let t=()=>{this.disposed||(this.armHandshakeTimer(),this.port?.postMessage({type:`ping`}))};this.loadListener=t,e.addEventListener(`load`,t)}armHandshakeTimer(){this.clearHandshakeTimer();let e=this.options.handshakeTimeoutMs??1e4;this.handshakeTimer=setTimeout(()=>{this.handshakeTimer=null,this.disposed||(this.closePort(),this.options.onTeardown?.(`handshake-timeout`))},e)}connect(e){this.closePort(),this.rejectPending(`Connection reset`),this.lastSent.clear();let t=[...this.sticky.values()],n=new MessageChannel;this.port=n.port1,this.port.onmessage=e=>this.receive(e.data),this.port.start(),this.clearHandshakeTimer(),this.options.iframe.contentWindow?.postMessage({type:`init`,protocolVersion:4,sessionKey:this.options.sessionKey},this.options.iframeOrigin,[n.port2]);for(let e of t)this.sendState(e);let r=this.outbound;this.outbound=[];for(let e of r)this.port.postMessage(e);this.options.onConnect?.({signalsRendered:e})}closePort(){this.port&&=(this.port.onmessage=null,this.port.close(),null)}clearHandshakeTimer(){this.handshakeTimer!==null&&(clearTimeout(this.handshakeTimer),this.handshakeTimer=null)}rejectPending(e){for(let{reject:t}of this.pending.values())t(Error(e));this.pending.clear()}receive(e){if(e&&typeof e.type==`string`){switch(e.type){case`pong`:this.clearHandshakeTimer();return;case`rendered`:this.options.onRendered?.();return;case`refreshAssetAuth:response`:{let{requestId:t,ok:n,error:r}=e;if(typeof t!=`string`)return;let i=this.pending.get(t);this.pending.delete(t),n?i?.resolve():i?.reject(Error(r??`Asset auth refresh failed`));return}}dP.has(e.type)?this.answer(e):this.options.onMessage?.(e)}}async answer(e){let t=e.requestId;if(typeof t!=`string`){this.logger.warn(`[${this.options.uiIdentifier}] dropped a "${e.type}" with no requestId`);return}let n=`${e.type}:response`;try{let r=await this.dispatch(e);this.send({type:n,requestId:t,ok:!0,...r})}catch(r){this.send(e.type===`callEndpoint`?{type:n,requestId:t,ok:!1,...mP(r)}:{type:n,requestId:t,ok:!1,error:r instanceof Error?r.message:String(r)})}}async dispatch(e){let t=this.options.adapter,n={uiIdentifier:this.options.uiIdentifier,...this.options.origin};switch(e.type){case`callEndpoint`:if(!t?.callEndpoint)throw Error(`This host serves no endpoints`);return{response:await t.callEndpoint({endpointIdentifier:String(e.endpointIdentifier),request:e.request},n)};case`uploadBlob`:if(!t?.uploadBlob)throw Error(`This host stores no blobs`);return{reference:await t.uploadBlob({data:e.data,name:String(e.name),mimeType:String(e.mimeType)},n)};case`getPastState`:if(!t?.getPastState)throw Error(`This host serves no past state`);return{entries:await t.getPastState(e.query,n)};case`getAllTeamsParticipants`:return{participants:await t?.getAllTeamsParticipants?.(n)??[]};default:throw Error(`Unroutable request "${e.type}"`)}}};function pP(e){return typeof e!=`object`||!e?JSON.stringify(e)??`undefined`:Array.isArray(e)?`[${e.map(pP).join(`,`)}]`:`{${Object.entries(e).filter(([,e])=>e!==void 0).sort(([e],[t])=>e<t?-1:+(e>t)).map(([e,t])=>`${JSON.stringify(e)}:${pP(t)}`).join(`,`)}}`}function mP(e){let t=typeof e==`object`&&e?e.failure:void 0;return typeof t==`object`&&t&&typeof t.outcome?.kind==`string`&&Array.isArray(t.applied)?t:{outcome:{kind:`error`,message:e instanceof Error?e.message:String(e)},applied:[]}}var hP=[`primary`,`secondary`,`success`,`error`,`warning`,`info`];function gP(e){let t=e.trim().toLowerCase(),n=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(t);if(n){let e=n[1];e.length<=4&&(e=[...e].map(e=>e+e).join(``));let t=t=>parseInt(e.slice(t,t+2),16);return{r:t(0),g:t(2),b:t(4),a:e.length===8?t(6)/255:1}}let r=/^rgba?\(([^)]*)\)$/.exec(t);if(r){let e=r[1].split(/[\s,/]+/).filter(Boolean);if(e.length!==3&&e.length!==4)return null;let[t,n,i]=e.slice(0,3).map(e=>e.endsWith(`%`)?parseFloat(e)/100*255:parseFloat(e)),a=e[3],o=a===void 0?1:a.endsWith(`%`)?parseFloat(a)/100:parseFloat(a);return[t,n,i,o].some(e=>!Number.isFinite(e))?null:{r:_P(t,255),g:_P(n,255),b:_P(i,255),a:_P(o,1)}}return null}function _P(e,t){return Math.min(t,Math.max(0,e))}function vP(e,t){let n=(t,n)=>t*e.a+n*(1-e.a);return{r:n(e.r,t.r),g:n(e.g,t.g),b:n(e.b,t.b),a:1}}function yP({r:e,g:t,b:n}){let r=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}function bP(e,t){let[n,r]=[yP(e),yP(t)].sort((e,t)=>t-e);return(n+.05)/(r+.05)}function xP({r:e,g:t,b:n}){let r=e=>Math.round(e).toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`}var SP={r:0,g:0,b:0,a:1},CP={r:255,g:255,b:255,a:1};function wP(e,t){let n=gP(e);if(!n)return xP(SP);let r=n.a<1?vP(n,CP):n,i=t===void 0?null:gP(t);if(i){let e=vP(i,r);if(bP(e,r)>=4.5)return xP(e)}return bP(SP,r)>=bP(CP,r)?xP(SP):xP(CP)}var TP={light:{background:`#ffffff`,surface:`#ffffff`,text:`#000000`},dark:{background:`#121212`,surface:`#1e1e1e`,text:`#ffffff`}};function EP(e){let{background:t,surface:n,text:r}=e;if(!t||!n)return;let i=gP(t),a=gP(n);if(!i||!a)return;let o=e=>e.a<1?vP(e,CP):e,s=[o(i),o(a)],c=e=>Math.min(...s.map(t=>bP(vP(e,t),t))),l=r===void 0?null:gP(r);if(l&&l.a===1&&c(l)>=4.5)return{background:t,surface:n,text:xP(l)};let u=c(SP)>=c(CP)?SP:CP;if(!(c(u)<4.5))return{background:t,surface:n,text:xP(u)}}function DP(e,t){let n=Object.fromEntries(hP.map(t=>[t,wP(e[t],e.contrastText?.[t])]));return{...Object.fromEntries(hP.map(t=>[t,e[t]])),contrastText:n,...EP(e)??TP[t]}}function OP(e){return{mode:e.mode,light:DP(e.light,`light`),dark:DP(e.dark,`dark`),brand:e.brand}}var kP={primary:{main:`#6B00FF`,contrastText:`#ffffff`},secondary:{main:`#17D1C7`,contrastText:`rgba(0,0,0,0.87)`},error:{main:`#DB324D`,contrastText:`#ffffff`},success:{main:`#00c894`,contrastText:`rgba(0,0,0,0.87)`},warning:{main:`#ffb65c`,contrastText:`rgba(0,0,0,0.87)`},info:{main:`#336BEB`,contrastText:`#ffffff`}},AP={primary:{main:`#BC8CFF`,contrastText:`rgba(0,0,0,0.87)`},secondary:{main:`#17D1C7`,contrastText:`rgba(0,0,0,0.87)`},error:{main:`#ef7a8e`,contrastText:`rgba(0,0,0,0.87)`},success:{main:`#00c894`,contrastText:`rgba(0,0,0,0.87)`},warning:{main:`#ffb65c`,contrastText:`rgba(0,0,0,0.87)`},info:{main:`#7d9bf2`,contrastText:`rgba(0,0,0,0.87)`}},jP=`#414042`,MP=`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,NP=`"Work Sans", ${MP}`,PP=`Sora, ${MP}`;function FP(e){return{primary:e.primary.main,secondary:e.secondary.main,success:e.success.main,error:e.error.main,warning:e.warning.main,info:e.info.main,contrastText:{primary:e.primary.contrastText,secondary:e.secondary.contrastText,success:e.success.contrastText,error:e.error.contrastText,warning:e.warning.contrastText,info:e.info.contrastText}}}function IP(e,t){return OP(t?{mode:e,...t.theme}:{mode:e,light:FP(kP),dark:FP(AP),brand:{name:`Serious Gaming`}})}var LP=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function RP(e){return Xo({palette:e===`dark`?{mode:`dark`,...AP}:{mode:`light`,...kP,text:{primary:jP}},typography:{fontFamily:NP,...Object.fromEntries(LP.map(e=>[e,{fontFamily:PP}]))},components:{MuiButton:{styleOverrides:{root:{textTransform:`none`}}}}})}function zP(e){return e===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e}function BP(e,t){return{"Content-Type":e.mimeType,"X-Blob-Name":encodeURIComponent(e.name),"X-Blob-Mime":e.mimeType,"X-Blob-Retention":t===`setup`?`settings`:t===`scenario-editor`?`scenario`:`game`}}var VP=5e3,HP=`allow-scripts allow-same-origin allow-forms allow-downloads allow-modals allow-presentation allow-popups allow-popups-to-escape-sandbox`,UP=`clipboard-write; autoplay; screen-wake-lock; fullscreen; microphone; camera; geolocation; picture-in-picture; web-share; gamepad; window-management; speaker-selection`;function WP(e){return Object.assign(Error(e.outcome.message??e.outcome.kind),{failure:e})}function GP(e,t,n){return async r=>{let i=cP(r,e,t)??sP(r,e,t);return oP(i)?{ok:!1,outcome:{kind:`denied`,message:i.refused}}:i?n(i):null}}function KP(e,t,n){return JSON.stringify([e.kind,e.identifier,t.observer??null,t.teamIndex??null,t.participantId??null,t.role??null,n])}function qP({surface:e,viewer:t,feed:n,mode:r,resolved:i,onModeChange:a,rejection:o,hookFailure:s,onTeardown:c}){let l=n.kind===`view`?n.dispatch:GP(e,t,n.send),u=e.origin??window.location.origin,d=(0,E.useRef)(null),f=(0,E.useRef)(null),p=ZP(n),m=(0,E.useRef)({dispatch:l,onModeChange:a,overlays:p});m.current={dispatch:l,onModeChange:a,overlays:p};let[h,g]=(0,E.useState)(!1),[_,v]=(0,E.useState)(!1),[y,b]=(0,E.useState)(!1),[x,S]=(0,E.useState)(!1),{selected:C}=Sb(),{hold:w}=kb(),T=n.kind===`view`?n.sessionKey:$c(n.state,e,{sessionless:n.sessionless===!0});return(0,E.useEffect)(()=>{let n=d.current;if(!n)return;let r;return r=new fP({iframe:n,surface:e.kind,uiIdentifier:e.identifier,iframeOrigin:u,sessionKey:T,adapter:{callEndpoint:async({endpointIdentifier:e,request:t})=>{let n=await m.current.dispatch({type:`callEndpoint`,endpointIdentifier:e,request:t});if(n&&`type`in n){if(n.type===`endpoint`)return n.response;if(n.type===`endpointFailure`)throw WP(n.failure)}throw WP({outcome:n&&`ok`in n&&!n.ok?n.outcome:{kind:`error`,message:`The endpoint did not answer`},applied:[]})},uploadBlob:async t=>{let n=await(await fetch(`/api/blobs`,{method:`POST`,headers:BP(t,e.kind),body:t.data})).json();if(!n.reference)throw Error(`The blob was not stored`);return n.reference},getPastState:async e=>{let t=await m.current.dispatch({type:`getPastState`,query:e});return t&&`type`in t&&t.type===`pastState`?t.entries:[]},getAllTeamsParticipants:async()=>{let e=await m.current.dispatch({type:`getAllTeamsParticipants`});return e&&`type`in e&&e.type===`participants`?e.participants:[]}},observer:t.observer===!0,onConnect:({signalsRendered:e})=>{g(!0),v(!e),b(!e),S(!1)},onRendered:()=>{v(!0),b(!0)},onTeardown:e=>{e===`handshake-timeout`&&(g(!1),S(!0),c?.())},onMessage:e=>{e.type===`setThemePreference`?m.current.onModeChange?.(e.preference):YP(r,e,m.current.dispatch,m.current.overlays)}}),f.current=r,()=>{r.dispose(),f.current=null,g(!1),v(!1),b(!1)}},[e.identifier,e.kind,t.observer,t.teamIndex,t.participantId,t.role,T,w]),(0,E.useEffect)(()=>{let a=f.current;if(!a)return;let o={mode:i,preference:r,palette:IP(i,C)},s=n.kind===`view`?[...n.messages,...el(o)]:al({surface:e,state:n.state,viewer:t,theme:o,origin:window.location.origin,assetOrigin:u,gameName:n.state.game.name,...n.overlays===void 0?{}:{overlays:n.overlays},...n.roundProcessing===void 0?{}:{roundProcessing:n.roundProcessing},...n.sessionless===void 0?{}:{sessionless:n.sessionless}});if(w===`surface`)for(let e of Tb(s,w))a.sendIfChanged(e);else if(a.connected)for(let e of s)a.sendIfChanged(e);else a.sendInitialBatch(s)},[e,n,t,r,i,u,C,w]),(0,E.useEffect)(()=>{if(!h||_||w===`host`)return;let e=setTimeout(()=>v(!0),VP);return()=>clearTimeout(e)},[h,_,w]),(0,E.useEffect)(()=>{let e=f.current;e&&o&&(o.teamIndex===void 0||o.teamIndex===t.teamIndex)&&e.send({type:`validationRejected`,rejections:o.rejections})},[o?.nonce,o,t.teamIndex]),(0,E.useEffect)(()=>{let t=f.current;t&&s&&e.kind===`session`&&t.send({type:`hookFailed`,payload:s.payload})},[s?.nonce,s,e.kind]),(0,V.jsxs)(lm,{"data-surface-state":x?`lost`:h?y?`rendered`:_?`unconfirmed`:`loading`:`loading`,sx:{position:`relative`,width:`100%`,height:`100%`},children:[(0,V.jsx)(lm,{component:`iframe`,ref:d,title:e.identifier,src:`${u}${e.src}?expectedParentOrigin=${encodeURIComponent(window.location.origin)}`,sandbox:HP,allow:UP,sx:{width:`100%`,height:`100%`,border:0,display:`block`}},`${KP(e,t,T)}:${w}`),(!h||w===`host`||!_&&w!==`surface`)&&(0,V.jsx)(my,{spacing:2,"data-testid":`surface-loading`,sx:{alignItems:`center`,justifyContent:`center`,position:`absolute`,inset:0,bgcolor:`background.default`},children:x?(0,V.jsx)(Z,{color:`text.secondary`,children:`This surface did not connect. Check its console for an error.`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(eF,{brand:C,resolved:i}),(0,V.jsxs)(Z,{color:`text.secondary`,variant:`body2`,children:[`Loading `,e.identifier]})]})})]})}function JP(e,t,n){return e!==`facilitator-guide`&&e!==`print-sheets`&&e!==`presentation`?`"${String(e)}" is not a host overlay`:n.available.includes(e)?e===`print-sheets`&&t!==void 0&&n.teamIds!==void 0&&!n.teamIds.includes(String(t))?`There is no team "${String(t)}" to print`:null:`This host does not offer the "${e}" overlay for this game`}async function YP(e,t,n,r={available:[`facilitator-guide`,`print-sheets`,`presentation`]}){if(t.type===`setThemePreference`)return;if(t.type===`openHostOverlay`){let n=JP(t.overlay,t.target,r);n||XP(t.overlay,t.target),QP(e,t,n?{ok:!1,outcome:{kind:`denied`,message:n}}:{ok:!0});return}let i;try{i=await n(t)}catch(e){i={ok:!1,outcome:{kind:`error`,message:e instanceof Error?e.message:`The command failed`}}}if(!i){QP(e,t,{ok:!1,outcome:{kind:`denied`,message:`This host does not handle "${String(t.type)}"`}});return}let a=typeof t.requestId==`string`?t.requestId:null;a&&(`ok`in i?e.send(i.ok?{type:`mutation:response`,requestId:a,ok:!0,...i.committedAtTick===void 0?{}:{committedAtTick:i.committedAtTick}}:{type:`mutation:response`,requestId:a,ok:!1,outcome:i.outcome}):e.send({type:`mutation:response`,requestId:a,ok:!0}))}function XP(e,t){if(e===`facilitator-guide`)return window.open(`/guide`,`_blank`,`noreferrer`),!0;if(e===`print-sheets`){let e=typeof t==`string`?`?team=${encodeURIComponent(t)}`:``;return window.open(`/print${e}`,`_blank`,`noreferrer`),!0}return e===`presentation`&&(window.open(`/presentation`,`_blank`,`noreferrer`),!0)}function ZP(e){if(e.kind===`operator`)return{available:e.overlays??fl(),teamIds:e.state.teams.map(e=>e.teamId)};let t=e.messages.find(e=>e.type===`setAvailableOverlays`),n=e.messages.find(e=>e.type===`setTeamList`);return{available:Array.isArray(t?.overlays)?t.overlays:[],...Array.isArray(n?.payload)?{teamIds:n.payload.map(e=>e.teamId)}:{}}}function QP(e,t,n){typeof t.requestId==`string`&&e.send({type:`mutation:response`,requestId:t.requestId,...n})}function $P(e,t){return t===`dark`?e?.onDark??e?.onLight:e?.onLight??e?.onDark}function eF({brand:e,resolved:t}){let n=$P(e?.loader,t);if(n)return(0,V.jsx)(lm,{component:`img`,src:n,alt:``,sx:{width:72,height:72}});let r=$P(e?.theme.brand?.logo,t),i=e?.theme[t].primary;return(0,V.jsxs)(V.Fragment,{children:[r&&(0,V.jsx)(lm,{component:`img`,src:r,alt:e?.name??``,sx:{maxHeight:48,maxWidth:`min(320px, 80%)`,objectFit:`contain`}}),(0,V.jsx)(sd,{size:28,sx:i?{color:i}:void 0})]})}function tF({scenario:e,surface:t,state:n,mode:r,resolved:i,send:a,onModeChange:o,rejection:s}){let[c,l]=(0,E.useState)(!1),[u,d]=(0,E.useState)(!1),[f,p]=(0,E.useState)(null),[m,h]=(0,E.useState)([]),g=e===``?null:e,_=n.scenarioDrafts?.some(e=>e.scenarioId===g)===!0,[v,y]=(0,E.useState)(null);(0,E.useEffect)(()=>{_||a({type:`editScenario`,scenarioId:g}).then(e=>{`ok`in e&&!e.ok&&y(e.outcome.message??`The scenario could not be opened`)})},[_,g,a]);let b=async()=>{l(!0),p(null),h([]);try{let t=await fetch(`/api/scenarios`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({identifier:e,overwrite:!0,draft:!0})});if(!t.ok){let e=await t.json();p(e.error??`The scenario could not be saved`);return}let n=await t.json();h(n.warnings??[]),d(!0)}finally{l(!1)}};return(0,V.jsxs)(lm,{sx:{display:`flex`,flexDirection:`column`,height:`100vh`},children:[(0,V.jsx)(Fd,{position:`static`,color:`default`,elevation:1,children:(0,V.jsxs)(Cy,{variant:`dense`,sx:{gap:2},children:[(0,V.jsxs)(my,{sx:{flex:1},children:[(0,V.jsx)(Z,{variant:`subtitle2`,children:`Editing scenario`}),(0,V.jsx)(Z,{variant:`caption`,color:`text.secondary`,children:e})]}),u&&!f&&(0,V.jsx)(Z,{variant:`body2`,color:`success.main`,children:`Saved`}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`save-scenario`,disabled:c,onClick:()=>void b(),children:`Save`}),(0,V.jsx)(xm,{href:`/`,children:`Done`})]})}),(f??v)&&(0,V.jsx)(Td,{severity:`error`,sx:{borderRadius:0},children:f??v}),u&&!f&&m.length>0&&(0,V.jsxs)(Td,{severity:`warning`,sx:{borderRadius:0},"data-testid":`save-warnings`,children:[`Saved, with`,` `,m.length===1?`a warning`:`${m.length} warnings`,` worth a look:`,m.map(e=>(0,V.jsx)(`div`,{children:e},e))]}),(0,V.jsx)(lm,{sx:{flex:1,minHeight:0,position:`relative`},children:_?t?(0,V.jsx)(qP,{surface:t,viewer:g===null?{}:{scenario:g},feed:{kind:`operator`,state:n,send:e=>(e.type===`updateScenarioDraft`&&d(!1),a(e))},mode:r,resolved:i,onModeChange:o,rejection:s}):(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4},children:[(0,V.jsxs)(Td,{severity:`info`,sx:{maxWidth:560},children:[(0,V.jsxs)(Z,{gutterBottom:!0,children:[`This game has no `,(0,V.jsx)(`strong`,{children:`scenario_editor`}),` slot.`]}),(0,V.jsxs)(Z,{variant:`body2`,color:`text.secondary`,children:[`A scenario editor is optional (§6.5). Without one there is nothing to author a scenario in here; the values can still be set with`,` `,(0,V.jsx)(`code`,{children:`sdk configure`}),` and captured from the Scenario tab, and an agent can edit a game's settings directly from their schemas.`]})]}),(0,V.jsx)(xm,{href:`/`,children:`Back to the session`})]}):(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`},children:[(0,V.jsx)(sd,{size:28}),(0,V.jsxs)(Z,{color:`text.secondary`,variant:`body2`,children:[`Opening `,e||`the package settings`]})]})})]})}function nF({offered:e,onJoin:t}){let[n,r]=(0,E.useState)(!1),[i,a]=(0,E.useState)(null);return e?(0,V.jsxs)(rF,{children:[(0,V.jsxs)(my,{spacing:1,sx:{alignItems:`center`,maxWidth:420},children:[(0,V.jsx)(Z,{variant:`h5`,children:`Join the session`}),(0,V.jsx)(Z,{color:`text.secondary`,sx:{textAlign:`center`},children:`You will be placed in a team. The dev server picks the one with the fewest participants; another host may choose differently.`})]}),(0,V.jsx)(xm,{variant:`contained`,onClick:()=>{r(!0),a(null),t().then(e=>{e!==null&&(a(e),r(!1))})},disabled:n,"data-testid":`session-join-button`,children:`Join`}),i!==null&&(0,V.jsx)(Z,{color:`error`,children:i})]}):(0,V.jsxs)(rF,{children:[(0,V.jsx)(Z,{variant:`h5`,children:`This session has no session link`}),(0,V.jsxs)(Z,{color:`text.secondary`,sx:{textAlign:`center`,maxWidth:420},children:[`The game sets `,(0,V.jsx)(`code`,{children:`teams.sessionJoin`}),` to false, so people join through their team's own link instead.`]})]})}function rF({children:e}){return(0,V.jsx)(my,{spacing:3,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4,bgcolor:`background.default`},children:e})}var iF={processing:new Set,errors:[],rejection:null,hookFailure:null,reloads:0,restarted:null,restarts:0},aF=new Set([`bundles-reloaded`,`reinitialised-on-change`,`logic-reloaded`]),oF=new Set([`reinitialise`,`reconfigure`,`reset`,`selectScenario`]);function sF(e=`session`){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)(!1),[a,o]=(0,E.useState)(0),[s,c]=(0,E.useState)(iF),l=(0,E.useRef)(null),u=(0,E.useRef)(null),d=(0,E.useRef)(new Map),f=(0,E.useRef)(0);(0,E.useEffect)(()=>{let t=!1,r,a=()=>{let s=e===`walkthrough`?`?run=walkthrough`:``,f=new WebSocket(`${location.protocol===`https:`?`wss`:`ws`}://${location.host}/ws${s}`);l.current=f,f.onopen=()=>{i(!0),o(0),u.current!==null&&f.send(JSON.stringify({presence:u.current}))},f.onclose=()=>{i(!1),o(e=>e+1),t||(r=setTimeout(a,1e3))},f.onmessage=e=>{let t=JSON.parse(e.data);t.type===`result`?(d.current.get(t.requestId)?.(t.result),d.current.delete(t.requestId)):cF(t,n,c)}};return a(),()=>{t=!0,clearTimeout(r),l.current?.close()}},[e]);let p=(0,E.useCallback)(e=>{let t=l.current;if(!t||t.readyState!==WebSocket.OPEN)return Promise.resolve({ok:!1,outcome:{kind:`error`,message:`Not connected to the session`}});let n=`console-${++f.current}`;return new Promise(r=>{d.current.set(n,r),t.send(JSON.stringify({requestId:n,command:e}))})},[]),m=(0,E.useCallback)(e=>{if(u.current===e)return;u.current=e;let t=l.current;t&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify({presence:e}))},[]);return(0,E.useMemo)(()=>({state:t,connected:r,attempts:a,transients:s,send:p,announce:m}),[t,r,a,s,p,m])}function cF(e,t,n){switch(e.type){case`state`:t(e.state),aF.has(e.cause)&&n(t=>({...t,reloads:t.reloads+1,restarted:e.cause===`reinitialised-on-change`?{nonce:(t.restarted?.nonce??0)+1}:t.restarted})),oF.has(e.cause)&&n(e=>({...e,restarts:e.restarts+1}));return;case`round-processing`:n(t=>{let n=new Set(t.processing),r=e.teamIndex??-1;return e.processing?n.add(r):n.delete(r),{...t,processing:n}});return;case`error`:n(t=>({...t,errors:[...t.errors,`${e.source}: ${e.message}`],hookFailure:e.source.startsWith(`hook:`)?{payload:{signal:e.source.slice(5),teamId:e.teamId??``,message:e.message},nonce:(t.hookFailure?.nonce??0)+1}:t.hookFailure}));return;case`validation-rejected`:n(t=>({...t,rejection:{...e.teamIndex===void 0?{}:{teamIndex:e.teamIndex},rejections:e.rejections,nonce:(t.rejection?.nonce??0)+1}}));return}}function lF(){let[e,t]=(0,E.useState)(null),[n,r]=(0,E.useState)(!1),[i,a]=(0,E.useState)(0),[o,s]=(0,E.useState)(null),[c,l]=(0,E.useState)(null),u=(0,E.useRef)(null),d=(0,E.useRef)(new Map),f=(0,E.useRef)(0);(0,E.useEffect)(()=>{let e=!1,n,i=()=>{let o=encodeURIComponent(location.pathname+location.search),c=new WebSocket(`${location.protocol===`https:`?`wss`:`ws`}://${location.host}/ws/view?page=${o}`);u.current=c,c.onopen=()=>{r(!0),a(0)},c.onclose=()=>{r(!1),a(e=>e+1),e||(n=setTimeout(i,1e3))},c.onmessage=e=>{let n=JSON.parse(e.data);switch(n.type){case`view`:(0,Pp.flushSync)(()=>t({page:n.page,messages:n.messages}));return;case`result`:d.current.get(n.requestId)?.(n.result),d.current.delete(n.requestId);return;case`validation-rejected`:s(e=>({rejections:n.rejections,nonce:(e?.nonce??0)+1}));return;case`hookFailed`:l(e=>({payload:n.payload,nonce:(e?.nonce??0)+1}));return}}};return i(),()=>{e=!0,clearTimeout(n),u.current?.close()}},[]);let p=(0,E.useCallback)(e=>{let t=u.current;if(!t||t.readyState!==WebSocket.OPEN)return Promise.resolve({ok:!1,outcome:{kind:`error`,message:`Not connected to the session`}});let n=`view-${++f.current}`;return new Promise(r=>{d.current.set(n,r),t.send(JSON.stringify({requestId:n,message:e}))})},[]);return(0,E.useMemo)(()=>({view:e,connected:n,attempts:i,rejection:o,hookFailure:c,dispatch:p}),[e,n,i,o,c,p])}function uF(e){let t=(0,E.useMemo)(()=>Kc(location.pathname,location.search),[]);return xl(t)?(0,V.jsx)(dF,{...e}):(0,V.jsx)(pF,{...e,route:t})}function dF({mode:e,resolved:t,onModeChange:n}){let{view:r,connected:i,attempts:a,rejection:o,hookFailure:s,dispatch:c}=lF();if(!r)return(0,V.jsx)(SF,{connected:i,attempts:a});let{page:l,messages:u}=r;switch(l.status){case`redirect`:return location.replace(l.href),(0,V.jsx)(SF,{connected:i,attempts:a});case`configuring`:return(0,V.jsx)(fF,{children:`The facilitator is setting the session up. This page opens when it starts.`});case`closed`:return(0,V.jsx)(fF,{children:`This session has already started, so its configuration is closed.`});case`join`:return(0,V.jsx)(JN,{team:l.team??void 0,bare:!0});case`session-join`:return(0,V.jsx)(nF,{offered:l.offered,onJoin:async()=>{let e=await c({type:`joinSession`});return e&&`ok`in e&&!e.ok?`message`in e.outcome?String(e.outcome.message):`The session refused the join`:null}});case`no-such-team`:return(0,V.jsx)(CF,{resolution:{kind:`no-such-team`,teamIndex:l.teamIndex},bare:!0});case`no-such-participant`:return(0,V.jsx)(CF,{resolution:{kind:`no-such-participant`,teamIndex:l.teamIndex,slot:l.slot,held:l.held},bare:!0});case`missing-surface`:return(0,V.jsx)(wF,{kind:l.kind});case`surface`:return(0,V.jsxs)(lm,{sx:{display:`flex`,flexDirection:`column`,height:`100vh`},children:[!i&&(0,V.jsx)(bF,{attempts:a}),l.inSetup&&l.surface.kind===`setup`&&(0,V.jsx)(Fd,{position:`static`,color:`default`,elevation:1,children:(0,V.jsxs)(Cy,{variant:`dense`,sx:{gap:2},children:[(0,V.jsx)(Z,{variant:`subtitle2`,sx:{flex:1},children:`Configure the session, then start it`}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`play`,onClick:()=>void c({type:`requestPlay`}),children:`Play`})]})}),(0,V.jsx)(lm,{sx:{flex:1,minHeight:0,position:`relative`},children:(0,V.jsx)(qP,{surface:l.surface,viewer:l.viewer,feed:{kind:`view`,messages:u,dispatch:c,sessionKey:l.sessionKey},mode:e,resolved:t,onModeChange:n,rejection:o,hookFailure:s})})]})}}function fF({children:e}){return(0,V.jsx)(my,{sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},children:(0,V.jsx)(Td,{severity:`info`,sx:{maxWidth:560},"data-testid":`view-notice`,children:(0,V.jsx)(Z,{children:e})})})}function pF({mode:e,resolved:t,onModeChange:n,route:r}){let{state:i,connected:a,attempts:o,transients:s,send:c,announce:l}=sF(r.run),[u,d]=(0,E.useState)(null),[f,p]=(0,E.useState)([`print-sheets`]);(0,E.useEffect)(()=>{fetch(Gc(`/api/surfaces`,location.search)).then(e=>e.json()).then(d)},[s.reloads]);let[m,h]=(0,E.useState)([]),[g,_]=(0,E.useState)(null),v=async()=>{let e=await c({type:`play`});`ok`in e&&(e.ok?_(e.warnings?.length?{severity:`warning`,lines:e.warnings}:null):_({severity:`error`,lines:(e.outcome.message??`The session could not start`).split(`
207
- `)}))};(0,E.useEffect)(()=>{fetch(`/api/session`).then(e=>e.json()).then(e=>h(e.warnings??[]))},[s.reloads,s.restarts]);let y=m.filter(e=>e.build),b=m.filter(e=>hF.has(e.code??``)),[x,S]=(0,E.useState)(!1);(0,E.useEffect)(()=>{s.restarted&&S(!0)},[s.restarted]),(0,E.useEffect)(()=>{fetch(`/api/overlays`).then(e=>e.json()).then(e=>p(e.overlays))},[s.reloads]);let C=i&&r.kind===`player`?(()=>{let e=vl(i,r);return e.kind===`viewer`?e.viewer.participantId??null:null})():null;if((0,E.useEffect)(()=>l(C),[l,C]),!i||!u)return(0,V.jsx)(SF,{connected:a,attempts:o});let w=u.some(e=>e.kind===`setup`),T=i.session.inSetup,D=r.kind===`guide`||r.kind===`print`||r.kind===`scenario-editor`||r.kind===`presentation`||r.kind===`session-join`,O=T&&!D?{...r,kind:`setup`}:r;if(!T&&O.kind===`setup`)return(0,V.jsx)(yF,{configurable:w,onReconfigure:()=>void c({type:`reconfigure`})});if(O.kind===`scenario-editor`)return O.scenario===void 0?(0,V.jsx)(xF,{}):(0,V.jsx)(tF,{scenario:O.scenario,surface:u.find(e=>e.kind===`scenario-editor`),state:i,mode:e,resolved:t,send:c,onModeChange:n,rejection:s.rejection});if(O.kind===`session-join`)return location.replace(qc({kind:`session-join`,bare:!0})),(0,V.jsx)(SF,{connected:a,attempts:o});if(O.kind===`join`){let e=i.teams.find(e=>e.index===O.teamIndex);return e?.participants.length===1?(location.replace(qc({kind:`player`,teamIndex:e.index,participant:1,bare:O.bare})),(0,V.jsx)(SF,{connected:a,attempts:o})):(0,V.jsx)(JN,{team:e,bare:O.bare})}let k=vl(i,O);if(k.kind!==`viewer`)return(0,V.jsx)(CF,{resolution:k,bare:O.bare,onAddParticipant:()=>void c({type:`addParticipant`,teamId:`team-${k.teamIndex+1}`})});let A=i.session.waitingRoomOpen&&(O.kind===`player`||O.kind===`waiting-room`)?`waiting-room`:yl[O.kind],j=A?u.find(e=>e.kind===A):void 0;return(0,V.jsxs)(lm,{sx:{display:`flex`,flexDirection:`column`,height:`100vh`},children:[!a&&(0,V.jsx)(bF,{attempts:o}),Lc(i.session.pending)&&!O.bare&&(0,V.jsx)(mF,{pending:i.session.pending,onReinitialise:()=>void c({type:`reset`})}),y.length>0&&!O.bare&&(0,V.jsx)(_F,{errors:y}),b.length>0&&!O.bare&&(0,V.jsx)(vF,{notices:b}),T&&(0,V.jsx)(Fd,{position:`static`,color:`default`,elevation:1,children:(0,V.jsxs)(Cy,{variant:`dense`,sx:{gap:2},children:[(0,V.jsx)(Z,{variant:`subtitle2`,sx:{flex:1},children:`Configure the session, then start it`}),(0,V.jsx)(gF,{locale:i.session.locale}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`play`,onClick:()=>void v(),children:`Play`})]})}),g&&!O.bare&&(0,V.jsx)(Td,{severity:g.severity,sx:{borderRadius:0,whiteSpace:`pre-line`},"data-testid":`play-report`,onClose:()=>_(null),children:g.lines.join(`
208
- `)}),(0,V.jsx)(lm,{sx:{flex:1,minHeight:0,position:`relative`},children:O.kind===`guide`?(0,V.jsx)(qN,{locale:i.session.locale,reloads:s.reloads}):O.kind===`print`?(0,V.jsx)(XN,{state:i}):j?(0,V.jsx)(qP,{surface:j,viewer:k.viewer,feed:{kind:`operator`,state:i,overlays:f,...O.kind===`presentation`?{sessionless:O.preview===!0}:{},roundProcessing:s.processing.has(-1)||k.viewer.teamIndex!==void 0&&s.processing.has(k.viewer.teamIndex),send:c},mode:e,resolved:t,onModeChange:n,rejection:s.rejection,hookFailure:s.hookFailure}):(0,V.jsx)(wF,{kind:A??`session`})}),!O.bare&&(0,V.jsx)(jb,{state:i,route:O,inSetup:T,configurable:w,connected:a,transients:s,mode:e,onModeChange:n,send:c}),(0,V.jsx)(ty,{open:x,autoHideDuration:4e3,onClose:()=>S(!1),anchorOrigin:{vertical:`top`,horizontal:`center`},children:(0,V.jsx)(Td,{severity:`info`,"data-testid":`restarted-notice`,children:`Settings changed, game restarted`})})]})}function mF({pending:e,onReinitialise:t}){return(0,V.jsxs)(Td,{severity:`warning`,square:!0,"data-testid":`pending-changes`,sx:{borderRadius:0,py:.25},action:(0,V.jsx)(xm,{size:`small`,color:`inherit`,"data-testid":`reinitialise`,onClick:t,children:`Re-initialise`}),children:[(0,V.jsx)(`strong`,{children:Rc(e)}),`. `,zc(e),`. Re-initialising returns play to tick 0.`]})}var hF=new Set([`RELOAD_FAILED`,`CAPABILITY_SEEDED`]);function gF({locale:e}){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)(!1);return(0,E.useEffect)(()=>{fetch(`/api/setup/notes?locale=${encodeURIComponent(e)}`).then(e=>e.json()).then(e=>n(e.notes)).catch(()=>n(null))},[e]),t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(xm,{size:`small`,"data-testid":`setup-notes-toggle`,onClick:()=>i(!r),children:r?`Hide notes for assistants`:`Notes for assistants`}),(0,V.jsxs)(vh,{open:r,onClose:()=>i(!1),fullWidth:!0,maxWidth:`md`,children:[(0,V.jsxs)(jh,{children:[`Setup notes for assistants (`,t.locale,`)`]}),(0,V.jsx)(Oh,{children:(0,V.jsx)(Z,{component:`pre`,"data-testid":`setup-notes`,sx:{whiteSpace:`pre-wrap`,fontFamily:`monospace`,fontSize:13},children:t.markdown})})]})]}):null}function _F({errors:e}){return(0,V.jsxs)(Td,{severity:`error`,square:!0,"data-testid":`build-errors`,sx:{borderRadius:0,py:.25},children:[(0,V.jsxs)(`strong`,{children:["`sdk build` would refuse this package (",e.length===1?`one error`:`${e.length} errors`,`)`]}),`. It runs here anyway, so it can be fixed while you watch.`,e.map((e,t)=>(0,V.jsx)(Z,{variant:`body2`,sx:{fontFamily:`monospace`},children:e.message},t))]})}function vF({notices:e}){return(0,V.jsx)(Td,{severity:`warning`,square:!0,"data-testid":`package-notices`,sx:{borderRadius:0,py:.25},children:e.map((e,t)=>(0,V.jsx)(Z,{variant:`body2`,children:e.message},t))})}function yF({configurable:e,onReconfigure:t}){return(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},children:[(0,V.jsxs)(Td,{severity:`info`,sx:{maxWidth:560},children:[(0,V.jsx)(Z,{gutterBottom:!0,children:`This session has already started.`}),(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:e?`Settings are resolved when a session initialises, so changing them now would change nothing until the session starts again. Reconfiguring puts the session back to its setup step and returns every team to tick 0.`:`This game has no setup step.`})]}),(0,V.jsxs)(my,{direction:`row`,spacing:1,children:[e&&(0,V.jsx)(xm,{variant:`contained`,"data-testid":`reconfigure`,onClick:t,children:`Reconfigure`}),(0,V.jsx)(xm,{href:`/`,children:`Back to the session`})]})]})}function bF({attempts:e}){return(0,V.jsxs)(Td,{severity:`warning`,square:!0,"data-testid":`disconnected`,sx:{borderRadius:0,py:.25},action:(0,V.jsx)(xm,{size:`small`,color:`inherit`,onClick:()=>location.reload(),children:`Reload`}),children:[`Disconnected from the session — nothing on this page is live.`,e>1?` Retrying (${e}).`:` Retrying…`]})}function xF(){return(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},children:[(0,V.jsxs)(Td,{severity:`info`,sx:{maxWidth:560},children:[(0,V.jsx)(Z,{gutterBottom:!0,children:`The scenario editor opens on a scenario.`}),(0,V.jsxs)(Z,{variant:`body2`,color:`text.secondary`,children:[`Open the dev drawer (press `,(0,V.jsx)(`kbd`,{children:"`"}),`) and use the Scenario tab:`,` `,(0,V.jsx)(`strong`,{children:`Add scenario`}),` to start a new one, or `,(0,V.jsx)(`strong`,{children:`Edit`}),` on an existing one. An editor with no scenario behind it has nowhere to save what you do in it.`]})]}),(0,V.jsx)(xm,{href:`/`,children:`Back to the session`})]})}function SF({connected:e,attempts:t}){let n=!e&&t>=2,r=$o().palette.mode===`dark`;return(0,V.jsxs)(my,{spacing:2,"data-testid":`console-loading`,sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},children:[(0,V.jsx)(lm,{component:`img`,src:r?Qy:$y,alt:`Serious Gaming`,sx:{width:72,height:72}}),!n&&(0,V.jsx)(Z,{color:`text.secondary`,children:e?`Loading the session…`:`Connecting to the session…`}),n&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(Td,{severity:`warning`,sx:{maxWidth:620},children:[(0,V.jsxs)(Z,{gutterBottom:!0,children:[`Nothing is answering at`,` `,(0,V.jsxs)(`code`,{children:[location.host,`/ws`]}),`.`]}),(0,V.jsxs)(Z,{variant:`body2`,color:`text.secondary`,component:`div`,children:[`This page loaded, so something is serving it — most likely an older dev server still holding this port. Check two things:`,(0,V.jsxs)(`ul`,{style:{marginBottom:0},children:[(0,V.jsxs)(`li`,{children:[`The address your server actually printed.`,location.port&&(0,V.jsxs)(V.Fragment,{children:[` `,`A port already in use makes it move to the next one, so it may be on `,(0,V.jsx)(`code`,{children:Number(location.port)+1})]})]}),(0,V.jsxs)(`li`,{children:[`Whether an old one is still running:`,` `,(0,V.jsx)(`code`,{children:`pnpm run sdk dev status`}),`, and`,` `,(0,V.jsx)(`code`,{children:`pnpm run sdk dev stop`}),` to end it`]})]})]})]}),(0,V.jsx)(xm,{variant:`outlined`,onClick:()=>location.reload(),children:`Try again`})]})]})}function CF({resolution:e,bare:t,onAddParticipant:n}){let r=e.teamIndex+1;return(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},"data-testid":`no-such-participant`,children:[(0,V.jsx)(Td,{severity:`warning`,sx:{maxWidth:560},children:e.kind===`no-such-team`?(0,V.jsxs)(Z,{gutterBottom:!0,children:[`This session has no team `,r,`. It may have been removed.`]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(Z,{gutterBottom:!0,children:[`Team `,r,` has`,` `,e.held===0?`no participants`:e.held===1?`one participant`:`${e.held} participants`,`, and this URL asks for participant `,e.slot,`.`]}),(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`A second tab is not a second participant. Add one, then open their surface: a participant is who a write is attributed to, and a surface with nobody behind it cannot submit one.`})]})}),e.kind===`no-such-participant`&&n&&(0,V.jsx)(xm,{variant:`contained`,onClick:n,"data-testid":`add-participant`,children:`Add participant`}),(0,V.jsxs)(xm,{size:`small`,href:qc({kind:`observer`,teamIndex:e.teamIndex,bare:t}),children:[`Watch team `,r,` without joining`]})]})}function wF({kind:e}){return(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4},children:[(0,V.jsxs)(Td,{severity:`info`,sx:{maxWidth:560},children:[(0,V.jsxs)(Z,{gutterBottom:!0,children:[`This package wires no `,(0,V.jsx)(`strong`,{children:e}),` surface.`]}),(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`A game supplies its own facilitator and player surfaces; the dev server renders them rather than substituting a console of its own, so there is nothing to show until the package fills that slot.`})]}),(0,V.jsx)(xm,{href:`/`,size:`small`,children:`Back to the session`})]})}function TF(){let[e,t]=(0,E.useState)(()=>ub(location.search,sb(`sessionStorage`),sb(`localStorage`)));(0,E.useEffect)(()=>{if(window.parent===window)return;let e=e=>{if(e.source!==window.parent)return;let n=pb(e.data);n&&(db(sb(`sessionStorage`),n),t(n))};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]);let n=zP(e),r=(0,E.useMemo)(()=>RP(n),[n]);return(0,V.jsxs)(Ac,{theme:r,children:[(0,V.jsx)(ds,{}),(0,V.jsx)(xb,{children:(0,V.jsx)(Ob,{children:(0,V.jsx)(uF,{mode:e,resolved:n,onModeChange:e=>{fb(sb(`sessionStorage`),sb(`localStorage`),e),t(e)}})})})]})}(0,Ic.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(E.StrictMode,{children:(0,V.jsx)(TF,{})}));
205
+ `}),n}function kN(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function AN(e,t){let n=wN(e,t),r=n.one(e,void 0),i=xN(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
206
+ `},i)),a}function jN(e,t){return e&&`run`in e?async function(n,r){let i=AN(n,{file:r,...t});await e.run(i,r)}:function(n,r){return AN(n,{file:r,...e||t})}}var MN=[],NN={allowDangerousHtml:!0},PN=/^(https?|ircs?|mailto|xmpp)$/i,FN=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function IN(e){let t=LN(e),n=RN(e);return zN(t.runSync(t.parse(n),n),e)}function LN(e){let t=e.rehypePlugins||MN,n=e.remarkPlugins||MN,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...NN}:NN;return Yk().use(bk).use(n).use(jN,r).use(t)}function RN(e){let t=e.children||``,n=new Vk;return typeof t==`string`?n.value=t:``+t,n}function zN(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||BN;for(let e of FN)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Jw(e,l),rM(e,{Fragment:V.Fragment,components:i,ignoreInvalidStyle:!0,jsx:V.jsx,jsxs:V.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in EM)if(Object.hasOwn(EM,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=EM[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function BN(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||PN.test(e.slice(0,t))?e:``}var VN={note:{label:`Note`,palette:`info`,icon:(0,V.jsx)(IA,{fontSize:`small`})},warning:{label:`Warning`,palette:`warning`,icon:(0,V.jsx)(VA,{fontSize:`small`})},tip:{label:`Tip`,palette:`success`,icon:(0,V.jsx)(LA,{fontSize:`small`})},say:{label:`Say`,palette:`primary`,icon:(0,V.jsx)(RA,{fontSize:`small`})},do:{label:`Do`,palette:`secondary`,icon:(0,V.jsx)(zA,{fontSize:`small`})},timing:{label:`Timing`,palette:`info`,icon:(0,V.jsx)(BA,{fontSize:`small`})}};function HN({type:e,children:t}){let n=VN[e];return(0,V.jsxs)(lm,{sx:e=>({my:2,px:2,py:1.5,borderLeft:3,borderColor:`${n.palette}.main`,borderRadius:1,bgcolor:gi(e.palette[n.palette].main,.08),"& p:first-of-type":{mt:0},"& p:last-of-type":{mb:0}}),"data-testid":`guide-admonition-${e}`,children:[(0,V.jsxs)(Z,{variant:`overline`,component:`p`,sx:{display:`flex`,alignItems:`center`,gap:.75,fontWeight:600,lineHeight:1.5,mb:.5,color:`${n.palette}.main`},children:[n.icon,n.label]}),t]})}function UN(e){return`/api/guide/assets/${e.split(`/`).map(encodeURIComponent).join(`/`)}`}function WN({body:e,locale:t}){let n=PA(e);return n.ok?n.kind===`file`?(0,V.jsxs)(lm,{component:`figure`,sx:{my:2,mx:0,maxWidth:720},"data-testid":`guide-video-file`,children:[(0,V.jsxs)(lm,{component:`video`,controls:!0,preload:`metadata`,playsInline:!0,src:UN(n.src),poster:n.poster?UN(n.poster):void 0,"aria-label":n.title,sx:{display:`block`,width:`100%`,"@media print":{display:`none`}},children:[n.captions&&(0,V.jsx)(`track`,{kind:`captions`,src:UN(n.captions),srcLang:t,label:t,default:!0}),n.title]}),(0,V.jsxs)(lm,{sx:{display:`none`,"@media print":{display:`block`}},children:[n.poster&&(0,V.jsx)(lm,{component:`img`,src:UN(n.poster),alt:``,sx:{display:`block`,maxWidth:`100%`}}),n.title&&(0,V.jsx)(Z,{component:`figcaption`,variant:`body2`,children:n.title})]})]}):(0,V.jsx)(lm,{sx:{my:2,position:`relative`,aspectRatio:`16 / 9`,maxWidth:720},"data-testid":`guide-video-embed`,children:(0,V.jsx)(lm,{component:`iframe`,src:n.embedUrl,title:`${n.provider} video`,sandbox:`allow-scripts allow-same-origin allow-presentation`,allow:`encrypted-media; fullscreen; picture-in-picture`,referrerPolicy:`strict-origin-when-cross-origin`,sx:{position:`absolute`,inset:0,width:`100%`,height:`100%`,border:0}})}):(0,V.jsxs)(Td,{severity:`error`,sx:{my:2},"data-testid":`guide-video-error`,children:[`Video block error: `,n.error]})}function GN(e){return e.children.map(e=>e.type===`text`?e.value:e.type===`element`?GN(e):``).join(``)}function KN({markdown:e,chapterFile:t,locale:n,settings:r}){return(0,V.jsx)(IN,{remarkPlugins:[jO,aC,[vA,{settings:r,locale:n}],sA,cA,[wA,{chapterFile:t}]],urlTransform:e=>{let r=BN(e);if(!r)return;if(/^[a-z][a-z0-9+.-]*:/i.test(r)||r.startsWith(`//`)||r.startsWith(`#`)||r.startsWith(`/`))return r;let i=new URL(`/api/guide/content/${n}/${t}`,window.location.origin),a=new URL(r,i);if(a.origin===window.location.origin&&a.pathname.startsWith(`/api/guide/`))return a.pathname+a.search},components:{pre({node:e,children:t,...r}){let i=e?.children[0];return i&&i.type===`element`&&i.tagName===`code`&&Array.isArray(i.properties?.className)&&i.properties.className.includes(`language-video`)?(0,V.jsx)(WN,{body:GN(i),locale:n}):(0,V.jsx)(`pre`,{...r,children:t})},span(e){let{node:t,children:n,...r}=e;return typeof r[`data-guide-error`]==`string`?(0,V.jsx)(lm,{component:`span`,"data-testid":`guide-setting-error`,sx:{color:`error.main`,fontStyle:`italic`},children:n}):(0,V.jsx)(`span`,{...r,children:n})},div(e){let{node:t,children:n,...r}=e,i=r;if(typeof i[`data-guide-error`]==`string`)return(0,V.jsx)(Td,{severity:`error`,sx:{my:2},"data-testid":`guide-setting-error`,children:n});let a=i[`data-admonition`];if(typeof a==`string`&&oA(a))return(0,V.jsx)(HN,{type:a,children:n});let o=i[`data-admonition-unknown`];return typeof o==`string`?(0,V.jsxs)(Td,{severity:`error`,sx:{my:2},"data-testid":`guide-admonition-unknown`,children:[`Unknown admonition type ":::`,o,`"`]}):(0,V.jsx)(`div`,{...e})},a({node:e,children:t,href:n,...r}){let i=typeof n==`string`&&/^https?:\/\//.test(n);return(0,V.jsx)(`a`,{href:n,...r,...i?{target:`_blank`,rel:`noreferrer noopener`}:{},children:t})}},children:e})}function qN(e){let t=e.replace(/\.md$/,``).replace(/^\d+[-_. ]*/,``).replace(/[-_]+/g,` `).trim();return t.charAt(0).toUpperCase()+t.slice(1)}function JN({locale:e,reloads:t}){let n=new URLSearchParams(window.location.search),[r,i]=(0,E.useState)(void 0),[a,o]=(0,E.useState)(n.get(`locale`)??e),[s,c]=(0,E.useState)(n.get(`chapter`)),[l,u]=(0,E.useState)(``);(0,E.useEffect)(()=>{fetch(`/api/guide`).then(e=>e.json()).then(e=>i(e.guide))},[t]);let d=(0,E.useMemo)(()=>Object.keys(r?.locales??{}),[r]),f=(0,E.useMemo)(()=>r?cx(r.locales,r.chapters,a):[],[r,a]),p=(0,E.useMemo)(()=>f.map(e=>e.file),[f]),m=f.find(e=>e.file===s)?.locale??a;(0,E.useEffect)(()=>{if(r){if(p.length===0)return c(null);s&&p.includes(s)||c(p[0])}},[r,p,s]),(0,E.useEffect)(()=>{if(!r||!s)return u(``);let e=!0;return fetch(`/api/guide/content/${encodeURIComponent(m)}/${encodeURIComponent(s)}`).then(e=>e.ok?e.text():`This chapter could not be read.`).then(t=>{e&&u(t)}),()=>{e=!1}},[r,m,s,t]);let h=(0,E.useMemo)(()=>s&&l&&r?TA(s,l,{settings:r.settings,locale:m}):[],[s,l,r,m]);return r===void 0?(0,V.jsx)(my,{sx:{alignItems:`center`,justifyContent:`center`,height:`100%`},children:(0,V.jsx)(sd,{size:28})}):r===null?(0,V.jsx)(my,{sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4},children:(0,V.jsx)(Z,{color:`text.secondary`,children:`This package declares no facilitator guide, or none of its chapters applies to this session.`})}):(0,V.jsxs)(my,{direction:`row`,sx:{height:`100%`},children:[(0,V.jsxs)(lm,{sx:{width:280,borderRight:1,borderColor:`divider`,overflow:`auto`,"@media print":{display:`none`}},children:[d.length>1&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(lm,{sx:{p:2},children:(0,V.jsx)(Wv,{size:`small`,fullWidth:!0,value:d.includes(a)?a:d[0]??``,onChange:e=>o(e.target.value),children:d.map(e=>(0,V.jsx)(rv,{value:e,children:r.locales[e]?.name??e},e))})}),(0,V.jsx)(Lh,{})]}),(0,V.jsxs)(Hg,{dense:!0,children:[p.map(e=>(0,V.jsx)(Kg,{selected:e===s,onClick:()=>c(e),children:(0,V.jsx)(Qg,{primary:qN(e)})},e)),p.length===0&&(0,V.jsx)(lm,{sx:{px:2,py:1},children:(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`This guide has no chapters yet.`})})]}),h.some(e=>e.depth>1)&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Lh,{}),(0,V.jsx)(Z,{variant:`overline`,color:`text.secondary`,sx:{display:`block`,px:2,pt:1.5},children:`On this page`}),(0,V.jsx)(Hg,{dense:!0,disablePadding:!0,sx:{pb:2},children:h.filter(e=>e.depth>1).map(e=>(0,V.jsx)(Kg,{dense:!0,sx:{pl:2+(e.depth-2)*1.5,py:.25},onClick:()=>document.getElementById(e.id)?.scrollIntoView({block:`start`}),children:(0,V.jsx)(Qg,{primary:e.text,slotProps:{primary:{variant:`body2`,color:`text.secondary`}}})},e.id))})]})]}),(0,V.jsx)(lm,{sx:{flex:1,minWidth:0,overflow:`auto`},children:(0,V.jsxs)(lm,{"data-testid":`guide-content`,sx:{maxWidth:780,mx:`auto`,px:4,py:3,"& img":{maxWidth:`100%`},"& pre":{p:2,borderRadius:1,overflow:`auto`,bgcolor:`action.hover`},"& table":{borderCollapse:`collapse`,width:`100%`},"& th, & td":{border:1,borderColor:`divider`,px:1,py:.5},"& h1, & h2, & h3":{scrollMarginTop:16},"@media print":{maxWidth:`none`,px:0,py:0}},children:[s&&m!==a&&(0,V.jsxs)(Td,{severity:`info`,"data-testid":`guide-untranslated`,sx:{mb:2,"@media print":{display:`none`}},children:[`This chapter is not yet translated into`,` `,r.locales[a]?.name??a,`, so it is shown in`,` `,r.locales[m]?.name??m,`.`]}),s&&(0,V.jsx)(KN,{markdown:l,chapterFile:s,locale:m,settings:r.settings})]})})]})}function YN({team:e,bare:t}){return e?e.participants.length===0?(0,V.jsxs)(XN,{children:[(0,V.jsxs)(my,{spacing:1,sx:{alignItems:`center`,maxWidth:420},children:[(0,V.jsx)(Z,{variant:`overline`,color:`text.secondary`,children:e.name}),(0,V.jsx)(Z,{variant:`h5`,children:`Nobody is on this team yet`}),(0,V.jsxs)(Z,{color:`text.secondary`,sx:{textAlign:`center`},children:[`Add a participant from the dev drawer, or with`,` `,(0,V.jsxs)(`code`,{children:[`sdk participant add --team `,e.index+1]}),`, and they will be listed here.`]})]}),(0,V.jsx)(xm,{size:`small`,href:qc({kind:`observer`,teamIndex:e.index,bare:t}),children:`Watch without joining`})]}):(0,V.jsxs)(XN,{children:[(0,V.jsxs)(my,{spacing:1,sx:{alignItems:`center`},children:[(0,V.jsx)(Z,{variant:`overline`,color:`text.secondary`,children:e.name}),(0,V.jsx)(Z,{variant:`h5`,children:`Who are you?`})]}),(0,V.jsx)(my,{spacing:1.5,sx:{width:`100%`,maxWidth:420},children:e.participants.map((n,r)=>(0,V.jsx)(Tm,{variant:`outlined`,"data-testid":`join-participant`,children:(0,V.jsxs)(jm,{href:qc({kind:`player`,teamIndex:e.index,participant:r+1,bare:t}),sx:{p:2},children:[(0,V.jsx)(Z,{variant:`subtitle1`,children:n.name}),(0,V.jsxs)(Z,{variant:`body2`,color:`text.secondary`,children:[`Participant `,r+1]})]})},n.id))}),(0,V.jsx)(xm,{size:`small`,href:qc({kind:`observer`,teamIndex:e.index,bare:t}),children:`Watch without joining`})]}):(0,V.jsxs)(XN,{children:[(0,V.jsx)(Z,{color:`text.secondary`,children:`This session has no such team. It may have been removed.`}),(0,V.jsx)(xm,{href:`/`,children:`Back to the session`})]})}function XN({children:e}){return(0,V.jsx)(my,{spacing:3,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4,bgcolor:`background.default`},children:(0,V.jsx)(lm,{sx:{display:`contents`},children:e})})}function ZN({state:e}){let t=new URLSearchParams(window.location.search).get(`team`),n=t?e.teams.filter(e=>e.teamId===t):e.teams;return(0,E.useEffect)(()=>{let t=document.title;return document.title=`${e.game.name} — team sheets`,()=>{document.title=t}},[e.game.name]),(0,V.jsxs)(lm,{"data-testid":`print-sheets`,sx:{height:`100%`,overflow:`auto`,bgcolor:`background.default`,"@media print":{height:`auto`,overflow:`visible`}},children:[(0,V.jsxs)(my,{direction:`row`,spacing:2,sx:{alignItems:`center`,p:2,"@media print":{display:`none`}},children:[(0,V.jsx)(Z,{variant:`h6`,sx:{flex:1},children:`Team sheets`}),(0,V.jsx)(xm,{variant:`contained`,onClick:()=>window.print(),children:`Print`})]}),n.map(t=>(0,V.jsxs)(lm,{sx:{m:2,p:4,bgcolor:`background.paper`,border:1,borderColor:`divider`,borderRadius:1,"@media print":{breakAfter:`page`,breakInside:`avoid`,border:0,m:0}},children:[(0,V.jsx)(Z,{variant:`overline`,color:`text.secondary`,children:e.game.name}),(0,V.jsx)(Z,{variant:`h3`,gutterBottom:!0,children:t.name}),(0,V.jsx)(Lh,{sx:{my:2}}),(0,V.jsx)(Z,{variant:`subtitle2`,gutterBottom:!0,children:`Open your screen at`}),(0,V.jsx)(Z,{sx:{fontFamily:`monospace`,fontSize:18,mb:3,wordBreak:`break-all`},children:`${window.location.origin}${qc({kind:`player`,teamIndex:t.index,participant:1})}`}),(0,V.jsx)(Z,{variant:`subtitle2`,gutterBottom:!0,children:`On this team`}),(0,V.jsxs)(my,{spacing:.5,children:[t.participants.map((e,n)=>(0,V.jsxs)(Z,{children:[n+1,`. `,e.name,(0,V.jsx)(Z,{component:`span`,variant:`caption`,color:`text.secondary`,sx:{ml:1,fontFamily:`monospace`},children:qc({kind:`player`,teamIndex:t.index,participant:n+1})})]},e.id)),t.participants.length===0&&(0,V.jsx)(Z,{color:`text.secondary`,children:`Nobody yet.`})]})]},t.teamId))]})}var QN={game:new Set([`updateData`,`requestTick`,`renameOwnTeam`,`renameSelf`]),"waiting-room":new Set([`updateData`,`requestTick`,`renameOwnTeam`,`renameSelf`]),session:new Set([`updateSessionData`,`updateSharedData`,`requestTick`,`undoTick`,`resetGame`,`resetWalkthrough`,`setWaitingRoom`,`setLocale`,`createTeam`,`renameTeam`,`renameParticipant`,`moveParticipant`,`deleteTeam`,`pauseTimer`,`resumeTimer`,`extendTick`]),setup:new Set([`updateSettings`,`requestPlay`]),"scenario-editor":new Set([`updateSettings`]),presentation:new Set},$N={setWaitingRoom:`The waiting room is session-wide, so setWaitingRoom takes no teamId`,renameOwnTeam:`renameOwnTeam renames the caller's own team, which the host resolves; it takes no teamId`,resetWalkthrough:`A walkthrough holds one team, so resetWalkthrough takes no teamId`,setLocale:`The locale is the session's, so setLocale takes no teamId`,renameSelf:`renameSelf renames the caller, whom the host resolves; it takes no teamId`},eP={game:new Set([`callEndpoint`,`getPastState`,`getAllTeamsParticipants`,`getBenchmark`,`getAssessment`]),"waiting-room":new Set([`callEndpoint`,`getPastState`,`getAllTeamsParticipants`,`getBenchmark`,`getAssessment`]),session:new Set([`callEndpoint`,`getPastState`,`getBenchmark`,`getAssessment`]),setup:new Set([`callEndpoint`]),"scenario-editor":new Set([`callEndpoint`]),presentation:new Set([`getPastState`,`getBenchmark`,`getAssessment`])},tP=new Set([`game`,`waiting-room`]);function nP(e){return e.teamIndex===void 0?{}:{teamIndex:e.teamIndex}}function rP(e){return e.participantId===void 0?{}:{participantId:e.participantId,teamId:`team-${(e.teamIndex??0)+1}`}}function iP(e){return e.role===void 0?{}:{viewerRole:e.role}}function aP(e){return{...nP(e),...rP(e),...iP(e)}}function oP(e){let t=typeof e==`string`?/^team-([1-9]\d*)$/.exec(e):null;return t?Number(t[1])-1:-1}function sP(e,t){return e.teamId===void 0?t:{teamIndex:oP(e.teamId)}}function cP(e){return typeof e==`object`&&!!e&&`refused`in e}function lP(e,t,n){if(!QN[t.kind].has(e.type))return null;if(e.teamId!==void 0&&e.type in $N)return{refused:$N[e.type]};if(e.type===`renameSelf`&&e.participantId!==void 0)return{refused:`renameSelf renames the caller, whom the host resolves; it takes no participantId`};let r=nP(n),i=rP(n),a=iP(n);switch(e.type){case`updateData`:return{type:`updateContext`,uiIdentifier:t.identifier,payload:e.payload,...e.deletes?{deletes:e.deletes}:{},...r,...i,...a};case`updateSessionData`:return{type:`updateContext`,payload:e.payload,teamIndex:oP(e.teamId),sessionUiIdentifier:t.identifier,...e.deletes?{deletes:e.deletes}:{}};case`updateSharedData`:return{type:`updateSharedContext`,uiIdentifier:t.identifier,payload:e.payload,...e.deletes?{deletes:e.deletes}:{}};case`updateSettings`:return t.kind===`scenario-editor`?{type:`updateScenarioDraft`,scenarioId:n.scenario??null,payload:e.payload,uiIdentifier:t.identifier}:{type:`updateSettings`,payload:e.payload,uiIdentifier:t.identifier};case`requestTick`:return{type:`tick`,...sP(e,r),...t.kind===`session`?{}:{...i,...a}};case`undoTick`:return{type:`undo`,...sP(e,r)};case`resetGame`:return{type:`reset`,...sP(e,{})};case`setWaitingRoom`:return{type:`setWaitingRoom`,open:e.open===!0};case`setLocale`:return{type:`setLocale`,locale:String(e.locale)};case`resetWalkthrough`:return{type:`resetWalkthrough`};case`createTeam`:return{type:`addTeam`,...typeof e.name==`string`?{name:e.name}:{}};case`renameTeam`:return{type:`renameTeam`,teamId:String(e.teamId),name:String(e.name)};case`renameOwnTeam`:return{type:`renameOwnTeam`,name:String(e.name),...i};case`renameSelf`:return{type:`renameSelf`,name:String(e.name),...i};case`renameParticipant`:return{type:`renameParticipant`,participantId:String(e.participantId),name:String(e.name)};case`moveParticipant`:return{type:`moveParticipant`,participantId:String(e.participantId),teamId:String(e.teamId)};case`deleteTeam`:return{type:`removeTeam`,teamIndex:oP(e.teamId)};case`requestPlay`:return{type:`play`};case`pauseTimer`:return{type:`pauseTimer`,...sP(e,r)};case`resumeTimer`:return{type:`resumeTimer`,...sP(e,r)};case`extendTick`:return{type:`extendTick`,byMs:Number(e.byMs??0),...sP(e,r)};default:return null}}function uP(e,t,n,{sessionless:r=!1}={}){if(!eP[t.kind].has(e.type))return null;switch(e.type){case`callEndpoint`:return{type:`callEndpoint`,endpointIdentifier:String(e.endpointIdentifier),request:e.request,uiIdentifier:t.identifier,...aP(n),...t.kind===`scenario-editor`?{scenarioId:n.scenario??null}:{}};case`getPastState`:return{type:`getPastState`,query:e.query,uiIdentifier:t.identifier,...n.teamIndex===void 0?{}:{teamId:`team-${n.teamIndex+1}`}};case`getAllTeamsParticipants`:return{type:`getAllTeamsParticipants`,uiIdentifier:t.identifier};case`getBenchmark`:return{type:`getBenchmark`,identifier:String(e.identifier),where:Array.isArray(e.where)?e.where:[]};case`getAssessment`:return r?{refused:`A presentation shown without a session has no results to read`}:{type:`getAssessment`,identifier:String(e.identifier),...tP.has(t.kind)?{audience:`own`,...rP(n),...iP(n),...n.teamIndex===void 0?{}:{teamId:`team-${n.teamIndex+1}`}}:{audience:`all`}};default:return null}}var dP={game:{required:[`stateChanged`,`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`,`setParticipant`],alsoSent:[`setTimer`,`setViewerRole`,`setOwnTeam`,`setOwnTeamJoinLink`,`setParticipantList`,`setTeamList`,`setRunKind`,`setScenarioName`,`setRoundProcessing`,`setCrossTeamData`,`themePreferenceChanged`],isPlayerSurface:!0},"waiting-room":{required:[`stateChanged`,`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`,`setParticipant`],alsoSent:[`setTimer`,`setViewerRole`,`setOwnTeam`,`setOwnTeamJoinLink`,`setParticipantList`,`setTeamList`,`setRunKind`,`setScenarioName`,`setCrossTeamData`,`themePreferenceChanged`],isPlayerSurface:!0},session:{required:[`setSessionMeta`,`setSessionData`,`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`,`setTeamConfiguration`],alsoSent:[`setTeamList`,`setParticipantList`,`setTeamLinks`,`setSessionJoinLink`,`setAvailableOverlays`,`setRunKind`,`setScenarioName`,`setWalkthroughLink`,`themePreferenceChanged`],isPlayerSurface:!1},presentation:{required:[`setPresentation`,`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`],alsoSent:[`themePreferenceChanged`],isPlayerSurface:!1},setup:{required:[`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`],alsoSent:[`themePreferenceChanged`],isPlayerSurface:!1},"scenario-editor":{required:[`setSettings`,`setTheme`,`setLocale`,`setAssetUrls`],alsoSent:[`themePreferenceChanged`],isPlayerSurface:!1}};function fP(e,t={}){let{required:n,isPlayerSurface:r}=dP[e];return!t.observer||!r?n:n.filter(e=>e!==`setParticipant`)}var pP=new Set([`callEndpoint`,`uploadBlob`,`getPastState`,`getAllTeamsParticipants`,`getBenchmark`,`getAssessment`]),mP=class{options;host;logger;port=null;readyListener=null;loadListener=null;handshakeTimer=null;disposed=!1;lastSent=new Map;sticky=new Map;outbound=[];pending=new Map;requestCounter=0;constructor(e){this.options=e,this.host=e.window??globalThis.window,this.logger=e.logger??console,this.listenForReady()}get connected(){return this.port!==null}send(e){this.disposed||(this.lastSent.set(e.type,gP(e)),this.port?this.port.postMessage(e):this.outbound.push(e))}sendState(e){this.disposed||(this.sticky.set(e.type,e),this.lastSent.set(e.type,gP(e)),this.port?.postMessage(e))}sendIfChanged(e){return this.disposed||this.lastSent.get(e.type)===gP(e)?!1:(this.sendState(e),!0)}sendInitialBatch(e){let t=fP(this.options.surface,{observer:this.options.observer}),n=new Set(e.map(e=>e.type)),r=t.filter(e=>!n.has(e));if(r.length>0)throw Error(`Initial batch for a "${this.options.surface}" surface is missing ${r.join(`, `)}. The guest blocks its first paint on ${t.join(`, `)}.`);for(let t of e)this.sendState(t)}request(e,t=3e4){let n=`host-${++this.requestCounter}`;return new Promise((r,i)=>{let a=setTimeout(()=>{this.pending.delete(n),i(Error(`Guest did not answer "${e.type}" in ${t}ms`))},t);this.pending.set(n,{resolve:()=>{clearTimeout(a),r()},reject:e=>{clearTimeout(a),i(e)}}),this.send({...e,requestId:n})})}dispose(){this.disposed||(this.disposed=!0,this.clearHandshakeTimer(),this.readyListener&&=(this.host.removeEventListener(`message`,this.readyListener),null),this.loadListener&&=(this.options.iframe.removeEventListener?.(`load`,this.loadListener),null),this.closePort(),this.rejectPending(`Channel disposed`),this.options.onTeardown?.(`disposed`))}listenForReady(){let e=e=>{if(this.disposed)return;let t=e.data;if(!t||t.type!==`ready`||e.source!==this.options.iframe.contentWindow)return;if(e.origin!==this.options.iframeOrigin){this.logger.warn(`[${this.options.uiIdentifier}] ignoring a handshake from ${e.origin}; this frame is pinned to ${this.options.iframeOrigin}`);return}let n=t.protocolVersion;typeof n==`number`&&n!==4&&this.logger.warn(`[${this.options.uiIdentifier}] host↔iframe protocol version mismatch: iframe ${n}, host 4`),this.connect(t.signalsRendered===!0)};this.readyListener=e,this.host.addEventListener(`message`,e),this.armHandshakeTimer(),this.listenForLoads()}listenForLoads(){let{iframe:e}=this.options;if(!e.addEventListener)return;let t=()=>{this.disposed||(this.armHandshakeTimer(),this.port?.postMessage({type:`ping`}))};this.loadListener=t,e.addEventListener(`load`,t)}armHandshakeTimer(){this.clearHandshakeTimer();let e=this.options.handshakeTimeoutMs??1e4;this.handshakeTimer=setTimeout(()=>{this.handshakeTimer=null,this.disposed||(this.closePort(),this.options.onTeardown?.(`handshake-timeout`))},e)}connect(e){this.closePort(),this.rejectPending(`Connection reset`),this.lastSent.clear();let t=[...this.sticky.values()],n=new MessageChannel;this.port=n.port1,this.port.onmessage=e=>this.receive(e.data),this.port.start(),this.clearHandshakeTimer(),this.options.iframe.contentWindow?.postMessage({type:`init`,protocolVersion:4,sessionKey:this.options.sessionKey},this.options.iframeOrigin,[n.port2]);for(let e of t)this.sendState(e);let r=this.outbound;this.outbound=[];for(let e of r)this.port.postMessage(e);this.options.onConnect?.({signalsRendered:e})}closePort(){this.port&&=(this.port.onmessage=null,this.port.close(),null)}clearHandshakeTimer(){this.handshakeTimer!==null&&(clearTimeout(this.handshakeTimer),this.handshakeTimer=null)}rejectPending(e){for(let{reject:t}of this.pending.values())t(Error(e));this.pending.clear()}receive(e){if(e&&typeof e.type==`string`){switch(e.type){case`pong`:this.clearHandshakeTimer();return;case`rendered`:this.options.onRendered?.();return;case`refreshAssetAuth:response`:{let{requestId:t,ok:n,error:r}=e;if(typeof t!=`string`)return;let i=this.pending.get(t);this.pending.delete(t),n?i?.resolve():i?.reject(Error(r??`Asset auth refresh failed`));return}}pP.has(e.type)?this.answer(e):this.options.onMessage?.(e)}}async answer(e){let t=e.requestId;if(typeof t!=`string`){this.logger.warn(`[${this.options.uiIdentifier}] dropped a "${e.type}" with no requestId`);return}let n=`${e.type}:response`;try{let r=await this.dispatch(e);this.send({type:n,requestId:t,ok:!0,...r})}catch(r){this.send(e.type===`callEndpoint`?{type:n,requestId:t,ok:!1,..._P(r)}:{type:n,requestId:t,ok:!1,error:r instanceof Error?r.message:String(r)})}}async dispatch(e){let t=this.options.adapter,n={uiIdentifier:this.options.uiIdentifier,...this.options.origin};switch(e.type){case`callEndpoint`:if(!t?.callEndpoint)throw Error(`This host serves no endpoints`);return{response:await t.callEndpoint({endpointIdentifier:String(e.endpointIdentifier),request:e.request},n)};case`uploadBlob`:if(!t?.uploadBlob)throw Error(`This host stores no blobs`);return{reference:await t.uploadBlob({data:e.data,name:String(e.name),mimeType:String(e.mimeType)},n)};case`getPastState`:if(!t?.getPastState)throw Error(`This host serves no past state`);return{entries:await t.getPastState(e.query,n)};case`getAllTeamsParticipants`:return{participants:await t?.getAllTeamsParticipants?.(n)??[]};case`getBenchmark`:{let r=hP(e.where);return{statistics:await t?.getBenchmark?.(String(e.identifier),r,n)??null}}case`getAssessment`:if(!t?.getAssessment)throw Error(`getAssessment: this host does not hold assessment results`);return{report:await t.getAssessment(String(e.identifier),n)};default:throw Error(`Unroutable request "${e.type}"`)}}};function hP(e){if(!Array.isArray(e))throw Error(`getBenchmark: "where" must be a list of filters`);if(e.length===0)throw Error(`getBenchmark: "where" must hold at least one filter`);return e.map(e=>{if(typeof e!=`object`||!e||Array.isArray(e)||Object.values(e).some(e=>typeof e!=`string`))throw Error(`getBenchmark: each filter must be an object of tag names to strings`);return{...e}})}function gP(e){return typeof e!=`object`||!e?JSON.stringify(e)??`undefined`:Array.isArray(e)?`[${e.map(gP).join(`,`)}]`:`{${Object.entries(e).filter(([,e])=>e!==void 0).sort(([e],[t])=>e<t?-1:+(e>t)).map(([e,t])=>`${JSON.stringify(e)}:${gP(t)}`).join(`,`)}}`}function _P(e){let t=typeof e==`object`&&e?e.failure:void 0;return typeof t==`object`&&t&&typeof t.outcome?.kind==`string`&&Array.isArray(t.applied)?t:{outcome:{kind:`error`,message:e instanceof Error?e.message:String(e)},applied:[]}}var vP=[`primary`,`secondary`,`success`,`error`,`warning`,`info`];function yP(e){let t=e.trim().toLowerCase(),n=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(t);if(n){let e=n[1];e.length<=4&&(e=[...e].map(e=>e+e).join(``));let t=t=>parseInt(e.slice(t,t+2),16);return{r:t(0),g:t(2),b:t(4),a:e.length===8?t(6)/255:1}}let r=/^rgba?\(([^)]*)\)$/.exec(t);if(r){let e=r[1].split(/[\s,/]+/).filter(Boolean);if(e.length!==3&&e.length!==4)return null;let[t,n,i]=e.slice(0,3).map(e=>e.endsWith(`%`)?parseFloat(e)/100*255:parseFloat(e)),a=e[3],o=a===void 0?1:a.endsWith(`%`)?parseFloat(a)/100:parseFloat(a);return[t,n,i,o].some(e=>!Number.isFinite(e))?null:{r:bP(t,255),g:bP(n,255),b:bP(i,255),a:bP(o,1)}}return null}function bP(e,t){return Math.min(t,Math.max(0,e))}function xP(e,t){let n=(t,n)=>t*e.a+n*(1-e.a);return{r:n(e.r,t.r),g:n(e.g,t.g),b:n(e.b,t.b),a:1}}function SP({r:e,g:t,b:n}){let r=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}function CP(e,t){let[n,r]=[SP(e),SP(t)].sort((e,t)=>t-e);return(n+.05)/(r+.05)}function wP({r:e,g:t,b:n}){let r=e=>Math.round(e).toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`}var TP={r:0,g:0,b:0,a:1},EP={r:255,g:255,b:255,a:1};function DP(e,t){let n=yP(e);if(!n)return wP(TP);let r=n.a<1?xP(n,EP):n,i=t===void 0?null:yP(t);if(i){let e=xP(i,r);if(CP(e,r)>=4.5)return wP(e)}return CP(TP,r)>=CP(EP,r)?wP(TP):wP(EP)}var OP={light:{background:`#ffffff`,surface:`#ffffff`,text:`#000000`},dark:{background:`#121212`,surface:`#1e1e1e`,text:`#ffffff`}};function kP(e){let{background:t,surface:n,text:r}=e;if(!t||!n)return;let i=yP(t),a=yP(n);if(!i||!a)return;let o=e=>e.a<1?xP(e,EP):e,s=[o(i),o(a)],c=e=>Math.min(...s.map(t=>CP(xP(e,t),t))),l=r===void 0?null:yP(r);if(l&&l.a===1&&c(l)>=4.5)return{background:t,surface:n,text:wP(l)};let u=c(TP)>=c(EP)?TP:EP;if(!(c(u)<4.5))return{background:t,surface:n,text:wP(u)}}function AP(e,t){let n=Object.fromEntries(vP.map(t=>[t,DP(e[t],e.contrastText?.[t])]));return{...Object.fromEntries(vP.map(t=>[t,e[t]])),contrastText:n,...kP(e)??OP[t]}}function jP(e){return{mode:e.mode,light:AP(e.light,`light`),dark:AP(e.dark,`dark`),brand:e.brand}}var MP={primary:{main:`#6B00FF`,contrastText:`#ffffff`},secondary:{main:`#17D1C7`,contrastText:`rgba(0,0,0,0.87)`},error:{main:`#DB324D`,contrastText:`#ffffff`},success:{main:`#00c894`,contrastText:`rgba(0,0,0,0.87)`},warning:{main:`#ffb65c`,contrastText:`rgba(0,0,0,0.87)`},info:{main:`#336BEB`,contrastText:`#ffffff`}},NP={primary:{main:`#BC8CFF`,contrastText:`rgba(0,0,0,0.87)`},secondary:{main:`#17D1C7`,contrastText:`rgba(0,0,0,0.87)`},error:{main:`#ef7a8e`,contrastText:`rgba(0,0,0,0.87)`},success:{main:`#00c894`,contrastText:`rgba(0,0,0,0.87)`},warning:{main:`#ffb65c`,contrastText:`rgba(0,0,0,0.87)`},info:{main:`#7d9bf2`,contrastText:`rgba(0,0,0,0.87)`}},PP=`#414042`,FP=`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,IP=`"Work Sans", ${FP}`,LP=`Sora, ${FP}`;function RP(e){return{primary:e.primary.main,secondary:e.secondary.main,success:e.success.main,error:e.error.main,warning:e.warning.main,info:e.info.main,contrastText:{primary:e.primary.contrastText,secondary:e.secondary.contrastText,success:e.success.contrastText,error:e.error.contrastText,warning:e.warning.contrastText,info:e.info.contrastText}}}function zP(e,t){return jP(t?{mode:e,...t.theme}:{mode:e,light:RP(MP),dark:RP(NP),brand:{name:`Serious Gaming`}})}var BP=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function VP(e){return Xo({palette:e===`dark`?{mode:`dark`,...NP}:{mode:`light`,...MP,text:{primary:PP}},typography:{fontFamily:IP,...Object.fromEntries(BP.map(e=>[e,{fontFamily:LP}]))},components:{MuiButton:{styleOverrides:{root:{textTransform:`none`}}}}})}function HP(e){return e===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e}function UP(e,t){return{"Content-Type":e.mimeType,"X-Blob-Name":encodeURIComponent(e.name),"X-Blob-Mime":e.mimeType,"X-Blob-Retention":t===`setup`?`settings`:t===`scenario-editor`?`scenario`:`game`}}var WP=5e3,GP=`allow-scripts allow-same-origin allow-forms allow-downloads allow-modals allow-presentation allow-popups allow-popups-to-escape-sandbox`,KP=`clipboard-write; autoplay; screen-wake-lock; fullscreen; microphone; camera; geolocation; picture-in-picture; web-share; gamepad; window-management; speaker-selection`;function qP(e){return Object.assign(Error(e.outcome.message??e.outcome.kind),{failure:e})}function JP(e,t,n,r={}){return async i=>{let a=uP(i,e,t,r)??lP(i,e,t);return cP(a)?{ok:!1,outcome:{kind:`denied`,message:a.refused}}:a?n(a):null}}function YP(e,t,n){return JSON.stringify([e.kind,e.identifier,t.observer??null,t.teamIndex??null,t.participantId??null,t.role??null,n])}function XP({surface:e,viewer:t,feed:n,mode:r,resolved:i,onModeChange:a,rejection:o,hookFailure:s,onTeardown:c}){let l=n.kind===`view`?n.dispatch:JP(e,t,n.send,{sessionless:n.sessionless===!0}),u=e.origin??window.location.origin,d=(0,E.useRef)(null),f=(0,E.useRef)(null),p=eF(n),m=(0,E.useRef)({dispatch:l,onModeChange:a,overlays:p});m.current={dispatch:l,onModeChange:a,overlays:p};let[h,g]=(0,E.useState)(!1),[_,v]=(0,E.useState)(!1),[y,b]=(0,E.useState)(!1),[x,S]=(0,E.useState)(!1),{selected:C}=Sb(),{hold:w}=kb(),T=n.kind===`view`?n.sessionKey:$c(n.state,e,{sessionless:n.sessionless===!0});return(0,E.useEffect)(()=>{let n=d.current;if(!n)return;let r;return r=new mP({iframe:n,surface:e.kind,uiIdentifier:e.identifier,iframeOrigin:u,sessionKey:T,adapter:{callEndpoint:async({endpointIdentifier:e,request:t})=>{let n=await m.current.dispatch({type:`callEndpoint`,endpointIdentifier:e,request:t});if(n&&`type`in n){if(n.type===`endpoint`)return n.response;if(n.type===`endpointFailure`)throw qP(n.failure)}throw qP({outcome:n&&`ok`in n&&!n.ok?n.outcome:{kind:`error`,message:`The endpoint did not answer`},applied:[]})},uploadBlob:async t=>{let n=await(await fetch(`/api/blobs`,{method:`POST`,headers:UP(t,e.kind),body:t.data})).json();if(!n.reference)throw Error(`The blob was not stored`);return n.reference},getPastState:async e=>{let t=await m.current.dispatch({type:`getPastState`,query:e});return t&&`type`in t&&t.type===`pastState`?t.entries:[]},getAllTeamsParticipants:async()=>{let e=await m.current.dispatch({type:`getAllTeamsParticipants`});return e&&`type`in e&&e.type===`participants`?e.participants:[]},getBenchmark:async(e,t)=>{let n=await m.current.dispatch({type:`getBenchmark`,identifier:e,where:t});if(n&&`type`in n){if(n.type===`benchmark`)return n.statistics;if(n.type===`benchmarkFailure`)throw Error(n.error)}if(n&&`ok`in n&&!n.ok)throw Error(n.outcome.message??n.outcome.kind);return null},getAssessment:async e=>{let t=await m.current.dispatch({type:`getAssessment`,identifier:e});if(t&&`type`in t){if(t.type===`assessment`)return t.report;if(t.type===`assessmentFailure`)throw Error(t.error)}throw t&&`ok`in t&&!t.ok?Error(t.outcome.message??t.outcome.kind):Error(`getAssessment: the session did not answer`)}},observer:t.observer===!0,onConnect:({signalsRendered:e})=>{g(!0),v(!e),b(!e),S(!1)},onRendered:()=>{v(!0),b(!0)},onTeardown:e=>{e===`handshake-timeout`&&(g(!1),S(!0),c?.())},onMessage:e=>{e.type===`setThemePreference`?m.current.onModeChange?.(e.preference):QP(r,e,m.current.dispatch,m.current.overlays)}}),f.current=r,()=>{r.dispose(),f.current=null,g(!1),v(!1),b(!1)}},[e.identifier,e.kind,t.observer,t.teamIndex,t.participantId,t.role,T,w]),(0,E.useEffect)(()=>{let a=f.current;if(!a)return;let o={mode:i,preference:r,palette:zP(i,C)},s=n.kind===`view`?[...n.messages,...el(o)]:al({surface:e,state:n.state,viewer:t,theme:o,origin:window.location.origin,assetOrigin:u,gameName:n.state.game.name,...n.overlays===void 0?{}:{overlays:n.overlays},...n.roundProcessing===void 0?{}:{roundProcessing:n.roundProcessing},...n.sessionless===void 0?{}:{sessionless:n.sessionless}});if(w===`surface`)for(let e of Tb(s,w))a.sendIfChanged(e);else if(a.connected)for(let e of s)a.sendIfChanged(e);else a.sendInitialBatch(s)},[e,n,t,r,i,u,C,w]),(0,E.useEffect)(()=>{if(!h||_||w===`host`)return;let e=setTimeout(()=>v(!0),WP);return()=>clearTimeout(e)},[h,_,w]),(0,E.useEffect)(()=>{let e=f.current;e&&o&&(o.teamIndex===void 0||o.teamIndex===t.teamIndex)&&e.send({type:`validationRejected`,rejections:o.rejections})},[o?.nonce,o,t.teamIndex]),(0,E.useEffect)(()=>{let t=f.current;t&&s&&e.kind===`session`&&t.send({type:`hookFailed`,payload:s.payload})},[s?.nonce,s,e.kind]),(0,V.jsxs)(lm,{"data-surface-state":x?`lost`:h?y?`rendered`:_?`unconfirmed`:`loading`:`loading`,sx:{position:`relative`,width:`100%`,height:`100%`},children:[(0,V.jsx)(lm,{component:`iframe`,ref:d,title:e.identifier,src:`${u}${e.src}?expectedParentOrigin=${encodeURIComponent(window.location.origin)}`,sandbox:GP,allow:KP,sx:{width:`100%`,height:`100%`,border:0,display:`block`}},`${YP(e,t,T)}:${w}`),(!h||w===`host`||!_&&w!==`surface`)&&(0,V.jsx)(my,{spacing:2,"data-testid":`surface-loading`,sx:{alignItems:`center`,justifyContent:`center`,position:`absolute`,inset:0,bgcolor:`background.default`},children:x?(0,V.jsx)(Z,{color:`text.secondary`,children:`This surface did not connect. Check its console for an error.`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(rF,{brand:C,resolved:i}),(0,V.jsxs)(Z,{color:`text.secondary`,variant:`body2`,children:[`Loading `,e.identifier]})]})})]})}function ZP(e,t,n){return e!==`facilitator-guide`&&e!==`print-sheets`&&e!==`presentation`?`"${String(e)}" is not a host overlay`:n.available.includes(e)?e===`print-sheets`&&t!==void 0&&n.teamIds!==void 0&&!n.teamIds.includes(String(t))?`There is no team "${String(t)}" to print`:null:`This host does not offer the "${e}" overlay for this game`}async function QP(e,t,n,r={available:[`facilitator-guide`,`print-sheets`,`presentation`]}){if(t.type===`setThemePreference`)return;if(t.type===`openHostOverlay`){let n=ZP(t.overlay,t.target,r);n||$P(t.overlay,t.target),tF(e,t,n?{ok:!1,outcome:{kind:`denied`,message:n}}:{ok:!0});return}let i;try{i=await n(t)}catch(e){i={ok:!1,outcome:{kind:`error`,message:e instanceof Error?e.message:`The command failed`}}}if(!i){tF(e,t,{ok:!1,outcome:{kind:`denied`,message:`This host does not handle "${String(t.type)}"`}});return}let a=typeof t.requestId==`string`?t.requestId:null;a&&(`ok`in i?e.send(i.ok?{type:`mutation:response`,requestId:a,ok:!0,...i.committedAtTick===void 0?{}:{committedAtTick:i.committedAtTick}}:{type:`mutation:response`,requestId:a,ok:!1,outcome:i.outcome}):e.send({type:`mutation:response`,requestId:a,ok:!0}))}function $P(e,t){if(e===`facilitator-guide`)return window.open(`/guide`,`_blank`,`noreferrer`),!0;if(e===`print-sheets`){let e=typeof t==`string`?`?team=${encodeURIComponent(t)}`:``;return window.open(`/print${e}`,`_blank`,`noreferrer`),!0}return e===`presentation`&&(window.open(`/presentation`,`_blank`,`noreferrer`),!0)}function eF(e){if(e.kind===`operator`)return{available:e.overlays??fl(),teamIds:e.state.teams.map(e=>e.teamId)};let t=e.messages.find(e=>e.type===`setAvailableOverlays`),n=e.messages.find(e=>e.type===`setTeamList`);return{available:Array.isArray(t?.overlays)?t.overlays:[],...Array.isArray(n?.payload)?{teamIds:n.payload.map(e=>e.teamId)}:{}}}function tF(e,t,n){typeof t.requestId==`string`&&e.send({type:`mutation:response`,requestId:t.requestId,...n})}function nF(e,t){return t===`dark`?e?.onDark??e?.onLight:e?.onLight??e?.onDark}function rF({brand:e,resolved:t}){let n=nF(e?.loader,t);if(n)return(0,V.jsx)(lm,{component:`img`,src:n,alt:``,sx:{width:72,height:72}});let r=nF(e?.theme.brand?.logo,t),i=e?.theme[t].primary;return(0,V.jsxs)(V.Fragment,{children:[r&&(0,V.jsx)(lm,{component:`img`,src:r,alt:e?.name??``,sx:{maxHeight:48,maxWidth:`min(320px, 80%)`,objectFit:`contain`}}),(0,V.jsx)(sd,{size:28,sx:i?{color:i}:void 0})]})}function iF({scenario:e,surface:t,state:n,mode:r,resolved:i,send:a,onModeChange:o,rejection:s}){let[c,l]=(0,E.useState)(!1),[u,d]=(0,E.useState)(!1),[f,p]=(0,E.useState)(null),[m,h]=(0,E.useState)([]),g=e===``?null:e,_=n.scenarioDrafts?.some(e=>e.scenarioId===g)===!0,[v,y]=(0,E.useState)(null);(0,E.useEffect)(()=>{_||a({type:`editScenario`,scenarioId:g}).then(e=>{`ok`in e&&!e.ok&&y(e.outcome.message??`The scenario could not be opened`)})},[_,g,a]);let b=async()=>{l(!0),p(null),h([]);try{let t=await fetch(`/api/scenarios`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({identifier:e,overwrite:!0,draft:!0})});if(!t.ok){let e=await t.json();p(e.error??`The scenario could not be saved`);return}let n=await t.json();h(n.warnings??[]),d(!0)}finally{l(!1)}};return(0,V.jsxs)(lm,{sx:{display:`flex`,flexDirection:`column`,height:`100vh`},children:[(0,V.jsx)(Fd,{position:`static`,color:`default`,elevation:1,children:(0,V.jsxs)(Cy,{variant:`dense`,sx:{gap:2},children:[(0,V.jsxs)(my,{sx:{flex:1},children:[(0,V.jsx)(Z,{variant:`subtitle2`,children:`Editing scenario`}),(0,V.jsx)(Z,{variant:`caption`,color:`text.secondary`,children:e})]}),u&&!f&&(0,V.jsx)(Z,{variant:`body2`,color:`success.main`,children:`Saved`}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`save-scenario`,disabled:c,onClick:()=>void b(),children:`Save`}),(0,V.jsx)(xm,{href:`/`,children:`Done`})]})}),(f??v)&&(0,V.jsx)(Td,{severity:`error`,sx:{borderRadius:0},children:f??v}),u&&!f&&m.length>0&&(0,V.jsxs)(Td,{severity:`warning`,sx:{borderRadius:0},"data-testid":`save-warnings`,children:[`Saved, with`,` `,m.length===1?`a warning`:`${m.length} warnings`,` worth a look:`,m.map(e=>(0,V.jsx)(`div`,{children:e},e))]}),(0,V.jsx)(lm,{sx:{flex:1,minHeight:0,position:`relative`},children:_?t?(0,V.jsx)(XP,{surface:t,viewer:g===null?{}:{scenario:g},feed:{kind:`operator`,state:n,send:e=>(e.type===`updateScenarioDraft`&&d(!1),a(e))},mode:r,resolved:i,onModeChange:o,rejection:s}):(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4},children:[(0,V.jsxs)(Td,{severity:`info`,sx:{maxWidth:560},children:[(0,V.jsxs)(Z,{gutterBottom:!0,children:[`This game has no `,(0,V.jsx)(`strong`,{children:`scenario_editor`}),` slot.`]}),(0,V.jsxs)(Z,{variant:`body2`,color:`text.secondary`,children:[`A scenario editor is optional (§6.5). Without one there is nothing to author a scenario in here; the values can still be set with`,` `,(0,V.jsx)(`code`,{children:`sdk configure`}),` and captured from the Scenario tab, and an agent can edit a game's settings directly from their schemas.`]})]}),(0,V.jsx)(xm,{href:`/`,children:`Back to the session`})]}):(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`},children:[(0,V.jsx)(sd,{size:28}),(0,V.jsxs)(Z,{color:`text.secondary`,variant:`body2`,children:[`Opening `,e||`the package settings`]})]})})]})}function aF({offered:e,onJoin:t}){let[n,r]=(0,E.useState)(!1),[i,a]=(0,E.useState)(null);return e?(0,V.jsxs)(oF,{children:[(0,V.jsxs)(my,{spacing:1,sx:{alignItems:`center`,maxWidth:420},children:[(0,V.jsx)(Z,{variant:`h5`,children:`Join the session`}),(0,V.jsx)(Z,{color:`text.secondary`,sx:{textAlign:`center`},children:`You will be placed in a team. The dev server picks the one with the fewest participants; another host may choose differently.`})]}),(0,V.jsx)(xm,{variant:`contained`,onClick:()=>{r(!0),a(null),t().then(e=>{e!==null&&(a(e),r(!1))})},disabled:n,"data-testid":`session-join-button`,children:`Join`}),i!==null&&(0,V.jsx)(Z,{color:`error`,children:i})]}):(0,V.jsxs)(oF,{children:[(0,V.jsx)(Z,{variant:`h5`,children:`This session has no session link`}),(0,V.jsxs)(Z,{color:`text.secondary`,sx:{textAlign:`center`,maxWidth:420},children:[`The game sets `,(0,V.jsx)(`code`,{children:`teams.sessionJoin`}),` to false, so people join through their team's own link instead.`]})]})}function oF({children:e}){return(0,V.jsx)(my,{spacing:3,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4,bgcolor:`background.default`},children:e})}var sF={processing:new Set,errors:[],rejection:null,hookFailure:null,reloads:0,restarted:null,restarts:0},cF=new Set([`bundles-reloaded`,`reinitialised-on-change`,`logic-reloaded`]),lF=new Set([`reinitialise`,`reconfigure`,`reset`,`selectScenario`]);function uF(e=`session`){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)(!1),[a,o]=(0,E.useState)(0),[s,c]=(0,E.useState)(sF),l=(0,E.useRef)(null),u=(0,E.useRef)(null),d=(0,E.useRef)(new Map),f=(0,E.useRef)(0);(0,E.useEffect)(()=>{let t=!1,r,a=()=>{let s=e===`walkthrough`?`?run=walkthrough`:``,f=new WebSocket(`${location.protocol===`https:`?`wss`:`ws`}://${location.host}/ws${s}`);l.current=f,f.onopen=()=>{i(!0),o(0),u.current!==null&&f.send(JSON.stringify({presence:u.current}))},f.onclose=()=>{i(!1),o(e=>e+1),t||(r=setTimeout(a,1e3))},f.onmessage=e=>{let t=JSON.parse(e.data);t.type===`result`?(d.current.get(t.requestId)?.(t.result),d.current.delete(t.requestId)):dF(t,n,c)}};return a(),()=>{t=!0,clearTimeout(r),l.current?.close()}},[e]);let p=(0,E.useCallback)(e=>{let t=l.current;if(!t||t.readyState!==WebSocket.OPEN)return Promise.resolve({ok:!1,outcome:{kind:`error`,message:`Not connected to the session`}});let n=`console-${++f.current}`;return new Promise(r=>{d.current.set(n,r),t.send(JSON.stringify({requestId:n,command:e}))})},[]),m=(0,E.useCallback)(e=>{if(u.current===e)return;u.current=e;let t=l.current;t&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify({presence:e}))},[]);return(0,E.useMemo)(()=>({state:t,connected:r,attempts:a,transients:s,send:p,announce:m}),[t,r,a,s,p,m])}function dF(e,t,n){switch(e.type){case`state`:t(e.state),cF.has(e.cause)&&n(t=>({...t,reloads:t.reloads+1,restarted:e.cause===`reinitialised-on-change`?{nonce:(t.restarted?.nonce??0)+1}:t.restarted})),lF.has(e.cause)&&n(e=>({...e,restarts:e.restarts+1}));return;case`round-processing`:n(t=>{let n=new Set(t.processing),r=e.teamIndex??-1;return e.processing?n.add(r):n.delete(r),{...t,processing:n}});return;case`error`:n(t=>({...t,errors:[...t.errors,`${e.source}: ${e.message}`],hookFailure:e.source.startsWith(`hook:`)?{payload:{signal:e.source.slice(5),teamId:e.teamId??``,message:e.message},nonce:(t.hookFailure?.nonce??0)+1}:t.hookFailure}));return;case`validation-rejected`:n(t=>({...t,rejection:{...e.teamIndex===void 0?{}:{teamIndex:e.teamIndex},rejections:e.rejections,nonce:(t.rejection?.nonce??0)+1}}));return}}function fF(){let[e,t]=(0,E.useState)(null),[n,r]=(0,E.useState)(!1),[i,a]=(0,E.useState)(0),[o,s]=(0,E.useState)(null),[c,l]=(0,E.useState)(null),u=(0,E.useRef)(null),d=(0,E.useRef)(new Map),f=(0,E.useRef)(0);(0,E.useEffect)(()=>{let e=!1,n,i=()=>{let o=encodeURIComponent(location.pathname+location.search),c=new WebSocket(`${location.protocol===`https:`?`wss`:`ws`}://${location.host}/ws/view?page=${o}`);u.current=c,c.onopen=()=>{r(!0),a(0)},c.onclose=()=>{r(!1),a(e=>e+1),e||(n=setTimeout(i,1e3))},c.onmessage=e=>{let n=JSON.parse(e.data);switch(n.type){case`view`:(0,Pp.flushSync)(()=>t({page:n.page,messages:n.messages}));return;case`result`:d.current.get(n.requestId)?.(n.result),d.current.delete(n.requestId);return;case`validation-rejected`:s(e=>({rejections:n.rejections,nonce:(e?.nonce??0)+1}));return;case`hookFailed`:l(e=>({payload:n.payload,nonce:(e?.nonce??0)+1}));return}}};return i(),()=>{e=!0,clearTimeout(n),u.current?.close()}},[]);let p=(0,E.useCallback)(e=>{let t=u.current;if(!t||t.readyState!==WebSocket.OPEN)return Promise.resolve({ok:!1,outcome:{kind:`error`,message:`Not connected to the session`}});let n=`view-${++f.current}`;return new Promise(r=>{d.current.set(n,r),t.send(JSON.stringify({requestId:n,message:e}))})},[]);return(0,E.useMemo)(()=>({view:e,connected:n,attempts:i,rejection:o,hookFailure:c,dispatch:p}),[e,n,i,o,c,p])}function pF(e){let t=(0,E.useMemo)(()=>Kc(location.pathname,location.search),[]);return xl(t)?(0,V.jsx)(mF,{...e}):(0,V.jsx)(gF,{...e,route:t})}function mF({mode:e,resolved:t,onModeChange:n}){let{view:r,connected:i,attempts:a,rejection:o,hookFailure:s,dispatch:c}=fF();if(!r)return(0,V.jsx)(TF,{connected:i,attempts:a});let{page:l,messages:u}=r;switch(l.status){case`redirect`:return location.replace(l.href),(0,V.jsx)(TF,{connected:i,attempts:a});case`configuring`:return(0,V.jsx)(hF,{children:`The facilitator is setting the session up. This page opens when it starts.`});case`closed`:return(0,V.jsx)(hF,{children:`This session has already started, so its configuration is closed.`});case`join`:return(0,V.jsx)(YN,{team:l.team??void 0,bare:!0});case`session-join`:return(0,V.jsx)(aF,{offered:l.offered,onJoin:async()=>{let e=await c({type:`joinSession`});return e&&`ok`in e&&!e.ok?`message`in e.outcome?String(e.outcome.message):`The session refused the join`:null}});case`no-such-team`:return(0,V.jsx)(EF,{resolution:{kind:`no-such-team`,teamIndex:l.teamIndex},bare:!0});case`no-such-participant`:return(0,V.jsx)(EF,{resolution:{kind:`no-such-participant`,teamIndex:l.teamIndex,slot:l.slot,held:l.held},bare:!0});case`missing-surface`:return(0,V.jsx)(DF,{kind:l.kind});case`surface`:return(0,V.jsxs)(lm,{sx:{display:`flex`,flexDirection:`column`,height:`100vh`},children:[!i&&(0,V.jsx)(CF,{attempts:a}),l.inSetup&&l.surface.kind===`setup`&&(0,V.jsx)(Fd,{position:`static`,color:`default`,elevation:1,children:(0,V.jsxs)(Cy,{variant:`dense`,sx:{gap:2},children:[(0,V.jsx)(Z,{variant:`subtitle2`,sx:{flex:1},children:`Configure the session, then start it`}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`play`,onClick:()=>void c({type:`requestPlay`}),children:`Play`})]})}),(0,V.jsx)(lm,{sx:{flex:1,minHeight:0,position:`relative`},children:(0,V.jsx)(XP,{surface:l.surface,viewer:l.viewer,feed:{kind:`view`,messages:u,dispatch:c,sessionKey:l.sessionKey},mode:e,resolved:t,onModeChange:n,rejection:o,hookFailure:s})})]})}}function hF({children:e}){return(0,V.jsx)(my,{sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},children:(0,V.jsx)(Td,{severity:`info`,sx:{maxWidth:560},"data-testid":`view-notice`,children:(0,V.jsx)(Z,{children:e})})})}function gF({mode:e,resolved:t,onModeChange:n,route:r}){let{state:i,connected:a,attempts:o,transients:s,send:c,announce:l}=uF(r.run),[u,d]=(0,E.useState)(null),[f,p]=(0,E.useState)([`print-sheets`]);(0,E.useEffect)(()=>{fetch(Gc(`/api/surfaces`,location.search)).then(e=>e.json()).then(d)},[s.reloads]);let[m,h]=(0,E.useState)([]),[g,_]=(0,E.useState)(null),v=async()=>{let e=await c({type:`play`});`ok`in e&&(e.ok?_(e.warnings?.length?{severity:`warning`,lines:e.warnings}:null):_({severity:`error`,lines:(e.outcome.message??`The session could not start`).split(`
207
+ `)}))};(0,E.useEffect)(()=>{fetch(`/api/session`).then(e=>e.json()).then(e=>h(e.warnings??[]))},[s.reloads,s.restarts]);let y=m.filter(e=>e.build),b=m.filter(e=>vF.has(e.code??``)),[x,S]=(0,E.useState)(!1);(0,E.useEffect)(()=>{s.restarted&&S(!0)},[s.restarted]),(0,E.useEffect)(()=>{fetch(`/api/overlays`).then(e=>e.json()).then(e=>p(e.overlays))},[s.reloads]);let C=i&&r.kind===`player`?(()=>{let e=vl(i,r);return e.kind===`viewer`?e.viewer.participantId??null:null})():null;if((0,E.useEffect)(()=>l(C),[l,C]),!i||!u)return(0,V.jsx)(TF,{connected:a,attempts:o});let w=u.some(e=>e.kind===`setup`),T=i.session.inSetup,D=r.kind===`guide`||r.kind===`print`||r.kind===`scenario-editor`||r.kind===`presentation`||r.kind===`session-join`,O=T&&!D?{...r,kind:`setup`}:r;if(!T&&O.kind===`setup`)return(0,V.jsx)(SF,{configurable:w,onReconfigure:()=>void c({type:`reconfigure`})});if(O.kind===`scenario-editor`)return O.scenario===void 0?(0,V.jsx)(wF,{}):(0,V.jsx)(iF,{scenario:O.scenario,surface:u.find(e=>e.kind===`scenario-editor`),state:i,mode:e,resolved:t,send:c,onModeChange:n,rejection:s.rejection});if(O.kind===`session-join`)return location.replace(qc({kind:`session-join`,bare:!0})),(0,V.jsx)(TF,{connected:a,attempts:o});if(O.kind===`join`){let e=i.teams.find(e=>e.index===O.teamIndex);return e?.participants.length===1?(location.replace(qc({kind:`player`,teamIndex:e.index,participant:1,bare:O.bare})),(0,V.jsx)(TF,{connected:a,attempts:o})):(0,V.jsx)(YN,{team:e,bare:O.bare})}let k=vl(i,O);if(k.kind!==`viewer`)return(0,V.jsx)(EF,{resolution:k,bare:O.bare,onAddParticipant:()=>void c({type:`addParticipant`,teamId:`team-${k.teamIndex+1}`})});let A=i.session.waitingRoomOpen&&(O.kind===`player`||O.kind===`waiting-room`)?`waiting-room`:yl[O.kind],j=A?u.find(e=>e.kind===A):void 0;return(0,V.jsxs)(lm,{sx:{display:`flex`,flexDirection:`column`,height:`100vh`},children:[!a&&(0,V.jsx)(CF,{attempts:o}),Lc(i.session.pending)&&!O.bare&&(0,V.jsx)(_F,{pending:i.session.pending,onReinitialise:()=>void c({type:`reset`})}),y.length>0&&!O.bare&&(0,V.jsx)(bF,{errors:y}),b.length>0&&!O.bare&&(0,V.jsx)(xF,{notices:b}),T&&(0,V.jsx)(Fd,{position:`static`,color:`default`,elevation:1,children:(0,V.jsxs)(Cy,{variant:`dense`,sx:{gap:2},children:[(0,V.jsx)(Z,{variant:`subtitle2`,sx:{flex:1},children:`Configure the session, then start it`}),(0,V.jsx)(yF,{locale:i.session.locale}),(0,V.jsx)(xm,{variant:`contained`,"data-testid":`play`,onClick:()=>void v(),children:`Play`})]})}),g&&!O.bare&&(0,V.jsx)(Td,{severity:g.severity,sx:{borderRadius:0,whiteSpace:`pre-line`},"data-testid":`play-report`,onClose:()=>_(null),children:g.lines.join(`
208
+ `)}),(0,V.jsx)(lm,{sx:{flex:1,minHeight:0,position:`relative`},children:O.kind===`guide`?(0,V.jsx)(JN,{locale:i.session.locale,reloads:s.reloads}):O.kind===`print`?(0,V.jsx)(ZN,{state:i}):j?(0,V.jsx)(XP,{surface:j,viewer:k.viewer,feed:{kind:`operator`,state:i,overlays:f,...O.kind===`presentation`?{sessionless:O.preview===!0}:{},roundProcessing:s.processing.has(-1)||k.viewer.teamIndex!==void 0&&s.processing.has(k.viewer.teamIndex),send:c},mode:e,resolved:t,onModeChange:n,rejection:s.rejection,hookFailure:s.hookFailure}):(0,V.jsx)(DF,{kind:A??`session`})}),!O.bare&&(0,V.jsx)(jb,{state:i,route:O,inSetup:T,configurable:w,connected:a,transients:s,mode:e,onModeChange:n,send:c}),(0,V.jsx)(ty,{open:x,autoHideDuration:4e3,onClose:()=>S(!1),anchorOrigin:{vertical:`top`,horizontal:`center`},children:(0,V.jsx)(Td,{severity:`info`,"data-testid":`restarted-notice`,children:`Settings changed, game restarted`})})]})}function _F({pending:e,onReinitialise:t}){return(0,V.jsxs)(Td,{severity:`warning`,square:!0,"data-testid":`pending-changes`,sx:{borderRadius:0,py:.25},action:(0,V.jsx)(xm,{size:`small`,color:`inherit`,"data-testid":`reinitialise`,onClick:t,children:`Re-initialise`}),children:[(0,V.jsx)(`strong`,{children:Rc(e)}),`. `,zc(e),`. Re-initialising returns play to tick 0.`]})}var vF=new Set([`RELOAD_FAILED`,`CAPABILITY_SEEDED`]);function yF({locale:e}){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)(!1);return(0,E.useEffect)(()=>{fetch(`/api/setup/notes?locale=${encodeURIComponent(e)}`).then(e=>e.json()).then(e=>n(e.notes)).catch(()=>n(null))},[e]),t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(xm,{size:`small`,"data-testid":`setup-notes-toggle`,onClick:()=>i(!r),children:r?`Hide notes for assistants`:`Notes for assistants`}),(0,V.jsxs)(vh,{open:r,onClose:()=>i(!1),fullWidth:!0,maxWidth:`md`,children:[(0,V.jsxs)(jh,{children:[`Setup notes for assistants (`,t.locale,`)`]}),(0,V.jsx)(Oh,{children:(0,V.jsx)(Z,{component:`pre`,"data-testid":`setup-notes`,sx:{whiteSpace:`pre-wrap`,fontFamily:`monospace`,fontSize:13},children:t.markdown})})]})]}):null}function bF({errors:e}){return(0,V.jsxs)(Td,{severity:`error`,square:!0,"data-testid":`build-errors`,sx:{borderRadius:0,py:.25},children:[(0,V.jsxs)(`strong`,{children:["`sdk build` would refuse this package (",e.length===1?`one error`:`${e.length} errors`,`)`]}),`. It runs here anyway, so it can be fixed while you watch.`,e.map((e,t)=>(0,V.jsx)(Z,{variant:`body2`,sx:{fontFamily:`monospace`},children:e.message},t))]})}function xF({notices:e}){return(0,V.jsx)(Td,{severity:`warning`,square:!0,"data-testid":`package-notices`,sx:{borderRadius:0,py:.25},children:e.map((e,t)=>(0,V.jsx)(Z,{variant:`body2`,children:e.message},t))})}function SF({configurable:e,onReconfigure:t}){return(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},children:[(0,V.jsxs)(Td,{severity:`info`,sx:{maxWidth:560},children:[(0,V.jsx)(Z,{gutterBottom:!0,children:`This session has already started.`}),(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:e?`Settings are resolved when a session initialises, so changing them now would change nothing until the session starts again. Reconfiguring puts the session back to its setup step and returns every team to tick 0.`:`This game has no setup step.`})]}),(0,V.jsxs)(my,{direction:`row`,spacing:1,children:[e&&(0,V.jsx)(xm,{variant:`contained`,"data-testid":`reconfigure`,onClick:t,children:`Reconfigure`}),(0,V.jsx)(xm,{href:`/`,children:`Back to the session`})]})]})}function CF({attempts:e}){return(0,V.jsxs)(Td,{severity:`warning`,square:!0,"data-testid":`disconnected`,sx:{borderRadius:0,py:.25},action:(0,V.jsx)(xm,{size:`small`,color:`inherit`,onClick:()=>location.reload(),children:`Reload`}),children:[`Disconnected from the session — nothing on this page is live.`,e>1?` Retrying (${e}).`:` Retrying…`]})}function wF(){return(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},children:[(0,V.jsxs)(Td,{severity:`info`,sx:{maxWidth:560},children:[(0,V.jsx)(Z,{gutterBottom:!0,children:`The scenario editor opens on a scenario.`}),(0,V.jsxs)(Z,{variant:`body2`,color:`text.secondary`,children:[`Open the dev drawer (press `,(0,V.jsx)(`kbd`,{children:"`"}),`) and use the Scenario tab:`,` `,(0,V.jsx)(`strong`,{children:`Add scenario`}),` to start a new one, or `,(0,V.jsx)(`strong`,{children:`Edit`}),` on an existing one. An editor with no scenario behind it has nowhere to save what you do in it.`]})]}),(0,V.jsx)(xm,{href:`/`,children:`Back to the session`})]})}function TF({connected:e,attempts:t}){let n=!e&&t>=2,r=$o().palette.mode===`dark`;return(0,V.jsxs)(my,{spacing:2,"data-testid":`console-loading`,sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},children:[(0,V.jsx)(lm,{component:`img`,src:r?Qy:$y,alt:`Serious Gaming`,sx:{width:72,height:72}}),!n&&(0,V.jsx)(Z,{color:`text.secondary`,children:e?`Loading the session…`:`Connecting to the session…`}),n&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(Td,{severity:`warning`,sx:{maxWidth:620},children:[(0,V.jsxs)(Z,{gutterBottom:!0,children:[`Nothing is answering at`,` `,(0,V.jsxs)(`code`,{children:[location.host,`/ws`]}),`.`]}),(0,V.jsxs)(Z,{variant:`body2`,color:`text.secondary`,component:`div`,children:[`This page loaded, so something is serving it — most likely an older dev server still holding this port. Check two things:`,(0,V.jsxs)(`ul`,{style:{marginBottom:0},children:[(0,V.jsxs)(`li`,{children:[`The address your server actually printed.`,location.port&&(0,V.jsxs)(V.Fragment,{children:[` `,`A port already in use makes it move to the next one, so it may be on `,(0,V.jsx)(`code`,{children:Number(location.port)+1})]})]}),(0,V.jsxs)(`li`,{children:[`Whether an old one is still running:`,` `,(0,V.jsx)(`code`,{children:`pnpm run sdk dev status`}),`, and`,` `,(0,V.jsx)(`code`,{children:`pnpm run sdk dev stop`}),` to end it`]})]})]})]}),(0,V.jsx)(xm,{variant:`outlined`,onClick:()=>location.reload(),children:`Try again`})]})]})}function EF({resolution:e,bare:t,onAddParticipant:n}){let r=e.teamIndex+1;return(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100vh`,p:4},"data-testid":`no-such-participant`,children:[(0,V.jsx)(Td,{severity:`warning`,sx:{maxWidth:560},children:e.kind===`no-such-team`?(0,V.jsxs)(Z,{gutterBottom:!0,children:[`This session has no team `,r,`. It may have been removed.`]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(Z,{gutterBottom:!0,children:[`Team `,r,` has`,` `,e.held===0?`no participants`:e.held===1?`one participant`:`${e.held} participants`,`, and this URL asks for participant `,e.slot,`.`]}),(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`A second tab is not a second participant. Add one, then open their surface: a participant is who a write is attributed to, and a surface with nobody behind it cannot submit one.`})]})}),e.kind===`no-such-participant`&&n&&(0,V.jsx)(xm,{variant:`contained`,onClick:n,"data-testid":`add-participant`,children:`Add participant`}),(0,V.jsxs)(xm,{size:`small`,href:qc({kind:`observer`,teamIndex:e.teamIndex,bare:t}),children:[`Watch team `,r,` without joining`]})]})}function DF({kind:e}){return(0,V.jsxs)(my,{spacing:2,sx:{alignItems:`center`,justifyContent:`center`,height:`100%`,p:4},children:[(0,V.jsxs)(Td,{severity:`info`,sx:{maxWidth:560},children:[(0,V.jsxs)(Z,{gutterBottom:!0,children:[`This package wires no `,(0,V.jsx)(`strong`,{children:e}),` surface.`]}),(0,V.jsx)(Z,{variant:`body2`,color:`text.secondary`,children:`A game supplies its own facilitator and player surfaces; the dev server renders them rather than substituting a console of its own, so there is nothing to show until the package fills that slot.`})]}),(0,V.jsx)(xm,{href:`/`,size:`small`,children:`Back to the session`})]})}function OF(){let[e,t]=(0,E.useState)(()=>ub(location.search,sb(`sessionStorage`),sb(`localStorage`)));(0,E.useEffect)(()=>{if(window.parent===window)return;let e=e=>{if(e.source!==window.parent)return;let n=pb(e.data);n&&(db(sb(`sessionStorage`),n),t(n))};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]);let n=HP(e),r=(0,E.useMemo)(()=>VP(n),[n]);return(0,V.jsxs)(Ac,{theme:r,children:[(0,V.jsx)(ds,{}),(0,V.jsx)(xb,{children:(0,V.jsx)(Ob,{children:(0,V.jsx)(pF,{mode:e,resolved:n,onModeChange:e=>{fb(sb(`sessionStorage`),sb(`localStorage`),e),t(e)}})})})]})}(0,Ic.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(E.StrictMode,{children:(0,V.jsx)(OF,{})}));