streamlit-nightly 1.52.3.dev20260107__py3-none-any.whl → 1.52.3.dev20260108__py3-none-any.whl

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 (101) hide show
  1. streamlit/connections/__init__.py +5 -1
  2. streamlit/connections/snowflake_connection.py +203 -57
  3. streamlit/runtime/connection_factory.py +25 -0
  4. streamlit/static/index.html +1 -1
  5. streamlit/static/manifest.json +300 -300
  6. streamlit/static/static/js/{ErrorOutline.esm.D2r71uaM.js → ErrorOutline.esm.j3b3OjAK.js} +1 -1
  7. streamlit/static/static/js/{FileDownload.esm.BWEHU45R.js → FileDownload.esm.DCizXv6Q.js} +1 -1
  8. streamlit/static/static/js/{FileHelper.bM5nEcHb.js → FileHelper.EpMV5UVe.js} +1 -1
  9. streamlit/static/static/js/{FormClearHelper.DrhgNNta.js → FormClearHelper.lF7Ran5M.js} +1 -1
  10. streamlit/static/static/js/{InputInstructions.DPiGX0Th.js → InputInstructions.CMvqhPhy.js} +1 -1
  11. streamlit/static/static/js/{Particles.NjZlN0Ji.js → Particles.DsGe8psi.js} +1 -1
  12. streamlit/static/static/js/{ProgressBar.BC4DXqMl.js → ProgressBar.DzoKn4D-.js} +1 -1
  13. streamlit/static/static/js/{StreamlitSyntaxHighlighter.CbRgSaN7.js → StreamlitSyntaxHighlighter.CFab0b_b.js} +1 -1
  14. streamlit/static/static/js/{TableChart.esm.gttTfh7r.js → TableChart.esm.nZsTq1Sb.js} +1 -1
  15. streamlit/static/static/js/{Toolbar.DO2JfHk1.js → Toolbar.CFMvwQYl.js} +1 -1
  16. streamlit/static/static/js/{WidgetLabelHelpIconInline.NVlzvmTZ.js → WidgetLabelHelpIconInline.D2EEUEQX.js} +1 -1
  17. streamlit/static/static/js/{base-input.CmG3KTuv.js → base-input.DKTA2QNz.js} +1 -1
  18. streamlit/static/static/js/{checkbox.cfHeGdGI.js → checkbox.D9H9J-_W.js} +1 -1
  19. streamlit/static/static/js/{createDownloadLinkElement.B59a5_bn.js → createDownloadLinkElement.DCk6EhPM.js} +1 -1
  20. streamlit/static/static/js/{data-grid-overlay-editor.DpTe47v0.js → data-grid-overlay-editor.DExrGdqs.js} +1 -1
  21. streamlit/static/static/js/{downloader.CYtKIJ9J.js → downloader.CLJ7BreF.js} +1 -1
  22. streamlit/static/static/js/{embed.Dfyy6eKR.js → embed.CxOHZWx2.js} +1 -1
  23. streamlit/static/static/js/{es6.x2A9auGg.js → es6.C99ebre4.js} +2 -2
  24. streamlit/static/static/js/{formatNumber.D8YUVHBi.js → formatNumber.D_w4fBsk.js} +1 -1
  25. streamlit/static/static/js/{iconPosition.C6Qxuo2L.js → iconPosition.Cfhw1RkE.js} +1 -1
  26. streamlit/static/static/js/{iframeResizer.contentWindow.Q0Cy4mzM.js → iframeResizer.contentWindow.BcWUIYOe.js} +1 -1
  27. streamlit/static/static/js/{index.WMC0NWRg.js → index.1AemKTSK.js} +1 -1
  28. streamlit/static/static/js/{index.DfXZgqLi.js → index.7Q3Iaebc.js} +1 -1
  29. streamlit/static/static/js/{index.DMtSM2QJ.js → index.ATP5607r.js} +1 -1
  30. streamlit/static/static/js/{index.Bs9bS4ZQ.js → index.BHx4Qw7z.js} +1 -1
  31. streamlit/static/static/js/{index.DlXiDt-m.js → index.BOGNGR9a.js} +1 -1
  32. streamlit/static/static/js/{index.BICn75_M.js → index.BWK_h3IL.js} +1 -1
  33. streamlit/static/static/js/{index.DzZhu8Ry.js → index.BXQNt1hj.js} +1 -1
  34. streamlit/static/static/js/{index.BtasgGzT.js → index.BXnQdCa5.js} +1 -1
  35. streamlit/static/static/js/{index.D2pbLWvp.js → index.BcbR2mbc.js} +1 -1
  36. streamlit/static/static/js/{index.mRYkGVRy.js → index.Bp_LrAiI.js} +1 -1
  37. streamlit/static/static/js/{index.Zffuf6-0.js → index.Bu3Lto_G.js} +1 -1
  38. streamlit/static/static/js/index.BzQChe4y.js +1 -0
  39. streamlit/static/static/js/{index.HTZptmDX.js → index.C-lnh8pI.js} +1 -1
  40. streamlit/static/static/js/{index.Bmo0a9c3.js → index.C0VFHmJN.js} +1 -1
  41. streamlit/static/static/js/{index.72U0nUaY.js → index.C7_5JMRC.js} +1 -1
  42. streamlit/static/static/js/index.C98anBCM.js +1 -0
  43. streamlit/static/static/js/{index.DFrG8naT.js → index.CBZQ_6AF.js} +1 -1
  44. streamlit/static/static/js/{index.CCkh_YSD.js → index.CFE-yHdT.js} +1 -1
  45. streamlit/static/static/js/{index.mUwcAQrC.js → index.CFtGP8pH.js} +1 -1
  46. streamlit/static/static/js/{index.DDUzbOzY.js → index.CGX2fllG.js} +1 -1
  47. streamlit/static/static/js/{index.DemMZEQt.js → index.COZICZL6.js} +1 -1
  48. streamlit/static/static/js/{index.WW20lmQl.js → index.COjurlZk.js} +1 -1
  49. streamlit/static/static/js/{index.BSULROGA.js → index.CPo5dtx7.js} +1 -1
  50. streamlit/static/static/js/{index.7BBVjqsx.js → index.Cg59Loqx.js} +1 -1
  51. streamlit/static/static/js/{index.CgFM5y1b.js → index.CiU2Tdcl.js} +1 -1
  52. streamlit/static/static/js/{index.CEB-gMZu.js → index.CrJ9KZpt.js} +1 -1
  53. streamlit/static/static/js/{index.BHzkSOU6.js → index.CrzXL2V8.js} +1 -1
  54. streamlit/static/static/js/{index.9i44yl-A.js → index.CyVBY8PG.js} +1 -1
  55. streamlit/static/static/js/{index.Dmaco99Q.js → index.D18KqoUa.js} +1 -1
  56. streamlit/static/static/js/{index.CzMaYu3-.js → index.DDx6TP95.js} +1 -1
  57. streamlit/static/static/js/{index.DMgiqc8r.js → index.DIIdzDwK.js} +1 -1
  58. streamlit/static/static/js/{index.9lrRft8u.js → index.DJ4GBc1k.js} +1 -1
  59. streamlit/static/static/js/{index.BA25ZBoD.js → index.DSSQzzPk.js} +1 -1
  60. streamlit/static/static/js/{index.4DpGzJxM.js → index.DbmtfcDm.js} +1 -1
  61. streamlit/static/static/js/{index.CWEfMTRP.js → index.DcudoGfL.js} +1 -1
  62. streamlit/static/static/js/{index.AF9wK9Wi.js → index.DiZfOR0A.js} +1 -1
  63. streamlit/static/static/js/{index.BuCGo7-5.js → index.DkSjHoXw.js} +5 -5
  64. streamlit/static/static/js/{index.CcpuNeOs.js → index.DoLorXMA.js} +1 -1
  65. streamlit/static/static/js/{index.up8HPR4v.js → index.DpnqUQVD.js} +1 -1
  66. streamlit/static/static/js/{index.DrHoCPek.js → index.Dqphk1ee.js} +2 -2
  67. streamlit/static/static/js/{index.Cto6hKVz.js → index.Ds-w0zIo.js} +1 -1
  68. streamlit/static/static/js/{index.5zBrLB5N.js → index.DuFqxjbN.js} +1 -1
  69. streamlit/static/static/js/{index.BTcImDDt.js → index.Dx8TcTHV.js} +6 -6
  70. streamlit/static/static/js/{index.DltYrNjp.js → index.V4C1Oi-F.js} +1 -1
  71. streamlit/static/static/js/{index.DyL5do6X.js → index.aJ3XRx8R.js} +1 -1
  72. streamlit/static/static/js/{index.i5tC1QD-.js → index.f_s01aPm.js} +1 -1
  73. streamlit/static/static/js/{index.4evoB7lO.js → index.gnFSTAhI.js} +1 -1
  74. streamlit/static/static/js/{index.Dm8qt8Me.js → index.mZ1qbnKs.js} +1 -1
  75. streamlit/static/static/js/{input.C76A8APa.js → input.CZPD7mCu.js} +1 -1
  76. streamlit/static/static/js/{main.CFbvktEv.js → main.CX1jAiMw.js} +1 -1
  77. streamlit/static/static/js/{memory.BkhqbxJl.js → memory.m0jC5ULx.js} +1 -1
  78. streamlit/static/static/js/{number-overlay-editor.Dpeh6_Ag.js → number-overlay-editor.Dy0iTeCo.js} +1 -1
  79. streamlit/static/static/js/{pandasStylerUtils.D8MDzfFI.js → pandasStylerUtils.D9jj-wHU.js} +1 -1
  80. streamlit/static/static/js/{sandbox.m1TYtBuF.js → sandbox.CbvG1iAz.js} +1 -1
  81. streamlit/static/static/js/{styled-components.yin3sIMA.js → styled-components.Cw3ioniY.js} +1 -1
  82. streamlit/static/static/js/{throttle.Df6MiNTy.js → throttle.CAwhGpn0.js} +1 -1
  83. streamlit/static/static/js/{timepicker.gcx4yeRx.js → timepicker.Bh3m6Pjp.js} +1 -1
  84. streamlit/static/static/js/{toConsumableArray.Ca7RO9Jm.js → toConsumableArray.DM0o32JS.js} +1 -1
  85. streamlit/static/static/js/uniqueId.DtV_RZzG.js +1 -0
  86. streamlit/static/static/js/{useBasicWidgetState.CRkPCtR5.js → useBasicWidgetState.C9zOVP8a.js} +1 -1
  87. streamlit/static/static/js/{useIntlLocale.CFOMULNz.js → useIntlLocale.Bo42aN1U.js} +1 -1
  88. streamlit/static/static/js/{useTextInputAutoExpand.9c205rhQ.js → useTextInputAutoExpand.DmyHLDxl.js} +1 -1
  89. streamlit/static/static/js/{useUpdateUiValue.SYJJuEJM.js → useUpdateUiValue.aWXWpqmw.js} +1 -1
  90. streamlit/static/static/js/{useWaveformController.CCs9fdSv.js → useWaveformController.DlE14M1X.js} +1 -1
  91. streamlit/static/static/js/{withCalculatedWidth.MG9RY_Y-.js → withCalculatedWidth.B5JFJSmG.js} +1 -1
  92. streamlit/static/static/js/{withFullScreenWrapper.BgGLtZrC.js → withFullScreenWrapper.dgVioHk1.js} +1 -1
  93. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260108.dist-info}/METADATA +1 -1
  94. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260108.dist-info}/RECORD +98 -98
  95. streamlit/static/static/js/index.Cszkm2ii.js +0 -1
  96. streamlit/static/static/js/index.xQYe72hk.js +0 -1
  97. streamlit/static/static/js/uniqueId.Bf2Hsb60.js +0 -1
  98. {streamlit_nightly-1.52.3.dev20260107.data → streamlit_nightly-1.52.3.dev20260108.data}/scripts/streamlit.cmd +0 -0
  99. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260108.dist-info}/WHEEL +0 -0
  100. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260108.dist-info}/entry_points.txt +0 -0
  101. {streamlit_nightly-1.52.3.dev20260107.dist-info → streamlit_nightly-1.52.3.dev20260108.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.CWEfMTRP.js","./index.bsVAaBS1.js","./index.CEB-gMZu.js","./index.BHzkSOU6.js","./index.Cto6hKVz.js","./index.D2pbLWvp.js","./StreamlitSyntaxHighlighter.CbRgSaN7.js","./index.Zffuf6-0.js","./pandasStylerUtils.D8MDzfFI.js","./moment.C7qA8nIE.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.72U0nUaY.js","./withFullScreenWrapper.BgGLtZrC.js","./Toolbar.DO2JfHk1.js","./index.BTcImDDt.js","./FormClearHelper.DrhgNNta.js","./index.8HslT92O.js","./main.CFbvktEv.js","./throttle.Df6MiNTy.js","./formatNumber.D8YUVHBi.js","./sprintf.DpPCfzXw.js","./formatMoment.C6Hwn6X5.js","./checkbox.cfHeGdGI.js","./createDownloadLinkElement.B59a5_bn.js","./toConsumableArray.Ca7RO9Jm.js","./FileDownload.esm.BWEHU45R.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.Dfyy6eKR.js","./threshold.CUNQbqMA.js","./value.DaKxGC7O.js","./timer.BZio6gjG.js","./TableChart.esm.gttTfh7r.js","./index.Dm8qt8Me.js","./Particles.NjZlN0Ji.js","./index.BtasgGzT.js","./useBasicWidgetState.CRkPCtR5.js","../css/index.BuwrT-ty.css","./index.WW20lmQl.js","./index.mRYkGVRy.js","./IFrameUtil.DefezniK.js","./index.9lrRft8u.js","./index.BA25ZBoD.js","./index.DemMZEQt.js","./iconPosition.C6Qxuo2L.js","./index.mUwcAQrC.js","./WidgetLabelHelpIconInline.NVlzvmTZ.js","./index.DMgiqc8r.js","./index.DFrG8naT.js","./index.CCkh_YSD.js","./ProgressBar.BC4DXqMl.js","./index.WMC0NWRg.js","./index.7BBVjqsx.js","./useWaveformController.CCs9fdSv.js","./urls.BwSlolu9.js","./index.Dmaco99Q.js","./index.AF9wK9Wi.js","./index.Bmo0a9c3.js","./withCalculatedWidth.MG9RY_Y-.js","./index.CcpuNeOs.js","./UploadFileInfo.Dr-zDST7.js","./index.xQYe72hk.js","./FileHelper.bM5nEcHb.js","./InputInstructions.DPiGX0Th.js","./useTextInputAutoExpand.9c205rhQ.js","./base-input.CmG3KTuv.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.D2r71uaM.js","./index.Cszkm2ii.js","./index.DltYrNjp.js","./index.DzZhu8Ry.js","./useIntlLocale.CFOMULNz.js","./timepicker.gcx4yeRx.js","./input.C76A8APa.js","./index.BICn75_M.js","./styled-components.yin3sIMA.js","./index.DMtSM2QJ.js","./index.DyL5do6X.js","./index.4DpGzJxM.js","./index.DlXiDt-m.js","./index.CgFM5y1b.js","./uniqueId.Bf2Hsb60.js","./index.DrHoCPek.js","./index.Bs9bS4ZQ.js","./index.DfXZgqLi.js","./index.HTZptmDX.js","./useUpdateUiValue.SYJJuEJM.js","./index.up8HPR4v.js","./index.9i44yl-A.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.DcudoGfL.js","./index.bsVAaBS1.js","./index.CrJ9KZpt.js","./index.CrzXL2V8.js","./index.Ds-w0zIo.js","./index.BcbR2mbc.js","./StreamlitSyntaxHighlighter.CFab0b_b.js","./index.Bu3Lto_G.js","./pandasStylerUtils.D9jj-wHU.js","./moment.C7qA8nIE.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.C7_5JMRC.js","./withFullScreenWrapper.dgVioHk1.js","./Toolbar.CFMvwQYl.js","./index.Dx8TcTHV.js","./FormClearHelper.lF7Ran5M.js","./index.8HslT92O.js","./main.CX1jAiMw.js","./throttle.CAwhGpn0.js","./formatNumber.D_w4fBsk.js","./sprintf.DpPCfzXw.js","./formatMoment.C6Hwn6X5.js","./checkbox.D9H9J-_W.js","./createDownloadLinkElement.DCk6EhPM.js","./toConsumableArray.DM0o32JS.js","./FileDownload.esm.DCizXv6Q.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.CxOHZWx2.js","./threshold.CUNQbqMA.js","./value.DaKxGC7O.js","./timer.BZio6gjG.js","./TableChart.esm.nZsTq1Sb.js","./index.mZ1qbnKs.js","./Particles.DsGe8psi.js","./index.BXnQdCa5.js","./useBasicWidgetState.C9zOVP8a.js","../css/index.BuwrT-ty.css","./index.COjurlZk.js","./index.Bp_LrAiI.js","./IFrameUtil.DefezniK.js","./index.DJ4GBc1k.js","./index.DSSQzzPk.js","./index.COZICZL6.js","./iconPosition.Cfhw1RkE.js","./index.CFtGP8pH.js","./WidgetLabelHelpIconInline.D2EEUEQX.js","./index.DIIdzDwK.js","./index.CBZQ_6AF.js","./index.CFE-yHdT.js","./ProgressBar.DzoKn4D-.js","./index.1AemKTSK.js","./index.Cg59Loqx.js","./useWaveformController.DlE14M1X.js","./urls.BwSlolu9.js","./index.D18KqoUa.js","./index.DiZfOR0A.js","./index.C0VFHmJN.js","./withCalculatedWidth.B5JFJSmG.js","./index.DoLorXMA.js","./UploadFileInfo.Dr-zDST7.js","./index.C98anBCM.js","./FileHelper.EpMV5UVe.js","./InputInstructions.CMvqhPhy.js","./useTextInputAutoExpand.DmyHLDxl.js","./base-input.DKTA2QNz.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.j3b3OjAK.js","./index.BzQChe4y.js","./index.V4C1Oi-F.js","./index.BXQNt1hj.js","./useIntlLocale.Bo42aN1U.js","./timepicker.Bh3m6Pjp.js","./input.CZPD7mCu.js","./index.BWK_h3IL.js","./styled-components.Cw3ioniY.js","./index.ATP5607r.js","./index.aJ3XRx8R.js","./index.DbmtfcDm.js","./index.BOGNGR9a.js","./index.CiU2Tdcl.js","./uniqueId.DtV_RZzG.js","./index.Dqphk1ee.js","./index.BHx4Qw7z.js","./index.7Q3Iaebc.js","./index.C-lnh8pI.js","./useUpdateUiValue.aWXWpqmw.js","./index.DpnqUQVD.js","./index.CyVBY8PG.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(n,i){for(var e=0;e<i.length;e++){const t=i[e];if(typeof t!="string"&&!Array.isArray(t)){for(const o in t)if(o!=="default"&&!(o in n)){const d=Object.getOwnPropertyDescriptor(t,o);d&&Object.defineProperty(n,o,d.get?d:{enumerable:!0,get:()=>t[o]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))t(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&t(p)}).observe(document,{childList:!0,subtree:!0});function e(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function t(o){if(o.ep)return;o.ep=!0;const d=e(o);fetch(o.href,d)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function getAugmentedNamespace(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var i=n.default;if(typeof i=="function"){var e=function t(){var o=!1;try{o=this instanceof t}catch{}return o?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};e.prototype=i.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(t){var o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:function(){return n[t]}})}),e}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};var hasRequiredReact_production_min;function requireReact_production_min(){if(hasRequiredReact_production_min)return react_production_min;hasRequiredReact_production_min=1;var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),t=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),$=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),M=Symbol.iterator;function H(qe){return qe===null||typeof qe!="object"?null:(qe=M&&qe[M]||qe["@@iterator"],typeof qe=="function"?qe:null)}var Z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},be=Object.assign,ye={};function we(qe,rt,He){this.props=qe,this.context=rt,this.refs=ye,this.updater=He||Z}we.prototype.isReactComponent={},we.prototype.setState=function(qe,rt){if(typeof qe!="object"&&typeof qe!="function"&&qe!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,qe,rt,"setState")},we.prototype.forceUpdate=function(qe){this.updater.enqueueForceUpdate(this,qe,"forceUpdate")};function xe(){}xe.prototype=we.prototype;function Ce(qe,rt,He){this.props=qe,this.context=rt,this.refs=ye,this.updater=He||Z}var Ne=Ce.prototype=new xe;Ne.constructor=Ce,be(Ne,we.prototype),Ne.isPureReactComponent=!0;var Fe=Array.isArray,Me=Object.prototype.hasOwnProperty,Le={current:null},ze={key:!0,ref:!0,__self:!0,__source:!0};function Ke(qe,rt,He){var Ot,Ct={},tt=null,wt=null;if(rt!=null)for(Ot in rt.ref!==void 0&&(wt=rt.ref),rt.key!==void 0&&(tt=""+rt.key),rt)Me.call(rt,Ot)&&!ze.hasOwnProperty(Ot)&&(Ct[Ot]=rt[Ot]);var gt=arguments.length-2;if(gt===1)Ct.children=He;else if(1<gt){for(var $t=Array(gt),Mt=0;Mt<gt;Mt++)$t[Mt]=arguments[Mt+2];Ct.children=$t}if(qe&&qe.defaultProps)for(Ot in gt=qe.defaultProps,gt)Ct[Ot]===void 0&&(Ct[Ot]=gt[Ot]);return{$$typeof:n,type:qe,key:tt,ref:wt,props:Ct,_owner:Le.current}}function Ve(qe,rt){return{$$typeof:n,type:qe.type,key:rt,ref:qe.ref,props:qe.props,_owner:qe._owner}}function je(qe){return typeof qe=="object"&&qe!==null&&qe.$$typeof===n}function We(qe){var rt={"=":"=0",":":"=2"};return"$"+qe.replace(/[=:]/g,function(He){return rt[He]})}var Xe=/\/+/g;function Qe(qe,rt){return typeof qe=="object"&&qe!==null&&qe.key!=null?We(""+qe.key):rt.toString(36)}function Ye(qe,rt,He,Ot,Ct){var tt=typeof qe;(tt==="undefined"||tt==="boolean")&&(qe=null);var wt=!1;if(qe===null)wt=!0;else switch(tt){case"string":case"number":wt=!0;break;case"object":switch(qe.$$typeof){case n:case i:wt=!0}}if(wt)return wt=qe,Ct=Ct(wt),qe=Ot===""?"."+Qe(wt,0):Ot,Fe(Ct)?(He="",qe!=null&&(He=qe.replace(Xe,"$&/")+"/"),Ye(Ct,rt,He,"",function(Mt){return Mt})):Ct!=null&&(je(Ct)&&(Ct=Ve(Ct,He+(!Ct.key||wt&&wt.key===Ct.key?"":(""+Ct.key).replace(Xe,"$&/")+"/")+qe)),rt.push(Ct)),1;if(wt=0,Ot=Ot===""?".":Ot+":",Fe(qe))for(var gt=0;gt<qe.length;gt++){tt=qe[gt];var $t=Ot+Qe(tt,gt);wt+=Ye(tt,rt,He,$t,Ct)}else if($t=H(qe),typeof $t=="function")for(qe=$t.call(qe),gt=0;!(tt=qe.next()).done;)tt=tt.value,$t=Ot+Qe(tt,gt++),wt+=Ye(tt,rt,He,$t,Ct);else if(tt==="object")throw rt=String(qe),Error("Objects are not valid as a React child (found: "+(rt==="[object Object]"?"object with keys {"+Object.keys(qe).join(", ")+"}":rt)+"). If you meant to render a collection of children, use an array instead.");return wt}function Ue(qe,rt,He){if(qe==null)return qe;var Ot=[],Ct=0;return Ye(qe,Ot,"","",function(tt){return rt.call(He,tt,Ct++)}),Ot}function ot(qe){if(qe._status===-1){var rt=qe._result;rt=rt(),rt.then(function(He){(qe._status===0||qe._status===-1)&&(qe._status=1,qe._result=He)},function(He){(qe._status===0||qe._status===-1)&&(qe._status=2,qe._result=He)}),qe._status===-1&&(qe._status=0,qe._result=rt)}if(qe._status===1)return qe._result.default;throw qe._result}var dt={current:null},st={transition:null},pt={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:st,ReactCurrentOwner:Le};function Be(){throw Error("act(...) is not supported in production builds of React.")}return react_production_min.Children={map:Ue,forEach:function(qe,rt,He){Ue(qe,function(){rt.apply(this,arguments)},He)},count:function(qe){var rt=0;return Ue(qe,function(){rt++}),rt},toArray:function(qe){return Ue(qe,function(rt){return rt})||[]},only:function(qe){if(!je(qe))throw Error("React.Children.only expected to receive a single React element child.");return qe}},react_production_min.Component=we,react_production_min.Fragment=e,react_production_min.Profiler=o,react_production_min.PureComponent=Ce,react_production_min.StrictMode=t,react_production_min.Suspense=y,react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pt,react_production_min.act=Be,react_production_min.cloneElement=function(qe,rt,He){if(qe==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+qe+".");var Ot=be({},qe.props),Ct=qe.key,tt=qe.ref,wt=qe._owner;if(rt!=null){if(rt.ref!==void 0&&(tt=rt.ref,wt=Le.current),rt.key!==void 0&&(Ct=""+rt.key),qe.type&&qe.type.defaultProps)var gt=qe.type.defaultProps;for($t in rt)Me.call(rt,$t)&&!ze.hasOwnProperty($t)&&(Ot[$t]=rt[$t]===void 0&&gt!==void 0?gt[$t]:rt[$t])}var $t=arguments.length-2;if($t===1)Ot.children=He;else if(1<$t){gt=Array($t);for(var Mt=0;Mt<$t;Mt++)gt[Mt]=arguments[Mt+2];Ot.children=gt}return{$$typeof:n,type:qe.type,key:Ct,ref:tt,props:Ot,_owner:wt}},react_production_min.createContext=function(qe){return qe={$$typeof:p,_currentValue:qe,_currentValue2:qe,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},qe.Provider={$$typeof:d,_context:qe},qe.Consumer=qe},react_production_min.createElement=Ke,react_production_min.createFactory=function(qe){var rt=Ke.bind(null,qe);return rt.type=qe,rt},react_production_min.createRef=function(){return{current:null}},react_production_min.forwardRef=function(qe){return{$$typeof:h,render:qe}},react_production_min.isValidElement=je,react_production_min.lazy=function(qe){return{$$typeof:E,_payload:{_status:-1,_result:qe},_init:ot}},react_production_min.memo=function(qe,rt){return{$$typeof:$,type:qe,compare:rt===void 0?null:rt}},react_production_min.startTransition=function(qe){var rt=st.transition;st.transition={};try{qe()}finally{st.transition=rt}},react_production_min.unstable_act=Be,react_production_min.useCallback=function(qe,rt){return dt.current.useCallback(qe,rt)},react_production_min.useContext=function(qe){return dt.current.useContext(qe)},react_production_min.useDebugValue=function(){},react_production_min.useDeferredValue=function(qe){return dt.current.useDeferredValue(qe)},react_production_min.useEffect=function(qe,rt){return dt.current.useEffect(qe,rt)},react_production_min.useId=function(){return dt.current.useId()},react_production_min.useImperativeHandle=function(qe,rt,He){return dt.current.useImperativeHandle(qe,rt,He)},react_production_min.useInsertionEffect=function(qe,rt){return dt.current.useInsertionEffect(qe,rt)},react_production_min.useLayoutEffect=function(qe,rt){return dt.current.useLayoutEffect(qe,rt)},react_production_min.useMemo=function(qe,rt){return dt.current.useMemo(qe,rt)},react_production_min.useReducer=function(qe,rt,He){return dt.current.useReducer(qe,rt,He)},react_production_min.useRef=function(qe){return dt.current.useRef(qe)},react_production_min.useState=function(qe){return dt.current.useState(qe)},react_production_min.useSyncExternalStore=function(qe,rt,He){return dt.current.useSyncExternalStore(qe,rt,He)},react_production_min.useTransition=function(){return dt.current.useTransition()},react_production_min.version="18.3.1",react_production_min}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production_min()),react.exports}var hasRequiredReactJsxRuntime_production_min;function requireReactJsxRuntime_production_min(){if(hasRequiredReactJsxRuntime_production_min)return reactJsxRuntime_production_min;hasRequiredReactJsxRuntime_production_min=1;var n=requireReact(),i=Symbol.for("react.element"),e=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,y,$){var E,M={},H=null,Z=null;$!==void 0&&(H=""+$),y.key!==void 0&&(H=""+y.key),y.ref!==void 0&&(Z=y.ref);for(E in y)t.call(y,E)&&!d.hasOwnProperty(E)&&(M[E]=y[E]);if(h&&h.defaultProps)for(E in y=h.defaultProps,y)M[E]===void 0&&(M[E]=y[E]);return{$$typeof:i,type:h,key:H,ref:Z,props:M,_owner:o.current}}return reactJsxRuntime_production_min.Fragment=e,reactJsxRuntime_production_min.jsx=p,reactJsxRuntime_production_min.jsxs=p,reactJsxRuntime_production_min}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production_min()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),reactExports=requireReact();const React=getDefaultExportFromCjs(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React},[reactExports]);function sheetForTag(n){if(n.sheet)return n.sheet;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].ownerNode===n)return document.styleSheets[i]}function createStyleElement(n){var i=document.createElement("style");return i.setAttribute("data-emotion",n.key),n.nonce!==void 0&&i.setAttribute("nonce",n.nonce),i.appendChild(document.createTextNode("")),i.setAttribute("data-s",""),i}var StyleSheet=(function(){function n(e){var t=this;this._insertTag=function(o){var d;t.tags.length===0?t.insertionPoint?d=t.insertionPoint.nextSibling:t.prepend?d=t.container.firstChild:d=t.before:d=t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(o,d),t.tags.push(o)},this.isSpeedy=e.speedy===void 0?!0:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var i=n.prototype;return i.hydrate=function(t){t.forEach(this._insertTag)},i.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var d=sheetForTag(o);try{d.insertRule(t,d.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(t));this.ctr++},i.flush=function(){this.tags.forEach(function(t){var o;return(o=t.parentNode)==null?void 0:o.removeChild(t)}),this.tags=[],this.ctr=0},n})(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode,assign$1=Object.assign;function hash$1(n,i){return charat(n,0)^45?(((i<<2^charat(n,0))<<2^charat(n,1))<<2^charat(n,2))<<2^charat(n,3):0}function trim(n){return n.trim()}function match(n,i){return(n=i.exec(n))?n[0]:n}function replace$1(n,i,e){return n.replace(i,e)}function indexof(n,i){return n.indexOf(i)}function charat(n,i){return n.charCodeAt(i)|0}function substr(n,i,e){return n.slice(i,e)}function strlen(n){return n.length}function sizeof(n){return n.length}function append(n,i){return i.push(n),n}function combine(n,i){return n.map(i).join("")}var line=1,column=1,length=0,position$3=0,character=0,characters="";function node$1(n,i,e,t,o,d,p){return{value:n,root:i,parent:e,type:t,props:o,children:d,line,column,length:p,return:""}}function copy(n,i){return assign$1(node$1("",null,null,"",null,null,0),n,{length:-n.length},i)}function char(){return character}function prev(){return character=position$3>0?charat(characters,--position$3):0,column--,character===10&&(column=1,line--),character}function next(){return character=position$3<length?charat(characters,position$3++):0,column++,character===10&&(column=1,line++),character}function peek$1(){return charat(characters,position$3)}function caret(){return position$3}function slice(n,i){return substr(characters,n,i)}function token(n){switch(n){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(n){return line=column=1,length=strlen(characters=n),position$3=0,[]}function dealloc(n){return characters="",n}function delimit(n){return trim(slice(position$3-1,delimiter(n===91?n+2:n===40?n+1:n)))}function whitespace$1(n){for(;(character=peek$1())&&character<33;)next();return token(n)>2||token(character)>3?"":" "}function escaping(n,i){for(;--i&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(n,caret()+(i<6&&peek$1()==32&&next()==32))}function delimiter(n){for(;next();)switch(character){case n:return position$3;case 34:case 39:n!==34&&n!==39&&delimiter(character);break;case 40:n===41&&delimiter(n);break;case 92:next();break}return position$3}function commenter(n,i){for(;next()&&n+character!==57;)if(n+character===84&&peek$1()===47)break;return"/*"+slice(i,position$3-1)+"*"+from(n===47?n:next())}function identifier(n){for(;!token(peek$1());)next();return slice(n,position$3)}function compile(n){return dealloc(parse$3("",null,null,null,[""],n=alloc(n),0,[0],n))}function parse$3(n,i,e,t,o,d,p,h,y){for(var $=0,E=0,M=p,H=0,Z=0,be=0,ye=1,we=1,xe=1,Ce=0,Ne="",Fe=o,Me=d,Le=t,ze=Ne;we;)switch(be=Ce,Ce=next()){case 40:if(be!=108&&charat(ze,M-1)==58){indexof(ze+=replace$1(delimit(Ce),"&","&\f"),"&\f")!=-1&&(xe=-1);break}case 34:case 39:case 91:ze+=delimit(Ce);break;case 9:case 10:case 13:case 32:ze+=whitespace$1(be);break;case 92:ze+=escaping(caret()-1,7);continue;case 47:switch(peek$1()){case 42:case 47:append(comment(commenter(next(),caret()),i,e),y);break;default:ze+="/"}break;case 123*ye:h[$++]=strlen(ze)*xe;case 125*ye:case 59:case 0:switch(Ce){case 0:case 125:we=0;case 59+E:xe==-1&&(ze=replace$1(ze,/\f/g,"")),Z>0&&strlen(ze)-M&&append(Z>32?declaration(ze+";",t,e,M-1):declaration(replace$1(ze," ","")+";",t,e,M-2),y);break;case 59:ze+=";";default:if(append(Le=ruleset(ze,i,e,$,E,o,h,Ne,Fe=[],Me=[],M),d),Ce===123)if(E===0)parse$3(ze,i,Le,Le,Fe,d,M,h,Me);else switch(H===99&&charat(ze,3)===110?100:H){case 100:case 108:case 109:case 115:parse$3(n,Le,Le,t&&append(ruleset(n,Le,Le,0,0,o,h,Ne,o,Fe=[],M),Me),o,Me,M,h,t?Fe:Me);break;default:parse$3(ze,Le,Le,Le,[""],Me,0,h,Me)}}$=E=Z=0,ye=xe=1,Ne=ze="",M=p;break;case 58:M=1+strlen(ze),Z=be;default:if(ye<1){if(Ce==123)--ye;else if(Ce==125&&ye++==0&&prev()==125)continue}switch(ze+=from(Ce),Ce*ye){case 38:xe=E>0?1:(ze+="\f",-1);break;case 44:h[$++]=(strlen(ze)-1)*xe,xe=1;break;case 64:peek$1()===45&&(ze+=delimit(next())),H=peek$1(),E=M=strlen(Ne=ze+=identifier(caret())),Ce++;break;case 45:be===45&&strlen(ze)==2&&(ye=0)}}return d}function ruleset(n,i,e,t,o,d,p,h,y,$,E){for(var M=o-1,H=o===0?d:[""],Z=sizeof(H),be=0,ye=0,we=0;be<t;++be)for(var xe=0,Ce=substr(n,M+1,M=abs(ye=p[be])),Ne=n;xe<Z;++xe)(Ne=trim(ye>0?H[xe]+" "+Ce:replace$1(Ce,/&\f/g,H[xe])))&&(y[we++]=Ne);return node$1(n,i,e,o===0?RULESET:h,y,$,E)}function comment(n,i,e){return node$1(n,i,e,COMMENT,from(char()),substr(n,2,-2),0)}function declaration(n,i,e,t){return node$1(n,i,e,DECLARATION,substr(n,0,t),substr(n,t+1,-1),t)}function serialize$2(n,i){for(var e="",t=sizeof(n),o=0;o<t;o++)e+=i(n[o],o,n,i)||"";return e}function stringify$2(n,i,e,t){switch(n.type){case LAYER:if(n.children.length)break;case IMPORT:case DECLARATION:return n.return=n.return||n.value;case COMMENT:return"";case KEYFRAMES:return n.return=n.value+"{"+serialize$2(n.children,t)+"}";case RULESET:n.value=n.props.join(",")}return strlen(e=serialize$2(n.children,t))?n.return=n.value+"{"+e+"}":""}function middleware(n){var i=sizeof(n);return function(e,t,o,d){for(var p="",h=0;h<i;h++)p+=n[h](e,t,o,d)||"";return p}}function rulesheet(n){return function(i){i.root||(i=i.return)&&n(i)}}var weakMemoize=function(i){var e=new WeakMap;return function(t){if(e.has(t))return e.get(t);var o=i(t);return e.set(t,o),o}};function memoize$1(n){var i=Object.create(null);return function(e){return i[e]===void 0&&(i[e]=n(e)),i[e]}}var identifierWithPointTracking=function(i,e,t){for(var o=0,d=0;o=d,d=peek$1(),o===38&&d===12&&(e[t]=1),!token(d);)next();return slice(i,position$3)},toRules=function(i,e){var t=-1,o=44;do switch(token(o)){case 0:o===38&&peek$1()===12&&(e[t]=1),i[t]+=identifierWithPointTracking(position$3-1,e,t);break;case 2:i[t]+=delimit(o);break;case 4:if(o===44){i[++t]=peek$1()===58?"&\f":"",e[t]=i[t].length;break}default:i[t]+=from(o)}while(o=next());return i},getRules=function(i,e){return dealloc(toRules(alloc(i),e))},fixedElements=new WeakMap,compat=function(i){if(!(i.type!=="rule"||!i.parent||i.length<1)){for(var e=i.value,t=i.parent,o=i.column===t.column&&i.line===t.line;t.type!=="rule";)if(t=t.parent,!t)return;if(!(i.props.length===1&&e.charCodeAt(0)!==58&&!fixedElements.get(t))&&!o){fixedElements.set(i,!0);for(var d=[],p=getRules(e,d),h=t.props,y=0,$=0;y<p.length;y++)for(var E=0;E<h.length;E++,$++)i.props[$]=d[y]?p[y].replace(/&\f/g,h[E]):h[E]+" "+p[y]}}},removeLabel=function(i){if(i.type==="decl"){var e=i.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(i.return="",i.value="")}};function prefix$1(n,i){switch(hash$1(n,i)){case 5103:return WEBKIT+"print-"+n+n;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+n+n;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+n+MOZ+n+MS+n+n;case 6828:case 4268:return WEBKIT+n+MS+n+n;case 6165:return WEBKIT+n+MS+"flex-"+n+n;case 5187:return WEBKIT+n+replace$1(n,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+n;case 5443:return WEBKIT+n+MS+"flex-item-"+replace$1(n,/flex-|-self/,"")+n;case 4675:return WEBKIT+n+MS+"flex-line-pack"+replace$1(n,/align-content|flex-|-self/,"")+n;case 5548:return WEBKIT+n+MS+replace$1(n,"shrink","negative")+n;case 5292:return WEBKIT+n+MS+replace$1(n,"basis","preferred-size")+n;case 6060:return WEBKIT+"box-"+replace$1(n,"-grow","")+WEBKIT+n+MS+replace$1(n,"grow","positive")+n;case 4554:return WEBKIT+replace$1(n,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+n;case 6187:return replace$1(replace$1(replace$1(n,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),n,"")+n;case 5495:case 3959:return replace$1(n,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$1(replace$1(n,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+n+n;case 4095:case 3583:case 4068:case 2532:return replace$1(n,/(.+)-inline(.+)/,WEBKIT+"$1$2")+n;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(n)-1-i>6)switch(charat(n,i+1)){case 109:if(charat(n,i+4)!==45)break;case 102:return replace$1(n,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(n,i+3)==108?"$3":"$2-$3"))+n;case 115:return~indexof(n,"stretch")?prefix$1(replace$1(n,"stretch","fill-available"),i)+n:n}break;case 4949:if(charat(n,i+1)!==115)break;case 6444:switch(charat(n,strlen(n)-3-(~indexof(n,"!important")&&10))){case 107:return replace$1(n,":",":"+WEBKIT)+n;case 101:return replace$1(n,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(n,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+n}break;case 5936:switch(charat(n,i+11)){case 114:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"tb")+n;case 108:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"tb-rl")+n;case 45:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"lr")+n}return WEBKIT+n+MS+n+n}return n}var prefixer=function(i,e,t,o){if(i.length>-1&&!i.return)switch(i.type){case DECLARATION:i.return=prefix$1(i.value,i.length);break;case KEYFRAMES:return serialize$2([copy(i,{value:replace$1(i.value,"@","@"+WEBKIT)})],o);case RULESET:if(i.length)return combine(i.props,function(d){switch(match(d,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize$2([copy(i,{props:[replace$1(d,/:(read-\w+)/,":"+MOZ+"$1")]})],o);case"::placeholder":return serialize$2([copy(i,{props:[replace$1(d,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(i,{props:[replace$1(d,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(i,{props:[replace$1(d,/:(plac\w+)/,MS+"input-$1")]})],o)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(i){var e=i.key;if(e==="css"){var t=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(t,function(ye){var we=ye.getAttribute("data-emotion");we.indexOf(" ")!==-1&&(document.head.appendChild(ye),ye.setAttribute("data-s",""))})}var o=i.stylisPlugins||defaultStylisPlugins,d={},p,h=[];p=i.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(ye){for(var we=ye.getAttribute("data-emotion").split(" "),xe=1;xe<we.length;xe++)d[we[xe]]=!0;h.push(ye)});var y,$=[compat,removeLabel];{var E,M=[stringify$2,rulesheet(function(ye){E.insert(ye)})],H=middleware($.concat(o,M)),Z=function(we){return serialize$2(compile(we),H)};y=function(we,xe,Ce,Ne){E=Ce,Z(we?we+"{"+xe.styles+"}":xe.styles),Ne&&(be.inserted[xe.name]=!0)}}var be={key:e,sheet:new StyleSheet({key:e,container:p,nonce:i.nonce,speedy:i.speedy,prepend:i.prepend,insertionPoint:i.insertionPoint}),nonce:i.nonce,inserted:d,registered:{},insert:y};return be.sheet.hydrate(h),be};function _extends$A(){return _extends$A=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)({}).hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$A.apply(null,arguments)}var reactIs$1={exports:{}},reactIs_production_min$1={};var hasRequiredReactIs_production_min$1;function requireReactIs_production_min$1(){if(hasRequiredReactIs_production_min$1)return reactIs_production_min$1;hasRequiredReactIs_production_min$1=1;var n=typeof Symbol=="function"&&Symbol.for,i=n?Symbol.for("react.element"):60103,e=n?Symbol.for("react.portal"):60106,t=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,d=n?Symbol.for("react.profiler"):60114,p=n?Symbol.for("react.provider"):60109,h=n?Symbol.for("react.context"):60110,y=n?Symbol.for("react.async_mode"):60111,$=n?Symbol.for("react.concurrent_mode"):60111,E=n?Symbol.for("react.forward_ref"):60112,M=n?Symbol.for("react.suspense"):60113,H=n?Symbol.for("react.suspense_list"):60120,Z=n?Symbol.for("react.memo"):60115,be=n?Symbol.for("react.lazy"):60116,ye=n?Symbol.for("react.block"):60121,we=n?Symbol.for("react.fundamental"):60117,xe=n?Symbol.for("react.responder"):60118,Ce=n?Symbol.for("react.scope"):60119;function Ne(Me){if(typeof Me=="object"&&Me!==null){var Le=Me.$$typeof;switch(Le){case i:switch(Me=Me.type,Me){case y:case $:case t:case d:case o:case M:return Me;default:switch(Me=Me&&Me.$$typeof,Me){case h:case E:case be:case Z:case p:return Me;default:return Le}}case e:return Le}}}function Fe(Me){return Ne(Me)===$}return reactIs_production_min$1.AsyncMode=y,reactIs_production_min$1.ConcurrentMode=$,reactIs_production_min$1.ContextConsumer=h,reactIs_production_min$1.ContextProvider=p,reactIs_production_min$1.Element=i,reactIs_production_min$1.ForwardRef=E,reactIs_production_min$1.Fragment=t,reactIs_production_min$1.Lazy=be,reactIs_production_min$1.Memo=Z,reactIs_production_min$1.Portal=e,reactIs_production_min$1.Profiler=d,reactIs_production_min$1.StrictMode=o,reactIs_production_min$1.Suspense=M,reactIs_production_min$1.isAsyncMode=function(Me){return Fe(Me)||Ne(Me)===y},reactIs_production_min$1.isConcurrentMode=Fe,reactIs_production_min$1.isContextConsumer=function(Me){return Ne(Me)===h},reactIs_production_min$1.isContextProvider=function(Me){return Ne(Me)===p},reactIs_production_min$1.isElement=function(Me){return typeof Me=="object"&&Me!==null&&Me.$$typeof===i},reactIs_production_min$1.isForwardRef=function(Me){return Ne(Me)===E},reactIs_production_min$1.isFragment=function(Me){return Ne(Me)===t},reactIs_production_min$1.isLazy=function(Me){return Ne(Me)===be},reactIs_production_min$1.isMemo=function(Me){return Ne(Me)===Z},reactIs_production_min$1.isPortal=function(Me){return Ne(Me)===e},reactIs_production_min$1.isProfiler=function(Me){return Ne(Me)===d},reactIs_production_min$1.isStrictMode=function(Me){return Ne(Me)===o},reactIs_production_min$1.isSuspense=function(Me){return Ne(Me)===M},reactIs_production_min$1.isValidElementType=function(Me){return typeof Me=="string"||typeof Me=="function"||Me===t||Me===$||Me===d||Me===o||Me===M||Me===H||typeof Me=="object"&&Me!==null&&(Me.$$typeof===be||Me.$$typeof===Z||Me.$$typeof===p||Me.$$typeof===h||Me.$$typeof===E||Me.$$typeof===we||Me.$$typeof===xe||Me.$$typeof===Ce||Me.$$typeof===ye)},reactIs_production_min$1.typeOf=Ne,reactIs_production_min$1}var hasRequiredReactIs$1;function requireReactIs$1(){return hasRequiredReactIs$1||(hasRequiredReactIs$1=1,reactIs$1.exports=requireReactIs_production_min$1()),reactIs$1.exports}var hoistNonReactStatics_cjs,hasRequiredHoistNonReactStatics_cjs;function requireHoistNonReactStatics_cjs(){if(hasRequiredHoistNonReactStatics_cjs)return hoistNonReactStatics_cjs;hasRequiredHoistNonReactStatics_cjs=1;var n=requireReactIs$1(),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},t={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},d={};d[n.ForwardRef]=t,d[n.Memo]=o;function p(be){return n.isMemo(be)?o:d[be.$$typeof]||i}var h=Object.defineProperty,y=Object.getOwnPropertyNames,$=Object.getOwnPropertySymbols,E=Object.getOwnPropertyDescriptor,M=Object.getPrototypeOf,H=Object.prototype;function Z(be,ye,we){if(typeof ye!="string"){if(H){var xe=M(ye);xe&&xe!==H&&Z(be,xe,we)}var Ce=y(ye);$&&(Ce=Ce.concat($(ye)));for(var Ne=p(be),Fe=p(ye),Me=0;Me<Ce.length;++Me){var Le=Ce[Me];if(!e[Le]&&!(we&&we[Le])&&!(Fe&&Fe[Le])&&!(Ne&&Ne[Le])){var ze=E(ye,Le);try{h(be,Le,ze)}catch{}}}}return be}return hoistNonReactStatics_cjs=Z,hoistNonReactStatics_cjs}var hoistNonReactStatics_cjsExports=requireHoistNonReactStatics_cjs();const hoistNonReactStatics=getDefaultExportFromCjs(hoistNonReactStatics_cjsExports);var isBrowser$2=!0;function getRegisteredStyles(n,i,e){var t="";return e.split(" ").forEach(function(o){n[o]!==void 0?i.push(n[o]+";"):o&&(t+=o+" ")}),t}var registerStyles=function(i,e,t){var o=i.key+"-"+e.name;(t===!1||isBrowser$2===!1)&&i.registered[o]===void 0&&(i.registered[o]=e.styles)},insertStyles=function(i,e,t){registerStyles(i,e,t);var o=i.key+"-"+e.name;if(i.inserted[e.name]===void 0){var d=e;do i.insert(e===d?"."+o:"",d,i.sheet,!0),d=d.next;while(d!==void 0)}};function murmur2(n){for(var i=0,e,t=0,o=n.length;o>=4;++t,o-=4)e=n.charCodeAt(t)&255|(n.charCodeAt(++t)&255)<<8|(n.charCodeAt(++t)&255)<<16|(n.charCodeAt(++t)&255)<<24,e=(e&65535)*1540483477+((e>>>16)*59797<<16),e^=e>>>24,i=(e&65535)*1540483477+((e>>>16)*59797<<16)^(i&65535)*1540483477+((i>>>16)*59797<<16);switch(o){case 3:i^=(n.charCodeAt(t+2)&255)<<16;case 2:i^=(n.charCodeAt(t+1)&255)<<8;case 1:i^=n.charCodeAt(t)&255,i=(i&65535)*1540483477+((i>>>16)*59797<<16)}return i^=i>>>13,i=(i&65535)*1540483477+((i>>>16)*59797<<16),((i^i>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(i){return i.charCodeAt(1)===45},isProcessableValue=function(i){return i!=null&&typeof i!="boolean"},processStyleName=memoize$1(function(n){return isCustomProperty(n)?n:n.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(i,e){switch(i){case"animation":case"animationName":if(typeof e=="string")return e.replace(animationRegex,function(t,o,d){return cursor$1={name:o,styles:d,next:cursor$1},o})}return unitlessKeys[i]!==1&&!isCustomProperty(i)&&typeof e=="number"&&e!==0?e+"px":e};function handleInterpolation(n,i,e){if(e==null)return"";var t=e;if(t.__emotion_styles!==void 0)return t;switch(typeof e){case"boolean":return"";case"object":{var o=e;if(o.anim===1)return cursor$1={name:o.name,styles:o.styles,next:cursor$1},o.name;var d=e;if(d.styles!==void 0){var p=d.next;if(p!==void 0)for(;p!==void 0;)cursor$1={name:p.name,styles:p.styles,next:cursor$1},p=p.next;var h=d.styles+";";return h}return createStringFromObject(n,i,e)}case"function":{if(n!==void 0){var y=cursor$1,$=e(n);return cursor$1=y,handleInterpolation(n,i,$)}break}}var E=e;if(i==null)return E;var M=i[E];return M!==void 0?M:E}function createStringFromObject(n,i,e){var t="";if(Array.isArray(e))for(var o=0;o<e.length;o++)t+=handleInterpolation(n,i,e[o])+";";else for(var d in e){var p=e[d];if(typeof p!="object"){var h=p;i!=null&&i[h]!==void 0?t+=d+"{"+i[h]+"}":isProcessableValue(h)&&(t+=processStyleName(d)+":"+processStyleValue(d,h)+";")}else if(Array.isArray(p)&&typeof p[0]=="string"&&(i==null||i[p[0]]===void 0))for(var y=0;y<p.length;y++)isProcessableValue(p[y])&&(t+=processStyleName(d)+":"+processStyleValue(d,p[y])+";");else{var $=handleInterpolation(n,i,p);switch(d){case"animation":case"animationName":{t+=processStyleName(d)+":"+$+";";break}default:t+=d+"{"+$+"}"}}}return t}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor$1;function serializeStyles(n,i,e){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var t=!0,o="";cursor$1=void 0;var d=n[0];if(d==null||d.raw===void 0)t=!1,o+=handleInterpolation(e,i,d);else{var p=d;o+=p[0]}for(var h=1;h<n.length;h++)if(o+=handleInterpolation(e,i,n[h]),t){var y=d;o+=y[h]}labelPattern.lastIndex=0;for(var $="",E;(E=labelPattern.exec(o))!==null;)$+="-"+E[1];var M=murmur2(o)+$;return{name:M,styles:o,next:cursor$1}}var syncFallback=function(i){return i()},useInsertionEffect=React$1.useInsertionEffect?React$1.useInsertionEffect:!1,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect||syncFallback,useInsertionEffectWithLayoutFallback=useInsertionEffect||reactExports.useLayoutEffect,EmotionCacheContext=reactExports.createContext(typeof HTMLElement<"u"?createCache({key:"css"}):null),CacheProvider=EmotionCacheContext.Provider,withEmotionCache=function(i){return reactExports.forwardRef(function(e,t){var o=reactExports.useContext(EmotionCacheContext);return i(e,o,t)})},ThemeContext$2=reactExports.createContext({}),useTheme=function(){return reactExports.useContext(ThemeContext$2)},getTheme=function(i,e){if(typeof e=="function"){var t=e(i);return t}return _extends$A({},i,e)},createCacheWithTheme=weakMemoize(function(n){return weakMemoize(function(i){return getTheme(n,i)})}),ThemeProvider$2=function(i){var e=reactExports.useContext(ThemeContext$2);return i.theme!==e&&(e=createCacheWithTheme(e)(i.theme)),reactExports.createElement(ThemeContext$2.Provider,{value:e},i.children)},hasOwn={}.hasOwnProperty,typePropName="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",createEmotionProps=function(i,e){var t={};for(var o in e)hasOwn.call(e,o)&&(t[o]=e[o]);return t[typePropName]=i,t},Insertion$1=function(i){var e=i.cache,t=i.serialized,o=i.isStringTag;return registerStyles(e,t,o),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(e,t,o)}),null},Emotion=withEmotionCache(function(n,i,e){var t=n.css;typeof t=="string"&&i.registered[t]!==void 0&&(t=i.registered[t]);var o=n[typePropName],d=[t],p="";typeof n.className=="string"?p=getRegisteredStyles(i.registered,d,n.className):n.className!=null&&(p=n.className+" ");var h=serializeStyles(d,void 0,reactExports.useContext(ThemeContext$2));p+=i.key+"-"+h.name;var y={};for(var $ in n)hasOwn.call(n,$)&&$!=="css"&&$!==typePropName&&(y[$]=n[$]);return y.className=p,e&&(y.ref=e),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion$1,{cache:i,serialized:h,isStringTag:typeof o=="string"}),reactExports.createElement(o,y))}),Emotion$1=Emotion,Fragment=jsxRuntimeExports.Fragment,jsx$1=function(i,e,t){return hasOwn.call(e,"css")?jsxRuntimeExports.jsx(Emotion$1,createEmotionProps(i,e),t):jsxRuntimeExports.jsx(i,e,t)},jsxs=function(i,e,t){return hasOwn.call(e,"css")?jsxRuntimeExports.jsxs(Emotion$1,createEmotionProps(i,e),t):jsxRuntimeExports.jsxs(i,e,t)},loglevel$1={exports:{}},loglevel=loglevel$1.exports,hasRequiredLoglevel;function requireLoglevel(){return hasRequiredLoglevel||(hasRequiredLoglevel=1,(function(n){(function(i,e){n.exports?n.exports=e():i.log=e()})(loglevel,function(){var i=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],d={},p=null;function h(ye,we){var xe=ye[we];if(typeof xe.bind=="function")return xe.bind(ye);try{return Function.prototype.bind.call(xe,ye)}catch{return function(){return Function.prototype.apply.apply(xe,[ye,arguments])}}}function y(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function $(ye){return ye==="debug"&&(ye="log"),typeof console===e?!1:ye==="trace"&&t?y:console[ye]!==void 0?h(console,ye):console.log!==void 0?h(console,"log"):i}function E(){for(var ye=this.getLevel(),we=0;we<o.length;we++){var xe=o[we];this[xe]=we<ye?i:this.methodFactory(xe,ye,this.name)}if(this.log=this.debug,typeof console===e&&ye<this.levels.SILENT)return"No console available for logging"}function M(ye){return function(){typeof console!==e&&(E.call(this),this[ye].apply(this,arguments))}}function H(ye,we,xe){return $(ye)||M.apply(this,arguments)}function Z(ye,we){var xe=this,Ce,Ne,Fe,Me="loglevel";typeof ye=="string"?Me+=":"+ye:typeof ye=="symbol"&&(Me=void 0);function Le(We){var Xe=(o[We]||"silent").toUpperCase();if(!(typeof window===e||!Me)){try{window.localStorage[Me]=Xe;return}catch{}try{window.document.cookie=encodeURIComponent(Me)+"="+Xe+";"}catch{}}}function ze(){var We;if(!(typeof window===e||!Me)){try{We=window.localStorage[Me]}catch{}if(typeof We===e)try{var Xe=window.document.cookie,Qe=encodeURIComponent(Me),Ye=Xe.indexOf(Qe+"=");Ye!==-1&&(We=/^([^;]+)/.exec(Xe.slice(Ye+Qe.length+1))[1])}catch{}return xe.levels[We]===void 0&&(We=void 0),We}}function Ke(){if(!(typeof window===e||!Me)){try{window.localStorage.removeItem(Me)}catch{}try{window.document.cookie=encodeURIComponent(Me)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function Ve(We){var Xe=We;if(typeof Xe=="string"&&xe.levels[Xe.toUpperCase()]!==void 0&&(Xe=xe.levels[Xe.toUpperCase()]),typeof Xe=="number"&&Xe>=0&&Xe<=xe.levels.SILENT)return Xe;throw new TypeError("log.setLevel() called with invalid level: "+We)}xe.name=ye,xe.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},xe.methodFactory=we||H,xe.getLevel=function(){return Fe??Ne??Ce},xe.setLevel=function(We,Xe){return Fe=Ve(We),Xe!==!1&&Le(Fe),E.call(xe)},xe.setDefaultLevel=function(We){Ne=Ve(We),ze()||xe.setLevel(We,!1)},xe.resetLevel=function(){Fe=null,Ke(),E.call(xe)},xe.enableAll=function(We){xe.setLevel(xe.levels.TRACE,We)},xe.disableAll=function(We){xe.setLevel(xe.levels.SILENT,We)},xe.rebuild=function(){if(p!==xe&&(Ce=Ve(p.getLevel())),E.call(xe),p===xe)for(var We in d)d[We].rebuild()},Ce=Ve(p?p.getLevel():"WARN");var je=ze();je!=null&&(Fe=Ve(je)),E.call(xe)}p=new Z,p.getLogger=function(we){if(typeof we!="symbol"&&typeof we!="string"||we==="")throw new TypeError("You must supply a name when creating a logger.");var xe=d[we];return xe||(xe=d[we]=new Z(we,p.methodFactory)),xe};var be=typeof window!==e?window.log:void 0;return p.noConflict=function(){return typeof window!==e&&window.log===p&&(window.log=be),p},p.getLoggers=function(){return d},p.default=p,p})})(loglevel$1)),loglevel$1.exports}var loglevelExports=requireLoglevel(),client={},reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};var hasRequiredScheduler_production_min;function requireScheduler_production_min(){return hasRequiredScheduler_production_min||(hasRequiredScheduler_production_min=1,(function(n){function i(st,pt){var Be=st.length;st.push(pt);e:for(;0<Be;){var qe=Be-1>>>1,rt=st[qe];if(0<o(rt,pt))st[qe]=pt,st[Be]=rt,Be=qe;else break e}}function e(st){return st.length===0?null:st[0]}function t(st){if(st.length===0)return null;var pt=st[0],Be=st.pop();if(Be!==pt){st[0]=Be;e:for(var qe=0,rt=st.length,He=rt>>>1;qe<He;){var Ot=2*(qe+1)-1,Ct=st[Ot],tt=Ot+1,wt=st[tt];if(0>o(Ct,Be))tt<rt&&0>o(wt,Ct)?(st[qe]=wt,st[tt]=Be,qe=tt):(st[qe]=Ct,st[Ot]=Be,qe=Ot);else if(tt<rt&&0>o(wt,Be))st[qe]=wt,st[tt]=Be,qe=tt;else break e}}return pt}function o(st,pt){var Be=st.sortIndex-pt.sortIndex;return Be!==0?Be:st.id-pt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var p=Date,h=p.now();n.unstable_now=function(){return p.now()-h}}var y=[],$=[],E=1,M=null,H=3,Z=!1,be=!1,ye=!1,we=typeof setTimeout=="function"?setTimeout:null,xe=typeof clearTimeout=="function"?clearTimeout:null,Ce=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ne(st){for(var pt=e($);pt!==null;){if(pt.callback===null)t($);else if(pt.startTime<=st)t($),pt.sortIndex=pt.expirationTime,i(y,pt);else break;pt=e($)}}function Fe(st){if(ye=!1,Ne(st),!be)if(e(y)!==null)be=!0,ot(Me);else{var pt=e($);pt!==null&&dt(Fe,pt.startTime-st)}}function Me(st,pt){be=!1,ye&&(ye=!1,xe(Ke),Ke=-1),Z=!0;var Be=H;try{for(Ne(pt),M=e(y);M!==null&&(!(M.expirationTime>pt)||st&&!We());){var qe=M.callback;if(typeof qe=="function"){M.callback=null,H=M.priorityLevel;var rt=qe(M.expirationTime<=pt);pt=n.unstable_now(),typeof rt=="function"?M.callback=rt:M===e(y)&&t(y),Ne(pt)}else t(y);M=e(y)}if(M!==null)var He=!0;else{var Ot=e($);Ot!==null&&dt(Fe,Ot.startTime-pt),He=!1}return He}finally{M=null,H=Be,Z=!1}}var Le=!1,ze=null,Ke=-1,Ve=5,je=-1;function We(){return!(n.unstable_now()-je<Ve)}function Xe(){if(ze!==null){var st=n.unstable_now();je=st;var pt=!0;try{pt=ze(!0,st)}finally{pt?Qe():(Le=!1,ze=null)}}else Le=!1}var Qe;if(typeof Ce=="function")Qe=function(){Ce(Xe)};else if(typeof MessageChannel<"u"){var Ye=new MessageChannel,Ue=Ye.port2;Ye.port1.onmessage=Xe,Qe=function(){Ue.postMessage(null)}}else Qe=function(){we(Xe,0)};function ot(st){ze=st,Le||(Le=!0,Qe())}function dt(st,pt){Ke=we(function(){st(n.unstable_now())},pt)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(st){st.callback=null},n.unstable_continueExecution=function(){be||Z||(be=!0,ot(Me))},n.unstable_forceFrameRate=function(st){0>st||125<st?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ve=0<st?Math.floor(1e3/st):5},n.unstable_getCurrentPriorityLevel=function(){return H},n.unstable_getFirstCallbackNode=function(){return e(y)},n.unstable_next=function(st){switch(H){case 1:case 2:case 3:var pt=3;break;default:pt=H}var Be=H;H=pt;try{return st()}finally{H=Be}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(st,pt){switch(st){case 1:case 2:case 3:case 4:case 5:break;default:st=3}var Be=H;H=st;try{return pt()}finally{H=Be}},n.unstable_scheduleCallback=function(st,pt,Be){var qe=n.unstable_now();switch(typeof Be=="object"&&Be!==null?(Be=Be.delay,Be=typeof Be=="number"&&0<Be?qe+Be:qe):Be=qe,st){case 1:var rt=-1;break;case 2:rt=250;break;case 5:rt=1073741823;break;case 4:rt=1e4;break;default:rt=5e3}return rt=Be+rt,st={id:E++,callback:pt,priorityLevel:st,startTime:Be,expirationTime:rt,sortIndex:-1},Be>qe?(st.sortIndex=Be,i($,st),e(y)===null&&st===e($)&&(ye?(xe(Ke),Ke=-1):ye=!0,dt(Fe,Be-qe))):(st.sortIndex=rt,i(y,st),be||Z||(be=!0,ot(Me))),st},n.unstable_shouldYield=We,n.unstable_wrapCallback=function(st){var pt=H;return function(){var Be=H;H=pt;try{return st.apply(this,arguments)}finally{H=Be}}}})(scheduler_production_min)),scheduler_production_min}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production_min()),scheduler.exports}var hasRequiredReactDom_production_min;function requireReactDom_production_min(){if(hasRequiredReactDom_production_min)return reactDom_production_min;hasRequiredReactDom_production_min=1;var n=requireReact(),i=requireScheduler();function e(g){for(var k="https://reactjs.org/docs/error-decoder.html?invariant="+g,X=1;X<arguments.length;X++)k+="&args[]="+encodeURIComponent(arguments[X]);return"Minified React error #"+g+"; visit "+k+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=new Set,o={};function d(g,k){p(g,k),p(g+"Capture",k)}function p(g,k){for(o[g]=k,g=0;g<k.length;g++)t.add(k[g])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,$=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,E={},M={};function H(g){return y.call(M,g)?!0:y.call(E,g)?!1:$.test(g)?M[g]=!0:(E[g]=!0,!1)}function Z(g,k,X,ve){if(X!==null&&X.type===0)return!1;switch(typeof k){case"function":case"symbol":return!0;case"boolean":return ve?!1:X!==null?!X.acceptsBooleans:(g=g.toLowerCase().slice(0,5),g!=="data-"&&g!=="aria-");default:return!1}}function be(g,k,X,ve){if(k===null||typeof k>"u"||Z(g,k,X,ve))return!0;if(ve)return!1;if(X!==null)switch(X.type){case 3:return!k;case 4:return k===!1;case 5:return isNaN(k);case 6:return isNaN(k)||1>k}return!1}function ye(g,k,X,ve,$e,Ie,De){this.acceptsBooleans=k===2||k===3||k===4,this.attributeName=ve,this.attributeNamespace=$e,this.mustUseProperty=X,this.propertyName=g,this.type=k,this.sanitizeURL=Ie,this.removeEmptyString=De}var we={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(g){we[g]=new ye(g,0,!1,g,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(g){var k=g[0];we[k]=new ye(k,1,!1,g[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(g){we[g]=new ye(g,2,!1,g.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(g){we[g]=new ye(g,2,!1,g,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(g){we[g]=new ye(g,3,!1,g.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(g){we[g]=new ye(g,3,!0,g,null,!1,!1)}),["capture","download"].forEach(function(g){we[g]=new ye(g,4,!1,g,null,!1,!1)}),["cols","rows","size","span"].forEach(function(g){we[g]=new ye(g,6,!1,g,null,!1,!1)}),["rowSpan","start"].forEach(function(g){we[g]=new ye(g,5,!1,g.toLowerCase(),null,!1,!1)});var xe=/[\-:]([a-z])/g;function Ce(g){return g[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(g){we[g]=new ye(g,1,!1,g.toLowerCase(),null,!1,!1)}),we.xlinkHref=new ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(g){we[g]=new ye(g,1,!1,g.toLowerCase(),null,!0,!0)});function Ne(g,k,X,ve){var $e=we.hasOwnProperty(k)?we[k]:null;($e!==null?$e.type!==0:ve||!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N")&&(be(k,X,$e,ve)&&(X=null),ve||$e===null?H(k)&&(X===null?g.removeAttribute(k):g.setAttribute(k,""+X)):$e.mustUseProperty?g[$e.propertyName]=X===null?$e.type===3?!1:"":X:(k=$e.attributeName,ve=$e.attributeNamespace,X===null?g.removeAttribute(k):($e=$e.type,X=$e===3||$e===4&&X===!0?"":""+X,ve?g.setAttributeNS(ve,k,X):g.setAttribute(k,X))))}var Fe=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Me=Symbol.for("react.element"),Le=Symbol.for("react.portal"),ze=Symbol.for("react.fragment"),Ke=Symbol.for("react.strict_mode"),Ve=Symbol.for("react.profiler"),je=Symbol.for("react.provider"),We=Symbol.for("react.context"),Xe=Symbol.for("react.forward_ref"),Qe=Symbol.for("react.suspense"),Ye=Symbol.for("react.suspense_list"),Ue=Symbol.for("react.memo"),ot=Symbol.for("react.lazy"),dt=Symbol.for("react.offscreen"),st=Symbol.iterator;function pt(g){return g===null||typeof g!="object"?null:(g=st&&g[st]||g["@@iterator"],typeof g=="function"?g:null)}var Be=Object.assign,qe;function rt(g){if(qe===void 0)try{throw Error()}catch(X){var k=X.stack.trim().match(/\n( *(at )?)/);qe=k&&k[1]||""}return`
3
3
  `+qe+g}var He=!1;function Ot(g,k){if(!g||He)return"";He=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(k)if(k=function(){throw Error()},Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(at){var ve=at}Reflect.construct(g,[],k)}else{try{k.call()}catch(at){ve=at}g.call(k.prototype)}else{try{throw Error()}catch(at){ve=at}g()}}catch(at){if(at&&ve&&typeof at.stack=="string"){for(var $e=at.stack.split(`
4
4
  `),Ie=ve.stack.split(`
@@ -42,7 +42,7 @@ index signature as the original data.
42
42
 
43
43
  In this case, \`add_rows()\` received \`${JSON.stringify(e)}\`
44
44
  but was expecting \`${JSON.stringify(t)}\`.
45
- `)}return n.map(e=>{if(isRangeIndexType(e)&&e.pandasType){const{stop:t,step:o}=e.pandasType.metadata,{start:d,stop:p,step:h}=i[0].pandasType?.metadata,y=(p-d)/h,$=t+y*o;return{...e,pandasType:{...e.pandasType,metadata:{...e.pandasType.metadata,stop:$}}}}return e})}function concatDataTypes(n,i){return n.length===0?i:n}function concat(n,i,e,t,o,d,p,h){const y=concatIndexes(e,i,p,d),$=concatData(t,n,h,o),{indexTypes:E,dataTypes:M}=concatTypes(i,n,d,o);return{index:y,data:$,indexTypes:E,dataTypes:M}}function isPandasRangeIndex(n){return typeof n=="object"&&n.kind==="range"}function parsePandasSchema(n){const i=n.schema.metadata.get("pandas");if(!isNullOrUndefined(i))return JSON.parse(i)}function parsePandasIndexData(n,i){return i?i.index_columns.map(e=>{if(isPandasRangeIndex(e)){const{start:o,stop:d,step:p}=e;return range(o,d,p)}const t=n.getChild(e);return t instanceof Vector&&t.type instanceof Null?null:t}).filter(e=>e!==null):[]}function parseHeaderName(n,i){if(i===1)return[n];try{return JSON.parse(n.trim().replace(/^\(/,"[").replace(/\)$/,"]").replace(/'/g,'"'))}catch{return[...Array(i-1).fill(""),n]}}function parseColumnNames(n,i,e){const t=i.concat(n);return unzip(t.map(o=>o.arrowField.name.startsWith("__index_level_")?"":o.arrowField.name).map(o=>parseHeaderName(o,e?.column_indexes.length??1)))}function parseData(n,i){const e=n.numRows,t=i.length;if(e===0||t===0)return n.select([]);const o=i.map(d=>d.arrowField.name);return n.select(o)}function parsePandasIndexColumnTypes(n,i,e){return i?i.index_columns.map(o=>{if(isPandasRangeIndex(o)){const p=o.name||"";return{type:DataFrameCellType.INDEX,arrowField:new Field(p,new Int_(!0,64),!0),pandasType:{field_name:p,name:p,pandas_type:PandasRangeIndexType,numpy_type:PandasRangeIndexType,metadata:o}}}const d=n.fields.find(p=>p.name===o);if(!d)throw new Error(`Index field ${o} not found in arrow schema`);return{type:DataFrameCellType.INDEX,arrowField:d,pandasType:i.columns.find(p=>p.field_name===o),categoricalOptions:e[d.name]}}):[]}function parseDataColumnTypes(n,i,e){return n.fields.filter(d=>i?!i.index_columns.includes(d.name):!0).map(d=>({type:DataFrameCellType.DATA,arrowField:d,pandasType:i?.columns.find(p=>p.field_name===d.name),categoricalOptions:e[d.name]}))}function parseCategoricalOptionsForColumns(n){const i={};return n.schema.fields.forEach((e,t)=>{if(e.type instanceof Dictionary){const o=n.getChildAt(t)?.data[0]?.dictionary;notNullOrUndefined(o)&&(i[e.name]=convertVectorToList(o))}}),i}function parseArrowIpcBytes(n){const i=tableFromIPC(n),e=i.schema,t=parsePandasSchema(i),o=parseCategoricalOptionsForColumns(i),d=parsePandasIndexColumnTypes(e,t,o),p=parseDataColumnTypes(e,t,o),h=parseData(i,p),y=parsePandasIndexData(i,t),$=parseColumnNames(p,d,t);return{pandasIndexData:y,data:h,columnNames:$,pandasIndexColumnTypes:d,dataColumnTypes:p}}var _a;_a=DRAFTABLE;class Quiver{constructor(i){this[_a]=!0;const{pandasIndexData:e,columnNames:t,data:o,dataColumnTypes:d,pandasIndexColumnTypes:p}=parseArrowIpcBytes(i.data),h=i.styler?parseStyler(i.styler):void 0;this._pandasIndexData=e,this._columnNames=t,this._data=o,this._dataColumnTypes=d,this._pandasIndexColumnTypes=p,this._styler=h,this._num_bytes=i.data?.length??0,this._columnTypes=this._pandasIndexColumnTypes.concat(this._dataColumnTypes)}get columnNames(){return this._columnNames}get columnTypes(){return this._columnTypes}get styler(){return this._styler}get dimensions(){const i=this._pandasIndexColumnTypes.length||0,e=this._columnNames.length||1,t=this._data.numRows||0,o=this._dataColumnTypes.length||0,d=e+t,p=i+o;return{numHeaderRows:e,numIndexColumns:i,numDataRows:t,numDataColumns:o,numRows:d,numColumns:p}}get hash(){const i=[this.dimensions.numColumns,this.dimensions.numDataColumns,this.dimensions.numDataRows,this.dimensions.numIndexColumns,this.dimensions.numHeaderRows,this.dimensions.numRows,this._num_bytes,this._columnNames];return hashString(i.join("-"))}getCell(i,e){const{numIndexColumns:t,numDataRows:o,numColumns:d}=this.dimensions;if(i<0||i>=o)throw new Error(`Row index is out of range: ${i}`);if(e<0||e>=d)throw new Error(`Column index is out of range: ${e}`);if(e<t){const E=this._pandasIndexColumnTypes[e],M=this.getIndexValue(i,e);return{type:DataFrameCellType.INDEX,content:M,contentType:E,field:E.arrowField}}const h=e-t,y=this._dataColumnTypes[h],$=this.getDataValue(i,h);return{type:DataFrameCellType.DATA,content:$,contentType:y,field:y.arrowField}}getIndexValue(i,e){const t=this._pandasIndexData[e];return t instanceof Vector?t.get(i):t[i]}getDataValue(i,e){return this._data.getChildAt(e)?.get(i)}addRows(i){if(this.styler||i.styler)throw new Error("\nUnsupported operation. `add_rows()` does not support Pandas Styler objects.\n\nIf you do not need the Styler's styles, try passing the `.data` attribute of\nthe Styler object instead to concatenate just the underlying dataframe.\n\nFor example:\n```\nst.add_rows(my_styler.data)\n```\n");if(i.dimensions.numDataRows===0)return produce(this,p=>p);if(this.dimensions.numDataRows===0)return produce(i,p=>p);const{index:e,data:t,indexTypes:o,dataTypes:d}=concat(this._dataColumnTypes,this._pandasIndexColumnTypes,this._pandasIndexData,this._data,i._dataColumnTypes,i._pandasIndexColumnTypes,i._pandasIndexData,i._data);return produce(this,p=>{p._pandasIndexData=e,p._data=t,p._pandasIndexColumnTypes=o,p._dataColumnTypes=d,p._columnTypes=o.concat(d)})}}function parseStyler(n){return{uuid:n.uuid,caption:n.caption,cssStyles:n.styles,cssId:n.uuid?`T_${n.uuid}`:void 0,displayValues:new Quiver({data:n.displayValues})}}class ElementNode{constructor(i,e,t,o,d){this.element=i,this.metadata=e,this.scriptRunId=t,this.activeScriptHash=o,this.fragmentId=d}get quiverElement(){if(this.lazyQuiverElement!==void 0)return this.lazyQuiverElement;if(this.element.type!=="arrowTable"&&this.element.type!=="arrowDataFrame")throw new Error(`elementType '${this.element.type}' is not a valid Quiver element!`);const i=new Quiver(this.element[this.element.type]);return this.lazyQuiverElement=i,i}get vegaLiteChartElement(){if(this.lazyVegaLiteChartElement!==void 0)return this.lazyVegaLiteChartElement;if(this.element.type!=="arrowVegaLiteChart")throw new Error(`elementType '${this.element.type}' is not a valid VegaLiteChartElement!`);const i=this.element.arrowVegaLiteChart,e=i.data?new Quiver(i.data):null,t=i.datasets.length>0?wrapDatasets(i.datasets):[],o={data:e,spec:i.spec,datasets:t,useContainerWidth:i.useContainerWidth,vegaLiteTheme:i.theme,id:i.id,selectionMode:i.selectionMode,formId:i.formId};return this.lazyVegaLiteChartElement=o,o}arrowAddRows(i,e){const t=this.element.type,o=new ElementNode(this.element,this.metadata,e,this.activeScriptHash,this.fragmentId);switch(t){case"arrowTable":case"arrowDataFrame":{o.lazyQuiverElement=ElementNode.quiverAddRowsHelper(this.quiverElement,i);break}case"arrowVegaLiteChart":{o.lazyVegaLiteChartElement=ElementNode.vegaLiteChartAddRowsHelper(this.vegaLiteChartElement,i);break}default:throw new Error(`elementType '${this.element.type}' is not a valid arrowAddRows target!`)}return o}static quiverAddRowsHelper(i,e){if(e.hasName)throw new Error("Add rows cannot be used with a named dataset for this element.");const t=new Quiver(e.data);return i.addRows(t)}static vegaLiteChartAddRowsHelper(i,e){const t=e.hasName?e.name:null,o=new Quiver(e.data);return produce(i,d=>{const p=getNamedDataSet(d.datasets,t);p?p.data=p.data.addRows(o):d.data=d.data?d.data.addRows(o):o})}accept(i){return i.visitElementNode(this)}debug(){return this.accept(new DebugVisitor)}replaceTransientNodeWithSelf(i){if(i.scriptRunId!==this.scriptRunId)return this;if(i.transientNodes.length===0)return this;const e=i.updateTransientNodes(t=>t.accept(new ClearStaleNodeVisitor(this.scriptRunId)));return e.length===0?this:new TransientNode(this.scriptRunId,this,e,i.deltaMsgReceivedAt)}}function getNamedDataSet(n,i){return n.length===1?n[0]:n.find(e=>e.hasName&&e.name===i)}function wrapDatasets(n){return n.map(i=>({hasName:i.hasName,name:i.name,data:new Quiver(i.data)}))}class ElementsSetVisitor{constructor(){this.elements=new Set}visitElementNode(i){return this.elements.add(i.element),this.elements}visitBlockNode(i){for(const e of i.children)e.accept(this);return this.elements}visitTransientNode(i){return i.transientNodes.forEach(e=>{e.accept(this)}),i.anchor?.accept(this),this.elements}static collectElements(i){const e=new ElementsSetVisitor;return i.accept(e),e.elements}}class FilterMainScriptElementsVisitor{constructor(i){this.mainScriptHash=i}visitElementNode(i){if(i.activeScriptHash===this.mainScriptHash)return i}visitBlockNode(i){if(i.activeScriptHash!==this.mainScriptHash)return;let e=!1;const t=[];for(const o of i.children){const d=o.accept(this);d!==o&&(e=!0),d!==void 0&&t.push(d)}return e?new BlockNode(i.activeScriptHash,t,i.deltaBlock,i.scriptRunId,i.fragmentId,i.deltaMsgReceivedAt):i}visitTransientNode(i){const e=i.anchor?.accept(this),t=i.updateTransientNodes(o=>o.accept(this));if(!(!e&&t.length===0))return t.length===0?e:new TransientNode(i.scriptRunId,e,t,i.deltaMsgReceivedAt)}static filterNode(i,e){const t=new FilterMainScriptElementsVisitor(e);return i.accept(t)}}class GetNodeByDeltaPathVisitor{constructor(i){this.deltaPath=i}visitElementNode(i){}visitBlockNode(i){if(this.deltaPath.length===0)return;const[e,...t]=this.deltaPath;if(e<0||e>=i.children.length)return;if(t.length===0)return i.children[e];const o=new GetNodeByDeltaPathVisitor(t);return i.children[e].accept(o)}visitTransientNode(i){return this.deltaPath.length===0?i.anchor:i.anchor?.accept(this)}static getNodeAtPath(i,e){const t=new GetNodeByDeltaPathVisitor(e);return i.accept(t)}}class SetNodeByDeltaPathVisitor{constructor(i,e,t){this.deltaPath=i,this.nodeToSet=e,this.scriptRunId=t}visitElementNode(i){if(this.deltaPath.length>0)throw new Error("'setIn' cannot be called on an ElementNode");return this.nodeToSet instanceof TransientNode&&!this.nodeToSet.anchor?new TransientNode(this.scriptRunId,i,this.nodeToSet.transientNodes,this.nodeToSet.deltaMsgReceivedAt):this.nodeToSet}visitTransientNode(i){const[,...e]=this.deltaPath;if(e.length>0){if(i.anchor)return i.anchor.accept(new SetNodeByDeltaPathVisitor(e,this.nodeToSet,this.scriptRunId));throw new Error("TransientNode has no anchor to set node at")}return this.nodeToSet.replaceTransientNodeWithSelf(i)}visitBlockNode(i){if(this.deltaPath.length===0)return this.nodeToSet;const[e,...t]=this.deltaPath;if(e<0||e>i.children.length)throw new Error(`Bad delta path index ${e} (should be between [0, ${i.children.length}])`);let o=[];const d=new SetNodeByDeltaPathVisitor(t,this.nodeToSet,this.scriptRunId);if(i.children[e]){let p=0;for(;p<i.children.length;){const h=i.children[p];if(p!==e){o.push(h),p++;continue}const y=h.accept(d);!(h instanceof TransientNode)&&y instanceof TransientNode&&y.anchor!==h?(o.push(y),o.push(h)):o.push(y),p++}}else{if(t.length>0)throw new Error("Cannot set a node at a delta path");o=i.children.slice(),o[e]=this.nodeToSet}return new BlockNode(i.activeScriptHash,o,i.deltaBlock,this.scriptRunId,i.fragmentId,i.deltaMsgReceivedAt)}static setNodeAtPath(i,e,t,o){const d=new SetNodeByDeltaPathVisitor(e,t,o);return i.accept(d)}}class AppRoot{static empty(i="",e=!0,t,o){const d=[];let p;switch(getLoadingScreenType()){case LoadingScreenType.NONE:break;case LoadingScreenType.V1:e&&(p=makeElementWithInfoText("Please wait..."));break;default:p=makeAppSkeletonElement();break}p&&d.push(new ElementNode(p,ForwardMsgMetadata.create({}),NO_SCRIPT_RUN_ID,i));const h=new BlockNode(i,d,new Block$1({allowEmpty:!0}),NO_SCRIPT_RUN_ID),y=t||new BlockNode(i,[],new Block$1({allowEmpty:!0}),NO_SCRIPT_RUN_ID),$=new BlockNode(i,[],new Block$1({allowEmpty:!0}),NO_SCRIPT_RUN_ID),E=new BlockNode(i,[],new Block$1({allowEmpty:!0}),NO_SCRIPT_RUN_ID),M=o?{logo:o,activeScriptHash:i,scriptRunId:NO_SCRIPT_RUN_ID}:null;return new AppRoot(i,new BlockNode(i,[h,y,$,E]),M)}constructor(i,e,t=null){if(this.mainScriptHash=i,this.root=e,this.appLogo=t,this.root.children.length!==4||isNullOrUndefined(this.main)||isNullOrUndefined(this.sidebar)||isNullOrUndefined(this.event)||isNullOrUndefined(this.bottom))throw new Error(`Invalid root node children! ${e}`)}get main(){const[i]=this.root.children;return i}get sidebar(){const[,i]=this.root.children;return i}get event(){const[,,i]=this.root.children;return i}get bottom(){const[,,,i]=this.root.children;return i}get logo(){return this.appLogo?.logo??null}appRootWithLogo(i,e){return new AppRoot(this.mainScriptHash,this.root,{logo:i,...e})}applyDelta(i,e,t){const{deltaPath:o,activeScriptHash:d}=t;switch(e.type){case"newElement":{const p=e.newElement;return this.addElement(o,i,p,t,d,e.fragmentId)}case"addBlock":{const p=Date.now();return this.addBlock(o,e.addBlock,i,d,e.fragmentId,p)}case"newTransient":{const p=e.newTransient;return this.addTransient(o,i,p,t,d,e.fragmentId)}case"arrowAddRows":try{return this.arrowAddRows(o,e.arrowAddRows,i)}catch(p){const h=makeElementWithErrorText(ensureError(p).message);return this.addElement(o,i,h,t,d)}default:throw new Error(`Unrecognized deltaType: '${e.type}'`)}}ensureBlockNode(i,e=this.mainScriptHash){return i??new BlockNode(e)}filterMainScriptElements(i){const e=this.main.scriptRunId,t=new FilterMainScriptElementsVisitor(i),o=this.root.children.map(p=>this.ensureBlockNode(p.accept(t),i)),d=this.appLogo?.activeScriptHash===i?this.appLogo:null;return new AppRoot(i,new BlockNode(i,o,new Block$1({allowEmpty:!0}),e),d)}clearStaleNodes(i,e){const t=new ClearStaleNodeVisitor(i,e),o=this.root.children.map(h=>this.ensureBlockNode(h.accept(t))),p=e&&e.length>0||this.appLogo?.scriptRunId===i?this.appLogo:null;return new AppRoot(this.mainScriptHash,new BlockNode(this.mainScriptHash,o,new Block$1({allowEmpty:!0}),i),p)}getElements(){const i=new ElementsSetVisitor;return this.main.accept(i),this.sidebar.accept(i),this.event.accept(i),this.bottom.accept(i),i.elements}addElement(i,e,t,o,d,p){const h=new ElementNode(t,o,e,d,p);return new AppRoot(this.mainScriptHash,SetNodeByDeltaPathVisitor.setNodeAtPath(this.root,i,h,e),this.appLogo)}addBlock(i,e,t,o,d,p){const h=GetNodeByDeltaPathVisitor.getNodeAtPath(this.root,i);let y=[];h instanceof BlockNode&&h.deltaBlock.type===e.type&&(e.dialog&&h.deltaBlock.dialog&&e.id!==h.deltaBlock.id||(y=h.children));const $=new BlockNode(o,y,e,t,d,p);return new AppRoot(this.mainScriptHash,SetNodeByDeltaPathVisitor.setNodeAtPath(this.root,i,$,t),this.appLogo)}addTransient(i,e,t,o,d,p,h){const y=new TransientNode(e,void 0,t.elements.map($=>new ElementNode($,o,e,d,p)),h);return new AppRoot(this.mainScriptHash,SetNodeByDeltaPathVisitor.setNodeAtPath(this.root,i,y,e),this.appLogo)}arrowAddRows(i,e,t){const o=GetNodeByDeltaPathVisitor.getNodeAtPath(this.root,i);if(isNullOrUndefined(o)||!(o instanceof ElementNode))throw new Error(`Can't arrowAddRows: invalid deltaPath: ${i}`);const d=o.arrowAddRows(e,t);return new AppRoot(this.mainScriptHash,SetNodeByDeltaPathVisitor.setNodeAtPath(this.root,i,d,t),this.appLogo)}getChildName(i){switch(i){case this.main:return"main";case this.sidebar:return"sidebar";case this.event:return"event";case this.bottom:return"bottom";default:return"unknown"}}debug(){let i=`AppRoot
45
+ `)}return n.map(e=>{if(isRangeIndexType(e)&&e.pandasType){const{stop:t,step:o}=e.pandasType.metadata,{start:d,stop:p,step:h}=i[0].pandasType?.metadata,y=(p-d)/h,$=t+y*o;return{...e,pandasType:{...e.pandasType,metadata:{...e.pandasType.metadata,stop:$}}}}return e})}function concatDataTypes(n,i){return n.length===0?i:n}function concat(n,i,e,t,o,d,p,h){const y=concatIndexes(e,i,p,d),$=concatData(t,n,h,o),{indexTypes:E,dataTypes:M}=concatTypes(i,n,d,o);return{index:y,data:$,indexTypes:E,dataTypes:M}}function isPandasRangeIndex(n){return typeof n=="object"&&n.kind==="range"}function parsePandasSchema(n){const i=n.schema.metadata.get("pandas");if(!isNullOrUndefined(i))return JSON.parse(i)}function parsePandasIndexData(n,i){return i?i.index_columns.map(e=>{if(isPandasRangeIndex(e)){const{start:o,stop:d,step:p}=e;return range(o,d,p)}const t=n.getChild(e);return t instanceof Vector&&t.type instanceof Null?null:t}).filter(e=>e!==null):[]}function parseHeaderName(n,i){if(i===1)return[n];try{return JSON.parse(n.trim().replace(/^\(/,"[").replace(/\)$/,"]").replace(/'/g,'"'))}catch{return[...Array(i-1).fill(""),n]}}function parseColumnNames(n,i,e){const t=i.concat(n);return unzip(t.map(o=>o.arrowField.name.startsWith("__index_level_")?"":o.arrowField.name).map(o=>parseHeaderName(o,e?.column_indexes.length??1)))}function parseData(n,i){const e=n.numRows,t=i.length;if(e===0||t===0)return n.select([]);const o=i.map(d=>d.arrowField.name);return n.select(o)}function parsePandasIndexColumnTypes(n,i,e){return i?i.index_columns.map(o=>{if(isPandasRangeIndex(o)){const p=o.name||"";return{type:DataFrameCellType.INDEX,arrowField:new Field(p,new Int_(!0,64),!0),pandasType:{field_name:p,name:p,pandas_type:PandasRangeIndexType,numpy_type:PandasRangeIndexType,metadata:o}}}const d=n.fields.find(p=>p.name===o);if(!d)throw new Error(`Index field ${o} not found in arrow schema`);return{type:DataFrameCellType.INDEX,arrowField:d,pandasType:i.columns.find(p=>p.field_name===o),categoricalOptions:e[d.name]}}):[]}function parseDataColumnTypes(n,i,e){return n.fields.filter(d=>i?!i.index_columns.includes(d.name):!0).map(d=>({type:DataFrameCellType.DATA,arrowField:d,pandasType:i?.columns.find(p=>p.field_name===d.name),categoricalOptions:e[d.name]}))}function parseCategoricalOptionsForColumns(n){const i={};return n.schema.fields.forEach((e,t)=>{if(e.type instanceof Dictionary){const o=n.getChildAt(t)?.data[0]?.dictionary;notNullOrUndefined(o)&&(i[e.name]=convertVectorToList(o))}}),i}function parseArrowIpcBytes(n){const i=tableFromIPC(n),e=i.schema,t=parsePandasSchema(i),o=parseCategoricalOptionsForColumns(i),d=parsePandasIndexColumnTypes(e,t,o),p=parseDataColumnTypes(e,t,o),h=parseData(i,p),y=parsePandasIndexData(i,t),$=parseColumnNames(p,d,t);return{pandasIndexData:y,data:h,columnNames:$,pandasIndexColumnTypes:d,dataColumnTypes:p}}var _a;_a=DRAFTABLE;class Quiver{constructor(i){this[_a]=!0;const{pandasIndexData:e,columnNames:t,data:o,dataColumnTypes:d,pandasIndexColumnTypes:p}=parseArrowIpcBytes(i.data),h=i.styler?parseStyler(i.styler):void 0;this._pandasIndexData=e,this._columnNames=t,this._data=o,this._dataColumnTypes=d,this._pandasIndexColumnTypes=p,this._styler=h,this._num_bytes=i.data?.length??0,this._columnTypes=this._pandasIndexColumnTypes.concat(this._dataColumnTypes)}get columnNames(){return this._columnNames}get columnTypes(){return this._columnTypes}get styler(){return this._styler}get dimensions(){const i=this._pandasIndexColumnTypes.length||0,e=this._columnNames.length||1,t=this._data.numRows||0,o=this._dataColumnTypes.length||0,d=e+t,p=i+o;return{numHeaderRows:e,numIndexColumns:i,numDataRows:t,numDataColumns:o,numRows:d,numColumns:p}}get hash(){const i=[this.dimensions.numColumns,this.dimensions.numDataColumns,this.dimensions.numDataRows,this.dimensions.numIndexColumns,this.dimensions.numHeaderRows,this.dimensions.numRows,this._num_bytes,this._columnNames];return hashString(i.join("-"))}getCell(i,e){const{numIndexColumns:t,numDataRows:o,numColumns:d}=this.dimensions;if(i<0||i>=o)throw new Error(`Row index is out of range: ${i}`);if(e<0||e>=d)throw new Error(`Column index is out of range: ${e}`);if(e<t){const E=this._pandasIndexColumnTypes[e],M=this.getIndexValue(i,e);return{type:DataFrameCellType.INDEX,content:M,contentType:E,field:E.arrowField}}const h=e-t,y=this._dataColumnTypes[h],$=this.getDataValue(i,h);return{type:DataFrameCellType.DATA,content:$,contentType:y,field:y.arrowField}}getIndexValue(i,e){const t=this._pandasIndexData[e];return t instanceof Vector?t.get(i):t[i]}getDataValue(i,e){return this._data.getChildAt(e)?.get(i)}addRows(i){if(this.styler||i.styler)throw new Error("\nUnsupported operation. `add_rows()` does not support Pandas Styler objects.\n\nIf you do not need the Styler's styles, try passing the `.data` attribute of\nthe Styler object instead to concatenate just the underlying dataframe.\n\nFor example:\n```\nst.add_rows(my_styler.data)\n```\n");if(i.dimensions.numDataRows===0)return produce(this,p=>p);if(this.dimensions.numDataRows===0)return produce(i,p=>p);const{index:e,data:t,indexTypes:o,dataTypes:d}=concat(this._dataColumnTypes,this._pandasIndexColumnTypes,this._pandasIndexData,this._data,i._dataColumnTypes,i._pandasIndexColumnTypes,i._pandasIndexData,i._data);return produce(this,p=>{p._pandasIndexData=e,p._data=t,p._pandasIndexColumnTypes=o,p._dataColumnTypes=d,p._columnTypes=o.concat(d)})}}function parseStyler(n){return{uuid:n.uuid,caption:n.caption,cssStyles:n.styles,cssId:n.uuid?`T_${n.uuid}`:void 0,displayValues:new Quiver({data:n.displayValues})}}class ElementNode{constructor(i,e,t,o,d){this.element=i,this.metadata=e,this.scriptRunId=t,this.activeScriptHash=o,this.fragmentId=d}get quiverElement(){if(this.lazyQuiverElement!==void 0)return this.lazyQuiverElement;if(this.element.type!=="arrowTable"&&this.element.type!=="arrowDataFrame")throw new Error(`elementType '${this.element.type}' is not a valid Quiver element!`);const i=new Quiver(this.element[this.element.type]);return this.lazyQuiverElement=i,i}get vegaLiteChartElement(){if(this.lazyVegaLiteChartElement!==void 0)return this.lazyVegaLiteChartElement;if(this.element.type!=="arrowVegaLiteChart")throw new Error(`elementType '${this.element.type}' is not a valid VegaLiteChartElement!`);const i=this.element.arrowVegaLiteChart,e=i.data?new Quiver(i.data):null,t=i.datasets.length>0?wrapDatasets(i.datasets):[],o={data:e,spec:i.spec,datasets:t,useContainerWidth:i.useContainerWidth,vegaLiteTheme:i.theme,id:i.id,selectionMode:i.selectionMode,formId:i.formId};return this.lazyVegaLiteChartElement=o,o}arrowAddRows(i,e){const t=this.element.type,o=new ElementNode(this.element,this.metadata,e,this.activeScriptHash,this.fragmentId);switch(t){case"arrowTable":case"arrowDataFrame":{o.lazyQuiverElement=ElementNode.quiverAddRowsHelper(this.quiverElement,i);break}case"arrowVegaLiteChart":{o.lazyVegaLiteChartElement=ElementNode.vegaLiteChartAddRowsHelper(this.vegaLiteChartElement,i);break}default:throw new Error(`elementType '${this.element.type}' is not a valid arrowAddRows target!`)}return o}static quiverAddRowsHelper(i,e){if(e.hasName)throw new Error("Add rows cannot be used with a named dataset for this element.");const t=new Quiver(e.data);return i.addRows(t)}static vegaLiteChartAddRowsHelper(i,e){const t=e.hasName?e.name:null,o=new Quiver(e.data);return produce(i,d=>{const p=getNamedDataSet(d.datasets,t);p?p.data=p.data.addRows(o):d.data=d.data?d.data.addRows(o):o})}accept(i){return i.visitElementNode(this)}debug(){return this.accept(new DebugVisitor)}replaceTransientNodeWithSelf(i){if(i.scriptRunId!==this.scriptRunId)return this;if(i.transientNodes.length===0)return this;const e=i.updateTransientNodes(t=>t.accept(new ClearStaleNodeVisitor(this.scriptRunId)));return e.length===0?this:new TransientNode(this.scriptRunId,this,e,i.deltaMsgReceivedAt)}}function getNamedDataSet(n,i){return n.length===1?n[0]:n.find(e=>e.hasName&&e.name===i)}function wrapDatasets(n){return n.map(i=>({hasName:i.hasName,name:i.name,data:new Quiver(i.data)}))}class ClearTransientNodesVisitor{constructor(i){this.fragmentIdsThisRun=i??[]}visitBlockNode(i){if(this.fragmentIdsThisRun.length>0&&i.fragmentId&&!this.fragmentIdsThisRun.includes(i.fragmentId))return i;const e=[];let t=!1;return i.children.forEach(o=>{const d=o.accept(this);d!==o&&(t=!0),d!==void 0&&e.push(d)}),t?new BlockNode(i.activeScriptHash,e,i.deltaBlock,i.scriptRunId,i.fragmentId,i.deltaMsgReceivedAt):i}visitElementNode(i){return i}visitTransientNode(i){return i.anchor}}class ElementsSetVisitor{constructor(){this.elements=new Set}visitElementNode(i){return this.elements.add(i.element),this.elements}visitBlockNode(i){for(const e of i.children)e.accept(this);return this.elements}visitTransientNode(i){return i.transientNodes.forEach(e=>{e.accept(this)}),i.anchor?.accept(this),this.elements}static collectElements(i){const e=new ElementsSetVisitor;return i.accept(e),e.elements}}class FilterMainScriptElementsVisitor{constructor(i){this.mainScriptHash=i}visitElementNode(i){if(i.activeScriptHash===this.mainScriptHash)return i}visitBlockNode(i){if(i.activeScriptHash!==this.mainScriptHash)return;let e=!1;const t=[];for(const o of i.children){const d=o.accept(this);d!==o&&(e=!0),d!==void 0&&t.push(d)}return e?new BlockNode(i.activeScriptHash,t,i.deltaBlock,i.scriptRunId,i.fragmentId,i.deltaMsgReceivedAt):i}visitTransientNode(i){const e=i.anchor?.accept(this),t=i.updateTransientNodes(o=>o.accept(this));if(!(!e&&t.length===0))return t.length===0?e:new TransientNode(i.scriptRunId,e,t,i.deltaMsgReceivedAt)}static filterNode(i,e){const t=new FilterMainScriptElementsVisitor(e);return i.accept(t)}}class GetNodeByDeltaPathVisitor{constructor(i){this.deltaPath=i}visitElementNode(i){}visitBlockNode(i){if(this.deltaPath.length===0)return;const[e,...t]=this.deltaPath;if(e<0||e>=i.children.length)return;if(t.length===0)return i.children[e];const o=new GetNodeByDeltaPathVisitor(t);return i.children[e].accept(o)}visitTransientNode(i){return this.deltaPath.length===0?i.anchor:i.anchor?.accept(this)}static getNodeAtPath(i,e){const t=new GetNodeByDeltaPathVisitor(e);return i.accept(t)}}class SetNodeByDeltaPathVisitor{constructor(i,e,t){this.deltaPath=i,this.nodeToSet=e,this.scriptRunId=t}visitElementNode(i){if(this.deltaPath.length>0)throw new Error("'setIn' cannot be called on an ElementNode");return this.nodeToSet instanceof TransientNode&&!this.nodeToSet.anchor?new TransientNode(this.scriptRunId,i,this.nodeToSet.transientNodes,this.nodeToSet.deltaMsgReceivedAt):this.nodeToSet}visitTransientNode(i){const[,...e]=this.deltaPath;if(e.length>0){if(i.anchor)return i.anchor.accept(new SetNodeByDeltaPathVisitor(e,this.nodeToSet,this.scriptRunId));throw new Error("TransientNode has no anchor to set node at")}return this.nodeToSet.replaceTransientNodeWithSelf(i)}visitBlockNode(i){if(this.deltaPath.length===0)return this.nodeToSet;const[e,...t]=this.deltaPath;if(e<0||e>i.children.length)throw new Error(`Bad delta path index ${e} (should be between [0, ${i.children.length}])`);let o=[];const d=new SetNodeByDeltaPathVisitor(t,this.nodeToSet,this.scriptRunId);if(i.children[e]){let p=0;for(;p<i.children.length;){const h=i.children[p];if(p!==e){o.push(h),p++;continue}const y=h.accept(d);!(h instanceof TransientNode)&&y instanceof TransientNode&&y.anchor!==h?(o.push(y),o.push(h)):o.push(y),p++}}else{if(t.length>0)throw new Error("Cannot set a node at a delta path");o=i.children.slice(),o[e]=this.nodeToSet}return new BlockNode(i.activeScriptHash,o,i.deltaBlock,this.scriptRunId,i.fragmentId,i.deltaMsgReceivedAt)}static setNodeAtPath(i,e,t,o){const d=new SetNodeByDeltaPathVisitor(e,t,o);return i.accept(d)}}class AppRoot{static empty(i="",e=!0,t,o){const d=[];let p;switch(getLoadingScreenType()){case LoadingScreenType.NONE:break;case LoadingScreenType.V1:e&&(p=makeElementWithInfoText("Please wait..."));break;default:p=makeAppSkeletonElement();break}p&&d.push(new ElementNode(p,ForwardMsgMetadata.create({}),NO_SCRIPT_RUN_ID,i));const h=new BlockNode(i,d,new Block$1({allowEmpty:!0}),NO_SCRIPT_RUN_ID),y=t||new BlockNode(i,[],new Block$1({allowEmpty:!0}),NO_SCRIPT_RUN_ID),$=new BlockNode(i,[],new Block$1({allowEmpty:!0}),NO_SCRIPT_RUN_ID),E=new BlockNode(i,[],new Block$1({allowEmpty:!0}),NO_SCRIPT_RUN_ID),M=o?{logo:o,activeScriptHash:i,scriptRunId:NO_SCRIPT_RUN_ID}:null;return new AppRoot(i,new BlockNode(i,[h,y,$,E]),M)}constructor(i,e,t=null){if(this.mainScriptHash=i,this.root=e,this.appLogo=t,this.root.children.length!==4||isNullOrUndefined(this.main)||isNullOrUndefined(this.sidebar)||isNullOrUndefined(this.event)||isNullOrUndefined(this.bottom))throw new Error(`Invalid root node children! ${e}`)}get main(){const[i]=this.root.children;return i}get sidebar(){const[,i]=this.root.children;return i}get event(){const[,,i]=this.root.children;return i}get bottom(){const[,,,i]=this.root.children;return i}get logo(){return this.appLogo?.logo??null}appRootWithLogo(i,e){return new AppRoot(this.mainScriptHash,this.root,{logo:i,...e})}applyDelta(i,e,t){const{deltaPath:o,activeScriptHash:d}=t;switch(e.type){case"newElement":{const p=e.newElement;return this.addElement(o,i,p,t,d,e.fragmentId)}case"addBlock":{const p=Date.now();return this.addBlock(o,e.addBlock,i,d,e.fragmentId,p)}case"newTransient":{const p=e.newTransient;return this.addTransient(o,i,p,t,d,e.fragmentId)}case"arrowAddRows":try{return this.arrowAddRows(o,e.arrowAddRows,i)}catch(p){const h=makeElementWithErrorText(ensureError(p).message);return this.addElement(o,i,h,t,d)}default:throw new Error(`Unrecognized deltaType: '${e.type}'`)}}ensureBlockNode(i,e=this.mainScriptHash){return i??new BlockNode(e)}filterMainScriptElements(i){const e=this.main.scriptRunId,t=new FilterMainScriptElementsVisitor(i),o=this.root.children.map(p=>this.ensureBlockNode(p.accept(t),i)),d=this.appLogo?.activeScriptHash===i?this.appLogo:null;return new AppRoot(i,new BlockNode(i,o,new Block$1({allowEmpty:!0}),e),d)}clearStaleNodes(i,e){const t=new ClearStaleNodeVisitor(i,e),o=this.root.children.map(h=>this.ensureBlockNode(h.accept(t))),p=e&&e.length>0||this.appLogo?.scriptRunId===i?this.appLogo:null;return new AppRoot(this.mainScriptHash,new BlockNode(this.mainScriptHash,o,new Block$1({allowEmpty:!0}),i),p)}clearTransientNodes(i){const e=new ClearTransientNodesVisitor(i),t=this.root.children.map(o=>this.ensureBlockNode(o.accept(e)));return new AppRoot(this.mainScriptHash,new BlockNode(this.mainScriptHash,t,new Block$1({allowEmpty:!0}),this.main.scriptRunId),this.appLogo)}getElements(){const i=new ElementsSetVisitor;return this.main.accept(i),this.sidebar.accept(i),this.event.accept(i),this.bottom.accept(i),i.elements}addElement(i,e,t,o,d,p){const h=new ElementNode(t,o,e,d,p);return new AppRoot(this.mainScriptHash,SetNodeByDeltaPathVisitor.setNodeAtPath(this.root,i,h,e),this.appLogo)}addBlock(i,e,t,o,d,p){const h=GetNodeByDeltaPathVisitor.getNodeAtPath(this.root,i);let y=[];h instanceof BlockNode&&h.deltaBlock.type===e.type&&(e.dialog&&h.deltaBlock.dialog&&e.id!==h.deltaBlock.id||(y=h.children));const $=new BlockNode(o,y,e,t,d,p);return new AppRoot(this.mainScriptHash,SetNodeByDeltaPathVisitor.setNodeAtPath(this.root,i,$,t),this.appLogo)}addTransient(i,e,t,o,d,p,h){const y=new TransientNode(e,void 0,t.elements.map($=>new ElementNode($,o,e,d,p)),h);return new AppRoot(this.mainScriptHash,SetNodeByDeltaPathVisitor.setNodeAtPath(this.root,i,y,e),this.appLogo)}arrowAddRows(i,e,t){const o=GetNodeByDeltaPathVisitor.getNodeAtPath(this.root,i);if(isNullOrUndefined(o)||!(o instanceof ElementNode))throw new Error(`Can't arrowAddRows: invalid deltaPath: ${i}`);const d=o.arrowAddRows(e,t);return new AppRoot(this.mainScriptHash,SetNodeByDeltaPathVisitor.setNodeAtPath(this.root,i,d,t),this.appLogo)}getChildName(i){switch(i){case this.main:return"main";case this.sidebar:return"sidebar";case this.event:return"event";case this.bottom:return"bottom";default:return"unknown"}}debug(){let i=`AppRoot
46
46
  `;return this.root.children.forEach((e,t)=>{const o=t===this.root.children.length-1,d=this.getChildName(e),p=o?"└── ":"├── ",h=o?" ":"│ ";i+=`${p}${d}:
47
47
  `;const y=new DebugVisitor(h,!0);i+=e.accept(y)}),i}}var classnames={exports:{}};var hasRequiredClassnames;function requireClassnames(){return hasRequiredClassnames||(hasRequiredClassnames=1,(function(n){(function(){var i={}.hasOwnProperty;function e(){for(var d="",p=0;p<arguments.length;p++){var h=arguments[p];h&&(d=o(d,t(h)))}return d}function t(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return e.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var p="";for(var h in d)i.call(d,h)&&d[h]&&(p=o(p,h));return p}function o(d,p){return p?d?d+" "+p:d+p:d}n.exports?(e.default=e,n.exports=e):window.classNames=e})()})(classnames)),classnames.exports}var classnamesExports=requireClassnames();const classNames=getDefaultExportFromCjs(classnamesExports);var Direction=(function(n){return n.HORIZONTAL="row",n.VERTICAL="column",n})({});function getDirectionOfBlock(n){return n.flexContainer?n.flexContainer.direction==Block$1.FlexContainer.Direction.HORIZONTAL?"row":"column":n.vertical?"column":n.horizontal?"row":"column"}function shouldWidthStretch(n){return!!(n?.useStretch||n?.pixelWidth)}function shouldHeightStretch(n){return!!(n?.useStretch||n?.pixelHeight)}const alignmentMap={[streamlit.TextAlignmentConfig.Alignment.LEFT]:"left",[streamlit.TextAlignmentConfig.Alignment.CENTER]:"center",[streamlit.TextAlignmentConfig.Alignment.RIGHT]:"right",[streamlit.TextAlignmentConfig.Alignment.JUSTIFY]:"justify",[streamlit.TextAlignmentConfig.Alignment.UNSPECIFIED]:"left"};function getTextAlignmentStyle(n){if(n?.alignment)return alignmentMap[n.alignment]||"left"}const FlexContext=reactExports.createContext(null);FlexContext.displayName="FlexContext";const FlexContextProvider=({children:n,direction:i,isRoot:e,parentWidth:t,hasContentWidth:o=!1,hasFixedWidth:d=!1,parentContext:p=null})=>{const h=reactExports.useMemo(()=>{const y=i===Direction.HORIZONTAL;let $;return o?$=!0:d?$=!1:$=p?.isInContentWidthContainer??!1,{direction:i,isInHorizontalLayout:y,isInRoot:e??!1,parentWidth:t,isInContentWidthContainer:$}},[i,e,t,o,d,p]);return jsx$1(FlexContext.Provider,{value:h,children:n})};function guard(n,i,e){return Math.min(Math.max(n,e),i)}class ColorError extends Error{constructor(i){super(`Failed to parse color: "${i}"`)}}var ColorError$1=ColorError;function parseToRgba(n){if(typeof n!="string")throw new ColorError$1(n);if(n.trim().toLowerCase()==="transparent")return[0,0,0,0];let i=n.trim();i=namedColorRegex.test(n)?nameToHex(n):n;const e=reducedHexRegex.exec(i);if(e){const p=Array.from(e).slice(1);return[...p.slice(0,3).map(h=>parseInt(r$1(h,2),16)),parseInt(r$1(p[3]||"f",2),16)/255]}const t=hexRegex.exec(i);if(t){const p=Array.from(t).slice(1);return[...p.slice(0,3).map(h=>parseInt(h,16)),parseInt(p[3]||"ff",16)/255]}const o=rgbaRegex.exec(i);if(o){const p=Array.from(o).slice(1);return[...p.slice(0,3).map(h=>parseInt(h,10)),parseFloat(p[3]||"1")]}const d=hslaRegex.exec(i);if(d){const[p,h,y,$]=Array.from(d).slice(1).map(parseFloat);if(guard(0,100,h)!==h)throw new ColorError$1(n);if(guard(0,100,y)!==y)throw new ColorError$1(n);return[...hslToRgb(p,h,y),Number.isNaN($)?1:$]}throw new ColorError$1(n)}function hash(n){let i=5381,e=n.length;for(;e;)i=i*33^n.charCodeAt(--e);return(i>>>0)%2341}const colorToInt=n=>parseInt(n.replace(/_/g,""),36),compressedColorMap="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((n,i)=>{const e=colorToInt(i.substring(0,3)),t=colorToInt(i.substring(3)).toString(16);let o="";for(let d=0;d<6-t.length;d++)o+="0";return n[e]=`${o}${t}`,n},{});function nameToHex(n){const i=n.toLowerCase().trim(),e=compressedColorMap[hash(i)];if(!e)throw new ColorError$1(n);return`#${e}`}const r$1=(n,i)=>Array.from(Array(i)).map(()=>n).join(""),reducedHexRegex=new RegExp(`^#${r$1("([a-f0-9])",3)}([a-f0-9])?$`,"i"),hexRegex=new RegExp(`^#${r$1("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),rgbaRegex=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r$1(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),hslaRegex=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,namedColorRegex=/^[a-z]+$/i,roundColor=n=>Math.round(n*255),hslToRgb=(n,i,e)=>{let t=e/100;if(i===0)return[t,t,t].map(roundColor);const o=(n%360+360)%360/60,d=(1-Math.abs(2*t-1))*(i/100),p=d*(1-Math.abs(o%2-1));let h=0,y=0,$=0;o>=0&&o<1?(h=d,y=p):o>=1&&o<2?(h=p,y=d):o>=2&&o<3?(y=d,$=p):o>=3&&o<4?(y=p,$=d):o>=4&&o<5?(h=p,$=d):o>=5&&o<6&&(h=d,$=p);const E=t-d/2,M=h+E,H=y+E,Z=$+E;return[M,H,Z].map(roundColor)};function parseToHsla(n){const[i,e,t,o]=parseToRgba(n).map((M,H)=>H===3?M:M/255),d=Math.max(i,e,t),p=Math.min(i,e,t),h=(d+p)/2;if(d===p)return[0,0,h,o];const y=d-p,$=h>.5?y/(2-d-p):y/(d+p);return[60*(i===d?(e-t)/y+(e<t?6:0):e===d?(t-i)/y+2:(i-e)/y+4),$,h,o]}function hsla(n,i,e,t){return`hsla(${(n%360).toFixed()}, ${guard(0,100,i*100).toFixed()}%, ${guard(0,100,e*100).toFixed()}%, ${parseFloat(guard(0,1,t).toFixed(3))})`}function darken(n,i){const[e,t,o,d]=parseToHsla(n);return hsla(e,t,o-i,d)}function getLuminance(n){if(n==="transparent")return 0;function i(d){const p=d/255;return p<=.04045?p/12.92:Math.pow((p+.055)/1.055,2.4)}const[e,t,o]=parseToRgba(n);return .2126*i(e)+.7152*i(t)+.0722*i(o)}function rgba$1(n,i,e,t){return`rgba(${guard(0,255,n).toFixed()}, ${guard(0,255,i).toFixed()}, ${guard(0,255,e).toFixed()}, ${parseFloat(guard(0,1,t).toFixed(3))})`}function mix$1(n,i,e){const t=(Me,Le)=>Le===3?Me:Me/255,[o,d,p,h]=parseToRgba(n).map(t),[y,$,E,M]=parseToRgba(i).map(t),H=M-h,Z=e*2-1,ye=((Z*H===-1?Z:Z+H/(1+Z*H))+1)/2,we=1-ye,xe=(o*we+y*ye)*255,Ce=(d*we+$*ye)*255,Ne=(p*we+E*ye)*255,Fe=M*e+h*(1-e);return rgba$1(xe,Ce,Ne,Fe)}function lighten(n,i){return darken(n,-i)}function transparentize(n,i){const[e,t,o,d]=parseToRgba(n);return rgba$1(e,t,o,d-i)}function toHex(n){const[i,e,t,o]=parseToRgba(n);let d=p=>{const h=guard(0,255,p).toString(16);return h.length===1?`0${h}`:h};return`#${d(i)}${d(e)}${d(t)}${o<1?d(Math.round(o*255)):""}`}var colors$1={white:"#FFFFFF",gray50:"#F6F6F6",gray100:"#EEEEEE",gray200:"#E2E2E2",gray300:"#CBCBCB",gray400:"#AFAFAF",gray500:"#6B6B6B",gray600:"#545454",gray700:"#333333",gray800:"#1F1F1F",gray900:"#141414",black:"#000000",platinum400:"#8EA3AD",red50:"#FFEFED",red100:"#FED7D2",red200:"#F1998E",red300:"#E85C4A",red400:"#E11900",red500:"#AB1300",red600:"#870F00",red700:"#5A0A00",orange200:"#FABDA5",orange300:"#FA9269",orange400:"#FF6937",orange500:"#C14F29",orange600:"#9A3F21",orange700:"#672A16",yellow50:"#FFFAF0",yellow100:"#FFF2D9",yellow200:"#FFE3AC",yellow300:"#FFCF70",yellow400:"#FFC043",yellow500:"#BC8B2C",yellow600:"#996F00",yellow700:"#674D1B",green50:"#E6F2ED",green100:"#ADDEC9",green200:"#66D19E",green300:"#06C167",green400:"#048848",green500:"#03703C",green600:"#03582F",green700:"#10462D",blue50:"#EFF3FE",blue100:"#D4E2FC",blue200:"#A0BFF8",blue300:"#5B91F5",blue400:"#276EF1",blue500:"#1E54B7",blue600:"#174291",blue700:"#102C60",cobalt400:"#0E1FC1",purple200:"#C1B4E2",purple300:"#957FCE",purple400:"#7356BF",purple500:"#574191",purple600:"#453473",purple700:"#2E224C",brown200:"#D2BBB0",brown300:"#B18977",brown400:"#99644C",brown500:"#744C3A",brown600:"#5C3C2E",brown700:"#3D281E"},lightColorTokens={primaryA:colors$1.black,primaryB:colors$1.white,primary:colors$1.black,primary50:colors$1.gray50,primary100:colors$1.gray100,primary200:colors$1.gray200,primary300:colors$1.gray300,primary400:colors$1.gray400,primary500:colors$1.gray500,primary600:colors$1.gray600,primary700:colors$1.gray700,accent:colors$1.blue400,accent50:colors$1.blue50,accent100:colors$1.blue100,accent200:colors$1.blue200,accent300:colors$1.blue300,accent400:colors$1.blue400,accent500:colors$1.blue500,accent600:colors$1.blue600,accent700:colors$1.blue700,negative:colors$1.red400,negative50:colors$1.red50,negative100:colors$1.red100,negative200:colors$1.red200,negative300:colors$1.red300,negative400:colors$1.red400,negative500:colors$1.red500,negative600:colors$1.red600,negative700:colors$1.red700,warning:colors$1.yellow400,warning50:colors$1.yellow50,warning100:colors$1.yellow100,warning200:colors$1.yellow200,warning300:colors$1.yellow300,warning400:colors$1.yellow400,warning500:colors$1.yellow500,warning600:colors$1.yellow600,warning700:colors$1.yellow700,positive:colors$1.green500,positive50:colors$1.green50,positive100:colors$1.green100,positive200:colors$1.green200,positive300:colors$1.green300,positive400:colors$1.green400,positive500:colors$1.green500,positive600:colors$1.green600,positive700:colors$1.green700,white:colors$1.white,black:colors$1.black,mono100:colors$1.white,mono200:colors$1.gray50,mono300:colors$1.gray100,mono400:colors$1.gray200,mono500:colors$1.gray300,mono600:colors$1.gray400,mono700:colors$1.gray500,mono800:colors$1.gray600,mono900:colors$1.gray700,mono1000:colors$1.black,ratingInactiveFill:colors$1.gray100,ratingStroke:colors$1.gray300};function hexToRgb(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"1",e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;n=n.replace(e,function(o,d,p,h){return d+d+p+p+h+h});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return t?"rgba(".concat(parseInt(t[1],16),", ").concat(parseInt(t[2],16),", ").concat(parseInt(t[3],16),", ").concat(i,")"):null}var ellipsisText={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordWrap:"normal"};function expandBorderStyles(n){return{borderTopWidth:n.borderWidth,borderTopStyle:n.borderStyle,borderTopColor:n.borderColor,borderBottomWidth:n.borderWidth,borderBottomStyle:n.borderStyle,borderBottomColor:n.borderColor,borderLeftWidth:n.borderWidth,borderLeftStyle:n.borderStyle,borderLeftColor:n.borderColor,borderRightWidth:n.borderWidth,borderRightStyle:n.borderStyle,borderRightColor:n.borderColor}}function ownKeys$x(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$w(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$x(Object(e),!0).forEach(function(t){_defineProperty$D(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$x(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$D(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}const getSemanticColorTokens=(function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lightColorTokens,i={backgroundPrimary:n.primaryB,backgroundSecondary:colors$1.gray50,backgroundTertiary:colors$1.gray100,backgroundInversePrimary:n.primaryA,backgroundInverseSecondary:colors$1.gray800,contentPrimary:n.primaryA,contentSecondary:colors$1.gray600,contentTertiary:colors$1.gray500,contentInversePrimary:n.primaryB,contentInverseSecondary:colors$1.gray300,contentInverseTertiary:colors$1.gray400,borderOpaque:colors$1.gray200,borderTransparent:hexToRgb(n.primaryA,"0.08"),borderSelected:n.primaryA,borderInverseOpaque:colors$1.gray700,borderInverseTransparent:hexToRgb(n.primaryB,"0.2"),borderInverseSelected:n.primaryB},e={backgroundStateDisabled:colors$1.gray50,backgroundOverlayDark:hexToRgb(colors$1.black,"0.3"),backgroundOverlayLight:hexToRgb(colors$1.black,"0.08"),backgroundOverlayArt:hexToRgb(colors$1.black,"0.00"),backgroundAccent:n.accent,backgroundNegative:n.negative,backgroundWarning:n.warning,backgroundPositive:colors$1.green400,backgroundLightAccent:colors$1.blue50,backgroundLightNegative:colors$1.red50,backgroundLightWarning:colors$1.yellow50,backgroundLightPositive:colors$1.green50,backgroundAlwaysDark:colors$1.black,backgroundAlwaysLight:colors$1.white,contentStateDisabled:colors$1.gray400,contentAccent:n.accent,contentOnColor:colors$1.white,contentOnColorInverse:colors$1.black,contentNegative:n.negative,contentWarning:colors$1.yellow600,contentPositive:colors$1.green400,borderStateDisabled:colors$1.gray50,borderAccent:colors$1.blue400,borderAccentLight:colors$1.blue200,borderNegative:colors$1.red200,borderWarning:colors$1.yellow200,borderPositive:colors$1.green200,safety:colors$1.blue400,eatsGreen400:colors$1.green400,freightBlue400:colors$1.cobalt400,jumpRed400:colors$1.red400,rewardsTier1:colors$1.blue400,rewardsTier2:colors$1.yellow400,rewardsTier3:colors$1.platinum400,rewardsTier4:colors$1.black,membership:colors$1.yellow600};return _objectSpread$w(_objectSpread$w({},i),e)});var tagHoverBackground="rgba(0, 0, 0, 0.08)";const getComponentColorTokens=(function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lightColorTokens;return{bannerActionLowInfo:n.accent100,bannerActionLowNegative:n.negative100,bannerActionLowPositive:n.positive100,bannerActionLowWarning:n.warning200,bannerActionHighInfo:n.accent500,bannerActionHighNegative:n.negative500,bannerActionHighPositive:n.positive500,bannerActionHighWarning:n.warning200,buttonPrimaryFill:n.primary,buttonPrimaryText:n.white,buttonPrimaryHover:n.primary700,buttonPrimaryActive:n.primary600,buttonPrimarySelectedFill:n.primary600,buttonPrimarySelectedText:n.white,buttonPrimarySpinnerForeground:n.accent,buttonPrimarySpinnerBackground:n.primaryB,buttonSecondaryFill:n.primary100,buttonSecondaryText:n.primary,buttonSecondaryHover:n.primary200,buttonSecondaryActive:n.primary300,buttonSecondarySelectedFill:n.primary300,buttonSecondarySelectedText:n.primary,buttonSecondarySpinnerForeground:n.accent,buttonSecondarySpinnerBackground:n.primaryB,buttonTertiaryFill:"transparent",buttonTertiaryText:n.primary,buttonTertiaryHover:n.primary50,buttonTertiaryActive:n.primary100,buttonTertiarySelectedFill:n.primary100,buttonTertiarySelectedText:n.primary,buttonTertiaryDisabledActiveFill:n.primary50,buttonTertiaryDisabledActiveText:n.mono600,buttonTertiarySpinnerForeground:n.accent,buttonTertiarySpinnerBackground:n.primary100,buttonDisabledFill:n.mono200,buttonDisabledText:n.mono600,buttonDisabledActiveFill:n.mono700,buttonDisabledActiveText:n.mono100,buttonDisabledSpinnerForeground:n.mono600,buttonDisabledSpinnerBackground:n.mono400,breadcrumbsText:n.black,breadcrumbsSeparatorFill:n.mono700,calendarBackground:n.mono100,calendarForeground:n.mono1000,calendarForegroundDisabled:n.mono500,calendarHeaderBackground:n.white,calendarHeaderForeground:n.primary,calendarHeaderBackgroundActive:n.primary700,calendarHeaderForegroundDisabled:n.primary500,calendarDayForegroundPseudoSelected:n.mono1000,calendarDayBackgroundPseudoSelectedHighlighted:n.primary200,calendarDayForegroundPseudoSelectedHighlighted:n.mono1000,calendarDayBackgroundSelected:n.primary,calendarDayForegroundSelected:n.white,calendarDayBackgroundSelectedHighlighted:n.primary,calendarDayForegroundSelectedHighlighted:n.white,comboboxListItemFocus:n.mono200,comboboxListItemHover:n.mono300,fileUploaderBackgroundColor:n.mono200,fileUploaderBackgroundColorActive:n.primary50,fileUploaderBorderColorActive:n.primary,fileUploaderBorderColorDefault:n.mono500,fileUploaderMessageColor:n.mono800,linkText:n.primary,linkVisited:n.primary700,linkHover:n.primary600,linkActive:n.primary500,listHeaderFill:n.white,listBodyFill:n.white,progressStepsCompletedText:n.white,progressStepsCompletedFill:n.primary,progressStepsActiveText:n.white,progressStepsActiveFill:n.primary,toggleFill:n.white,toggleFillChecked:n.primary,toggleFillDisabled:n.mono600,toggleTrackFill:n.mono400,toggleTrackFillDisabled:n.mono300,tickFill:n.mono100,tickFillHover:n.mono200,tickFillActive:n.mono300,tickFillSelected:n.primary,tickFillSelectedHover:n.primary700,tickFillSelectedHoverActive:n.primary600,tickFillError:n.negative50,tickFillErrorHover:n.negative100,tickFillErrorHoverActive:n.negative200,tickFillErrorSelected:n.negative400,tickFillErrorSelectedHover:n.negative500,tickFillErrorSelectedHoverActive:n.negative600,tickFillDisabled:n.mono600,tickBorder:n.mono700,tickBorderError:n.negative400,tickMarkFill:n.white,tickMarkFillError:n.white,tickMarkFillDisabled:n.mono100,sliderTrackFill:"transparent",sliderHandleFill:n.primaryA,sliderHandleFillDisabled:n.primary400,sliderHandleInnerFill:n.primaryA,sliderTrackFillHover:n.mono500,sliderTrackFillActive:n.mono600,sliderTrackFillDisabled:n.mono300,sliderHandleInnerFillDisabled:n.mono400,sliderHandleInnerFillSelectedHover:n.primary,sliderHandleInnerFillSelectedActive:n.primary500,inputBorder:n.mono300,inputFill:n.mono300,inputFillError:n.negative50,inputFillDisabled:n.mono200,inputFillActive:n.mono200,inputFillPositive:n.positive50,inputTextDisabled:n.mono600,inputBorderError:n.negative200,inputBorderPositive:n.positive200,inputEnhancerFill:n.mono300,inputEnhancerFillDisabled:n.mono300,inputEnhancerTextDisabled:n.mono600,inputPlaceholder:n.mono700,inputPlaceholderDisabled:n.mono600,menuFill:n.mono100,menuFillHover:n.mono200,menuFontDefault:n.mono800,menuFontDisabled:n.mono500,menuFontHighlighted:n.mono1000,menuFontSelected:n.mono1000,modalCloseColor:n.mono1000,modalCloseColorHover:n.mono800,modalCloseColorFocus:n.mono800,tabBarFill:n.mono200,tabColor:n.mono800,notificationInfoBackground:n.accent50,notificationInfoText:n.primaryA,notificationPositiveBackground:n.positive50,notificationPositiveText:n.primaryA,notificationWarningBackground:n.warning50,notificationWarningText:n.primaryA,notificationNegativeBackground:n.negative50,notificationNegativeText:n.primaryA,tagFontDisabledRampUnit:"100",tagSolidFontRampUnit:"0",tagSolidRampUnit:"400",tagOutlinedFontRampUnit:"400",tagOutlinedRampUnit:"200",tagSolidHoverRampUnit:"50",tagSolidActiveRampUnit:"100",tagSolidDisabledRampUnit:"50",tagSolidFontHoverRampUnit:"500",tagLightRampUnit:"50",tagLightHoverRampUnit:"100",tagLightActiveRampUnit:"100",tagLightFontRampUnit:"500",tagLightFontHoverRampUnit:"500",tagOutlinedHoverRampUnit:"50",tagOutlinedActiveRampUnit:"0",tagOutlinedFontHoverRampUnit:"400",tagNeutralFontDisabled:n.mono600,tagNeutralOutlinedDisabled:n.mono400,tagNeutralSolidFont:n.white,tagNeutralSolidBackground:n.black,tagNeutralOutlinedBackground:n.mono600,tagNeutralOutlinedFont:n.black,tagNeutralSolidHover:n.mono300,tagNeutralSolidActive:n.mono400,tagNeutralSolidDisabled:n.mono200,tagNeutralSolidFontHover:n.mono900,tagNeutralLightBackground:n.mono300,tagNeutralLightHover:n.mono300,tagNeutralLightActive:n.mono400,tagNeutralLightDisabled:n.mono200,tagNeutralLightFont:n.mono900,tagNeutralLightFontHover:n.mono900,tagNeutralOutlinedActive:n.mono900,tagNeutralOutlinedFontHover:n.mono800,tagNeutralOutlinedHover:tagHoverBackground,tagPrimaryFontDisabled:n.primary400,tagPrimaryOutlinedDisabled:n.primary200,tagPrimarySolidFont:n.white,tagPrimarySolidBackground:n.primary,tagPrimaryOutlinedFontHover:n.primary,tagPrimaryOutlinedFont:n.primary,tagPrimarySolidHover:n.primary100,tagPrimarySolidActive:n.primary200,tagPrimarySolidDisabled:n.primary50,tagPrimarySolidFontHover:n.primary700,tagPrimaryLightBackground:n.primary50,tagPrimaryLightHover:n.primary100,tagPrimaryLightActive:n.primary100,tagPrimaryLightDisabled:n.primary50,tagPrimaryLightFont:n.primary500,tagPrimaryLightFontHover:n.primary500,tagPrimaryOutlinedActive:n.primary600,tagPrimaryOutlinedHover:tagHoverBackground,tagPrimaryOutlinedBackground:n.primary400,tagAccentFontDisabled:n.accent200,tagAccentOutlinedDisabled:n.accent200,tagAccentSolidFont:n.white,tagAccentSolidBackground:n.accent400,tagAccentOutlinedBackground:n.accent200,tagAccentOutlinedFont:n.accent400,tagAccentSolidHover:n.accent50,tagAccentSolidActive:n.accent100,tagAccentSolidDisabled:n.accent50,tagAccentSolidFontHover:n.accent500,tagAccentLightBackground:n.accent50,tagAccentLightHover:n.accent100,tagAccentLightActive:n.accent100,tagAccentLightDisabled:n.accent50,tagAccentLightFont:n.accent500,tagAccentLightFontHover:n.accent500,tagAccentOutlinedActive:n.accent600,tagAccentOutlinedFontHover:n.accent400,tagAccentOutlinedHover:tagHoverBackground,tagPositiveFontDisabled:n.positive200,tagPositiveOutlinedDisabled:n.positive200,tagPositiveSolidFont:n.white,tagPositiveSolidBackground:n.positive400,tagPositiveOutlinedBackground:n.positive200,tagPositiveOutlinedFont:n.positive400,tagPositiveSolidHover:n.positive50,tagPositiveSolidActive:n.positive100,tagPositiveSolidDisabled:n.positive50,tagPositiveSolidFontHover:n.positive500,tagPositiveLightBackground:n.positive50,tagPositiveLightHover:n.positive100,tagPositiveLightActive:n.positive100,tagPositiveLightDisabled:n.positive50,tagPositiveLightFont:n.positive500,tagPositiveLightFontHover:n.positive500,tagPositiveOutlinedActive:n.positive600,tagPositiveOutlinedFontHover:n.positive400,tagPositiveOutlinedHover:tagHoverBackground,tagWarningFontDisabled:n.warning300,tagWarningOutlinedDisabled:n.warning300,tagWarningSolidFont:n.warning700,tagWarningSolidBackground:n.warning400,tagWarningOutlinedBackground:n.warning300,tagWarningOutlinedFont:n.warning600,tagWarningSolidHover:n.warning50,tagWarningSolidActive:n.warning100,tagWarningSolidDisabled:n.warning50,tagWarningSolidFontHover:n.warning500,tagWarningLightBackground:n.warning50,tagWarningLightHover:n.warning100,tagWarningLightActive:n.warning100,tagWarningLightDisabled:n.warning50,tagWarningLightFont:n.warning500,tagWarningLightFontHover:n.warning500,tagWarningOutlinedActive:n.warning600,tagWarningOutlinedFontHover:n.warning600,tagWarningOutlinedHover:tagHoverBackground,tagNegativeFontDisabled:n.negative200,tagNegativeOutlinedDisabled:n.negative200,tagNegativeSolidFont:n.white,tagNegativeSolidBackground:n.negative400,tagNegativeOutlinedBackground:n.negative200,tagNegativeOutlinedFont:n.negative400,tagNegativeSolidHover:n.negative50,tagNegativeSolidActive:n.negative100,tagNegativeSolidDisabled:n.negative50,tagNegativeSolidFontHover:n.negative500,tagNegativeLightBackground:n.negative50,tagNegativeLightHover:n.negative100,tagNegativeLightActive:n.negative100,tagNegativeLightDisabled:n.negative50,tagNegativeLightFont:n.negative500,tagNegativeLightFontHover:n.negative500,tagNegativeOutlinedActive:n.negative600,tagNegativeOutlinedFontHover:n.negative400,tagNegativeOutlinedHover:tagHoverBackground,tableHeadBackgroundColor:n.mono100,tableBackground:n.mono100,tableStripedBackground:n.mono200,tableFilter:n.mono600,tableFilterHeading:n.mono700,tableFilterBackground:n.mono100,tableFilterFooterBackground:n.mono200,toastText:n.white,toastPrimaryText:n.white,toastInfoBackground:n.accent400,toastInfoText:n.white,toastPositiveBackground:n.positive400,toastPositiveText:n.white,toastWarningBackground:n.warning400,toastWarningText:n.black,toastNegativeBackground:n.negative400,toastNegativeText:n.white,spinnerTrackFill:n.mono900,progressbarTrackFill:n.mono900,tooltipBackground:n.mono900,tooltipText:n.mono100}});var borders={border100:{borderColor:"hsla(0, 0%, 0%, 0.04)",borderStyle:"solid",borderWidth:"1px"},border200:{borderColor:"hsla(0, 0%, 0%, 0.08)",borderStyle:"solid",borderWidth:"1px"},border300:{borderColor:"hsla(0, 0%, 0%, 0.12)",borderStyle:"solid",borderWidth:"1px"},border400:{borderColor:"hsla(0, 0%, 0%, 0.16)",borderStyle:"solid",borderWidth:"1px"},border500:{borderColor:"hsla(0, 0%, 0%, 0.2)",borderStyle:"solid",borderWidth:"1px"},border600:{borderColor:"hsla(0, 0%, 0%, 0.24)",borderStyle:"solid",borderWidth:"1px"},radius100:"2px",radius200:"4px",radius300:"8px",radius400:"12px",radius500:"16px",useRoundedCorners:!0,buttonBorderRadiusMini:"4px",buttonBorderRadius:"8px",checkboxBorderRadius:"0px",inputBorderRadiusMini:"4px",inputBorderRadius:"8px",popoverBorderRadius:"8px",surfaceBorderRadius:"0px",tagBorderRadius:"24px"},lighting={shadow400:"0 1px 4px hsla(0, 0%, 0%, 0.16)",shadow500:"0 2px 8px hsla(0, 0%, 0%, 0.16)",shadow600:"0 4px 16px hsla(0, 0%, 0%, 0.16)",shadow700:"0 8px 24px hsla(0, 0%, 0%, 0.16)",overlay0:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0)",overlay100:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.04)",overlay200:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.08)",overlay300:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.12)",overlay400:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.16)",overlay500:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.2)",overlay600:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.24)",shallowAbove:"0px -4px 16px rgba(0, 0, 0, 0.12)",shallowBelow:"0px 4px 16px rgba(0, 0, 0, 0.12)",deepAbove:"0px -16px 48px rgba(0, 0, 0, 0.22)",deepBelow:"0px 16px 48px rgba(0, 0, 0, 0.22)"};function ownKeys$w(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$v(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$w(Object(e),!0).forEach(function(t){_defineProperty$C(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$w(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$C(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var defaultFontTokens={primaryFontFamily:'system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif'},monoFontFamily='"Lucida Console", Monaco, monospace';const getTypography=(function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:defaultFontTokens,i={fontFamily:n.primaryFontFamily,fontSize:"12px",fontWeight:"normal",lineHeight:"20px"},e={fontFamily:n.primaryFontFamily,fontSize:"12px",fontWeight:500,lineHeight:"16px"},t={fontFamily:n.primaryFontFamily,fontSize:"14px",fontWeight:"normal",lineHeight:"20px"},o={fontFamily:n.primaryFontFamily,fontSize:"14px",fontWeight:500,lineHeight:"16px"},d={fontFamily:n.primaryFontFamily,fontSize:"16px",fontWeight:"normal",lineHeight:"24px"},p={fontFamily:n.primaryFontFamily,fontSize:"16px",fontWeight:500,lineHeight:"20px"},h={fontFamily:n.primaryFontFamily,fontSize:"18px",fontWeight:"normal",lineHeight:"28px"},y={fontFamily:n.primaryFontFamily,fontSize:"18px",fontWeight:500,lineHeight:"24px"},$={fontFamily:n.primaryFontFamily,fontSize:"20px",fontWeight:700,lineHeight:"28px"},E={fontFamily:n.primaryFontFamily,fontSize:"24px",fontWeight:700,lineHeight:"32px"},M={fontFamily:n.primaryFontFamily,fontSize:"28px",fontWeight:700,lineHeight:"36px"},H={fontFamily:n.primaryFontFamily,fontSize:"32px",fontWeight:700,lineHeight:"40px"},Z={fontFamily:n.primaryFontFamily,fontSize:"36px",fontWeight:700,lineHeight:"44px"},be={fontFamily:n.primaryFontFamily,fontSize:"40px",fontWeight:700,lineHeight:"52px"},ye={fontFamily:n.primaryFontFamily,fontSize:"36px",fontWeight:700,lineHeight:"44px"},we={fontFamily:n.primaryFontFamily,fontSize:"44px",fontWeight:700,lineHeight:"52px"},xe={fontFamily:n.primaryFontFamily,fontSize:"52px",fontWeight:700,lineHeight:"64px"},Ce={fontFamily:n.primaryFontFamily,fontSize:"96px",fontWeight:700,lineHeight:"112px"};return{font100:i,font150:e,font200:t,font250:o,font300:d,font350:p,font400:h,font450:y,font550:$,font650:E,font750:M,font850:H,font950:Z,font1050:be,font1150:ye,font1250:we,font1350:xe,font1450:Ce,ParagraphXSmall:i,ParagraphSmall:t,ParagraphMedium:d,ParagraphLarge:h,LabelXSmall:e,LabelSmall:o,LabelMedium:p,LabelLarge:y,HeadingXSmall:$,HeadingSmall:E,HeadingMedium:M,HeadingLarge:H,HeadingXLarge:Z,HeadingXXLarge:be,DisplayXSmall:ye,DisplaySmall:we,DisplayMedium:xe,DisplayLarge:Ce,MonoParagraphXSmall:_objectSpread$v(_objectSpread$v({},i),{},{fontFamily:monoFontFamily}),MonoParagraphSmall:_objectSpread$v(_objectSpread$v({},t),{},{fontFamily:monoFontFamily}),MonoParagraphMedium:_objectSpread$v(_objectSpread$v({},d),{},{fontFamily:monoFontFamily}),MonoParagraphLarge:_objectSpread$v(_objectSpread$v({},h),{},{fontFamily:monoFontFamily}),MonoLabelXSmall:_objectSpread$v(_objectSpread$v({},e),{},{fontFamily:monoFontFamily}),MonoLabelSmall:_objectSpread$v(_objectSpread$v({},o),{},{fontFamily:monoFontFamily}),MonoLabelMedium:_objectSpread$v(_objectSpread$v({},p),{},{fontFamily:monoFontFamily}),MonoLabelLarge:_objectSpread$v(_objectSpread$v({},y),{},{fontFamily:monoFontFamily}),MonoHeadingXSmall:_objectSpread$v(_objectSpread$v({},$),{},{fontFamily:monoFontFamily}),MonoHeadingSmall:_objectSpread$v(_objectSpread$v({},E),{},{fontFamily:monoFontFamily}),MonoHeadingMedium:_objectSpread$v(_objectSpread$v({},M),{},{fontFamily:monoFontFamily}),MonoHeadingLarge:_objectSpread$v(_objectSpread$v({},H),{},{fontFamily:monoFontFamily}),MonoHeadingXLarge:_objectSpread$v(_objectSpread$v({},Z),{},{fontFamily:monoFontFamily}),MonoHeadingXXLarge:_objectSpread$v(_objectSpread$v({},be),{},{fontFamily:monoFontFamily}),MonoDisplayXSmall:_objectSpread$v(_objectSpread$v({},ye),{},{fontFamily:monoFontFamily}),MonoDisplaySmall:_objectSpread$v(_objectSpread$v({},we),{},{fontFamily:monoFontFamily}),MonoDisplayMedium:_objectSpread$v(_objectSpread$v({},xe),{},{fontFamily:monoFontFamily}),MonoDisplayLarge:_objectSpread$v(_objectSpread$v({},Ce),{},{fontFamily:monoFontFamily})}});var animation={timing100:"100ms",timing200:"200ms",timing300:"300ms",timing400:"400ms",timing500:"500ms",timing600:"600ms",timing700:"700ms",timing800:"800ms",timing900:"900ms",timing1000:"1000ms",easeInCurve:"cubic-bezier(.8, .2, .6, 1)",easeOutCurve:"cubic-bezier(.2, .8, .4, 1)",easeInOutCurve:"cubic-bezier(0.4, 0, 0.2, 1)",easeInQuinticCurve:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuinticCurve:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuinticCurve:"cubic-bezier(0.86, 0, 0.07, 1)",linearCurve:"cubic-bezier(0, 0, 1, 1)"},breakpoints$1={small:320,medium:600,large:1136},grid={columns:[4,8,12],gutters:[16,36,36],margins:[16,36,64],gaps:0,unit:"px",maxWidth:1280},getMediaQuery=function n(i){return"@media screen and (min-width: ".concat(i,"px)")},mediaQuery={small:getMediaQuery(breakpoints$1.small),medium:getMediaQuery(breakpoints$1.medium),large:getMediaQuery(breakpoints$1.large)},sizing={scale0:"2px",scale100:"4px",scale200:"6px",scale300:"8px",scale400:"10px",scale500:"12px",scale550:"14px",scale600:"16px",scale650:"18px",scale700:"20px",scale750:"22px",scale800:"24px",scale850:"28px",scale900:"32px",scale950:"36px",scale1000:"40px",scale1200:"48px",scale1400:"56px",scale1600:"64px",scale2400:"96px",scale3200:"128px",scale4800:"192px"};function ownKeys$v(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$u(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$v(Object(e),!0).forEach(function(t){_defineProperty$B(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$v(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$B(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var LightTheme={name:"light-theme",colors:_objectSpread$u(_objectSpread$u(_objectSpread$u({},lightColorTokens),getComponentColorTokens()),getSemanticColorTokens()),animation,breakpoints:breakpoints$1,borders,direction:"auto",grid,lighting,mediaQuery,sizing,typography:getTypography(),zIndex:{modal:2e3}};function _typeof$j(n){"@babel/helpers - typeof";return _typeof$j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$j(n)}function deepMerge(n){n=n||{};for(var i=arguments.length<=1?0:arguments.length-1,e,t,o=0;o<i;o++){e=(o+1<1||arguments.length<=o+1?void 0:arguments[o+1])||{};for(var d in e)_typeof$j(e[d])!==void 0&&(t=e[d],isCloneable(t)?n[d]=deepMerge(n[d]||Array.isArray(t)&&[]||{},t):n[d]=t)}return n}function isCloneable(n){return Array.isArray(n)||{}.toString.call(n)=="[object Object]"}var darkColorTokens={primaryA:colors$1.gray200,primaryB:colors$1.gray900,primary:colors$1.white,primary50:colors$1.gray50,primary100:colors$1.gray100,primary200:colors$1.gray200,primary300:colors$1.gray300,primary400:colors$1.gray400,primary500:colors$1.gray500,primary600:colors$1.gray600,primary700:colors$1.gray700,accent:colors$1.blue400,accent50:colors$1.blue50,accent100:colors$1.blue100,accent200:colors$1.blue200,accent300:colors$1.blue300,accent400:colors$1.blue400,accent500:colors$1.blue500,accent600:colors$1.blue600,accent700:colors$1.blue700,negative:colors$1.red500,negative50:colors$1.red50,negative100:colors$1.red100,negative200:colors$1.red200,negative300:colors$1.red300,negative400:colors$1.red400,negative500:colors$1.red500,negative600:colors$1.red600,negative700:colors$1.red700,warning:colors$1.yellow500,warning50:colors$1.yellow50,warning100:colors$1.yellow100,warning200:colors$1.yellow200,warning300:colors$1.yellow300,warning400:colors$1.yellow400,warning500:colors$1.yellow500,warning600:colors$1.yellow600,warning700:colors$1.yellow700,positive:colors$1.green400,positive50:colors$1.green50,positive100:colors$1.green100,positive200:colors$1.green200,positive300:colors$1.green300,positive400:colors$1.green400,positive500:colors$1.green500,positive600:colors$1.green600,positive700:colors$1.green700,white:colors$1.white,black:colors$1.black,mono100:colors$1.gray300,mono200:colors$1.gray400,mono300:colors$1.gray500,mono400:colors$1.gray600,mono500:colors$1.gray700,mono600:"#292929",mono700:"#1F1F1F",mono800:"#141414",mono900:"#111111",mono1000:colors$1.black,ratingInactiveFill:colors$1.gray500,ratingStroke:colors$1.gray700},_excluded$q=["primaryFontFamily"];function ownKeys$u(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$t(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$u(Object(e),!0).forEach(function(t){_defineProperty$A(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$u(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$A(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function _objectWithoutProperties$r(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$r(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$r(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function createLightTheme(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,e=n.primaryFontFamily,t=_objectWithoutProperties$r(n,_excluded$q),o=_objectSpread$t(_objectSpread$t({},lightColorTokens),t),d={animation,borders,breakpoints:breakpoints$1,colors:_objectSpread$t(_objectSpread$t(_objectSpread$t({},o),getComponentColorTokens(o)),getSemanticColorTokens(o)),direction:"auto",grid,lighting,mediaQuery,sizing,typography:e?getTypography({primaryFontFamily:e}):getTypography(),zIndex:{modal:2e3}};return deepMerge(d,i)}function ownKeys$t(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$s(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$t(Object(e),!0).forEach(function(t){_defineProperty$z(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$t(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$z(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var primitives$1=_objectSpread$s(_objectSpread$s({},darkColorTokens),defaultFontTokens);function ownKeys$s(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$r(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$s(Object(e),!0).forEach(function(t){_defineProperty$y(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$s(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$y(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var primitives=_objectSpread$r(_objectSpread$r({},lightColorTokens),defaultFontTokens),ThemeContext$1=reactExports.createContext(LightTheme),ThemeProvider$1=function n(i){var e=i.theme,t=i.children;return reactExports.createElement(ThemeContext$1.Provider,{value:e},t)};function ownKeys$r(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$q(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$r(Object(e),!0).forEach(function(t){_defineProperty$x(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$r(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$x(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function _slicedToArray$m(n,i){return _arrayWithHoles$m(n)||_iterableToArrayLimit$m(n,i)||_unsupportedIterableToArray$m(n,i)||_nonIterableRest$m()}function _nonIterableRest$m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
48
48
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$m(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$m(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$m(n,i)}}function _arrayLikeToArray$m(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$m(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$m(n){if(Array.isArray(n))return n}function _extends$y(){return _extends$y=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$y.apply(this,arguments)}var wrapper=function n(i){return reactExports.forwardRef(function(e,t){return reactExports.createElement(ThemeContext$1.Consumer,null,function(o){return reactExports.createElement(i,_extends$y({ref:t},e,{$theme:o}))})})};function createThemedStyled(){return createStyled$1({wrapper,getInitialStyle,driver})}var styled$1=createThemedStyled();function createThemedWithStyle(){return withStyle$1}var withStyle=createThemedWithStyle();function createThemedUseStyletron(){return function(){var n=reactExports.useContext(ThemeContext$1),i=useStyletron$1(),e=_slicedToArray$m(i,1),t=e[0];return[t,n]}}var useStyletron=createThemedUseStyletron();function withWrapper(n,i){return withWrapper$1(n,function(e){return reactExports.forwardRef(function(t,o){return reactExports.createElement(ThemeContext$1.Consumer,null,function(d){return i(e)(_objectSpread$q(_objectSpread$q({ref:o},t),{},{$theme:d}))})})})}var locale$b={collapse:"Collapse",expand:"Expand"},locale$a={ariaLabel:"Breadcrumbs navigation"},locale$9={ariaLabel:"Select a date.",ariaLabelRange:"Select a date range.",ariaLabelCalendar:"Calendar.",ariaRoleDescriptionCalendarMonth:"Calendar month",previousMonth:"Previous month.",nextMonth:"Next month.",pastWeek:"Past Week",pastMonth:"Past Month",pastThreeMonths:"Past 3 Months",pastSixMonths:"Past 6 Months",pastYear:"Past Year",pastTwoYears:"Past 2 Years",screenReaderMessageInput:"Press the down arrow key to interact with the calendar and select a date. Press the escape button to close the calendar.",selectedDate:"Selected date is ${date}.",selectedDateRange:"Selected date range is from ${startDate} to ${endDate}.",selectSecondDatePrompt:"Select the second date.",quickSelectLabel:"Choose a date range",quickSelectAriaLabel:"Choose a date range",quickSelectPlaceholder:"None",timeSelectEndLabel:"End time",timeSelectStartLabel:"Start time",timePickerAriaLabel12Hour:"Select a time, 12-hour format.",timePickerAriaLabel24Hour:"Select a time, 24-hour format.",timezonePickerAriaLabel:"Select a timezone.",selectedStartDateLabel:"Selected start date.",selectedEndDateLabel:"Selected end date.",dateNotAvailableLabel:"Not available.",dateAvailableLabel:"It's available.",selectedLabel:"Selected.",chooseLabel:"Choose"},locale$8={emptyState:"No rows match the filter criteria defined. Please remove one or more filters to view more data.",loadingState:"Loading rows.",searchAriaLabel:"Search by text",filterAdd:"Add Filter",filterExclude:"Exclude",filterApply:"Apply",filterExcludeRange:"Exclude range",filterExcludeValue:"Exclude value",filterAppliedTo:"filter applied to",optionsLabel:"Select column to filter by",optionsSearch:"Search for a column to filter by...",optionsEmpty:"No columns available.",categoricalFilterSelectAll:"Select All",categoricalFilterSelectClear:"Clear",categoricalFilterEmpty:"No categories found",datetimeFilterRange:"Range",datetimeFilterRangeDatetime:"Date, Time",datetimeFilterRangeDate:"Date",datetimeFilterRangeTime:"Time",datetimeFilterCategorical:"Categorical",datetimeFilterCategoricalWeekday:"Weekday",datetimeFilterCategoricalMonth:"Month",datetimeFilterCategoricalQuarter:"Quarter",datetimeFilterCategoricalHalf:"Half",datetimeFilterCategoricalFirstHalf:"H1",datetimeFilterCategoricalSecondHalf:"H2",datetimeFilterCategoricalYear:"Year",numericalFilterRange:"Range",numericalFilterSingleValue:"Single Value",booleanFilterTrue:"true",booleanFilterFalse:"false",booleanColumnTrueShort:"T",booleanColumnFalseShort:"F",selectRow:"Select row",selectAllRows:"Select all rows"},locale$7={ariaLabel:"button group"},locale$6={dropFilesToUpload:"Drop files here to upload...",or:"",browseFiles:"Browse files",retry:"Retry Upload",cancel:"Cancel"},locale$5={noResultsMsg:"No results",parentMenuItemAriaLabel:"You are currently at an item that opens a nested listbox. Press right arrow to enter that element and left arrow to return."},locale$4={close:"Close"},locale$3={close:"Close"},locale$2={prev:"Prev",next:"Next",preposition:"of"},locale$1={noResultsMsg:"No results found",placeholder:"Select...",create:"Create"},locale={close:"Close"},en_US={accordion:locale$b,breadcrumbs:locale$a,datepicker:locale$9,datatable:locale$8,buttongroup:locale$7,fileuploader:locale$6,menu:locale$5,modal:locale$4,drawer:locale$3,pagination:locale$2,select:locale$1,toast:locale},LocaleContext=reactExports.createContext(en_US),generateUID$1=function(){var n=1,i=new WeakMap,e=function(t,o){return typeof t=="number"||typeof t=="string"?o?"idx-".concat(o):"val-".concat(t):i.has(t)?"uid"+i.get(t):(i.set(t,n++),e(t))};return e},createSource=function(n){return n===void 0&&(n=""),{value:1,prefix:n,uid:generateUID$1()}},counter=createSource(),source=reactExports.createContext(createSource()),getId=function(n){return n.value++},getPrefix=function(n){return n?n.prefix:""},__extends$1=(function(){var n=function(i,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var d in o)Object.prototype.hasOwnProperty.call(o,d)&&(t[d]=o[d])},n(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}})(),prefixId=function(n,i,e){var t=i+n;return String(e?e(t):t)},UID=(function(n){__extends$1(i,n);function i(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={quartz:e.props.idSource||counter,prefix:getPrefix(e.props.idSource),id:getId(e.props.idSource||counter)},e.uid=function(t){return prefixId(e.state.id+"-"+e.state.quartz.uid(t),e.state.prefix,e.props.name)},e}return i.prototype.render=function(){var e=this.props,t=e.children,o=e.name,d=this.state,p=d.id,h=d.prefix;return t(prefixId(p,h,o),this.uid)},i})(reactExports.Component),generateUID=function(n){var i=n||counter,e=getPrefix(i),t=getId(i),o=e+t,d=function(p){return o+i.uid(p)};return{uid:o,gen:d}},useUIDState=function(){var n=reactExports.useContext(source),i=reactExports.useState(function(){return generateUID(n)})[0];return i},useUID=function(){var n=useUIDState().uid;return n},useUIDSeed=function(){var n=useUIDState().gen;return n},UIDReset=function(n){var i=n.children,e=n.prefix,t=e===void 0?"":e,o=reactExports.useState(function(){return createSource(t)})[0];return reactExports.createElement(source.Provider,{value:o},i)},UIDConsumer=function(n){var i=n.name,e=n.children;return reactExports.createElement(source.Consumer,null,function(t){return reactExports.createElement(UID,{name:i,idSource:t,children:e})})},reactIsExports$1=requireReactIs$1();function _extends$x(){return _extends$x=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$x.apply(this,arguments)}function ownKeys$q(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$p(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$q(Object(e),!0).forEach(function(t){_defineProperty$w(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$q(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$w(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function _typeof$i(n){"@babel/helpers - typeof";return _typeof$i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$i(n)}function getOverride(n){return reactIsExports$1.isValidElementType(n)?n:n&&_typeof$i(n)==="object"?n.component:n}function getOverrideProps(n){return n&&_typeof$i(n)==="object"?_typeof$i(n.props)==="object"?_objectSpread$p(_objectSpread$p({},n.props),{},{$style:n.style}):{$style:n.style}:{}}function toObjectOverride(n){return reactIsExports$1.isValidElementType(n)?{component:n}:n||{}}function getOverrides(n,i){var e=getOverride(n)||i;if(n&&_typeof$i(n)==="object"&&typeof n.props=="function"){var t=reactExports.forwardRef(function(d,p){var h=n.props(d),y=getOverrideProps(_objectSpread$p(_objectSpread$p({},n),{},{props:h}));return reactExports.createElement(e,_extends$x({ref:p},y))});return t.displayName=e.displayName,[t,{}]}var o=getOverrideProps(n);return[e,o]}function mergeOverrides(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=Object.assign({},n,i),t=Object.keys(e);return t.reduce(function(o,d){return o[d]=mergeOverride(toObjectOverride(n[d]),toObjectOverride(i[d])),o},{})}function mergeOverride(n,i){var e=_objectSpread$p(_objectSpread$p({},n),i);return n.props&&i.props&&(e.props=mergeConfigurationOverrides(n.props,i.props)),n.style&&i.style&&(e.style=mergeConfigurationOverrides(n.style,i.style)),e}function mergeConfigurationOverrides(n,i){return _typeof$i(n)==="object"&&_typeof$i(i)==="object"?deepMerge({},n,i):function(){return deepMerge({},typeof n=="function"?n.apply(void 0,arguments):n,typeof i=="function"?i.apply(void 0,arguments):i)}}var initialized=!1,hadKeyboardEvent=!0,inputTypesWhitelist={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function focusTriggersKeyboardModality(n){var i=n.type,e=n.tagName;return!!(e==="INPUT"&&inputTypesWhitelist[i]&&!n.readOnly||e==="TEXTAREA"&&!n.readOnly||n.isContentEditable)}function handleKeyDown(n){n.metaKey||n.altKey||n.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown(){hadKeyboardEvent=!1}function handleVisibilityChange(){this.visibilityState}function prepare(n){n.addEventListener("keydown",handleKeyDown,!0),n.addEventListener("mousedown",handlePointerDown,!0),n.addEventListener("pointerdown",handlePointerDown,!0),n.addEventListener("touchstart",handlePointerDown,!0),n.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(n){try{return n.target.matches(":focus-visible")}catch{}return hadKeyboardEvent||focusTriggersKeyboardModality(n.target)}function initFocusVisible(n){!initialized&&n!=null&&(initialized=!0,prepare(n.ownerDocument))}var forkFocus=function n(i,e){return function(t){typeof i.onFocus=="function"&&i.onFocus(t),e(t)}},forkBlur=function n(i,e){return function(t){typeof i.onBlur=="function"&&i.onBlur(t),e(t)}};function _typeof$h(n){"@babel/helpers - typeof";return _typeof$h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$h(n)}function _extends$w(){return _extends$w=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$w.apply(this,arguments)}function _slicedToArray$l(n,i){return _arrayWithHoles$l(n)||_iterableToArrayLimit$l(n,i)||_unsupportedIterableToArray$l(n,i)||_nonIterableRest$l()}function _nonIterableRest$l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -93,7 +93,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
93
93
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$f(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$f(n,i)}}function _iterableToArray$2(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function _arrayWithoutHoles$2(n){if(Array.isArray(n))return _arrayLikeToArray$f(n)}function _arrayLikeToArray$f(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function ownKeys$e(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$d(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$e(Object(e),!0).forEach(function(t){_defineProperty$f(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$e(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$7(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$7(n,i,e){return i&&_defineProperties$7(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$7(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$6(n,i)}function _setPrototypeOf$6(n,i){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$6(n,i)}function _createSuper$7(n){var i=_isNativeReflectConstruct$7();return function(){var t=_getPrototypeOf$7(n),o;if(i){var d=_getPrototypeOf$7(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$7(this,o)}}function _possibleConstructorReturn$7(n,i){if(i&&(_typeof$7(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$7(n)}function _assertThisInitialized$7(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(n){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$7(n)}function _defineProperty$f(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var toasterRef,ToasterContainer=(function(n){_inherits$7(e,n);var i=_createSuper$7(e);function e(t){var o;return _classCallCheck$7(this,e),o=i.call(this,t),_defineProperty$f(_assertThisInitialized$7(o),"state",{isMounted:!1,toasts:[]}),_defineProperty$f(_assertThisInitialized$7(o),"dismissHandlers",{}),_defineProperty$f(_assertThisInitialized$7(o),"toastId",0),_defineProperty$f(_assertThisInitialized$7(o),"getToastProps",function(d){var p=o.props,h=p.autoFocus,y=p.autoHideDuration,$=p.closeable,E=d.key||"toast-".concat(o.toastId++);return _objectSpread$d(_objectSpread$d({autoFocus:h,autoHideDuration:y,closeable:$},d),{},{key:E})}),_defineProperty$f(_assertThisInitialized$7(o),"show",function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(o.state.toasts.map(function(h){return h.key}).includes(d.key))return o.update(d.key,d),d.key;var p=o.getToastProps(d);return o.setState(function(h){var y=h.toasts;return{toasts:[].concat(_toConsumableArray$2(y),[p])}}),p.key}),_defineProperty$f(_assertThisInitialized$7(o),"update",function(d,p){o.setState(function(h){var y=h.toasts,$=y.map(function(E){if(E.key===d){var M=_objectSpread$d(_objectSpread$d(_objectSpread$d({},E),o.getToastProps(_objectSpread$d({autoHideDuration:E.autoHideDuration},p))),{},{key:d},o.props.resetAutoHideTimerOnUpdate?{__updated:(+E.__updated||0)+1}:{});return M}return E});return{toasts:$}})}),_defineProperty$f(_assertThisInitialized$7(o),"dismiss",function(d){o.dismissHandlers[d]&&o.dismissHandlers[d]()}),_defineProperty$f(_assertThisInitialized$7(o),"clearAll",function(){Object.keys(o.dismissHandlers).forEach(function(d){o.dismissHandlers[d]()})}),_defineProperty$f(_assertThisInitialized$7(o),"clear",function(d){d===void 0?o.clearAll():o.dismiss(d)}),_defineProperty$f(_assertThisInitialized$7(o),"internalOnClose",function(d){delete o.dismissHandlers[d],o.setState(function(p){var h=p.toasts;return{toasts:h.filter(function(y){return y.key!==d})}})}),_defineProperty$f(_assertThisInitialized$7(o),"getOnCloseHandler",function(d,p){return function(){o.internalOnClose(d),typeof p=="function"&&p()}}),_defineProperty$f(_assertThisInitialized$7(o),"renderToast",function(d){var p=d.onClose,h=d.children,y=d.key,$=_objectWithoutProperties$h(d,_excluded$k),E=o.props.overrides,M=E.ToastBody,H=E.ToastCloseIcon,Z=E.ToastInnerContainer,be=mergeOverrides({Body:Body$1,CloseIcon:CloseIconSvg,InnerContainer},{Body:M||{},CloseIcon:H||{},InnerContainer:Z||{}}),ye=mergeOverrides(be,d.overrides);return reactExports.createElement(Toast$1,_extends$j({},$,{overrides:ye,key:y,onClose:o.getOnCloseHandler(y,p)}),function(we){var xe=we.dismiss;return o.dismissHandlers[y]=xe,h})}),_defineProperty$f(_assertThisInitialized$7(o),"getSharedProps",function(){var d=o.props.placement;return{$placement:d}}),toasterRef=_assertThisInitialized$7(o),o}return _createClass$7(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"render",value:function(){for(var o=this.getSharedProps(),d=this.props.overrides.Root,p=getOverrides(d,Root$2),h=_slicedToArray$f(p,2),y=h[0],$=h[1],E=this.state.toasts.length,M=[],H=E-1;H>=0;H--)M.push(this.renderToast(this.state.toasts[H]));var Z=reactExports.createElement(y,_extends$j({"data-baseweb":"toaster"},o,$),M);return this.state.isMounted?reactExports.createElement(reactExports.Fragment,null,this.props.usePortal&&typeof document<"u"&&document.body?ReactDOM.createPortal(Z,document.body):Z,this.props.children):reactExports.createElement(reactExports.Fragment,null,this.props.children)}}]),e})(reactExports.Component);_defineProperty$f(ToasterContainer,"defaultProps",{autoFocus:!1,autoHideDuration:0,children:null,closeable:!0,overrides:{},placement:PLACEMENT.top,resetAutoHideTimerOnUpdate:!0,usePortal:!0});var toaster={getRef:function n(){return toasterRef},show:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=this.getRef();if(t)return t.show(_objectSpread$d(_objectSpread$d({},e),{},{children:i}))},info:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(i,_objectSpread$d(_objectSpread$d({},e),{},{kind:KIND$1.info}))},positive:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(i,_objectSpread$d(_objectSpread$d({},e),{},{kind:KIND$1.positive}))},warning:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(i,_objectSpread$d(_objectSpread$d({},e),{},{kind:KIND$1.warning}))},negative:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(i,_objectSpread$d(_objectSpread$d({},e),{},{kind:KIND$1.negative}))},update:function n(i,e){var t=this.getRef();t&&t.update(i,e)},clear:function n(i){var e=this.getRef();e&&e.clear(i)}};function _typeof$6(n){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$6(n)}function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$i.apply(this,arguments)}function _classCallCheck$6(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$6(n,i,e){return i&&_defineProperties$6(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$6(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$5(n,i)}function _setPrototypeOf$5(n,i){return _setPrototypeOf$5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$5(n,i)}function _createSuper$6(n){var i=_isNativeReflectConstruct$6();return function(){var t=_getPrototypeOf$6(n),o;if(i){var d=_getPrototypeOf$6(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$6(this,o)}}function _possibleConstructorReturn$6(n,i){if(i&&(_typeof$6(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(n)}function _assertThisInitialized$6(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(n){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$6(n)}function _defineProperty$e(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Notification=(function(n){_inherits$6(e,n);var i=_createSuper$6(e);function e(){return _classCallCheck$6(this,e),i.apply(this,arguments)}return _createClass$6(e,[{key:"render",value:function(){var o=mergeOverrides({Body:{style:function(p){var h=p.$theme;return{marginTop:h.sizing.scale600,marginRight:h.sizing.scale600,marginBottom:h.sizing.scale600,marginLeft:h.sizing.scale600}}}},this.props.overrides);return reactExports.createElement(Toast$1,_extends$i({"data-baseweb":"notification"},this.props,{overrides:o}))}}]),e})(reactExports.Component);_defineProperty$e(Notification,"defaultProps",{notificationType:TYPE$1.inline,closeable:!1});const StyledAlertContent$1=styled("div",{target:"e5p6yly0"})(({theme:n})=>({pre:{backgroundColor:n.colors.transparent,paddingTop:n.spacing.lg,paddingBottom:n.spacing.lg,paddingRight:n.spacing.lg,paddingLeft:n.spacing.lg,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"pre, code":{backgroundColor:n.colors.transparent,color:"inherit"}},code:{backgroundColor:n.colors.transparent,padding:n.spacing.none},"pre, code":{color:"inherit"},a:{color:"inherit",textDecoration:"underline"}}));var Kind=(function(n){return n.ERROR="error",n.INFO="info",n.SUCCESS="success",n.WARNING="warning",n})({});function getNotificationKind(n){switch(n){case"error":return KIND$1.negative;case"info":return KIND$1.info;case"success":return KIND$1.positive;case"warning":return KIND$1.warning;default:throw new Error(`Unexpected alert type: ${n}`)}}function AlertContainer({kind:n,width:i,children:e}){const t=useEmotionTheme(),o=n.charAt(0).toUpperCase()+n.slice(1);return jsx$1(Notification,{kind:getNotificationKind(n),overrides:{Body:{style:{fontWeight:t.fontWeights.normal,marginTop:t.spacing.none,marginBottom:t.spacing.none,marginLeft:t.spacing.none,marginRight:t.spacing.none,width:i?i.toString():void 0,border:0,borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default,borderTopLeftRadius:t.radii.default,borderBottomLeftRadius:t.radii.default,paddingTop:t.spacing.lg,paddingBottom:t.spacing.lg,paddingRight:t.spacing.lg,paddingLeft:t.spacing.lg},props:{"data-testid":"stAlertContainer",className:"stAlertContainer"}},InnerContainer:{style:{width:"100%",lineHeight:t.lineHeights.small}}},children:jsx$1(StyledAlertContent$1,{"data-testid":`stAlertContent${o}`,children:e})})}const StyledStackTrace=styled("pre",{target:"e1p6lu300"})(({theme:n})=>({whiteSpace:"pre-wrap",wordWrap:"break-word",color:"inherit",fontSize:n.fontSizes.codeFontSize,fontFamily:n.genericFonts.codeFont,fontWeight:n.fontWeights.code,backgroundColor:n.colors.transparent,overflowX:"auto",margin:0,borderRadius:n.radii.default,padding:n.spacing.lg,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`})),StyledErrorName=styled("strong",{target:"e1p6lu301"})(({theme:n})=>({fontWeight:n.fontWeights.codeBold}));function ErrorElement(n){const{name:i,message:e,stack:t,width:o}=n,d=t?t.split(`
94
94
  `):[];d.shift();const p=d.map(h=>h.trim()).join(`
95
95
  `);return jsxs(AlertContainer,{kind:Kind.ERROR,width:o,children:[jsxs(StyledErrorName,{children:[i,": "]}),e,t?jsx$1(StyledStackTrace,{"data-testid":"stErrorElementStack",children:jsx$1(StyledCode,{wrapLines:!1,children:p})}):null]})}const LOG$g=loglevelExports.getLogger("ErrorBoundary"),Ss=class Ss extends reactExports.PureComponent{constructor(){super(...arguments),this.state={error:null},this.componentDidCatch=i=>{LOG$g.error(`${i.name}: ${i.message}
96
- ${i.stack}`)}}render(){const{error:i}=this.state;return i?i.name==="ChunkLoadError"?jsx$1(ErrorElement,{width:this.props.width,name:"Network issue",message:jsxs("p",{children:["Cannot load Streamlit frontend code. This can happen when you update Streamlit while a Streamlit app is running.",jsx$1("br",{}),"To fix this, simply reload this app by pressing"," ",jsx$1(StyledInlineCode,{children:"F5"}),","," ",jsx$1(StyledInlineCode,{children:"Ctrl+R"}),", or"," ",jsx$1(StyledInlineCode,{children:"Cmd+R"}),".",jsx$1("br",{}),"If the error persists, try force-clearing your browser's cache as described"," ",jsx$1("a",{href:"https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Cache_clearing_and_disabling",rel:"noopener noreferrer",target:"_blank",children:"here"})]})}):jsx$1(ErrorElement,{width:this.props.width,name:i.name,message:i.message,stack:i.stack}):this.props.children}};Ss.getDerivedStateFromError=i=>({error:i});let ErrorBoundary=Ss;function convertRemToEm(n){return n.replace(/rem$/,"em")}function sharedMarkdownStyle(n){return{a:{color:n.colors.link,textDecoration:n.linkUnderline?"underline":"none","&:focus":{outline:"none",boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default}}}}function convertFontSizes(n,i,e){if(i){const t=roundFontSizeToNearestEighth(parseFloat(n)*.65),o=`${Math.max(t,.75)}rem`;return e?convertRemToEm(o):o}return e?convertRemToEm(n):n}function getMarkdownHeadingDefinitions(n,i,e){return{"h1, h2, h3, h4, h5, h6":{fontFamily:n.genericFonts.headingFont,lineHeight:n.lineHeights.headings,margin:0,color:"inherit"},h1:{fontSize:convertFontSizes(n.fontSizes.h1FontSize,i,e),fontWeight:n.fontWeights.h1FontWeight,padding:`${n.spacing.xl} 0 ${n.spacing.lg} 0`},"h1 b, h1 strong":{fontWeight:n.fontWeights.h1FontWeight},"h2, h3":{letterSpacing:"-0.005em"},h2:{fontSize:convertFontSizes(n.fontSizes.h2FontSize,i,e),fontWeight:n.fontWeights.h2FontWeight,padding:`${n.spacing.lg} 0 ${n.spacing.lg} 0`},h3:{fontSize:convertFontSizes(n.fontSizes.h3FontSize,i,e),fontWeight:n.fontWeights.h3FontWeight,padding:`${n.spacing.md} 0 ${n.spacing.lg} 0`},h4:{fontSize:convertFontSizes(n.fontSizes.h4FontSize,i,e),fontWeight:n.fontWeights.h4FontWeight,padding:`${n.spacing.sm} 0 ${n.spacing.lg} 0`},h5:{fontSize:convertFontSizes(n.fontSizes.h5FontSize,i,e),fontWeight:n.fontWeights.h5FontWeight,padding:`${n.spacing.xs} 0 ${n.spacing.lg} 0`},h6:{fontSize:convertFontSizes(n.fontSizes.h6FontSize,i,e),fontWeight:n.fontWeights.h6FontWeight,padding:`${n.spacing.twoXS} 0 ${n.spacing.lg} 0`}}}const StyledStreamlitMarkdown=styled("div",{target:"e1jgj4kv0"})(({theme:n,isCaption:i,isInDialog:e,isLabel:t,inheritFont:o,boldLabel:d,largerLabel:p,isToast:h})=>{const y=t&&!p||h||i;return{fontFamily:o?"inherit":n.genericFonts.bodyFont,fontSize:o?"inherit":y?n.fontSizes.sm:n.fontSizes.md,marginBottom:t?"":`-${n.spacing.lg}`,opacity:i?.6:void 0,color:"inherit",maxWidth:"100%",width:t?"":"100%",overflowWrap:"break-word",...sharedMarkdownStyle(n),...getMarkdownHeadingDefinitions(n,e,i),"&:has(.katex-display)":{overflowX:"hidden"},p:{wordBreak:"break-word",marginBottom:t?n.spacing.none:"",fontWeight:o?"inherit":d?n.fontWeights.bold:"",marginTop:n.spacing.none,marginLeft:n.spacing.none,marginRight:n.spacing.none},img:{maxWidth:"100%",maxHeight:t?"1em":void 0,verticalAlign:"middle",objectFit:"scale-down"},li:{margin:"0.2em 0 0.2em 1.15em",padding:"0 0 0 0.3em"},"li.task-list-item":{listStyleType:"none",padding:"0",marginLeft:"0","input[type='checkbox']":{verticalAlign:"middle",margin:"0 0.35em 0.1em 0"}},blockquote:{margin:"1em 0 1em 0",padding:"0 0 0 0.75em",borderLeft:`0.15em solid ${n.colors.borderColor}`,opacity:.6},"b, strong":{fontWeight:n.fontWeights.bold},"b code, strong code":{fontWeight:n.fontWeights.codeBold},hr:{margin:"2em 0",padding:0,color:"inherit",backgroundColor:"transparent",border:"none",borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:not([size])":{height:n.sizes.borderWidth}},table:{display:"table",borderCollapse:"collapse",marginBottom:n.spacing.lg},tr:{borderTop:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},th:{textAlign:"inherit"},"th, td":{padding:`${n.spacing.xs} ${n.spacing.md}`,border:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},"span.stMarkdownColoredBackground":{borderRadius:n.radii.md,padding:`${n.spacing.threeXS} ${n.spacing.twoXS}`,margin:n.spacing.none,boxDecorationBreak:"clone"},"span.stMarkdownBadge":{borderRadius:n.radii.md,padding:`0 ${n.spacing.twoXS}`,margin:`0 ${n.spacing.px}`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",display:"inline-block",verticalAlign:"middle"},"p, ol, ul, dl, li":{fontSize:"inherit"},"& > ul, & > ol":{display:"block",width:"fit-content",textAlign:"left"},"li > ul, li > ol":{display:"block"},".katex-display":{overflowX:"auto",overflowY:"hidden"},".katex":{fontWeight:n.fontWeights.normal}}}),StyledLinkIcon=styled("a",{target:"e1jgj4kv1"})(({theme:n})=>({lineHeight:0,display:"inline-flex",alignItems:"center",justifyContent:"center",opacity:0,pointerEvents:"none",transition:"opacity 150ms ease-in-out",svg:{stroke:n.colors.fadedText60,strokeWidth:2.25},"&:hover svg":{stroke:n.colors.bodyText},"&:focus-visible":{opacity:1,pointerEvents:"auto"}})),StyledHeadingWithActionElements=styled("div",{target:"e1jgj4kv2"})(({theme:n})=>({"h1, h2, h3, h4, h5, h6, span":{scrollMarginTop:n.sizes.headerHeight},...sharedMarkdownStyle(n),wordBreak:"break-word",textWrap:"pretty","&:hover, &:focus-within":{[StyledLinkIcon]:{opacity:1,pointerEvents:"auto"}}})),StyledHeadingActionElements=styled("span",{target:"e1jgj4kv3"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"e1jgj4kv4"})(({theme:n,rainbow:i,color:e})=>({height:`${n.spacing.threeXS} !important`,marginTop:n.spacing.sm,marginBottom:n.spacing.none,border:"none",borderRadius:n.radii.full,...i?{background:e}:{backgroundColor:e}})),StyledPreWrapper=styled("div",{target:"e1jgj4kv5"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"e1jgj4kv6"})({display:"inline-block",verticalAlign:"middle",transform:"translateY(-0.1em)"}),LOAD_FAILED=Symbol("plugin_load_failed"),pluginCache={katex:null,raw:null,emoji:null},loadingPromises={katex:null,raw:null,emoji:null},loadKatexPlugin=()=>__vitePreload(()=>import("./index.CWEfMTRP.js"),__vite__mapDeps([0,1,2]),import.meta.url),loadKatexStyles=once(()=>{__vitePreload(()=>Promise.resolve().then(()=>katex_min),void 0,import.meta.url)}),loadRehypeRaw=()=>__vitePreload(()=>import("./index.BHzkSOU6.js"),__vite__mapDeps([3,1,2]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.Cto6hKVz.js"),__vite__mapDeps([4,5]),import.meta.url);function isLoadedPlugin(n){return n!==null&&n!==LOAD_FAILED}function extractPlugin(n,i){const e=[];let t=n,o=0;for(;t&&typeof t=="object"&&"default"in t&&o<5;){const d=t.default;if(e.push(d),d===t)break;t=d,o+=1}e.push(n);for(const d of e)if(typeof d=="function")return d;return console.warn(`[StreamlitMarkdown] Failed to load ${i} plugin`),LOAD_FAILED}function wrapRehypePlugin(n,i){return e=>{const t=n(e);return(o,d)=>{if(!o)return o;try{return t(o,d)}catch(p){return console.error(`[StreamlitMarkdown] ${i} crashed while transforming`,p),o}}}}function wrapRemarkPlugin(n,i){return e=>{const t=n(e);return(o,d)=>{if(!o)return o;try{return t(o,d)}catch(p){return console.error(`[StreamlitMarkdown] ${i} crashed while transforming`,p),o}}}}function useLazyPlugin(n){const{key:i,needed:e,load:t,pluginName:o,onBeforeLoad:d}=n,p=e?pluginCache[i]:null,[h,y]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!e||p||h)return;const $=loadingPromises[i];if($){let H=!1;return $.then(Z=>{H||y(()=>Z)}),()=>{H=!0}}d?.();let E=!1;const M=t().then(H=>extractPlugin(H,o)).then(H=>(pluginCache[i]=H,E||y(()=>H),H)).catch(()=>{const H=LOAD_FAILED;return pluginCache[i]=H,E||y(()=>H),H}).finally(()=>{loadingPromises[i]=null});return loadingPromises[i]=M,()=>{E=!0}},[e,p,h,i,t,o,d]),e?p??h:null}const StreamlitSyntaxHighlighter$1=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.CbRgSaN7.js"),__vite__mapDeps([6,2]),import.meta.url));function containsEmojiShortcodes(n){return/:(?!material\/|streamlit:)[\w+-][\w_+-]*:/.test(n)}function containsMathSyntax(n){return new RegExp("\\$\\$[\\s\\S]+?\\$\\$|\\$(?!\\s)[^$\\n]+?(?<!\\s)\\$").test(n)}var Tags=(function(n){return n.H1="h1",n.H2="h2",n.H3="h3",n})({});function rehypeSetCodeInlineProperty(){return n=>{visit(n,"element",(i,e,t)=>{i.tagName==="code"&&(t?.type==="element"&&t.tagName==="pre"?i.properties={...i.properties,inline:!1}:i.properties={...i.properties,inline:!0})})}}function createAnchorFromText(n){if(!n)return"";const i=slugify(n);return i.length>0?i:xxhash.h32(n,43981).toString(16)}function transformLinkUri(n){return n}const scrollNodeIntoView=once(n=>{n.scrollIntoView(!0)}),HeaderActionElements=({elementId:n,help:i,hideAnchor:e})=>{const t=useEmotionTheme();return!i&&e?jsx$1(Fragment,{}):jsxs(StyledHeadingActionElements,{"data-testid":"stHeaderActionElements",children:[i&&jsx$1(InlineTooltipIcon,{content:i}),n&&!e&&jsx$1(StyledLinkIcon,{href:`#${n}`,"aria-label":"Link to heading",children:jsx$1(Link2,{size:convertRemToPx(t.iconSizes.base),"aria-hidden":"true"})})]})},HeadingWithActionElements=({tag:n,anchor:i,help:e,hideAnchor:t,children:o,tagProps:d})=>{const p=reactExports.useContext(IsSidebarContext),h=reactExports.useContext(IsDialogContext),[y,$]=reactExports.useState(i),E=reactExports.useCallback(Fe=>{if(Fe===null)return;const Me=i||createAnchorFromText(Fe.textContent);$(Me);const Le=window.location.hash.slice(1);Le&&Le===Me&&scrollNodeIntoView(Fe)},[i]),M=p||h,H=jsx$1(HeaderActionElements,{elementId:y,help:e,hideAnchor:t||M}),Z=reactExports.useId(),be=e||y&&!t&&!M?Z:void 0,ye=y?{id:y}:{},we=be?{"aria-labelledby":be}:{},xe={...M?{}:{ref:E,...ye},...we},Ne=jsxs(n,{...d,...xe,children:[be?jsx$1("span",{id:be,children:o}):o,H]});return M?Ne:jsx$1(StyledHeadingWithActionElements,{"data-testid":"stHeadingWithActionElements",children:Ne})},CustomHeading=({node:n,children:i,...e})=>{const t=e["data-anchor"];return jsx$1(HeadingWithActionElements,{tag:n.tagName,anchor:t,tagProps:e,children:i})},CustomCodeTag=({inline:n,className:i,children:e,...t})=>{const o=/language-(\w+)/.exec(i||""),d=String(e??"").replace(/^\n/,"").replace(/\n$/,""),p=o?.[1]||"";return n?jsx$1(StyledInlineCode,{className:i,...omit(t,"node"),children:e}):jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(StreamlitSyntaxHighlighter$1,{language:p,showLineNumbers:!1,children:d})})})},CustomPreTag=({children:n})=>jsx$1(StyledPreWrapper,{"data-testid":"stMarkdownPre",children:n}),CustomMediaTag=({node:n,...i})=>{const e=useCrossOriginAttribute(i.src),t=n.tagName,o={...i,crossOrigin:e};return jsx$1(t,{...o})},HelpTextContext=reactExports.createContext(void 0);HelpTextContext.displayName="HelpTextContext";const CustomHelpIcon=({children:n})=>{const e=reactExports.useContext(HelpTextContext)||(typeof n=="string"?n:"");return jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:e})})},BASE_RENDERERS={pre:CustomPreTag,code:CustomCodeTag,h1:CustomHeading,h2:CustomHeading,h3:CustomHeading,h4:CustomHeading,h5:CustomHeading,h6:CustomHeading,img:CustomMediaTag,video:CustomMediaTag,audio:CustomMediaTag,"streamlit-help-icon":CustomHelpIcon};function createColorMapping(n){const{red:i,orange:e,yellow:t,green:o,blue:d,violet:p,purple:h,gray:y,primary:$}=getMarkdownTextColors(n),{redbg:E,orangebg:M,yellowbg:H,greenbg:Z,bluebg:be,violetbg:ye,purplebg:we,graybg:xe,primarybg:Ce}=getMarkdownBgColors(n);return new Map(Object.entries({red:`color: ${i}`,orange:`color: ${e}`,yellow:`color: ${t}`,blue:`color: ${d}`,green:`color: ${o}`,violet:`color: ${p}`,gray:`color: ${y}`,grey:`color: ${y}`,primary:`color: ${$}`,rainbow:`color: transparent; background-clip: text; -webkit-background-clip: text; background-image: linear-gradient(to right,
96
+ ${i.stack}`)}}render(){const{error:i}=this.state;return i?i.name==="ChunkLoadError"?jsx$1(ErrorElement,{width:this.props.width,name:"Network issue",message:jsxs("p",{children:["Cannot load Streamlit frontend code. This can happen when you update Streamlit while a Streamlit app is running.",jsx$1("br",{}),"To fix this, simply reload this app by pressing"," ",jsx$1(StyledInlineCode,{children:"F5"}),","," ",jsx$1(StyledInlineCode,{children:"Ctrl+R"}),", or"," ",jsx$1(StyledInlineCode,{children:"Cmd+R"}),".",jsx$1("br",{}),"If the error persists, try force-clearing your browser's cache as described"," ",jsx$1("a",{href:"https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Cache_clearing_and_disabling",rel:"noopener noreferrer",target:"_blank",children:"here"})]})}):jsx$1(ErrorElement,{width:this.props.width,name:i.name,message:i.message,stack:i.stack}):this.props.children}};Ss.getDerivedStateFromError=i=>({error:i});let ErrorBoundary=Ss;function convertRemToEm(n){return n.replace(/rem$/,"em")}function sharedMarkdownStyle(n){return{a:{color:n.colors.link,textDecoration:n.linkUnderline?"underline":"none","&:focus":{outline:"none",boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default}}}}function convertFontSizes(n,i,e){if(i){const t=roundFontSizeToNearestEighth(parseFloat(n)*.65),o=`${Math.max(t,.75)}rem`;return e?convertRemToEm(o):o}return e?convertRemToEm(n):n}function getMarkdownHeadingDefinitions(n,i,e){return{"h1, h2, h3, h4, h5, h6":{fontFamily:n.genericFonts.headingFont,lineHeight:n.lineHeights.headings,margin:0,color:"inherit"},h1:{fontSize:convertFontSizes(n.fontSizes.h1FontSize,i,e),fontWeight:n.fontWeights.h1FontWeight,padding:`${n.spacing.xl} 0 ${n.spacing.lg} 0`},"h1 b, h1 strong":{fontWeight:n.fontWeights.h1FontWeight},"h2, h3":{letterSpacing:"-0.005em"},h2:{fontSize:convertFontSizes(n.fontSizes.h2FontSize,i,e),fontWeight:n.fontWeights.h2FontWeight,padding:`${n.spacing.lg} 0 ${n.spacing.lg} 0`},h3:{fontSize:convertFontSizes(n.fontSizes.h3FontSize,i,e),fontWeight:n.fontWeights.h3FontWeight,padding:`${n.spacing.md} 0 ${n.spacing.lg} 0`},h4:{fontSize:convertFontSizes(n.fontSizes.h4FontSize,i,e),fontWeight:n.fontWeights.h4FontWeight,padding:`${n.spacing.sm} 0 ${n.spacing.lg} 0`},h5:{fontSize:convertFontSizes(n.fontSizes.h5FontSize,i,e),fontWeight:n.fontWeights.h5FontWeight,padding:`${n.spacing.xs} 0 ${n.spacing.lg} 0`},h6:{fontSize:convertFontSizes(n.fontSizes.h6FontSize,i,e),fontWeight:n.fontWeights.h6FontWeight,padding:`${n.spacing.twoXS} 0 ${n.spacing.lg} 0`}}}const StyledStreamlitMarkdown=styled("div",{target:"e1jgj4kv0"})(({theme:n,isCaption:i,isInDialog:e,isLabel:t,inheritFont:o,boldLabel:d,largerLabel:p,isToast:h})=>{const y=t&&!p||h||i;return{fontFamily:o?"inherit":n.genericFonts.bodyFont,fontSize:o?"inherit":y?n.fontSizes.sm:n.fontSizes.md,marginBottom:t?"":`-${n.spacing.lg}`,opacity:i?.6:void 0,color:"inherit",maxWidth:"100%",width:t?"":"100%",overflowWrap:"break-word",...sharedMarkdownStyle(n),...getMarkdownHeadingDefinitions(n,e,i),"&:has(.katex-display)":{overflowX:"hidden"},p:{wordBreak:"break-word",marginBottom:t?n.spacing.none:"",fontWeight:o?"inherit":d?n.fontWeights.bold:"",marginTop:n.spacing.none,marginLeft:n.spacing.none,marginRight:n.spacing.none},img:{maxWidth:"100%",maxHeight:t?"1em":void 0,verticalAlign:"middle",objectFit:"scale-down"},li:{margin:"0.2em 0 0.2em 1.15em",padding:"0 0 0 0.3em"},"li.task-list-item":{listStyleType:"none",padding:"0",marginLeft:"0","input[type='checkbox']":{verticalAlign:"middle",margin:"0 0.35em 0.1em 0"}},blockquote:{margin:"1em 0 1em 0",padding:"0 0 0 0.75em",borderLeft:`0.15em solid ${n.colors.borderColor}`,opacity:.6},"b, strong":{fontWeight:n.fontWeights.bold},"b code, strong code":{fontWeight:n.fontWeights.codeBold},hr:{margin:"2em 0",padding:0,color:"inherit",backgroundColor:"transparent",border:"none",borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:not([size])":{height:n.sizes.borderWidth}},table:{display:"table",borderCollapse:"collapse",marginBottom:n.spacing.lg},tr:{borderTop:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},th:{textAlign:"inherit"},"th, td":{padding:`${n.spacing.xs} ${n.spacing.md}`,border:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},"span.stMarkdownColoredBackground":{borderRadius:n.radii.md,padding:`${n.spacing.threeXS} ${n.spacing.twoXS}`,margin:n.spacing.none,boxDecorationBreak:"clone"},"span.stMarkdownBadge":{borderRadius:n.radii.md,padding:`0 ${n.spacing.twoXS}`,margin:`0 ${n.spacing.px}`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",display:"inline-block",verticalAlign:"middle"},"p, ol, ul, dl, li":{fontSize:"inherit"},"& > ul, & > ol":{display:"block",width:"fit-content",textAlign:"left"},"li > ul, li > ol":{display:"block"},".katex-display":{overflowX:"auto",overflowY:"hidden"},".katex":{fontWeight:n.fontWeights.normal}}}),StyledLinkIcon=styled("a",{target:"e1jgj4kv1"})(({theme:n})=>({lineHeight:0,display:"inline-flex",alignItems:"center",justifyContent:"center",opacity:0,pointerEvents:"none",transition:"opacity 150ms ease-in-out",svg:{stroke:n.colors.fadedText60,strokeWidth:2.25},"&:hover svg":{stroke:n.colors.bodyText},"&:focus-visible":{opacity:1,pointerEvents:"auto"}})),StyledHeadingWithActionElements=styled("div",{target:"e1jgj4kv2"})(({theme:n})=>({"h1, h2, h3, h4, h5, h6, span":{scrollMarginTop:n.sizes.headerHeight},...sharedMarkdownStyle(n),wordBreak:"break-word",textWrap:"pretty","&:hover, &:focus-within":{[StyledLinkIcon]:{opacity:1,pointerEvents:"auto"}}})),StyledHeadingActionElements=styled("span",{target:"e1jgj4kv3"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"e1jgj4kv4"})(({theme:n,rainbow:i,color:e})=>({height:`${n.spacing.threeXS} !important`,marginTop:n.spacing.sm,marginBottom:n.spacing.none,border:"none",borderRadius:n.radii.full,...i?{background:e}:{backgroundColor:e}})),StyledPreWrapper=styled("div",{target:"e1jgj4kv5"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"e1jgj4kv6"})({display:"inline-block",verticalAlign:"middle",transform:"translateY(-0.1em)"}),LOAD_FAILED=Symbol("plugin_load_failed"),pluginCache={katex:null,raw:null,emoji:null},loadingPromises={katex:null,raw:null,emoji:null},loadKatexPlugin=()=>__vitePreload(()=>import("./index.DcudoGfL.js"),__vite__mapDeps([0,1,2]),import.meta.url),loadKatexStyles=once(()=>{__vitePreload(()=>Promise.resolve().then(()=>katex_min),void 0,import.meta.url)}),loadRehypeRaw=()=>__vitePreload(()=>import("./index.CrzXL2V8.js"),__vite__mapDeps([3,1,2]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.Ds-w0zIo.js"),__vite__mapDeps([4,5]),import.meta.url);function isLoadedPlugin(n){return n!==null&&n!==LOAD_FAILED}function extractPlugin(n,i){const e=[];let t=n,o=0;for(;t&&typeof t=="object"&&"default"in t&&o<5;){const d=t.default;if(e.push(d),d===t)break;t=d,o+=1}e.push(n);for(const d of e)if(typeof d=="function")return d;return console.warn(`[StreamlitMarkdown] Failed to load ${i} plugin`),LOAD_FAILED}function wrapRehypePlugin(n,i){return e=>{const t=n(e);return(o,d)=>{if(!o)return o;try{return t(o,d)}catch(p){return console.error(`[StreamlitMarkdown] ${i} crashed while transforming`,p),o}}}}function wrapRemarkPlugin(n,i){return e=>{const t=n(e);return(o,d)=>{if(!o)return o;try{return t(o,d)}catch(p){return console.error(`[StreamlitMarkdown] ${i} crashed while transforming`,p),o}}}}function useLazyPlugin(n){const{key:i,needed:e,load:t,pluginName:o,onBeforeLoad:d}=n,p=e?pluginCache[i]:null,[h,y]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!e||p||h)return;const $=loadingPromises[i];if($){let H=!1;return $.then(Z=>{H||y(()=>Z)}),()=>{H=!0}}d?.();let E=!1;const M=t().then(H=>extractPlugin(H,o)).then(H=>(pluginCache[i]=H,E||y(()=>H),H)).catch(()=>{const H=LOAD_FAILED;return pluginCache[i]=H,E||y(()=>H),H}).finally(()=>{loadingPromises[i]=null});return loadingPromises[i]=M,()=>{E=!0}},[e,p,h,i,t,o,d]),e?p??h:null}const StreamlitSyntaxHighlighter$1=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.CFab0b_b.js"),__vite__mapDeps([6,2]),import.meta.url));function containsEmojiShortcodes(n){return/:(?!material\/|streamlit:)[\w+-][\w_+-]*:/.test(n)}function containsMathSyntax(n){return new RegExp("\\$\\$[\\s\\S]+?\\$\\$|\\$(?!\\s)[^$\\n]+?(?<!\\s)\\$").test(n)}var Tags=(function(n){return n.H1="h1",n.H2="h2",n.H3="h3",n})({});function rehypeSetCodeInlineProperty(){return n=>{visit(n,"element",(i,e,t)=>{i.tagName==="code"&&(t?.type==="element"&&t.tagName==="pre"?i.properties={...i.properties,inline:!1}:i.properties={...i.properties,inline:!0})})}}function createAnchorFromText(n){if(!n)return"";const i=slugify(n);return i.length>0?i:xxhash.h32(n,43981).toString(16)}function transformLinkUri(n){return n}const scrollNodeIntoView=once(n=>{n.scrollIntoView(!0)}),HeaderActionElements=({elementId:n,help:i,hideAnchor:e})=>{const t=useEmotionTheme();return!i&&e?jsx$1(Fragment,{}):jsxs(StyledHeadingActionElements,{"data-testid":"stHeaderActionElements",children:[i&&jsx$1(InlineTooltipIcon,{content:i}),n&&!e&&jsx$1(StyledLinkIcon,{href:`#${n}`,"aria-label":"Link to heading",children:jsx$1(Link2,{size:convertRemToPx(t.iconSizes.base),"aria-hidden":"true"})})]})},HeadingWithActionElements=({tag:n,anchor:i,help:e,hideAnchor:t,children:o,tagProps:d})=>{const p=reactExports.useContext(IsSidebarContext),h=reactExports.useContext(IsDialogContext),[y,$]=reactExports.useState(i),E=reactExports.useCallback(Fe=>{if(Fe===null)return;const Me=i||createAnchorFromText(Fe.textContent);$(Me);const Le=window.location.hash.slice(1);Le&&Le===Me&&scrollNodeIntoView(Fe)},[i]),M=p||h,H=jsx$1(HeaderActionElements,{elementId:y,help:e,hideAnchor:t||M}),Z=reactExports.useId(),be=e||y&&!t&&!M?Z:void 0,ye=y?{id:y}:{},we=be?{"aria-labelledby":be}:{},xe={...M?{}:{ref:E,...ye},...we},Ne=jsxs(n,{...d,...xe,children:[be?jsx$1("span",{id:be,children:o}):o,H]});return M?Ne:jsx$1(StyledHeadingWithActionElements,{"data-testid":"stHeadingWithActionElements",children:Ne})},CustomHeading=({node:n,children:i,...e})=>{const t=e["data-anchor"];return jsx$1(HeadingWithActionElements,{tag:n.tagName,anchor:t,tagProps:e,children:i})},CustomCodeTag=({inline:n,className:i,children:e,...t})=>{const o=/language-(\w+)/.exec(i||""),d=String(e??"").replace(/^\n/,"").replace(/\n$/,""),p=o?.[1]||"";return n?jsx$1(StyledInlineCode,{className:i,...omit(t,"node"),children:e}):jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(StreamlitSyntaxHighlighter$1,{language:p,showLineNumbers:!1,children:d})})})},CustomPreTag=({children:n})=>jsx$1(StyledPreWrapper,{"data-testid":"stMarkdownPre",children:n}),CustomMediaTag=({node:n,...i})=>{const e=useCrossOriginAttribute(i.src),t=n.tagName,o={...i,crossOrigin:e};return jsx$1(t,{...o})},HelpTextContext=reactExports.createContext(void 0);HelpTextContext.displayName="HelpTextContext";const CustomHelpIcon=({children:n})=>{const e=reactExports.useContext(HelpTextContext)||(typeof n=="string"?n:"");return jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:e})})},BASE_RENDERERS={pre:CustomPreTag,code:CustomCodeTag,h1:CustomHeading,h2:CustomHeading,h3:CustomHeading,h4:CustomHeading,h5:CustomHeading,h6:CustomHeading,img:CustomMediaTag,video:CustomMediaTag,audio:CustomMediaTag,"streamlit-help-icon":CustomHelpIcon};function createColorMapping(n){const{red:i,orange:e,yellow:t,green:o,blue:d,violet:p,purple:h,gray:y,primary:$}=getMarkdownTextColors(n),{redbg:E,orangebg:M,yellowbg:H,greenbg:Z,bluebg:be,violetbg:ye,purplebg:we,graybg:xe,primarybg:Ce}=getMarkdownBgColors(n);return new Map(Object.entries({red:`color: ${i}`,orange:`color: ${e}`,yellow:`color: ${t}`,blue:`color: ${d}`,green:`color: ${o}`,violet:`color: ${p}`,gray:`color: ${y}`,grey:`color: ${y}`,primary:`color: ${$}`,rainbow:`color: transparent; background-clip: text; -webkit-background-clip: text; background-image: linear-gradient(to right,
97
97
  ${i}, ${e}, ${t}, ${o}, ${d}, ${p}, ${h});`,"red-background":`background-color: ${E}`,"orange-background":`background-color: ${M}`,"yellow-background":`background-color: ${H}`,"blue-background":`background-color: ${be}`,"green-background":`background-color: ${Z}`,"violet-background":`background-color: ${ye}`,"gray-background":`background-color: ${xe}`,"grey-background":`background-color: ${xe}`,"primary-background":`background-color: ${Ce}`,"rainbow-background":`background: linear-gradient(to right,
98
98
  ${E}, ${M}, ${H}, ${Z}, ${be}, ${ye}, ${we});`}))}function createRemarkHelpIcon(){return()=>n=>(visit(n,"textDirective",(i,e,t)=>{if(String(i.name)==="help"){const d=i.data||(i.data={});d.hName="streamlit-help-icon",d.hProperties=d.hProperties||{};return}}),n)}function createRemarkColoringAndSmall(n,i){return()=>e=>(visit(e,"textDirective",(t,o,d)=>{const p=String(t.name);if(p==="small"){const y=t.data||(t.data={});y.hName="span",y.hProperties=y.hProperties||{},y.hProperties.style=`font-size: ${n.fontSizes.sm};`;return}const h=p.match(/^(.+)-badge$/);if(h&&i.has(h[1])){const y=h[1];if(y==="rainbow")return;const $=i.get(y),E=i.get(`${y}-background`);if($&&E){const M=t.data||(t.data={});M.hName="span",M.hProperties=M.hProperties||{},M.hProperties.className="stMarkdownBadge",M.hProperties.style=`${E}; ${$}; font-size: ${n.fontSizes.sm};`;return}}if(i.has(p)){const y=t.data||(t.data={}),$=i.get(p);y.hName="span",y.hProperties=y.hProperties||{},y.hProperties.style=$,y.hProperties.className="stMarkdownColoredText",$&&(/background-color:/.test($)||/background:/.test($))&&(y.hProperties.className="stMarkdownColoredBackground");return}}),e)}function createRemarkUnsupportedDirectivesCleanup(){return()=>n=>(visit(n,"textDirective",(i,e,t)=>{if(!i.data?.hName&&t&&e!==void 0){const o={type:"text",value:`:${i.name}`};t.children[e]=o}}),n)}function createRemarkMaterialIcons(n){return()=>i=>{function e(t,o){return{type:"text",value:t,data:{hName:"span",hProperties:{role:"img",ariaLabel:o+" icon",translate:"no",style:`
99
99
  display: inline-block;
@@ -116,7 +116,7 @@ For more information, refer to the [documentation for forms](https://docs.stream
116
116
  ${n.stackTrace?.join(`
117
117
  `)}`,t=`https://www.google.com/search?q=${encodeURIComponent(i)}`,o=`https://chatgpt.com/?q=${encodeURIComponent(e)}`,{copyToClipboard:d}=useCopyToClipboard(),p=reactExports.useCallback(()=>{d(e)},[d,e]);return jsx$1("div",{className:"stException","data-testid":"stException",children:jsx$1(AlertContainer,{kind:n.isWarning?Kind.WARNING:Kind.ERROR,children:jsxs(StyledExceptionWrapper,{children:[jsx$1(StyledExceptionMessage,{"data-testid":"stExceptionMessage",children:jsx$1(ExceptionMessage,{type:n.type,message:n.message,messageIsMarkdown:n.messageIsMarkdown})}),n.stackTrace&&n.stackTrace.length>0?jsx$1(StackTrace,{stackTrace:n.stackTrace}):null,isLocalhost()&&jsxs(StyledExceptionLinks,{children:[jsx$1(StyledExceptionCopyButton,{onClick:p,children:"Copy"}),jsx$1("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Ask Google"}),jsx$1("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:"Ask ChatGPT"})]})]})})})}const ExceptionElement$1=reactExports.memo(ExceptionElement),SINGLE_BADGE_REGEX=/^:\w+-badge\[((?:\\.|[^\]\\])*)\]$/;function Markdown({element:n}){const{allowHtml:i,body:e,elementType:t,help:o,isCaption:d}=n,p=t===Markdown$3.Type.LATEX,h=t===Markdown$3.Type.NATIVE&&SINGLE_BADGE_REGEX.test(e.trim());let y;if(o&&h)y=jsx$1(BaseButtonTooltip,{help:o,containerWidth:!1,children:jsx$1(StreamlitMarkdown$1,{isCaption:d,source:e,allowHTML:i})});else if(o&&p)y=jsxs(StyledLabelHelpWrapper,{isLatex:p,children:[jsx$1(StreamlitMarkdown$1,{isCaption:d,source:e,allowHTML:i}),jsx$1(InlineTooltipIcon,{content:o,isLatex:p})]});else{const $=o?`${e} :help[]`:e;y=jsx$1(StyledLabelHelpWrapper,{isLatex:p,children:jsx$1(StreamlitMarkdown$1,{isCaption:d,source:$,allowHTML:i,helpText:o})})}return jsx$1("div",{className:"stMarkdown","data-testid":"stMarkdown",children:y})}const Markdown$1=reactExports.memo(Markdown),StyledText=styled("span",{target:"e1fbzn630"})(({theme:n})=>({fontFamily:n.genericFonts.bodyFont,color:n.colors.bodyText,whiteSpace:"pre-line",whiteSpaceCollapse:"preserve",wordBreak:"break-word",display:"inline-block",verticalAlign:"middle",width:"100%"})),StyledInlineHelpIcon=styled("span",{target:"e1fbzn631"})(({theme:n})=>({display:"inline-block",verticalAlign:"middle",marginLeft:n.spacing.twoXS,transform:"translateY(-0.05em)"}));function TextElement({element:n}){return jsx$1(StyledLabelHelpWrapper,{className:"stText","data-testid":"stText",children:jsxs(StyledText,{children:[n.body,n.help&&jsx$1(StyledInlineHelpIcon,{children:jsx$1(InlineTooltipIcon,{content:n.help})})]})})}const TextElement$1=reactExports.memo(TextElement),katex_min=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function makeMarkdownHeading(n,i){switch(n.toLowerCase()){case Tags.H1:return`# ${i}`;case Tags.H2:return`## ${i}`;case Tags.H3:return`### ${i}`;default:throw new Error(`Unrecognized tag for header: ${n}`)}}const OVERRIDE_COMPONENTS={p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment};function Heading(n){const{element:i}=n,{tag:e,anchor:t,body:o,help:d,hideAnchor:p,divider:h}=i,y=reactExports.useContext(IsDialogContext),[$,...E]=o.split(`
118
118
  `);return jsxs("div",{className:"stHeading","data-testid":"stHeading",children:[jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInDialog:y,"data-testid":"stMarkdownContainer",children:[jsx$1(HeadingWithActionElements,{anchor:t,help:d,hideAnchor:p,tag:e,children:jsx$1(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(e,$),overrideComponents:OVERRIDE_COMPONENTS})}),E.length>0&&jsx$1(RenderedMarkdown,{source:E.join(`
119
- `),allowHTML:!1})]}),h&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:h.includes("linear"),color:h})]})}const StyledCheckbox$1=styled("div",{target:"eczd22r0"})(({theme:n})=>({display:"flex",alignItems:"center",minHeight:n.sizes.smallElementHeight})),StyledContent=styled("div",{target:"eczd22r1"})(({visibility:n})=>({display:n===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:n===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(n,i){switch(n){case streamlit.GapSize.XXSMALL:return i.spacing.twoXS;case streamlit.GapSize.XSMALL:return i.spacing.sm;case streamlit.GapSize.SMALL:return i.spacing.lg;case streamlit.GapSize.MEDIUM:return i.spacing.threeXL;case streamlit.GapSize.LARGE:return i.spacing.fourXL;case streamlit.GapSize.XLARGE:return i.spacing.fiveXL;case streamlit.GapSize.XXLARGE:return i.spacing.sixXL;case streamlit.GapSize.NONE:return i.spacing.none;default:return i.spacing.lg}}const StyledSpace=styled("div",{target:"e12zf7d50"})({width:"100%",height:"100%"}),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=styled("div",{target:"e12zf7d51"})(({theme:n,isStale:i,width:e,height:t,elementType:o,overflow:d,flex:p,minWidth:h,textAlign:y})=>({width:e,height:t,textAlign:y,maxWidth:"100%",minWidth:e==="0px"?0:h??"1rem",position:"relative",overflow:d,flex:p,"@media print":{overflow:"visible"},":has(> .stCacheSpinner)":{height:n.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${n.spacing.lg}`,zIndex:n.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${n.spacing.xs}`,marginBottom:`-${n.spacing.xs}`},...i&&o!=="skeleton"&&STALE_STYLES,...o==="empty"?{display:"none"}:{},...o==="space"?{minWidth:0,minHeight:0}:{},...GLOBAL_ELEMENTS.includes(o)?{marginBottom:`-${n.spacing.lg}`}:{}})),StyledColumn=styled("div",{target:"e12zf7d52"})(({theme:n,weight:i,gap:e,showBorder:t,verticalAlignment:o})=>{const{VerticalAlignment:d}=Block$1.Column,p=i*100,h=translateGapWidth(e,n),y=h===n.spacing.none?`${p}%`:`calc(${p}% - ${h})`;return{width:y,flex:`1 1 ${y}`,[`@media (max-width: ${n.breakpoints.columns})`]:{minWidth:`calc(100% - ${n.spacing.twoXL})`},...o===d.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:n.spacing.sm}},...o===d.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:n.spacing.sm}},...o===d.CENTER&&{marginTop:"auto",marginBottom:"auto"},...t&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`}}}),getAlignItems=n=>{switch(n){case Block$1.FlexContainer.Align.ALIGN_START:return"start";case Block$1.FlexContainer.Align.ALIGN_CENTER:return"center";case Block$1.FlexContainer.Align.ALIGN_END:return"end";case Block$1.FlexContainer.Align.STRETCH:return"stretch";case Block$1.FlexContainer.Align.ALIGN_UNDEFINED:case void 0:case null:return"stretch";default:assertNever(n)}},getJustifyContent=n=>{switch(n){case Block$1.FlexContainer.Justify.JUSTIFY_START:return"start";case Block$1.FlexContainer.Justify.JUSTIFY_CENTER:return"center";case Block$1.FlexContainer.Justify.JUSTIFY_END:return"end";case Block$1.FlexContainer.Justify.SPACE_BETWEEN:return"space-between";case Block$1.FlexContainer.Justify.JUSTIFY_UNDEFINED:case void 0:case null:return"start";default:assertNever(n)}},StyledFlexContainerBlock=styled("div",{target:"e12zf7d53"})(({theme:n,direction:i,gap:e,flex:t,$wrap:o,height:d,border:p,align:h,justify:y,overflow:$})=>{let E;return e!==void 0&&(E=translateGapWidth(e,n)),{display:"flex",gap:E,width:"100%",maxWidth:"100%",height:d??"auto",minWidth:"1rem",flexDirection:i,flex:t,alignItems:getAlignItems(h),justifyContent:getJustifyContent(y),flexWrap:o?"wrap":"nowrap",...p&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`},overflow:$}}),StyledLayoutWrapper=styled("div",{target:"e12zf7d54"})(({width:n,height:i,flex:e})=>({display:"flex",flexDirection:"column",width:n,maxWidth:"100%",minWidth:"1rem",height:i,flex:e})),LARGE_STRETCH_BEHAVIOR$1=["graphvizChart","arrowVegaLiteChart","deckGlJsonChart","plotlyChart","docString","arrowDataFrame","json","audioInput","fileUploader","cameraInput","audio","video","code","buttonGroup","iframe"],MEDIUM_STRETCH_BEHAVIOR$1=["dateInput","radio","slider","textArea","progress","multiselect","selectbox","timeInput","numberInput","textInput"],WIDTH_STRETCH_OVERRIDE=["componentInstance","skeleton"],VISIBLE_OVERFLOW_OVERRIDE=["iframe","arrowDataFrame","deckGlJsonChart","arrowVegaLiteChart","graphvizChart"],StyledElementContainerLayoutWrapper=({node:n,...i})=>{const{isInHorizontalLayout:e,isInRoot:t}=useRequiredContext(FlexContext);let o;LARGE_STRETCH_BEHAVIOR$1.includes(n.element.type??"")?o="14rem":MEDIUM_STRETCH_BEHAVIOR$1.includes(n.element.type??"")&&(o="8rem"),n.element.type==="buttonGroup"&&n.element.buttonGroup?.style===ButtonGroup$1.Style.BORDERLESS&&(o="fit-content");const d=reactExports.useMemo(()=>{const h={};if(WIDTH_STRETCH_OVERRIDE.includes(n.element.type??"")&&(h.width="100%"),VISIBLE_OVERFLOW_OVERRIDE.includes(n.element.type??"")&&(h.overflow="visible"),n.element.type==="textArea")return n.element.heightConfig?.useStretch?{height:"100%",flex:"1 1 8rem"}:e?{height:"auto"}:{height:"auto",flex:""};if(n.element.type==="arrowVegaLiteChart")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),e&&!n.element.widthConfig&&(h.flex="1 1 14rem"),h;if(n.element.type==="arrowDataFrame")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),h;if(n.element.type==="imgs"){const y=!n.element.widthConfig||n.element.widthConfig.useStretch;h.width=y?"100%":"auto"}return h},[n.element.type,n.element.heightConfig?.useStretch,e,t,n.element.widthConfig]);let p=useLayoutStyles({element:n.element,subElement:n.element?.type&&n.element[n.element.type]||void 0,styleOverrides:d,minStretchBehavior:o});return n.element.type==="space"&&(e?p={...p,height:"auto"}:p={...p,width:"auto"}),jsx$1(StyledElementContainer,{...i,...p})},ArrowTable=reactExports.lazy(()=>__vitePreload(()=>import("./index.Zffuf6-0.js"),__vite__mapDeps([7,8,9,10,11]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.72U0nUaY.js"),__vite__mapDeps([12,13,14,15,16,9,8,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]),import.meta.url)),Audio=reactExports.lazy(()=>__vitePreload(()=>import("./index.BSULROGA.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dm8qt8Me.js"),__vite__mapDeps([34,35]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.BtasgGzT.js"),__vite__mapDeps([36,25,13,14,17,37,16,30,31,38]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.WW20lmQl.js"),__vite__mapDeps([39,32,31,13,14]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.CzMaYu3-.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.mRYkGVRy.js"),__vite__mapDeps([40,41]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.9lrRft8u.js"),__vite__mapDeps([42,13,14]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.BA25ZBoD.js"),__vite__mapDeps([43,17,18]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.DemMZEQt.js"),__vite__mapDeps([44,45]),import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.mUwcAQrC.js"),__vite__mapDeps([46,29,30,31,32,47,20,10,21]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.DMgiqc8r.js"),__vite__mapDeps([48,45]),import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.DFrG8naT.js"),__vite__mapDeps([49,13,16]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.CCkh_YSD.js"),__vite__mapDeps([50,51]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.WMC0NWRg.js"),__vite__mapDeps([52,35]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.5zBrLB5N.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.CbRgSaN7.js"),__vite__mapDeps([6,2]),import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.4evoB7lO.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.DDUzbOzY.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.7BBVjqsx.js"),__vite__mapDeps([53,54,14,16,24,55,26]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.BTcImDDt.js").then(n=>n.c),__vite__mapDeps([15,13,14,16,9,8,10,11,17,18,19,20,21,22,23,24,25,26,27,28]),import.meta.url)),Button=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dmaco99Q.js"),__vite__mapDeps([56,45]),import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.AF9wK9Wi.js"),__vite__mapDeps([57,47,37,16]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bmo0a9c3.js"),__vite__mapDeps([58,59,55,41]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CcpuNeOs.js"),__vite__mapDeps([60,61,16,51,55]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.xQYe72hk.js"),__vite__mapDeps([62,63,61,54,64,65,66,67,33,68]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.Cszkm2ii.js"),__vite__mapDeps([69,47,37,16,23]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.DltYrNjp.js"),__vite__mapDeps([70,37,16,19,47]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DzZhu8Ry.js"),__vite__mapDeps([71,9,37,16,72,73,74,66,68]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BICn75_M.js"),__vite__mapDeps([75,9,72,73,74,66,37,16,76,68]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.DMtSM2QJ.js"),__vite__mapDeps([77,45,24]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.DyL5do6X.js"),__vite__mapDeps([78,16,63,61,51]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.4DpGzJxM.js"),__vite__mapDeps([79,45,16]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.DlXiDt-m.js"),__vite__mapDeps([80,37,16,27,11]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CgFM5y1b.js"),__vite__mapDeps([81,64,37,16,21,82,74,66]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.DrHoCPek.js"),__vite__mapDeps([83,47,37,16]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bs9bS4ZQ.js"),__vite__mapDeps([84,37,16]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.DfXZgqLi.js"),__vite__mapDeps([85,9,59,37,16,22,20,10,21]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.HTZptmDX.js"),__vite__mapDeps([86,64,37,16,87,67,65,66,82]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.up8HPR4v.js"),__vite__mapDeps([88,64,37,16,87,67,82,74,66]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.9i44yl-A.js"),__vite__mapDeps([89,37,16,76,73]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.i5tC1QD-.js"),[],import.meta.url));function hideIfStale(n,i){return n?jsx$1(Fragment,{}):i}const RawElementNodeRenderer=n=>{const{node:i}=n;if(!i)throw new Error("ElementNode not found.");const e={disableFullscreenMode:n.disableFullscreenMode,widthConfig:i.element.widthConfig,heightConfig:i.element.heightConfig},t={...e,widgetMgr:n.widgetMgr,disabled:n.widgetsDisabled,fragmentId:i.fragmentId,componentRegistry:n.componentRegistry};switch(i.element.type){case"alert":{const o=i.element.alert;return jsx$1(AlertElement$1,{icon:o.icon,body:o.body,kind:getAlertElementKind(o.format),...e})}case"arrowTable":{const o=i.element.arrowTable;return jsx$1(ArrowTable,{element:o,data:i.quiverElement,...e})}case"audio":return jsx$1(Audio,{element:i.element.audio,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"balloons":return hideIfStale(n.isStale,jsx$1(Balloons,{scriptRunId:i.scriptRunId}));case"code":{const o=i.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:o.language,showLineNumbers:o.showLineNumbers,wrapLines:o.wrapLines,children:o.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:i.element.deckGlJsonChart,...t});case"docString":return jsx$1(DocString$1,{element:i.element.docString,...e});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement$1,{element:i.element.exception,...e});case"graphvizChart":return jsx$1(GraphVizChart,{element:i.element.graphvizChart,...e});case"heading":return jsx$1(Heading,{element:i.element.heading,...e});case"iframe":return jsx$1(IFrame,{element:i.element.iframe,...e});case"imgs":return jsx$1(ImageList,{element:i.element.imgs,endpoints:n.endpoints,...e});case"json":return jsx$1(Json,{element:i.element.json,...e});case"markdown":return jsx$1(Markdown$1,{element:i.element.markdown,...e});case"metric":return jsx$1(Metric,{element:i.element.metric,...e});case"html":return jsx$1(Html,{element:i.element.html,...e});case"pageLink":{const o=i.element.pageLink,d=t.disabled||o.disabled;return jsx$1(PageLink,{element:o,disabled:d,...e})}case"progress":return jsx$1(Progress,{element:i.element.progress,...e});case"skeleton":return jsx$1(Skeleton,{element:i.element.skeleton});case"snow":return hideIfStale(n.isStale,jsx$1(Snow,{scriptRunId:i.scriptRunId}));case"space":return jsx$1(StyledSpace,{className:"stSpace","data-testid":"stSpace"});case"spinner":return jsx$1(Spinner,{element:i.element.spinner,...e});case"text":return jsx$1(TextElement$1,{element:i.element.text,...e});case"video":return jsx$1(Video,{element:i.element.video,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"toast":{const o=i.element.toast;return jsx$1(Toast,{element:o,...e},i.scriptRunId)}case"arrowDataFrame":{const o=i.element.arrowDataFrame;return t.disabled=t.disabled||o.disabled,jsx$1(ArrowDataFrame,{element:o,data:i.quiverElement,...t},o.id||void 0)}case"arrowVegaLiteChart":{const o=i.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:o,...t},o.id||void 0)}case"audioInput":{const o=i.element.audioInput;return t.disabled=t.disabled||o.disabled,jsx$1(AudioInput,{uploadClient:n.uploadClient,element:o,...t},o.id)}case"button":{const o=i.element.button;return t.disabled=t.disabled||o.disabled,o.isFormSubmitter?jsx$1(FormSubmitContent,{element:o,...t}):jsx$1(Button,{element:o,...t})}case"buttonGroup":{const o=i.element.buttonGroup;return t.disabled=t.disabled||o.disabled,jsx$1(ButtonGroup,{element:o,...t},o.id)}case"downloadButton":{const o=i.element.downloadButton;return t.disabled=t.disabled||o.disabled,jsx$1(DownloadButton,{endpoints:n.endpoints,element:o,...t},o.id)}case"cameraInput":{const o=i.element.cameraInput;return t.disabled=t.disabled||o.disabled,jsx$1(CameraInput,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"chatInput":{const o=i.element.chatInput;return t.disabled=t.disabled||o.disabled,jsx$1(ChatInput,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"checkbox":{const o=i.element.checkbox;return t.disabled=t.disabled||o.disabled,jsx$1(Checkbox,{element:o,...t},o.id)}case"colorPicker":{const o=i.element.colorPicker;return t.disabled=t.disabled||o.disabled,jsx$1(ColorPicker,{element:o,...t},o.id)}case"componentInstance":return jsx$1(ComponentInstance,{element:i.element.componentInstance,...t});case"dateInput":{const o=i.element.dateInput;return t.disabled=t.disabled||o.disabled,jsx$1(DateInput,{element:o,...t},o.id)}case"fileUploader":{const o=i.element.fileUploader;return t.disabled=t.disabled||o.disabled,jsx$1(FileUploader,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"linkButton":{const o=i.element.linkButton;return jsx$1(LinkButton,{element:o,...e})}case"multiselect":{const o=i.element.multiselect;return t.disabled=t.disabled||o.disabled,jsx$1(Multiselect,{element:o,...t},o.id)}case"numberInput":{const o=i.element.numberInput;return t.disabled=t.disabled||o.disabled,jsx$1(NumberInput,{element:o,...t},o.id)}case"plotlyChart":{const o=i.element.plotlyChart;return jsx$1(PlotlyChart,{element:o,...t},o.id)}case"radio":{const o=i.element.radio;return t.disabled=t.disabled||o.disabled,jsx$1(Radio,{element:o,...t},o.id)}case"selectbox":{const o=i.element.selectbox;return t.disabled=t.disabled||o.disabled,jsx$1(Selectbox$1,{element:o,...t},o.id)}case"slider":{const o=i.element.slider;return t.disabled=t.disabled||o.disabled,jsx$1(Slider,{element:o,...t},o.id)}case"textArea":{const o=i.element.textArea;return t.disabled=t.disabled||o.disabled,jsx$1(TextArea,{element:o,outerElement:i.element,...t},o.id)}case"textInput":{const o=i.element.textInput;return t.disabled=t.disabled||o.disabled,jsx$1(TextInput,{element:o,...t},o.id)}case"dateTimeInput":{const o=i.element.dateTimeInput;return t.disabled=t.disabled||o.disabled,jsx$1(DateTimeInput,{element:o,...t},o.id)}case"timeInput":{const o=i.element.timeInput;return t.disabled=t.disabled||o.disabled,jsx$1(TimeInput,{element:o,...t},o.id)}case"bidiComponent":{const o=i.element.bidiComponent;return jsx$1(BidiComponent,{element:o,...t},o.id)}default:throw new Error(`Unrecognized Element type ${i.element.type}`)}},ElementNodeRenderer=n=>{const{isFullScreen:i}=reactExports.useContext(ViewStateContext),{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:o}=reactExports.useContext(ScriptRunContext),{node:d}=n,p=d.element.type||"",h=shouldComponentBeEnabled(p,e),y=isComponentStale(h,d,e,t,o),$=getElementId(d.element),E=getKeyFromId($);return jsx$1(Maybe,{enable:h,children:jsx$1(StyledElementContainerLayoutWrapper,{className:classNames("stElementContainer","element-container",convertKeyToClassName(E)),"data-testid":"stElementContainer","data-stale":y,isStale:y&&!i,elementType:p,node:d,children:jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...n,isStale:y})})})})})};class RenderNodeVisitor{constructor(i,e){this.props=i,this.elementKeyOverride=e,this.elementKeySet=new Set,this.reactElements=[],this.index=0,this.transientElementCount=0}getCurrentKey(i){return this.elementKeyOverride||i||this.index.toString()}conformToArray(i){return i?Array.isArray(i)?i:[i]:[]}visitBlockNode(i){const e={...this.props,node:i},t=this.getCurrentKey();this.index+=1;const o=jsx$1(BlockNodeRenderer,{...e},t);return this.reactElements.push(o),o}visitTransientNode(i){const e=[];i.transientNodes.forEach(o=>{const d=this.getCurrentKey(`transient-${this.transientElementCount}`);this.transientElementCount+=1;const p=o.accept(new RenderNodeVisitor(this.props,d));e.push(...this.conformToArray(p))}),this.reactElements.push(...e);const t=i.anchor?.accept(this);return e.push(...this.conformToArray(t)),e}visitElementNode(i){const e={...this.props,node:i},t=this.getCurrentKey(getElementId(i.element));if(this.index+=1,this.elementKeySet.has(t))return null;this.elementKeySet.add(t);const o=jsx$1(ElementNodeRenderer,{...e},t);return this.reactElements.push(o),o}static collectReactElements(i){if(!i.node.children)return[];const e=new RenderNodeVisitor(i);return i.node.children.forEach(t=>t.accept(e)),e.reactElements}}const ChildRenderer=n=>(assignDividerColor(n.node,useEmotionTheme()),jsx$1(Fragment,{children:RenderNodeVisitor.collectReactElements(n)})),getLayoutSubElement=n=>{const i=n.type,e=i?n[i]:void 0;if(!e||typeof e!="object")return;const t=e,o={useContainerWidth:t.useContainerWidth,height:t.height,width:t.width,widthConfig:t.widthConfig};if(!(o.useContainerWidth===void 0&&o.height===void 0&&o.width===void 0&&o.widthConfig===void 0))return o},ContainerContentsWrapper=n=>{const i=reactExports.useContext(FlexContext),e={direction:Direction.VERTICAL,flex:1,gap:streamlit.GapSize.SMALL,height:n.height,border:!1},t=getKeyFromId(n.node.deltaBlock.id);return jsx$1(FlexContextProvider,{direction:Direction.VERTICAL,isRoot:n.isRoot,parentContext:i,children:jsx$1(StyledFlexContainerBlock,{...e,className:classNames(getClassnamePrefix(Direction.VERTICAL),convertKeyToClassName(t)),"data-testid":getClassnamePrefix(Direction.VERTICAL),children:jsx$1(ChildRenderer,{...n})})})},FlexBoxContainer=n=>{const i=getDirectionOfBlock(n.node.deltaBlock),e=reactExports.useContext(FlexContext),t=getActivateScrollToBottomBackwardsCompatible(n.node),o=useScrollToBottom(t),d=useLayoutStyles({element:n.node.deltaBlock,subElement:getLayoutSubElement(n.node.deltaBlock)}),p={gap:n.node.deltaBlock.flexContainer?.gapConfig?.gapSize??streamlit.GapSize.SMALL,direction:i,$wrap:n.node.deltaBlock.flexContainer?.wrap??!1,overflow:d.overflow,border:getBorderBackwardsCompatible(n.node.deltaBlock),height:d.height,flex:"1",align:n.node.deltaBlock.flexContainer?.align,justify:n.node.deltaBlock.flexContainer?.justify},h=getKeyFromId(n.node.deltaBlock.id),y=n.node.deltaBlock.widthConfig?.pixelWidth??void 0,$=n.node.deltaBlock.widthConfig?.useContent??!1,E=(n.node.deltaBlock.widthConfig?.pixelWidth??0)>0||(n.node.deltaBlock.widthConfig?.remWidth??0)>0;return jsx$1(FlexContextProvider,{direction:i,parentWidth:y,hasContentWidth:$,hasFixedWidth:E,parentContext:e,children:jsx$1(StyledFlexContainerBlock,{...p,className:classNames(getClassnamePrefix(i),convertKeyToClassName(h)),"data-testid":getClassnamePrefix(i),ref:o,"data-test-scroll-behavior":t?"scroll-to-bottom":"normal",children:jsx$1(ChildRenderer,{...n})})})},LARGE_STRETCH_BEHAVIOR=["tabContainer"],MEDIUM_STRETCH_BEHAVIOR=["chatInput"],BlockNodeRenderer=n=>{const{node:i}=n,{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:o}=reactExports.useContext(ScriptRunContext);let d;LARGE_STRETCH_BEHAVIOR.includes(i.deltaBlock.type??"")?d="14rem":MEDIUM_STRETCH_BEHAVIOR.includes(i.deltaBlock.type??"")?d="8rem":i.deltaBlock.type==="chatMessage"?i.isEmpty&&(d="8rem"):(i.deltaBlock.type==="flexContainer"||i.deltaBlock.column||i.deltaBlock.expandable)&&(i.isEmpty||(d="8rem"));const p=useLayoutStyles({element:i.deltaBlock,subElement:getLayoutSubElement(i.deltaBlock),minStretchBehavior:d});if(i.isEmpty&&!i.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const h=shouldComponentBeEnabled("",e),y=isComponentStale(h,i,e,t,o),$={...n,node:i},E=n.disableFullscreenMode||notNullOrUndefined(i.deltaBlock.dialog)||notNullOrUndefined(i.deltaBlock.popover);let M;const H=jsx$1(ContainerContentsWrapper,{...$,disableFullscreenMode:E,height:"100%"});if(checkFlexContainerBackwardsCompatibile(i.deltaBlock)&&(M=jsx$1(FlexBoxContainer,{...$})),i.deltaBlock.dialog)return jsx$1(Dialog$1,{element:i.deltaBlock.dialog,deltaMsgReceivedAt:i.deltaMsgReceivedAt,widgetMgr:n.widgetMgr,fragmentId:i.fragmentId,children:H});if(i.deltaBlock.expandable&&(M=jsx$1(Expander$1,{isStale:y,element:i.deltaBlock.expandable,children:H})),i.deltaBlock.popover&&(M=jsx$1(Popover$1,{empty:i.isEmpty,element:i.deltaBlock.popover,stretchWidth:shouldWidthStretch(i.deltaBlock.widthConfig),children:H})),i.deltaBlock.type==="form"){const{formId:Z,clearOnSubmit:be,enterToSubmit:ye,border:we}=i.deltaBlock.form;M=jsx$1(Form$1,{formId:Z,clearOnSubmit:be,enterToSubmit:ye,widgetMgr:n.widgetMgr,border:we,overflow:p.overflow,children:H})}if(i.deltaBlock.chatMessage&&(M=jsx$1(ChatMessage$1,{element:i.deltaBlock.chatMessage,endpoints:n.endpoints,children:H})),i.deltaBlock.column)return jsx$1(StyledColumn,{weight:i.deltaBlock.column.weight??0,gap:backwardsCompatibleColumnGapSize(i.deltaBlock.column),verticalAlignment:i.deltaBlock.column.verticalAlignment??void 0,showBorder:i.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:H});if(i.deltaBlock.tabContainer){const be={...$,isStale:y,renderTabContent:ye=>jsx$1(ContainerContentsWrapper,{...ye,height:"auto"}),width:p.width,flex:p.flex};return jsx$1(Tabs$1,{...be})}return M?jsx$1(StyledLayoutWrapper,{"data-testid":"stLayoutWrapper",...p,children:M}):H},DownloadContext=reactExports.createContext({requestDeferredFile:void 0});DownloadContext.displayName="DownloadContext";const NavigationContext=reactExports.createContext({pageLinkBaseUrl:"",currentPageScriptHash:"",onPageChange:()=>{},navSections:[],appPages:[]});NavigationContext.displayName="NavigationContext";const StyledDataFrameOverlay=styled("div",{target:"eaoz1g71"})(({theme:n})=>({position:"fixed",top:0,left:0,zIndex:n.zIndices.tablePortal,lineHeight:"100%",...!hasLightBackgroundColor(n)&&{"& input[type='date'], & input[type='time'], & input[type='datetime-local']":{"&::-webkit-calendar-picker-indicator":{filter:"brightness(0) invert(1)",opacity:1}}}})),StyledErrorMessage=styled("small",{target:"eaoz1g72"})(({theme:n})=>({color:n.colors.redTextColor,fontSize:n.fontSizes.sm,marginTop:n.spacing.twoXS,display:"block"})),PortalContext=reactExports.createContext(null);PortalContext.displayName="PortalContext";const PortalProvider=({children:n})=>{const i=reactExports.useRef(null),e=reactExports.useCallback(()=>i.current,[]);return jsxs(PortalContext.Provider,{value:e,children:[n,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:i})]})},SidebarConfigContext=reactExports.createContext({initialSidebarState:PageConfig.SidebarState.AUTO,appLogo:null,sidebarChevronDownshift:0,expandSidebarNav:!1,hideSidebarNav:!1});SidebarConfigContext.displayName="SidebarConfigContext";const ThemeContext=reactExports.createContext({activeTheme:getDefaultTheme(),setTheme:()=>{},availableThemes:[]});ThemeContext.displayName="ThemeContext";function ThemeProvider({theme:n,baseuiTheme:i,children:e}){return jsx$1(ThemeProvider$1,{theme:i||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:n,children:e})})}const CopyButton=({text:n})=>{const i=useEmotionTheme(),e=reactExports.useRef(null),{isCopied:t,copyToClipboard:o,label:d}=useCopyToClipboard(),p=reactExports.useCallback(()=>{o(n)},[o,n]);return jsx$1(StyledCopyButton,{"data-testid":"stCodeCopyButton",title:d,"aria-label":d,type:"button",ref:e,onClick:p,children:t?jsx$1(Check,{size:convertRemToPx(i.iconSizes.base)}):jsx$1(Copy,{size:convertRemToPx(i.iconSizes.base)})})},CopyButton$1=reactExports.memo(CopyButton);function StreamlitErrorCodeBlock({children:n}){const i=typeof n=="string"&&n.trim().length>0;return jsxs(StyledCodeBlock,{className:"stErrorCodeBlock","data-testid":"stErrorCodeBlock",children:[jsx$1(StyledPre,{wrapLines:!1,children:jsx$1(StyledCode,{wrapLines:!1,children:n})}),i&&jsx$1(StyledCopyButtonContainer,{children:jsx$1(CopyButton$1,{text:n})})]})}const StreamlitErrorCodeBlock$1=reactExports.memo(StreamlitErrorCodeBlock);function iconToUrl(n){const i=/^:(.+)\/(.+):$/,e=n.match(i);return e===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${e[2]}/default/24px.svg`}function handleFavicon(n,i,e){const t=p=>{overwriteFavicon(p),i({type:"SET_PAGE_FAVICON",favicon:p})};if(n.startsWith(":material")){t(iconToUrl(n));return}const o="emoji:";if(n.startsWith(o)){const p=n.substring(o.length),h=createEmojiDataUrl(p);t(h);return}/^:[a-zA-Z0-9_+-]+:$/.test(n)?convertShortcodeToEmoji(n).then(p=>{t(p?createEmojiDataUrl(p):e.buildMediaURL(n))}).catch(()=>{t(e.buildMediaURL(n))}):t(e.buildMediaURL(n))}function createEmojiDataUrl(n){return`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>${n}</text></svg>`}function overwriteFavicon(n){const i=document.querySelector("link[rel='shortcut icon']");i&&(i.href=n)}async function convertShortcodeToEmoji(n){const i=await __vitePreload(()=>import("./index.D2pbLWvp.js"),[],import.meta.url),e=n.replace(/-/g,"_"),t=i.get(e);return t&&t!==e&&i.has(t)?t:""}const StyledWidgetLabel=styled("label",{target:"e1kt9bl70"})(({disabled:n,labelVisibility:i,theme:e})=>({fontSize:e.fontSizes.sm,color:n?e.colors.fadedText40:e.colors.bodyText,display:i===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:i===LabelVisibilityOptions.Hidden?"hidden":"visible",marginBottom:e.spacing.twoXS,height:"auto",minHeight:e.fontSizes.xl,verticalAlign:"middle",flexDirection:"row",alignItems:"center"})),StyledWidgetLabelHelp=styled("div",{target:"e1kt9bl71"})({display:"flex",flexDirection:"row",justifyContent:"flex-end",flex:1}),StyledWidgetInstructions=styled("div",{target:"e1kt9bl72"})(({theme:n})=>({fontSize:n.fontSizes.twoSm,color:n.colors.fadedText60,margin:n.spacing.none,textAlign:"right",position:"absolute",bottom:n.spacing.threeXS,right:`calc(${n.fontSizes.mdLg} * 0.5)`})),StyledWidgetLabelHelpInline=styled("span",{target:"e1kt9bl73"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));function WidgetLabel({label:n,children:i,disabled:e,labelVisibility:t,htmlFor:o}){return isNullOrUndefined(n)?jsx$1(Fragment,{}):jsxs(StyledWidgetLabel,{"data-testid":"stWidgetLabel",disabled:e,labelVisibility:t,htmlFor:o,children:[jsx$1("span",{"aria-hidden":"true",children:jsx$1(StreamlitMarkdown$1,{source:n,allowHTML:!1,isLabel:!0})}),i]})}function WidgetLabelHelpIcon({content:n,label:i,ariaLabel:e,placement:t=Placement.TOP_RIGHT,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h}){return jsx$1(StyledWidgetLabelHelp,{children:jsx$1(TooltipIcon,{content:n,placement:t,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h,ariaLabel:e??getHelpTooltipAriaLabel(i)})})}const arrayComparator=(n,i)=>n.length!==i.length?!1:n.every((e,t)=>Object.is(e,i[t])),useExecuteWhenChanged=(n,i,e=arrayComparator)=>{const[t,o]=reactExports.useState(i);e(t,i)||(o(i),n())};var _excluded$i=["title","size","color","overrides"];function _extends$g(){return _extends$g=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$g.apply(this,arguments)}function _objectWithoutProperties$f(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$e(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$e(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$d(n,i){return _arrayWithHoles$d(n)||_iterableToArrayLimit$d(n,i)||_unsupportedIterableToArray$d(n,i)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
119
+ `),allowHTML:!1})]}),h&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:h.includes("linear"),color:h})]})}const StyledCheckbox$1=styled("div",{target:"eczd22r0"})(({theme:n})=>({display:"flex",alignItems:"center",minHeight:n.sizes.smallElementHeight})),StyledContent=styled("div",{target:"eczd22r1"})(({visibility:n})=>({display:n===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:n===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(n,i){switch(n){case streamlit.GapSize.XXSMALL:return i.spacing.twoXS;case streamlit.GapSize.XSMALL:return i.spacing.sm;case streamlit.GapSize.SMALL:return i.spacing.lg;case streamlit.GapSize.MEDIUM:return i.spacing.threeXL;case streamlit.GapSize.LARGE:return i.spacing.fourXL;case streamlit.GapSize.XLARGE:return i.spacing.fiveXL;case streamlit.GapSize.XXLARGE:return i.spacing.sixXL;case streamlit.GapSize.NONE:return i.spacing.none;default:return i.spacing.lg}}const StyledSpace=styled("div",{target:"e12zf7d50"})({width:"100%",height:"100%"}),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=styled("div",{target:"e12zf7d51"})(({theme:n,isStale:i,width:e,height:t,elementType:o,overflow:d,flex:p,minWidth:h,textAlign:y})=>({width:e,height:t,textAlign:y,maxWidth:"100%",minWidth:e==="0px"?0:h??"1rem",position:"relative",overflow:d,flex:p,"@media print":{overflow:"visible"},":has(> .stCacheSpinner)":{height:n.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${n.spacing.lg}`,zIndex:n.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${n.spacing.xs}`,marginBottom:`-${n.spacing.xs}`},...i&&o!=="skeleton"&&STALE_STYLES,...o==="empty"?{display:"none"}:{},...o==="space"?{minWidth:0,minHeight:0}:{},...GLOBAL_ELEMENTS.includes(o)?{marginBottom:`-${n.spacing.lg}`}:{}})),StyledColumn=styled("div",{target:"e12zf7d52"})(({theme:n,weight:i,gap:e,showBorder:t,verticalAlignment:o})=>{const{VerticalAlignment:d}=Block$1.Column,p=i*100,h=translateGapWidth(e,n),y=h===n.spacing.none?`${p}%`:`calc(${p}% - ${h})`;return{width:y,flex:`1 1 ${y}`,[`@media (max-width: ${n.breakpoints.columns})`]:{minWidth:`calc(100% - ${n.spacing.twoXL})`},...o===d.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:n.spacing.sm}},...o===d.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:n.spacing.sm}},...o===d.CENTER&&{marginTop:"auto",marginBottom:"auto"},...t&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`}}}),getAlignItems=n=>{switch(n){case Block$1.FlexContainer.Align.ALIGN_START:return"start";case Block$1.FlexContainer.Align.ALIGN_CENTER:return"center";case Block$1.FlexContainer.Align.ALIGN_END:return"end";case Block$1.FlexContainer.Align.STRETCH:return"stretch";case Block$1.FlexContainer.Align.ALIGN_UNDEFINED:case void 0:case null:return"stretch";default:assertNever(n)}},getJustifyContent=n=>{switch(n){case Block$1.FlexContainer.Justify.JUSTIFY_START:return"start";case Block$1.FlexContainer.Justify.JUSTIFY_CENTER:return"center";case Block$1.FlexContainer.Justify.JUSTIFY_END:return"end";case Block$1.FlexContainer.Justify.SPACE_BETWEEN:return"space-between";case Block$1.FlexContainer.Justify.JUSTIFY_UNDEFINED:case void 0:case null:return"start";default:assertNever(n)}},StyledFlexContainerBlock=styled("div",{target:"e12zf7d53"})(({theme:n,direction:i,gap:e,flex:t,$wrap:o,height:d,border:p,align:h,justify:y,overflow:$})=>{let E;return e!==void 0&&(E=translateGapWidth(e,n)),{display:"flex",gap:E,width:"100%",maxWidth:"100%",height:d??"auto",minWidth:"1rem",flexDirection:i,flex:t,alignItems:getAlignItems(h),justifyContent:getJustifyContent(y),flexWrap:o?"wrap":"nowrap",...p&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`},overflow:$}}),StyledLayoutWrapper=styled("div",{target:"e12zf7d54"})(({width:n,height:i,flex:e})=>({display:"flex",flexDirection:"column",width:n,maxWidth:"100%",minWidth:"1rem",height:i,flex:e})),LARGE_STRETCH_BEHAVIOR$1=["graphvizChart","arrowVegaLiteChart","deckGlJsonChart","plotlyChart","docString","arrowDataFrame","json","audioInput","fileUploader","cameraInput","audio","video","code","buttonGroup","iframe"],MEDIUM_STRETCH_BEHAVIOR$1=["dateInput","radio","slider","textArea","progress","multiselect","selectbox","timeInput","numberInput","textInput"],WIDTH_STRETCH_OVERRIDE=["componentInstance","skeleton"],VISIBLE_OVERFLOW_OVERRIDE=["iframe","arrowDataFrame","deckGlJsonChart","arrowVegaLiteChart","graphvizChart"],StyledElementContainerLayoutWrapper=({node:n,...i})=>{const{isInHorizontalLayout:e,isInRoot:t}=useRequiredContext(FlexContext);let o;LARGE_STRETCH_BEHAVIOR$1.includes(n.element.type??"")?o="14rem":MEDIUM_STRETCH_BEHAVIOR$1.includes(n.element.type??"")&&(o="8rem"),n.element.type==="buttonGroup"&&n.element.buttonGroup?.style===ButtonGroup$1.Style.BORDERLESS&&(o="fit-content");const d=reactExports.useMemo(()=>{const h={};if(WIDTH_STRETCH_OVERRIDE.includes(n.element.type??"")&&(h.width="100%"),VISIBLE_OVERFLOW_OVERRIDE.includes(n.element.type??"")&&(h.overflow="visible"),n.element.type==="textArea")return n.element.heightConfig?.useStretch?{height:"100%",flex:"1 1 8rem"}:e?{height:"auto"}:{height:"auto",flex:""};if(n.element.type==="arrowVegaLiteChart")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),e&&!n.element.widthConfig&&(h.flex="1 1 14rem"),h;if(n.element.type==="arrowDataFrame")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),h;if(n.element.type==="imgs"){const y=!n.element.widthConfig||n.element.widthConfig.useStretch;h.width=y?"100%":"auto"}return h},[n.element.type,n.element.heightConfig?.useStretch,e,t,n.element.widthConfig]);let p=useLayoutStyles({element:n.element,subElement:n.element?.type&&n.element[n.element.type]||void 0,styleOverrides:d,minStretchBehavior:o});return n.element.type==="space"&&(e?p={...p,height:"auto"}:p={...p,width:"auto"}),jsx$1(StyledElementContainer,{...i,...p})},ArrowTable=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bu3Lto_G.js"),__vite__mapDeps([7,8,9,10,11]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.C7_5JMRC.js"),__vite__mapDeps([12,13,14,15,16,9,8,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]),import.meta.url)),Audio=reactExports.lazy(()=>__vitePreload(()=>import("./index.CPo5dtx7.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.mZ1qbnKs.js"),__vite__mapDeps([34,35]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.BXnQdCa5.js"),__vite__mapDeps([36,25,13,14,17,37,16,30,31,38]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.COjurlZk.js"),__vite__mapDeps([39,32,31,13,14]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.DDx6TP95.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bp_LrAiI.js"),__vite__mapDeps([40,41]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.DJ4GBc1k.js"),__vite__mapDeps([42,13,14]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.DSSQzzPk.js"),__vite__mapDeps([43,17,18]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.COZICZL6.js"),__vite__mapDeps([44,45]),import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.CFtGP8pH.js"),__vite__mapDeps([46,29,30,31,32,47,20,10,21]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.DIIdzDwK.js"),__vite__mapDeps([48,45]),import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.CBZQ_6AF.js"),__vite__mapDeps([49,13,16]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.CFE-yHdT.js"),__vite__mapDeps([50,51]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.1AemKTSK.js"),__vite__mapDeps([52,35]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.DuFqxjbN.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.CFab0b_b.js"),__vite__mapDeps([6,2]),import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.gnFSTAhI.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.CGX2fllG.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Cg59Loqx.js"),__vite__mapDeps([53,54,14,16,24,55,26]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dx8TcTHV.js").then(n=>n.c),__vite__mapDeps([15,13,14,16,9,8,10,11,17,18,19,20,21,22,23,24,25,26,27,28]),import.meta.url)),Button=reactExports.lazy(()=>__vitePreload(()=>import("./index.D18KqoUa.js"),__vite__mapDeps([56,45]),import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.DiZfOR0A.js"),__vite__mapDeps([57,47,37,16]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.C0VFHmJN.js"),__vite__mapDeps([58,59,55,41]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DoLorXMA.js"),__vite__mapDeps([60,61,16,51,55]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.C98anBCM.js"),__vite__mapDeps([62,63,61,54,64,65,66,67,33,68]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.BzQChe4y.js"),__vite__mapDeps([69,47,37,16,23]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.V4C1Oi-F.js"),__vite__mapDeps([70,37,16,19,47]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BXQNt1hj.js"),__vite__mapDeps([71,9,37,16,72,73,74,66,68]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BWK_h3IL.js"),__vite__mapDeps([75,9,72,73,74,66,37,16,76,68]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.ATP5607r.js"),__vite__mapDeps([77,45,24]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.aJ3XRx8R.js"),__vite__mapDeps([78,16,63,61,51]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.DbmtfcDm.js"),__vite__mapDeps([79,45,16]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.BOGNGR9a.js"),__vite__mapDeps([80,37,16,27,11]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CiU2Tdcl.js"),__vite__mapDeps([81,64,37,16,21,82,74,66]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dqphk1ee.js"),__vite__mapDeps([83,47,37,16]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.BHx4Qw7z.js"),__vite__mapDeps([84,37,16]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.7Q3Iaebc.js"),__vite__mapDeps([85,9,59,37,16,22,20,10,21]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.C-lnh8pI.js"),__vite__mapDeps([86,64,37,16,87,67,65,66,82]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DpnqUQVD.js"),__vite__mapDeps([88,64,37,16,87,67,82,74,66]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CyVBY8PG.js"),__vite__mapDeps([89,37,16,76,73]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.f_s01aPm.js"),[],import.meta.url));function hideIfStale(n,i){return n?jsx$1(Fragment,{}):i}const RawElementNodeRenderer=n=>{const{node:i}=n;if(!i)throw new Error("ElementNode not found.");const e={disableFullscreenMode:n.disableFullscreenMode,widthConfig:i.element.widthConfig,heightConfig:i.element.heightConfig},t={...e,widgetMgr:n.widgetMgr,disabled:n.widgetsDisabled,fragmentId:i.fragmentId,componentRegistry:n.componentRegistry};switch(i.element.type){case"alert":{const o=i.element.alert;return jsx$1(AlertElement$1,{icon:o.icon,body:o.body,kind:getAlertElementKind(o.format),...e})}case"arrowTable":{const o=i.element.arrowTable;return jsx$1(ArrowTable,{element:o,data:i.quiverElement,...e})}case"audio":return jsx$1(Audio,{element:i.element.audio,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"balloons":return hideIfStale(n.isStale,jsx$1(Balloons,{scriptRunId:i.scriptRunId}));case"code":{const o=i.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:o.language,showLineNumbers:o.showLineNumbers,wrapLines:o.wrapLines,children:o.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:i.element.deckGlJsonChart,...t});case"docString":return jsx$1(DocString$1,{element:i.element.docString,...e});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement$1,{element:i.element.exception,...e});case"graphvizChart":return jsx$1(GraphVizChart,{element:i.element.graphvizChart,...e});case"heading":return jsx$1(Heading,{element:i.element.heading,...e});case"iframe":return jsx$1(IFrame,{element:i.element.iframe,...e});case"imgs":return jsx$1(ImageList,{element:i.element.imgs,endpoints:n.endpoints,...e});case"json":return jsx$1(Json,{element:i.element.json,...e});case"markdown":return jsx$1(Markdown$1,{element:i.element.markdown,...e});case"metric":return jsx$1(Metric,{element:i.element.metric,...e});case"html":return jsx$1(Html,{element:i.element.html,...e});case"pageLink":{const o=i.element.pageLink,d=t.disabled||o.disabled;return jsx$1(PageLink,{element:o,disabled:d,...e})}case"progress":return jsx$1(Progress,{element:i.element.progress,...e});case"skeleton":return jsx$1(Skeleton,{element:i.element.skeleton});case"snow":return hideIfStale(n.isStale,jsx$1(Snow,{scriptRunId:i.scriptRunId}));case"space":return jsx$1(StyledSpace,{className:"stSpace","data-testid":"stSpace"});case"spinner":return jsx$1(Spinner,{element:i.element.spinner,...e});case"text":return jsx$1(TextElement$1,{element:i.element.text,...e});case"video":return jsx$1(Video,{element:i.element.video,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"toast":{const o=i.element.toast;return jsx$1(Toast,{element:o,...e},i.scriptRunId)}case"arrowDataFrame":{const o=i.element.arrowDataFrame;return t.disabled=t.disabled||o.disabled,jsx$1(ArrowDataFrame,{element:o,data:i.quiverElement,...t},o.id||void 0)}case"arrowVegaLiteChart":{const o=i.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:o,...t},o.id||void 0)}case"audioInput":{const o=i.element.audioInput;return t.disabled=t.disabled||o.disabled,jsx$1(AudioInput,{uploadClient:n.uploadClient,element:o,...t},o.id)}case"button":{const o=i.element.button;return t.disabled=t.disabled||o.disabled,o.isFormSubmitter?jsx$1(FormSubmitContent,{element:o,...t}):jsx$1(Button,{element:o,...t})}case"buttonGroup":{const o=i.element.buttonGroup;return t.disabled=t.disabled||o.disabled,jsx$1(ButtonGroup,{element:o,...t},o.id)}case"downloadButton":{const o=i.element.downloadButton;return t.disabled=t.disabled||o.disabled,jsx$1(DownloadButton,{endpoints:n.endpoints,element:o,...t},o.id)}case"cameraInput":{const o=i.element.cameraInput;return t.disabled=t.disabled||o.disabled,jsx$1(CameraInput,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"chatInput":{const o=i.element.chatInput;return t.disabled=t.disabled||o.disabled,jsx$1(ChatInput,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"checkbox":{const o=i.element.checkbox;return t.disabled=t.disabled||o.disabled,jsx$1(Checkbox,{element:o,...t},o.id)}case"colorPicker":{const o=i.element.colorPicker;return t.disabled=t.disabled||o.disabled,jsx$1(ColorPicker,{element:o,...t},o.id)}case"componentInstance":return jsx$1(ComponentInstance,{element:i.element.componentInstance,...t});case"dateInput":{const o=i.element.dateInput;return t.disabled=t.disabled||o.disabled,jsx$1(DateInput,{element:o,...t},o.id)}case"fileUploader":{const o=i.element.fileUploader;return t.disabled=t.disabled||o.disabled,jsx$1(FileUploader,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"linkButton":{const o=i.element.linkButton;return jsx$1(LinkButton,{element:o,...e})}case"multiselect":{const o=i.element.multiselect;return t.disabled=t.disabled||o.disabled,jsx$1(Multiselect,{element:o,...t},o.id)}case"numberInput":{const o=i.element.numberInput;return t.disabled=t.disabled||o.disabled,jsx$1(NumberInput,{element:o,...t},o.id)}case"plotlyChart":{const o=i.element.plotlyChart;return jsx$1(PlotlyChart,{element:o,...t},o.id)}case"radio":{const o=i.element.radio;return t.disabled=t.disabled||o.disabled,jsx$1(Radio,{element:o,...t},o.id)}case"selectbox":{const o=i.element.selectbox;return t.disabled=t.disabled||o.disabled,jsx$1(Selectbox$1,{element:o,...t},o.id)}case"slider":{const o=i.element.slider;return t.disabled=t.disabled||o.disabled,jsx$1(Slider,{element:o,...t},o.id)}case"textArea":{const o=i.element.textArea;return t.disabled=t.disabled||o.disabled,jsx$1(TextArea,{element:o,outerElement:i.element,...t},o.id)}case"textInput":{const o=i.element.textInput;return t.disabled=t.disabled||o.disabled,jsx$1(TextInput,{element:o,...t},o.id)}case"dateTimeInput":{const o=i.element.dateTimeInput;return t.disabled=t.disabled||o.disabled,jsx$1(DateTimeInput,{element:o,...t},o.id)}case"timeInput":{const o=i.element.timeInput;return t.disabled=t.disabled||o.disabled,jsx$1(TimeInput,{element:o,...t},o.id)}case"bidiComponent":{const o=i.element.bidiComponent;return jsx$1(BidiComponent,{element:o,...t},o.id)}default:throw new Error(`Unrecognized Element type ${i.element.type}`)}},ElementNodeRenderer=n=>{const{isFullScreen:i}=reactExports.useContext(ViewStateContext),{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:o}=reactExports.useContext(ScriptRunContext),{node:d}=n,p=d.element.type||"",h=shouldComponentBeEnabled(p,e),y=isComponentStale(h,d,e,t,o),$=getElementId(d.element),E=getKeyFromId($);return jsx$1(Maybe,{enable:h,children:jsx$1(StyledElementContainerLayoutWrapper,{className:classNames("stElementContainer","element-container",convertKeyToClassName(E)),"data-testid":"stElementContainer","data-stale":y,isStale:y&&!i,elementType:p,node:d,children:jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...n,isStale:y})})})})})};class RenderNodeVisitor{constructor(i,e){this.props=i,this.elementKeyOverride=e,this.elementKeySet=new Set,this.reactElements=[],this.index=0,this.transientElementCount=0}getCurrentKey(i){return this.elementKeyOverride||i||this.index.toString()}conformToArray(i){return i?Array.isArray(i)?i:[i]:[]}visitBlockNode(i){const e={...this.props,node:i},t=this.getCurrentKey();this.index+=1;const o=jsx$1(BlockNodeRenderer,{...e},t);return this.reactElements.push(o),o}visitTransientNode(i){const e=[];i.transientNodes.forEach(o=>{const d=this.getCurrentKey(`transient-${this.transientElementCount}`);this.transientElementCount+=1;const p=o.accept(new RenderNodeVisitor(this.props,d));e.push(...this.conformToArray(p))}),this.reactElements.push(...e);const t=i.anchor?.accept(this);return e.push(...this.conformToArray(t)),e}visitElementNode(i){const e={...this.props,node:i},t=this.getCurrentKey(getElementId(i.element));if(this.index+=1,this.elementKeySet.has(t))return null;this.elementKeySet.add(t);const o=jsx$1(ElementNodeRenderer,{...e},t);return this.reactElements.push(o),o}static collectReactElements(i){if(!i.node.children)return[];const e=new RenderNodeVisitor(i);return i.node.children.forEach(t=>t.accept(e)),e.reactElements}}const ChildRenderer=n=>(assignDividerColor(n.node,useEmotionTheme()),jsx$1(Fragment,{children:RenderNodeVisitor.collectReactElements(n)})),getLayoutSubElement=n=>{const i=n.type,e=i?n[i]:void 0;if(!e||typeof e!="object")return;const t=e,o={useContainerWidth:t.useContainerWidth,height:t.height,width:t.width,widthConfig:t.widthConfig};if(!(o.useContainerWidth===void 0&&o.height===void 0&&o.width===void 0&&o.widthConfig===void 0))return o},ContainerContentsWrapper=n=>{const i=reactExports.useContext(FlexContext),e={direction:Direction.VERTICAL,flex:1,gap:streamlit.GapSize.SMALL,height:n.height,border:!1},t=getKeyFromId(n.node.deltaBlock.id);return jsx$1(FlexContextProvider,{direction:Direction.VERTICAL,isRoot:n.isRoot,parentContext:i,children:jsx$1(StyledFlexContainerBlock,{...e,className:classNames(getClassnamePrefix(Direction.VERTICAL),convertKeyToClassName(t)),"data-testid":getClassnamePrefix(Direction.VERTICAL),children:jsx$1(ChildRenderer,{...n})})})},FlexBoxContainer=n=>{const i=getDirectionOfBlock(n.node.deltaBlock),e=reactExports.useContext(FlexContext),t=getActivateScrollToBottomBackwardsCompatible(n.node),o=useScrollToBottom(t),d=useLayoutStyles({element:n.node.deltaBlock,subElement:getLayoutSubElement(n.node.deltaBlock)}),p={gap:n.node.deltaBlock.flexContainer?.gapConfig?.gapSize??streamlit.GapSize.SMALL,direction:i,$wrap:n.node.deltaBlock.flexContainer?.wrap??!1,overflow:d.overflow,border:getBorderBackwardsCompatible(n.node.deltaBlock),height:d.height,flex:"1",align:n.node.deltaBlock.flexContainer?.align,justify:n.node.deltaBlock.flexContainer?.justify},h=getKeyFromId(n.node.deltaBlock.id),y=n.node.deltaBlock.widthConfig?.pixelWidth??void 0,$=n.node.deltaBlock.widthConfig?.useContent??!1,E=(n.node.deltaBlock.widthConfig?.pixelWidth??0)>0||(n.node.deltaBlock.widthConfig?.remWidth??0)>0;return jsx$1(FlexContextProvider,{direction:i,parentWidth:y,hasContentWidth:$,hasFixedWidth:E,parentContext:e,children:jsx$1(StyledFlexContainerBlock,{...p,className:classNames(getClassnamePrefix(i),convertKeyToClassName(h)),"data-testid":getClassnamePrefix(i),ref:o,"data-test-scroll-behavior":t?"scroll-to-bottom":"normal",children:jsx$1(ChildRenderer,{...n})})})},LARGE_STRETCH_BEHAVIOR=["tabContainer"],MEDIUM_STRETCH_BEHAVIOR=["chatInput"],BlockNodeRenderer=n=>{const{node:i}=n,{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:o}=reactExports.useContext(ScriptRunContext);let d;LARGE_STRETCH_BEHAVIOR.includes(i.deltaBlock.type??"")?d="14rem":MEDIUM_STRETCH_BEHAVIOR.includes(i.deltaBlock.type??"")?d="8rem":i.deltaBlock.type==="chatMessage"?i.isEmpty&&(d="8rem"):(i.deltaBlock.type==="flexContainer"||i.deltaBlock.column||i.deltaBlock.expandable)&&(i.isEmpty||(d="8rem"));const p=useLayoutStyles({element:i.deltaBlock,subElement:getLayoutSubElement(i.deltaBlock),minStretchBehavior:d});if(i.isEmpty&&!i.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const h=shouldComponentBeEnabled("",e),y=isComponentStale(h,i,e,t,o),$={...n,node:i},E=n.disableFullscreenMode||notNullOrUndefined(i.deltaBlock.dialog)||notNullOrUndefined(i.deltaBlock.popover);let M;const H=jsx$1(ContainerContentsWrapper,{...$,disableFullscreenMode:E,height:"100%"});if(checkFlexContainerBackwardsCompatibile(i.deltaBlock)&&(M=jsx$1(FlexBoxContainer,{...$})),i.deltaBlock.dialog)return jsx$1(Dialog$1,{element:i.deltaBlock.dialog,deltaMsgReceivedAt:i.deltaMsgReceivedAt,widgetMgr:n.widgetMgr,fragmentId:i.fragmentId,children:H});if(i.deltaBlock.expandable&&(M=jsx$1(Expander$1,{isStale:y,element:i.deltaBlock.expandable,children:H})),i.deltaBlock.popover&&(M=jsx$1(Popover$1,{empty:i.isEmpty,element:i.deltaBlock.popover,stretchWidth:shouldWidthStretch(i.deltaBlock.widthConfig),children:H})),i.deltaBlock.type==="form"){const{formId:Z,clearOnSubmit:be,enterToSubmit:ye,border:we}=i.deltaBlock.form;M=jsx$1(Form$1,{formId:Z,clearOnSubmit:be,enterToSubmit:ye,widgetMgr:n.widgetMgr,border:we,overflow:p.overflow,children:H})}if(i.deltaBlock.chatMessage&&(M=jsx$1(ChatMessage$1,{element:i.deltaBlock.chatMessage,endpoints:n.endpoints,children:H})),i.deltaBlock.column)return jsx$1(StyledColumn,{weight:i.deltaBlock.column.weight??0,gap:backwardsCompatibleColumnGapSize(i.deltaBlock.column),verticalAlignment:i.deltaBlock.column.verticalAlignment??void 0,showBorder:i.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:H});if(i.deltaBlock.tabContainer){const be={...$,isStale:y,renderTabContent:ye=>jsx$1(ContainerContentsWrapper,{...ye,height:"auto"}),width:p.width,flex:p.flex};return jsx$1(Tabs$1,{...be})}return M?jsx$1(StyledLayoutWrapper,{"data-testid":"stLayoutWrapper",...p,children:M}):H},DownloadContext=reactExports.createContext({requestDeferredFile:void 0});DownloadContext.displayName="DownloadContext";const NavigationContext=reactExports.createContext({pageLinkBaseUrl:"",currentPageScriptHash:"",onPageChange:()=>{},navSections:[],appPages:[]});NavigationContext.displayName="NavigationContext";const StyledDataFrameOverlay=styled("div",{target:"eaoz1g71"})(({theme:n})=>({position:"fixed",top:0,left:0,zIndex:n.zIndices.tablePortal,lineHeight:"100%",...!hasLightBackgroundColor(n)&&{"& input[type='date'], & input[type='time'], & input[type='datetime-local']":{"&::-webkit-calendar-picker-indicator":{filter:"brightness(0) invert(1)",opacity:1}}}})),StyledErrorMessage=styled("small",{target:"eaoz1g72"})(({theme:n})=>({color:n.colors.redTextColor,fontSize:n.fontSizes.sm,marginTop:n.spacing.twoXS,display:"block"})),PortalContext=reactExports.createContext(null);PortalContext.displayName="PortalContext";const PortalProvider=({children:n})=>{const i=reactExports.useRef(null),e=reactExports.useCallback(()=>i.current,[]);return jsxs(PortalContext.Provider,{value:e,children:[n,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:i})]})},SidebarConfigContext=reactExports.createContext({initialSidebarState:PageConfig.SidebarState.AUTO,appLogo:null,sidebarChevronDownshift:0,expandSidebarNav:!1,hideSidebarNav:!1});SidebarConfigContext.displayName="SidebarConfigContext";const ThemeContext=reactExports.createContext({activeTheme:getDefaultTheme(),setTheme:()=>{},availableThemes:[]});ThemeContext.displayName="ThemeContext";function ThemeProvider({theme:n,baseuiTheme:i,children:e}){return jsx$1(ThemeProvider$1,{theme:i||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:n,children:e})})}const CopyButton=({text:n})=>{const i=useEmotionTheme(),e=reactExports.useRef(null),{isCopied:t,copyToClipboard:o,label:d}=useCopyToClipboard(),p=reactExports.useCallback(()=>{o(n)},[o,n]);return jsx$1(StyledCopyButton,{"data-testid":"stCodeCopyButton",title:d,"aria-label":d,type:"button",ref:e,onClick:p,children:t?jsx$1(Check,{size:convertRemToPx(i.iconSizes.base)}):jsx$1(Copy,{size:convertRemToPx(i.iconSizes.base)})})},CopyButton$1=reactExports.memo(CopyButton);function StreamlitErrorCodeBlock({children:n}){const i=typeof n=="string"&&n.trim().length>0;return jsxs(StyledCodeBlock,{className:"stErrorCodeBlock","data-testid":"stErrorCodeBlock",children:[jsx$1(StyledPre,{wrapLines:!1,children:jsx$1(StyledCode,{wrapLines:!1,children:n})}),i&&jsx$1(StyledCopyButtonContainer,{children:jsx$1(CopyButton$1,{text:n})})]})}const StreamlitErrorCodeBlock$1=reactExports.memo(StreamlitErrorCodeBlock);function iconToUrl(n){const i=/^:(.+)\/(.+):$/,e=n.match(i);return e===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${e[2]}/default/24px.svg`}function handleFavicon(n,i,e){const t=p=>{overwriteFavicon(p),i({type:"SET_PAGE_FAVICON",favicon:p})};if(n.startsWith(":material")){t(iconToUrl(n));return}const o="emoji:";if(n.startsWith(o)){const p=n.substring(o.length),h=createEmojiDataUrl(p);t(h);return}/^:[a-zA-Z0-9_+-]+:$/.test(n)?convertShortcodeToEmoji(n).then(p=>{t(p?createEmojiDataUrl(p):e.buildMediaURL(n))}).catch(()=>{t(e.buildMediaURL(n))}):t(e.buildMediaURL(n))}function createEmojiDataUrl(n){return`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>${n}</text></svg>`}function overwriteFavicon(n){const i=document.querySelector("link[rel='shortcut icon']");i&&(i.href=n)}async function convertShortcodeToEmoji(n){const i=await __vitePreload(()=>import("./index.BcbR2mbc.js"),[],import.meta.url),e=n.replace(/-/g,"_"),t=i.get(e);return t&&t!==e&&i.has(t)?t:""}const StyledWidgetLabel=styled("label",{target:"e1kt9bl70"})(({disabled:n,labelVisibility:i,theme:e})=>({fontSize:e.fontSizes.sm,color:n?e.colors.fadedText40:e.colors.bodyText,display:i===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:i===LabelVisibilityOptions.Hidden?"hidden":"visible",marginBottom:e.spacing.twoXS,height:"auto",minHeight:e.fontSizes.xl,verticalAlign:"middle",flexDirection:"row",alignItems:"center"})),StyledWidgetLabelHelp=styled("div",{target:"e1kt9bl71"})({display:"flex",flexDirection:"row",justifyContent:"flex-end",flex:1}),StyledWidgetInstructions=styled("div",{target:"e1kt9bl72"})(({theme:n})=>({fontSize:n.fontSizes.twoSm,color:n.colors.fadedText60,margin:n.spacing.none,textAlign:"right",position:"absolute",bottom:n.spacing.threeXS,right:`calc(${n.fontSizes.mdLg} * 0.5)`})),StyledWidgetLabelHelpInline=styled("span",{target:"e1kt9bl73"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));function WidgetLabel({label:n,children:i,disabled:e,labelVisibility:t,htmlFor:o}){return isNullOrUndefined(n)?jsx$1(Fragment,{}):jsxs(StyledWidgetLabel,{"data-testid":"stWidgetLabel",disabled:e,labelVisibility:t,htmlFor:o,children:[jsx$1("span",{"aria-hidden":"true",children:jsx$1(StreamlitMarkdown$1,{source:n,allowHTML:!1,isLabel:!0})}),i]})}function WidgetLabelHelpIcon({content:n,label:i,ariaLabel:e,placement:t=Placement.TOP_RIGHT,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h}){return jsx$1(StyledWidgetLabelHelp,{children:jsx$1(TooltipIcon,{content:n,placement:t,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h,ariaLabel:e??getHelpTooltipAriaLabel(i)})})}const arrayComparator=(n,i)=>n.length!==i.length?!1:n.every((e,t)=>Object.is(e,i[t])),useExecuteWhenChanged=(n,i,e=arrayComparator)=>{const[t,o]=reactExports.useState(i);e(t,i)||(o(i),n())};var _excluded$i=["title","size","color","overrides"];function _extends$g(){return _extends$g=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$g.apply(this,arguments)}function _objectWithoutProperties$f(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$e(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$e(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$d(n,i){return _arrayWithHoles$d(n)||_iterableToArrayLimit$d(n,i)||_unsupportedIterableToArray$d(n,i)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
120
120
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$d(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$d(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$d(n,i)}}function _arrayLikeToArray$d(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$d(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$d(n){if(Array.isArray(n))return n}function ChevronDown(n,i){var e=useStyletron(),t=_slicedToArray$d(e,2),o=t[1],d=n.title,p=d===void 0?"Down":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$f(n,_excluded$i),H=mergeOverride({component:o.icons&&o.icons.ChevronDown?o.icons.ChevronDown:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$g({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{transform:"rotate(270, 12, 12)",fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const ChevronDown$1=reactExports.forwardRef(ChevronDown);var _excluded$h=["title","size","color","overrides"];function _extends$f(){return _extends$f=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$f.apply(this,arguments)}function _objectWithoutProperties$e(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$d(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$d(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$c(n,i){return _arrayWithHoles$c(n)||_iterableToArrayLimit$c(n,i)||_unsupportedIterableToArray$c(n,i)||_nonIterableRest$c()}function _nonIterableRest$c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
121
121
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$c(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$c(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$c(n,i)}}function _arrayLikeToArray$c(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$c(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$c(n){if(Array.isArray(n))return n}function DeleteAlt(n,i){var e=useStyletron(),t=_slicedToArray$c(e,2),o=t[1],d=n.title,p=d===void 0?"Delete Alt":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$e(n,_excluded$h),H=mergeOverride({component:o.icons&&o.icons.DeleteAlt?o.icons.DeleteAlt:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$f({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}const DeleteAlt$1=reactExports.forwardRef(DeleteAlt);var _excluded$g=["title","size","color","overrides"];function _extends$e(){return _extends$e=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$e.apply(this,arguments)}function _objectWithoutProperties$d(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$c(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$c(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$b(n,i){return _arrayWithHoles$b(n)||_iterableToArrayLimit$b(n,i)||_unsupportedIterableToArray$b(n,i)||_nonIterableRest$b()}function _nonIterableRest$b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
122
122
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$b(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$b(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$b(n,i)}}function _arrayLikeToArray$b(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$b(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$b(n){if(Array.isArray(n))return n}function Search(n,i){var e=useStyletron(),t=_slicedToArray$b(e,2),o=t[1],d=n.title,p=d===void 0?"Search":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$d(n,_excluded$g),H=mergeOverride({component:o.icons&&o.icons.Search?o.icons.Search:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$e({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 6C8.79086 6 7 7.79086 7 10C7 12.2091 8.79086 14 11 14C13.2091 14 15 12.2091 15 10C15 7.79086 13.2091 6 11 6ZM5 10C5 6.68629 7.68629 4 11 4C14.3137 4 17 6.68629 17 10C17 11.2958 16.5892 12.4957 15.8907 13.4765L19.7071 17.2929C20.0976 17.6834 20.0976 18.3166 19.7071 18.7071C19.3166 19.0976 18.6834 19.0976 18.2929 18.7071L14.4765 14.8907C13.4957 15.5892 12.2958 16 11 16C7.68629 16 5 13.3137 5 10Z"}))}const SearchIconComponent=reactExports.forwardRef(Search);var _excluded$f=["title","size","color","overrides"];function _extends$d(){return _extends$d=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$d.apply(this,arguments)}function _objectWithoutProperties$c(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$b(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$b(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$a(n,i){return _arrayWithHoles$a(n)||_iterableToArrayLimit$a(n,i)||_unsupportedIterableToArray$a(n,i)||_nonIterableRest$a()}function _nonIterableRest$a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -152,4 +152,4 @@ Event: ${i}`)}async pingServer(){const i=doInitPings(this.args.baseUriPartsList,
152
152
  The app's main file \`${n}\` has
153
153
  not been pushed to GitHub. Please add it to continue.
154
154
  `,allowHTML:!1})}}const DEPLOY_URL="https://share.streamlit.io/deploy",STREAMLIT_CLOUD_URL="https://streamlit.io/cloud",STREAMLIT_COMMUNITY_CLOUD_DOCS_URL="https://share.streamlit.io/cloud-getting-started",STREAMLIT_DEPLOY_TUTORIAL_URL="https://share.streamlit.io/deployment-tutorial",SNOWFLAKE_LEARN_MORE_URL="https://share.streamlit.io/sis-about",SNOWFLAKE_TRIAL_URL="https://share.streamlit.io/snowflake-trial",StyledParagraph=styled("p",{target:"euwf8ug0"})({textAlign:"justify"});function NoRepositoryDetected(){return{title:"Unable to deploy",body:jsxs(StyledParagraph,{children:["The app’s code is not connected to a remote GitHub repository. To deploy on Streamlit Community Cloud, please put your code in a GitHub repository and publish the current branch. Read more in"," ",jsx$1("a",{href:STREAMLIT_COMMUNITY_CLOUD_DOCS_URL,rel:"noopener noreferrer",target:"_blank",children:"our documentation"}),"."]})}}function DeployCard(n){const{colors:i,spacing:e,radii:t,breakpoints:o,sizes:d}=useEmotionTheme(),{children:p}=n;return jsx$1(Card,{overrides:{Root:{style:{borderTopWidth:d.borderWidth,borderBottomWidth:d.borderWidth,borderLeftWidth:d.borderWidth,borderRightWidth:d.borderWidth,borderTopStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"solid",borderTopColor:i.borderColor,borderBottomColor:i.borderColor,borderLeftColor:i.borderColor,borderRightColor:i.borderColor,borderTopLeftRadius:"none",borderTopRightRadius:"none",borderBottomLeftRadius:"none",borderBottomRightRadius:"none",":last-child":{borderRightStyle:"none",borderBottomRightRadius:t.xl},":first-child":{borderBottomLeftRadius:t.xl},[`@media (max-width: ${o.md})`]:{":last-child":{borderBottomLeftRadius:t.xl}}}},Contents:{style:{marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%"}},Body:{style:{padding:e.twoXL,marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%",display:"flex",flexDirection:"column",[`@media (max-width: ${o.md})`]:{padding:e.xl}}}},children:p})}const Checkmark="data:image/svg+xml,%3csvg%20width='12'%20height='9'%20viewBox='0%200%2012%209'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.00009%206.78L1.68676%204.46667C1.42676%204.20667%201.00676%204.20667%200.746758%204.46667C0.486758%204.72667%200.486758%205.14667%200.746758%205.40667L3.53342%208.19334C3.79342%208.45334%204.21342%208.45334%204.47342%208.19334L11.5268%201.14C11.7868%200.880005%2011.7868%200.460005%2011.5268%200.200005C11.2668%20-0.0599951%2010.8468%20-0.0599951%2010.5868%200.200005L4.00009%206.78Z'%20fill='%23808495'/%3e%3c/svg%3e",StyledHeader$1=styled("div",{target:"ep91p7v0"})(({theme:n})=>({fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.bold,fontSize:n.fontSizes.lg,marginTop:n.spacing.twoXL,marginBottom:n.spacing.twoXS,[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.md}})),StyledSubheader=styled("div",{target:"ep91p7v1"})(({theme:n})=>({fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.normal,fontSize:n.fontSizes.md,marginTop:n.spacing.twoXS,marginBottom:n.spacing.md,[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.md}})),StyledCardContainer=styled("div",{target:"ep91p7v2"})(({theme:n})=>({display:"grid",maxWidth:`calc(1.25 * ${n.sizes.contentMaxWidth})`,gridTemplateColumns:"1fr 1fr 1fr",gridGap:n.spacing.none,[`@media (max-width: ${n.breakpoints.md})`]:{gridTemplateColumns:"1fr"}})),StyledElement=styled("div",{target:"ep91p7v3"})(({theme:n})=>({display:"inline-flex",marginTop:n.spacing.sm,"& > span":{fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.normal,fontSize:n.fontSizes.md,marginLeft:n.spacing.twoXL,color:n.colors.gray70},"& > img":{position:"absolute",marginTop:n.spacing.sm}})),StyledActionsWrapper=styled("div",{target:"ep91p7v4"})(({theme:n})=>({display:"flex",marginTop:n.spacing.threeXL,"& > button":{marginRight:n.spacing.twoXL},[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.xl}}));function DeployListElement(n){const{children:i}=n;return jsxs(StyledElement,{children:[jsx$1("img",{src:Checkmark,alt:"Checkmark"}),jsx$1("span",{children:i})]})}function ModalBody({children:n}){const{colors:i,fontSizes:e,spacing:t}=useEmotionTheme();return jsx$1(ModalBody$2,{style:{marginTop:t.none,marginLeft:t.none,marginRight:t.none,marginBottom:t.none,paddingTop:t.md,paddingRight:t.none,paddingBottom:t.none,paddingLeft:t.none,color:i.bodyText,fontSize:e.md,overflowY:"auto"},children:n})}function DeployModal(n){const{children:i,onClose:e}=n;return jsxs(Modal,{isOpen:!0,closeable:!0,onClose:e,size:"auto",children:[jsx$1(ModalHeader,{children:"Deploy this app using..."}),jsx$1(ModalBody,{children:i})]})}const{GitStates}=GitInfo,openUrl=n=>{window.open(n,"_blank")},getDeployAppUrl=n=>{if(n){const i=new URL(DEPLOY_URL);return i.searchParams.set("repository",n.repository??""),i.searchParams.set("branch",n.branch??""),i.searchParams.set("mainModule",n.module??""),i.toString()}return STREAMLIT_CLOUD_URL};function DeployDialog(n){const{gitInfo:i,onClose:e,metricsMgr:t,showDeployError:o,isDeployErrorModalOpen:d}=n,p=reactExports.useCallback(()=>{if(t.enqueue("menuClick",{label:"deployButtonInDialog"}),!i){const Z=NoRepositoryDetected();o(Z.title,Z.body);return}const{repository:h,branch:y,module:$,untrackedFiles:E,state:M}=i;if((!h||!y||!$)&&M===GitStates.DEFAULT){const Z=NoRepositoryDetected();o(Z.title,Z.body);return}if(M===GitStates.HEAD_DETACHED){const Z=DetachedHead();o(Z.title,Z.body);return}if($&&E?.includes($)){const Z=ModuleIsNotAdded($);o(Z.title,Z.body);return}d&&e(),openUrl(getDeployAppUrl(i))},[t,i,d,o,e]);return jsx$1(DeployModal,{onClose:e,children:jsxs(StyledCardContainer,{children:[jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:StreamlitLogo,alt:"Streamlit Logo","data-testid":"stDeployDialogCommunityCloudIcon"}),jsx$1(StyledHeader$1,{children:"Streamlit Community Cloud"}),jsx$1(StyledSubheader,{children:"For community, always free"}),jsx$1(DeployListElement,{children:"For personal hobbies and learning"}),jsx$1(DeployListElement,{children:"Deploy unlimited public apps"}),jsx$1(DeployListElement,{children:"Explore and learn from Streamlit’s community and popular apps"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.PRIMARY,onClick:p,children:"Deploy now"}),jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"readMoreCommunityCloudInDeployDialog"}),openUrl(STREAMLIT_COMMUNITY_CLOUD_DOCS_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:Snowflake,alt:"Snowflake","data-testid":"stDeployDialogSnowflakeDeploymentIcon"}),jsx$1(StyledHeader$1,{children:"Snowflake"}),jsx$1(StyledSubheader,{children:"For enterprise"}),jsx$1(DeployListElement,{children:"Enterprise-level security, support, and fully managed infrastructure"}),jsx$1(DeployListElement,{children:"Deploy unlimited private apps with role-based sharing"}),jsx$1(DeployListElement,{children:"Integrate with Snowflake’s full data stack"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:()=>{t.enqueue("menuClick",{label:"startTrialInDeployDialog"}),openUrl(SNOWFLAKE_TRIAL_URL)},children:"Start trial"}),jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"learnMoreSnowflakeInDeployDialog"}),openUrl(SNOWFLAKE_LEARN_MORE_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:2},children:[jsx$1("img",{src:Rocket,alt:"Rocket","data-testid":"stDeployDialogCustomDeploymentIcon"}),jsx$1(StyledHeader$1,{children:"Other platforms"}),jsx$1(StyledSubheader,{children:"For custom deployment "}),jsx$1(DeployListElement,{children:"Deploy on your own hardware or cloud service"}),jsx$1(DeployListElement,{children:"Set up and maintain your own authentication, resources, and costs"})]}),jsx$1(Action,{children:jsx$1(StyledActionsWrapper,{children:jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"readMoreDeployTutorialInDeployDialog"}),openUrl(STREAMLIT_DEPLOY_TUTORIAL_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})})})]})]})})}const StyledDialogBody=styled("div",{target:"e1mwyxu0"})(({theme:n})=>({display:"grid",gap:n.spacing.twoXL,gridTemplateColumns:"1fr 1fr",margin:0,padding:0})),StyledFullRow=styled("div",{target:"e1mwyxu1"})(({theme:n})=>({gridColumnStart:1,gridColumnEnd:-1,display:"grid",gap:n.spacing.xs})),StyledHeader=styled("h2",{target:"e1mwyxu2"})(({theme:n})=>({paddingBottom:0,paddingTop:0,marginBottom:n.spacing.md,marginTop:"0",fontWeight:n.fontWeights.bold,fontSize:n.fontSizes.md,lineHeight:n.lineHeights.tight,color:n.colors.bodyText,display:"grid",gridAutoFlow:"row",gap:n.spacing.xs,"&:first-of-type":{marginTop:0}})),StyledLabel=styled("label",{target:"e1mwyxu3"})(({theme:n})=>({paddingBottom:0,paddingTop:0,marginBottom:0,marginTop:0,lineHeight:n.lineHeights.tight,fontSize:n.fontSizes.sm})),StyledCheckbox=styled("input",{target:"e1mwyxu6"})(({theme:n})=>({marginRight:n.spacing.xs,appearance:"none",border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,width:n.fontSizes.md,height:n.fontSizes.md,borderRadius:`min(${n.radii.md}, ${n.radii.maxCheckbox})`,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,verticalAlign:"middle",overflow:"hidden","&:focus-visible":{outline:`2px solid ${n.colors.primary}`},"&:checked":{backgroundColor:n.colors.primary,"&:after":{content:'"✓"',fontFamily:n.fonts.monospace,fontSize:n.fontSizes.md,color:n.colors.white,lineHeight:n.lineHeights.none}},"&:disabled":{backgroundColor:n.colors.darkenedBgMix15}})),StyledDeployErrorContent=styled("div",{target:"e1mwyxu7"})(({theme:n})=>({"& > ul":{paddingLeft:n.spacing.twoXL}})),StyledErrorText=styled("div",{target:"e1mwyxu8"})(({theme:n,hasCodeBelow:i})=>({...i&&{marginBottom:n.spacing.lg}})),SettingsDialog=reactExports.memo(function n({isServerConnected:i,onClose:e,onSave:t,settings:o,allowRunOnSave:d,animateModal:p,metricsMgr:h,sessionInfo:y}){const{activeTheme:$,availableThemes:E,setTheme:M}=reactExports.useContext(ThemeContext),H=reactExports.useRef(o),Z=reactExports.useRef(!0),[be,ye]=reactExports.useState({...o}),we=reactExports.useCallback((Fe,Me)=>{ye(Le=>({...Le,[Fe]:Me}))},[]);reactExports.useEffect(()=>{if(Z.current){Z.current=!1;return}H.current=be,t(H.current)},[t,be]);const xe=reactExports.useCallback(Fe=>{we(Fe.target.name,Fe.target.checked)},[we]),Ce=reactExports.useCallback(Fe=>{let Me;Fe&&(Me=E.find(Le=>Le.name.startsWith("Custom Theme")?Le.displayName===Fe:Le.name===Fe)),Me===void 0&&(Me=E[0]),h.enqueue("menuClick",{label:"changeTheme"}),M(Me)},[M,h,E]),Ne=reactExports.useCallback(()=>E.map(Fe=>Fe.displayName??Fe.name),[E]);return jsxs(Modal,{animate:p,isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:"Settings"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogBody,{children:[d&&jsxs(StyledFullRow,{children:[jsx$1(StyledHeader,{children:"Development"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{disabled:!i,type:"checkbox",name:"runOnSave",checked:be.runOnSave&&i,onChange:xe})," ","Run on save"]}),jsx$1(StreamlitMarkdown$1,{source:"Automatically updates the app when the underlying code is updated.",allowHTML:!1,isCaption:!0})]}),jsxs(StyledFullRow,{children:[jsx$1(StyledHeader,{children:"Appearance"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{type:"checkbox",name:"wideMode",checked:be.wideMode,onChange:xe})," ","Wide mode"]}),jsx$1(StreamlitMarkdown$1,{source:" Turn on to make this app occupy the entire width of the screen.",allowHTML:!1,isCaption:!0})]}),!!E.length&&jsxs(StyledFullRow,{children:[jsx$1(StyledLabel,{children:"Choose app theme"}),jsx$1(UISelectbox,{options:Ne(),disabled:$.name===CUSTOM_THEME_NAME,onChange:Ce,value:$.displayName??$.name,placeholder:"",acceptNewOptions:!1})]}),y.isSet&&jsx$1("div",{"data-testid":"stVersionInfo",children:jsx$1(StreamlitMarkdown$1,{source:`Made with Streamlit ${y.current.streamlitVersion}`,allowHTML:!1,isCaption:!0})})]})})]})});function StreamlitDialog(n){switch(n.type){case DialogType.ABOUT:return jsx$1(AboutDialog,{...n});case DialogType.CLEAR_CACHE:return jsx$1(ClearCacheDialog,{...n});case DialogType.SETTINGS:return jsx$1(SettingsDialog,{...n});case DialogType.SCRIPT_COMPILE_ERROR:return jsx$1(ScriptCompileErrorDialog,{...n});case DialogType.WARNING:case DialogType.CONNECTION_ERROR:return jsx$1(WarningDialog,{...n});case DialogType.DEPLOY_DIALOG:return jsx$1(DeployDialog,{...n});case DialogType.DEPLOY_ERROR:return jsx$1(DeployErrorDialog,{...n});case void 0:return noDialog(n);default:return typeNotRecognizedDialog(n)}}function AboutDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"About"}),jsx$1(ModalBody$1,{children:n.aboutSectionMd&&jsx$1(StreamlitMarkdown$1,{source:n.aboutSectionMd,allowHTML:!1})})]})}function ClearCacheDialog(n){const e=["**Are you sure you want to clear the app's function caches?**","This will remove all cached entries from functions using","`@st.cache_data` and `@st.cache_resource`."].join(`
155
- `);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:e,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:n.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:n.confirmCallback,children:"Clear caches"})]})]})})}function ScriptCompileErrorDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitErrorCodeBlock$1,{children:n.exception?.message?n.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:n.onClose,children:"Close"})})]})}function WarningDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:n.title}),jsx$1(ModalBody$1,{children:n.msg})]})}function DeployErrorDialog({title:n,msg:i,onClose:e,onContinue:t,onTryAgain:o}){const d=()=>{e(),t&&t()};return jsxs(Modal,{isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:n}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:i})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:o,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:d,children:t?"Continue anyway":"Close"})]})]})}function noDialog({onClose:n}){return jsx$1(Modal,{isOpen:!1,onClose:n})}function typeNotRecognizedDialog(n){return jsx$1(Modal,{isOpen:!0,onClose:n.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${n.type}" not recognized.`})})}function parseLinks(n){const i=[];let e=0,t=0;const o=/\[([^\]]+)\]\(([^)]+)\)/g;let d;for(;(d=o.exec(n))!==null;)d.index>e&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e,d.index)},t++)),i.push(jsx$1("a",{href:d[2],target:"_blank",rel:"noopener noreferrer",children:d[1]},t++)),e=d.index+d[0].length;return e<n.length&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e)},t++)),i}function DialogErrorMessage({message:n,codeBlock:i}){return jsxs(Fragment,{children:[jsx$1(StyledErrorText,{hasCodeBelow:!!i,children:parseLinks(n)}),i&&jsx$1(StreamlitErrorCodeBlock$1,{children:i})]})}const DialogErrorMessage$1=reactExports.memo(DialogErrorMessage),StyledActionButtonContainer=styled("div",{target:"eyud7440"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,alignItems:"center",lineHeight:n.iconSizes.md})),StyledActionButtonIcon=styled("div",{target:"eyud7441"})(({theme:n,icon:i})=>({background:`url("${i}") no-repeat center / contain`,width:n.iconSizes.base,height:n.iconSizes.base})),StyledToolbarActions=styled("div",{target:"eyud7442"})({display:"flex",alignItems:"center",flexDirection:"row"});function ActionButton({label:n,icon:i,onClick:e}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:e,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[i&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:i}),n&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:n})]})})})}function ToolbarActions({sendMessageToHost:n,hostToolbarItems:i,metricsMgr:e}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:i.map(({key:t,label:o,icon:d})=>jsx$1(ActionButton,{label:o,icon:d,onClick:()=>{e.enqueue("menuClick",{label:t}),n({type:"TOOLBAR_ITEM_CALLBACK",key:t})}},t))})}const screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=styled("div",{target:"erg7rn60"})(({theme:n})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:n.sizes.full,height:n.sizes.full,fontSize:"40vh",color:n.colors.redTextColor,fontWeight:n.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${n.colors.grayTextColor}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:n,endCallback:i})=>{const[e,t]=reactExports.useState(n);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const d=e-1;d>=0&&t(d),d===0&&i()},children:jsx$1("span",{children:e})},`frame${e}`)},StyledRecordAudioLabel=styled("label",{target:"ez2zj4i0"})({margin:0}),StyledInstruction=styled("p",{target:"ez2zj4i1"})({margin:0}),ScreencastDialog=({onClose:n,toggleRecordAudio:i,recordAudio:e,startRecording:t})=>{const[o,d]=reactExports.useState(e),p=reactExports.useCallback(y=>{const{checked:$}=y.target;$!==o&&(d($),i())},[o,i]),h=reactExports.useCallback(()=>{t(),n()},[t,n]);return jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio","aria-label":"Also record audio",checked:o,onChange:p})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:h,children:"Start recording!"})})]})},StyledScreenCastWarningDialog=styled("div",{target:"e15jpqoz0"})({display:"flex"}),StyledUnsupportedScreenCastIcon=styled("div",{target:"e15jpqoz1"})(({theme:n})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:n.spacing.twoXL,marginLeft:n.spacing.sm,fontSize:n.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=styled("p",{target:"e15jpqoz2"})(({theme:n})=>({margin:n.spacing.none})),UnsupportedBrowserDialog=({onClose:n})=>jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),StyledVideo=styled("video",{target:"e1y8cy420"})(({theme:n})=>({width:n.sizes.full,borderRadius:n.radii.md})),StyledDialogContainer=styled("div",{target:"e1y8cy421"})(({theme:n})=>({display:"flex",flexDirection:"column",width:n.sizes.full})),StyledRow=styled("div",{target:"e1y8cy422"})(({theme:n})=>({display:"flex",flexDirection:"row",paddingTop:n.spacing.md,paddingBottom:n.spacing.md})),StyledFirstColumn=styled("div",{target:"e1y8cy423"})(({theme:n})=>({paddingRight:n.spacing.lg,textAlign:"right",color:n.colors.grayTextColor,fontWeight:n.fontWeights.bold,width:"6em"})),StyledSecondColumn=styled("div",{target:"e1y8cy424"})(({theme:n})=>({flex:1,paddingRight:n.spacing.lg,marginRight:"6em",[`@media (max-width: ${n.breakpoints.sm})`]:{marginRight:n.spacing.none}})),StyledVideoFormatInstructions=styled("p",{target:"e1y8cy425"})(({theme:n})=>({marginTop:n.spacing.sm,marginBottom:n.spacing.none,fontSize:n.fontSizes.sm})),StyledDownloadButtonContainer=styled("div",{target:"e1y8cy426"})(({theme:n})=>({marginTop:n.spacing.twoXS})),VideoRecordedDialog=({onClose:n,videoBlob:i,fileName:e})=>{const t=URL.createObjectURL(i),o=()=>{const d=document.createElement("a");d.setAttribute("href",t),d.setAttribute("download",`${e}.webm`),d.click(),n()};return jsxs(Modal,{isOpen:!0,onClose:n,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:t,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:o,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},LOG$2=loglevelExports.getLogger("withScreencast");function withScreencast(n){const i=e=>{const{testOverride:t}=e,o=reactExports.useRef(null),[d,p]=reactExports.useState("streamlit-screencast"),[h,y]=reactExports.useState(!1),[$,E]=reactExports.useState(void 0),[M,H]=reactExports.useState(t||"OFF"),Z=reactExports.useCallback(()=>{y(Fe=>!Fe)},[]),be=reactExports.useCallback(async()=>{if(!(M==="OFF"||isNullOrUndefined(o.current))){if(M==="COUNTDOWN"){H("OFF");return}if(M==="RECORDING"){const Fe=o.current;if(!Fe||Fe.getState()==="inactive")H("OFF");else{const Me=await Fe.stop();E(Me),H("PREVIEW_FILE")}}}},[M]),ye=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}o.current=new ScreenCastRecorder({recordAudio:h,onErrorOrStop:()=>{be().catch(Fe=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Fe}`))}});try{await o.current.initialize()}catch(Fe){LOG$2.warn(`ScreenCastRecorder.initialize error: ${Fe}`),H("UNSUPPORTED");return}H("COUNTDOWN")},[h,be]),we=reactExports.useCallback(Fe=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}if(M==="OFF"){p(Fe),H("SETUP");return}be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[M,be]),xe=reactExports.useCallback(()=>{if(isNullOrUndefined(o.current))throw new Error("Countdown finished but recorder is null");o.current.start()?H("RECORDING"):be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[be]),Ce=reactExports.useCallback(()=>{H("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(n,{...e,screenCast:{currentState:M,toggleRecordAudio:Z,startRecording:we,stopRecording:be}}),M==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:Ce}),M==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:h,onClose:Ce,startRecording:ye,toggleRecordAudio:Z}),M==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:xe}),M==="PREVIEW_FILE"&&$&&jsx$1(VideoRecordedDialog,{onClose:Ce,videoBlob:$,fileName:d})]})};return i.displayName=`withScreencast(${n.displayName||n.name||"Component"})`,hoistNonReactStatics(i,n)}const useViewportSize=()=>{const{activeTheme:n}=reactExports.useContext(ThemeContext),{innerWidth:i}=useWindowDimensionsContext(),e=parseInt(n.emotion.breakpoints.md,10);return{isMobile:i<e}},DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",LOG$1=loglevelExports.getLogger("MetricsManager");class MetricsManager{constructor(i){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e="")=>{this.metricsUrl=e},this.sessionInfo=i}async initialize({gatherUsageStats:i,sendMessageToHost:e}){this.sendMessageToHost=e,this.actuallySendMetrics=i&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(LOG$1.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),LOG$1.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(i,e={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([i,e]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(i,e))}setMetadata(i){this.metadata=i}async requestDefaultMetricsConfig(){const i=localStorageAvailable();if(i){const e=window.localStorage.getItem("stMetricsConfig");if(e){this.metricsUrl=e;return}}try{const e=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!e.ok)this.metricsUrl=void 0,LOG$1.error("Failed to fetch metrics config: ",e.status);else{const t=await e.json();this.metricsUrl=t.url??void 0,i&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(e){LOG$1.error("Failed to fetch metrics config:",e)}}send(i,e={}){const t=this.buildEventProto(i,e);this.metricsUrl==="postMessage"?this.postMessageEvent(i,t):this.track(t)}sendPendingEvents(){this.pendingEvents.forEach(([i,e])=>{this.send(i,e)}),this.pendingEvents=[]}async track(i){const e=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i.toJSON())});await fetch(e)}postMessageEvent(i,e){this.sendMessageToHost({type:"METRICS_EVENT",eventName:i,data:e})}buildEventProto(i,e){const t=new MetricsEvent({event:i,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:isWebdriver(),...this.getContextData()});if(i==="menuClick")t.label=e.label;else if(i==="pageProfile")return new MetricsEvent({...t,...e});return t}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const i="ajs_anonymous_id",e=localStorageAvailable(),t=getCookie(i),o=e?window.localStorage.getItem(i):null,d=new Date;if(d.setFullYear(new Date().getFullYear()+1),t)this.anonymousId=t,e&&window.localStorage.setItem(i,t);else if(o){try{this.anonymousId=JSON.parse(o)}catch{this.anonymousId=o}setCookie(i,this.anonymousId,d)}else this.anonymousId=v4(),setCookie(i,this.anonymousId,d),e&&window.localStorage.setItem(i,this.anonymousId)}}function isWebdriver(){return window.navigator?.webdriver??!1}class SessionEventDispatcher{constructor(){this.onSessionEvent=new distExports.Signal}handleSessionEventMsg(i){this.onSessionEvent.emit(i)}}const StyledApp=styled("div",{target:"e1vju3fw0"})(({theme:n})=>{const i=hasLightBackgroundColor(n);return{position:"absolute",background:n.colors.bgColor,color:n.colors.bodyText,top:n.spacing.none,left:n.spacing.none,right:n.spacing.none,bottom:n.spacing.none,colorScheme:i?"light":"dark",overflow:"hidden","@media print":{float:"none",height:n.sizes.full,position:"static",overflow:"visible"}}});function getBrowserInfo(){const i=new UAParser().getResult();return{browserName:i.browser.name||"Unknown",browserVersion:i.browser.version||"Unknown",deviceType:i.device.type||"desktop",os:i.os.name||"Unknown"}}const showDevelopmentOptions=(n,i)=>i==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==i||Config.ToolbarMode.MINIMAL==i?!1:n||isLocalhost();function getTitle(n){return n||"Streamlit"}class AppNavigation{constructor(i,e,t,o){this.hostCommunicationMgr=i,this.onUpdatePageUrl=e,this.onPageNotFound=t,this.onPageIconChange=o,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(i){return this.mainScriptHash!==i.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=i.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=i.config?.hideSidebarNav??null),document.title=getTitle(""),[{currentPageScriptHash:i.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(i){const{sections:e,position:t,appPages:o}=i;this.appPages=o,this.hideSidebarNav=t===Navigation.Position.HIDDEN;const d=i.pageScriptHash,p=o.find($=>$.pageScriptHash===d),h=o.find($=>$.isDefault);this.mainPage=h;const y=p.urlPathname;if(!this.isPageTitleSet){const $=getTitle(p.pageName);document.title=$,this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:p.pageName??""})}return!this.isPageIconSet&&p.icon&&this.onPageIconChange(p.icon),this.onUpdatePageUrl(h.urlPathname??"",y,p.isDefault??!1),[{appPages:o,navSections:e,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:i.expanded,currentPageScriptHash:d},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:o}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:p.isDefault?"":y,currentPageScriptHash:d})}]}handlePageNotFound(i){return this.onPageNotFound(i),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}findPageByUrlPath(i){return this.appPages.find(e=>i.endsWith("/"+e.urlPathname))??this.mainPage}handlePageConfigChanged(i){i.favicon&&(this.isPageIconSet=!0),i.title&&(this.isPageTitleSet=!0)}clearPageElements(i,e){return i.filterMainScriptElements(e)}}function includeIfDefined(n){return Object.entries(n).reduce((i,[e,t])=>(t!==void 0&&(i[e]=t),i),{})}function preferWindowValue(n,i){return n??i}function reconcileHostConfigValues(n,i){if(!n)return i;const e=isValidAllowedOrigins(n.allowedOrigins)?n.allowedOrigins:void 0;return{...i,allowedOrigins:preferWindowValue(e,i.allowedOrigins),useExternalAuthToken:preferWindowValue(n.useExternalAuthToken,i.useExternalAuthToken),enableCustomParentMessages:preferWindowValue(n.enableCustomParentMessages,i.enableCustomParentMessages),blockErrorDialogs:preferWindowValue(n.blockErrorDialogs,i.blockErrorDialogs),mapboxToken:preferWindowValue(n.mapboxToken,i.mapboxToken),disableFullscreenMode:preferWindowValue(n.disableFullscreenMode,i.disableFullscreenMode),enforceDownloadInNewTab:preferWindowValue(n.enforceDownloadInNewTab,i.enforceDownloadInNewTab),resourceCrossOriginMode:preferWindowValue(n.resourceCrossOriginMode,i.resourceCrossOriginMode),setAnonymousCrossOriginPropertyOnMediaElements:i.setAnonymousCrossOriginPropertyOnMediaElements,metricsUrl:preferWindowValue(n.metricsUrl,i.metricsUrl)}}var define_PACKAGE_METADATA_default={version:"1.52.2"};const INITIAL_SCRIPT_RUN_ID="<null>",LOG=loglevelExports.getLogger("App");class App extends reactExports.PureComponent{constructor(i){super(i),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(e,t,o)=>{const d={type:DialogType.DEPLOY_ERROR,title:e,msg:t,onContinue:o,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(d)},this.handleThemeMessage=(e,t)=>{const[,o,d]=createPresetThemes(),p=isPresetTheme(this.props.theme.activeTheme);e===o.name&&p?this.props.theme.setTheme(o):e===d.name&&p?this.props.theme.setTheme(d):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${e}`),e===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const t=this.state.scriptRunState===ScriptRunState.RUNNING,o=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||t||o||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?(LOG.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===DialogType.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:e!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:e}):reactDomExports.flushSync(()=>{this.setState({connectionState:e})})},this.handleGitInfoChanged=e=>{this.setState({gitInfo:e})},this.handleCustomParentMessage=e=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:e.message}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{const t=(o,d,p)=>{const h=o[d];if(h in p)return p[h](o[h]);throw new Error(`Cannot handle ${d} "${h}".`)};try{t(e,"type",{newSession:o=>this.handleNewSession(o),sessionStatusChanged:o=>this.handleSessionStatusChanged(o),sessionEvent:o=>this.handleSessionEvent(o),delta:o=>this.handleDeltaMsg(o,e.metadata),pageConfigChanged:o=>this.handlePageConfigChanged(o),pageInfoChanged:o=>this.handlePageInfoChanged(o),pagesChanged:o=>{},pageNotFound:o=>this.handlePageNotFound(o),gitInfoChanged:o=>this.handleGitInfoChanged(o),scriptFinished:o=>this.handleScriptFinished(o),pageProfile:o=>this.handlePageProfileMsg(o),autoRerun:o=>this.handleAutoRerun(o),fileUrlsResponse:o=>this.uploadClient.onFileURLsResponse(o),deferredFileResponse:o=>this.handleDeferredFileResponse(o),parentMessage:o=>this.handleCustomParentMessage(o),logo:o=>this.handleLogo(o,e.metadata),navigation:o=>this.handleNavigation(o),authRedirect:o=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:o.url}):window.location.href=o.url}})}catch(o){const d=ensureError(o);LOG.error(d),this.showError("Bad message format",{message:d.message})}},this.handleLogo=(e,t)=>{this.setState(o=>({elements:o.elements.appRootWithLogo(e,{activeScriptHash:t.activeScriptHash,scriptRunId:o.scriptRunId})}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:o,layout:d,initialSidebarState:p,initialSidebarWidth:h,menuItems:y}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),o&&this.onPageIconChanged(o),d!==this.state.layout&&d!==PageConfig.Layout.LAYOUT_UNSET&&this.setState(E=>({layout:d,userSettings:{...E.userSettings,wideMode:d===PageConfig.Layout.WIDE}})),p!==this.state.initialSidebarState&&p!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:p}));const $=h?.pixelWidth!==void 0?h.pixelWidth:void 0;notNullOrUndefined($)&&$!==this.state.initialSidebarWidth&&this.setState(()=>({initialSidebarWidth:$})),y&&this.setState(E=>(y.clearAboutMd&&(y.aboutSectionMd=""),{menuItems:{...E.menuItems,...y}}))},this.handlePageInfoChanged=e=>{const{queryString:t}=e,o=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",o),this.setState({queryParams:t}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:t?`?${t}`:""})},this.onPageNotFound=e=>{const t=e?`You have requested page /${e}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",{message:`${t}. Running the app's main page.`})},this.handlePageNotFound=e=>{const{pageName:t}=e;this.maybeSetState(this.appNavigation.handlePageNotFound(t))},this.onPageIconChanged=e=>{handleFavicon(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=e=>{this.setState({navigationPosition:e.position}),this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{const t=PageProfile.toObject(e),o=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...t,isFragmentRun:!!t.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:o})},this.handleAutoRerun=e=>{const t=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)},e.interval*1e3);this.setState(o=>({autoReruns:[...o.autoReruns,t]}))},this.handleSessionStatusChanged=e=>{this.setState(t=>{let{scriptRunState:o}=t,{dialog:d}=t;return e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.STOP_REQUESTED?(o=ScriptRunState.RUNNING,notNullOrUndefined(d)&&d.type===DialogType.SCRIPT_COMPILE_ERROR&&(d=void 0)):!e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&t.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(o=ScriptRunState.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:!!e.runOnSave},dialog:d,scriptRunState:o,scriptChangedOnDisk:e.scriptIsRunning?!1:t.scriptChangedOnDisk}})},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),e.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const t={type:DialogType.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(t,e.scriptCompilationException?.message??"No message")}else e.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(e,t,o)=>{const d=this.getBaseUriParts();if(d){let p;StreamlitConfig.MAIN_PAGE_BASE_URL?p=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:p=d.pathname;const h=extractPageNameFromPathName(document.location.pathname,p);if((h===""?e:h)!==t){const $=o?"":t,E=this.state.queryParams||preserveEmbedQueryParams(),M=E?`?${E}`:"",Z=`${p==="/"?"":p}/${$}${M}`;window.history.pushState({},"",Z)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(e);const{appHash:o,currentPageScriptHash:d}=this.state,{scriptRunId:p,name:h,mainScriptPath:y,fragmentIdsThisRun:$,pageScriptHash:E,mainScriptHash:M}=e;if($.length)this.setState({fragmentIdsThisRun:$,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Z=e.config,be=e.customTheme;this.processThemeInput(be),this.setState({allowRunOnSave:Z.allowRunOnSave,hideTopBar:Z.hideTopBar,toolbarMode:Z.toolbarMode,latestRunTime:performance.now(),mainScriptHash:M,fragmentIdsThisRun:$}),this.maybeSetState(this.appNavigation.handleNewSession(e)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const H=hashString(this.sessionInfo.current.installationId+y);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(H),this.metricsMgr.enqueue("updateReport"),o===H&&d===E?this.setState({scriptRunId:p}):this.clearAppState(H,p,h,M)},this.handleInitialization=e=>{const t=e.initialize,o=e.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:o.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),o=document.location.toString().includes("#"),d=t?.pageScriptHash===e;isNullOrUndefined(t)||o&&d||this.onPageChange(t.pageScriptHash,void 0,!0)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=JSON.parse(JSON.stringify(e)),o=sortThemeInputKeys(t);return hashString(JSON.stringify(o))},this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:o}=e;if(this.setState({userSettings:e}),t!==o&&this.isServerConnected()){const d=new BackMsg({setRunOnSave:o});d.type="setRunOnSave",this.sendBackMsg(d)}},this.handleDeltaMsg=(e,t)=>{this.setState(o=>({elements:o.elements.applyDelta(o.scriptRunId,e,t)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new BackMsg({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new BackMsg({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(e=>{clearInterval(e)}),this.setState({autoReruns:[]})},this.rerunScript=(e=!1)=>{if(this.closeDialog(),!this.isServerConnected()){LOG.error("Cannot rerun script when disconnected from server.");return}this.state.scriptRunState===ScriptRunState.RUNNING||this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),e===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){LOG.error("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=(e,t,o)=>{const{elements:d,mainScriptHash:p}=this.state;this.cleanupAutoReruns();const h=this.appNavigation.clearPageElements(d,p),y=new Set(Array.from(h.getElements()).map($=>getElementId($)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(y),void 0,e,void 0,t,o)},this.isAppInReadyState=e=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&e.scriptRunState===ScriptRunState.RUNNING&&e.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(e,t,o,d,p,h)=>{const y=this.getBaseUriParts();if(!y){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:$}=this.state;let E=p??this.getQueryString(),M="";const H={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(o){if(o!==$&&!h){const be=preserveEmbedQueryParams();E=getQueryString(p,be),this.setState({queryParams:E}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:E})}}else if($)o=$;else{let be;StreamlitConfig.MAIN_PAGE_BASE_URL?be=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:be=y.pathname,M=extractPageNameFromPathName(document.location.pathname,be),o=""}const Z=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:E,widgetStates:e,pageScriptHash:o,pageName:M,fragmentId:t,isAutoRerun:d,cachedMessageHashes:Z,contextInfo:H}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){LOG.error("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const e=new BackMsg({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const e={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new BackMsg({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new BackMsg({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?(LOG.info(e),this.connectionManager.sendMessage(e)):LOG.error(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.state.connectionErrorDismissed||this.showError("Connection error",e,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(e=!0)=>{const t={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:e,metricsMgr:this.metricsMgr};this.openDialog(t)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:e?.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let t;try{const o=getIFrameEnclosingApp(this.embeddingId);o?.contentWindow?t=o.contentWindow.window:t=window}catch{t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast,o=getScreencastTimestamp();t(`streamlit-${e}-${o}`)},this.handleFullScreen=e=>{this.setState({isFullScreen:e})},this.setLibConfig=e=>{this.setState({libConfig:e})},this.setAppConfig=e=>{this.setState({appConfig:e})},this.addScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)}))},this.removeScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.filter(d=>d!==e)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:e}=this.state,t=e&&e.length>0?e:document.location.search;return t.startsWith("?")?t.substring(1):t},this.getThemeColorScheme=()=>{const{activeTheme:e}=this.props.theme;return hasLightBackgroundColor(e.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&e?.length>0},this.showDeployButton=()=>showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&!this.isInCloudEnvironment()&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue("menuClick",{label:"deployButtonInApp"}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(e,t)=>{const o=this.isServerConnected(),d=this.sessionInfo.isSet;if(o&&d){const p=new BackMsg({fileUrlsRequest:{requestId:e,fileNames:t.map(h=>h.name),sessionId:this.sessionInfo.current.sessionId}});p.type="fileUrlsRequest",this.sendBackMsg(p)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${o}, isSessionInfoSet: ${d})`),this.uploadClient.onFileURLsResponse({responseId:e,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=e=>{const t=this.isServerConnected(),o=this.sessionInfo.isSet;if(!t||!o)return Promise.reject(new Error("Not connected to server or session not initialized"));const d=Promise.withResolvers(),p=this.deferredFileListeners.get(e)??new Set,h=$=>{p.delete(h),d.resolve($)};p.add(h),this.deferredFileListeners.set(e,p);const y=new BackMsg({deferredFileRequest:{fileId:e,sessionId:this.sessionInfo.current.sessionId}});return y.type="deferredFileRequest",this.sendBackMsg(y),d.promise},this.handleDeferredFileResponse=e=>{const t=this.deferredFileListeners.get(e.fileId);if(!(!t||t.size===0)){for(const o of Array.from(t))try{o(e)}catch{}this.deferredFileListeners.delete(e.fileId)}},this.handleKeyDown=(e,t)=>{if(!((e==="c"||e==="r")&&isKeyboardEventFromEditableTarget(t)))switch(e){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=e=>{e==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:e}=this.state;return!!(e?.aboutSectionMd||e?.getHelpUrl&&!e?.hideGetHelp||e?.reportABugUrl&&!e?.hideReportABug)},this.shouldShowToolbar=(e,t)=>{const o=!isEmbed()||isToolbarDisplayed();let d;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?d=e.length>0||t.length>0||this.hasAppDefinedMenuItems():d=!0,o&&d},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet(),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,initialSidebarWidth:void 0,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:"",gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:Navigation.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:i.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:e=>{this.setState({inputsDisabled:e})},themeChanged:this.handleThemeMessage,pageChanged:e=>this.onPageChange(e),isOwnerChanged:e=>this.setState({isOwner:e}),fileUploadClientConfigChanged:e=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(e)},hostMenuItemsChanged:e=>{this.setState({hostMenuItems:e})},hostToolbarItemsChanged:e=>{this.setState({hostToolbarItems:e})},hostHideSidebarNavChanged:e=>{this.setState({hostHideSidebarNav:e})},sidebarChevronDownshiftChanged:e=>{this.setState({sidebarChevronDownshift:e})},pageLinkBaseUrlChanged:e=>{this.setState({pageLinkBaseUrl:e})},queryParamsChanged:e=>{this.setState({queryParams:e})},deployedAppMetadataChanged:e=>{this.setState({deployedAppMetadata:e})},restartWebsocketConnection:()=>{this.connectionManager||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(e,t,o,d,p)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:e,error:t,message:o,source:d,customComponentName:p})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}applyInitialHostConfig(){if(!isHostConfigBypassEnabled())return;const i=StreamlitConfig.HOST_CONFIG,e=includeIfDefined({allowedOrigins:i.allowedOrigins,useExternalAuthToken:i.useExternalAuthToken,enableCustomParentMessages:i.enableCustomParentMessages,blockErrorDialogs:i.blockErrorDialogs});this.hostCommunicationMgr.setAllowedOrigins(e),this.setAppConfig(e);const t=includeIfDefined({mapboxToken:i.mapboxToken,disableFullscreenMode:i.disableFullscreenMode,enforceDownloadInNewTab:i.enforceDownloadInNewTab,resourceCrossOriginMode:i.resourceCrossOriginMode});Object.keys(t).length>0&&this.setLibConfig(t),i.metricsUrl!==void 0&&this.metricsMgr.setMetricsConfig(i.metricsUrl)}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.applyInitialHostConfig(),this.connectionManager=new ConnectionManager({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(i,e,t)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:"Websocket Connection",error:i,message:e,source:t})},onHostConfigResp:i=>{const e=reconcileHostConfigValues(StreamlitConfig.HOST_CONFIG,i),{allowedOrigins:t,useExternalAuthToken:o,disableFullscreenMode:d,enableCustomParentMessages:p,mapboxToken:h,enforceDownloadInNewTab:y,metricsUrl:$,blockErrorDialogs:E,setAnonymousCrossOriginPropertyOnMediaElements:M,resourceCrossOriginMode:H}=e,Z={allowedOrigins:t,useExternalAuthToken:o,enableCustomParentMessages:p,blockErrorDialogs:E},be={mapboxToken:h,disableFullscreenMode:d,enforceDownloadInNewTab:y,resourceCrossOriginMode:H??(M?"anonymous":void 0)};this.metricsMgr.setMetricsConfig($),this.hostCommunicationMgr.setAllowedOrigins(Z),this.setAppConfig(Z),this.setLibConfig(be)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const i=document.querySelectorAll("[data-iframe-height]"),e=Array.from(i).map(t=>Math.ceil(t.getBoundingClientRect().bottom));return Math.max(0,...e)}},__vitePreload(()=>import("./iframeResizer.contentWindow.Q0Cy4mzM.js").then(i=>i.i),[],import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(i,e){if(window.prerenderReady===!1&&this.isAppInReadyState(e)&&(window.prerenderReady=!0),this.state.scriptRunState!==e.scriptRunState){if(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING)try{measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING)}catch{}this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}}componentWillUnmount(){this.connectionManager?.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}maybeShowErrorDialog(i,e){const{blockErrorDialogs:t}=this.state.appConfig;t||this.openDialog(i);const d=i.type===DialogType.SCRIPT_COMPILE_ERROR?i.type:i.title;this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR_DIALOG",error:d,message:e})}showError(i,e,t=DialogType.WARNING){LOG.error(e.message);const o={type:t,title:i,msg:jsx$1(DialogErrorMessage$1,{message:e.message,codeBlock:e.codeBlock}),onClose:()=>{}};this.maybeShowErrorDialog(o,e.message)}hasStreamlitVersionChanged(i){let e;if(StreamlitConfig.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION===!0?e=define_PACKAGE_METADATA_default.version:this.sessionInfo.isSet&&(e=this.sessionInfo.current.streamlitVersion),e){const{environmentInfo:t}=i;if(notNullOrUndefined(t)&&notNullOrUndefined(t.streamlitVersion))return e!=t.streamlitVersion}return!1}maybeSetState(i){if(i){const[e,t]=i;this.setState(e,t)}}processThemeInput(i){const e=this.createThemeHash(i);if(e===this.state.themeHash)return;this.setState({themeHash:e});const t=!isPresetTheme(this.props.theme.activeTheme);if(i){const o=createCustomThemes(i);this.props.theme.addThemes(o,{keepPresetThemes:!1});const p=getHostSpecifiedThemeOnly()??getCachedTheme(),h=mapCachedThemeToAvailableTheme(p,o);if(h)this.setAndSendTheme(h);else if(o.length>1){const y=o.findIndex($=>$.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(o[y])}else this.setAndSendTheme(o[0])}else if(this.props.theme.addThemes([]),t){const d=getHostSpecifiedThemeOnly()??getCachedTheme(),h=mapCachedThemeToAvailableTheme(d,[lightTheme,darkTheme]);h?this.setAndSendTheme(h):this.setAndSendTheme(createAutoTheme())}(i?.fontFaces&&i.fontFaces.length>0||i?.fontSources&&i.fontSources.length>0)&&this.props.theme.setFonts(i)}handleScriptFinished(i){(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:o})=>({elements:o.clearStaleNodes(e,t)}),()=>{const e=new Set(Array.from(this.state.elements.getElements()).map(t=>getElementId(t)).filter(notUndefined));this.widgetMgr.removeInactive(e)}),this.connectionManager!==null&&i!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(i,e,t,o){this.setState(d=>{const p=this.appNavigation.clearPageElements(d.elements,o);return{scriptRunId:e,scriptName:t,appHash:i,elements:p}},()=>{const d=new Set(Array.from(this.state.elements.getElements()).map(p=>getElementId(p)).filter(notUndefined));this.widgetMgr.removeInactive(d)})}openDialog(i){this.setState({dialog:i})}render(){const{allowRunOnSave:i,connectionState:e,dialog:t,elements:o,initialSidebarState:d,menuItems:p,isFullScreen:h,scriptRunId:y,scriptRunState:$,userSettings:E,hideTopBar:M,hideSidebarNav:H,expandSidebarNav:Z,currentPageScriptHash:be,hostHideSidebarNav:ye,pageLinkBaseUrl:we,sidebarChevronDownshift:xe,hostMenuItems:Ce,hostToolbarItems:Ne,libConfig:Fe,inputsDisabled:Me,appPages:Le,navSections:ze,navigationPosition:Ke,scriptChangedOnDisk:Ve}=this.state,je=this.props.isMobileViewport?Navigation.Position.SIDEBAR:Ke,We=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),Xe=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":E.wideMode}),Qe=t?StreamlitDialog({...t,onClose:this.closeDialog}):null,Ye=this.shouldShowToolbar(Ce,Ne),Ue=!isEmbed()||isPaddingDisplayed(),ot=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:d,initialSidebarWidth:this.state.initialSidebarWidth,pageLinkBaseUrl:we,currentPageScriptHash:be,onPageChange:this.onPageChange,navSections:ze,appPages:Le,appLogo:o.logo,sidebarChevronDownshift:xe,expandSidebarNav:Z,hideSidebarNav:H||ye||je===Navigation.Position.TOP,isFullScreen:h,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:$,scriptRunId:y,mapboxToken:Fe.mapboxToken,enforceDownloadInNewTab:Fe.enforceDownloadInNewTab,resourceCrossOriginMode:Fe.resourceCrossOriginMode,requestDeferredFile:this.requestDeferredFile,children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:Xe,"data-testid":"stApp","data-test-script-state":y==INITIAL_SCRIPT_RUN_ID?"initial":$,"data-test-connection-state":e,children:[jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:o,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:je,wideMode:E.wideMode,embedded:isEmbed(),showPadding:Ue,disableScrolling:ot,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Me||e!==ConnectionState.CONNECTED,showToolbar:Ye,disableFullscreenMode:Fe.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:jsxs(Fragment,{children:[!M&&jsx$1(StatusWidget,{connectionState:e,scriptRunState:$,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:i,showScriptChangedActions:Ve}),!M&&jsx$1(ToolbarActions,{hostToolbarItems:Ne,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!Ve&&jsx$1(DeployButton,{onClick:this.deployButtonClicked}),!M&&jsx$1(MainMenu$1,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:Ce,developmentMode:We,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:p,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]})}),Qe]})})})}}const AppWithScreenCast=withScreencast(App),AppWrapper=n=>{const{isMobile:i}=useViewportSize();return jsx$1(AppWithScreenCast,{...n,isMobileViewport:i})};function useThemeManager(){const n=getDefaultTheme(),[i,e]=reactExports.useState(n),[t,o]=reactExports.useState(n.themeInput?.fontFaces??[]),[d,p]=reactExports.useState(null),[h,y]=reactExports.useState(()=>[...createPresetThemes(),...isPresetTheme(n)?[]:[n]]),$=(be,ye={})=>{const{keepPresetThemes:we=!0}=ye;y([...we?createPresetThemes():[],...be])},E=reactExports.useCallback(be=>{e(ye=>be!==ye?(be.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(be),be):ye)},[e]),M=reactExports.useCallback(()=>{i.name===AUTO_THEME_NAME&&E(getHostSpecifiedTheme());const be=h.filter(ye=>ye.name!==AUTO_THEME_NAME);y([createAutoTheme(),...be])},[i.name,h,E]),H=reactExports.useCallback(be=>{be.fontFaces&&o(be.fontFaces);const ye=[...be.fontSources||[],...be.sidebar?.fontSources||[]],we={};ye.forEach(xe=>{xe.sourceUrl&&xe.configName&&(we[xe.configName]=xe.sourceUrl)}),p(Object.keys(we).length>0?we:null)},[o,p]),Z=reactExports.useCallback(be=>{H(be);const ye=new CustomThemeConfig(be),we=createTheme(CUSTOM_THEME_NAME,ye);E(we)},[H,E]);return reactExports.useEffect(()=>{const be=window.matchMedia("(prefers-color-scheme: dark)");return be.addEventListener("change",M),window.addEventListener("afterprint",M),()=>{window.removeEventListener("afterprint",M),be.removeEventListener("change",M)}},[i,h,M]),[{setTheme:E,activeTheme:i,addThemes:$,availableThemes:h,setFonts:H,setImportedTheme:Z},t,d]}const ThemedApp=({streamlitExecutionStartedAt:n})=>{const[i,e,t]=useThemeManager(),{activeTheme:o}=i;return jsx$1(RootStyleProvider,{theme:o,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[e.length>0&&jsx$1(FontFaceDeclaration,{fontFaces:e}),t&&jsx$1(FontSources,{fontSources:t}),jsx$1(AppWrapper,{theme:i,streamlitExecutionStartedAt:n})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"}),rootDomNode=document.getElementById("root");if(!rootDomNode)throw new Error("#root DOM element not found");const reactRoot=clientExports.createRoot(rootDomNode);reactRoot.render(jsx$1(reactExports.StrictMode,{children:jsx$1(HelmetProvider,{children:jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})})})}));export{toaster as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,styled as F,StyledDropdownListItem as G,isPropValid as H,DownloadContext as I,StyledErrorMessage as J,toString$2 as K,LibConfigContext as L,findAndReplace as M,Arrow$2 as N,range as O,Placement as P,isNumericType as Q,DataFrameCellType as R,StreamlitConfig as S,TooltipIcon as T,UISelectbox as U,useCrossOriginAttribute as V,loglevelExports as W,useRequiredContext as X,NavigationContext as Y,DynamicIcon as Z,_extends$A as _,BaseButtonTooltip as a,Metric$1 as a$,Fragment as a0,Kind as a1,AlertElement$1 as a2,Video$1 as a3,keyframes as a4,StyledWidgetInstructions as a5,isFromMac as a6,FormsContext as a7,StyledFormSubmitContent as a8,Form$1 as a9,IsSidebarContext as aA,LabelVisibilityOptions as aB,React as aC,find as aD,parse$1 as aE,parse$2 as aF,normalize$1 as aG,html$2 as aH,svg as aI,useCopyToClipboard as aJ,ACCESSIBILITY_TYPE as aK,Popover$2 as aL,ensureError as aM,ErrorElement as aN,hexToRgb as aO,withWrapper as aP,__vitePreload as aQ,convertRemToPx as aR,blend as aS,SetCache as aT,cacheHas as aU,baseRest as aV,isArrayLikeObject as aW,useSelectCommon as aX,Select as aY,VirtualDropdown as aZ,TYPE as a_,isInForm as aa,WidgetLabelHelpIcon as ab,WidgetLabel as ac,isMaterialIcon as ad,getBorderColor as ae,TextInput$1 as af,getDefaultExportFromCjs as ag,darken as ah,getPrimaryFocusBoxShadow as ai,PortalContext as aj,reactDomExports as ak,classNames as al,requireReact as am,styled$1 as an,isFocusVisible as ao,getOverride as ap,getOverrideProps as aq,root$4 as ar,toNumber as as,isObject$1 as at,mergeOverrides as au,CUSTOM_INPUT_TYPE as av,ChevronDown$1 as aw,PLACEMENT$1 as ax,Icon$2 as ay,Tooltip$1 as az,BaseButton as b,util_int_ as b$,transparentize as b0,StyledWidgetLabel as b1,Global as b2,getCrossOriginAttribute as b3,_arrayLikeToArray as b4,_unsupportedIterableToArray as b5,ViewStateContext as b6,useWindowDimensionsContext as b7,LocaleContext as b8,shouldWidthStretch as b9,ComponentRegistry as bA,__awaiter as bB,PropTypes as bC,isFromWindows as bD,requirePropTypes as bE,merge$1 as bF,getIncreasingGreen as bG,getDecreasingRed as bH,getBlue80 as bI,getGray30 as bJ,getGray70 as bK,getGray90 as bL,getDivergingColorsArray as bM,keysToSnakeCase as bN,PlotlyChart$1 as bO,themeColors as bP,isMobile as bQ,UploadedFileInfo as bR,FileUploaderState as bS,ThemeContext$1 as bT,pick$1 as bU,Slider$1 as bV,zip as bW,baseSlice as bX,baseToString as bY,trimmedEndIndex as bZ,util_bn_ as b_,ButtonGroup$1 as ba,LabelVisibilityMessage as bb,StyledButtonGroup as bc,NumberInput$1 as bd,isDatetimeType as be,isDateType as bf,getTimezone as bg,debounce$2 as bh,isEqual$1 as bi,shouldHeightStretch as bj,useStyletron as bk,mergeOverride as bl,toObjectOverride as bm,Icon$1 as bn,DeleteAlt$1 as bo,forkBlur as bp,forkFocus as bq,addCssUnit as br,convert as bs,visitParents as bt,SKIP as bu,toExportedTheme as bv,ArrowDataframe as bw,useTimeout as bx,Skeleton$1 as by,Skeleton as bz,BaseButtonSize as c,_createClass as c$,util_bit_ as c0,util_math_ as c1,util_buffer_ as c2,util_vector_ as c3,util_pretty_ as c4,util_interval_ as c5,compareTypes as c6,compareFields as c7,compareSchemas as c8,getAugmentedNamespace as c9,ok as cA,stringify$1 as cB,stringify as cC,pointStart as cD,visit as cE,pointEnd as cF,structuredClone$1 as cG,identity as cH,arrayEach as cI,baseEach as cJ,isArray$1 as cK,arrayMap as cL,baseMap as cM,baseIteratee as cN,baseForOwn as cO,isObjectLike as cP,baseGetTag as cQ,isPlainObject$3 as cR,cloneDeep$1 as cS,useExecuteWhenChanged as cT,StatefulPopover as cU,_typeof$e as cV,_inherits as cW,_createSuper as cX,_classCallCheck as cY,_defineProperty$s as cZ,_assertThisInitialized as c_,isStringType as ca,isTimeType as cb,isPeriodType as cc,isIntervalType as cd,isDurationType as ce,isDecimalType as cf,isFloatType as cg,isObjectType as ch,isListType as ci,TimeUnit as cj,Struct as ck,ThemeProvider$1 as cl,createThemedStyled as cm,createThemedUseStyletron as cn,createThemedWithStyle as co,expandBorderStyles as cp,withStyle as cq,requireReactIs$1 as cr,AcceptFileValue as cs,assertNever as ct,chatInputAcceptFileProtoValueToEnum as cu,tableFromIPC as cv,v4 as cw,requireReactDom as cx,UIDConsumer as cy,StatefulMenu as cz,Box as d,filterOptions as d0,mergeWith as d1,parseEntities as d2,StyledPre as d3,CopyButton$1 as d4,StyledCopyButtonContainer as d5,StyledCodeBlock as d6,propTypesExports as d7,_slicedToArray as d8,index as d9,Field as dA,Null as dB,isRangeIndexType as dC,isEmptyType as dD,isBytesType as dE,isCategoricalType as dF,fontSizes as dG,_objectWithoutProperties$1 as dH,_objectSpread2 as dI,jsx as dJ,css as dK,lighten as dL,mix$1 as dM,TRIGGER_TYPE as dN,StyledTooltipContentWrapper as dO,FlexContext as dP,useScrollbarGutterSize as dQ,Resizable as dR,_getPrototypeOf as da,_possibleConstructorReturn as db,parseToRgba as dc,DeckGlJsonChart$1 as dd,hasPath as de,isArrayLike as df,isBuffer as dg,isTypedArray as dh,isArguments as di,getTag as dj,isPrototype as dk,baseKeys as dl,Set$1 as dm,setToArray as dn,requireClassnames as dp,groupBy as dq,flatten as dr,Vector as ds,getLuminance as dt,parseIconPackEntry as du,genericFonts as dv,getMarkdownBgColors as dw,isUnsignedIntegerType as dx,isIntegerType as dy,isBooleanType as dz,isNullOrUndefined as e,StyledWidgetLabelHelpInline as f,getHelpTooltipAriaLabel as g,hoistNonReactStatics as h,isValidFormId as i,jsx$1 as j,useCalculatedDimensions as k,useEmotionTheme as l,hasLightBackgroundColor as m,notNullOrUndefined as n,jsxs as o,labelVisibilityProtoValueToEnum as p,StreamlitMarkdown$1 as q,reactExports as r,streamlit as s,StyledContent as t,useRegisterShortcut as u,getFocusBoxShadow as v,StyledCheckbox$1 as w,getOverrides as x,SIZE$1 as y,ENHANCER_POSITION as z};
155
+ `);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:e,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:n.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:n.confirmCallback,children:"Clear caches"})]})]})})}function ScriptCompileErrorDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitErrorCodeBlock$1,{children:n.exception?.message?n.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:n.onClose,children:"Close"})})]})}function WarningDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:n.title}),jsx$1(ModalBody$1,{children:n.msg})]})}function DeployErrorDialog({title:n,msg:i,onClose:e,onContinue:t,onTryAgain:o}){const d=()=>{e(),t&&t()};return jsxs(Modal,{isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:n}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:i})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:o,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:d,children:t?"Continue anyway":"Close"})]})]})}function noDialog({onClose:n}){return jsx$1(Modal,{isOpen:!1,onClose:n})}function typeNotRecognizedDialog(n){return jsx$1(Modal,{isOpen:!0,onClose:n.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${n.type}" not recognized.`})})}function parseLinks(n){const i=[];let e=0,t=0;const o=/\[([^\]]+)\]\(([^)]+)\)/g;let d;for(;(d=o.exec(n))!==null;)d.index>e&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e,d.index)},t++)),i.push(jsx$1("a",{href:d[2],target:"_blank",rel:"noopener noreferrer",children:d[1]},t++)),e=d.index+d[0].length;return e<n.length&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e)},t++)),i}function DialogErrorMessage({message:n,codeBlock:i}){return jsxs(Fragment,{children:[jsx$1(StyledErrorText,{hasCodeBelow:!!i,children:parseLinks(n)}),i&&jsx$1(StreamlitErrorCodeBlock$1,{children:i})]})}const DialogErrorMessage$1=reactExports.memo(DialogErrorMessage),StyledActionButtonContainer=styled("div",{target:"eyud7440"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,alignItems:"center",lineHeight:n.iconSizes.md})),StyledActionButtonIcon=styled("div",{target:"eyud7441"})(({theme:n,icon:i})=>({background:`url("${i}") no-repeat center / contain`,width:n.iconSizes.base,height:n.iconSizes.base})),StyledToolbarActions=styled("div",{target:"eyud7442"})({display:"flex",alignItems:"center",flexDirection:"row"});function ActionButton({label:n,icon:i,onClick:e}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:e,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[i&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:i}),n&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:n})]})})})}function ToolbarActions({sendMessageToHost:n,hostToolbarItems:i,metricsMgr:e}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:i.map(({key:t,label:o,icon:d})=>jsx$1(ActionButton,{label:o,icon:d,onClick:()=>{e.enqueue("menuClick",{label:t}),n({type:"TOOLBAR_ITEM_CALLBACK",key:t})}},t))})}const screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=styled("div",{target:"erg7rn60"})(({theme:n})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:n.sizes.full,height:n.sizes.full,fontSize:"40vh",color:n.colors.redTextColor,fontWeight:n.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${n.colors.grayTextColor}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:n,endCallback:i})=>{const[e,t]=reactExports.useState(n);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const d=e-1;d>=0&&t(d),d===0&&i()},children:jsx$1("span",{children:e})},`frame${e}`)},StyledRecordAudioLabel=styled("label",{target:"ez2zj4i0"})({margin:0}),StyledInstruction=styled("p",{target:"ez2zj4i1"})({margin:0}),ScreencastDialog=({onClose:n,toggleRecordAudio:i,recordAudio:e,startRecording:t})=>{const[o,d]=reactExports.useState(e),p=reactExports.useCallback(y=>{const{checked:$}=y.target;$!==o&&(d($),i())},[o,i]),h=reactExports.useCallback(()=>{t(),n()},[t,n]);return jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio","aria-label":"Also record audio",checked:o,onChange:p})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:h,children:"Start recording!"})})]})},StyledScreenCastWarningDialog=styled("div",{target:"e15jpqoz0"})({display:"flex"}),StyledUnsupportedScreenCastIcon=styled("div",{target:"e15jpqoz1"})(({theme:n})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:n.spacing.twoXL,marginLeft:n.spacing.sm,fontSize:n.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=styled("p",{target:"e15jpqoz2"})(({theme:n})=>({margin:n.spacing.none})),UnsupportedBrowserDialog=({onClose:n})=>jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),StyledVideo=styled("video",{target:"e1y8cy420"})(({theme:n})=>({width:n.sizes.full,borderRadius:n.radii.md})),StyledDialogContainer=styled("div",{target:"e1y8cy421"})(({theme:n})=>({display:"flex",flexDirection:"column",width:n.sizes.full})),StyledRow=styled("div",{target:"e1y8cy422"})(({theme:n})=>({display:"flex",flexDirection:"row",paddingTop:n.spacing.md,paddingBottom:n.spacing.md})),StyledFirstColumn=styled("div",{target:"e1y8cy423"})(({theme:n})=>({paddingRight:n.spacing.lg,textAlign:"right",color:n.colors.grayTextColor,fontWeight:n.fontWeights.bold,width:"6em"})),StyledSecondColumn=styled("div",{target:"e1y8cy424"})(({theme:n})=>({flex:1,paddingRight:n.spacing.lg,marginRight:"6em",[`@media (max-width: ${n.breakpoints.sm})`]:{marginRight:n.spacing.none}})),StyledVideoFormatInstructions=styled("p",{target:"e1y8cy425"})(({theme:n})=>({marginTop:n.spacing.sm,marginBottom:n.spacing.none,fontSize:n.fontSizes.sm})),StyledDownloadButtonContainer=styled("div",{target:"e1y8cy426"})(({theme:n})=>({marginTop:n.spacing.twoXS})),VideoRecordedDialog=({onClose:n,videoBlob:i,fileName:e})=>{const t=URL.createObjectURL(i),o=()=>{const d=document.createElement("a");d.setAttribute("href",t),d.setAttribute("download",`${e}.webm`),d.click(),n()};return jsxs(Modal,{isOpen:!0,onClose:n,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:t,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:o,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},LOG$2=loglevelExports.getLogger("withScreencast");function withScreencast(n){const i=e=>{const{testOverride:t}=e,o=reactExports.useRef(null),[d,p]=reactExports.useState("streamlit-screencast"),[h,y]=reactExports.useState(!1),[$,E]=reactExports.useState(void 0),[M,H]=reactExports.useState(t||"OFF"),Z=reactExports.useCallback(()=>{y(Fe=>!Fe)},[]),be=reactExports.useCallback(async()=>{if(!(M==="OFF"||isNullOrUndefined(o.current))){if(M==="COUNTDOWN"){H("OFF");return}if(M==="RECORDING"){const Fe=o.current;if(!Fe||Fe.getState()==="inactive")H("OFF");else{const Me=await Fe.stop();E(Me),H("PREVIEW_FILE")}}}},[M]),ye=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}o.current=new ScreenCastRecorder({recordAudio:h,onErrorOrStop:()=>{be().catch(Fe=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Fe}`))}});try{await o.current.initialize()}catch(Fe){LOG$2.warn(`ScreenCastRecorder.initialize error: ${Fe}`),H("UNSUPPORTED");return}H("COUNTDOWN")},[h,be]),we=reactExports.useCallback(Fe=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}if(M==="OFF"){p(Fe),H("SETUP");return}be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[M,be]),xe=reactExports.useCallback(()=>{if(isNullOrUndefined(o.current))throw new Error("Countdown finished but recorder is null");o.current.start()?H("RECORDING"):be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[be]),Ce=reactExports.useCallback(()=>{H("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(n,{...e,screenCast:{currentState:M,toggleRecordAudio:Z,startRecording:we,stopRecording:be}}),M==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:Ce}),M==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:h,onClose:Ce,startRecording:ye,toggleRecordAudio:Z}),M==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:xe}),M==="PREVIEW_FILE"&&$&&jsx$1(VideoRecordedDialog,{onClose:Ce,videoBlob:$,fileName:d})]})};return i.displayName=`withScreencast(${n.displayName||n.name||"Component"})`,hoistNonReactStatics(i,n)}const useViewportSize=()=>{const{activeTheme:n}=reactExports.useContext(ThemeContext),{innerWidth:i}=useWindowDimensionsContext(),e=parseInt(n.emotion.breakpoints.md,10);return{isMobile:i<e}},DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",LOG$1=loglevelExports.getLogger("MetricsManager");class MetricsManager{constructor(i){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e="")=>{this.metricsUrl=e},this.sessionInfo=i}async initialize({gatherUsageStats:i,sendMessageToHost:e}){this.sendMessageToHost=e,this.actuallySendMetrics=i&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(LOG$1.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),LOG$1.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(i,e={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([i,e]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(i,e))}setMetadata(i){this.metadata=i}async requestDefaultMetricsConfig(){const i=localStorageAvailable();if(i){const e=window.localStorage.getItem("stMetricsConfig");if(e){this.metricsUrl=e;return}}try{const e=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!e.ok)this.metricsUrl=void 0,LOG$1.error("Failed to fetch metrics config: ",e.status);else{const t=await e.json();this.metricsUrl=t.url??void 0,i&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(e){LOG$1.error("Failed to fetch metrics config:",e)}}send(i,e={}){const t=this.buildEventProto(i,e);this.metricsUrl==="postMessage"?this.postMessageEvent(i,t):this.track(t)}sendPendingEvents(){this.pendingEvents.forEach(([i,e])=>{this.send(i,e)}),this.pendingEvents=[]}async track(i){const e=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i.toJSON())});await fetch(e)}postMessageEvent(i,e){this.sendMessageToHost({type:"METRICS_EVENT",eventName:i,data:e})}buildEventProto(i,e){const t=new MetricsEvent({event:i,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:isWebdriver(),...this.getContextData()});if(i==="menuClick")t.label=e.label;else if(i==="pageProfile")return new MetricsEvent({...t,...e});return t}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const i="ajs_anonymous_id",e=localStorageAvailable(),t=getCookie(i),o=e?window.localStorage.getItem(i):null,d=new Date;if(d.setFullYear(new Date().getFullYear()+1),t)this.anonymousId=t,e&&window.localStorage.setItem(i,t);else if(o){try{this.anonymousId=JSON.parse(o)}catch{this.anonymousId=o}setCookie(i,this.anonymousId,d)}else this.anonymousId=v4(),setCookie(i,this.anonymousId,d),e&&window.localStorage.setItem(i,this.anonymousId)}}function isWebdriver(){return window.navigator?.webdriver??!1}class SessionEventDispatcher{constructor(){this.onSessionEvent=new distExports.Signal}handleSessionEventMsg(i){this.onSessionEvent.emit(i)}}const StyledApp=styled("div",{target:"e1vju3fw0"})(({theme:n})=>{const i=hasLightBackgroundColor(n);return{position:"absolute",background:n.colors.bgColor,color:n.colors.bodyText,top:n.spacing.none,left:n.spacing.none,right:n.spacing.none,bottom:n.spacing.none,colorScheme:i?"light":"dark",overflow:"hidden","@media print":{float:"none",height:n.sizes.full,position:"static",overflow:"visible"}}});function getBrowserInfo(){const i=new UAParser().getResult();return{browserName:i.browser.name||"Unknown",browserVersion:i.browser.version||"Unknown",deviceType:i.device.type||"desktop",os:i.os.name||"Unknown"}}const showDevelopmentOptions=(n,i)=>i==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==i||Config.ToolbarMode.MINIMAL==i?!1:n||isLocalhost();function getTitle(n){return n||"Streamlit"}class AppNavigation{constructor(i,e,t,o){this.hostCommunicationMgr=i,this.onUpdatePageUrl=e,this.onPageNotFound=t,this.onPageIconChange=o,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(i){return this.mainScriptHash!==i.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=i.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=i.config?.hideSidebarNav??null),document.title=getTitle(""),[{currentPageScriptHash:i.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(i){const{sections:e,position:t,appPages:o}=i;this.appPages=o,this.hideSidebarNav=t===Navigation.Position.HIDDEN;const d=i.pageScriptHash,p=o.find($=>$.pageScriptHash===d),h=o.find($=>$.isDefault);this.mainPage=h;const y=p.urlPathname;if(!this.isPageTitleSet){const $=getTitle(p.pageName);document.title=$,this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:p.pageName??""})}return!this.isPageIconSet&&p.icon&&this.onPageIconChange(p.icon),this.onUpdatePageUrl(h.urlPathname??"",y,p.isDefault??!1),[{appPages:o,navSections:e,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:i.expanded,currentPageScriptHash:d},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:o}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:p.isDefault?"":y,currentPageScriptHash:d})}]}handlePageNotFound(i){return this.onPageNotFound(i),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}findPageByUrlPath(i){return this.appPages.find(e=>i.endsWith("/"+e.urlPathname))??this.mainPage}handlePageConfigChanged(i){i.favicon&&(this.isPageIconSet=!0),i.title&&(this.isPageTitleSet=!0)}clearPageElements(i,e){return i.filterMainScriptElements(e)}}function includeIfDefined(n){return Object.entries(n).reduce((i,[e,t])=>(t!==void 0&&(i[e]=t),i),{})}function preferWindowValue(n,i){return n??i}function reconcileHostConfigValues(n,i){if(!n)return i;const e=isValidAllowedOrigins(n.allowedOrigins)?n.allowedOrigins:void 0;return{...i,allowedOrigins:preferWindowValue(e,i.allowedOrigins),useExternalAuthToken:preferWindowValue(n.useExternalAuthToken,i.useExternalAuthToken),enableCustomParentMessages:preferWindowValue(n.enableCustomParentMessages,i.enableCustomParentMessages),blockErrorDialogs:preferWindowValue(n.blockErrorDialogs,i.blockErrorDialogs),mapboxToken:preferWindowValue(n.mapboxToken,i.mapboxToken),disableFullscreenMode:preferWindowValue(n.disableFullscreenMode,i.disableFullscreenMode),enforceDownloadInNewTab:preferWindowValue(n.enforceDownloadInNewTab,i.enforceDownloadInNewTab),resourceCrossOriginMode:preferWindowValue(n.resourceCrossOriginMode,i.resourceCrossOriginMode),setAnonymousCrossOriginPropertyOnMediaElements:i.setAnonymousCrossOriginPropertyOnMediaElements,metricsUrl:preferWindowValue(n.metricsUrl,i.metricsUrl)}}var define_PACKAGE_METADATA_default={version:"1.52.2"};const INITIAL_SCRIPT_RUN_ID="<null>",LOG=loglevelExports.getLogger("App");class App extends reactExports.PureComponent{constructor(i){super(i),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(e,t,o)=>{const d={type:DialogType.DEPLOY_ERROR,title:e,msg:t,onContinue:o,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(d)},this.handleThemeMessage=(e,t)=>{const[,o,d]=createPresetThemes(),p=isPresetTheme(this.props.theme.activeTheme);e===o.name&&p?this.props.theme.setTheme(o):e===d.name&&p?this.props.theme.setTheme(d):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${e}`),e===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const t=this.state.scriptRunState===ScriptRunState.RUNNING,o=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||t||o||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?(LOG.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===DialogType.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:e!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:e}):reactDomExports.flushSync(()=>{this.setState({connectionState:e})})},this.handleGitInfoChanged=e=>{this.setState({gitInfo:e})},this.handleCustomParentMessage=e=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:e.message}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{const t=(o,d,p)=>{const h=o[d];if(h in p)return p[h](o[h]);throw new Error(`Cannot handle ${d} "${h}".`)};try{t(e,"type",{newSession:o=>this.handleNewSession(o),sessionStatusChanged:o=>this.handleSessionStatusChanged(o),sessionEvent:o=>this.handleSessionEvent(o),delta:o=>this.handleDeltaMsg(o,e.metadata),pageConfigChanged:o=>this.handlePageConfigChanged(o),pageInfoChanged:o=>this.handlePageInfoChanged(o),pagesChanged:o=>{},pageNotFound:o=>this.handlePageNotFound(o),gitInfoChanged:o=>this.handleGitInfoChanged(o),scriptFinished:o=>this.handleScriptFinished(o),pageProfile:o=>this.handlePageProfileMsg(o),autoRerun:o=>this.handleAutoRerun(o),fileUrlsResponse:o=>this.uploadClient.onFileURLsResponse(o),deferredFileResponse:o=>this.handleDeferredFileResponse(o),parentMessage:o=>this.handleCustomParentMessage(o),logo:o=>this.handleLogo(o,e.metadata),navigation:o=>this.handleNavigation(o),authRedirect:o=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:o.url}):window.location.href=o.url}})}catch(o){const d=ensureError(o);LOG.error(d),this.showError("Bad message format",{message:d.message})}},this.handleLogo=(e,t)=>{this.setState(o=>({elements:o.elements.appRootWithLogo(e,{activeScriptHash:t.activeScriptHash,scriptRunId:o.scriptRunId})}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:o,layout:d,initialSidebarState:p,initialSidebarWidth:h,menuItems:y}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),o&&this.onPageIconChanged(o),d!==this.state.layout&&d!==PageConfig.Layout.LAYOUT_UNSET&&this.setState(E=>({layout:d,userSettings:{...E.userSettings,wideMode:d===PageConfig.Layout.WIDE}})),p!==this.state.initialSidebarState&&p!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:p}));const $=h?.pixelWidth!==void 0?h.pixelWidth:void 0;notNullOrUndefined($)&&$!==this.state.initialSidebarWidth&&this.setState(()=>({initialSidebarWidth:$})),y&&this.setState(E=>(y.clearAboutMd&&(y.aboutSectionMd=""),{menuItems:{...E.menuItems,...y}}))},this.handlePageInfoChanged=e=>{const{queryString:t}=e,o=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",o),this.setState({queryParams:t}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:t?`?${t}`:""})},this.onPageNotFound=e=>{const t=e?`You have requested page /${e}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",{message:`${t}. Running the app's main page.`})},this.handlePageNotFound=e=>{const{pageName:t}=e;this.maybeSetState(this.appNavigation.handlePageNotFound(t))},this.onPageIconChanged=e=>{handleFavicon(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=e=>{this.setState({navigationPosition:e.position}),this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{const t=PageProfile.toObject(e),o=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...t,isFragmentRun:!!t.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:o})},this.handleAutoRerun=e=>{const t=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)},e.interval*1e3);this.setState(o=>({autoReruns:[...o.autoReruns,t]}))},this.handleSessionStatusChanged=e=>{this.setState(t=>{let{scriptRunState:o}=t,{dialog:d}=t;return e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.STOP_REQUESTED?(o=ScriptRunState.RUNNING,notNullOrUndefined(d)&&d.type===DialogType.SCRIPT_COMPILE_ERROR&&(d=void 0)):!e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&t.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(o=ScriptRunState.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:!!e.runOnSave},dialog:d,scriptRunState:o,scriptChangedOnDisk:e.scriptIsRunning?!1:t.scriptChangedOnDisk}})},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),e.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const t={type:DialogType.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(t,e.scriptCompilationException?.message??"No message")}else e.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(e,t,o)=>{const d=this.getBaseUriParts();if(d){let p;StreamlitConfig.MAIN_PAGE_BASE_URL?p=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:p=d.pathname;const h=extractPageNameFromPathName(document.location.pathname,p);if((h===""?e:h)!==t){const $=o?"":t,E=this.state.queryParams||preserveEmbedQueryParams(),M=E?`?${E}`:"",Z=`${p==="/"?"":p}/${$}${M}`;window.history.pushState({},"",Z)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(e);const{appHash:o,currentPageScriptHash:d}=this.state,{scriptRunId:p,name:h,mainScriptPath:y,fragmentIdsThisRun:$,pageScriptHash:E,mainScriptHash:M}=e;if($.length)this.setState({fragmentIdsThisRun:$,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Z=e.config,be=e.customTheme;this.processThemeInput(be),this.setState({allowRunOnSave:Z.allowRunOnSave,hideTopBar:Z.hideTopBar,toolbarMode:Z.toolbarMode,latestRunTime:performance.now(),mainScriptHash:M,fragmentIdsThisRun:$}),this.maybeSetState(this.appNavigation.handleNewSession(e)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const H=hashString(this.sessionInfo.current.installationId+y);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(H),this.metricsMgr.enqueue("updateReport"),o===H&&d===E?this.setState(Z=>({elements:Z.elements.clearTransientNodes($),scriptRunId:p})):this.clearAppState(H,p,h,M)},this.handleInitialization=e=>{const t=e.initialize,o=e.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:o.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),o=document.location.toString().includes("#"),d=t?.pageScriptHash===e;isNullOrUndefined(t)||o&&d||this.onPageChange(t.pageScriptHash,void 0,!0)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=JSON.parse(JSON.stringify(e)),o=sortThemeInputKeys(t);return hashString(JSON.stringify(o))},this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:o}=e;if(this.setState({userSettings:e}),t!==o&&this.isServerConnected()){const d=new BackMsg({setRunOnSave:o});d.type="setRunOnSave",this.sendBackMsg(d)}},this.handleDeltaMsg=(e,t)=>{this.setState(o=>({elements:o.elements.applyDelta(o.scriptRunId,e,t)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new BackMsg({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new BackMsg({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(e=>{clearInterval(e)}),this.setState({autoReruns:[]})},this.rerunScript=(e=!1)=>{if(this.closeDialog(),!this.isServerConnected()){LOG.error("Cannot rerun script when disconnected from server.");return}this.state.scriptRunState===ScriptRunState.RUNNING||this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),e===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){LOG.error("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=(e,t,o)=>{const{elements:d,mainScriptHash:p}=this.state;this.cleanupAutoReruns();const h=this.appNavigation.clearPageElements(d,p),y=new Set(Array.from(h.getElements()).map($=>getElementId($)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(y),void 0,e,void 0,t,o)},this.isAppInReadyState=e=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&e.scriptRunState===ScriptRunState.RUNNING&&e.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(e,t,o,d,p,h)=>{const y=this.getBaseUriParts();if(!y){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:$}=this.state;let E=p??this.getQueryString(),M="";const H={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(o){if(o!==$&&!h){const be=preserveEmbedQueryParams();E=getQueryString(p,be),this.setState({queryParams:E}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:E})}}else if($)o=$;else{let be;StreamlitConfig.MAIN_PAGE_BASE_URL?be=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:be=y.pathname,M=extractPageNameFromPathName(document.location.pathname,be),o=""}const Z=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:E,widgetStates:e,pageScriptHash:o,pageName:M,fragmentId:t,isAutoRerun:d,cachedMessageHashes:Z,contextInfo:H}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){LOG.error("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const e=new BackMsg({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const e={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new BackMsg({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new BackMsg({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?(LOG.info(e),this.connectionManager.sendMessage(e)):LOG.error(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.state.connectionErrorDismissed||this.showError("Connection error",e,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(e=!0)=>{const t={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:e,metricsMgr:this.metricsMgr};this.openDialog(t)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:e?.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let t;try{const o=getIFrameEnclosingApp(this.embeddingId);o?.contentWindow?t=o.contentWindow.window:t=window}catch{t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast,o=getScreencastTimestamp();t(`streamlit-${e}-${o}`)},this.handleFullScreen=e=>{this.setState({isFullScreen:e})},this.setLibConfig=e=>{this.setState({libConfig:e})},this.setAppConfig=e=>{this.setState({appConfig:e})},this.addScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)}))},this.removeScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.filter(d=>d!==e)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:e}=this.state,t=e&&e.length>0?e:document.location.search;return t.startsWith("?")?t.substring(1):t},this.getThemeColorScheme=()=>{const{activeTheme:e}=this.props.theme;return hasLightBackgroundColor(e.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&e?.length>0},this.showDeployButton=()=>showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&!this.isInCloudEnvironment()&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue("menuClick",{label:"deployButtonInApp"}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(e,t)=>{const o=this.isServerConnected(),d=this.sessionInfo.isSet;if(o&&d){const p=new BackMsg({fileUrlsRequest:{requestId:e,fileNames:t.map(h=>h.name),sessionId:this.sessionInfo.current.sessionId}});p.type="fileUrlsRequest",this.sendBackMsg(p)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${o}, isSessionInfoSet: ${d})`),this.uploadClient.onFileURLsResponse({responseId:e,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=e=>{const t=this.isServerConnected(),o=this.sessionInfo.isSet;if(!t||!o)return Promise.reject(new Error("Not connected to server or session not initialized"));const d=Promise.withResolvers(),p=this.deferredFileListeners.get(e)??new Set,h=$=>{p.delete(h),d.resolve($)};p.add(h),this.deferredFileListeners.set(e,p);const y=new BackMsg({deferredFileRequest:{fileId:e,sessionId:this.sessionInfo.current.sessionId}});return y.type="deferredFileRequest",this.sendBackMsg(y),d.promise},this.handleDeferredFileResponse=e=>{const t=this.deferredFileListeners.get(e.fileId);if(!(!t||t.size===0)){for(const o of Array.from(t))try{o(e)}catch{}this.deferredFileListeners.delete(e.fileId)}},this.handleKeyDown=(e,t)=>{if(!((e==="c"||e==="r")&&isKeyboardEventFromEditableTarget(t)))switch(e){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=e=>{e==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:e}=this.state;return!!(e?.aboutSectionMd||e?.getHelpUrl&&!e?.hideGetHelp||e?.reportABugUrl&&!e?.hideReportABug)},this.shouldShowToolbar=(e,t)=>{const o=!isEmbed()||isToolbarDisplayed();let d;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?d=e.length>0||t.length>0||this.hasAppDefinedMenuItems():d=!0,o&&d},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet(),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,initialSidebarWidth:void 0,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:"",gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:Navigation.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:i.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:e=>{this.setState({inputsDisabled:e})},themeChanged:this.handleThemeMessage,pageChanged:e=>this.onPageChange(e),isOwnerChanged:e=>this.setState({isOwner:e}),fileUploadClientConfigChanged:e=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(e)},hostMenuItemsChanged:e=>{this.setState({hostMenuItems:e})},hostToolbarItemsChanged:e=>{this.setState({hostToolbarItems:e})},hostHideSidebarNavChanged:e=>{this.setState({hostHideSidebarNav:e})},sidebarChevronDownshiftChanged:e=>{this.setState({sidebarChevronDownshift:e})},pageLinkBaseUrlChanged:e=>{this.setState({pageLinkBaseUrl:e})},queryParamsChanged:e=>{this.setState({queryParams:e})},deployedAppMetadataChanged:e=>{this.setState({deployedAppMetadata:e})},restartWebsocketConnection:()=>{this.connectionManager||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(e,t,o,d,p)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:e,error:t,message:o,source:d,customComponentName:p})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}applyInitialHostConfig(){if(!isHostConfigBypassEnabled())return;const i=StreamlitConfig.HOST_CONFIG,e=includeIfDefined({allowedOrigins:i.allowedOrigins,useExternalAuthToken:i.useExternalAuthToken,enableCustomParentMessages:i.enableCustomParentMessages,blockErrorDialogs:i.blockErrorDialogs});this.hostCommunicationMgr.setAllowedOrigins(e),this.setAppConfig(e);const t=includeIfDefined({mapboxToken:i.mapboxToken,disableFullscreenMode:i.disableFullscreenMode,enforceDownloadInNewTab:i.enforceDownloadInNewTab,resourceCrossOriginMode:i.resourceCrossOriginMode});Object.keys(t).length>0&&this.setLibConfig(t),i.metricsUrl!==void 0&&this.metricsMgr.setMetricsConfig(i.metricsUrl)}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.applyInitialHostConfig(),this.connectionManager=new ConnectionManager({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(i,e,t)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:"Websocket Connection",error:i,message:e,source:t})},onHostConfigResp:i=>{const e=reconcileHostConfigValues(StreamlitConfig.HOST_CONFIG,i),{allowedOrigins:t,useExternalAuthToken:o,disableFullscreenMode:d,enableCustomParentMessages:p,mapboxToken:h,enforceDownloadInNewTab:y,metricsUrl:$,blockErrorDialogs:E,setAnonymousCrossOriginPropertyOnMediaElements:M,resourceCrossOriginMode:H}=e,Z={allowedOrigins:t,useExternalAuthToken:o,enableCustomParentMessages:p,blockErrorDialogs:E},be={mapboxToken:h,disableFullscreenMode:d,enforceDownloadInNewTab:y,resourceCrossOriginMode:H??(M?"anonymous":void 0)};this.metricsMgr.setMetricsConfig($),this.hostCommunicationMgr.setAllowedOrigins(Z),this.setAppConfig(Z),this.setLibConfig(be)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const i=document.querySelectorAll("[data-iframe-height]"),e=Array.from(i).map(t=>Math.ceil(t.getBoundingClientRect().bottom));return Math.max(0,...e)}},__vitePreload(()=>import("./iframeResizer.contentWindow.BcWUIYOe.js").then(i=>i.i),[],import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(i,e){if(window.prerenderReady===!1&&this.isAppInReadyState(e)&&(window.prerenderReady=!0),this.state.scriptRunState!==e.scriptRunState){if(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING)try{measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING)}catch{}this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}}componentWillUnmount(){this.connectionManager?.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}maybeShowErrorDialog(i,e){const{blockErrorDialogs:t}=this.state.appConfig;t||this.openDialog(i);const d=i.type===DialogType.SCRIPT_COMPILE_ERROR?i.type:i.title;this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR_DIALOG",error:d,message:e})}showError(i,e,t=DialogType.WARNING){LOG.error(e.message);const o={type:t,title:i,msg:jsx$1(DialogErrorMessage$1,{message:e.message,codeBlock:e.codeBlock}),onClose:()=>{}};this.maybeShowErrorDialog(o,e.message)}hasStreamlitVersionChanged(i){let e;if(StreamlitConfig.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION===!0?e=define_PACKAGE_METADATA_default.version:this.sessionInfo.isSet&&(e=this.sessionInfo.current.streamlitVersion),e){const{environmentInfo:t}=i;if(notNullOrUndefined(t)&&notNullOrUndefined(t.streamlitVersion))return e!=t.streamlitVersion}return!1}maybeSetState(i){if(i){const[e,t]=i;this.setState(e,t)}}processThemeInput(i){const e=this.createThemeHash(i);if(e===this.state.themeHash)return;this.setState({themeHash:e});const t=!isPresetTheme(this.props.theme.activeTheme);if(i){const o=createCustomThemes(i);this.props.theme.addThemes(o,{keepPresetThemes:!1});const p=getHostSpecifiedThemeOnly()??getCachedTheme(),h=mapCachedThemeToAvailableTheme(p,o);if(h)this.setAndSendTheme(h);else if(o.length>1){const y=o.findIndex($=>$.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(o[y])}else this.setAndSendTheme(o[0])}else if(this.props.theme.addThemes([]),t){const d=getHostSpecifiedThemeOnly()??getCachedTheme(),h=mapCachedThemeToAvailableTheme(d,[lightTheme,darkTheme]);h?this.setAndSendTheme(h):this.setAndSendTheme(createAutoTheme())}(i?.fontFaces&&i.fontFaces.length>0||i?.fontSources&&i.fontSources.length>0)&&this.props.theme.setFonts(i)}handleScriptFinished(i){(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:o})=>({elements:o.clearStaleNodes(e,t)}),()=>{const e=new Set(Array.from(this.state.elements.getElements()).map(t=>getElementId(t)).filter(notUndefined));this.widgetMgr.removeInactive(e)}),this.connectionManager!==null&&i!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(i,e,t,o){this.setState(d=>{const p=this.appNavigation.clearPageElements(d.elements,o);return{scriptRunId:e,scriptName:t,appHash:i,elements:p}},()=>{const d=new Set(Array.from(this.state.elements.getElements()).map(p=>getElementId(p)).filter(notUndefined));this.widgetMgr.removeInactive(d)})}openDialog(i){this.setState({dialog:i})}render(){const{allowRunOnSave:i,connectionState:e,dialog:t,elements:o,initialSidebarState:d,menuItems:p,isFullScreen:h,scriptRunId:y,scriptRunState:$,userSettings:E,hideTopBar:M,hideSidebarNav:H,expandSidebarNav:Z,currentPageScriptHash:be,hostHideSidebarNav:ye,pageLinkBaseUrl:we,sidebarChevronDownshift:xe,hostMenuItems:Ce,hostToolbarItems:Ne,libConfig:Fe,inputsDisabled:Me,appPages:Le,navSections:ze,navigationPosition:Ke,scriptChangedOnDisk:Ve}=this.state,je=this.props.isMobileViewport?Navigation.Position.SIDEBAR:Ke,We=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),Xe=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":E.wideMode}),Qe=t?StreamlitDialog({...t,onClose:this.closeDialog}):null,Ye=this.shouldShowToolbar(Ce,Ne),Ue=!isEmbed()||isPaddingDisplayed(),ot=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:d,initialSidebarWidth:this.state.initialSidebarWidth,pageLinkBaseUrl:we,currentPageScriptHash:be,onPageChange:this.onPageChange,navSections:ze,appPages:Le,appLogo:o.logo,sidebarChevronDownshift:xe,expandSidebarNav:Z,hideSidebarNav:H||ye||je===Navigation.Position.TOP,isFullScreen:h,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:$,scriptRunId:y,mapboxToken:Fe.mapboxToken,enforceDownloadInNewTab:Fe.enforceDownloadInNewTab,resourceCrossOriginMode:Fe.resourceCrossOriginMode,requestDeferredFile:this.requestDeferredFile,children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:Xe,"data-testid":"stApp","data-test-script-state":y==INITIAL_SCRIPT_RUN_ID?"initial":$,"data-test-connection-state":e,children:[jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:o,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:je,wideMode:E.wideMode,embedded:isEmbed(),showPadding:Ue,disableScrolling:ot,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Me||e!==ConnectionState.CONNECTED,showToolbar:Ye,disableFullscreenMode:Fe.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:jsxs(Fragment,{children:[!M&&jsx$1(StatusWidget,{connectionState:e,scriptRunState:$,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:i,showScriptChangedActions:Ve}),!M&&jsx$1(ToolbarActions,{hostToolbarItems:Ne,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!Ve&&jsx$1(DeployButton,{onClick:this.deployButtonClicked}),!M&&jsx$1(MainMenu$1,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:Ce,developmentMode:We,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:p,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]})}),Qe]})})})}}const AppWithScreenCast=withScreencast(App),AppWrapper=n=>{const{isMobile:i}=useViewportSize();return jsx$1(AppWithScreenCast,{...n,isMobileViewport:i})};function useThemeManager(){const n=getDefaultTheme(),[i,e]=reactExports.useState(n),[t,o]=reactExports.useState(n.themeInput?.fontFaces??[]),[d,p]=reactExports.useState(null),[h,y]=reactExports.useState(()=>[...createPresetThemes(),...isPresetTheme(n)?[]:[n]]),$=(be,ye={})=>{const{keepPresetThemes:we=!0}=ye;y([...we?createPresetThemes():[],...be])},E=reactExports.useCallback(be=>{e(ye=>be!==ye?(be.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(be),be):ye)},[e]),M=reactExports.useCallback(()=>{i.name===AUTO_THEME_NAME&&E(getHostSpecifiedTheme());const be=h.filter(ye=>ye.name!==AUTO_THEME_NAME);y([createAutoTheme(),...be])},[i.name,h,E]),H=reactExports.useCallback(be=>{be.fontFaces&&o(be.fontFaces);const ye=[...be.fontSources||[],...be.sidebar?.fontSources||[]],we={};ye.forEach(xe=>{xe.sourceUrl&&xe.configName&&(we[xe.configName]=xe.sourceUrl)}),p(Object.keys(we).length>0?we:null)},[o,p]),Z=reactExports.useCallback(be=>{H(be);const ye=new CustomThemeConfig(be),we=createTheme(CUSTOM_THEME_NAME,ye);E(we)},[H,E]);return reactExports.useEffect(()=>{const be=window.matchMedia("(prefers-color-scheme: dark)");return be.addEventListener("change",M),window.addEventListener("afterprint",M),()=>{window.removeEventListener("afterprint",M),be.removeEventListener("change",M)}},[i,h,M]),[{setTheme:E,activeTheme:i,addThemes:$,availableThemes:h,setFonts:H,setImportedTheme:Z},t,d]}const ThemedApp=({streamlitExecutionStartedAt:n})=>{const[i,e,t]=useThemeManager(),{activeTheme:o}=i;return jsx$1(RootStyleProvider,{theme:o,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[e.length>0&&jsx$1(FontFaceDeclaration,{fontFaces:e}),t&&jsx$1(FontSources,{fontSources:t}),jsx$1(AppWrapper,{theme:i,streamlitExecutionStartedAt:n})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"}),rootDomNode=document.getElementById("root");if(!rootDomNode)throw new Error("#root DOM element not found");const reactRoot=clientExports.createRoot(rootDomNode);reactRoot.render(jsx$1(reactExports.StrictMode,{children:jsx$1(HelmetProvider,{children:jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})})})}));export{toaster as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,styled as F,StyledDropdownListItem as G,isPropValid as H,DownloadContext as I,StyledErrorMessage as J,toString$2 as K,LibConfigContext as L,findAndReplace as M,Arrow$2 as N,range as O,Placement as P,isNumericType as Q,DataFrameCellType as R,StreamlitConfig as S,TooltipIcon as T,UISelectbox as U,useCrossOriginAttribute as V,loglevelExports as W,useRequiredContext as X,NavigationContext as Y,DynamicIcon as Z,_extends$A as _,BaseButtonTooltip as a,Metric$1 as a$,Fragment as a0,Kind as a1,AlertElement$1 as a2,Video$1 as a3,keyframes as a4,StyledWidgetInstructions as a5,isFromMac as a6,FormsContext as a7,StyledFormSubmitContent as a8,Form$1 as a9,IsSidebarContext as aA,LabelVisibilityOptions as aB,React as aC,find as aD,parse$1 as aE,parse$2 as aF,normalize$1 as aG,html$2 as aH,svg as aI,useCopyToClipboard as aJ,ACCESSIBILITY_TYPE as aK,Popover$2 as aL,ensureError as aM,ErrorElement as aN,hexToRgb as aO,withWrapper as aP,__vitePreload as aQ,convertRemToPx as aR,blend as aS,SetCache as aT,cacheHas as aU,baseRest as aV,isArrayLikeObject as aW,useSelectCommon as aX,Select as aY,VirtualDropdown as aZ,TYPE as a_,isInForm as aa,WidgetLabelHelpIcon as ab,WidgetLabel as ac,isMaterialIcon as ad,getBorderColor as ae,TextInput$1 as af,getDefaultExportFromCjs as ag,darken as ah,getPrimaryFocusBoxShadow as ai,PortalContext as aj,reactDomExports as ak,classNames as al,requireReact as am,styled$1 as an,isFocusVisible as ao,getOverride as ap,getOverrideProps as aq,root$4 as ar,toNumber as as,isObject$1 as at,mergeOverrides as au,CUSTOM_INPUT_TYPE as av,ChevronDown$1 as aw,PLACEMENT$1 as ax,Icon$2 as ay,Tooltip$1 as az,BaseButton as b,util_int_ as b$,transparentize as b0,StyledWidgetLabel as b1,Global as b2,getCrossOriginAttribute as b3,_arrayLikeToArray as b4,_unsupportedIterableToArray as b5,ViewStateContext as b6,useWindowDimensionsContext as b7,LocaleContext as b8,shouldWidthStretch as b9,ComponentRegistry as bA,__awaiter as bB,PropTypes as bC,isFromWindows as bD,requirePropTypes as bE,merge$1 as bF,getIncreasingGreen as bG,getDecreasingRed as bH,getBlue80 as bI,getGray30 as bJ,getGray70 as bK,getGray90 as bL,getDivergingColorsArray as bM,keysToSnakeCase as bN,PlotlyChart$1 as bO,themeColors as bP,isMobile as bQ,UploadedFileInfo as bR,FileUploaderState as bS,ThemeContext$1 as bT,pick$1 as bU,Slider$1 as bV,zip as bW,baseSlice as bX,baseToString as bY,trimmedEndIndex as bZ,util_bn_ as b_,ButtonGroup$1 as ba,LabelVisibilityMessage as bb,StyledButtonGroup as bc,NumberInput$1 as bd,isDatetimeType as be,isDateType as bf,getTimezone as bg,debounce$2 as bh,isEqual$1 as bi,shouldHeightStretch as bj,useStyletron as bk,mergeOverride as bl,toObjectOverride as bm,Icon$1 as bn,DeleteAlt$1 as bo,forkBlur as bp,forkFocus as bq,addCssUnit as br,convert as bs,visitParents as bt,SKIP as bu,toExportedTheme as bv,ArrowDataframe as bw,useTimeout as bx,Skeleton$1 as by,Skeleton as bz,BaseButtonSize as c,_createClass as c$,util_bit_ as c0,util_math_ as c1,util_buffer_ as c2,util_vector_ as c3,util_pretty_ as c4,util_interval_ as c5,compareTypes as c6,compareFields as c7,compareSchemas as c8,getAugmentedNamespace as c9,ok as cA,stringify$1 as cB,stringify as cC,pointStart as cD,visit as cE,pointEnd as cF,structuredClone$1 as cG,identity as cH,arrayEach as cI,baseEach as cJ,isArray$1 as cK,arrayMap as cL,baseMap as cM,baseIteratee as cN,baseForOwn as cO,isObjectLike as cP,baseGetTag as cQ,isPlainObject$3 as cR,cloneDeep$1 as cS,useExecuteWhenChanged as cT,StatefulPopover as cU,_typeof$e as cV,_inherits as cW,_createSuper as cX,_classCallCheck as cY,_defineProperty$s as cZ,_assertThisInitialized as c_,isStringType as ca,isTimeType as cb,isPeriodType as cc,isIntervalType as cd,isDurationType as ce,isDecimalType as cf,isFloatType as cg,isObjectType as ch,isListType as ci,TimeUnit as cj,Struct as ck,ThemeProvider$1 as cl,createThemedStyled as cm,createThemedUseStyletron as cn,createThemedWithStyle as co,expandBorderStyles as cp,withStyle as cq,requireReactIs$1 as cr,AcceptFileValue as cs,assertNever as ct,chatInputAcceptFileProtoValueToEnum as cu,tableFromIPC as cv,v4 as cw,requireReactDom as cx,UIDConsumer as cy,StatefulMenu as cz,Box as d,filterOptions as d0,mergeWith as d1,parseEntities as d2,StyledPre as d3,CopyButton$1 as d4,StyledCopyButtonContainer as d5,StyledCodeBlock as d6,propTypesExports as d7,_slicedToArray as d8,index as d9,Field as dA,Null as dB,isRangeIndexType as dC,isEmptyType as dD,isBytesType as dE,isCategoricalType as dF,fontSizes as dG,_objectWithoutProperties$1 as dH,_objectSpread2 as dI,jsx as dJ,css as dK,lighten as dL,mix$1 as dM,TRIGGER_TYPE as dN,StyledTooltipContentWrapper as dO,FlexContext as dP,useScrollbarGutterSize as dQ,Resizable as dR,_getPrototypeOf as da,_possibleConstructorReturn as db,parseToRgba as dc,DeckGlJsonChart$1 as dd,hasPath as de,isArrayLike as df,isBuffer as dg,isTypedArray as dh,isArguments as di,getTag as dj,isPrototype as dk,baseKeys as dl,Set$1 as dm,setToArray as dn,requireClassnames as dp,groupBy as dq,flatten as dr,Vector as ds,getLuminance as dt,parseIconPackEntry as du,genericFonts as dv,getMarkdownBgColors as dw,isUnsignedIntegerType as dx,isIntegerType as dy,isBooleanType as dz,isNullOrUndefined as e,StyledWidgetLabelHelpInline as f,getHelpTooltipAriaLabel as g,hoistNonReactStatics as h,isValidFormId as i,jsx$1 as j,useCalculatedDimensions as k,useEmotionTheme as l,hasLightBackgroundColor as m,notNullOrUndefined as n,jsxs as o,labelVisibilityProtoValueToEnum as p,StreamlitMarkdown$1 as q,reactExports as r,streamlit as s,StyledContent as t,useRegisterShortcut as u,getFocusBoxShadow as v,StyledCheckbox$1 as w,getOverrides as x,SIZE$1 as y,ENHANCER_POSITION as z};