streamlit-nightly 1.53.1.dev20260121__py3-none-any.whl → 1.53.2.dev20260122__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 (100) hide show
  1. streamlit/elements/lib/options_selector_utils.py +63 -19
  2. streamlit/elements/widgets/multiselect.py +31 -7
  3. streamlit/elements/widgets/selectbox.py +38 -16
  4. streamlit/static/index.html +1 -1
  5. streamlit/static/manifest.json +295 -295
  6. streamlit/static/static/js/{ErrorOutline.esm.C6VdLmcj.js → ErrorOutline.esm.CIFYUdwC.js} +1 -1
  7. streamlit/static/static/js/{FileDownload.esm.g3HiTWnX.js → FileDownload.esm.DWVTnTHm.js} +1 -1
  8. streamlit/static/static/js/{FileHelper.DkZahZIe.js → FileHelper.BPYQIPd1.js} +1 -1
  9. streamlit/static/static/js/{FormClearHelper.CnDHLc6s.js → FormClearHelper.CypmvhYZ.js} +1 -1
  10. streamlit/static/static/js/{InputInstructions.CJwgA0Sj.js → InputInstructions.Bi62hDTQ.js} +1 -1
  11. streamlit/static/static/js/{Particles.BA0kQsJM.js → Particles.yebG0VuV.js} +1 -1
  12. streamlit/static/static/js/{ProgressBar.N6Nzla-b.js → ProgressBar.Dy9CI6w4.js} +1 -1
  13. streamlit/static/static/js/{StreamlitSyntaxHighlighter.DF8uiu4N.js → StreamlitSyntaxHighlighter.Btk92CPv.js} +1 -1
  14. streamlit/static/static/js/{TableChart.esm.Ne8F0PNs.js → TableChart.esm.DBeVaFNt.js} +1 -1
  15. streamlit/static/static/js/{Toolbar.h597G9NG.js → Toolbar.DC2Tp-qb.js} +1 -1
  16. streamlit/static/static/js/{WidgetLabelHelpIconInline.BMPpOfi3.js → WidgetLabelHelpIconInline.3DnEd9BK.js} +1 -1
  17. streamlit/static/static/js/{base-input.CTx0w60a.js → base-input.7Sj6pVk0.js} +1 -1
  18. streamlit/static/static/js/{checkbox.otYZO7w2.js → checkbox.CcUx3XuQ.js} +1 -1
  19. streamlit/static/static/js/{createDownloadLinkElement.Az9SilWU.js → createDownloadLinkElement.DZuwkCqy.js} +1 -1
  20. streamlit/static/static/js/{data-grid-overlay-editor.Blj_5PJn.js → data-grid-overlay-editor.Dw-AewlN.js} +1 -1
  21. streamlit/static/static/js/{downloader.ur6VTRo6.js → downloader.Bsx5M2Du.js} +1 -1
  22. streamlit/static/static/js/{embed.Bo5Mp3yp.js → embed.C7by6AoE.js} +1 -1
  23. streamlit/static/static/js/{es6.Q-xD3Lx8.js → es6.BpAqZaR_.js} +2 -2
  24. streamlit/static/static/js/{formatNumber._OZtRfH-.js → formatNumber.DjehVPVS.js} +1 -1
  25. streamlit/static/static/js/{iconPosition.owgMmPXc.js → iconPosition.D02OPE-d.js} +1 -1
  26. streamlit/static/static/js/{iframeResizer.contentWindow.CVCEnOeT.js → iframeResizer.contentWindow.xtstqPd7.js} +1 -1
  27. streamlit/static/static/js/{index.C5MX205D.js → index.-faJDV20.js} +1 -1
  28. streamlit/static/static/js/{index.DPa8c-h5.js → index.5H98WqjT.js} +1 -1
  29. streamlit/static/static/js/{index.BlZAOJTf.js → index.8FPw0_gD.js} +1 -1
  30. streamlit/static/static/js/{index.DA1Zwrh6.js → index.B5tD5YeV.js} +1 -1
  31. streamlit/static/static/js/{index.BTy77A4v.js → index.B8-HOwf1.js} +1 -1
  32. streamlit/static/static/js/{index.DcZ6Y6tq.js → index.B9gbSNsw.js} +1 -1
  33. streamlit/static/static/js/{index.Cpn4aUEp.js → index.BB_iwaVr.js} +5 -5
  34. streamlit/static/static/js/{index.DAjvUscA.js → index.BDlI2pRp.js} +1 -1
  35. streamlit/static/static/js/{index.BdKmWvyd.js → index.BGTMh3Uu.js} +1 -1
  36. streamlit/static/static/js/{index.X86xhkRz.js → index.BIcJe97b.js} +1 -1
  37. streamlit/static/static/js/{index.CZKvO8_W.js → index.BK9S5qug.js} +1 -1
  38. streamlit/static/static/js/{index.BBFXXyOE.js → index.BOkpEbJS.js} +1 -1
  39. streamlit/static/static/js/{index.BkFxYQoo.js → index.BV6XgCij.js} +1 -1
  40. streamlit/static/static/js/{index.DYqiNZKP.js → index.BVhVdVeE.js} +1 -1
  41. streamlit/static/static/js/{index.Bw5t0A1a.js → index.Bhy8EBYI.js} +1 -1
  42. streamlit/static/static/js/{index.CHfpPdI8.js → index.Bo1ztye0.js} +1 -1
  43. streamlit/static/static/js/{index.oieFJFkX.js → index.BqfJJr3c.js} +1 -1
  44. streamlit/static/static/js/{index.CT93Qeic.js → index.Bri1T2TS.js} +1 -1
  45. streamlit/static/static/js/{index.zR1le1Pe.js → index.BvZbnSMC.js} +1 -1
  46. streamlit/static/static/js/{index.jADyDjmJ.js → index.C5ehUqNt.js} +1 -1
  47. streamlit/static/static/js/{index.ByzGGHA-.js → index.C9v49R-a.js} +1 -1
  48. streamlit/static/static/js/{index.DkmkM-3F.js → index.CA0RmxJF.js} +1 -1
  49. streamlit/static/static/js/{index.ByHx8_go.js → index.CEwnDCn9.js} +1 -1
  50. streamlit/static/static/js/{index.2pNQcghF.js → index.CGbvkEtg.js} +1 -1
  51. streamlit/static/static/js/{index.jZuoBudL.js → index.CKUBdVQ9.js} +1 -1
  52. streamlit/static/static/js/{index.BtKtuLWl.js → index.CdRwiHPm.js} +1 -1
  53. streamlit/static/static/js/{index.DfDGWP9w.js → index.CgARjn28.js} +1 -1
  54. streamlit/static/static/js/{index.Vo6SwZW9.js → index.CyDHwK5P.js} +1 -1
  55. streamlit/static/static/js/{index.CECvn-YK.js → index.D6J2UPzF.js} +1 -1
  56. streamlit/static/static/js/{index.BZMDU-qx.js → index.D6Z9hKJY.js} +1 -1
  57. streamlit/static/static/js/{index.C-xuUZos.js → index.D9RL5sRp.js} +1 -1
  58. streamlit/static/static/js/{index.1wQkO9-P.js → index.DDu_qTm0.js} +1 -1
  59. streamlit/static/static/js/{index.D-VZVj73.js → index.DJjSqPAx.js} +1 -1
  60. streamlit/static/static/js/{index.Buip23l3.js → index.DO2T-QzF.js} +1 -1
  61. streamlit/static/static/js/{index.DiEHlHgD.js → index.DSSapl3Q.js} +1 -1
  62. streamlit/static/static/js/{index.CeCHrefy.js → index.DZv5AoR1.js} +1 -1
  63. streamlit/static/static/js/{index.Byo1IU24.js → index.D_TIyPF4.js} +1 -1
  64. streamlit/static/static/js/{index.C0X75KQC.js → index.DdxofXV8.js} +1 -1
  65. streamlit/static/static/js/{index.d4eN08zp.js → index.DgLRJfs3.js} +1 -1
  66. streamlit/static/static/js/{index.Ccjs4i9w.js → index.JL0uGAeJ.js} +1 -1
  67. streamlit/static/static/js/{index.CT8A-jH3.js → index.S-mjkUeF.js} +1 -1
  68. streamlit/static/static/js/{index.DUoWDMOZ.js → index.XFMDBL5n.js} +1 -1
  69. streamlit/static/static/js/{index.rpudgXQV.js → index.ZIA43eTF.js} +1 -1
  70. streamlit/static/static/js/{index.Z5FSW1PS.js → index.iF5zYERg.js} +1 -1
  71. streamlit/static/static/js/{index.DAddHkEE.js → index.iXzAofuY.js} +1 -1
  72. streamlit/static/static/js/index.m3dn5Bai.js +188 -0
  73. streamlit/static/static/js/{index.9GyNEnVn.js → index.m4WkwGMu.js} +1 -1
  74. streamlit/static/static/js/{index.BOH_U_Ua.js → index.x1B588Xu.js} +1 -1
  75. streamlit/static/static/js/{input.FrKOgyiF.js → input.VYKyGuhi.js} +1 -1
  76. streamlit/static/static/js/{main.DRehwjQT.js → main.u5Bb3MY7.js} +1 -1
  77. streamlit/static/static/js/{memory.B2wgPAbQ.js → memory.BOMt4yAV.js} +1 -1
  78. streamlit/static/static/js/{number-overlay-editor.CnTj7Q_W.js → number-overlay-editor.CihlAHgl.js} +1 -1
  79. streamlit/static/static/js/{pandasStylerUtils.CWancxgS.js → pandasStylerUtils.BuqSgXpk.js} +1 -1
  80. streamlit/static/static/js/{sandbox.DuleaI7G.js → sandbox.COGR4pqz.js} +1 -1
  81. streamlit/static/static/js/{styled-components.g3zaW9ch.js → styled-components.BEf3c4IJ.js} +1 -1
  82. streamlit/static/static/js/{throttle.Dta7xRnz.js → throttle.Bl-XsA9N.js} +1 -1
  83. streamlit/static/static/js/{timepicker.Bg1hWKQe.js → timepicker.B-HgBYlK.js} +1 -1
  84. streamlit/static/static/js/{toConsumableArray.C3xlVjBM.js → toConsumableArray.BrQebwtE.js} +1 -1
  85. streamlit/static/static/js/uniqueId.8R4hbkYl.js +1 -0
  86. streamlit/static/static/js/{useBasicWidgetState.CERZ06R-.js → useBasicWidgetState.8WwISl9r.js} +1 -1
  87. streamlit/static/static/js/{useIntlLocale.DTs1RN9G.js → useIntlLocale.D37LWdCR.js} +1 -1
  88. streamlit/static/static/js/{useTextInputAutoExpand.B6f9P3jg.js → useTextInputAutoExpand.Bb_KqJvq.js} +1 -1
  89. streamlit/static/static/js/{useUpdateUiValue.ByVBXV8J.js → useUpdateUiValue.D1BLS5t7.js} +1 -1
  90. streamlit/static/static/js/{useWaveformController.D6wABMbB.js → useWaveformController.Ce0-qTws.js} +1 -1
  91. streamlit/static/static/js/{withCalculatedWidth.Bd4vFDHU.js → withCalculatedWidth.BX2K3UVv.js} +1 -1
  92. streamlit/static/static/js/{withFullScreenWrapper.CDnDcnIh.js → withFullScreenWrapper.CqfGs8T2.js} +1 -1
  93. {streamlit_nightly-1.53.1.dev20260121.dist-info → streamlit_nightly-1.53.2.dev20260122.dist-info}/METADATA +1 -1
  94. {streamlit_nightly-1.53.1.dev20260121.dist-info → streamlit_nightly-1.53.2.dev20260122.dist-info}/RECORD +98 -98
  95. streamlit/static/static/js/index.hri4IXS4.js +0 -188
  96. streamlit/static/static/js/uniqueId.2p-nMqYS.js +0 -1
  97. {streamlit_nightly-1.53.1.dev20260121.data → streamlit_nightly-1.53.2.dev20260122.data}/scripts/streamlit.cmd +0 -0
  98. {streamlit_nightly-1.53.1.dev20260121.dist-info → streamlit_nightly-1.53.2.dev20260122.dist-info}/WHEEL +0 -0
  99. {streamlit_nightly-1.53.1.dev20260121.dist-info → streamlit_nightly-1.53.2.dev20260122.dist-info}/entry_points.txt +0 -0
  100. {streamlit_nightly-1.53.1.dev20260121.dist-info → streamlit_nightly-1.53.2.dev20260122.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.DkmkM-3F.js","./index.bsVAaBS1.js","./index.DPa8c-h5.js","./index.DAddHkEE.js","./index.CeCHrefy.js","./index.DiEHlHgD.js","./StreamlitSyntaxHighlighter.DF8uiu4N.js","./index.ByHx8_go.js","./pandasStylerUtils.CWancxgS.js","./moment.C7qA8nIE.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.9GyNEnVn.js","./withFullScreenWrapper.CDnDcnIh.js","./Toolbar.h597G9NG.js","./index.hri4IXS4.js","./FormClearHelper.CnDHLc6s.js","./index.8HslT92O.js","./main.DRehwjQT.js","./throttle.Dta7xRnz.js","./formatNumber._OZtRfH-.js","./sprintf.DpPCfzXw.js","./formatMoment.C6Hwn6X5.js","./checkbox.otYZO7w2.js","./createDownloadLinkElement.Az9SilWU.js","./toConsumableArray.C3xlVjBM.js","./FileDownload.esm.g3HiTWnX.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.Bo5Mp3yp.js","./threshold.CUNQbqMA.js","./value.DaKxGC7O.js","./timer.BZio6gjG.js","./TableChart.esm.Ne8F0PNs.js","./index.BTy77A4v.js","./Particles.BA0kQsJM.js","./index.C5MX205D.js","./useBasicWidgetState.CERZ06R-.js","../css/index.BuwrT-ty.css","./index.CT8A-jH3.js","./index.DcZ6Y6tq.js","./IFrameUtil.DefezniK.js","./index.DYqiNZKP.js","./index.Ccjs4i9w.js","./index.DUoWDMOZ.js","./iconPosition.owgMmPXc.js","./index.DAjvUscA.js","./WidgetLabelHelpIconInline.BMPpOfi3.js","./index.BOH_U_Ua.js","./index.BkFxYQoo.js","./index.CZKvO8_W.js","./ProgressBar.N6Nzla-b.js","./index.BZMDU-qx.js","./index.zR1le1Pe.js","./useWaveformController.D6wABMbB.js","./urls.BwSlolu9.js","./index.DA1Zwrh6.js","./index.Byo1IU24.js","./index.1wQkO9-P.js","./withCalculatedWidth.Bd4vFDHU.js","./index.rpudgXQV.js","./UploadFileInfo.Dr-zDST7.js","./index.BdKmWvyd.js","./FileHelper.DkZahZIe.js","./InputInstructions.CJwgA0Sj.js","./useTextInputAutoExpand.B6f9P3jg.js","./base-input.CTx0w60a.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.C6VdLmcj.js","./index.2pNQcghF.js","./index.jZuoBudL.js","./index.Vo6SwZW9.js","./useIntlLocale.DTs1RN9G.js","./timepicker.Bg1hWKQe.js","./input.FrKOgyiF.js","./index.CECvn-YK.js","./styled-components.g3zaW9ch.js","./index.BlZAOJTf.js","./index.Buip23l3.js","./index.D-VZVj73.js","./index.d4eN08zp.js","./index.CT93Qeic.js","./uniqueId.2p-nMqYS.js","./index.Z5FSW1PS.js","./index.BBFXXyOE.js","./index.Bw5t0A1a.js","./index.oieFJFkX.js","./useUpdateUiValue.ByVBXV8J.js","./index.C-xuUZos.js","./index.C0X75KQC.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.CA0RmxJF.js","./index.bsVAaBS1.js","./index.5H98WqjT.js","./index.iXzAofuY.js","./index.DZv5AoR1.js","./index.DSSapl3Q.js","./StreamlitSyntaxHighlighter.Btk92CPv.js","./index.CEwnDCn9.js","./pandasStylerUtils.BuqSgXpk.js","./moment.C7qA8nIE.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.m4WkwGMu.js","./withFullScreenWrapper.CqfGs8T2.js","./Toolbar.DC2Tp-qb.js","./index.m3dn5Bai.js","./FormClearHelper.CypmvhYZ.js","./index.8HslT92O.js","./main.u5Bb3MY7.js","./throttle.Bl-XsA9N.js","./toConsumableArray.BrQebwtE.js","./formatNumber.DjehVPVS.js","./sprintf.DpPCfzXw.js","./formatMoment.C6Hwn6X5.js","./checkbox.CcUx3XuQ.js","./createDownloadLinkElement.DZuwkCqy.js","./FileDownload.esm.DWVTnTHm.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.C7by6AoE.js","./threshold.CUNQbqMA.js","./value.DaKxGC7O.js","./timer.BZio6gjG.js","./TableChart.esm.DBeVaFNt.js","./index.B8-HOwf1.js","./Particles.yebG0VuV.js","./index.-faJDV20.js","./useBasicWidgetState.8WwISl9r.js","../css/index.BuwrT-ty.css","./index.S-mjkUeF.js","./index.B9gbSNsw.js","./IFrameUtil.DefezniK.js","./index.BVhVdVeE.js","./index.JL0uGAeJ.js","./index.XFMDBL5n.js","./iconPosition.D02OPE-d.js","./index.BDlI2pRp.js","./WidgetLabelHelpIconInline.3DnEd9BK.js","./index.x1B588Xu.js","./index.BV6XgCij.js","./index.BK9S5qug.js","./ProgressBar.Dy9CI6w4.js","./index.D6Z9hKJY.js","./index.BvZbnSMC.js","./useWaveformController.Ce0-qTws.js","./urls.BwSlolu9.js","./index.B5tD5YeV.js","./index.D_TIyPF4.js","./index.DDu_qTm0.js","./withCalculatedWidth.BX2K3UVv.js","./index.ZIA43eTF.js","./UploadFileInfo.Dr-zDST7.js","./index.BGTMh3Uu.js","./FileHelper.BPYQIPd1.js","./InputInstructions.Bi62hDTQ.js","./useTextInputAutoExpand.Bb_KqJvq.js","./base-input.7Sj6pVk0.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.CIFYUdwC.js","./index.CGbvkEtg.js","./index.CKUBdVQ9.js","./index.CyDHwK5P.js","./useIntlLocale.D37LWdCR.js","./timepicker.B-HgBYlK.js","./input.VYKyGuhi.js","./index.D6J2UPzF.js","./styled-components.BEf3c4IJ.js","./index.8FPw0_gD.js","./index.DO2T-QzF.js","./index.DJjSqPAx.js","./index.DgLRJfs3.js","./index.Bri1T2TS.js","./uniqueId.8R4hbkYl.js","./index.iF5zYERg.js","./index.BOkpEbJS.js","./index.Bhy8EBYI.js","./index.BqfJJr3c.js","./useUpdateUiValue.D1BLS5t7.js","./index.D9RL5sRp.js","./index.DdxofXV8.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(Ge){return Ge===null||typeof Ge!="object"?null:(Ge=M&&Ge[M]||Ge["@@iterator"],typeof Ge=="function"?Ge:null)}var Z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},be=Object.assign,ye={};function we(Ge,nt,He){this.props=Ge,this.context=nt,this.refs=ye,this.updater=He||Z}we.prototype.isReactComponent={},we.prototype.setState=function(Ge,nt){if(typeof Ge!="object"&&typeof Ge!="function"&&Ge!=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,Ge,nt,"setState")},we.prototype.forceUpdate=function(Ge){this.updater.enqueueForceUpdate(this,Ge,"forceUpdate")};function xe(){}xe.prototype=we.prototype;function Ce(Ge,nt,He){this.props=Ge,this.context=nt,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,Le=Object.prototype.hasOwnProperty,Me={current:null},Ve={key:!0,ref:!0,__self:!0,__source:!0};function Ke(Ge,nt,He){var Ot,Ct={},ut=null,pt=null;if(nt!=null)for(Ot in nt.ref!==void 0&&(pt=nt.ref),nt.key!==void 0&&(ut=""+nt.key),nt)Le.call(nt,Ot)&&!Ve.hasOwnProperty(Ot)&&(Ct[Ot]=nt[Ot]);var wt=arguments.length-2;if(wt===1)Ct.children=He;else if(1<wt){for(var Et=Array(wt),$t=0;$t<wt;$t++)Et[$t]=arguments[$t+2];Ct.children=Et}if(Ge&&Ge.defaultProps)for(Ot in wt=Ge.defaultProps,wt)Ct[Ot]===void 0&&(Ct[Ot]=wt[Ot]);return{$$typeof:n,type:Ge,key:ut,ref:pt,props:Ct,_owner:Me.current}}function ze(Ge,nt){return{$$typeof:n,type:Ge.type,key:nt,ref:Ge.ref,props:Ge.props,_owner:Ge._owner}}function je(Ge){return typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===n}function We(Ge){var nt={"=":"=0",":":"=2"};return"$"+Ge.replace(/[=:]/g,function(He){return nt[He]})}var Xe=/\/+/g;function Qe(Ge,nt){return typeof Ge=="object"&&Ge!==null&&Ge.key!=null?We(""+Ge.key):nt.toString(36)}function Ye(Ge,nt,He,Ot,Ct){var ut=typeof Ge;(ut==="undefined"||ut==="boolean")&&(Ge=null);var pt=!1;if(Ge===null)pt=!0;else switch(ut){case"string":case"number":pt=!0;break;case"object":switch(Ge.$$typeof){case n:case i:pt=!0}}if(pt)return pt=Ge,Ct=Ct(pt),Ge=Ot===""?"."+Qe(pt,0):Ot,Fe(Ct)?(He="",Ge!=null&&(He=Ge.replace(Xe,"$&/")+"/"),Ye(Ct,nt,He,"",function($t){return $t})):Ct!=null&&(je(Ct)&&(Ct=ze(Ct,He+(!Ct.key||pt&&pt.key===Ct.key?"":(""+Ct.key).replace(Xe,"$&/")+"/")+Ge)),nt.push(Ct)),1;if(pt=0,Ot=Ot===""?".":Ot+":",Fe(Ge))for(var wt=0;wt<Ge.length;wt++){ut=Ge[wt];var Et=Ot+Qe(ut,wt);pt+=Ye(ut,nt,He,Et,Ct)}else if(Et=H(Ge),typeof Et=="function")for(Ge=Et.call(Ge),wt=0;!(ut=Ge.next()).done;)ut=ut.value,Et=Ot+Qe(ut,wt++),pt+=Ye(ut,nt,He,Et,Ct);else if(ut==="object")throw nt=String(Ge),Error("Objects are not valid as a React child (found: "+(nt==="[object Object]"?"object with keys {"+Object.keys(Ge).join(", ")+"}":nt)+"). If you meant to render a collection of children, use an array instead.");return pt}function Ue(Ge,nt,He){if(Ge==null)return Ge;var Ot=[],Ct=0;return Ye(Ge,Ot,"","",function(ut){return nt.call(He,ut,Ct++)}),Ot}function it(Ge){if(Ge._status===-1){var nt=Ge._result;nt=nt(),nt.then(function(He){(Ge._status===0||Ge._status===-1)&&(Ge._status=1,Ge._result=He)},function(He){(Ge._status===0||Ge._status===-1)&&(Ge._status=2,Ge._result=He)}),Ge._status===-1&&(Ge._status=0,Ge._result=nt)}if(Ge._status===1)return Ge._result.default;throw Ge._result}var dt={current:null},lt={transition:null},ht={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:lt,ReactCurrentOwner:Me};function Be(){throw Error("act(...) is not supported in production builds of React.")}return react_production_min.Children={map:Ue,forEach:function(Ge,nt,He){Ue(Ge,function(){nt.apply(this,arguments)},He)},count:function(Ge){var nt=0;return Ue(Ge,function(){nt++}),nt},toArray:function(Ge){return Ue(Ge,function(nt){return nt})||[]},only:function(Ge){if(!je(Ge))throw Error("React.Children.only expected to receive a single React element child.");return Ge}},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=ht,react_production_min.act=Be,react_production_min.cloneElement=function(Ge,nt,He){if(Ge==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+Ge+".");var Ot=be({},Ge.props),Ct=Ge.key,ut=Ge.ref,pt=Ge._owner;if(nt!=null){if(nt.ref!==void 0&&(ut=nt.ref,pt=Me.current),nt.key!==void 0&&(Ct=""+nt.key),Ge.type&&Ge.type.defaultProps)var wt=Ge.type.defaultProps;for(Et in nt)Le.call(nt,Et)&&!Ve.hasOwnProperty(Et)&&(Ot[Et]=nt[Et]===void 0&&wt!==void 0?wt[Et]:nt[Et])}var Et=arguments.length-2;if(Et===1)Ot.children=He;else if(1<Et){wt=Array(Et);for(var $t=0;$t<Et;$t++)wt[$t]=arguments[$t+2];Ot.children=wt}return{$$typeof:n,type:Ge.type,key:Ct,ref:ut,props:Ot,_owner:pt}},react_production_min.createContext=function(Ge){return Ge={$$typeof:p,_currentValue:Ge,_currentValue2:Ge,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},Ge.Provider={$$typeof:d,_context:Ge},Ge.Consumer=Ge},react_production_min.createElement=Ke,react_production_min.createFactory=function(Ge){var nt=Ke.bind(null,Ge);return nt.type=Ge,nt},react_production_min.createRef=function(){return{current:null}},react_production_min.forwardRef=function(Ge){return{$$typeof:h,render:Ge}},react_production_min.isValidElement=je,react_production_min.lazy=function(Ge){return{$$typeof:E,_payload:{_status:-1,_result:Ge},_init:it}},react_production_min.memo=function(Ge,nt){return{$$typeof:$,type:Ge,compare:nt===void 0?null:nt}},react_production_min.startTransition=function(Ge){var nt=lt.transition;lt.transition={};try{Ge()}finally{lt.transition=nt}},react_production_min.unstable_act=Be,react_production_min.useCallback=function(Ge,nt){return dt.current.useCallback(Ge,nt)},react_production_min.useContext=function(Ge){return dt.current.useContext(Ge)},react_production_min.useDebugValue=function(){},react_production_min.useDeferredValue=function(Ge){return dt.current.useDeferredValue(Ge)},react_production_min.useEffect=function(Ge,nt){return dt.current.useEffect(Ge,nt)},react_production_min.useId=function(){return dt.current.useId()},react_production_min.useImperativeHandle=function(Ge,nt,He){return dt.current.useImperativeHandle(Ge,nt,He)},react_production_min.useInsertionEffect=function(Ge,nt){return dt.current.useInsertionEffect(Ge,nt)},react_production_min.useLayoutEffect=function(Ge,nt){return dt.current.useLayoutEffect(Ge,nt)},react_production_min.useMemo=function(Ge,nt){return dt.current.useMemo(Ge,nt)},react_production_min.useReducer=function(Ge,nt,He){return dt.current.useReducer(Ge,nt,He)},react_production_min.useRef=function(Ge){return dt.current.useRef(Ge)},react_production_min.useState=function(Ge){return dt.current.useState(Ge)},react_production_min.useSyncExternalStore=function(Ge,nt,He){return dt.current.useSyncExternalStore(Ge,nt,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,Le=d,Me=t,Ve=Ne;we;)switch(be=Ce,Ce=next()){case 40:if(be!=108&&charat(Ve,M-1)==58){indexof(Ve+=replace$1(delimit(Ce),"&","&\f"),"&\f")!=-1&&(xe=-1);break}case 34:case 39:case 91:Ve+=delimit(Ce);break;case 9:case 10:case 13:case 32:Ve+=whitespace$1(be);break;case 92:Ve+=escaping(caret()-1,7);continue;case 47:switch(peek$1()){case 42:case 47:append(comment(commenter(next(),caret()),i,e),y);break;default:Ve+="/"}break;case 123*ye:h[$++]=strlen(Ve)*xe;case 125*ye:case 59:case 0:switch(Ce){case 0:case 125:we=0;case 59+E:xe==-1&&(Ve=replace$1(Ve,/\f/g,"")),Z>0&&strlen(Ve)-M&&append(Z>32?declaration(Ve+";",t,e,M-1):declaration(replace$1(Ve," ","")+";",t,e,M-2),y);break;case 59:Ve+=";";default:if(append(Me=ruleset(Ve,i,e,$,E,o,h,Ne,Fe=[],Le=[],M),d),Ce===123)if(E===0)parse$3(Ve,i,Me,Me,Fe,d,M,h,Le);else switch(H===99&&charat(Ve,3)===110?100:H){case 100:case 108:case 109:case 115:parse$3(n,Me,Me,t&&append(ruleset(n,Me,Me,0,0,o,h,Ne,o,Fe=[],M),Le),o,Le,M,h,t?Fe:Le);break;default:parse$3(Ve,Me,Me,Me,[""],Le,0,h,Le)}}$=E=Z=0,ye=xe=1,Ne=Ve="",M=p;break;case 58:M=1+strlen(Ve),Z=be;default:if(ye<1){if(Ce==123)--ye;else if(Ce==125&&ye++==0&&prev()==125)continue}switch(Ve+=from(Ce),Ce*ye){case 38:xe=E>0?1:(Ve+="\f",-1);break;case 44:h[$++]=(strlen(Ve)-1)*xe,xe=1;break;case 64:peek$1()===45&&(Ve+=delimit(next())),H=peek$1(),E=M=strlen(Ne=Ve+=identifier(caret())),Ce++;break;case 45:be===45&&strlen(Ve)==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(Le){if(typeof Le=="object"&&Le!==null){var Me=Le.$$typeof;switch(Me){case i:switch(Le=Le.type,Le){case y:case $:case t:case d:case o:case M:return Le;default:switch(Le=Le&&Le.$$typeof,Le){case h:case E:case be:case Z:case p:return Le;default:return Me}}case e:return Me}}}function Fe(Le){return Ne(Le)===$}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(Le){return Fe(Le)||Ne(Le)===y},reactIs_production_min$1.isConcurrentMode=Fe,reactIs_production_min$1.isContextConsumer=function(Le){return Ne(Le)===h},reactIs_production_min$1.isContextProvider=function(Le){return Ne(Le)===p},reactIs_production_min$1.isElement=function(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===i},reactIs_production_min$1.isForwardRef=function(Le){return Ne(Le)===E},reactIs_production_min$1.isFragment=function(Le){return Ne(Le)===t},reactIs_production_min$1.isLazy=function(Le){return Ne(Le)===be},reactIs_production_min$1.isMemo=function(Le){return Ne(Le)===Z},reactIs_production_min$1.isPortal=function(Le){return Ne(Le)===e},reactIs_production_min$1.isProfiler=function(Le){return Ne(Le)===d},reactIs_production_min$1.isStrictMode=function(Le){return Ne(Le)===o},reactIs_production_min$1.isSuspense=function(Le){return Ne(Le)===M},reactIs_production_min$1.isValidElementType=function(Le){return typeof Le=="string"||typeof Le=="function"||Le===t||Le===$||Le===d||Le===o||Le===M||Le===H||typeof Le=="object"&&Le!==null&&(Le.$$typeof===be||Le.$$typeof===Z||Le.$$typeof===p||Le.$$typeof===h||Le.$$typeof===E||Le.$$typeof===we||Le.$$typeof===xe||Le.$$typeof===Ce||Le.$$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),Le=0;Le<Ce.length;++Le){var Me=Ce[Le];if(!e[Me]&&!(we&&we[Me])&&!(Fe&&Fe[Me])&&!(Ne&&Ne[Me])){var Ve=E(ye,Me);try{h(be,Me,Ve)}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,Le="loglevel";typeof ye=="string"?Le+=":"+ye:typeof ye=="symbol"&&(Le=void 0);function Me(We){var Xe=(o[We]||"silent").toUpperCase();if(!(typeof window===e||!Le)){try{window.localStorage[Le]=Xe;return}catch{}try{window.document.cookie=encodeURIComponent(Le)+"="+Xe+";"}catch{}}}function Ve(){var We;if(!(typeof window===e||!Le)){try{We=window.localStorage[Le]}catch{}if(typeof We===e)try{var Xe=window.document.cookie,Qe=encodeURIComponent(Le),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||!Le)){try{window.localStorage.removeItem(Le)}catch{}try{window.document.cookie=encodeURIComponent(Le)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function ze(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=ze(We),Xe!==!1&&Me(Fe),E.call(xe)},xe.setDefaultLevel=function(We){Ne=ze(We),Ve()||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=ze(p.getLevel())),E.call(xe),p===xe)for(var We in d)d[We].rebuild()},Ce=ze(p?p.getLevel():"WARN");var je=Ve();je!=null&&(Fe=ze(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(lt,ht){var Be=lt.length;lt.push(ht);e:for(;0<Be;){var Ge=Be-1>>>1,nt=lt[Ge];if(0<o(nt,ht))lt[Ge]=ht,lt[Be]=nt,Be=Ge;else break e}}function e(lt){return lt.length===0?null:lt[0]}function t(lt){if(lt.length===0)return null;var ht=lt[0],Be=lt.pop();if(Be!==ht){lt[0]=Be;e:for(var Ge=0,nt=lt.length,He=nt>>>1;Ge<He;){var Ot=2*(Ge+1)-1,Ct=lt[Ot],ut=Ot+1,pt=lt[ut];if(0>o(Ct,Be))ut<nt&&0>o(pt,Ct)?(lt[Ge]=pt,lt[ut]=Be,Ge=ut):(lt[Ge]=Ct,lt[Ot]=Be,Ge=Ot);else if(ut<nt&&0>o(pt,Be))lt[Ge]=pt,lt[ut]=Be,Ge=ut;else break e}}return ht}function o(lt,ht){var Be=lt.sortIndex-ht.sortIndex;return Be!==0?Be:lt.id-ht.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(lt){for(var ht=e($);ht!==null;){if(ht.callback===null)t($);else if(ht.startTime<=lt)t($),ht.sortIndex=ht.expirationTime,i(y,ht);else break;ht=e($)}}function Fe(lt){if(ye=!1,Ne(lt),!be)if(e(y)!==null)be=!0,it(Le);else{var ht=e($);ht!==null&&dt(Fe,ht.startTime-lt)}}function Le(lt,ht){be=!1,ye&&(ye=!1,xe(Ke),Ke=-1),Z=!0;var Be=H;try{for(Ne(ht),M=e(y);M!==null&&(!(M.expirationTime>ht)||lt&&!We());){var Ge=M.callback;if(typeof Ge=="function"){M.callback=null,H=M.priorityLevel;var nt=Ge(M.expirationTime<=ht);ht=n.unstable_now(),typeof nt=="function"?M.callback=nt:M===e(y)&&t(y),Ne(ht)}else t(y);M=e(y)}if(M!==null)var He=!0;else{var Ot=e($);Ot!==null&&dt(Fe,Ot.startTime-ht),He=!1}return He}finally{M=null,H=Be,Z=!1}}var Me=!1,Ve=null,Ke=-1,ze=5,je=-1;function We(){return!(n.unstable_now()-je<ze)}function Xe(){if(Ve!==null){var lt=n.unstable_now();je=lt;var ht=!0;try{ht=Ve(!0,lt)}finally{ht?Qe():(Me=!1,Ve=null)}}else Me=!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 it(lt){Ve=lt,Me||(Me=!0,Qe())}function dt(lt,ht){Ke=we(function(){lt(n.unstable_now())},ht)}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(lt){lt.callback=null},n.unstable_continueExecution=function(){be||Z||(be=!0,it(Le))},n.unstable_forceFrameRate=function(lt){0>lt||125<lt?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ze=0<lt?Math.floor(1e3/lt):5},n.unstable_getCurrentPriorityLevel=function(){return H},n.unstable_getFirstCallbackNode=function(){return e(y)},n.unstable_next=function(lt){switch(H){case 1:case 2:case 3:var ht=3;break;default:ht=H}var Be=H;H=ht;try{return lt()}finally{H=Be}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(lt,ht){switch(lt){case 1:case 2:case 3:case 4:case 5:break;default:lt=3}var Be=H;H=lt;try{return ht()}finally{H=Be}},n.unstable_scheduleCallback=function(lt,ht,Be){var Ge=n.unstable_now();switch(typeof Be=="object"&&Be!==null?(Be=Be.delay,Be=typeof Be=="number"&&0<Be?Ge+Be:Ge):Be=Ge,lt){case 1:var nt=-1;break;case 2:nt=250;break;case 5:nt=1073741823;break;case 4:nt=1e4;break;default:nt=5e3}return nt=Be+nt,lt={id:E++,callback:ht,priorityLevel:lt,startTime:Be,expirationTime:nt,sortIndex:-1},Be>Ge?(lt.sortIndex=Be,i($,lt),e(y)===null&&lt===e($)&&(ye?(xe(Ke),Ke=-1):ye=!0,dt(Fe,Be-Ge))):(lt.sortIndex=nt,i(y,lt),be||Z||(be=!0,it(Le))),lt},n.unstable_shouldYield=We,n.unstable_wrapCallback=function(lt){var ht=H;return function(){var Be=H;H=ht;try{return lt.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,Le=Symbol.for("react.element"),Me=Symbol.for("react.portal"),Ve=Symbol.for("react.fragment"),Ke=Symbol.for("react.strict_mode"),ze=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"),it=Symbol.for("react.lazy"),dt=Symbol.for("react.offscreen"),lt=Symbol.iterator;function ht(g){return g===null||typeof g!="object"?null:(g=lt&&g[lt]||g["@@iterator"],typeof g=="function"?g:null)}var Be=Object.assign,Ge;function nt(g){if(Ge===void 0)try{throw Error()}catch(X){var k=X.stack.trim().match(/\n( *(at )?)/);Ge=k&&k[1]||""}return`
3
3
  `+Ge+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(ot){var ve=ot}Reflect.construct(g,[],k)}else{try{k.call()}catch(ot){ve=ot}g.call(k.prototype)}else{try{throw Error()}catch(ot){ve=ot}g()}}catch(ot){if(ot&&ve&&typeof ot.stack=="string"){for(var $e=ot.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 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){if(this.deltaPath.length===0)return this.nodeToSet.replaceTransientNodeWithSelf(i);if(i.anchor){const e=i.anchor.accept(this);return new TransientNode(i.scriptRunId,e,i.transientNodes,i.deltaMsgReceivedAt)}throw new Error("TransientNode has no anchor to set node at")}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
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.nodeToSet.scriptRunId,i,this.nodeToSet.transientNodes,this.nodeToSet.deltaMsgReceivedAt):this.nodeToSet}visitTransientNode(i){if(this.deltaPath.length===0)return this.nodeToSet.replaceTransientNodeWithSelf(i);if(i.anchor){const e=i.anchor.accept(this);return new TransientNode(i.scriptRunId,e,i.transientNodes,i.deltaMsgReceivedAt)}throw new Error("TransientNode has no anchor to set node at")}visitBlockNode(i){if(this.deltaPath.length===0)return this.nodeToSet instanceof TransientNode&&!this.nodeToSet.anchor?new TransientNode(this.nodeToSet.scriptRunId,i,this.nodeToSet.transientNodes,this.nodeToSet.deltaMsgReceivedAt):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=(Le,Me)=>Me===3?Le:Le/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$3={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$3.black,primaryB:colors$3.white,primary:colors$3.black,primary50:colors$3.gray50,primary100:colors$3.gray100,primary200:colors$3.gray200,primary300:colors$3.gray300,primary400:colors$3.gray400,primary500:colors$3.gray500,primary600:colors$3.gray600,primary700:colors$3.gray700,accent:colors$3.blue400,accent50:colors$3.blue50,accent100:colors$3.blue100,accent200:colors$3.blue200,accent300:colors$3.blue300,accent400:colors$3.blue400,accent500:colors$3.blue500,accent600:colors$3.blue600,accent700:colors$3.blue700,negative:colors$3.red400,negative50:colors$3.red50,negative100:colors$3.red100,negative200:colors$3.red200,negative300:colors$3.red300,negative400:colors$3.red400,negative500:colors$3.red500,negative600:colors$3.red600,negative700:colors$3.red700,warning:colors$3.yellow400,warning50:colors$3.yellow50,warning100:colors$3.yellow100,warning200:colors$3.yellow200,warning300:colors$3.yellow300,warning400:colors$3.yellow400,warning500:colors$3.yellow500,warning600:colors$3.yellow600,warning700:colors$3.yellow700,positive:colors$3.green500,positive50:colors$3.green50,positive100:colors$3.green100,positive200:colors$3.green200,positive300:colors$3.green300,positive400:colors$3.green400,positive500:colors$3.green500,positive600:colors$3.green600,positive700:colors$3.green700,white:colors$3.white,black:colors$3.black,mono100:colors$3.white,mono200:colors$3.gray50,mono300:colors$3.gray100,mono400:colors$3.gray200,mono500:colors$3.gray300,mono600:colors$3.gray400,mono700:colors$3.gray500,mono800:colors$3.gray600,mono900:colors$3.gray700,mono1000:colors$3.black,ratingInactiveFill:colors$3.gray100,ratingStroke:colors$3.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$3.gray50,backgroundTertiary:colors$3.gray100,backgroundInversePrimary:n.primaryA,backgroundInverseSecondary:colors$3.gray800,contentPrimary:n.primaryA,contentSecondary:colors$3.gray600,contentTertiary:colors$3.gray500,contentInversePrimary:n.primaryB,contentInverseSecondary:colors$3.gray300,contentInverseTertiary:colors$3.gray400,borderOpaque:colors$3.gray200,borderTransparent:hexToRgb(n.primaryA,"0.08"),borderSelected:n.primaryA,borderInverseOpaque:colors$3.gray700,borderInverseTransparent:hexToRgb(n.primaryB,"0.2"),borderInverseSelected:n.primaryB},e={backgroundStateDisabled:colors$3.gray50,backgroundOverlayDark:hexToRgb(colors$3.black,"0.3"),backgroundOverlayLight:hexToRgb(colors$3.black,"0.08"),backgroundOverlayArt:hexToRgb(colors$3.black,"0.00"),backgroundAccent:n.accent,backgroundNegative:n.negative,backgroundWarning:n.warning,backgroundPositive:colors$3.green400,backgroundLightAccent:colors$3.blue50,backgroundLightNegative:colors$3.red50,backgroundLightWarning:colors$3.yellow50,backgroundLightPositive:colors$3.green50,backgroundAlwaysDark:colors$3.black,backgroundAlwaysLight:colors$3.white,contentStateDisabled:colors$3.gray400,contentAccent:n.accent,contentOnColor:colors$3.white,contentOnColorInverse:colors$3.black,contentNegative:n.negative,contentWarning:colors$3.yellow600,contentPositive:colors$3.green400,borderStateDisabled:colors$3.gray50,borderAccent:colors$3.blue400,borderAccentLight:colors$3.blue200,borderNegative:colors$3.red200,borderWarning:colors$3.yellow200,borderPositive:colors$3.green200,safety:colors$3.blue400,eatsGreen400:colors$3.green400,freightBlue400:colors$3.cobalt400,jumpRed400:colors$3.red400,rewardsTier1:colors$3.blue400,rewardsTier2:colors$3.yellow400,rewardsTier3:colors$3.platinum400,rewardsTier4:colors$3.black,membership:colors$3.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$3.gray200,primaryB:colors$3.gray900,primary:colors$3.white,primary50:colors$3.gray50,primary100:colors$3.gray100,primary200:colors$3.gray200,primary300:colors$3.gray300,primary400:colors$3.gray400,primary500:colors$3.gray500,primary600:colors$3.gray600,primary700:colors$3.gray700,accent:colors$3.blue400,accent50:colors$3.blue50,accent100:colors$3.blue100,accent200:colors$3.blue200,accent300:colors$3.blue300,accent400:colors$3.blue400,accent500:colors$3.blue500,accent600:colors$3.blue600,accent700:colors$3.blue700,negative:colors$3.red500,negative50:colors$3.red50,negative100:colors$3.red100,negative200:colors$3.red200,negative300:colors$3.red300,negative400:colors$3.red400,negative500:colors$3.red500,negative600:colors$3.red600,negative700:colors$3.red700,warning:colors$3.yellow500,warning50:colors$3.yellow50,warning100:colors$3.yellow100,warning200:colors$3.yellow200,warning300:colors$3.yellow300,warning400:colors$3.yellow400,warning500:colors$3.yellow500,warning600:colors$3.yellow600,warning700:colors$3.yellow700,positive:colors$3.green400,positive50:colors$3.green50,positive100:colors$3.green100,positive200:colors$3.green200,positive300:colors$3.green300,positive400:colors$3.green400,positive500:colors$3.green500,positive600:colors$3.green600,positive700:colors$3.green700,white:colors$3.white,black:colors$3.black,mono100:colors$3.gray300,mono200:colors$3.gray400,mono300:colors$3.gray500,mono400:colors$3.gray600,mono500:colors$3.gray700,mono600:"#292929",mono700:"#1F1F1F",mono800:"#141414",mono900:"#111111",mono1000:colors$3.black,ratingInactiveFill:colors$3.gray500,ratingStroke:colors$3.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:n.shadows.focusRing,borderRadius:n.radii.default},"&:focus:not(:focus-visible)":{boxShadow:n.shadows.none},"&:focus-visible":{boxShadow:n.shadows.focusRing,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:"e1t8ru6f0"})(({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:"e1t8ru6f1"})(({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:n.sizes.defaultStrokeWidth},"&:hover svg":{stroke:n.colors.bodyText},"&:focus-visible":{opacity:1,pointerEvents:"auto"}})),StyledHeadingWithActionElements=styled("div",{target:"e1t8ru6f2"})(({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:"e1t8ru6f3"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"e1t8ru6f4"})(({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:"e1t8ru6f5"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"e1t8ru6f6"})({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.DkmkM-3F.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.DAddHkEE.js"),__vite__mapDeps([3,1,2]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.CeCHrefy.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.DF8uiu4N.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 Le=i||createAnchorFromText(Fe.textContent);$(Le);const Me=window.location.hash.slice(1);Me&&Me===Le&&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:n.shadows.focusRing,borderRadius:n.radii.default},"&:focus:not(:focus-visible)":{boxShadow:n.shadows.none},"&:focus-visible":{boxShadow:n.shadows.focusRing,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:"e1t8ru6f0"})(({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:"e1t8ru6f1"})(({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:n.sizes.defaultStrokeWidth},"&:hover svg":{stroke:n.colors.bodyText},"&:focus-visible":{opacity:1,pointerEvents:"auto"}})),StyledHeadingWithActionElements=styled("div",{target:"e1t8ru6f2"})(({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:"e1t8ru6f3"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"e1t8ru6f4"})(({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:"e1t8ru6f5"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"e1t8ru6f6"})({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.CA0RmxJF.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.iXzAofuY.js"),__vite__mapDeps([3,1,2]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.DZv5AoR1.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.Btk92CPv.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 Le=i||createAnchorFromText(Fe.textContent);$(Le);const Me=window.location.hash.slice(1);Me&&Me===Le&&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.ByHx8_go.js"),__vite__mapDeps([7,8,9,10,11]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.9GyNEnVn.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.ByzGGHA-.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.BTy77A4v.js"),__vite__mapDeps([34,35]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.C5MX205D.js"),__vite__mapDeps([36,25,13,14,17,37,16,30,31,38]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.CT8A-jH3.js"),__vite__mapDeps([39,32,31,13,14]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.jADyDjmJ.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.DcZ6Y6tq.js"),__vite__mapDeps([40,41]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.DYqiNZKP.js"),__vite__mapDeps([42,13,14]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.Ccjs4i9w.js"),__vite__mapDeps([43,17,18]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.DUoWDMOZ.js"),__vite__mapDeps([44,45]),import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.DAjvUscA.js"),__vite__mapDeps([46,29,30,31,32,47,20,10,21]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.BOH_U_Ua.js"),__vite__mapDeps([48,45]),import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.BkFxYQoo.js"),__vite__mapDeps([49,13,16]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.CZKvO8_W.js"),__vite__mapDeps([50,51]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.BZMDU-qx.js"),__vite__mapDeps([52,35]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.DfDGWP9w.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.DF8uiu4N.js"),__vite__mapDeps([6,2]),import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.BtKtuLWl.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.CHfpPdI8.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.zR1le1Pe.js"),__vite__mapDeps([53,54,14,16,24,55,26]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.hri4IXS4.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.DA1Zwrh6.js"),__vite__mapDeps([56,45]),import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.Byo1IU24.js"),__vite__mapDeps([57,47,37,16]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.1wQkO9-P.js"),__vite__mapDeps([58,59,55,41]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.rpudgXQV.js"),__vite__mapDeps([60,61,16,51,55]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BdKmWvyd.js"),__vite__mapDeps([62,63,61,54,64,65,66,67,33,68]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.2pNQcghF.js"),__vite__mapDeps([69,47,37,16,23]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.jZuoBudL.js"),__vite__mapDeps([70,37,16,19,47]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Vo6SwZW9.js"),__vite__mapDeps([71,9,37,16,72,73,74,66,68]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CECvn-YK.js"),__vite__mapDeps([75,9,72,73,74,66,37,16,76,68]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.BlZAOJTf.js"),__vite__mapDeps([77,45,24]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.Buip23l3.js"),__vite__mapDeps([78,16,63,61,51]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.D-VZVj73.js"),__vite__mapDeps([79,45,16]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.d4eN08zp.js"),__vite__mapDeps([80,37,16,27,11]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CT93Qeic.js"),__vite__mapDeps([81,64,37,16,21,82,74,66]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.Z5FSW1PS.js"),__vite__mapDeps([83,47,37,16]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.BBFXXyOE.js"),__vite__mapDeps([84,37,16]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bw5t0A1a.js"),__vite__mapDeps([85,9,59,37,16,22,20,10,21]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.oieFJFkX.js"),__vite__mapDeps([86,64,37,16,87,67,65,66,82]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.C-xuUZos.js"),__vite__mapDeps([88,64,37,16,87,67,82,74,66]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.C0X75KQC.js"),__vite__mapDeps([89,37,16,76,73]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.X86xhkRz.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.DiEHlHgD.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.CEwnDCn9.js"),__vite__mapDeps([7,8,9,10,11]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.m4WkwGMu.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.C9v49R-a.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.B8-HOwf1.js"),__vite__mapDeps([34,35]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.-faJDV20.js"),__vite__mapDeps([36,20,13,14,17,37,16,30,31,38]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.S-mjkUeF.js"),__vite__mapDeps([39,32,31,13,14]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.C5ehUqNt.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.B9gbSNsw.js"),__vite__mapDeps([40,41]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.BVhVdVeE.js"),__vite__mapDeps([42,13,14]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.JL0uGAeJ.js"),__vite__mapDeps([43,17,18]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.XFMDBL5n.js"),__vite__mapDeps([44,45]),import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.BDlI2pRp.js"),__vite__mapDeps([46,29,30,31,32,47,21,10,22]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.x1B588Xu.js"),__vite__mapDeps([48,45]),import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.BV6XgCij.js"),__vite__mapDeps([49,13,16]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.BK9S5qug.js"),__vite__mapDeps([50,51]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.D6Z9hKJY.js"),__vite__mapDeps([52,35]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.CgARjn28.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.Btk92CPv.js"),__vite__mapDeps([6,2]),import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.CdRwiHPm.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bo1ztye0.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BvZbnSMC.js"),__vite__mapDeps([53,54,14,16,25,55,26]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.m3dn5Bai.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.B5tD5YeV.js"),__vite__mapDeps([56,45]),import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.D_TIyPF4.js"),__vite__mapDeps([57,47,37,16]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.DDu_qTm0.js"),__vite__mapDeps([58,59,55,41]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.ZIA43eTF.js"),__vite__mapDeps([60,61,16,51,55]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BGTMh3Uu.js"),__vite__mapDeps([62,63,61,54,64,65,66,67,33,68]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.CGbvkEtg.js"),__vite__mapDeps([69,47,37,16,24]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.CKUBdVQ9.js"),__vite__mapDeps([70,37,16,19,47]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CyDHwK5P.js"),__vite__mapDeps([71,9,37,16,72,73,74,66,68]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.D6J2UPzF.js"),__vite__mapDeps([75,9,72,73,74,66,37,16,76,68]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.8FPw0_gD.js"),__vite__mapDeps([77,45,25]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.DO2T-QzF.js"),__vite__mapDeps([78,16,63,61,51]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.DJjSqPAx.js"),__vite__mapDeps([79,45,16]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.DgLRJfs3.js"),__vite__mapDeps([80,37,16,27,11]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bri1T2TS.js"),__vite__mapDeps([81,64,37,16,22,82,74,66]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.iF5zYERg.js"),__vite__mapDeps([83,47,37,16]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.BOkpEbJS.js"),__vite__mapDeps([84,37,16]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bhy8EBYI.js"),__vite__mapDeps([85,9,59,37,16,23,21,10,22]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.BqfJJr3c.js"),__vite__mapDeps([86,64,37,16,87,67,65,66,82]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.D9RL5sRp.js"),__vite__mapDeps([88,64,37,16,87,67,82,74,66]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DdxofXV8.js"),__vite__mapDeps([89,37,16,76,73]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.BIcJe97b.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.DSSapl3Q.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,Le)=>{ye(Me=>({...Me,[Fe]:Le}))},[]);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 Le;Fe&&(Le=E.find(Me=>Me.name.startsWith("Custom Theme")?Me.displayName===Fe:Me.name===Fe)),Le===void 0&&(Le=E[0]),h.enqueue("menuClick",{label:"changeTheme"}),M(Le)},[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 Le=await Fe.stop();E(Le),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(Le=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Le}`))},[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(Le=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Le}`))},[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.53.0"};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&&showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),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.CVCEnOeT.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 d=getPreferredTheme(o);if(d)this.setAndSendTheme(d);else if(o.length>1){const p=o.findIndex(h=>h.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(o[p])}else this.setAndSendTheme(o[0])}else if(this.props.theme.addThemes([]),t){const d=getPreferredTheme([lightTheme,darkTheme]);d?this.setAndSendTheme(d):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:Le,appPages:Me,navSections:Ve,navigationPosition:Ke,scriptChangedOnDisk:ze}=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(),it=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:d,initialSidebarWidth:this.state.initialSidebarWidth,pageLinkBaseUrl:we,currentPageScriptHash:be,onPageChange:this.onPageChange,navSections:Ve,appPages:Me,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:it,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Le||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:ze}),!M&&jsx$1(ToolbarActions,{hostToolbarItems:Ne,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!ze&&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})},getSystemCustomTheme=n=>n.find(i=>i.name===(getSystemThemePreference()==="dark"?CUSTOM_THEME_DARK_NAME:CUSTOM_THEME_LIGHT_NAME)),createAutoCustomTheme=n=>({...n,name:CUSTOM_THEME_AUTO_NAME,displayName:AUTO_THEME_NAME});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]]),$=reactExports.useRef(h);reactExports.useEffect(()=>{$.current=h},[h]);const E=reactExports.useCallback((we,xe={})=>{const{keepPresetThemes:Ce=!0}=xe,Ne=[...Ce?createPresetThemes():[],...we];$.current=Ne,y(Ne)},[]),M=reactExports.useCallback((we,xe={})=>{const{persist:Ce=!0}=xe;e(Ne=>we!==Ne?(Ce&&setCachedThemeSelection(we),we):Ne)},[]),H=reactExports.useCallback(we=>{if(we.name===AUTO_THEME_NAME){M(getHostSpecifiedTheme());return}if(we.name===CUSTOM_THEME_AUTO_NAME){const xe=getSystemCustomTheme($.current);if(xe){M(createAutoCustomTheme(xe));return}}M(we)},[M]),Z=reactExports.useCallback(()=>{const we=getHostSpecifiedTheme();i.name===AUTO_THEME_NAME&&M(we,{persist:!1});const xe=h.filter(Ne=>Ne.name!==AUTO_THEME_NAME),Ce=xe.some(Ne=>Ne.name===CUSTOM_THEME_AUTO_NAME);if(Ce&&i.name===CUSTOM_THEME_AUTO_NAME){const Ne=getSystemCustomTheme(xe);Ne&&M(createAutoCustomTheme(Ne),{persist:!1})}y(Ce?xe:[createAutoTheme(),...xe])},[i.name,h,M]),be=reactExports.useCallback(we=>{we.fontFaces&&o(we.fontFaces);const xe=[...we.fontSources||[],...we.sidebar?.fontSources||[]],Ce={};xe.forEach(Ne=>{Ne.sourceUrl&&Ne.configName&&(Ce[Ne.configName]=Ne.sourceUrl)}),p(Object.keys(Ce).length>0?Ce:null)},[]),ye=reactExports.useCallback(we=>{be(we);const xe=new CustomThemeConfig(we),Ce=createTheme(CUSTOM_THEME_NAME,xe);H(Ce)},[be,H]);return reactExports.useEffect(()=>{const we=window.matchMedia("(prefers-color-scheme: dark)");return we.addEventListener("change",Z),window.addEventListener("afterprint",Z),()=>{window.removeEventListener("afterprint",Z),we.removeEventListener("change",Z)}},[Z]),[{setTheme:H,activeTheme:i,addThemes:E,availableThemes:h,setFonts:be,setImportedTheme:ye},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{Fragment as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,StyledDropdownListItem as F,isPropValid as G,DownloadContext as H,StyledErrorMessage as I,toString$2 as J,findAndReplace as K,LibConfigContext as L,Arrow$2 as M,range as N,isNumericType as O,Placement as P,DataFrameCellType as Q,useCrossOriginAttribute as R,StreamlitConfig as S,TooltipIcon as T,UISelectbox as U,loglevelExports as V,useRequiredContext as W,NavigationContext as X,DynamicIcon as Y,toaster as Z,_extends$A as _,BaseButtonTooltip as a,transparentize as a$,Kind as a0,AlertElement$1 as a1,Video$1 as a2,keyframes as a3,StyledWidgetInstructions as a4,isFromMac as a5,FormsContext as a6,StyledFormSubmitContent as a7,Form$1 as a8,isInForm as a9,LabelVisibilityOptions as aA,React as aB,find as aC,parse$1 as aD,parse$2 as aE,normalize$1 as aF,html$2 as aG,svg as aH,useCopyToClipboard as aI,ACCESSIBILITY_TYPE as aJ,Popover$2 as aK,ensureError as aL,ErrorElement as aM,hexToRgb as aN,withWrapper as aO,__vitePreload as aP,blend as aQ,SetCache as aR,cacheHas as aS,baseRest as aT,isArrayLikeObject as aU,useSelectCommon as aV,StyledValueContainer as aW,Select as aX,VirtualDropdown as aY,TYPE as aZ,Metric$1 as a_,convertRemToPx as aa,WidgetLabelHelpIcon as ab,WidgetLabel as ac,isMaterialIcon as ad,getBorderColor as ae,TextInput$1 as af,getDefaultExportFromCjs as ag,darken as ah,PortalContext as ai,reactDomExports as aj,classNames as ak,requireReact as al,styled$1 as am,isFocusVisible as an,getOverride as ao,getOverrideProps as ap,root$4 as aq,toNumber as ar,isObject$1 as as,mergeOverrides as at,CUSTOM_INPUT_TYPE as au,ChevronDown$1 as av,PLACEMENT$1 as aw,Icon$2 as ax,Tooltip$1 as ay,IsSidebarContext as az,BaseButton as b,util_math_ as b$,StyledWidgetLabel as b0,Global as b1,getCrossOriginAttribute as b2,_arrayLikeToArray as b3,_unsupportedIterableToArray as b4,ViewStateContext as b5,useWindowDimensionsContext as b6,LocaleContext as b7,shouldWidthStretch as b8,ButtonGroup$1 as b9,__awaiter as bA,PropTypes as bB,isFromWindows as bC,requirePropTypes as bD,merge$1 as bE,getIncreasingGreen as bF,getDecreasingRed as bG,getBlue80 as bH,getGray30 as bI,getGray70 as bJ,getGray90 as bK,keysToSnakeCase as bL,PlotlyChart$1 as bM,themeColors as bN,isMobile as bO,UploadedFileInfo as bP,FileUploaderState as bQ,ThemeContext$1 as bR,pick$1 as bS,Slider$1 as bT,zip as bU,baseSlice as bV,baseToString as bW,trimmedEndIndex as bX,util_bn_ as bY,util_int_ as bZ,util_bit_ as b_,LabelVisibilityMessage as ba,StyledButtonGroup as bb,NumberInput$1 as bc,isDatetimeType as bd,isDateType as be,getTimezone as bf,debounce$2 as bg,isEqual$1 as bh,shouldHeightStretch as bi,useStyletron as bj,mergeOverride as bk,toObjectOverride as bl,Icon$1 as bm,DeleteAlt$1 as bn,forkBlur as bo,forkFocus as bp,addCssUnit as bq,convert as br,visitParents as bs,SKIP as bt,toExportedTheme as bu,ArrowDataframe as bv,useTimeout as bw,Skeleton$1 as bx,Skeleton as by,ComponentRegistry as bz,BaseButtonSize as c,mergeWith as c$,util_buffer_ as c0,util_vector_ as c1,util_pretty_ as c2,util_interval_ as c3,compareTypes as c4,compareFields as c5,compareSchemas as c6,getAugmentedNamespace as c7,isStringType as c8,isTimeType as c9,stringify as cA,pointStart as cB,visit as cC,pointEnd as cD,structuredClone$1 as cE,identity as cF,arrayEach as cG,baseEach as cH,isArray$1 as cI,arrayMap as cJ,baseMap as cK,baseIteratee as cL,baseForOwn as cM,isObjectLike as cN,baseGetTag as cO,isPlainObject$3 as cP,cloneDeep$1 as cQ,useExecuteWhenChanged as cR,StatefulPopover as cS,_typeof$e as cT,_inherits as cU,_createSuper as cV,_classCallCheck as cW,_defineProperty$s as cX,_assertThisInitialized as cY,_createClass as cZ,filterOptions as c_,isPeriodType as ca,isIntervalType as cb,isDurationType as cc,isDecimalType as cd,isFloatType as ce,isObjectType as cf,isListType as cg,TimeUnit as ch,Struct as ci,ThemeProvider$1 as cj,createThemedStyled as ck,createThemedUseStyletron as cl,createThemedWithStyle as cm,expandBorderStyles as cn,withStyle as co,requireReactIs$1 as cp,tableFromIPC as cq,assertNever as cr,v4 as cs,AcceptFileValue as ct,chatInputAcceptFileProtoValueToEnum as cu,requireReactDom as cv,UIDConsumer as cw,StatefulMenu as cx,ok as cy,stringify$1 as cz,Box as d,parseEntities as d0,StyledPre as d1,CopyButton$1 as d2,StyledCopyButtonContainer as d3,StyledCodeBlock as d4,propTypesExports as d5,_slicedToArray as d6,index as d7,_getPrototypeOf as d8,_possibleConstructorReturn as d9,isRangeIndexType as dA,isEmptyType as dB,isBytesType as dC,isCategoricalType as dD,fontSizes as dE,_objectWithoutProperties$1 as dF,_objectSpread2 as dG,jsx as dH,css as dI,lighten as dJ,mix$1 as dK,TRIGGER_TYPE as dL,StyledTooltipContentWrapper as dM,FlexContext as dN,useScrollbarGutterSize as dO,Resizable as dP,parseToRgba as da,DeckGlJsonChart$1 as db,hasPath as dc,isArrayLike as dd,isBuffer as de,isTypedArray as df,isArguments as dg,getTag as dh,isPrototype as di,baseKeys as dj,Set$1 as dk,setToArray as dl,requireClassnames as dm,groupBy as dn,flatten as dp,Vector as dq,getLuminance as dr,parseIconPackEntry as ds,genericFonts as dt,getMarkdownBgColors as du,isUnsignedIntegerType as dv,isIntegerType as dw,isBooleanType as dx,Field as dy,Null 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,StyledCheckbox$1 as v,getOverrides as w,SIZE$1 as x,ENHANCER_POSITION as y,styled 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 Le=await Fe.stop();E(Le),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(Le=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Le}`))},[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(Le=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Le}`))},[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.53.1"};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&&showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),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.xtstqPd7.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 d=getPreferredTheme(o);if(d)this.setAndSendTheme(d);else if(o.length>1){const p=o.findIndex(h=>h.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(o[p])}else this.setAndSendTheme(o[0])}else if(this.props.theme.addThemes([]),t){const d=getPreferredTheme([lightTheme,darkTheme]);d?this.setAndSendTheme(d):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:Le,appPages:Me,navSections:Ve,navigationPosition:Ke,scriptChangedOnDisk:ze}=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(),it=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:d,initialSidebarWidth:this.state.initialSidebarWidth,pageLinkBaseUrl:we,currentPageScriptHash:be,onPageChange:this.onPageChange,navSections:Ve,appPages:Me,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:it,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Le||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:ze}),!M&&jsx$1(ToolbarActions,{hostToolbarItems:Ne,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!ze&&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})},getSystemCustomTheme=n=>n.find(i=>i.name===(getSystemThemePreference()==="dark"?CUSTOM_THEME_DARK_NAME:CUSTOM_THEME_LIGHT_NAME)),createAutoCustomTheme=n=>({...n,name:CUSTOM_THEME_AUTO_NAME,displayName:AUTO_THEME_NAME});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]]),$=reactExports.useRef(h);reactExports.useEffect(()=>{$.current=h},[h]);const E=reactExports.useCallback((we,xe={})=>{const{keepPresetThemes:Ce=!0}=xe,Ne=[...Ce?createPresetThemes():[],...we];$.current=Ne,y(Ne)},[]),M=reactExports.useCallback((we,xe={})=>{const{persist:Ce=!0}=xe;e(Ne=>we!==Ne?(Ce&&setCachedThemeSelection(we),we):Ne)},[]),H=reactExports.useCallback(we=>{if(we.name===AUTO_THEME_NAME){M(getHostSpecifiedTheme());return}if(we.name===CUSTOM_THEME_AUTO_NAME){const xe=getSystemCustomTheme($.current);if(xe){M(createAutoCustomTheme(xe));return}}M(we)},[M]),Z=reactExports.useCallback(()=>{const we=getHostSpecifiedTheme();i.name===AUTO_THEME_NAME&&M(we,{persist:!1});const xe=h.filter(Ne=>Ne.name!==AUTO_THEME_NAME),Ce=xe.some(Ne=>Ne.name===CUSTOM_THEME_AUTO_NAME);if(Ce&&i.name===CUSTOM_THEME_AUTO_NAME){const Ne=getSystemCustomTheme(xe);Ne&&M(createAutoCustomTheme(Ne),{persist:!1})}y(Ce?xe:[createAutoTheme(),...xe])},[i.name,h,M]),be=reactExports.useCallback(we=>{we.fontFaces&&o(we.fontFaces);const xe=[...we.fontSources||[],...we.sidebar?.fontSources||[]],Ce={};xe.forEach(Ne=>{Ne.sourceUrl&&Ne.configName&&(Ce[Ne.configName]=Ne.sourceUrl)}),p(Object.keys(Ce).length>0?Ce:null)},[]),ye=reactExports.useCallback(we=>{be(we);const xe=new CustomThemeConfig(we),Ce=createTheme(CUSTOM_THEME_NAME,xe);H(Ce)},[be,H]);return reactExports.useEffect(()=>{const we=window.matchMedia("(prefers-color-scheme: dark)");return we.addEventListener("change",Z),window.addEventListener("afterprint",Z),()=>{window.removeEventListener("afterprint",Z),we.removeEventListener("change",Z)}},[Z]),[{setTheme:H,activeTheme:i,addThemes:E,availableThemes:h,setFonts:be,setImportedTheme:ye},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{Fragment as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,StyledDropdownListItem as F,isPropValid as G,DownloadContext as H,StyledErrorMessage as I,toString$2 as J,findAndReplace as K,LibConfigContext as L,Arrow$2 as M,range as N,isNumericType as O,Placement as P,DataFrameCellType as Q,useCrossOriginAttribute as R,StreamlitConfig as S,TooltipIcon as T,UISelectbox as U,loglevelExports as V,useRequiredContext as W,NavigationContext as X,DynamicIcon as Y,toaster as Z,_extends$A as _,BaseButtonTooltip as a,transparentize as a$,Kind as a0,AlertElement$1 as a1,Video$1 as a2,keyframes as a3,StyledWidgetInstructions as a4,isFromMac as a5,FormsContext as a6,StyledFormSubmitContent as a7,Form$1 as a8,isInForm as a9,LabelVisibilityOptions as aA,React as aB,find as aC,parse$1 as aD,parse$2 as aE,normalize$1 as aF,html$2 as aG,svg as aH,useCopyToClipboard as aI,ACCESSIBILITY_TYPE as aJ,Popover$2 as aK,ensureError as aL,ErrorElement as aM,hexToRgb as aN,withWrapper as aO,__vitePreload as aP,blend as aQ,SetCache as aR,cacheHas as aS,baseRest as aT,isArrayLikeObject as aU,useSelectCommon as aV,StyledValueContainer as aW,Select as aX,VirtualDropdown as aY,TYPE as aZ,Metric$1 as a_,convertRemToPx as aa,WidgetLabelHelpIcon as ab,WidgetLabel as ac,isMaterialIcon as ad,getBorderColor as ae,TextInput$1 as af,getDefaultExportFromCjs as ag,darken as ah,PortalContext as ai,reactDomExports as aj,classNames as ak,requireReact as al,styled$1 as am,isFocusVisible as an,getOverride as ao,getOverrideProps as ap,root$4 as aq,toNumber as ar,isObject$1 as as,mergeOverrides as at,CUSTOM_INPUT_TYPE as au,ChevronDown$1 as av,PLACEMENT$1 as aw,Icon$2 as ax,Tooltip$1 as ay,IsSidebarContext as az,BaseButton as b,util_math_ as b$,StyledWidgetLabel as b0,Global as b1,getCrossOriginAttribute as b2,_arrayLikeToArray as b3,_unsupportedIterableToArray as b4,ViewStateContext as b5,useWindowDimensionsContext as b6,LocaleContext as b7,shouldWidthStretch as b8,ButtonGroup$1 as b9,__awaiter as bA,PropTypes as bB,isFromWindows as bC,requirePropTypes as bD,merge$1 as bE,getIncreasingGreen as bF,getDecreasingRed as bG,getBlue80 as bH,getGray30 as bI,getGray70 as bJ,getGray90 as bK,keysToSnakeCase as bL,PlotlyChart$1 as bM,themeColors as bN,isMobile as bO,UploadedFileInfo as bP,FileUploaderState as bQ,ThemeContext$1 as bR,pick$1 as bS,Slider$1 as bT,zip as bU,baseSlice as bV,baseToString as bW,trimmedEndIndex as bX,util_bn_ as bY,util_int_ as bZ,util_bit_ as b_,LabelVisibilityMessage as ba,StyledButtonGroup as bb,NumberInput$1 as bc,isDatetimeType as bd,isDateType as be,getTimezone as bf,debounce$2 as bg,isEqual$1 as bh,shouldHeightStretch as bi,useStyletron as bj,mergeOverride as bk,toObjectOverride as bl,Icon$1 as bm,DeleteAlt$1 as bn,forkBlur as bo,forkFocus as bp,addCssUnit as bq,convert as br,visitParents as bs,SKIP as bt,toExportedTheme as bu,ArrowDataframe as bv,useTimeout as bw,Skeleton$1 as bx,Skeleton as by,ComponentRegistry as bz,BaseButtonSize as c,mergeWith as c$,util_buffer_ as c0,util_vector_ as c1,util_pretty_ as c2,util_interval_ as c3,compareTypes as c4,compareFields as c5,compareSchemas as c6,getAugmentedNamespace as c7,isStringType as c8,isTimeType as c9,stringify as cA,pointStart as cB,visit as cC,pointEnd as cD,structuredClone$1 as cE,identity as cF,arrayEach as cG,baseEach as cH,isArray$1 as cI,arrayMap as cJ,baseMap as cK,baseIteratee as cL,baseForOwn as cM,isObjectLike as cN,baseGetTag as cO,isPlainObject$3 as cP,cloneDeep$1 as cQ,useExecuteWhenChanged as cR,StatefulPopover as cS,_typeof$e as cT,_inherits as cU,_createSuper as cV,_classCallCheck as cW,_defineProperty$s as cX,_assertThisInitialized as cY,_createClass as cZ,filterOptions as c_,isPeriodType as ca,isIntervalType as cb,isDurationType as cc,isDecimalType as cd,isFloatType as ce,isObjectType as cf,isListType as cg,TimeUnit as ch,Struct as ci,ThemeProvider$1 as cj,createThemedStyled as ck,createThemedUseStyletron as cl,createThemedWithStyle as cm,expandBorderStyles as cn,withStyle as co,requireReactIs$1 as cp,tableFromIPC as cq,assertNever as cr,v4 as cs,AcceptFileValue as ct,chatInputAcceptFileProtoValueToEnum as cu,requireReactDom as cv,UIDConsumer as cw,StatefulMenu as cx,ok as cy,stringify$1 as cz,Box as d,parseEntities as d0,StyledPre as d1,CopyButton$1 as d2,StyledCopyButtonContainer as d3,StyledCodeBlock as d4,propTypesExports as d5,_slicedToArray as d6,index as d7,_getPrototypeOf as d8,_possibleConstructorReturn as d9,isIntegerType as dA,isBooleanType as dB,Field as dC,Null as dD,isRangeIndexType as dE,isEmptyType as dF,isBytesType as dG,isCategoricalType as dH,fontSizes as dI,lighten as dJ,mix$1 as dK,TRIGGER_TYPE as dL,StyledTooltipContentWrapper as dM,FlexContext as dN,useScrollbarGutterSize as dO,Resizable as dP,parseToRgba as da,DeckGlJsonChart$1 as db,hasPath as dc,isArrayLike as dd,isBuffer as de,isTypedArray as df,isArguments as dg,getTag as dh,isPrototype as di,baseKeys as dj,Set$1 as dk,setToArray as dl,requireClassnames as dm,groupBy as dn,flatten as dp,Vector as dq,getLuminance as dr,_objectWithoutProperties$1 as ds,_objectSpread2 as dt,jsx as du,css as dv,parseIconPackEntry as dw,genericFonts as dx,getMarkdownBgColors as dy,isUnsignedIntegerType 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,StyledCheckbox$1 as v,getOverrides as w,SIZE$1 as x,ENHANCER_POSITION as y,styled as z};