streamlit-nightly 1.52.3.dev20260111__py3-none-any.whl → 1.52.3.dev20260113__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.
- streamlit/__init__.py +1 -1
- streamlit/auth_util.py +25 -2
- streamlit/cli_util.py +1 -1
- streamlit/components/v2/bidi_component/main.py +2 -2
- streamlit/connections/snowflake_connection.py +1 -1
- streamlit/dataframe_util.py +1 -3
- streamlit/elements/arrow.py +5 -1
- streamlit/elements/lib/color_util.py +1 -1
- streamlit/elements/lib/image_utils.py +1 -1
- streamlit/elements/vega_charts.py +4 -1
- streamlit/elements/widgets/multiselect.py +1 -1
- streamlit/elements/widgets/time_widgets.py +1 -1
- streamlit/elements/write.py +1 -2
- streamlit/errors.py +2 -0
- streamlit/external/langchain/streamlit_callback_handler.py +1 -1
- streamlit/proto/Alert_pb2.pyi +31 -31
- streamlit/proto/AppPage_pb2.pyi +30 -30
- streamlit/proto/ArrowData_pb2.pyi +15 -15
- streamlit/proto/ArrowNamedDataSet_pb2.pyi +25 -25
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +45 -45
- streamlit/proto/Arrow_pb2.pyi +126 -97
- streamlit/proto/AudioInput_pb2.pyi +39 -39
- streamlit/proto/Audio_pb2.pyi +39 -39
- streamlit/proto/AuthRedirect_pb2.pyi +15 -15
- streamlit/proto/AutoRerun_pb2.pyi +18 -18
- streamlit/proto/BackMsg_pb2.pyi +64 -64
- streamlit/proto/Balloons_pb2.pyi +15 -15
- streamlit/proto/BidiComponent_pb2.pyi +100 -100
- streamlit/proto/Block_pb2.pyi +295 -264
- streamlit/proto/BokehChart_pb2.pyi +21 -21
- streamlit/proto/ButtonGroup_pb2.pyi +96 -96
- streamlit/proto/ButtonLikeIconPosition_pb2.pyi +12 -12
- streamlit/proto/Button_pb2.pyi +63 -50
- streamlit/proto/CameraInput_pb2.pyi +34 -34
- streamlit/proto/ChatInput_pb2.pyi +63 -63
- streamlit/proto/Checkbox_pb2.pyi +49 -49
- streamlit/proto/ClientState_pb2.pyi +85 -85
- streamlit/proto/Code_pb2.pyi +41 -28
- streamlit/proto/ColorPicker_pb2.pyi +43 -43
- streamlit/proto/Common_pb2.pyi +175 -175
- streamlit/proto/Components_pb2.pyi +110 -110
- streamlit/proto/DataFrame_pb2.pyi +209 -209
- streamlit/proto/DateInput_pb2.pyi +59 -59
- streamlit/proto/DateTimeInput_pb2.pyi +62 -62
- streamlit/proto/DeckGlJsonChart_pb2.pyi +91 -56
- streamlit/proto/Delta_pb2.pyi +44 -44
- streamlit/proto/DocString_pb2.pyi +51 -51
- streamlit/proto/DownloadButton_pb2.pyi +59 -59
- streamlit/proto/Element_pb2.pyi +319 -319
- streamlit/proto/Empty_pb2.pyi +10 -10
- streamlit/proto/Exception_pb2.pyi +37 -37
- streamlit/proto/Favicon_pb2.pyi +15 -15
- streamlit/proto/FileUploader_pb2.pyi +49 -49
- streamlit/proto/ForwardMsg_pb2.pyi +176 -170
- streamlit/proto/GapSize_pb2.pyi +23 -23
- streamlit/proto/GitInfo_pb2.pyi +37 -37
- streamlit/proto/GraphVizChart_pb2.pyi +38 -25
- streamlit/proto/Heading_pb2.pyi +30 -30
- streamlit/proto/HeightConfig_pb2.pyi +31 -31
- streamlit/proto/Html_pb2.pyi +18 -18
- streamlit/proto/IFrame_pb2.pyi +76 -47
- streamlit/proto/Image_pb2.pyi +49 -36
- streamlit/proto/Json_pb2.pyi +25 -25
- streamlit/proto/LabelVisibilityMessage_pb2.pyi +18 -18
- streamlit/proto/LinkButton_pb2.pyi +43 -43
- streamlit/proto/Logo_pb2.pyi +24 -24
- streamlit/proto/Markdown_pb2.pyi +30 -30
- streamlit/proto/Metric_pb2.pyi +59 -59
- streamlit/proto/MetricsEvent_pb2.pyi +171 -171
- streamlit/proto/MultiSelect_pb2.pyi +72 -66
- streamlit/proto/NamedDataSet_pb2.pyi +25 -25
- streamlit/proto/Navigation_pb2.pyi +35 -35
- streamlit/proto/NewSession_pb2.pyi +511 -498
- streamlit/proto/NumberInput_pb2.pyi +79 -79
- streamlit/proto/PageConfig_pb2.pyi +71 -71
- streamlit/proto/PageInfo_pb2.pyi +15 -15
- streamlit/proto/PageLink_pb2.pyi +47 -47
- streamlit/proto/PageNotFound_pb2.pyi +15 -15
- streamlit/proto/PageProfile_pb2.pyi +85 -85
- streamlit/proto/PagesChanged_pb2.pyi +19 -19
- streamlit/proto/ParentMessage_pb2.pyi +15 -15
- streamlit/proto/PlotlyChart_pb2.pyi +79 -64
- streamlit/proto/Progress_pb2.pyi +18 -18
- streamlit/proto/Radio_pb2.pyi +62 -62
- streamlit/proto/RootContainer_pb2.pyi +12 -12
- streamlit/proto/Selectbox_pb2.pyi +80 -70
- streamlit/proto/SessionEvent_pb2.pyi +27 -27
- streamlit/proto/SessionStatus_pb2.pyi +18 -18
- streamlit/proto/Skeleton_pb2.pyi +25 -25
- streamlit/proto/Slider_pb2.pyi +74 -74
- streamlit/proto/Snow_pb2.pyi +15 -15
- streamlit/proto/Space_pb2.pyi +10 -10
- streamlit/proto/Spinner_pb2.pyi +21 -21
- streamlit/proto/TextAlignmentConfig_pb2.pyi +18 -18
- streamlit/proto/TextArea_pb2.pyi +72 -59
- streamlit/proto/TextInput_pb2.pyi +67 -67
- streamlit/proto/Text_pb2.pyi +18 -18
- streamlit/proto/TimeInput_pb2.pyi +52 -52
- streamlit/proto/Toast_pb2.pyi +25 -25
- streamlit/proto/Transient_pb2.pyi +19 -19
- streamlit/proto/VegaLiteChart_pb2.pyi +32 -32
- streamlit/proto/Video_pb2.pyi +65 -65
- streamlit/proto/WidgetStates_pb2.pyi +91 -85
- streamlit/proto/WidthConfig_pb2.pyi +31 -31
- streamlit/proto/openmetrics_data_model_pb2.pyi +269 -269
- streamlit/runtime/app_session.py +1 -1
- streamlit/runtime/credentials.py +2 -2
- streamlit/runtime/metrics_util.py +3 -3
- streamlit/runtime/secrets.py +1 -1
- streamlit/runtime/stats.py +1 -3
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +296 -296
- streamlit/static/static/js/{ErrorOutline.esm.D0HiUB0L.js → ErrorOutline.esm.BjVqd_6R.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.BuUS-pfi.js → FileDownload.esm.DJCSsghl.js} +1 -1
- streamlit/static/static/js/{FileHelper.Pf8URFng.js → FileHelper.C---TH7o.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.By4vKj6A.js → FormClearHelper.C-6BC487.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BiaGyIXk.js → InputInstructions.sxc3InCI.js} +1 -1
- streamlit/static/static/js/{Particles.2-EdjYhR.js → Particles.S8yD7iW-.js} +1 -1
- streamlit/static/static/js/{ProgressBar.Dgbh0B0d.js → ProgressBar.BiYsyZCC.js} +1 -1
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.DSl8Wr3R.js → StreamlitSyntaxHighlighter.9jZF8jX1.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.MOwyTUPh.js → TableChart.esm.BdA4Q1rZ.js} +1 -1
- streamlit/static/static/js/{Toolbar.CowuXIFr.js → Toolbar.B9DaaDfN.js} +1 -1
- streamlit/static/static/js/{WidgetLabelHelpIconInline.BdGIJQe4.js → WidgetLabelHelpIconInline.DxODTLS2.js} +1 -1
- streamlit/static/static/js/{base-input.CHPo5oJ1.js → base-input.Gf1cKuQR.js} +1 -1
- streamlit/static/static/js/{checkbox.Dkt2TQVS.js → checkbox.CnoNruf3.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.BaE-_v8I.js → createDownloadLinkElement.B48AepiL.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.C1ncL-Nr.js → data-grid-overlay-editor.Cmdq9aqU.js} +1 -1
- streamlit/static/static/js/{downloader.yaq2AzD9.js → downloader.CQLoQdMX.js} +1 -1
- streamlit/static/static/js/{embed.DJJvCVz2.js → embed.oKwocwU8.js} +1 -1
- streamlit/static/static/js/{es6.D2jK98VU.js → es6.BRxlY_y5.js} +2 -2
- streamlit/static/static/js/{formatNumber.Cxr2q_Sk.js → formatNumber.DaagZyZe.js} +1 -1
- streamlit/static/static/js/{iconPosition.5dHEZYw2.js → iconPosition.Q3hNvmK4.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.Cedt4qbc.js → iframeResizer.contentWindow.B6EBvI9L.js} +1 -1
- streamlit/static/static/js/{index.DaITTdfQ.js → index.19_qtO6t.js} +1 -1
- streamlit/static/static/js/{index._nL4Yjdr.js → index.43b777iP.js} +1 -1
- streamlit/static/static/js/{index.P-CMMGUY.js → index.B03eQZoH.js} +1 -1
- streamlit/static/static/js/{index.D2EVLt1U.js → index.B9kZB0o1.js} +1 -1
- streamlit/static/static/js/{index.BkDplL5I.js → index.BAI9aHCq.js} +1 -1
- streamlit/static/static/js/{index.CT9jvPcD.js → index.BF23fbfs.js} +1 -1
- streamlit/static/static/js/{index.TO9vodwr.js → index.BGBTkulf.js} +1 -1
- streamlit/static/static/js/{index.01VsD2h1.js → index.BRfGUOQ-.js} +5 -5
- streamlit/static/static/js/{index.D6ea3OJl.js → index.BVT89mQw.js} +1 -1
- streamlit/static/static/js/{index.BHMoYAbd.js → index.BXEC4cf3.js} +1 -1
- streamlit/static/static/js/{index.B6EliwN_.js → index.BbSFVZ3p.js} +1 -1
- streamlit/static/static/js/{index.B7EzT2pL.js → index.BkSwGJoh.js} +1 -1
- streamlit/static/static/js/{index.B6Uhb_NP.js → index.BnfTPrHb.js} +1 -1
- streamlit/static/static/js/{index.qzz9PjCO.js → index.BoX8d5rK.js} +1 -1
- streamlit/static/static/js/{index.Bb9kjc_v.js → index.Boa0Egng.js} +1 -1
- streamlit/static/static/js/{index.CjQo7CUO.js → index.BzwlrgZO.js} +1 -1
- streamlit/static/static/js/{index.Ba6hzYdl.js → index.C0fSEz-3.js} +1 -1
- streamlit/static/static/js/{index.B2TDaHdI.js → index.CCFwVy90.js} +1 -1
- streamlit/static/static/js/{index.Dt0Psatx.js → index.CCQ5p_WC.js} +1 -1
- streamlit/static/static/js/{index.DeGjj5Xy.js → index.CFCBhOfx.js} +1 -1
- streamlit/static/static/js/{index.DredtYc0.js → index.CIbgt5wY.js} +1 -1
- streamlit/static/static/js/{index.CD8IIWcc.js → index.CJ4oJe0V.js} +1 -1
- streamlit/static/static/js/{index.6_D2Y2jA.js → index.CP-hoxJM.js} +1 -1
- streamlit/static/static/js/{index.BXCQzqUL.js → index.CSfsEKCF.js} +1 -1
- streamlit/static/static/js/{index.C8PH2B2k.js → index.CVlg41MB.js} +1 -1
- streamlit/static/static/js/{index.BVit6ClT.js → index.CYE7b5Du.js} +1 -1
- streamlit/static/static/js/{index.DKUtJ1wC.js → index.Ca7MUNWJ.js} +1 -1
- streamlit/static/static/js/index.CrPjcPY1.js +1 -0
- streamlit/static/static/js/{index.BMPclSge.js → index.CvB9JBqS.js} +5 -5
- streamlit/static/static/js/{index.BCCeRfnu.js → index.CvIqsWy1.js} +1 -1
- streamlit/static/static/js/{index.wLJVkoPD.js → index.D1pK_Vw2.js} +1 -1
- streamlit/static/static/js/{index.B0GsKOuI.js → index.D6X2coHR.js} +1 -1
- streamlit/static/static/js/{index.B4x2O71H.js → index.DGYHxruh.js} +1 -1
- streamlit/static/static/js/{index.DcKOiCiE.js → index.DJ7P09eb.js} +1 -1
- streamlit/static/static/js/{index.CcHnYd9w.js → index.Dh5SAThV.js} +1 -1
- streamlit/static/static/js/{index.BFopzcDu.js → index.Fu73QtkD.js} +1 -1
- streamlit/static/static/js/{index.CIlqaESj.js → index.KN1VmyYN.js} +1 -1
- streamlit/static/static/js/{index.B9DrCSR6.js → index.KtjGDGY5.js} +1 -1
- streamlit/static/static/js/{index.DLB_Wwth.js → index.OpATzEaW.js} +1 -1
- streamlit/static/static/js/{index.CcJEaOpw.js → index.QHnxuesF.js} +1 -1
- streamlit/static/static/js/{index.1djeb6e0.js → index.QTaWooav.js} +1 -1
- streamlit/static/static/js/{index.BgVtKHgk.js → index.WXybx2Xq.js} +1 -1
- streamlit/static/static/js/{index.DtGneC7j.js → index.Xg-Qttib.js} +1 -1
- streamlit/static/static/js/{index.Dewn3Ni9.js → index.j4fnjyHo.js} +1 -1
- streamlit/static/static/js/{index.CAobVzMK.js → index.na9UBuse.js} +1 -1
- streamlit/static/static/js/{index.D2v1x0i_.js → index.pU9mQeVC.js} +1 -1
- streamlit/static/static/js/{index.DbTMA1_Q.js → index.slgxPafU.js} +1 -1
- streamlit/static/static/js/{index.DozBVd6-.js → index.whRT3Vm3.js} +1 -1
- streamlit/static/static/js/{input.27t-DftI.js → input.CPzINTl-.js} +1 -1
- streamlit/static/static/js/{main.BEfv2Y8-.js → main.DSPn8dUe.js} +1 -1
- streamlit/static/static/js/{memory.CaZBVQ_1.js → memory.CfD8IGoU.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CAIp-3oo.js → number-overlay-editor.4Ae0qegV.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.BY9qaz81.js → pandasStylerUtils.D2EjZ7k6.js} +1 -1
- streamlit/static/static/js/{sandbox.BJUaaWFJ.js → sandbox.C6vcPIm0.js} +1 -1
- streamlit/static/static/js/{styled-components.DQsMkvXn.js → styled-components.BBmp8buj.js} +1 -1
- streamlit/static/static/js/{throttle.DSR3q89S.js → throttle.BPcPpy-S.js} +1 -1
- streamlit/static/static/js/{timepicker.gie5YwtP.js → timepicker.ryzkTs2C.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.C9lVwnAo.js → toConsumableArray.Dg1nDaB_.js} +1 -1
- streamlit/static/static/js/uniqueId.BFHzT5KQ.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.DrTKs46R.js → useBasicWidgetState.A4U5lzAm.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.CmSionuT.js → useIntlLocale.DWJgLlNz.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.D7lViJSu.js → useTextInputAutoExpand.BrBonw8t.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.Ct3CJQBQ.js → useUpdateUiValue.BkOWyNVX.js} +1 -1
- streamlit/static/static/js/{useWaveformController.D-KQLpLI.js → useWaveformController.CBlvXlgZ.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.CD0pPoZr.js → withCalculatedWidth.D4cpOyNe.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.Ch22PgdD.js → withFullScreenWrapper.BMim3w94.js} +1 -1
- streamlit/testing/v1/app_test.py +1 -1
- streamlit/user_info.py +6 -4
- streamlit/web/server/browser_websocket_handler.py +2 -2
- streamlit/web/server/oauth_authlib_routes.py +97 -20
- streamlit/web/server/starlette/starlette_routes.py +1 -3
- streamlit/web/server/stats_request_handler.py +1 -3
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/RECORD +211 -211
- streamlit/static/static/js/index.i_eQw7NS.js +0 -1
- streamlit/static/static/js/uniqueId.BdEQNrWF.js +0 -1
- {streamlit_nightly-1.52.3.dev20260111.data → streamlit_nightly-1.52.3.dev20260113.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.52.3.dev20260111.dist-info → streamlit_nightly-1.52.3.dev20260113.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.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.19_qtO6t.js","./index.bsVAaBS1.js","./index.QTaWooav.js","./index.OpATzEaW.js","./index.Ca7MUNWJ.js","./index.KN1VmyYN.js","./StreamlitSyntaxHighlighter.9jZF8jX1.js","./index.DGYHxruh.js","./pandasStylerUtils.D2EjZ7k6.js","./moment.C7qA8nIE.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.43b777iP.js","./withFullScreenWrapper.BMim3w94.js","./Toolbar.B9DaaDfN.js","./index.CvB9JBqS.js","./FormClearHelper.C-6BC487.js","./index.8HslT92O.js","./main.DSPn8dUe.js","./throttle.BPcPpy-S.js","./formatNumber.DaagZyZe.js","./sprintf.DpPCfzXw.js","./formatMoment.C6Hwn6X5.js","./checkbox.CnoNruf3.js","./createDownloadLinkElement.B48AepiL.js","./toConsumableArray.Dg1nDaB_.js","./FileDownload.esm.DJCSsghl.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.oKwocwU8.js","./threshold.CUNQbqMA.js","./value.DaKxGC7O.js","./timer.BZio6gjG.js","./TableChart.esm.BdA4Q1rZ.js","./index.CvIqsWy1.js","./Particles.S8yD7iW-.js","./index.na9UBuse.js","./useBasicWidgetState.A4U5lzAm.js","../css/index.BuwrT-ty.css","./index.CYE7b5Du.js","./index.Xg-Qttib.js","./IFrameUtil.DefezniK.js","./index.B9kZB0o1.js","./index.DJ7P09eb.js","./index.CIbgt5wY.js","./iconPosition.Q3hNvmK4.js","./index.BXEC4cf3.js","./WidgetLabelHelpIconInline.DxODTLS2.js","./index.B03eQZoH.js","./index.D6X2coHR.js","./index.BAI9aHCq.js","./ProgressBar.BiYsyZCC.js","./index.BGBTkulf.js","./index.Fu73QtkD.js","./useWaveformController.CBlvXlgZ.js","./urls.BwSlolu9.js","./index.CJ4oJe0V.js","./index.Boa0Egng.js","./index.Dh5SAThV.js","./withCalculatedWidth.D4cpOyNe.js","./index.j4fnjyHo.js","./UploadFileInfo.Dr-zDST7.js","./index.CrPjcPY1.js","./FileHelper.C---TH7o.js","./InputInstructions.sxc3InCI.js","./useTextInputAutoExpand.BrBonw8t.js","./base-input.Gf1cKuQR.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.BjVqd_6R.js","./index.C0fSEz-3.js","./index.BnfTPrHb.js","./index.KtjGDGY5.js","./useIntlLocale.DWJgLlNz.js","./timepicker.ryzkTs2C.js","./input.CPzINTl-.js","./index.BzwlrgZO.js","./styled-components.BBmp8buj.js","./index.pU9mQeVC.js","./index.QHnxuesF.js","./index.whRT3Vm3.js","./index.CFCBhOfx.js","./index.CCQ5p_WC.js","./uniqueId.BFHzT5KQ.js","./index.slgxPafU.js","./index.CCFwVy90.js","./index.CSfsEKCF.js","./index.BF23fbfs.js","./useUpdateUiValue.BkOWyNVX.js","./index.CVlg41MB.js","./index.WXybx2Xq.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function _mergeNamespaces(n,i){for(var e=0;e<i.length;e++){const t=i[e];if(typeof t!="string"&&!Array.isArray(t)){for(const o in t)if(o!=="default"&&!(o in n)){const d=Object.getOwnPropertyDescriptor(t,o);d&&Object.defineProperty(n,o,d.get?d:{enumerable:!0,get:()=>t[o]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))t(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&t(p)}).observe(document,{childList:!0,subtree:!0});function e(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function t(o){if(o.ep)return;o.ep=!0;const d=e(o);fetch(o.href,d)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function getAugmentedNamespace(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var i=n.default;if(typeof i=="function"){var e=function t(){var o=!1;try{o=this instanceof t}catch{}return o?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};e.prototype=i.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(t){var o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:function(){return n[t]}})}),e}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};var hasRequiredReact_production_min;function requireReact_production_min(){if(hasRequiredReact_production_min)return react_production_min;hasRequiredReact_production_min=1;var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),t=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),$=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),M=Symbol.iterator;function H(qe){return qe===null||typeof qe!="object"?null:(qe=M&&qe[M]||qe["@@iterator"],typeof qe=="function"?qe:null)}var Z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},be=Object.assign,ye={};function we(qe,rt,He){this.props=qe,this.context=rt,this.refs=ye,this.updater=He||Z}we.prototype.isReactComponent={},we.prototype.setState=function(qe,rt){if(typeof qe!="object"&&typeof qe!="function"&&qe!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,qe,rt,"setState")},we.prototype.forceUpdate=function(qe){this.updater.enqueueForceUpdate(this,qe,"forceUpdate")};function xe(){}xe.prototype=we.prototype;function Ce(qe,rt,He){this.props=qe,this.context=rt,this.refs=ye,this.updater=He||Z}var Ne=Ce.prototype=new xe;Ne.constructor=Ce,be(Ne,we.prototype),Ne.isPureReactComponent=!0;var Fe=Array.isArray,Me=Object.prototype.hasOwnProperty,Le={current:null},ze={key:!0,ref:!0,__self:!0,__source:!0};function Ke(qe,rt,He){var Ot,Ct={},tt=null,wt=null;if(rt!=null)for(Ot in rt.ref!==void 0&&(wt=rt.ref),rt.key!==void 0&&(tt=""+rt.key),rt)Me.call(rt,Ot)&&!ze.hasOwnProperty(Ot)&&(Ct[Ot]=rt[Ot]);var gt=arguments.length-2;if(gt===1)Ct.children=He;else if(1<gt){for(var $t=Array(gt),Mt=0;Mt<gt;Mt++)$t[Mt]=arguments[Mt+2];Ct.children=$t}if(qe&&qe.defaultProps)for(Ot in gt=qe.defaultProps,gt)Ct[Ot]===void 0&&(Ct[Ot]=gt[Ot]);return{$$typeof:n,type:qe,key:tt,ref:wt,props:Ct,_owner:Le.current}}function Ve(qe,rt){return{$$typeof:n,type:qe.type,key:rt,ref:qe.ref,props:qe.props,_owner:qe._owner}}function je(qe){return typeof qe=="object"&&qe!==null&&qe.$$typeof===n}function We(qe){var rt={"=":"=0",":":"=2"};return"$"+qe.replace(/[=:]/g,function(He){return rt[He]})}var Xe=/\/+/g;function Qe(qe,rt){return typeof qe=="object"&&qe!==null&&qe.key!=null?We(""+qe.key):rt.toString(36)}function Ye(qe,rt,He,Ot,Ct){var tt=typeof qe;(tt==="undefined"||tt==="boolean")&&(qe=null);var wt=!1;if(qe===null)wt=!0;else switch(tt){case"string":case"number":wt=!0;break;case"object":switch(qe.$$typeof){case n:case i:wt=!0}}if(wt)return wt=qe,Ct=Ct(wt),qe=Ot===""?"."+Qe(wt,0):Ot,Fe(Ct)?(He="",qe!=null&&(He=qe.replace(Xe,"$&/")+"/"),Ye(Ct,rt,He,"",function(Mt){return Mt})):Ct!=null&&(je(Ct)&&(Ct=Ve(Ct,He+(!Ct.key||wt&&wt.key===Ct.key?"":(""+Ct.key).replace(Xe,"$&/")+"/")+qe)),rt.push(Ct)),1;if(wt=0,Ot=Ot===""?".":Ot+":",Fe(qe))for(var gt=0;gt<qe.length;gt++){tt=qe[gt];var $t=Ot+Qe(tt,gt);wt+=Ye(tt,rt,He,$t,Ct)}else if($t=H(qe),typeof $t=="function")for(qe=$t.call(qe),gt=0;!(tt=qe.next()).done;)tt=tt.value,$t=Ot+Qe(tt,gt++),wt+=Ye(tt,rt,He,$t,Ct);else if(tt==="object")throw rt=String(qe),Error("Objects are not valid as a React child (found: "+(rt==="[object Object]"?"object with keys {"+Object.keys(qe).join(", ")+"}":rt)+"). If you meant to render a collection of children, use an array instead.");return wt}function Ue(qe,rt,He){if(qe==null)return qe;var Ot=[],Ct=0;return Ye(qe,Ot,"","",function(tt){return rt.call(He,tt,Ct++)}),Ot}function ot(qe){if(qe._status===-1){var rt=qe._result;rt=rt(),rt.then(function(He){(qe._status===0||qe._status===-1)&&(qe._status=1,qe._result=He)},function(He){(qe._status===0||qe._status===-1)&&(qe._status=2,qe._result=He)}),qe._status===-1&&(qe._status=0,qe._result=rt)}if(qe._status===1)return qe._result.default;throw qe._result}var dt={current:null},st={transition:null},pt={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:st,ReactCurrentOwner:Le};function Be(){throw Error("act(...) is not supported in production builds of React.")}return react_production_min.Children={map:Ue,forEach:function(qe,rt,He){Ue(qe,function(){rt.apply(this,arguments)},He)},count:function(qe){var rt=0;return Ue(qe,function(){rt++}),rt},toArray:function(qe){return Ue(qe,function(rt){return rt})||[]},only:function(qe){if(!je(qe))throw Error("React.Children.only expected to receive a single React element child.");return qe}},react_production_min.Component=we,react_production_min.Fragment=e,react_production_min.Profiler=o,react_production_min.PureComponent=Ce,react_production_min.StrictMode=t,react_production_min.Suspense=y,react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pt,react_production_min.act=Be,react_production_min.cloneElement=function(qe,rt,He){if(qe==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+qe+".");var Ot=be({},qe.props),Ct=qe.key,tt=qe.ref,wt=qe._owner;if(rt!=null){if(rt.ref!==void 0&&(tt=rt.ref,wt=Le.current),rt.key!==void 0&&(Ct=""+rt.key),qe.type&&qe.type.defaultProps)var gt=qe.type.defaultProps;for($t in rt)Me.call(rt,$t)&&!ze.hasOwnProperty($t)&&(Ot[$t]=rt[$t]===void 0&>!==void 0?gt[$t]:rt[$t])}var $t=arguments.length-2;if($t===1)Ot.children=He;else if(1<$t){gt=Array($t);for(var Mt=0;Mt<$t;Mt++)gt[Mt]=arguments[Mt+2];Ot.children=gt}return{$$typeof:n,type:qe.type,key:Ct,ref:tt,props:Ot,_owner:wt}},react_production_min.createContext=function(qe){return qe={$$typeof:p,_currentValue:qe,_currentValue2:qe,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},qe.Provider={$$typeof:d,_context:qe},qe.Consumer=qe},react_production_min.createElement=Ke,react_production_min.createFactory=function(qe){var rt=Ke.bind(null,qe);return rt.type=qe,rt},react_production_min.createRef=function(){return{current:null}},react_production_min.forwardRef=function(qe){return{$$typeof:h,render:qe}},react_production_min.isValidElement=je,react_production_min.lazy=function(qe){return{$$typeof:E,_payload:{_status:-1,_result:qe},_init:ot}},react_production_min.memo=function(qe,rt){return{$$typeof:$,type:qe,compare:rt===void 0?null:rt}},react_production_min.startTransition=function(qe){var rt=st.transition;st.transition={};try{qe()}finally{st.transition=rt}},react_production_min.unstable_act=Be,react_production_min.useCallback=function(qe,rt){return dt.current.useCallback(qe,rt)},react_production_min.useContext=function(qe){return dt.current.useContext(qe)},react_production_min.useDebugValue=function(){},react_production_min.useDeferredValue=function(qe){return dt.current.useDeferredValue(qe)},react_production_min.useEffect=function(qe,rt){return dt.current.useEffect(qe,rt)},react_production_min.useId=function(){return dt.current.useId()},react_production_min.useImperativeHandle=function(qe,rt,He){return dt.current.useImperativeHandle(qe,rt,He)},react_production_min.useInsertionEffect=function(qe,rt){return dt.current.useInsertionEffect(qe,rt)},react_production_min.useLayoutEffect=function(qe,rt){return dt.current.useLayoutEffect(qe,rt)},react_production_min.useMemo=function(qe,rt){return dt.current.useMemo(qe,rt)},react_production_min.useReducer=function(qe,rt,He){return dt.current.useReducer(qe,rt,He)},react_production_min.useRef=function(qe){return dt.current.useRef(qe)},react_production_min.useState=function(qe){return dt.current.useState(qe)},react_production_min.useSyncExternalStore=function(qe,rt,He){return dt.current.useSyncExternalStore(qe,rt,He)},react_production_min.useTransition=function(){return dt.current.useTransition()},react_production_min.version="18.3.1",react_production_min}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production_min()),react.exports}var hasRequiredReactJsxRuntime_production_min;function requireReactJsxRuntime_production_min(){if(hasRequiredReactJsxRuntime_production_min)return reactJsxRuntime_production_min;hasRequiredReactJsxRuntime_production_min=1;var n=requireReact(),i=Symbol.for("react.element"),e=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,y,$){var E,M={},H=null,Z=null;$!==void 0&&(H=""+$),y.key!==void 0&&(H=""+y.key),y.ref!==void 0&&(Z=y.ref);for(E in y)t.call(y,E)&&!d.hasOwnProperty(E)&&(M[E]=y[E]);if(h&&h.defaultProps)for(E in y=h.defaultProps,y)M[E]===void 0&&(M[E]=y[E]);return{$$typeof:i,type:h,key:H,ref:Z,props:M,_owner:o.current}}return reactJsxRuntime_production_min.Fragment=e,reactJsxRuntime_production_min.jsx=p,reactJsxRuntime_production_min.jsxs=p,reactJsxRuntime_production_min}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production_min()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),reactExports=requireReact();const React=getDefaultExportFromCjs(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React},[reactExports]);function sheetForTag(n){if(n.sheet)return n.sheet;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].ownerNode===n)return document.styleSheets[i]}function createStyleElement(n){var i=document.createElement("style");return i.setAttribute("data-emotion",n.key),n.nonce!==void 0&&i.setAttribute("nonce",n.nonce),i.appendChild(document.createTextNode("")),i.setAttribute("data-s",""),i}var StyleSheet=(function(){function n(e){var t=this;this._insertTag=function(o){var d;t.tags.length===0?t.insertionPoint?d=t.insertionPoint.nextSibling:t.prepend?d=t.container.firstChild:d=t.before:d=t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(o,d),t.tags.push(o)},this.isSpeedy=e.speedy===void 0?!0:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var i=n.prototype;return i.hydrate=function(t){t.forEach(this._insertTag)},i.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var d=sheetForTag(o);try{d.insertRule(t,d.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(t));this.ctr++},i.flush=function(){this.tags.forEach(function(t){var o;return(o=t.parentNode)==null?void 0:o.removeChild(t)}),this.tags=[],this.ctr=0},n})(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode,assign$1=Object.assign;function hash$1(n,i){return charat(n,0)^45?(((i<<2^charat(n,0))<<2^charat(n,1))<<2^charat(n,2))<<2^charat(n,3):0}function trim(n){return n.trim()}function match(n,i){return(n=i.exec(n))?n[0]:n}function replace$1(n,i,e){return n.replace(i,e)}function indexof(n,i){return n.indexOf(i)}function charat(n,i){return n.charCodeAt(i)|0}function substr(n,i,e){return n.slice(i,e)}function strlen(n){return n.length}function sizeof(n){return n.length}function append(n,i){return i.push(n),n}function combine(n,i){return n.map(i).join("")}var line=1,column=1,length=0,position$3=0,character=0,characters="";function node$1(n,i,e,t,o,d,p){return{value:n,root:i,parent:e,type:t,props:o,children:d,line,column,length:p,return:""}}function copy(n,i){return assign$1(node$1("",null,null,"",null,null,0),n,{length:-n.length},i)}function char(){return character}function prev(){return character=position$3>0?charat(characters,--position$3):0,column--,character===10&&(column=1,line--),character}function next(){return character=position$3<length?charat(characters,position$3++):0,column++,character===10&&(column=1,line++),character}function peek$1(){return charat(characters,position$3)}function caret(){return position$3}function slice(n,i){return substr(characters,n,i)}function token(n){switch(n){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(n){return line=column=1,length=strlen(characters=n),position$3=0,[]}function dealloc(n){return characters="",n}function delimit(n){return trim(slice(position$3-1,delimiter(n===91?n+2:n===40?n+1:n)))}function whitespace$1(n){for(;(character=peek$1())&&character<33;)next();return token(n)>2||token(character)>3?"":" "}function escaping(n,i){for(;--i&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(n,caret()+(i<6&&peek$1()==32&&next()==32))}function delimiter(n){for(;next();)switch(character){case n:return position$3;case 34:case 39:n!==34&&n!==39&&delimiter(character);break;case 40:n===41&&delimiter(n);break;case 92:next();break}return position$3}function commenter(n,i){for(;next()&&n+character!==57;)if(n+character===84&&peek$1()===47)break;return"/*"+slice(i,position$3-1)+"*"+from(n===47?n:next())}function identifier(n){for(;!token(peek$1());)next();return slice(n,position$3)}function compile(n){return dealloc(parse$3("",null,null,null,[""],n=alloc(n),0,[0],n))}function parse$3(n,i,e,t,o,d,p,h,y){for(var $=0,E=0,M=p,H=0,Z=0,be=0,ye=1,we=1,xe=1,Ce=0,Ne="",Fe=o,Me=d,Le=t,ze=Ne;we;)switch(be=Ce,Ce=next()){case 40:if(be!=108&&charat(ze,M-1)==58){indexof(ze+=replace$1(delimit(Ce),"&","&\f"),"&\f")!=-1&&(xe=-1);break}case 34:case 39:case 91:ze+=delimit(Ce);break;case 9:case 10:case 13:case 32:ze+=whitespace$1(be);break;case 92:ze+=escaping(caret()-1,7);continue;case 47:switch(peek$1()){case 42:case 47:append(comment(commenter(next(),caret()),i,e),y);break;default:ze+="/"}break;case 123*ye:h[$++]=strlen(ze)*xe;case 125*ye:case 59:case 0:switch(Ce){case 0:case 125:we=0;case 59+E:xe==-1&&(ze=replace$1(ze,/\f/g,"")),Z>0&&strlen(ze)-M&&append(Z>32?declaration(ze+";",t,e,M-1):declaration(replace$1(ze," ","")+";",t,e,M-2),y);break;case 59:ze+=";";default:if(append(Le=ruleset(ze,i,e,$,E,o,h,Ne,Fe=[],Me=[],M),d),Ce===123)if(E===0)parse$3(ze,i,Le,Le,Fe,d,M,h,Me);else switch(H===99&&charat(ze,3)===110?100:H){case 100:case 108:case 109:case 115:parse$3(n,Le,Le,t&&append(ruleset(n,Le,Le,0,0,o,h,Ne,o,Fe=[],M),Me),o,Me,M,h,t?Fe:Me);break;default:parse$3(ze,Le,Le,Le,[""],Me,0,h,Me)}}$=E=Z=0,ye=xe=1,Ne=ze="",M=p;break;case 58:M=1+strlen(ze),Z=be;default:if(ye<1){if(Ce==123)--ye;else if(Ce==125&&ye++==0&&prev()==125)continue}switch(ze+=from(Ce),Ce*ye){case 38:xe=E>0?1:(ze+="\f",-1);break;case 44:h[$++]=(strlen(ze)-1)*xe,xe=1;break;case 64:peek$1()===45&&(ze+=delimit(next())),H=peek$1(),E=M=strlen(Ne=ze+=identifier(caret())),Ce++;break;case 45:be===45&&strlen(ze)==2&&(ye=0)}}return d}function ruleset(n,i,e,t,o,d,p,h,y,$,E){for(var M=o-1,H=o===0?d:[""],Z=sizeof(H),be=0,ye=0,we=0;be<t;++be)for(var xe=0,Ce=substr(n,M+1,M=abs(ye=p[be])),Ne=n;xe<Z;++xe)(Ne=trim(ye>0?H[xe]+" "+Ce:replace$1(Ce,/&\f/g,H[xe])))&&(y[we++]=Ne);return node$1(n,i,e,o===0?RULESET:h,y,$,E)}function comment(n,i,e){return node$1(n,i,e,COMMENT,from(char()),substr(n,2,-2),0)}function declaration(n,i,e,t){return node$1(n,i,e,DECLARATION,substr(n,0,t),substr(n,t+1,-1),t)}function serialize$2(n,i){for(var e="",t=sizeof(n),o=0;o<t;o++)e+=i(n[o],o,n,i)||"";return e}function stringify$2(n,i,e,t){switch(n.type){case LAYER:if(n.children.length)break;case IMPORT:case DECLARATION:return n.return=n.return||n.value;case COMMENT:return"";case KEYFRAMES:return n.return=n.value+"{"+serialize$2(n.children,t)+"}";case RULESET:n.value=n.props.join(",")}return strlen(e=serialize$2(n.children,t))?n.return=n.value+"{"+e+"}":""}function middleware(n){var i=sizeof(n);return function(e,t,o,d){for(var p="",h=0;h<i;h++)p+=n[h](e,t,o,d)||"";return p}}function rulesheet(n){return function(i){i.root||(i=i.return)&&n(i)}}var weakMemoize=function(i){var e=new WeakMap;return function(t){if(e.has(t))return e.get(t);var o=i(t);return e.set(t,o),o}};function memoize$1(n){var i=Object.create(null);return function(e){return i[e]===void 0&&(i[e]=n(e)),i[e]}}var identifierWithPointTracking=function(i,e,t){for(var o=0,d=0;o=d,d=peek$1(),o===38&&d===12&&(e[t]=1),!token(d);)next();return slice(i,position$3)},toRules=function(i,e){var t=-1,o=44;do switch(token(o)){case 0:o===38&&peek$1()===12&&(e[t]=1),i[t]+=identifierWithPointTracking(position$3-1,e,t);break;case 2:i[t]+=delimit(o);break;case 4:if(o===44){i[++t]=peek$1()===58?"&\f":"",e[t]=i[t].length;break}default:i[t]+=from(o)}while(o=next());return i},getRules=function(i,e){return dealloc(toRules(alloc(i),e))},fixedElements=new WeakMap,compat=function(i){if(!(i.type!=="rule"||!i.parent||i.length<1)){for(var e=i.value,t=i.parent,o=i.column===t.column&&i.line===t.line;t.type!=="rule";)if(t=t.parent,!t)return;if(!(i.props.length===1&&e.charCodeAt(0)!==58&&!fixedElements.get(t))&&!o){fixedElements.set(i,!0);for(var d=[],p=getRules(e,d),h=t.props,y=0,$=0;y<p.length;y++)for(var E=0;E<h.length;E++,$++)i.props[$]=d[y]?p[y].replace(/&\f/g,h[E]):h[E]+" "+p[y]}}},removeLabel=function(i){if(i.type==="decl"){var e=i.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(i.return="",i.value="")}};function prefix$1(n,i){switch(hash$1(n,i)){case 5103:return WEBKIT+"print-"+n+n;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+n+n;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+n+MOZ+n+MS+n+n;case 6828:case 4268:return WEBKIT+n+MS+n+n;case 6165:return WEBKIT+n+MS+"flex-"+n+n;case 5187:return WEBKIT+n+replace$1(n,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+n;case 5443:return WEBKIT+n+MS+"flex-item-"+replace$1(n,/flex-|-self/,"")+n;case 4675:return WEBKIT+n+MS+"flex-line-pack"+replace$1(n,/align-content|flex-|-self/,"")+n;case 5548:return WEBKIT+n+MS+replace$1(n,"shrink","negative")+n;case 5292:return WEBKIT+n+MS+replace$1(n,"basis","preferred-size")+n;case 6060:return WEBKIT+"box-"+replace$1(n,"-grow","")+WEBKIT+n+MS+replace$1(n,"grow","positive")+n;case 4554:return WEBKIT+replace$1(n,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+n;case 6187:return replace$1(replace$1(replace$1(n,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),n,"")+n;case 5495:case 3959:return replace$1(n,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$1(replace$1(n,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+n+n;case 4095:case 3583:case 4068:case 2532:return replace$1(n,/(.+)-inline(.+)/,WEBKIT+"$1$2")+n;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(n)-1-i>6)switch(charat(n,i+1)){case 109:if(charat(n,i+4)!==45)break;case 102:return replace$1(n,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(n,i+3)==108?"$3":"$2-$3"))+n;case 115:return~indexof(n,"stretch")?prefix$1(replace$1(n,"stretch","fill-available"),i)+n:n}break;case 4949:if(charat(n,i+1)!==115)break;case 6444:switch(charat(n,strlen(n)-3-(~indexof(n,"!important")&&10))){case 107:return replace$1(n,":",":"+WEBKIT)+n;case 101:return replace$1(n,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(n,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+n}break;case 5936:switch(charat(n,i+11)){case 114:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"tb")+n;case 108:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"tb-rl")+n;case 45:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"lr")+n}return WEBKIT+n+MS+n+n}return n}var prefixer=function(i,e,t,o){if(i.length>-1&&!i.return)switch(i.type){case DECLARATION:i.return=prefix$1(i.value,i.length);break;case KEYFRAMES:return serialize$2([copy(i,{value:replace$1(i.value,"@","@"+WEBKIT)})],o);case RULESET:if(i.length)return combine(i.props,function(d){switch(match(d,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize$2([copy(i,{props:[replace$1(d,/:(read-\w+)/,":"+MOZ+"$1")]})],o);case"::placeholder":return serialize$2([copy(i,{props:[replace$1(d,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(i,{props:[replace$1(d,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(i,{props:[replace$1(d,/:(plac\w+)/,MS+"input-$1")]})],o)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(i){var e=i.key;if(e==="css"){var t=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(t,function(ye){var we=ye.getAttribute("data-emotion");we.indexOf(" ")!==-1&&(document.head.appendChild(ye),ye.setAttribute("data-s",""))})}var o=i.stylisPlugins||defaultStylisPlugins,d={},p,h=[];p=i.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(ye){for(var we=ye.getAttribute("data-emotion").split(" "),xe=1;xe<we.length;xe++)d[we[xe]]=!0;h.push(ye)});var y,$=[compat,removeLabel];{var E,M=[stringify$2,rulesheet(function(ye){E.insert(ye)})],H=middleware($.concat(o,M)),Z=function(we){return serialize$2(compile(we),H)};y=function(we,xe,Ce,Ne){E=Ce,Z(we?we+"{"+xe.styles+"}":xe.styles),Ne&&(be.inserted[xe.name]=!0)}}var be={key:e,sheet:new StyleSheet({key:e,container:p,nonce:i.nonce,speedy:i.speedy,prepend:i.prepend,insertionPoint:i.insertionPoint}),nonce:i.nonce,inserted:d,registered:{},insert:y};return be.sheet.hydrate(h),be};function _extends$A(){return _extends$A=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)({}).hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$A.apply(null,arguments)}var reactIs$1={exports:{}},reactIs_production_min$1={};var hasRequiredReactIs_production_min$1;function requireReactIs_production_min$1(){if(hasRequiredReactIs_production_min$1)return reactIs_production_min$1;hasRequiredReactIs_production_min$1=1;var n=typeof Symbol=="function"&&Symbol.for,i=n?Symbol.for("react.element"):60103,e=n?Symbol.for("react.portal"):60106,t=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,d=n?Symbol.for("react.profiler"):60114,p=n?Symbol.for("react.provider"):60109,h=n?Symbol.for("react.context"):60110,y=n?Symbol.for("react.async_mode"):60111,$=n?Symbol.for("react.concurrent_mode"):60111,E=n?Symbol.for("react.forward_ref"):60112,M=n?Symbol.for("react.suspense"):60113,H=n?Symbol.for("react.suspense_list"):60120,Z=n?Symbol.for("react.memo"):60115,be=n?Symbol.for("react.lazy"):60116,ye=n?Symbol.for("react.block"):60121,we=n?Symbol.for("react.fundamental"):60117,xe=n?Symbol.for("react.responder"):60118,Ce=n?Symbol.for("react.scope"):60119;function Ne(Me){if(typeof Me=="object"&&Me!==null){var Le=Me.$$typeof;switch(Le){case i:switch(Me=Me.type,Me){case y:case $:case t:case d:case o:case M:return Me;default:switch(Me=Me&&Me.$$typeof,Me){case h:case E:case be:case Z:case p:return Me;default:return Le}}case e:return Le}}}function Fe(Me){return Ne(Me)===$}return reactIs_production_min$1.AsyncMode=y,reactIs_production_min$1.ConcurrentMode=$,reactIs_production_min$1.ContextConsumer=h,reactIs_production_min$1.ContextProvider=p,reactIs_production_min$1.Element=i,reactIs_production_min$1.ForwardRef=E,reactIs_production_min$1.Fragment=t,reactIs_production_min$1.Lazy=be,reactIs_production_min$1.Memo=Z,reactIs_production_min$1.Portal=e,reactIs_production_min$1.Profiler=d,reactIs_production_min$1.StrictMode=o,reactIs_production_min$1.Suspense=M,reactIs_production_min$1.isAsyncMode=function(Me){return Fe(Me)||Ne(Me)===y},reactIs_production_min$1.isConcurrentMode=Fe,reactIs_production_min$1.isContextConsumer=function(Me){return Ne(Me)===h},reactIs_production_min$1.isContextProvider=function(Me){return Ne(Me)===p},reactIs_production_min$1.isElement=function(Me){return typeof Me=="object"&&Me!==null&&Me.$$typeof===i},reactIs_production_min$1.isForwardRef=function(Me){return Ne(Me)===E},reactIs_production_min$1.isFragment=function(Me){return Ne(Me)===t},reactIs_production_min$1.isLazy=function(Me){return Ne(Me)===be},reactIs_production_min$1.isMemo=function(Me){return Ne(Me)===Z},reactIs_production_min$1.isPortal=function(Me){return Ne(Me)===e},reactIs_production_min$1.isProfiler=function(Me){return Ne(Me)===d},reactIs_production_min$1.isStrictMode=function(Me){return Ne(Me)===o},reactIs_production_min$1.isSuspense=function(Me){return Ne(Me)===M},reactIs_production_min$1.isValidElementType=function(Me){return typeof Me=="string"||typeof Me=="function"||Me===t||Me===$||Me===d||Me===o||Me===M||Me===H||typeof Me=="object"&&Me!==null&&(Me.$$typeof===be||Me.$$typeof===Z||Me.$$typeof===p||Me.$$typeof===h||Me.$$typeof===E||Me.$$typeof===we||Me.$$typeof===xe||Me.$$typeof===Ce||Me.$$typeof===ye)},reactIs_production_min$1.typeOf=Ne,reactIs_production_min$1}var hasRequiredReactIs$1;function requireReactIs$1(){return hasRequiredReactIs$1||(hasRequiredReactIs$1=1,reactIs$1.exports=requireReactIs_production_min$1()),reactIs$1.exports}var hoistNonReactStatics_cjs,hasRequiredHoistNonReactStatics_cjs;function requireHoistNonReactStatics_cjs(){if(hasRequiredHoistNonReactStatics_cjs)return hoistNonReactStatics_cjs;hasRequiredHoistNonReactStatics_cjs=1;var n=requireReactIs$1(),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},t={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},d={};d[n.ForwardRef]=t,d[n.Memo]=o;function p(be){return n.isMemo(be)?o:d[be.$$typeof]||i}var h=Object.defineProperty,y=Object.getOwnPropertyNames,$=Object.getOwnPropertySymbols,E=Object.getOwnPropertyDescriptor,M=Object.getPrototypeOf,H=Object.prototype;function Z(be,ye,we){if(typeof ye!="string"){if(H){var xe=M(ye);xe&&xe!==H&&Z(be,xe,we)}var Ce=y(ye);$&&(Ce=Ce.concat($(ye)));for(var Ne=p(be),Fe=p(ye),Me=0;Me<Ce.length;++Me){var Le=Ce[Me];if(!e[Le]&&!(we&&we[Le])&&!(Fe&&Fe[Le])&&!(Ne&&Ne[Le])){var ze=E(ye,Le);try{h(be,Le,ze)}catch{}}}}return be}return hoistNonReactStatics_cjs=Z,hoistNonReactStatics_cjs}var hoistNonReactStatics_cjsExports=requireHoistNonReactStatics_cjs();const hoistNonReactStatics=getDefaultExportFromCjs(hoistNonReactStatics_cjsExports);var isBrowser$2=!0;function getRegisteredStyles(n,i,e){var t="";return e.split(" ").forEach(function(o){n[o]!==void 0?i.push(n[o]+";"):o&&(t+=o+" ")}),t}var registerStyles=function(i,e,t){var o=i.key+"-"+e.name;(t===!1||isBrowser$2===!1)&&i.registered[o]===void 0&&(i.registered[o]=e.styles)},insertStyles=function(i,e,t){registerStyles(i,e,t);var o=i.key+"-"+e.name;if(i.inserted[e.name]===void 0){var d=e;do i.insert(e===d?"."+o:"",d,i.sheet,!0),d=d.next;while(d!==void 0)}};function murmur2(n){for(var i=0,e,t=0,o=n.length;o>=4;++t,o-=4)e=n.charCodeAt(t)&255|(n.charCodeAt(++t)&255)<<8|(n.charCodeAt(++t)&255)<<16|(n.charCodeAt(++t)&255)<<24,e=(e&65535)*1540483477+((e>>>16)*59797<<16),e^=e>>>24,i=(e&65535)*1540483477+((e>>>16)*59797<<16)^(i&65535)*1540483477+((i>>>16)*59797<<16);switch(o){case 3:i^=(n.charCodeAt(t+2)&255)<<16;case 2:i^=(n.charCodeAt(t+1)&255)<<8;case 1:i^=n.charCodeAt(t)&255,i=(i&65535)*1540483477+((i>>>16)*59797<<16)}return i^=i>>>13,i=(i&65535)*1540483477+((i>>>16)*59797<<16),((i^i>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(i){return i.charCodeAt(1)===45},isProcessableValue=function(i){return i!=null&&typeof i!="boolean"},processStyleName=memoize$1(function(n){return isCustomProperty(n)?n:n.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(i,e){switch(i){case"animation":case"animationName":if(typeof e=="string")return e.replace(animationRegex,function(t,o,d){return cursor$1={name:o,styles:d,next:cursor$1},o})}return unitlessKeys[i]!==1&&!isCustomProperty(i)&&typeof e=="number"&&e!==0?e+"px":e};function handleInterpolation(n,i,e){if(e==null)return"";var t=e;if(t.__emotion_styles!==void 0)return t;switch(typeof e){case"boolean":return"";case"object":{var o=e;if(o.anim===1)return cursor$1={name:o.name,styles:o.styles,next:cursor$1},o.name;var d=e;if(d.styles!==void 0){var p=d.next;if(p!==void 0)for(;p!==void 0;)cursor$1={name:p.name,styles:p.styles,next:cursor$1},p=p.next;var h=d.styles+";";return h}return createStringFromObject(n,i,e)}case"function":{if(n!==void 0){var y=cursor$1,$=e(n);return cursor$1=y,handleInterpolation(n,i,$)}break}}var E=e;if(i==null)return E;var M=i[E];return M!==void 0?M:E}function createStringFromObject(n,i,e){var t="";if(Array.isArray(e))for(var o=0;o<e.length;o++)t+=handleInterpolation(n,i,e[o])+";";else for(var d in e){var p=e[d];if(typeof p!="object"){var h=p;i!=null&&i[h]!==void 0?t+=d+"{"+i[h]+"}":isProcessableValue(h)&&(t+=processStyleName(d)+":"+processStyleValue(d,h)+";")}else if(Array.isArray(p)&&typeof p[0]=="string"&&(i==null||i[p[0]]===void 0))for(var y=0;y<p.length;y++)isProcessableValue(p[y])&&(t+=processStyleName(d)+":"+processStyleValue(d,p[y])+";");else{var $=handleInterpolation(n,i,p);switch(d){case"animation":case"animationName":{t+=processStyleName(d)+":"+$+";";break}default:t+=d+"{"+$+"}"}}}return t}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor$1;function serializeStyles(n,i,e){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var t=!0,o="";cursor$1=void 0;var d=n[0];if(d==null||d.raw===void 0)t=!1,o+=handleInterpolation(e,i,d);else{var p=d;o+=p[0]}for(var h=1;h<n.length;h++)if(o+=handleInterpolation(e,i,n[h]),t){var y=d;o+=y[h]}labelPattern.lastIndex=0;for(var $="",E;(E=labelPattern.exec(o))!==null;)$+="-"+E[1];var M=murmur2(o)+$;return{name:M,styles:o,next:cursor$1}}var syncFallback=function(i){return i()},useInsertionEffect=React$1.useInsertionEffect?React$1.useInsertionEffect:!1,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect||syncFallback,useInsertionEffectWithLayoutFallback=useInsertionEffect||reactExports.useLayoutEffect,EmotionCacheContext=reactExports.createContext(typeof HTMLElement<"u"?createCache({key:"css"}):null),CacheProvider=EmotionCacheContext.Provider,withEmotionCache=function(i){return reactExports.forwardRef(function(e,t){var o=reactExports.useContext(EmotionCacheContext);return i(e,o,t)})},ThemeContext$2=reactExports.createContext({}),useTheme=function(){return reactExports.useContext(ThemeContext$2)},getTheme=function(i,e){if(typeof e=="function"){var t=e(i);return t}return _extends$A({},i,e)},createCacheWithTheme=weakMemoize(function(n){return weakMemoize(function(i){return getTheme(n,i)})}),ThemeProvider$2=function(i){var e=reactExports.useContext(ThemeContext$2);return i.theme!==e&&(e=createCacheWithTheme(e)(i.theme)),reactExports.createElement(ThemeContext$2.Provider,{value:e},i.children)},hasOwn={}.hasOwnProperty,typePropName="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",createEmotionProps=function(i,e){var t={};for(var o in e)hasOwn.call(e,o)&&(t[o]=e[o]);return t[typePropName]=i,t},Insertion$1=function(i){var e=i.cache,t=i.serialized,o=i.isStringTag;return registerStyles(e,t,o),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(e,t,o)}),null},Emotion=withEmotionCache(function(n,i,e){var t=n.css;typeof t=="string"&&i.registered[t]!==void 0&&(t=i.registered[t]);var o=n[typePropName],d=[t],p="";typeof n.className=="string"?p=getRegisteredStyles(i.registered,d,n.className):n.className!=null&&(p=n.className+" ");var h=serializeStyles(d,void 0,reactExports.useContext(ThemeContext$2));p+=i.key+"-"+h.name;var y={};for(var $ in n)hasOwn.call(n,$)&&$!=="css"&&$!==typePropName&&(y[$]=n[$]);return y.className=p,e&&(y.ref=e),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion$1,{cache:i,serialized:h,isStringTag:typeof o=="string"}),reactExports.createElement(o,y))}),Emotion$1=Emotion,Fragment=jsxRuntimeExports.Fragment,jsx$1=function(i,e,t){return hasOwn.call(e,"css")?jsxRuntimeExports.jsx(Emotion$1,createEmotionProps(i,e),t):jsxRuntimeExports.jsx(i,e,t)},jsxs=function(i,e,t){return hasOwn.call(e,"css")?jsxRuntimeExports.jsxs(Emotion$1,createEmotionProps(i,e),t):jsxRuntimeExports.jsxs(i,e,t)},loglevel$1={exports:{}},loglevel=loglevel$1.exports,hasRequiredLoglevel;function requireLoglevel(){return hasRequiredLoglevel||(hasRequiredLoglevel=1,(function(n){(function(i,e){n.exports?n.exports=e():i.log=e()})(loglevel,function(){var i=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],d={},p=null;function h(ye,we){var xe=ye[we];if(typeof xe.bind=="function")return xe.bind(ye);try{return Function.prototype.bind.call(xe,ye)}catch{return function(){return Function.prototype.apply.apply(xe,[ye,arguments])}}}function y(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function $(ye){return ye==="debug"&&(ye="log"),typeof console===e?!1:ye==="trace"&&t?y:console[ye]!==void 0?h(console,ye):console.log!==void 0?h(console,"log"):i}function E(){for(var ye=this.getLevel(),we=0;we<o.length;we++){var xe=o[we];this[xe]=we<ye?i:this.methodFactory(xe,ye,this.name)}if(this.log=this.debug,typeof console===e&&ye<this.levels.SILENT)return"No console available for logging"}function M(ye){return function(){typeof console!==e&&(E.call(this),this[ye].apply(this,arguments))}}function H(ye,we,xe){return $(ye)||M.apply(this,arguments)}function Z(ye,we){var xe=this,Ce,Ne,Fe,Me="loglevel";typeof ye=="string"?Me+=":"+ye:typeof ye=="symbol"&&(Me=void 0);function Le(We){var Xe=(o[We]||"silent").toUpperCase();if(!(typeof window===e||!Me)){try{window.localStorage[Me]=Xe;return}catch{}try{window.document.cookie=encodeURIComponent(Me)+"="+Xe+";"}catch{}}}function ze(){var We;if(!(typeof window===e||!Me)){try{We=window.localStorage[Me]}catch{}if(typeof We===e)try{var Xe=window.document.cookie,Qe=encodeURIComponent(Me),Ye=Xe.indexOf(Qe+"=");Ye!==-1&&(We=/^([^;]+)/.exec(Xe.slice(Ye+Qe.length+1))[1])}catch{}return xe.levels[We]===void 0&&(We=void 0),We}}function Ke(){if(!(typeof window===e||!Me)){try{window.localStorage.removeItem(Me)}catch{}try{window.document.cookie=encodeURIComponent(Me)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function Ve(We){var Xe=We;if(typeof Xe=="string"&&xe.levels[Xe.toUpperCase()]!==void 0&&(Xe=xe.levels[Xe.toUpperCase()]),typeof Xe=="number"&&Xe>=0&&Xe<=xe.levels.SILENT)return Xe;throw new TypeError("log.setLevel() called with invalid level: "+We)}xe.name=ye,xe.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},xe.methodFactory=we||H,xe.getLevel=function(){return Fe??Ne??Ce},xe.setLevel=function(We,Xe){return Fe=Ve(We),Xe!==!1&&Le(Fe),E.call(xe)},xe.setDefaultLevel=function(We){Ne=Ve(We),ze()||xe.setLevel(We,!1)},xe.resetLevel=function(){Fe=null,Ke(),E.call(xe)},xe.enableAll=function(We){xe.setLevel(xe.levels.TRACE,We)},xe.disableAll=function(We){xe.setLevel(xe.levels.SILENT,We)},xe.rebuild=function(){if(p!==xe&&(Ce=Ve(p.getLevel())),E.call(xe),p===xe)for(var We in d)d[We].rebuild()},Ce=Ve(p?p.getLevel():"WARN");var je=ze();je!=null&&(Fe=Ve(je)),E.call(xe)}p=new Z,p.getLogger=function(we){if(typeof we!="symbol"&&typeof we!="string"||we==="")throw new TypeError("You must supply a name when creating a logger.");var xe=d[we];return xe||(xe=d[we]=new Z(we,p.methodFactory)),xe};var be=typeof window!==e?window.log:void 0;return p.noConflict=function(){return typeof window!==e&&window.log===p&&(window.log=be),p},p.getLoggers=function(){return d},p.default=p,p})})(loglevel$1)),loglevel$1.exports}var loglevelExports=requireLoglevel(),client={},reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};var hasRequiredScheduler_production_min;function requireScheduler_production_min(){return hasRequiredScheduler_production_min||(hasRequiredScheduler_production_min=1,(function(n){function i(st,pt){var Be=st.length;st.push(pt);e:for(;0<Be;){var qe=Be-1>>>1,rt=st[qe];if(0<o(rt,pt))st[qe]=pt,st[Be]=rt,Be=qe;else break e}}function e(st){return st.length===0?null:st[0]}function t(st){if(st.length===0)return null;var pt=st[0],Be=st.pop();if(Be!==pt){st[0]=Be;e:for(var qe=0,rt=st.length,He=rt>>>1;qe<He;){var Ot=2*(qe+1)-1,Ct=st[Ot],tt=Ot+1,wt=st[tt];if(0>o(Ct,Be))tt<rt&&0>o(wt,Ct)?(st[qe]=wt,st[tt]=Be,qe=tt):(st[qe]=Ct,st[Ot]=Be,qe=Ot);else if(tt<rt&&0>o(wt,Be))st[qe]=wt,st[tt]=Be,qe=tt;else break e}}return pt}function o(st,pt){var Be=st.sortIndex-pt.sortIndex;return Be!==0?Be:st.id-pt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var p=Date,h=p.now();n.unstable_now=function(){return p.now()-h}}var y=[],$=[],E=1,M=null,H=3,Z=!1,be=!1,ye=!1,we=typeof setTimeout=="function"?setTimeout:null,xe=typeof clearTimeout=="function"?clearTimeout:null,Ce=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ne(st){for(var pt=e($);pt!==null;){if(pt.callback===null)t($);else if(pt.startTime<=st)t($),pt.sortIndex=pt.expirationTime,i(y,pt);else break;pt=e($)}}function Fe(st){if(ye=!1,Ne(st),!be)if(e(y)!==null)be=!0,ot(Me);else{var pt=e($);pt!==null&&dt(Fe,pt.startTime-st)}}function Me(st,pt){be=!1,ye&&(ye=!1,xe(Ke),Ke=-1),Z=!0;var Be=H;try{for(Ne(pt),M=e(y);M!==null&&(!(M.expirationTime>pt)||st&&!We());){var qe=M.callback;if(typeof qe=="function"){M.callback=null,H=M.priorityLevel;var rt=qe(M.expirationTime<=pt);pt=n.unstable_now(),typeof rt=="function"?M.callback=rt:M===e(y)&&t(y),Ne(pt)}else t(y);M=e(y)}if(M!==null)var He=!0;else{var Ot=e($);Ot!==null&&dt(Fe,Ot.startTime-pt),He=!1}return He}finally{M=null,H=Be,Z=!1}}var Le=!1,ze=null,Ke=-1,Ve=5,je=-1;function We(){return!(n.unstable_now()-je<Ve)}function Xe(){if(ze!==null){var st=n.unstable_now();je=st;var pt=!0;try{pt=ze(!0,st)}finally{pt?Qe():(Le=!1,ze=null)}}else Le=!1}var Qe;if(typeof Ce=="function")Qe=function(){Ce(Xe)};else if(typeof MessageChannel<"u"){var Ye=new MessageChannel,Ue=Ye.port2;Ye.port1.onmessage=Xe,Qe=function(){Ue.postMessage(null)}}else Qe=function(){we(Xe,0)};function ot(st){ze=st,Le||(Le=!0,Qe())}function dt(st,pt){Ke=we(function(){st(n.unstable_now())},pt)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(st){st.callback=null},n.unstable_continueExecution=function(){be||Z||(be=!0,ot(Me))},n.unstable_forceFrameRate=function(st){0>st||125<st?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ve=0<st?Math.floor(1e3/st):5},n.unstable_getCurrentPriorityLevel=function(){return H},n.unstable_getFirstCallbackNode=function(){return e(y)},n.unstable_next=function(st){switch(H){case 1:case 2:case 3:var pt=3;break;default:pt=H}var Be=H;H=pt;try{return st()}finally{H=Be}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(st,pt){switch(st){case 1:case 2:case 3:case 4:case 5:break;default:st=3}var Be=H;H=st;try{return pt()}finally{H=Be}},n.unstable_scheduleCallback=function(st,pt,Be){var qe=n.unstable_now();switch(typeof Be=="object"&&Be!==null?(Be=Be.delay,Be=typeof Be=="number"&&0<Be?qe+Be:qe):Be=qe,st){case 1:var rt=-1;break;case 2:rt=250;break;case 5:rt=1073741823;break;case 4:rt=1e4;break;default:rt=5e3}return rt=Be+rt,st={id:E++,callback:pt,priorityLevel:st,startTime:Be,expirationTime:rt,sortIndex:-1},Be>qe?(st.sortIndex=Be,i($,st),e(y)===null&&st===e($)&&(ye?(xe(Ke),Ke=-1):ye=!0,dt(Fe,Be-qe))):(st.sortIndex=rt,i(y,st),be||Z||(be=!0,ot(Me))),st},n.unstable_shouldYield=We,n.unstable_wrapCallback=function(st){var pt=H;return function(){var Be=H;H=pt;try{return st.apply(this,arguments)}finally{H=Be}}}})(scheduler_production_min)),scheduler_production_min}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production_min()),scheduler.exports}var hasRequiredReactDom_production_min;function requireReactDom_production_min(){if(hasRequiredReactDom_production_min)return reactDom_production_min;hasRequiredReactDom_production_min=1;var n=requireReact(),i=requireScheduler();function e(g){for(var k="https://reactjs.org/docs/error-decoder.html?invariant="+g,X=1;X<arguments.length;X++)k+="&args[]="+encodeURIComponent(arguments[X]);return"Minified React error #"+g+"; visit "+k+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=new Set,o={};function d(g,k){p(g,k),p(g+"Capture",k)}function p(g,k){for(o[g]=k,g=0;g<k.length;g++)t.add(k[g])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,$=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,E={},M={};function H(g){return y.call(M,g)?!0:y.call(E,g)?!1:$.test(g)?M[g]=!0:(E[g]=!0,!1)}function Z(g,k,X,ve){if(X!==null&&X.type===0)return!1;switch(typeof k){case"function":case"symbol":return!0;case"boolean":return ve?!1:X!==null?!X.acceptsBooleans:(g=g.toLowerCase().slice(0,5),g!=="data-"&&g!=="aria-");default:return!1}}function be(g,k,X,ve){if(k===null||typeof k>"u"||Z(g,k,X,ve))return!0;if(ve)return!1;if(X!==null)switch(X.type){case 3:return!k;case 4:return k===!1;case 5:return isNaN(k);case 6:return isNaN(k)||1>k}return!1}function ye(g,k,X,ve,$e,Ie,De){this.acceptsBooleans=k===2||k===3||k===4,this.attributeName=ve,this.attributeNamespace=$e,this.mustUseProperty=X,this.propertyName=g,this.type=k,this.sanitizeURL=Ie,this.removeEmptyString=De}var we={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(g){we[g]=new ye(g,0,!1,g,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(g){var k=g[0];we[k]=new ye(k,1,!1,g[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(g){we[g]=new ye(g,2,!1,g.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(g){we[g]=new ye(g,2,!1,g,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(g){we[g]=new ye(g,3,!1,g.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(g){we[g]=new ye(g,3,!0,g,null,!1,!1)}),["capture","download"].forEach(function(g){we[g]=new ye(g,4,!1,g,null,!1,!1)}),["cols","rows","size","span"].forEach(function(g){we[g]=new ye(g,6,!1,g,null,!1,!1)}),["rowSpan","start"].forEach(function(g){we[g]=new ye(g,5,!1,g.toLowerCase(),null,!1,!1)});var xe=/[\-:]([a-z])/g;function Ce(g){return g[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(g){we[g]=new ye(g,1,!1,g.toLowerCase(),null,!1,!1)}),we.xlinkHref=new ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(g){we[g]=new ye(g,1,!1,g.toLowerCase(),null,!0,!0)});function Ne(g,k,X,ve){var $e=we.hasOwnProperty(k)?we[k]:null;($e!==null?$e.type!==0:ve||!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N")&&(be(k,X,$e,ve)&&(X=null),ve||$e===null?H(k)&&(X===null?g.removeAttribute(k):g.setAttribute(k,""+X)):$e.mustUseProperty?g[$e.propertyName]=X===null?$e.type===3?!1:"":X:(k=$e.attributeName,ve=$e.attributeNamespace,X===null?g.removeAttribute(k):($e=$e.type,X=$e===3||$e===4&&X===!0?"":""+X,ve?g.setAttributeNS(ve,k,X):g.setAttribute(k,X))))}var Fe=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Me=Symbol.for("react.element"),Le=Symbol.for("react.portal"),ze=Symbol.for("react.fragment"),Ke=Symbol.for("react.strict_mode"),Ve=Symbol.for("react.profiler"),je=Symbol.for("react.provider"),We=Symbol.for("react.context"),Xe=Symbol.for("react.forward_ref"),Qe=Symbol.for("react.suspense"),Ye=Symbol.for("react.suspense_list"),Ue=Symbol.for("react.memo"),ot=Symbol.for("react.lazy"),dt=Symbol.for("react.offscreen"),st=Symbol.iterator;function pt(g){return g===null||typeof g!="object"?null:(g=st&&g[st]||g["@@iterator"],typeof g=="function"?g:null)}var Be=Object.assign,qe;function rt(g){if(qe===void 0)try{throw Error()}catch(X){var k=X.stack.trim().match(/\n( *(at )?)/);qe=k&&k[1]||""}return`
|
|
3
3
|
`+qe+g}var He=!1;function Ot(g,k){if(!g||He)return"";He=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(k)if(k=function(){throw Error()},Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(at){var ve=at}Reflect.construct(g,[],k)}else{try{k.call()}catch(at){ve=at}g.call(k.prototype)}else{try{throw Error()}catch(at){ve=at}g()}}catch(at){if(at&&ve&&typeof at.stack=="string"){for(var $e=at.stack.split(`
|
|
4
4
|
`),Ie=ve.stack.split(`
|
|
@@ -47,7 +47,7 @@ but was expecting \`${JSON.stringify(t)}\`.
|
|
|
47
47
|
`;const y=new DebugVisitor(h,!0);i+=e.accept(y)}),i}}var classnames={exports:{}};var hasRequiredClassnames;function requireClassnames(){return hasRequiredClassnames||(hasRequiredClassnames=1,(function(n){(function(){var i={}.hasOwnProperty;function e(){for(var d="",p=0;p<arguments.length;p++){var h=arguments[p];h&&(d=o(d,t(h)))}return d}function t(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return e.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var p="";for(var h in d)i.call(d,h)&&d[h]&&(p=o(p,h));return p}function o(d,p){return p?d?d+" "+p:d+p:d}n.exports?(e.default=e,n.exports=e):window.classNames=e})()})(classnames)),classnames.exports}var classnamesExports=requireClassnames();const classNames=getDefaultExportFromCjs(classnamesExports);var Direction=(function(n){return n.HORIZONTAL="row",n.VERTICAL="column",n})({});function getDirectionOfBlock(n){return n.flexContainer?n.flexContainer.direction==Block$1.FlexContainer.Direction.HORIZONTAL?"row":"column":n.vertical?"column":n.horizontal?"row":"column"}function shouldWidthStretch(n){return!!(n?.useStretch||n?.pixelWidth)}function shouldHeightStretch(n){return!!(n?.useStretch||n?.pixelHeight)}const alignmentMap={[streamlit.TextAlignmentConfig.Alignment.LEFT]:"left",[streamlit.TextAlignmentConfig.Alignment.CENTER]:"center",[streamlit.TextAlignmentConfig.Alignment.RIGHT]:"right",[streamlit.TextAlignmentConfig.Alignment.JUSTIFY]:"justify",[streamlit.TextAlignmentConfig.Alignment.UNSPECIFIED]:"left"};function getTextAlignmentStyle(n){if(n?.alignment)return alignmentMap[n.alignment]||"left"}const FlexContext=reactExports.createContext(null);FlexContext.displayName="FlexContext";const FlexContextProvider=({children:n,direction:i,isRoot:e,parentWidth:t,hasContentWidth:o=!1,hasFixedWidth:d=!1,parentContext:p=null})=>{const h=reactExports.useMemo(()=>{const y=i===Direction.HORIZONTAL;let $;return o?$=!0:d?$=!1:$=p?.isInContentWidthContainer??!1,{direction:i,isInHorizontalLayout:y,isInRoot:e??!1,parentWidth:t,isInContentWidthContainer:$}},[i,e,t,o,d,p]);return jsx$1(FlexContext.Provider,{value:h,children:n})};function guard(n,i,e){return Math.min(Math.max(n,e),i)}class ColorError extends Error{constructor(i){super(`Failed to parse color: "${i}"`)}}var ColorError$1=ColorError;function parseToRgba(n){if(typeof n!="string")throw new ColorError$1(n);if(n.trim().toLowerCase()==="transparent")return[0,0,0,0];let i=n.trim();i=namedColorRegex.test(n)?nameToHex(n):n;const e=reducedHexRegex.exec(i);if(e){const p=Array.from(e).slice(1);return[...p.slice(0,3).map(h=>parseInt(r$1(h,2),16)),parseInt(r$1(p[3]||"f",2),16)/255]}const t=hexRegex.exec(i);if(t){const p=Array.from(t).slice(1);return[...p.slice(0,3).map(h=>parseInt(h,16)),parseInt(p[3]||"ff",16)/255]}const o=rgbaRegex.exec(i);if(o){const p=Array.from(o).slice(1);return[...p.slice(0,3).map(h=>parseInt(h,10)),parseFloat(p[3]||"1")]}const d=hslaRegex.exec(i);if(d){const[p,h,y,$]=Array.from(d).slice(1).map(parseFloat);if(guard(0,100,h)!==h)throw new ColorError$1(n);if(guard(0,100,y)!==y)throw new ColorError$1(n);return[...hslToRgb(p,h,y),Number.isNaN($)?1:$]}throw new ColorError$1(n)}function hash(n){let i=5381,e=n.length;for(;e;)i=i*33^n.charCodeAt(--e);return(i>>>0)%2341}const colorToInt=n=>parseInt(n.replace(/_/g,""),36),compressedColorMap="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((n,i)=>{const e=colorToInt(i.substring(0,3)),t=colorToInt(i.substring(3)).toString(16);let o="";for(let d=0;d<6-t.length;d++)o+="0";return n[e]=`${o}${t}`,n},{});function nameToHex(n){const i=n.toLowerCase().trim(),e=compressedColorMap[hash(i)];if(!e)throw new ColorError$1(n);return`#${e}`}const r$1=(n,i)=>Array.from(Array(i)).map(()=>n).join(""),reducedHexRegex=new RegExp(`^#${r$1("([a-f0-9])",3)}([a-f0-9])?$`,"i"),hexRegex=new RegExp(`^#${r$1("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),rgbaRegex=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r$1(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),hslaRegex=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,namedColorRegex=/^[a-z]+$/i,roundColor=n=>Math.round(n*255),hslToRgb=(n,i,e)=>{let t=e/100;if(i===0)return[t,t,t].map(roundColor);const o=(n%360+360)%360/60,d=(1-Math.abs(2*t-1))*(i/100),p=d*(1-Math.abs(o%2-1));let h=0,y=0,$=0;o>=0&&o<1?(h=d,y=p):o>=1&&o<2?(h=p,y=d):o>=2&&o<3?(y=d,$=p):o>=3&&o<4?(y=p,$=d):o>=4&&o<5?(h=p,$=d):o>=5&&o<6&&(h=d,$=p);const E=t-d/2,M=h+E,H=y+E,Z=$+E;return[M,H,Z].map(roundColor)};function parseToHsla(n){const[i,e,t,o]=parseToRgba(n).map((M,H)=>H===3?M:M/255),d=Math.max(i,e,t),p=Math.min(i,e,t),h=(d+p)/2;if(d===p)return[0,0,h,o];const y=d-p,$=h>.5?y/(2-d-p):y/(d+p);return[60*(i===d?(e-t)/y+(e<t?6:0):e===d?(t-i)/y+2:(i-e)/y+4),$,h,o]}function hsla(n,i,e,t){return`hsla(${(n%360).toFixed()}, ${guard(0,100,i*100).toFixed()}%, ${guard(0,100,e*100).toFixed()}%, ${parseFloat(guard(0,1,t).toFixed(3))})`}function darken(n,i){const[e,t,o,d]=parseToHsla(n);return hsla(e,t,o-i,d)}function getLuminance(n){if(n==="transparent")return 0;function i(d){const p=d/255;return p<=.04045?p/12.92:Math.pow((p+.055)/1.055,2.4)}const[e,t,o]=parseToRgba(n);return .2126*i(e)+.7152*i(t)+.0722*i(o)}function rgba$1(n,i,e,t){return`rgba(${guard(0,255,n).toFixed()}, ${guard(0,255,i).toFixed()}, ${guard(0,255,e).toFixed()}, ${parseFloat(guard(0,1,t).toFixed(3))})`}function mix$1(n,i,e){const t=(Me,Le)=>Le===3?Me:Me/255,[o,d,p,h]=parseToRgba(n).map(t),[y,$,E,M]=parseToRgba(i).map(t),H=M-h,Z=e*2-1,ye=((Z*H===-1?Z:Z+H/(1+Z*H))+1)/2,we=1-ye,xe=(o*we+y*ye)*255,Ce=(d*we+$*ye)*255,Ne=(p*we+E*ye)*255,Fe=M*e+h*(1-e);return rgba$1(xe,Ce,Ne,Fe)}function lighten(n,i){return darken(n,-i)}function transparentize(n,i){const[e,t,o,d]=parseToRgba(n);return rgba$1(e,t,o,d-i)}function toHex(n){const[i,e,t,o]=parseToRgba(n);let d=p=>{const h=guard(0,255,p).toString(16);return h.length===1?`0${h}`:h};return`#${d(i)}${d(e)}${d(t)}${o<1?d(Math.round(o*255)):""}`}var colors$1={white:"#FFFFFF",gray50:"#F6F6F6",gray100:"#EEEEEE",gray200:"#E2E2E2",gray300:"#CBCBCB",gray400:"#AFAFAF",gray500:"#6B6B6B",gray600:"#545454",gray700:"#333333",gray800:"#1F1F1F",gray900:"#141414",black:"#000000",platinum400:"#8EA3AD",red50:"#FFEFED",red100:"#FED7D2",red200:"#F1998E",red300:"#E85C4A",red400:"#E11900",red500:"#AB1300",red600:"#870F00",red700:"#5A0A00",orange200:"#FABDA5",orange300:"#FA9269",orange400:"#FF6937",orange500:"#C14F29",orange600:"#9A3F21",orange700:"#672A16",yellow50:"#FFFAF0",yellow100:"#FFF2D9",yellow200:"#FFE3AC",yellow300:"#FFCF70",yellow400:"#FFC043",yellow500:"#BC8B2C",yellow600:"#996F00",yellow700:"#674D1B",green50:"#E6F2ED",green100:"#ADDEC9",green200:"#66D19E",green300:"#06C167",green400:"#048848",green500:"#03703C",green600:"#03582F",green700:"#10462D",blue50:"#EFF3FE",blue100:"#D4E2FC",blue200:"#A0BFF8",blue300:"#5B91F5",blue400:"#276EF1",blue500:"#1E54B7",blue600:"#174291",blue700:"#102C60",cobalt400:"#0E1FC1",purple200:"#C1B4E2",purple300:"#957FCE",purple400:"#7356BF",purple500:"#574191",purple600:"#453473",purple700:"#2E224C",brown200:"#D2BBB0",brown300:"#B18977",brown400:"#99644C",brown500:"#744C3A",brown600:"#5C3C2E",brown700:"#3D281E"},lightColorTokens={primaryA:colors$1.black,primaryB:colors$1.white,primary:colors$1.black,primary50:colors$1.gray50,primary100:colors$1.gray100,primary200:colors$1.gray200,primary300:colors$1.gray300,primary400:colors$1.gray400,primary500:colors$1.gray500,primary600:colors$1.gray600,primary700:colors$1.gray700,accent:colors$1.blue400,accent50:colors$1.blue50,accent100:colors$1.blue100,accent200:colors$1.blue200,accent300:colors$1.blue300,accent400:colors$1.blue400,accent500:colors$1.blue500,accent600:colors$1.blue600,accent700:colors$1.blue700,negative:colors$1.red400,negative50:colors$1.red50,negative100:colors$1.red100,negative200:colors$1.red200,negative300:colors$1.red300,negative400:colors$1.red400,negative500:colors$1.red500,negative600:colors$1.red600,negative700:colors$1.red700,warning:colors$1.yellow400,warning50:colors$1.yellow50,warning100:colors$1.yellow100,warning200:colors$1.yellow200,warning300:colors$1.yellow300,warning400:colors$1.yellow400,warning500:colors$1.yellow500,warning600:colors$1.yellow600,warning700:colors$1.yellow700,positive:colors$1.green500,positive50:colors$1.green50,positive100:colors$1.green100,positive200:colors$1.green200,positive300:colors$1.green300,positive400:colors$1.green400,positive500:colors$1.green500,positive600:colors$1.green600,positive700:colors$1.green700,white:colors$1.white,black:colors$1.black,mono100:colors$1.white,mono200:colors$1.gray50,mono300:colors$1.gray100,mono400:colors$1.gray200,mono500:colors$1.gray300,mono600:colors$1.gray400,mono700:colors$1.gray500,mono800:colors$1.gray600,mono900:colors$1.gray700,mono1000:colors$1.black,ratingInactiveFill:colors$1.gray100,ratingStroke:colors$1.gray300};function hexToRgb(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"1",e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;n=n.replace(e,function(o,d,p,h){return d+d+p+p+h+h});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return t?"rgba(".concat(parseInt(t[1],16),", ").concat(parseInt(t[2],16),", ").concat(parseInt(t[3],16),", ").concat(i,")"):null}var ellipsisText={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordWrap:"normal"};function expandBorderStyles(n){return{borderTopWidth:n.borderWidth,borderTopStyle:n.borderStyle,borderTopColor:n.borderColor,borderBottomWidth:n.borderWidth,borderBottomStyle:n.borderStyle,borderBottomColor:n.borderColor,borderLeftWidth:n.borderWidth,borderLeftStyle:n.borderStyle,borderLeftColor:n.borderColor,borderRightWidth:n.borderWidth,borderRightStyle:n.borderStyle,borderRightColor:n.borderColor}}function ownKeys$x(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$w(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$x(Object(e),!0).forEach(function(t){_defineProperty$D(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$x(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$D(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}const getSemanticColorTokens=(function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lightColorTokens,i={backgroundPrimary:n.primaryB,backgroundSecondary:colors$1.gray50,backgroundTertiary:colors$1.gray100,backgroundInversePrimary:n.primaryA,backgroundInverseSecondary:colors$1.gray800,contentPrimary:n.primaryA,contentSecondary:colors$1.gray600,contentTertiary:colors$1.gray500,contentInversePrimary:n.primaryB,contentInverseSecondary:colors$1.gray300,contentInverseTertiary:colors$1.gray400,borderOpaque:colors$1.gray200,borderTransparent:hexToRgb(n.primaryA,"0.08"),borderSelected:n.primaryA,borderInverseOpaque:colors$1.gray700,borderInverseTransparent:hexToRgb(n.primaryB,"0.2"),borderInverseSelected:n.primaryB},e={backgroundStateDisabled:colors$1.gray50,backgroundOverlayDark:hexToRgb(colors$1.black,"0.3"),backgroundOverlayLight:hexToRgb(colors$1.black,"0.08"),backgroundOverlayArt:hexToRgb(colors$1.black,"0.00"),backgroundAccent:n.accent,backgroundNegative:n.negative,backgroundWarning:n.warning,backgroundPositive:colors$1.green400,backgroundLightAccent:colors$1.blue50,backgroundLightNegative:colors$1.red50,backgroundLightWarning:colors$1.yellow50,backgroundLightPositive:colors$1.green50,backgroundAlwaysDark:colors$1.black,backgroundAlwaysLight:colors$1.white,contentStateDisabled:colors$1.gray400,contentAccent:n.accent,contentOnColor:colors$1.white,contentOnColorInverse:colors$1.black,contentNegative:n.negative,contentWarning:colors$1.yellow600,contentPositive:colors$1.green400,borderStateDisabled:colors$1.gray50,borderAccent:colors$1.blue400,borderAccentLight:colors$1.blue200,borderNegative:colors$1.red200,borderWarning:colors$1.yellow200,borderPositive:colors$1.green200,safety:colors$1.blue400,eatsGreen400:colors$1.green400,freightBlue400:colors$1.cobalt400,jumpRed400:colors$1.red400,rewardsTier1:colors$1.blue400,rewardsTier2:colors$1.yellow400,rewardsTier3:colors$1.platinum400,rewardsTier4:colors$1.black,membership:colors$1.yellow600};return _objectSpread$w(_objectSpread$w({},i),e)});var tagHoverBackground="rgba(0, 0, 0, 0.08)";const getComponentColorTokens=(function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lightColorTokens;return{bannerActionLowInfo:n.accent100,bannerActionLowNegative:n.negative100,bannerActionLowPositive:n.positive100,bannerActionLowWarning:n.warning200,bannerActionHighInfo:n.accent500,bannerActionHighNegative:n.negative500,bannerActionHighPositive:n.positive500,bannerActionHighWarning:n.warning200,buttonPrimaryFill:n.primary,buttonPrimaryText:n.white,buttonPrimaryHover:n.primary700,buttonPrimaryActive:n.primary600,buttonPrimarySelectedFill:n.primary600,buttonPrimarySelectedText:n.white,buttonPrimarySpinnerForeground:n.accent,buttonPrimarySpinnerBackground:n.primaryB,buttonSecondaryFill:n.primary100,buttonSecondaryText:n.primary,buttonSecondaryHover:n.primary200,buttonSecondaryActive:n.primary300,buttonSecondarySelectedFill:n.primary300,buttonSecondarySelectedText:n.primary,buttonSecondarySpinnerForeground:n.accent,buttonSecondarySpinnerBackground:n.primaryB,buttonTertiaryFill:"transparent",buttonTertiaryText:n.primary,buttonTertiaryHover:n.primary50,buttonTertiaryActive:n.primary100,buttonTertiarySelectedFill:n.primary100,buttonTertiarySelectedText:n.primary,buttonTertiaryDisabledActiveFill:n.primary50,buttonTertiaryDisabledActiveText:n.mono600,buttonTertiarySpinnerForeground:n.accent,buttonTertiarySpinnerBackground:n.primary100,buttonDisabledFill:n.mono200,buttonDisabledText:n.mono600,buttonDisabledActiveFill:n.mono700,buttonDisabledActiveText:n.mono100,buttonDisabledSpinnerForeground:n.mono600,buttonDisabledSpinnerBackground:n.mono400,breadcrumbsText:n.black,breadcrumbsSeparatorFill:n.mono700,calendarBackground:n.mono100,calendarForeground:n.mono1000,calendarForegroundDisabled:n.mono500,calendarHeaderBackground:n.white,calendarHeaderForeground:n.primary,calendarHeaderBackgroundActive:n.primary700,calendarHeaderForegroundDisabled:n.primary500,calendarDayForegroundPseudoSelected:n.mono1000,calendarDayBackgroundPseudoSelectedHighlighted:n.primary200,calendarDayForegroundPseudoSelectedHighlighted:n.mono1000,calendarDayBackgroundSelected:n.primary,calendarDayForegroundSelected:n.white,calendarDayBackgroundSelectedHighlighted:n.primary,calendarDayForegroundSelectedHighlighted:n.white,comboboxListItemFocus:n.mono200,comboboxListItemHover:n.mono300,fileUploaderBackgroundColor:n.mono200,fileUploaderBackgroundColorActive:n.primary50,fileUploaderBorderColorActive:n.primary,fileUploaderBorderColorDefault:n.mono500,fileUploaderMessageColor:n.mono800,linkText:n.primary,linkVisited:n.primary700,linkHover:n.primary600,linkActive:n.primary500,listHeaderFill:n.white,listBodyFill:n.white,progressStepsCompletedText:n.white,progressStepsCompletedFill:n.primary,progressStepsActiveText:n.white,progressStepsActiveFill:n.primary,toggleFill:n.white,toggleFillChecked:n.primary,toggleFillDisabled:n.mono600,toggleTrackFill:n.mono400,toggleTrackFillDisabled:n.mono300,tickFill:n.mono100,tickFillHover:n.mono200,tickFillActive:n.mono300,tickFillSelected:n.primary,tickFillSelectedHover:n.primary700,tickFillSelectedHoverActive:n.primary600,tickFillError:n.negative50,tickFillErrorHover:n.negative100,tickFillErrorHoverActive:n.negative200,tickFillErrorSelected:n.negative400,tickFillErrorSelectedHover:n.negative500,tickFillErrorSelectedHoverActive:n.negative600,tickFillDisabled:n.mono600,tickBorder:n.mono700,tickBorderError:n.negative400,tickMarkFill:n.white,tickMarkFillError:n.white,tickMarkFillDisabled:n.mono100,sliderTrackFill:"transparent",sliderHandleFill:n.primaryA,sliderHandleFillDisabled:n.primary400,sliderHandleInnerFill:n.primaryA,sliderTrackFillHover:n.mono500,sliderTrackFillActive:n.mono600,sliderTrackFillDisabled:n.mono300,sliderHandleInnerFillDisabled:n.mono400,sliderHandleInnerFillSelectedHover:n.primary,sliderHandleInnerFillSelectedActive:n.primary500,inputBorder:n.mono300,inputFill:n.mono300,inputFillError:n.negative50,inputFillDisabled:n.mono200,inputFillActive:n.mono200,inputFillPositive:n.positive50,inputTextDisabled:n.mono600,inputBorderError:n.negative200,inputBorderPositive:n.positive200,inputEnhancerFill:n.mono300,inputEnhancerFillDisabled:n.mono300,inputEnhancerTextDisabled:n.mono600,inputPlaceholder:n.mono700,inputPlaceholderDisabled:n.mono600,menuFill:n.mono100,menuFillHover:n.mono200,menuFontDefault:n.mono800,menuFontDisabled:n.mono500,menuFontHighlighted:n.mono1000,menuFontSelected:n.mono1000,modalCloseColor:n.mono1000,modalCloseColorHover:n.mono800,modalCloseColorFocus:n.mono800,tabBarFill:n.mono200,tabColor:n.mono800,notificationInfoBackground:n.accent50,notificationInfoText:n.primaryA,notificationPositiveBackground:n.positive50,notificationPositiveText:n.primaryA,notificationWarningBackground:n.warning50,notificationWarningText:n.primaryA,notificationNegativeBackground:n.negative50,notificationNegativeText:n.primaryA,tagFontDisabledRampUnit:"100",tagSolidFontRampUnit:"0",tagSolidRampUnit:"400",tagOutlinedFontRampUnit:"400",tagOutlinedRampUnit:"200",tagSolidHoverRampUnit:"50",tagSolidActiveRampUnit:"100",tagSolidDisabledRampUnit:"50",tagSolidFontHoverRampUnit:"500",tagLightRampUnit:"50",tagLightHoverRampUnit:"100",tagLightActiveRampUnit:"100",tagLightFontRampUnit:"500",tagLightFontHoverRampUnit:"500",tagOutlinedHoverRampUnit:"50",tagOutlinedActiveRampUnit:"0",tagOutlinedFontHoverRampUnit:"400",tagNeutralFontDisabled:n.mono600,tagNeutralOutlinedDisabled:n.mono400,tagNeutralSolidFont:n.white,tagNeutralSolidBackground:n.black,tagNeutralOutlinedBackground:n.mono600,tagNeutralOutlinedFont:n.black,tagNeutralSolidHover:n.mono300,tagNeutralSolidActive:n.mono400,tagNeutralSolidDisabled:n.mono200,tagNeutralSolidFontHover:n.mono900,tagNeutralLightBackground:n.mono300,tagNeutralLightHover:n.mono300,tagNeutralLightActive:n.mono400,tagNeutralLightDisabled:n.mono200,tagNeutralLightFont:n.mono900,tagNeutralLightFontHover:n.mono900,tagNeutralOutlinedActive:n.mono900,tagNeutralOutlinedFontHover:n.mono800,tagNeutralOutlinedHover:tagHoverBackground,tagPrimaryFontDisabled:n.primary400,tagPrimaryOutlinedDisabled:n.primary200,tagPrimarySolidFont:n.white,tagPrimarySolidBackground:n.primary,tagPrimaryOutlinedFontHover:n.primary,tagPrimaryOutlinedFont:n.primary,tagPrimarySolidHover:n.primary100,tagPrimarySolidActive:n.primary200,tagPrimarySolidDisabled:n.primary50,tagPrimarySolidFontHover:n.primary700,tagPrimaryLightBackground:n.primary50,tagPrimaryLightHover:n.primary100,tagPrimaryLightActive:n.primary100,tagPrimaryLightDisabled:n.primary50,tagPrimaryLightFont:n.primary500,tagPrimaryLightFontHover:n.primary500,tagPrimaryOutlinedActive:n.primary600,tagPrimaryOutlinedHover:tagHoverBackground,tagPrimaryOutlinedBackground:n.primary400,tagAccentFontDisabled:n.accent200,tagAccentOutlinedDisabled:n.accent200,tagAccentSolidFont:n.white,tagAccentSolidBackground:n.accent400,tagAccentOutlinedBackground:n.accent200,tagAccentOutlinedFont:n.accent400,tagAccentSolidHover:n.accent50,tagAccentSolidActive:n.accent100,tagAccentSolidDisabled:n.accent50,tagAccentSolidFontHover:n.accent500,tagAccentLightBackground:n.accent50,tagAccentLightHover:n.accent100,tagAccentLightActive:n.accent100,tagAccentLightDisabled:n.accent50,tagAccentLightFont:n.accent500,tagAccentLightFontHover:n.accent500,tagAccentOutlinedActive:n.accent600,tagAccentOutlinedFontHover:n.accent400,tagAccentOutlinedHover:tagHoverBackground,tagPositiveFontDisabled:n.positive200,tagPositiveOutlinedDisabled:n.positive200,tagPositiveSolidFont:n.white,tagPositiveSolidBackground:n.positive400,tagPositiveOutlinedBackground:n.positive200,tagPositiveOutlinedFont:n.positive400,tagPositiveSolidHover:n.positive50,tagPositiveSolidActive:n.positive100,tagPositiveSolidDisabled:n.positive50,tagPositiveSolidFontHover:n.positive500,tagPositiveLightBackground:n.positive50,tagPositiveLightHover:n.positive100,tagPositiveLightActive:n.positive100,tagPositiveLightDisabled:n.positive50,tagPositiveLightFont:n.positive500,tagPositiveLightFontHover:n.positive500,tagPositiveOutlinedActive:n.positive600,tagPositiveOutlinedFontHover:n.positive400,tagPositiveOutlinedHover:tagHoverBackground,tagWarningFontDisabled:n.warning300,tagWarningOutlinedDisabled:n.warning300,tagWarningSolidFont:n.warning700,tagWarningSolidBackground:n.warning400,tagWarningOutlinedBackground:n.warning300,tagWarningOutlinedFont:n.warning600,tagWarningSolidHover:n.warning50,tagWarningSolidActive:n.warning100,tagWarningSolidDisabled:n.warning50,tagWarningSolidFontHover:n.warning500,tagWarningLightBackground:n.warning50,tagWarningLightHover:n.warning100,tagWarningLightActive:n.warning100,tagWarningLightDisabled:n.warning50,tagWarningLightFont:n.warning500,tagWarningLightFontHover:n.warning500,tagWarningOutlinedActive:n.warning600,tagWarningOutlinedFontHover:n.warning600,tagWarningOutlinedHover:tagHoverBackground,tagNegativeFontDisabled:n.negative200,tagNegativeOutlinedDisabled:n.negative200,tagNegativeSolidFont:n.white,tagNegativeSolidBackground:n.negative400,tagNegativeOutlinedBackground:n.negative200,tagNegativeOutlinedFont:n.negative400,tagNegativeSolidHover:n.negative50,tagNegativeSolidActive:n.negative100,tagNegativeSolidDisabled:n.negative50,tagNegativeSolidFontHover:n.negative500,tagNegativeLightBackground:n.negative50,tagNegativeLightHover:n.negative100,tagNegativeLightActive:n.negative100,tagNegativeLightDisabled:n.negative50,tagNegativeLightFont:n.negative500,tagNegativeLightFontHover:n.negative500,tagNegativeOutlinedActive:n.negative600,tagNegativeOutlinedFontHover:n.negative400,tagNegativeOutlinedHover:tagHoverBackground,tableHeadBackgroundColor:n.mono100,tableBackground:n.mono100,tableStripedBackground:n.mono200,tableFilter:n.mono600,tableFilterHeading:n.mono700,tableFilterBackground:n.mono100,tableFilterFooterBackground:n.mono200,toastText:n.white,toastPrimaryText:n.white,toastInfoBackground:n.accent400,toastInfoText:n.white,toastPositiveBackground:n.positive400,toastPositiveText:n.white,toastWarningBackground:n.warning400,toastWarningText:n.black,toastNegativeBackground:n.negative400,toastNegativeText:n.white,spinnerTrackFill:n.mono900,progressbarTrackFill:n.mono900,tooltipBackground:n.mono900,tooltipText:n.mono100}});var borders={border100:{borderColor:"hsla(0, 0%, 0%, 0.04)",borderStyle:"solid",borderWidth:"1px"},border200:{borderColor:"hsla(0, 0%, 0%, 0.08)",borderStyle:"solid",borderWidth:"1px"},border300:{borderColor:"hsla(0, 0%, 0%, 0.12)",borderStyle:"solid",borderWidth:"1px"},border400:{borderColor:"hsla(0, 0%, 0%, 0.16)",borderStyle:"solid",borderWidth:"1px"},border500:{borderColor:"hsla(0, 0%, 0%, 0.2)",borderStyle:"solid",borderWidth:"1px"},border600:{borderColor:"hsla(0, 0%, 0%, 0.24)",borderStyle:"solid",borderWidth:"1px"},radius100:"2px",radius200:"4px",radius300:"8px",radius400:"12px",radius500:"16px",useRoundedCorners:!0,buttonBorderRadiusMini:"4px",buttonBorderRadius:"8px",checkboxBorderRadius:"0px",inputBorderRadiusMini:"4px",inputBorderRadius:"8px",popoverBorderRadius:"8px",surfaceBorderRadius:"0px",tagBorderRadius:"24px"},lighting={shadow400:"0 1px 4px hsla(0, 0%, 0%, 0.16)",shadow500:"0 2px 8px hsla(0, 0%, 0%, 0.16)",shadow600:"0 4px 16px hsla(0, 0%, 0%, 0.16)",shadow700:"0 8px 24px hsla(0, 0%, 0%, 0.16)",overlay0:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0)",overlay100:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.04)",overlay200:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.08)",overlay300:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.12)",overlay400:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.16)",overlay500:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.2)",overlay600:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.24)",shallowAbove:"0px -4px 16px rgba(0, 0, 0, 0.12)",shallowBelow:"0px 4px 16px rgba(0, 0, 0, 0.12)",deepAbove:"0px -16px 48px rgba(0, 0, 0, 0.22)",deepBelow:"0px 16px 48px rgba(0, 0, 0, 0.22)"};function ownKeys$w(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$v(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$w(Object(e),!0).forEach(function(t){_defineProperty$C(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$w(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$C(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var defaultFontTokens={primaryFontFamily:'system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif'},monoFontFamily='"Lucida Console", Monaco, monospace';const getTypography=(function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:defaultFontTokens,i={fontFamily:n.primaryFontFamily,fontSize:"12px",fontWeight:"normal",lineHeight:"20px"},e={fontFamily:n.primaryFontFamily,fontSize:"12px",fontWeight:500,lineHeight:"16px"},t={fontFamily:n.primaryFontFamily,fontSize:"14px",fontWeight:"normal",lineHeight:"20px"},o={fontFamily:n.primaryFontFamily,fontSize:"14px",fontWeight:500,lineHeight:"16px"},d={fontFamily:n.primaryFontFamily,fontSize:"16px",fontWeight:"normal",lineHeight:"24px"},p={fontFamily:n.primaryFontFamily,fontSize:"16px",fontWeight:500,lineHeight:"20px"},h={fontFamily:n.primaryFontFamily,fontSize:"18px",fontWeight:"normal",lineHeight:"28px"},y={fontFamily:n.primaryFontFamily,fontSize:"18px",fontWeight:500,lineHeight:"24px"},$={fontFamily:n.primaryFontFamily,fontSize:"20px",fontWeight:700,lineHeight:"28px"},E={fontFamily:n.primaryFontFamily,fontSize:"24px",fontWeight:700,lineHeight:"32px"},M={fontFamily:n.primaryFontFamily,fontSize:"28px",fontWeight:700,lineHeight:"36px"},H={fontFamily:n.primaryFontFamily,fontSize:"32px",fontWeight:700,lineHeight:"40px"},Z={fontFamily:n.primaryFontFamily,fontSize:"36px",fontWeight:700,lineHeight:"44px"},be={fontFamily:n.primaryFontFamily,fontSize:"40px",fontWeight:700,lineHeight:"52px"},ye={fontFamily:n.primaryFontFamily,fontSize:"36px",fontWeight:700,lineHeight:"44px"},we={fontFamily:n.primaryFontFamily,fontSize:"44px",fontWeight:700,lineHeight:"52px"},xe={fontFamily:n.primaryFontFamily,fontSize:"52px",fontWeight:700,lineHeight:"64px"},Ce={fontFamily:n.primaryFontFamily,fontSize:"96px",fontWeight:700,lineHeight:"112px"};return{font100:i,font150:e,font200:t,font250:o,font300:d,font350:p,font400:h,font450:y,font550:$,font650:E,font750:M,font850:H,font950:Z,font1050:be,font1150:ye,font1250:we,font1350:xe,font1450:Ce,ParagraphXSmall:i,ParagraphSmall:t,ParagraphMedium:d,ParagraphLarge:h,LabelXSmall:e,LabelSmall:o,LabelMedium:p,LabelLarge:y,HeadingXSmall:$,HeadingSmall:E,HeadingMedium:M,HeadingLarge:H,HeadingXLarge:Z,HeadingXXLarge:be,DisplayXSmall:ye,DisplaySmall:we,DisplayMedium:xe,DisplayLarge:Ce,MonoParagraphXSmall:_objectSpread$v(_objectSpread$v({},i),{},{fontFamily:monoFontFamily}),MonoParagraphSmall:_objectSpread$v(_objectSpread$v({},t),{},{fontFamily:monoFontFamily}),MonoParagraphMedium:_objectSpread$v(_objectSpread$v({},d),{},{fontFamily:monoFontFamily}),MonoParagraphLarge:_objectSpread$v(_objectSpread$v({},h),{},{fontFamily:monoFontFamily}),MonoLabelXSmall:_objectSpread$v(_objectSpread$v({},e),{},{fontFamily:monoFontFamily}),MonoLabelSmall:_objectSpread$v(_objectSpread$v({},o),{},{fontFamily:monoFontFamily}),MonoLabelMedium:_objectSpread$v(_objectSpread$v({},p),{},{fontFamily:monoFontFamily}),MonoLabelLarge:_objectSpread$v(_objectSpread$v({},y),{},{fontFamily:monoFontFamily}),MonoHeadingXSmall:_objectSpread$v(_objectSpread$v({},$),{},{fontFamily:monoFontFamily}),MonoHeadingSmall:_objectSpread$v(_objectSpread$v({},E),{},{fontFamily:monoFontFamily}),MonoHeadingMedium:_objectSpread$v(_objectSpread$v({},M),{},{fontFamily:monoFontFamily}),MonoHeadingLarge:_objectSpread$v(_objectSpread$v({},H),{},{fontFamily:monoFontFamily}),MonoHeadingXLarge:_objectSpread$v(_objectSpread$v({},Z),{},{fontFamily:monoFontFamily}),MonoHeadingXXLarge:_objectSpread$v(_objectSpread$v({},be),{},{fontFamily:monoFontFamily}),MonoDisplayXSmall:_objectSpread$v(_objectSpread$v({},ye),{},{fontFamily:monoFontFamily}),MonoDisplaySmall:_objectSpread$v(_objectSpread$v({},we),{},{fontFamily:monoFontFamily}),MonoDisplayMedium:_objectSpread$v(_objectSpread$v({},xe),{},{fontFamily:monoFontFamily}),MonoDisplayLarge:_objectSpread$v(_objectSpread$v({},Ce),{},{fontFamily:monoFontFamily})}});var animation={timing100:"100ms",timing200:"200ms",timing300:"300ms",timing400:"400ms",timing500:"500ms",timing600:"600ms",timing700:"700ms",timing800:"800ms",timing900:"900ms",timing1000:"1000ms",easeInCurve:"cubic-bezier(.8, .2, .6, 1)",easeOutCurve:"cubic-bezier(.2, .8, .4, 1)",easeInOutCurve:"cubic-bezier(0.4, 0, 0.2, 1)",easeInQuinticCurve:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuinticCurve:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuinticCurve:"cubic-bezier(0.86, 0, 0.07, 1)",linearCurve:"cubic-bezier(0, 0, 1, 1)"},breakpoints$1={small:320,medium:600,large:1136},grid={columns:[4,8,12],gutters:[16,36,36],margins:[16,36,64],gaps:0,unit:"px",maxWidth:1280},getMediaQuery=function n(i){return"@media screen and (min-width: ".concat(i,"px)")},mediaQuery={small:getMediaQuery(breakpoints$1.small),medium:getMediaQuery(breakpoints$1.medium),large:getMediaQuery(breakpoints$1.large)},sizing={scale0:"2px",scale100:"4px",scale200:"6px",scale300:"8px",scale400:"10px",scale500:"12px",scale550:"14px",scale600:"16px",scale650:"18px",scale700:"20px",scale750:"22px",scale800:"24px",scale850:"28px",scale900:"32px",scale950:"36px",scale1000:"40px",scale1200:"48px",scale1400:"56px",scale1600:"64px",scale2400:"96px",scale3200:"128px",scale4800:"192px"};function ownKeys$v(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$u(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$v(Object(e),!0).forEach(function(t){_defineProperty$B(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$v(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$B(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var LightTheme={name:"light-theme",colors:_objectSpread$u(_objectSpread$u(_objectSpread$u({},lightColorTokens),getComponentColorTokens()),getSemanticColorTokens()),animation,breakpoints:breakpoints$1,borders,direction:"auto",grid,lighting,mediaQuery,sizing,typography:getTypography(),zIndex:{modal:2e3}};function _typeof$j(n){"@babel/helpers - typeof";return _typeof$j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$j(n)}function deepMerge(n){n=n||{};for(var i=arguments.length<=1?0:arguments.length-1,e,t,o=0;o<i;o++){e=(o+1<1||arguments.length<=o+1?void 0:arguments[o+1])||{};for(var d in e)_typeof$j(e[d])!==void 0&&(t=e[d],isCloneable(t)?n[d]=deepMerge(n[d]||Array.isArray(t)&&[]||{},t):n[d]=t)}return n}function isCloneable(n){return Array.isArray(n)||{}.toString.call(n)=="[object Object]"}var darkColorTokens={primaryA:colors$1.gray200,primaryB:colors$1.gray900,primary:colors$1.white,primary50:colors$1.gray50,primary100:colors$1.gray100,primary200:colors$1.gray200,primary300:colors$1.gray300,primary400:colors$1.gray400,primary500:colors$1.gray500,primary600:colors$1.gray600,primary700:colors$1.gray700,accent:colors$1.blue400,accent50:colors$1.blue50,accent100:colors$1.blue100,accent200:colors$1.blue200,accent300:colors$1.blue300,accent400:colors$1.blue400,accent500:colors$1.blue500,accent600:colors$1.blue600,accent700:colors$1.blue700,negative:colors$1.red500,negative50:colors$1.red50,negative100:colors$1.red100,negative200:colors$1.red200,negative300:colors$1.red300,negative400:colors$1.red400,negative500:colors$1.red500,negative600:colors$1.red600,negative700:colors$1.red700,warning:colors$1.yellow500,warning50:colors$1.yellow50,warning100:colors$1.yellow100,warning200:colors$1.yellow200,warning300:colors$1.yellow300,warning400:colors$1.yellow400,warning500:colors$1.yellow500,warning600:colors$1.yellow600,warning700:colors$1.yellow700,positive:colors$1.green400,positive50:colors$1.green50,positive100:colors$1.green100,positive200:colors$1.green200,positive300:colors$1.green300,positive400:colors$1.green400,positive500:colors$1.green500,positive600:colors$1.green600,positive700:colors$1.green700,white:colors$1.white,black:colors$1.black,mono100:colors$1.gray300,mono200:colors$1.gray400,mono300:colors$1.gray500,mono400:colors$1.gray600,mono500:colors$1.gray700,mono600:"#292929",mono700:"#1F1F1F",mono800:"#141414",mono900:"#111111",mono1000:colors$1.black,ratingInactiveFill:colors$1.gray500,ratingStroke:colors$1.gray700},_excluded$q=["primaryFontFamily"];function ownKeys$u(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$t(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$u(Object(e),!0).forEach(function(t){_defineProperty$A(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$u(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$A(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function _objectWithoutProperties$r(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$r(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$r(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function createLightTheme(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,e=n.primaryFontFamily,t=_objectWithoutProperties$r(n,_excluded$q),o=_objectSpread$t(_objectSpread$t({},lightColorTokens),t),d={animation,borders,breakpoints:breakpoints$1,colors:_objectSpread$t(_objectSpread$t(_objectSpread$t({},o),getComponentColorTokens(o)),getSemanticColorTokens(o)),direction:"auto",grid,lighting,mediaQuery,sizing,typography:e?getTypography({primaryFontFamily:e}):getTypography(),zIndex:{modal:2e3}};return deepMerge(d,i)}function ownKeys$t(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$s(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$t(Object(e),!0).forEach(function(t){_defineProperty$z(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$t(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$z(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var primitives$1=_objectSpread$s(_objectSpread$s({},darkColorTokens),defaultFontTokens);function ownKeys$s(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$r(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$s(Object(e),!0).forEach(function(t){_defineProperty$y(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$s(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$y(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var primitives=_objectSpread$r(_objectSpread$r({},lightColorTokens),defaultFontTokens),ThemeContext$1=reactExports.createContext(LightTheme),ThemeProvider$1=function n(i){var e=i.theme,t=i.children;return reactExports.createElement(ThemeContext$1.Provider,{value:e},t)};function ownKeys$r(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$q(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$r(Object(e),!0).forEach(function(t){_defineProperty$x(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$r(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$x(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function _slicedToArray$m(n,i){return _arrayWithHoles$m(n)||_iterableToArrayLimit$m(n,i)||_unsupportedIterableToArray$m(n,i)||_nonIterableRest$m()}function _nonIterableRest$m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
48
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$m(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$m(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$m(n,i)}}function _arrayLikeToArray$m(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$m(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$m(n){if(Array.isArray(n))return n}function _extends$y(){return _extends$y=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$y.apply(this,arguments)}var wrapper=function n(i){return reactExports.forwardRef(function(e,t){return reactExports.createElement(ThemeContext$1.Consumer,null,function(o){return reactExports.createElement(i,_extends$y({ref:t},e,{$theme:o}))})})};function createThemedStyled(){return createStyled$1({wrapper,getInitialStyle,driver})}var styled$1=createThemedStyled();function createThemedWithStyle(){return withStyle$1}var withStyle=createThemedWithStyle();function createThemedUseStyletron(){return function(){var n=reactExports.useContext(ThemeContext$1),i=useStyletron$1(),e=_slicedToArray$m(i,1),t=e[0];return[t,n]}}var useStyletron=createThemedUseStyletron();function withWrapper(n,i){return withWrapper$1(n,function(e){return reactExports.forwardRef(function(t,o){return reactExports.createElement(ThemeContext$1.Consumer,null,function(d){return i(e)(_objectSpread$q(_objectSpread$q({ref:o},t),{},{$theme:d}))})})})}var locale$b={collapse:"Collapse",expand:"Expand"},locale$a={ariaLabel:"Breadcrumbs navigation"},locale$9={ariaLabel:"Select a date.",ariaLabelRange:"Select a date range.",ariaLabelCalendar:"Calendar.",ariaRoleDescriptionCalendarMonth:"Calendar month",previousMonth:"Previous month.",nextMonth:"Next month.",pastWeek:"Past Week",pastMonth:"Past Month",pastThreeMonths:"Past 3 Months",pastSixMonths:"Past 6 Months",pastYear:"Past Year",pastTwoYears:"Past 2 Years",screenReaderMessageInput:"Press the down arrow key to interact with the calendar and select a date. Press the escape button to close the calendar.",selectedDate:"Selected date is ${date}.",selectedDateRange:"Selected date range is from ${startDate} to ${endDate}.",selectSecondDatePrompt:"Select the second date.",quickSelectLabel:"Choose a date range",quickSelectAriaLabel:"Choose a date range",quickSelectPlaceholder:"None",timeSelectEndLabel:"End time",timeSelectStartLabel:"Start time",timePickerAriaLabel12Hour:"Select a time, 12-hour format.",timePickerAriaLabel24Hour:"Select a time, 24-hour format.",timezonePickerAriaLabel:"Select a timezone.",selectedStartDateLabel:"Selected start date.",selectedEndDateLabel:"Selected end date.",dateNotAvailableLabel:"Not available.",dateAvailableLabel:"It's available.",selectedLabel:"Selected.",chooseLabel:"Choose"},locale$8={emptyState:"No rows match the filter criteria defined. Please remove one or more filters to view more data.",loadingState:"Loading rows.",searchAriaLabel:"Search by text",filterAdd:"Add Filter",filterExclude:"Exclude",filterApply:"Apply",filterExcludeRange:"Exclude range",filterExcludeValue:"Exclude value",filterAppliedTo:"filter applied to",optionsLabel:"Select column to filter by",optionsSearch:"Search for a column to filter by...",optionsEmpty:"No columns available.",categoricalFilterSelectAll:"Select All",categoricalFilterSelectClear:"Clear",categoricalFilterEmpty:"No categories found",datetimeFilterRange:"Range",datetimeFilterRangeDatetime:"Date, Time",datetimeFilterRangeDate:"Date",datetimeFilterRangeTime:"Time",datetimeFilterCategorical:"Categorical",datetimeFilterCategoricalWeekday:"Weekday",datetimeFilterCategoricalMonth:"Month",datetimeFilterCategoricalQuarter:"Quarter",datetimeFilterCategoricalHalf:"Half",datetimeFilterCategoricalFirstHalf:"H1",datetimeFilterCategoricalSecondHalf:"H2",datetimeFilterCategoricalYear:"Year",numericalFilterRange:"Range",numericalFilterSingleValue:"Single Value",booleanFilterTrue:"true",booleanFilterFalse:"false",booleanColumnTrueShort:"T",booleanColumnFalseShort:"F",selectRow:"Select row",selectAllRows:"Select all rows"},locale$7={ariaLabel:"button group"},locale$6={dropFilesToUpload:"Drop files here to upload...",or:"",browseFiles:"Browse files",retry:"Retry Upload",cancel:"Cancel"},locale$5={noResultsMsg:"No results",parentMenuItemAriaLabel:"You are currently at an item that opens a nested listbox. Press right arrow to enter that element and left arrow to return."},locale$4={close:"Close"},locale$3={close:"Close"},locale$2={prev:"Prev",next:"Next",preposition:"of"},locale$1={noResultsMsg:"No results found",placeholder:"Select...",create:"Create"},locale={close:"Close"},en_US={accordion:locale$b,breadcrumbs:locale$a,datepicker:locale$9,datatable:locale$8,buttongroup:locale$7,fileuploader:locale$6,menu:locale$5,modal:locale$4,drawer:locale$3,pagination:locale$2,select:locale$1,toast:locale},LocaleContext=reactExports.createContext(en_US),generateUID$1=function(){var n=1,i=new WeakMap,e=function(t,o){return typeof t=="number"||typeof t=="string"?o?"idx-".concat(o):"val-".concat(t):i.has(t)?"uid"+i.get(t):(i.set(t,n++),e(t))};return e},createSource=function(n){return n===void 0&&(n=""),{value:1,prefix:n,uid:generateUID$1()}},counter=createSource(),source=reactExports.createContext(createSource()),getId=function(n){return n.value++},getPrefix=function(n){return n?n.prefix:""},__extends$1=(function(){var n=function(i,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var d in o)Object.prototype.hasOwnProperty.call(o,d)&&(t[d]=o[d])},n(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}})(),prefixId=function(n,i,e){var t=i+n;return String(e?e(t):t)},UID=(function(n){__extends$1(i,n);function i(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={quartz:e.props.idSource||counter,prefix:getPrefix(e.props.idSource),id:getId(e.props.idSource||counter)},e.uid=function(t){return prefixId(e.state.id+"-"+e.state.quartz.uid(t),e.state.prefix,e.props.name)},e}return i.prototype.render=function(){var e=this.props,t=e.children,o=e.name,d=this.state,p=d.id,h=d.prefix;return t(prefixId(p,h,o),this.uid)},i})(reactExports.Component),generateUID=function(n){var i=n||counter,e=getPrefix(i),t=getId(i),o=e+t,d=function(p){return o+i.uid(p)};return{uid:o,gen:d}},useUIDState=function(){var n=reactExports.useContext(source),i=reactExports.useState(function(){return generateUID(n)})[0];return i},useUID=function(){var n=useUIDState().uid;return n},useUIDSeed=function(){var n=useUIDState().gen;return n},UIDReset=function(n){var i=n.children,e=n.prefix,t=e===void 0?"":e,o=reactExports.useState(function(){return createSource(t)})[0];return reactExports.createElement(source.Provider,{value:o},i)},UIDConsumer=function(n){var i=n.name,e=n.children;return reactExports.createElement(source.Consumer,null,function(t){return reactExports.createElement(UID,{name:i,idSource:t,children:e})})},reactIsExports$1=requireReactIs$1();function _extends$x(){return _extends$x=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$x.apply(this,arguments)}function ownKeys$q(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$p(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$q(Object(e),!0).forEach(function(t){_defineProperty$w(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$q(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$w(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function _typeof$i(n){"@babel/helpers - typeof";return _typeof$i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$i(n)}function getOverride(n){return reactIsExports$1.isValidElementType(n)?n:n&&_typeof$i(n)==="object"?n.component:n}function getOverrideProps(n){return n&&_typeof$i(n)==="object"?_typeof$i(n.props)==="object"?_objectSpread$p(_objectSpread$p({},n.props),{},{$style:n.style}):{$style:n.style}:{}}function toObjectOverride(n){return reactIsExports$1.isValidElementType(n)?{component:n}:n||{}}function getOverrides(n,i){var e=getOverride(n)||i;if(n&&_typeof$i(n)==="object"&&typeof n.props=="function"){var t=reactExports.forwardRef(function(d,p){var h=n.props(d),y=getOverrideProps(_objectSpread$p(_objectSpread$p({},n),{},{props:h}));return reactExports.createElement(e,_extends$x({ref:p},y))});return t.displayName=e.displayName,[t,{}]}var o=getOverrideProps(n);return[e,o]}function mergeOverrides(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=Object.assign({},n,i),t=Object.keys(e);return t.reduce(function(o,d){return o[d]=mergeOverride(toObjectOverride(n[d]),toObjectOverride(i[d])),o},{})}function mergeOverride(n,i){var e=_objectSpread$p(_objectSpread$p({},n),i);return n.props&&i.props&&(e.props=mergeConfigurationOverrides(n.props,i.props)),n.style&&i.style&&(e.style=mergeConfigurationOverrides(n.style,i.style)),e}function mergeConfigurationOverrides(n,i){return _typeof$i(n)==="object"&&_typeof$i(i)==="object"?deepMerge({},n,i):function(){return deepMerge({},typeof n=="function"?n.apply(void 0,arguments):n,typeof i=="function"?i.apply(void 0,arguments):i)}}var initialized=!1,hadKeyboardEvent=!0,inputTypesWhitelist={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function focusTriggersKeyboardModality(n){var i=n.type,e=n.tagName;return!!(e==="INPUT"&&inputTypesWhitelist[i]&&!n.readOnly||e==="TEXTAREA"&&!n.readOnly||n.isContentEditable)}function handleKeyDown(n){n.metaKey||n.altKey||n.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown(){hadKeyboardEvent=!1}function handleVisibilityChange(){this.visibilityState}function prepare(n){n.addEventListener("keydown",handleKeyDown,!0),n.addEventListener("mousedown",handlePointerDown,!0),n.addEventListener("pointerdown",handlePointerDown,!0),n.addEventListener("touchstart",handlePointerDown,!0),n.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(n){try{return n.target.matches(":focus-visible")}catch{}return hadKeyboardEvent||focusTriggersKeyboardModality(n.target)}function initFocusVisible(n){!initialized&&n!=null&&(initialized=!0,prepare(n.ownerDocument))}var forkFocus=function n(i,e){return function(t){typeof i.onFocus=="function"&&i.onFocus(t),e(t)}},forkBlur=function n(i,e){return function(t){typeof i.onBlur=="function"&&i.onBlur(t),e(t)}};function _typeof$h(n){"@babel/helpers - typeof";return _typeof$h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$h(n)}function _extends$w(){return _extends$w=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$w.apply(this,arguments)}function _slicedToArray$l(n,i){return _arrayWithHoles$l(n)||_iterableToArrayLimit$l(n,i)||_unsupportedIterableToArray$l(n,i)||_nonIterableRest$l()}function _nonIterableRest$l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
49
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit$l(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$l(n){if(Array.isArray(n))return n}function _toConsumableArray$3(n){return _arrayWithoutHoles$3(n)||_iterableToArray$3(n)||_unsupportedIterableToArray$l(n)||_nonIterableSpread$3()}function _nonIterableSpread$3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
50
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$l(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$l(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$l(n,i)}}function _iterableToArray$3(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function _arrayWithoutHoles$3(n){if(Array.isArray(n))return _arrayLikeToArray$l(n)}function _arrayLikeToArray$l(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 _classCallCheck$g(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(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$g(n,i,e){return i&&_defineProperties$g(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$g(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$g(n,i)}function _setPrototypeOf$g(n,i){return _setPrototypeOf$g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$g(n,i)}function _createSuper$g(n){var i=_isNativeReflectConstruct$g();return function(){var t=_getPrototypeOf$g(n),o;if(i){var d=_getPrototypeOf$g(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$g(this,o)}}function _possibleConstructorReturn$g(n,i){if(i&&(_typeof$h(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$g(n)}function _assertThisInitialized$g(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$g(){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$g(n){return _getPrototypeOf$g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$g(n)}function _defineProperty$v(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var StyledAppContainer=styled$1("div",{});StyledAppContainer.displayName="StyledAppContainer";var StyledLayersContainer=styled$1("div",{});StyledLayersContainer.displayName="StyledLayersContainer";function defaultEventHandlerFn(){}var LayersContext=reactExports.createContext({addEscapeHandler:defaultEventHandlerFn,removeEscapeHandler:defaultEventHandlerFn,addKeyDownHandler:defaultEventHandlerFn,removeKeyDownHandler:defaultEventHandlerFn,addKeyUpHandler:defaultEventHandlerFn,removeKeyUpHandler:defaultEventHandlerFn,addKeyPressHandler:defaultEventHandlerFn,removeKeyPressHandler:defaultEventHandlerFn,addDocClickHandler:defaultEventHandlerFn,removeDocClickHandler:defaultEventHandlerFn,host:void 0,zIndex:void 0}),Provider=LayersContext.Provider,Consumer=LayersContext.Consumer,LayersManager=(function(n){_inherits$g(e,n);var i=_createSuper$g(e);function e(t){var o;return _classCallCheck$g(this,e),o=i.call(this,t),_defineProperty$v(_assertThisInitialized$g(o),"host",reactExports.createRef()),_defineProperty$v(_assertThisInitialized$g(o),"containerRef",reactExports.createRef()),_defineProperty$v(_assertThisInitialized$g(o),"onDocumentClick",function(d){var p=o.state.docClickHandlers[o.state.docClickHandlers.length-1];p&&p(d)}),_defineProperty$v(_assertThisInitialized$g(o),"onKeyDown",function(d){var p=o.state.keyDownHandlers[o.state.keyDownHandlers.length-1];p&&p(d)}),_defineProperty$v(_assertThisInitialized$g(o),"onKeyUp",function(d){if(d.key==="Escape"){var p=o.state.escapeKeyHandlers[o.state.escapeKeyHandlers.length-1];p&&p()}var h=o.state.keyUpHandlers[o.state.keyUpHandlers.length-1];h&&h(d)}),_defineProperty$v(_assertThisInitialized$g(o),"onKeyPress",function(d){var p=o.state.keyPressHandlers[o.state.keyPressHandlers.length-1];p&&p(d)}),_defineProperty$v(_assertThisInitialized$g(o),"onAddEscapeHandler",function(d){o.setState(function(p){return{escapeKeyHandlers:[].concat(_toConsumableArray$3(p.escapeKeyHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveEscapeHandler",function(d){o.setState(function(p){return{escapeKeyHandlers:p.escapeKeyHandlers.filter(function(h){return h!==d})}})}),_defineProperty$v(_assertThisInitialized$g(o),"onAddKeyDownHandler",function(d){o.setState(function(p){return{keyDownHandlers:[].concat(_toConsumableArray$3(p.keyDownHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveKeyDownHandler",function(d){o.setState(function(p){return{keyDownHandlers:p.keyDownHandlers.filter(function(h){return h!==d})}})}),_defineProperty$v(_assertThisInitialized$g(o),"onAddKeyUpHandler",function(d){o.setState(function(p){return{keyUpHandlers:[].concat(_toConsumableArray$3(p.keyUpHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveKeyUpHandler",function(d){o.setState(function(p){return{keyUpHandlers:p.keyUpHandlers.filter(function(h){return h!==d})}})}),_defineProperty$v(_assertThisInitialized$g(o),"onAddKeyPressHandler",function(d){o.setState(function(p){return{keyPressHandlers:[].concat(_toConsumableArray$3(p.keyPressHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveKeyPressHandler",function(d){o.setState(function(p){return{keyPressHandlers:p.keyPressHandlers.filter(function(h){return h!==d})}})}),_defineProperty$v(_assertThisInitialized$g(o),"onAddDocClickHandler",function(d){o.setState(function(p){return{docClickHandlers:[].concat(_toConsumableArray$3(p.docClickHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveDocClickHandler",function(d){o.setState(function(p){return{docClickHandlers:p.docClickHandlers.filter(function(h){return h!==d})}})}),o.state={escapeKeyHandlers:[],keyDownHandlers:[],keyUpHandlers:[],keyPressHandlers:[],docClickHandlers:[]},o}return _createClass$g(e,[{key:"componentDidMount",value:function(){this.forceUpdate(),initFocusVisible(this.containerRef.current),typeof document<"u"&&(document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("keypress",this.onKeyPress),document.addEventListener("mousedown",this.onDocumentClick))}},{key:"componentWillUnmount",value:function(){typeof document<"u"&&(document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("keypress",this.onKeyPress),document.removeEventListener("mousedown",this.onDocumentClick))}},{key:"render",value:function(){var o=this,d=this.props.overrides,p=d===void 0?{}:d,h=getOverrides(p.AppContainer,StyledAppContainer),y=_slicedToArray$l(h,2),$=y[0],E=y[1],M=getOverrides(p.LayersContainer,StyledLayersContainer),H=_slicedToArray$l(M,2),Z=H[0],be=H[1];return reactExports.createElement(Consumer,null,function(ye){var we=ye.host;return reactExports.createElement(Provider,{value:{host:we||o.host.current,zIndex:o.props.zIndex,addEscapeHandler:o.onAddEscapeHandler,removeEscapeHandler:o.onRemoveEscapeHandler,addKeyDownHandler:o.onAddKeyDownHandler,removeKeyDownHandler:o.onRemoveKeyDownHandler,addKeyUpHandler:o.onAddKeyUpHandler,removeKeyUpHandler:o.onRemoveKeyUpHandler,addKeyPressHandler:o.onAddKeyPressHandler,removeKeyPressHandler:o.onRemoveKeyPressHandler,addDocClickHandler:o.onAddDocClickHandler,removeDocClickHandler:o.onRemoveDocClickHandler}},reactExports.createElement($,_extends$w({},E,{ref:o.containerRef}),o.props.children),reactExports.createElement(Z,_extends$w({},be,{ref:o.host})))})}}]),e})(reactExports.Component),reactDomExports=requireReactDom();const ReactDOM=getDefaultExportFromCjs(reactDomExports);function _typeof$g(n){"@babel/helpers - typeof";return _typeof$g=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$g(n)}function _extends$v(){return _extends$v=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$v.apply(this,arguments)}function _classCallCheck$f(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(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$f(n,i,e){return i&&_defineProperties$f(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$f(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$f(n,i)}function _setPrototypeOf$f(n,i){return _setPrototypeOf$f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$f(n,i)}function _createSuper$f(n){var i=_isNativeReflectConstruct$f();return function(){var t=_getPrototypeOf$f(n),o;if(i){var d=_getPrototypeOf$f(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$f(this,o)}}function _possibleConstructorReturn$f(n,i){if(i&&(_typeof$g(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$f(n)}function _assertThisInitialized$f(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$f(){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$f(n){return _getPrototypeOf$f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$f(n)}function _defineProperty$u(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Container=styled$1("div",function(n){var i=n.$zIndex;return{position:"absolute",top:0,left:0,right:0,zIndex:i||null}});Container.displayName="Container";var LayerComponent=(function(n){_inherits$f(e,n);var i=_createSuper$f(e);function e(){var t;_classCallCheck$f(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$u(_assertThisInitialized$f(t),"state",{container:null}),_defineProperty$u(_assertThisInitialized$f(t),"onEscape",function(){t.props.onEscape&&t.props.onEscape()}),_defineProperty$u(_assertThisInitialized$f(t),"onKeyDown",function(h){t.props.onKeyDown&&t.props.onKeyDown(h)}),_defineProperty$u(_assertThisInitialized$f(t),"onKeyUp",function(h){t.props.onKeyUp&&t.props.onKeyUp(h)}),_defineProperty$u(_assertThisInitialized$f(t),"onKeyPress",function(h){t.props.onKeyPress&&t.props.onKeyPress(h)}),_defineProperty$u(_assertThisInitialized$f(t),"onDocumentClick",function(h){t.props.onDocumentClick&&t.props.onDocumentClick(h)}),t}return _createClass$f(e,[{key:"componentDidMount",value:function(){this.context.addEscapeHandler(this.onEscape),this.context.addKeyDownHandler(this.onKeyDown),this.context.addKeyUpHandler(this.onKeyUp),this.context.addKeyPressHandler(this.onKeyPress),this.props.isHoverLayer||this.context.addDocClickHandler(this.onDocumentClick);var o=this.props,d=o.onMount,p=o.mountNode,h=o.host;if(p){d&&d();return}var y=h!==void 0,$=y?h:document.body;$&&this.addContainer($)}},{key:"componentDidUpdate",value:function(o){var d=this.props,p=d.host,h=d.mountNode;h||(p&&p!==o.host&&o.host===null&&this.addContainer(p),o.isHoverLayer!=this.props.isHoverLayer&&(this.props.isHoverLayer?this.context.removeDocClickHandler(this.onDocumentClick):this.context.addDocClickHandler(this.onDocumentClick)))}},{key:"componentWillUnmount",value:function(){this.context.removeEscapeHandler(this.onEscape),this.context.removeKeyDownHandler(this.onKeyDown),this.context.removeKeyUpHandler(this.onKeyUp),this.context.removeKeyPressHandler(this.onKeyPress),this.context.removeDocClickHandler(this.onDocumentClick),this.props.onUnmount&&this.props.onUnmount();var o=this.props.host,d=this.state.container;o&&d&&o.contains(d)&&o.removeChild(d)}},{key:"addContainer",value:function(o){var d=this.props,p=d.index,h=d.mountNode,y=d.onMount;if(!h&&o){var $=o.ownerDocument.createElement("div"),E=typeof p=="number"?o.children[p]:null;E?o.insertBefore($,E):o.appendChild($),this.setState({container:$},function(){y&&y()})}}},{key:"render",value:function(){var o=this.state.container,d=this.props,p=d.children,h=d.mountNode,y=d.zIndex,$=y?reactExports.createElement(Container,{$zIndex:y},p):p;return typeof document<"u"?h?ReactDOM.createPortal($,h):o?ReactDOM.createPortal($,o):null:null}}]),e})(reactExports.Component);_defineProperty$u(LayerComponent,"contextType",LayersContext);function Layer(n){return reactExports.createElement(Consumer,null,function(i){var e=i.host,t=i.zIndex;return reactExports.createElement(LayerComponent,_extends$v({},n,{host:e,zIndex:t}))})}var isBrowser$1=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=(function(){for(var n=["Edge","Trident","Firefox"],i=0;i<n.length;i+=1)if(isBrowser$1&&navigator.userAgent.indexOf(n[i])>=0)return 1;return 0})();function microtaskDebounce(n){var i=!1;return function(){i||(i=!0,window.Promise.resolve().then(function(){i=!1,n()}))}}function taskDebounce(n){var i=!1;return function(){i||(i=!0,setTimeout(function(){i=!1,n()},timeoutDuration))}}var supportsMicroTasks=isBrowser$1&&window.Promise,debounce$1=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction(n){var i={};return n&&i.toString.call(n)==="[object Function]"}function getStyleComputedProperty(n,i){if(n.nodeType!==1)return[];var e=n.ownerDocument.defaultView,t=e.getComputedStyle(n,null);return i?t[i]:t}function getParentNode$1(n){return n.nodeName==="HTML"?n:n.parentNode||n.host}function getScrollParent(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var i=getStyleComputedProperty(n),e=i.overflow,t=i.overflowX,o=i.overflowY;return/(auto|scroll|overlay)/.test(e+o+t)?n:getScrollParent(getParentNode$1(n))}function getReferenceNode(n){return n&&n.referenceNode?n.referenceNode:n}var isIE11=isBrowser$1&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser$1&&/MSIE 10/.test(navigator.userAgent);function isIE(n){return n===11?isIE11:n===10?isIE10:isIE11||isIE10}function getOffsetParent(n){if(!n)return document.documentElement;for(var i=isIE(10)?document.body:null,e=n.offsetParent||null;e===i&&n.nextElementSibling;)e=(n=n.nextElementSibling).offsetParent;var t=e&&e.nodeName;return!t||t==="BODY"||t==="HTML"?n?n.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(e.nodeName)!==-1&&getStyleComputedProperty(e,"position")==="static"?getOffsetParent(e):e}function isOffsetContainer(n){var i=n.nodeName;return i==="BODY"?!1:i==="HTML"||getOffsetParent(n.firstElementChild)===n}function getRoot(n){return n.parentNode!==null?getRoot(n.parentNode):n}function findCommonOffsetParent(n,i){if(!n||!n.nodeType||!i||!i.nodeType)return document.documentElement;var e=n.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING,t=e?n:i,o=e?i:n,d=document.createRange();d.setStart(t,0),d.setEnd(o,0);var p=d.commonAncestorContainer;if(n!==p&&i!==p||t.contains(o))return isOffsetContainer(p)?p:getOffsetParent(p);var h=getRoot(n);return h.host?findCommonOffsetParent(h.host,i):findCommonOffsetParent(n,getRoot(i).host)}function getScroll(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",e=i==="top"?"scrollTop":"scrollLeft",t=n.nodeName;if(t==="BODY"||t==="HTML"){var o=n.ownerDocument.documentElement,d=n.ownerDocument.scrollingElement||o;return d[e]}return n[e]}function includeScroll(n,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=getScroll(i,"top"),o=getScroll(i,"left"),d=e?-1:1;return n.top+=t*d,n.bottom+=t*d,n.left+=o*d,n.right+=o*d,n}function getBordersSize$1(n,i){var e=i==="x"?"Left":"Top",t=e==="Left"?"Right":"Bottom";return parseFloat(n["border"+e+"Width"])+parseFloat(n["border"+t+"Width"])}function getSize(n,i,e,t){return Math.max(i["offset"+n],i["scroll"+n],e["client"+n],e["offset"+n],e["scroll"+n],isIE(10)?parseInt(e["offset"+n])+parseInt(t["margin"+(n==="Height"?"Top":"Left")])+parseInt(t["margin"+(n==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(n){var i=n.body,e=n.documentElement,t=isIE(10)&&getComputedStyle(e);return{height:getSize("Height",i,e,t),width:getSize("Width",i,e,t)}}var classCallCheck=function(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")},createClass=(function(){function n(i,e){for(var t=0;t<e.length;t++){var o=e[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,o.key,o)}}return function(i,e,t){return e&&n(i.prototype,e),t&&n(i,t),i}})(),defineProperty=function(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n},_extends$u=Object.assign||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};function getClientRect(n){return _extends$u({},n,{right:n.left+n.width,bottom:n.top+n.height})}function getBoundingClientRect(n){var i={};try{if(isIE(10)){i=n.getBoundingClientRect();var e=getScroll(n,"top"),t=getScroll(n,"left");i.top+=e,i.left+=t,i.bottom+=e,i.right+=t}else i=n.getBoundingClientRect()}catch{}var o={left:i.left,top:i.top,width:i.right-i.left,height:i.bottom-i.top},d=n.nodeName==="HTML"?getWindowSizes(n.ownerDocument):{},p=d.width||n.clientWidth||o.width,h=d.height||n.clientHeight||o.height,y=n.offsetWidth-p,$=n.offsetHeight-h;if(y||$){var E=getStyleComputedProperty(n);y-=getBordersSize$1(E,"x"),$-=getBordersSize$1(E,"y"),o.width-=y,o.height-=$}return getClientRect(o)}function getOffsetRectRelativeToArbitraryNode(n,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=isIE(10),o=i.nodeName==="HTML",d=getBoundingClientRect(n),p=getBoundingClientRect(i),h=getScrollParent(n),y=getStyleComputedProperty(i),$=parseFloat(y.borderTopWidth),E=parseFloat(y.borderLeftWidth);e&&o&&(p.top=Math.max(p.top,0),p.left=Math.max(p.left,0));var M=getClientRect({top:d.top-p.top-$,left:d.left-p.left-E,width:d.width,height:d.height});if(M.marginTop=0,M.marginLeft=0,!t&&o){var H=parseFloat(y.marginTop),Z=parseFloat(y.marginLeft);M.top-=$-H,M.bottom-=$-H,M.left-=E-Z,M.right-=E-Z,M.marginTop=H,M.marginLeft=Z}return(t&&!e?i.contains(h):i===h&&h.nodeName!=="BODY")&&(M=includeScroll(M,i)),M}function getViewportOffsetRectRelativeToArtbitraryNode(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=n.ownerDocument.documentElement,t=getOffsetRectRelativeToArbitraryNode(n,e),o=Math.max(e.clientWidth,window.innerWidth||0),d=Math.max(e.clientHeight,window.innerHeight||0),p=i?0:getScroll(e),h=i?0:getScroll(e,"left"),y={top:p-t.top+t.marginTop,left:h-t.left+t.marginLeft,width:o,height:d};return getClientRect(y)}function isFixed$1(n){var i=n.nodeName;if(i==="BODY"||i==="HTML")return!1;if(getStyleComputedProperty(n,"position")==="fixed")return!0;var e=getParentNode$1(n);return e?isFixed$1(e):!1}function getFixedPositionOffsetParent(n){if(!n||!n.parentElement||isIE())return document.documentElement;for(var i=n.parentElement;i&&getStyleComputedProperty(i,"transform")==="none";)i=i.parentElement;return i||document.documentElement}function getBoundaries(n,i,e,t){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,d={top:0,left:0},p=o?getFixedPositionOffsetParent(n):findCommonOffsetParent(n,getReferenceNode(i));if(t==="viewport")d=getViewportOffsetRectRelativeToArtbitraryNode(p,o);else{var h=void 0;t==="scrollParent"?(h=getScrollParent(getParentNode$1(i)),h.nodeName==="BODY"&&(h=n.ownerDocument.documentElement)):t==="window"?h=n.ownerDocument.documentElement:h=t;var y=getOffsetRectRelativeToArbitraryNode(h,p,o);if(h.nodeName==="HTML"&&!isFixed$1(p)){var $=getWindowSizes(n.ownerDocument),E=$.height,M=$.width;d.top+=y.top-y.marginTop,d.bottom=E+y.top,d.left+=y.left-y.marginLeft,d.right=M+y.left}else d=y}e=e||0;var H=typeof e=="number";return d.left+=H?e:e.left||0,d.top+=H?e:e.top||0,d.right-=H?e:e.right||0,d.bottom-=H?e:e.bottom||0,d}function getArea(n){var i=n.width,e=n.height;return i*e}function computeAutoPlacement(n,i,e,t,o){var d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(n.indexOf("auto")===-1)return n;var p=getBoundaries(e,t,d,o),h={top:{width:p.width,height:i.top-p.top},right:{width:p.right-i.right,height:p.height},bottom:{width:p.width,height:p.bottom-i.bottom},left:{width:i.left-p.left,height:p.height}},y=Object.keys(h).map(function(H){return _extends$u({key:H},h[H],{area:getArea(h[H])})}).sort(function(H,Z){return Z.area-H.area}),$=y.filter(function(H){var Z=H.width,be=H.height;return Z>=e.clientWidth&&be>=e.clientHeight}),E=$.length>0?$[0].key:y[0].key,M=n.split("-")[1];return E+(M?"-"+M:"")}function getReferenceOffsets(n,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=t?getFixedPositionOffsetParent(i):findCommonOffsetParent(i,getReferenceNode(e));return getOffsetRectRelativeToArbitraryNode(e,o,t)}function getOuterSizes(n){var i=n.ownerDocument.defaultView,e=i.getComputedStyle(n),t=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),o=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0),d={width:n.offsetWidth+o,height:n.offsetHeight+t};return d}function getOppositePlacement(n){var i={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(e){return i[e]})}function getPopperOffsets(n,i,e){e=e.split("-")[0];var t=getOuterSizes(n),o={width:t.width,height:t.height},d=["right","left"].indexOf(e)!==-1,p=d?"top":"left",h=d?"left":"top",y=d?"height":"width",$=d?"width":"height";return o[p]=i[p]+i[y]/2-t[y]/2,e===h?o[h]=i[h]-t[$]:o[h]=i[getOppositePlacement(h)],o}function find$1(n,i){return Array.prototype.find?n.find(i):n.filter(i)[0]}function findIndex(n,i,e){if(Array.prototype.findIndex)return n.findIndex(function(o){return o[i]===e});var t=find$1(n,function(o){return o[i]===e});return n.indexOf(t)}function runModifiers(n,i,e){var t=e===void 0?n:n.slice(0,findIndex(n,"name",e));return t.forEach(function(o){o.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var d=o.function||o.fn;o.enabled&&isFunction(d)&&(i.offsets.popper=getClientRect(i.offsets.popper),i.offsets.reference=getClientRect(i.offsets.reference),i=d(i,o))}),i}function update(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),n.placement=computeAutoPlacement(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),n.originalPlacement=n.placement,n.positionFixed=this.options.positionFixed,n.offsets.popper=getPopperOffsets(this.popper,n.offsets.reference,n.placement),n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",n=runModifiers(this.modifiers,n),this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function isModifierEnabled(n,i){return n.some(function(e){var t=e.name,o=e.enabled;return o&&t===i})}function getSupportedPropertyName(n){for(var i=[!1,"ms","Webkit","Moz","O"],e=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<i.length;t++){var o=i[t],d=o?""+o+e:n;if(typeof document.body.style[d]<"u")return d}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow(n){var i=n.ownerDocument;return i?i.defaultView:window}function attachToScrollParents(n,i,e,t){var o=n.nodeName==="BODY",d=o?n.ownerDocument.defaultView:n;d.addEventListener(i,e,{passive:!0}),o||attachToScrollParents(getScrollParent(d.parentNode),i,e,t),t.push(d)}function setupEventListeners(n,i,e,t){e.updateBound=t,getWindow(n).addEventListener("resize",e.updateBound,{passive:!0});var o=getScrollParent(n);return attachToScrollParents(o,"scroll",e.updateBound,e.scrollParents),e.scrollElement=o,e.eventsEnabled=!0,e}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(n,i){return getWindow(n).removeEventListener("resize",i.updateBound),i.scrollParents.forEach(function(e){e.removeEventListener("scroll",i.updateBound)}),i.updateBound=null,i.scrollParents=[],i.scrollElement=null,i.eventsEnabled=!1,i}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(n){return n!==""&&!isNaN(parseFloat(n))&&isFinite(n)}function setStyles(n,i){Object.keys(i).forEach(function(e){var t="";["width","height","top","right","bottom","left"].indexOf(e)!==-1&&isNumeric(i[e])&&(t="px"),n.style[e]=i[e]+t})}function setAttributes(n,i){Object.keys(i).forEach(function(e){var t=i[e];t!==!1?n.setAttribute(e,i[e]):n.removeAttribute(e)})}function applyStyle(n){return setStyles(n.instance.popper,n.styles),setAttributes(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&setStyles(n.arrowElement,n.arrowStyles),n}function applyStyleOnLoad(n,i,e,t,o){var d=getReferenceOffsets(o,i,n,e.positionFixed),p=computeAutoPlacement(e.placement,d,i,n,e.modifiers.flip.boundariesElement,e.modifiers.flip.padding);return i.setAttribute("x-placement",p),setStyles(i,{position:e.positionFixed?"fixed":"absolute"}),e}function getRoundedOffsets(n,i){var e=n.offsets,t=e.popper,o=e.reference,d=Math.round,p=Math.floor,h=function(xe){return xe},y=d(o.width),$=d(t.width),E=["left","right"].indexOf(n.placement)!==-1,M=n.placement.indexOf("-")!==-1,H=y%2===$%2,Z=y%2===1&&$%2===1,be=i?E||M||H?d:p:h,ye=i?d:h;return{left:be(Z&&!M&&i?t.left-1:t.left),top:ye(t.top),bottom:ye(t.bottom),right:be(t.right)}}var isFirefox=isBrowser$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(n,i){var e=i.x,t=i.y,o=n.offsets.popper,d=find$1(n.instance.modifiers,function(Ne){return Ne.name==="applyStyle"}).gpuAcceleration;d!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var p=d!==void 0?d:i.gpuAcceleration,h=getOffsetParent(n.instance.popper),y=getBoundingClientRect(h),$={position:o.position},E=getRoundedOffsets(n,window.devicePixelRatio<2||!isFirefox),M=e==="bottom"?"top":"bottom",H=t==="right"?"left":"right",Z=getSupportedPropertyName("transform"),be=void 0,ye=void 0;if(M==="bottom"?h.nodeName==="HTML"?ye=-h.clientHeight+E.bottom:ye=-y.height+E.bottom:ye=E.top,H==="right"?h.nodeName==="HTML"?be=-h.clientWidth+E.right:be=-y.width+E.right:be=E.left,p&&Z)$[Z]="translate3d("+be+"px, "+ye+"px, 0)",$[M]=0,$[H]=0,$.willChange="transform";else{var we=M==="bottom"?-1:1,xe=H==="right"?-1:1;$[M]=ye*we,$[H]=be*xe,$.willChange=M+", "+H}var Ce={"x-placement":n.placement};return n.attributes=_extends$u({},Ce,n.attributes),n.styles=_extends$u({},$,n.styles),n.arrowStyles=_extends$u({},n.offsets.arrow,n.arrowStyles),n}function isModifierRequired(n,i,e){var t=find$1(n,function(h){var y=h.name;return y===i}),o=!!t&&n.some(function(h){return h.name===e&&h.enabled&&h.order<t.order});if(!o){var d="`"+i+"`",p="`"+e+"`";console.warn(p+" modifier is required by "+d+" modifier in order to work, be sure to include it before "+d+"!")}return o}function arrow(n,i){var e;if(!isModifierRequired(n.instance.modifiers,"arrow","keepTogether"))return n;var t=i.element;if(typeof t=="string"){if(t=n.instance.popper.querySelector(t),!t)return n}else if(!n.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var o=n.placement.split("-")[0],d=n.offsets,p=d.popper,h=d.reference,y=["left","right"].indexOf(o)!==-1,$=y?"height":"width",E=y?"Top":"Left",M=E.toLowerCase(),H=y?"left":"top",Z=y?"bottom":"right",be=getOuterSizes(t)[$];h[Z]-be<p[M]&&(n.offsets.popper[M]-=p[M]-(h[Z]-be)),h[M]+be>p[Z]&&(n.offsets.popper[M]+=h[M]+be-p[Z]),n.offsets.popper=getClientRect(n.offsets.popper);var ye=h[M]+h[$]/2-be/2,we=getStyleComputedProperty(n.instance.popper),xe=parseFloat(we["margin"+E]),Ce=parseFloat(we["border"+E+"Width"]),Ne=ye-n.offsets.popper[M]-xe-Ce;return Ne=Math.max(Math.min(p[$]-be,Ne),0),n.arrowElement=t,n.offsets.arrow=(e={},defineProperty(e,M,Math.round(Ne)),defineProperty(e,H,""),e),n}function getOppositeVariation(n){return n==="end"?"start":n==="start"?"end":n}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements.slice(3);function clockwise(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=validPlacements.indexOf(n),t=validPlacements.slice(e+1).concat(validPlacements.slice(0,e));return i?t.reverse():t}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip(n,i){if(isModifierEnabled(n.instance.modifiers,"inner")||n.flipped&&n.placement===n.originalPlacement)return n;var e=getBoundaries(n.instance.popper,n.instance.reference,i.padding,i.boundariesElement,n.positionFixed),t=n.placement.split("-")[0],o=getOppositePlacement(t),d=n.placement.split("-")[1]||"",p=[];switch(i.behavior){case BEHAVIORS.FLIP:p=[t,o];break;case BEHAVIORS.CLOCKWISE:p=clockwise(t);break;case BEHAVIORS.COUNTERCLOCKWISE:p=clockwise(t,!0);break;default:p=i.behavior}return p.forEach(function(h,y){if(t!==h||p.length===y+1)return n;t=n.placement.split("-")[0],o=getOppositePlacement(t);var $=n.offsets.popper,E=n.offsets.reference,M=Math.floor,H=t==="left"&&M($.right)>M(E.left)||t==="right"&&M($.left)<M(E.right)||t==="top"&&M($.bottom)>M(E.top)||t==="bottom"&&M($.top)<M(E.bottom),Z=M($.left)<M(e.left),be=M($.right)>M(e.right),ye=M($.top)<M(e.top),we=M($.bottom)>M(e.bottom),xe=t==="left"&&Z||t==="right"&&be||t==="top"&&ye||t==="bottom"&&we,Ce=["top","bottom"].indexOf(t)!==-1,Ne=!!i.flipVariations&&(Ce&&d==="start"&&Z||Ce&&d==="end"&&be||!Ce&&d==="start"&&ye||!Ce&&d==="end"&&we),Fe=!!i.flipVariationsByContent&&(Ce&&d==="start"&&be||Ce&&d==="end"&&Z||!Ce&&d==="start"&&we||!Ce&&d==="end"&&ye),Me=Ne||Fe;(H||xe||Me)&&(n.flipped=!0,(H||xe)&&(t=p[y+1]),Me&&(d=getOppositeVariation(d)),n.placement=t+(d?"-"+d:""),n.offsets.popper=_extends$u({},n.offsets.popper,getPopperOffsets(n.instance.popper,n.offsets.reference,n.placement)),n=runModifiers(n.instance.modifiers,n,"flip"))}),n}function keepTogether(n){var i=n.offsets,e=i.popper,t=i.reference,o=n.placement.split("-")[0],d=Math.floor,p=["top","bottom"].indexOf(o)!==-1,h=p?"right":"bottom",y=p?"left":"top",$=p?"width":"height";return e[h]<d(t[y])&&(n.offsets.popper[y]=d(t[y])-e[$]),e[y]>d(t[h])&&(n.offsets.popper[y]=d(t[h])),n}function toValue(n,i,e,t){var o=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),d=+o[1],p=o[2];if(!d)return n;if(p.indexOf("%")===0){var h=void 0;switch(p){case"%p":h=e;break;case"%":case"%r":default:h=t}var y=getClientRect(h);return y[i]/100*d}else if(p==="vh"||p==="vw"){var $=void 0;return p==="vh"?$=Math.max(document.documentElement.clientHeight,window.innerHeight||0):$=Math.max(document.documentElement.clientWidth,window.innerWidth||0),$/100*d}else return d}function parseOffset(n,i,e,t){var o=[0,0],d=["right","left"].indexOf(t)!==-1,p=n.split(/(\+|\-)/).map(function(E){return E.trim()}),h=p.indexOf(find$1(p,function(E){return E.search(/,|\s/)!==-1}));p[h]&&p[h].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var y=/\s*,\s*|\s+/,$=h!==-1?[p.slice(0,h).concat([p[h].split(y)[0]]),[p[h].split(y)[1]].concat(p.slice(h+1))]:[p];return $=$.map(function(E,M){var H=(M===1?!d:d)?"height":"width",Z=!1;return E.reduce(function(be,ye){return be[be.length-1]===""&&["+","-"].indexOf(ye)!==-1?(be[be.length-1]=ye,Z=!0,be):Z?(be[be.length-1]+=ye,Z=!1,be):be.concat(ye)},[]).map(function(be){return toValue(be,H,i,e)})}),$.forEach(function(E,M){E.forEach(function(H,Z){isNumeric(H)&&(o[M]+=H*(E[Z-1]==="-"?-1:1))})}),o}function offset(n,i){var e=i.offset,t=n.placement,o=n.offsets,d=o.popper,p=o.reference,h=t.split("-")[0],y=void 0;return isNumeric(+e)?y=[+e,0]:y=parseOffset(e,d,p,h),h==="left"?(d.top+=y[0],d.left-=y[1]):h==="right"?(d.top+=y[0],d.left+=y[1]):h==="top"?(d.left+=y[0],d.top-=y[1]):h==="bottom"&&(d.left+=y[0],d.top+=y[1]),n.popper=d,n}function preventOverflow(n,i){var e=i.boundariesElement||getOffsetParent(n.instance.popper);n.instance.reference===e&&(e=getOffsetParent(e));var t=getSupportedPropertyName("transform"),o=n.instance.popper.style,d=o.top,p=o.left,h=o[t];o.top="",o.left="",o[t]="";var y=getBoundaries(n.instance.popper,n.instance.reference,i.padding,e,n.positionFixed);o.top=d,o.left=p,o[t]=h,i.boundaries=y;var $=i.priority,E=n.offsets.popper,M={primary:function(Z){var be=E[Z];return E[Z]<y[Z]&&!i.escapeWithReference&&(be=Math.max(E[Z],y[Z])),defineProperty({},Z,be)},secondary:function(Z){var be=Z==="right"?"left":"top",ye=E[be];return E[Z]>y[Z]&&!i.escapeWithReference&&(ye=Math.min(E[be],y[Z]-(Z==="right"?E.width:E.height))),defineProperty({},be,ye)}};return $.forEach(function(H){var Z=["left","top"].indexOf(H)!==-1?"primary":"secondary";E=_extends$u({},E,M[Z](H))}),n.offsets.popper=E,n}function shift(n){var i=n.placement,e=i.split("-")[0],t=i.split("-")[1];if(t){var o=n.offsets,d=o.reference,p=o.popper,h=["bottom","top"].indexOf(e)!==-1,y=h?"left":"top",$=h?"width":"height",E={start:defineProperty({},y,d[y]),end:defineProperty({},y,d[y]+d[$]-p[$])};n.offsets.popper=_extends$u({},p,E[t])}return n}function hide(n){if(!isModifierRequired(n.instance.modifiers,"hide","preventOverflow"))return n;var i=n.offsets.reference,e=find$1(n.instance.modifiers,function(t){return t.name==="preventOverflow"}).boundaries;if(i.bottom<e.top||i.left>e.right||i.top>e.bottom||i.right<e.left){if(n.hide===!0)return n;n.hide=!0,n.attributes["x-out-of-boundaries"]=""}else{if(n.hide===!1)return n;n.hide=!1,n.attributes["x-out-of-boundaries"]=!1}return n}function inner(n){var i=n.placement,e=i.split("-")[0],t=n.offsets,o=t.popper,d=t.reference,p=["left","right"].indexOf(e)!==-1,h=["top","left"].indexOf(e)===-1;return o[p?"left":"top"]=d[e]-(h?o[p?"width":"height"]:0),n.placement=getOppositePlacement(i),n.offsets.popper=getClientRect(o),n}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner},hide:{order:800,enabled:!0,fn:hide},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function n(){},onUpdate:function n(){},modifiers},Popper=(function(){function n(i,e){var t=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,n),this.scheduleUpdate=function(){return requestAnimationFrame(t.update)},this.update=debounce$1(this.update.bind(this)),this.options=_extends$u({},n.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=i&&i.jquery?i[0]:i,this.popper=e&&e.jquery?e[0]:e,this.options.modifiers={},Object.keys(_extends$u({},n.Defaults.modifiers,o.modifiers)).forEach(function(p){t.options.modifiers[p]=_extends$u({},n.Defaults.modifiers[p]||{},o.modifiers?o.modifiers[p]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(p){return _extends$u({name:p},t.options.modifiers[p])}).sort(function(p,h){return p.order-h.order}),this.modifiers.forEach(function(p){p.enabled&&isFunction(p.onLoad)&&p.onLoad(t.reference,t.popper,t.options,p,t.state)}),this.update();var d=this.options.eventsEnabled;d&&this.enableEventListeners(),this.state.eventsEnabled=d}return createClass(n,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),n})();Popper.Utils=(typeof window<"u"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;function toPopperPlacement(n){return n.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function parsePopperOffset(n){return{top:Math.floor(n.top||0),left:Math.floor(n.left||0)}}var TETHER_PLACEMENT={auto:"auto"};function _typeof$f(n){"@babel/helpers - typeof";return _typeof$f=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$f(n)}var _excluded$p=["modifiers"];function ownKeys$p(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$o(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$p(Object(e),!0).forEach(function(t){_defineProperty$t(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$p(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _objectWithoutProperties$q(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$q(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$q(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 _classCallCheck$e(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(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$e(n,i,e){return i&&_defineProperties$e(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$e(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$e(n,i)}function _setPrototypeOf$e(n,i){return _setPrototypeOf$e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$e(n,i)}function _createSuper$e(n){var i=_isNativeReflectConstruct$e();return function(){var t=_getPrototypeOf$e(n),o;if(i){var d=_getPrototypeOf$e(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$e(this,o)}}function _possibleConstructorReturn$e(n,i){if(i&&(_typeof$f(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$e(n)}function _assertThisInitialized$e(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$e(){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$e(n){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$e(n)}function _defineProperty$t(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Tether=(function(n){_inherits$e(e,n);var i=_createSuper$e(e);function e(){var t;_classCallCheck$e(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$t(_assertThisInitialized$e(t),"popper",void 0),_defineProperty$t(_assertThisInitialized$e(t),"popperHeight",0),_defineProperty$t(_assertThisInitialized$e(t),"popperWidth",0),_defineProperty$t(_assertThisInitialized$e(t),"anchorHeight",0),_defineProperty$t(_assertThisInitialized$e(t),"anchorWidth",0),_defineProperty$t(_assertThisInitialized$e(t),"state",{isMounted:!1}),_defineProperty$t(_assertThisInitialized$e(t),"onPopperUpdate",function(h){var y={popper:parsePopperOffset(h.offsets.popper),arrow:h.offsets.arrow?parsePopperOffset(h.offsets.arrow):{top:0,left:0}};t.props.onPopperUpdate(y,h)}),t}return _createClass$e(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(o,d){if(this.props.anchorRef){var p=this.props.anchorRef.getBoundingClientRect(),h=p.height,y=p.width;(this.anchorHeight!==h||this.anchorWidth!==y)&&(this.anchorHeight=h,this.anchorWidth=y,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){var $=this.props.popperRef.getBoundingClientRect(),E=$.height,M=$.width;(this.popperHeight!==E||this.popperWidth!==M)&&(this.popperHeight=E,this.popperWidth=M,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==d.isMounted&&this.props.anchorRef&&this.initializePopper()}}},{key:"componentWillUnmount",value:function(){this.destroyPopover()}},{key:"initializePopper",value:function(){var o=this.props,d=o.placement,p=o.popperOptions,h=p.modifiers,y=_objectWithoutProperties$q(p,_excluded$p);!this.props.anchorRef||!this.props.popperRef||(this.popper=new Popper(this.props.anchorRef,this.props.popperRef,_objectSpread$o({placement:toPopperPlacement(d),modifiers:_objectSpread$o({arrow:{element:this.props.arrowRef,enabled:!!this.props.arrowRef},computeStyle:{gpuAcceleration:!1},applyStyle:{enabled:!1},applyReactStyle:{enabled:!0,fn:this.onPopperUpdate,order:900},preventOverflow:{enabled:!0}},h)},y)))}},{key:"destroyPopover",value:function(){this.popper&&(this.popper.destroy(),delete this.popper)}},{key:"render",value:function(){return this.props.children||null}}]),e})(reactExports.Component);_defineProperty$t(Tether,"defaultProps",{anchorRef:null,onPopperUpdate:function n(){return null},placement:TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var BaseProvider=function n(i){var e=i.children,t=i.overrides,o=i.theme,d=i.zIndex;return reactExports.createElement(LayersManager,{zIndex:d,overrides:t},reactExports.createElement(UIDReset,{prefix:"bui"},reactExports.createElement(ThemeProvider$1,{theme:o},e)))};const createBaseUiThemePrimitives=(n,i)=>{const{colors:e,genericFonts:t}=i;return{...n,primaryFontFamily:t.bodyFont,primary100:e.primary,primary200:e.primary,primary300:e.primary,primary400:e.primary,primary500:e.primary,primary600:e.primary,primary700:e.primary,mono100:e.bgColor,mono200:e.secondaryBg,mono300:e.gray30,mono400:e.gray30,mono500:e.gray60,mono600:e.fadedText40,mono700:e.gray60,mono800:e.bodyText,mono900:e.bodyText,mono1000:e.black}},createBaseUiThemeOverrides=n=>{const{inSidebar:i,colors:e,genericFonts:t,fontSizes:o,lineHeights:d,radii:p}=n,h={fontFamily:t.bodyFont,fontSize:o.md,fontSizeSm:o.sm,fontWeight:"normal",lineHeight:d.base,lineHeightTight:d.tight},y=e.secondaryBg,$=i?e.secondaryBg:e.bgColor,E=i?e.bgColor:e.secondaryBg;return{borders:{radius100:p.default,radius200:p.default,radius300:p.default,radius400:p.default,radius500:p.default,useRoundedCorners:!0,buttonBorderRadiusMini:p.md,buttonBorderRadius:p.default,checkboxBorderRadius:`min(${p.md}, ${p.maxCheckbox})`,inputBorderRadiusMini:p.md,inputBorderRadius:p.default,popoverBorderRadius:p.default,surfaceBorderRadius:p.default,tagBorderRadius:p.md},typography:{font100:{},font150:{...h},font200:{},font250:{},font300:{...h},font350:{...h},font400:{...h},font450:{...h},font460:{...h},font470:{...h},font500:{...h},font600:{},LabelXSmall:{...h},LabelSmall:{...h},LabelMedium:{...h},LabelLarge:{...h},ParagraphSmall:{...h}},colors:{white:e.white,black:e.black,primary:e.primary,primaryA:e.primary,backgroundPrimary:e.bgColor,backgroundSecondary:y,backgroundTertiary:e.bgColor,borderOpaque:e.darkenedBgMix25,accent:transparentize(e.primary,.5),tagPrimarySolidBackground:e.primary,tagPrimaryFontDisabled:e.fadedText40,tagPrimaryOutlinedDisabled:e.transparent,borderSelected:e.primary,contentPrimary:e.bodyText,inputPlaceholder:e.fadedText60,tickFillDisabled:e.fadedText40,tickMarkFill:e.gray20,tickFillSelected:e.primary,datepickerBackground:$,calendarBackground:$,calendarForeground:e.bodyText,calendarDayForegroundPseudoSelected:e.bodyText,calendarHeaderBackground:E,calendarHeaderBackgroundActive:E,calendarHeaderForeground:e.bodyText,calendarHeaderForegroundDisabled:e.gray40,calendarDayBackgroundSelected:e.primary,calendarDayBackgroundSelectedHighlighted:e.primary,calendarDayForegroundSelected:e.white,calendarDayForegroundSelectedHighlighted:e.white,calendarDayForegroundPseudoSelectedHighlighted:e.bodyText,menuFontHighlighted:e.bodyText,menuFontSelected:e.bodyText,modalCloseColor:e.bodyText,notificationInfoBackground:e.blueBackgroundColor,notificationInfoText:e.blueTextColor,notificationPositiveBackground:e.greenBackgroundColor,notificationPositiveText:e.greenTextColor,notificationWarningBackground:e.yellowBackgroundColor,notificationWarningText:e.yellowTextColor,notificationNegativeBackground:e.redBackgroundColor,notificationNegativeText:e.redTextColor,progressbarTrackFill:y,tickFill:e.lightenedBg05,tickMarkFillDisabled:e.lightenedBg05,menuFill:$,buttonDisabledFill:e.lightenedBg05,tickFillHover:y,inputFillDisabled:y,inputFillActive:y,toggleTrackFillDisabled:y,tickFillActive:y,sliderTrackFillDisabled:y,inputBorder:e.widgetBorderColor||y,inputFill:y,inputEnhanceFill:y,inputEnhancerFillDisabled:y,buttonDisabledSpinnerBackground:e.gray40,toggleTrackFill:e.gray40,sliderTrackFill:e.gray40,sliderHandleInnerFill:e.gray40,sliderHandleInnerFillDisabled:e.gray40}}},createBaseUiTheme=(n,i=primitives)=>createLightTheme(createBaseUiThemePrimitives(i,n),createBaseUiThemeOverrides(n)),computeDerivedColors=n=>{const{bodyText:i,secondaryBg:e,bgColor:t}=n,o=getLuminance(t)>.5,d=transparentize(i,.9),p=transparentize(i,.8),h=transparentize(i,.7),y=transparentize(i,.6),$=transparentize(i,.4),E=mix$1(t,e,.5),M=o?darken(E,.3):lighten(E,.6),H=transparentize(M,.75),Z=transparentize(M,.85),be=lighten(t,.025);return{fadedText05:d,fadedText10:p,fadedText20:h,fadedText40:y,fadedText60:$,bgMix:E,darkenedBgMix100:M,darkenedBgMix25:H,darkenedBgMix15:Z,lightenedBg05:be}};function _isLightBackground(n){return getLuminance(n)>.5}function hasLightBackgroundColor(n){return _isLightBackground(n.colors.bgColor)}const createEmotionColors=n=>{const i=computeDerivedColors(n),e=defaultCategoricalColorsArray(n),t=defaultSequentialColorsArray(n);return{...n,...i,link:n.blueTextColor,codeTextColor:n.greenTextColor,codeBackgroundColor:i.bgMix,borderColor:i.fadedText10,borderColorLight:i.fadedText05,dataframeBorderColor:i.fadedText05,dataframeHeaderBackgroundColor:i.bgMix,headingColor:n.bodyText,chartCategoricalColors:e,chartSequentialColors:t}};function getDividerColors(n){const{redColor:i,orangeColor:e,yellowColor:t,blueColor:o,greenColor:d,violetColor:p,grayColor:h}=n.colors;return{red:i,orange:e,yellow:t,blue:o,green:d,violet:p,gray:h,grey:h,rainbow:`linear-gradient(to right, ${i}, ${e}, ${t}, ${d}, ${o}, ${p})`}}function getMarkdownBgColors(n){const i=hasLightBackgroundColor(n),e=n.colors;return{redbg:e.redBackgroundColor,orangebg:e.orangeBackgroundColor,yellowbg:e.yellowBackgroundColor,bluebg:e.blueBackgroundColor,greenbg:e.greenBackgroundColor,violetbg:e.violetBackgroundColor,purplebg:transparentize(e[i?"purple90":"purple80"],i?.9:.7),graybg:e.grayBackgroundColor,primarybg:transparentize(e.primary,i?.9:.7)}}function getMarkdownTextColors(n){const i=hasLightBackgroundColor(n),e=n.colors,t=e.primary,o=e.redTextColor,d=e.orangeTextColor,p=e.yellowTextColor,h=e.blueTextColor,y=e.greenTextColor,$=e.violetTextColor,E=i?e.purple100:e.purple80,M=e.grayTextColor;return{red:o,orange:d,yellow:p,green:y,blue:h,violet:$,purple:E,gray:M,primary:t}}function getGray70(n){return hasLightBackgroundColor(n)?n.colors.gray70:n.colors.gray30}function getGray30(n){return hasLightBackgroundColor(n)?n.colors.gray30:n.colors.gray85}function getGray90(n){return hasLightBackgroundColor(n)?n.colors.gray90:n.colors.gray10}function getBlue80(n){return hasLightBackgroundColor(n)?n.colors.blue80:n.colors.blue40}function getBlueArrayAsc(n){return[n.blue10,n.blue20,n.blue30,n.blue40,n.blue50,n.blue60,n.blue70,n.blue80,n.blue90,n.blue100]}function getBlueArrayDesc(n){return[n.blue100,n.blue90,n.blue80,n.blue70,n.blue60,n.blue50,n.blue40,n.blue30,n.blue20,n.blue10]}function getDivergingColorsArray(n){const{colors:i}=n;return[i.red100,i.red90,i.red70,i.red50,i.red30,i.blue30,i.blue50,i.blue70,i.blue90,i.blue100]}function defaultSequentialColorsArray(n){return _isLightBackground(n.bgColor)?getBlueArrayAsc(n):getBlueArrayDesc(n)}function defaultCategoricalColorsArray(n){return _isLightBackground(n.bgColor)?[n.blue80,n.blue40,n.red80,n.red40,n.blueGreen80,n.green40,n.orange80,n.orange50,n.purple80,n.gray40]:[n.blue40,n.blue80,n.red40,n.red80,n.green40,n.blueGreen80,n.orange50,n.orange80,n.purple80,n.gray40]}function getDecreasingRed(n){return hasLightBackgroundColor(n)?n.colors.red80:n.colors.red40}function getIncreasingGreen(n){return hasLightBackgroundColor(n)?n.colors.blueGreen80:n.colors.green40}const breakpoints={hideWidgetDetails:"11.25rem",hideNumberInputControls:"7.5rem",sm:"576px",columns:"640px",md:"768px"},colors={transparent:"transparent",black:"#000000",white:"#ffffff",gray10:"#fafafa",gray20:"#f0f2f6",gray30:"#e6eaf1",gray40:"#d5dae5",gray50:"#bfc5d3",gray60:"#a3a8b8",gray70:"#808495",gray80:"#555867",gray85:"#31333F",gray90:"#262730",gray100:"#0e1117",red10:"#fff0f0",red20:"#ffdede",red30:"#ffc7c7",red40:"#ffabab",red50:"#ff8c8c",red60:"#ff6c6c",red70:"#ff4b4b",red80:"#ff2b2b",red90:"#bd4043",red100:"#7d353b",orange10:"#fffae8",orange20:"#fff6d0",orange30:"#ffecb0",orange40:"#ffe08e",orange50:"#ffd16a",orange60:"#ffbd45",orange70:"#ffa421",orange80:"#ff8700",orange90:"#ed6f13",orange95:"#e2660c",orange100:"#d95a00",yellow10:"#ffffe1",yellow20:"#ffffc2",yellow30:"#ffffa0",yellow40:"#ffff7d",yellow50:"#ffff59",yellow60:"#fff835",yellow65:"#ffff12",yellow70:"#ffe312",yellow80:"#faca2b",yellow90:"#edbb16",yellow100:"#dea816",yellow110:"#916e10",yellow115:"#926c05",green10:"#dffde9",green20:"#c0fcd3",green30:"#9ef6bb",green40:"#7defa1",green50:"#5ce488",green60:"#3dd56d",green70:"#21c354",green80:"#09ab3b",green90:"#158237",green100:"#177233",blueGreen10:"#dcfffb",blueGreen20:"#bafff7",blueGreen30:"#93ffee",blueGreen40:"#6bfde3",blueGreen50:"#45f4d5",blueGreen60:"#20e7c5",blueGreen70:"#00d4b1",blueGreen80:"#29b09d",blueGreen90:"#2c867c",blueGreen100:"#246e69",lightBlue10:"#e0feff",lightBlue20:"#bffdff",lightBlue30:"#9af8ff",lightBlue40:"#73efff",lightBlue50:"#4be4ff",lightBlue60:"#24d4ff",lightBlue70:"#00c0f2",lightBlue80:"#00a4d4",lightBlue90:"#0d8cb5",lightBlue100:"#15799e",blue10:"#e4f5ff",blue20:"#c7ebff",blue30:"#a6dcff",blue40:"#83c9ff",blue50:"#60b4ff",blue60:"#3d9df3",blue65:"#1c83ff",blue70:"#1c83e1",blue80:"#0068c9",blue90:"#0054a3",blue100:"#004280",purple10:"#f5ebff",purple20:"#ebd6ff",purple30:"#dbbbff",purple40:"#c89dff",purple50:"#b27eff",purple60:"#9a5dff",purple70:"#803df5",purple80:"#6d3fc0",purple90:"#583f84",purple100:"#3f3163"},iconSizes={xs:"0.5rem",sm:"0.75rem",md:"0.9rem",base:"1rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.8rem",threeXL:"2.3rem"},radii={md:"0.25rem",default:"0.5rem",xl:"0.75rem",xxl:"1rem",button:"0.5rem",chatInput:"1.25rem",full:"9999px",maxCheckbox:"0.35rem"},sizes={full:"100%",headerHeight:"3.75rem",fullScreenHeaderHeight:"2.875rem",sidebarTopSpace:"6rem",toastWidth:"21rem",contentMaxWidth:"736px",maxChartTooltipWidth:"30rem",checkbox:"1rem",borderWidth:"1px",smallElementHeight:"1.5rem",minElementHeight:"2.5rem",largestElementHeight:"4.25rem",smallLogoHeight:"1.25rem",defaultLogoHeight:"1.5rem",largeLogoHeight:"2rem",sliderThumb:"0.75rem",wideSidePadding:"5rem",headerDecorationHeight:"0.125rem",appRunningMen:"1.6rem",appStatusMaxWidth:"20rem",spinnerSize:"1.375rem",spinnerThickness:"0.125rem",tabHeight:"2.5rem",minPopupWidth:"20rem",maxTooltipHeight:"18.75rem",chatAvatarSize:"2rem",clearIconSize:"1.5em",numberInputControlsWidth:"2rem",emptyDropdownHeight:"5.625rem",dropdownItemHeight:"2.5rem",maxDropdownHeight:"18.75rem",appDefaultBottomPadding:"3.5rem",defaultMapHeight:"31.25rem",defaultChartHeight:"21.875rem",defaultChartWidth:"25rem",minMenuWidth:"8rem",minChatInputFileListHeight:"3rem",chatInputFileIconSize:"2.25rem",headerItemHeight:"1.75rem",headerRightContentMaxWidth:"12.5rem",chatInputTextareaMinHeight:"1.5rem",chatInputPrimaryButtonSize:"2rem",chatInputButtonVerticalOffset:"0.1875rem",dialogLargeWidth:"80rem",defaultStrokeWidth:2.25,metricStrokeWidth:2},spacing={px:"1px",none:"0",threeXS:"0.125rem",twoXS:"0.25rem",xs:"0.375rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.25rem",twoXL:"1.5rem",threeXL:"2rem",fourXL:"4rem",fiveXL:"6rem",sixXL:"8rem"},fonts={sansSerif:'"Source Sans", sans-serif',monospace:'"Source Code Pro", monospace',serif:'"Source Serif", serif',materialIcons:"Material Symbols Rounded"},genericFonts={bodyFont:fonts.sansSerif,codeFont:fonts.monospace,headingFont:fonts.sansSerif,iconFont:fonts.materialIcons},fontSizes={baseFontSize:16,twoSm:"0.75rem",sm:"0.875rem",md:"1rem",mdLg:"1.125rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.75rem",threeXL:"2.25rem",fourXL:"2.75rem",codeFontSize:"0.875rem",inlineCodeFontSize:"0.75em",h1FontSize:"2.75rem",h2FontSize:"2.25rem",h3FontSize:"1.75rem",h4FontSize:"1.5rem",h5FontSize:"1.25rem",h6FontSize:"1rem"},fontWeights={normal:400,semiBold:500,bold:600,extrabold:700,code:400,codeBold:600,codeExtraBold:700,h1FontWeight:700,h2FontWeight:600,h3FontWeight:600,h4FontWeight:600,h5FontWeight:600,h6FontWeight:600},lineHeights={none:1,headings:1.2,tight:1.25,inputWidget:1.4,small:1.5,base:1.6,menuItem:2},sidebar=100,menuButton=sidebar+10,balloons=1e6,header=balloons-10,bottom=sidebar-1,sidebarMobile=balloons-5,fullscreenWrapper=balloons+50,headerDecoration=balloons-1,popup=fullscreenWrapper+10,tablePortal=fullscreenWrapper+60,cacheSpinner=sidebar+1,toast=popup+1,zIndices={hide:-1,auto:"auto",base:0,priority:1,sidebar,menuButton,balloons,header,sidebarMobile,popup,fullscreenWrapper,tablePortal,bottom,cacheSpinner,toast,headerDecoration},requiredThemeColors={bgColor:colors.white,secondaryBg:colors.gray20,bodyText:colors.gray85,primary:colors.red70,secondary:colors.blue70,redColor:colors.red70,orangeColor:colors.orange70,yellowColor:colors.yellow80,blueColor:colors.blue70,greenColor:colors.green70,violetColor:colors.purple70,grayColor:colors.gray60,redBackgroundColor:transparentize(colors.red80,.9),orangeBackgroundColor:transparentize(colors.orange70,.9),yellowBackgroundColor:transparentize(colors.yellow65,.9),blueBackgroundColor:transparentize(colors.blue65,.9),greenBackgroundColor:transparentize(colors.green70,.9),violetBackgroundColor:transparentize(colors.purple60,.9),grayBackgroundColor:transparentize(colors.gray85,.9),redTextColor:colors.red90,orangeTextColor:colors.orange95,yellowTextColor:colors.yellow115,blueTextColor:colors.blue90,greenTextColor:colors.green90,violetTextColor:colors.purple90,grayTextColor:transparentize(colors.gray85,.4)},optionalThemeColors={},themeColors={...colors,...requiredThemeColors,...optionalThemeColors},emotionBaseTheme={inSidebar:!1,showSidebarBorder:!1,linkUnderline:!0,breakpoints,colors:createEmotionColors(themeColors),fonts,fontSizes,fontWeights,genericFonts,iconSizes,lineHeights,radii,sizes,spacing,zIndices},genericColors$1={...colors,bgColor:colors.gray100,bodyText:colors.gray10,primary:colors.red70,secondaryBg:colors.gray90,redColor:colors.red80,orangeColor:colors.orange80,yellowColor:colors.yellow70,blueColor:colors.blue80,greenColor:colors.green80,violetColor:colors.purple70,grayColor:colors.gray80,redBackgroundColor:transparentize(colors.red60,.8),orangeBackgroundColor:transparentize(colors.orange80,.8),yellowBackgroundColor:transparentize(colors.yellow65,.8),blueBackgroundColor:transparentize(colors.blue60,.8),greenBackgroundColor:transparentize(colors.green60,.8),violetBackgroundColor:transparentize(colors.purple60,.8),grayBackgroundColor:transparentize(colors.gray70,.8),redTextColor:colors.red60,orangeTextColor:colors.orange60,yellowTextColor:colors.yellow20,blueTextColor:colors.blue60,greenTextColor:colors.green50,violetTextColor:colors.purple50,grayTextColor:transparentize(colors.gray10,.4)},emotionDarkTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors$1})},genericColors={...colors},emotionLightTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors})},baseuiLightTheme=createBaseUiTheme(emotionLightTheme,primitives),baseuiDarkTheme=createBaseUiTheme(emotionDarkTheme,primitives$1),STALE_TRANSITION_PARAMS="1s ease-in 0.5s",STALE_STYLES={opacity:.33,transition:`opacity ${STALE_TRANSITION_PARAMS}`},globalStyles=n=>css("html{font-size:",n.fontSizes.baseFontSize,"px;}@media print{html{height:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact;}}*,*::before,*::after{box-sizing:border-box;}body{margin:0;font-family:",n.genericFonts.bodyFont,";font-weight:",n.fontWeights.normal,";line-height:",n.lineHeights.base,";color:",n.colors.bodyText,";background-color:",n.colors.bgColor,";-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:",transparentize(n.colors.black,1),';-webkit-font-smoothing:auto;}body.embedded{overflow:hidden;}body.embedded:hover{overflow:auto;}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important;}p,ol,ul,dl{margin:0 0 1rem 0;padding:0;font-size:1rem;font-weight:',n.fontWeights.normal,';}ol ol,ul ul,ol ul,ul ol{margin-bottom:0;}a:not([href]):not([class]){&,&:hover{color:inherit;text-decoration:none;}}img,svg{vertical-align:middle;}input,button,select,optgroup,textarea{margin:0;font-family:inherit;line-height:inherit;font-size:inherit;}button,input{overflow:visible;}button,[role="button"]{&:not(:disabled){cursor:pointer;}}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button;}[hidden]{display:none !important;}@supports (scrollbar-color:transparent transparent){*{scrollbar-width:thin;scrollbar-color:transparent transparent;}*:hover{scrollbar-color:',n.colors.fadedText40," transparent;}}@supports not (scrollbar-color:transparent transparent){::-webkit-scrollbar{background:transparent;border-radius:",n.radii.full,";height:6px;width:6px;}::-webkit-scrollbar:active{background:",n.colors.fadedText10,";}:hover::-webkit-scrollbar-thumb:vertical,:hover::-webkit-scrollbar-thumb:horizontal{background:",n.colors.fadedText40,";border-radius:",n.radii.full,";}}"),baseTheme={name:"base",emotion:emotionBaseTheme,basewebTheme:baseuiLightTheme,primitives},darkTheme={name:"Dark",emotion:emotionDarkTheme,basewebTheme:baseuiDarkTheme,primitives:primitives$1},lightTheme={name:"Light",emotion:emotionLightTheme,basewebTheme:baseuiLightTheme,primitives},CACHED_THEME_VERSION=1,CACHED_THEME_BASE_KEY=`stActiveTheme-${window.location.pathname}`,LocalStore={CACHED_THEME_VERSION,CACHED_THEME_BASE_KEY,ACTIVE_THEME:`${CACHED_THEME_BASE_KEY}-v${CACHED_THEME_VERSION}`},AUTO_THEME_NAME="Use system setting",CUSTOM_THEME_NAME="Custom Theme",CUSTOM_THEME_LIGHT_NAME="Custom Theme Light",CUSTOM_THEME_DARK_NAME="Custom Theme Dark",CUSTOM_THEME_AUTO_NAME="Custom Theme Auto",LOG$h=loglevelExports.getLogger("theme:utils");function sortThemeInputKeys(n){if(n==null)return n;if(Array.isArray(n))return n.map(i=>sortThemeInputKeys(i));if(typeof n=="object"){const i={};return Object.keys(n).sort().forEach(e=>{i[e]=sortThemeInputKeys(n[e])}),i}return n}function mergeTheme(n,i){if(i&&isObject$1(i)){const e=new CustomThemeConfig(i);return createTheme(n.name,e,n)}return n}const getMergedLightTheme=once(()=>mergeTheme(lightTheme,StreamlitConfig.LIGHT_THEME)),getMergedDarkTheme=once(()=>mergeTheme(darkTheme,StreamlitConfig.DARK_THEME)),getSystemThemePreference=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",getSystemTheme=()=>getSystemThemePreference()==="dark"?getMergedDarkTheme():getMergedLightTheme(),createAutoTheme=()=>({...getSystemTheme(),name:AUTO_THEME_NAME}),createPresetThemes=()=>[createAutoTheme(),getMergedLightTheme(),getMergedDarkTheme()],isPresetTheme=n=>createPresetThemes().map(e=>e.name).includes(n.name),bgColorToBaseString=n=>n===void 0||getLuminance(n)>.5?"light":"dark",isColor=n=>{const i=new Option().style;return i.color=n,i.color!==""},roundFontSizeToNearestEighth=n=>Math.round(n*8)/8,parseFont=(n,i=fonts.sansSerif)=>{const e=n.trim();if(!e)return i;const t={"sans-serif":fonts.sansSerif,serif:fonts.serif,monospace:fonts.monospace},o=e.toLowerCase().replaceAll(" ","-");return o in t?t[o]:`${e}, ${i}`},parseColor=(n,i,e=!1)=>{if(isColor(n))return n;if(isColor(`#${n}`))return`#${n}`;if(i.toLowerCase().includes("color")){const o=e?"theme.sidebar":"theme";LOG$h.warn(`Invalid color passed for ${i} in ${o}: "${n}"`)}},resolveBgColor=(n,i,e,t)=>n||(i?transparentize(i,t?.9:.8):e),resolveTextColor=(n,i,e,t)=>n||(i?t?darken(i,.15):lighten(i,.15):e),setBackgroundColors=(n,i)=>{const e={...n},t={redBackgroundColor:{main:i.redColor,background:i.redBackgroundColor},orangeBackgroundColor:{main:i.orangeColor,background:i.orangeBackgroundColor},yellowBackgroundColor:{main:i.yellowColor,background:i.yellowBackgroundColor},blueBackgroundColor:{main:i.blueColor,background:i.blueBackgroundColor},greenBackgroundColor:{main:i.greenColor,background:i.greenBackgroundColor},violetBackgroundColor:{main:i.violetColor,background:i.violetBackgroundColor},grayBackgroundColor:{main:i.grayColor,background:i.grayBackgroundColor}},o=getLuminance(e.bgColor)>.5;return Object.entries(t).forEach(([d,{main:p,background:h}])=>{const y=d;e[y]=resolveBgColor(h,p,n[y],o)}),e},setTextColors=(n,i)=>{const e={...n},t={redTextColor:{main:i.redColor,text:i.redTextColor},orangeTextColor:{main:i.orangeColor,text:i.orangeTextColor},yellowTextColor:{main:i.yellowColor,text:i.yellowTextColor},blueTextColor:{main:i.blueColor,text:i.blueTextColor},greenTextColor:{main:i.greenColor,text:i.greenTextColor},violetTextColor:{main:i.violetColor,text:i.violetTextColor},grayTextColor:{main:i.grayColor,text:i.grayTextColor}},o=getLuminance(e.bgColor)>.5;return Object.entries(t).forEach(([d,{main:p,text:h}])=>{const y=d;e[y]=resolveTextColor(h,p,n[y],o)}),e},parseRadius=n=>{let i="rem",e;const t=n.trim().toLowerCase();return t==="none"?e=0:t==="small"?e=.35:t==="medium"?e=.5:t==="large"?e=1:t==="full"?e=1.4:t.endsWith("rem")?e=parseFloat(t):t.endsWith("px")?(e=parseFloat(t),i="px"):isNaN(parseFloat(t))||(e=parseFloat(t),i="px"),[e,i]},parseFontSize=(n,i,e)=>{const t=e?"theme.sidebar":"theme";if(typeof i=="string"){const o=i.trim().toLowerCase(),d=parseFloat(o);if(d&&(o.endsWith("rem")||o.endsWith("px")))return o;if(d.toString()===o)return`${o}px`}LOG$h.warn(`Invalid size passed for ${n} in ${t}: ${i}. Falling back to default ${n}.`)},isValidFontWeight=(n,i,e,t,o)=>{const d=o?"theme.sidebar":"theme";if(notNullOrUndefined(i)){const p=Number.isInteger(i),h=i%100===0,y=i>=e&&i<=t;return!p||!h||!y?(LOG$h.warn(`Invalid ${n}: ${i} in ${d}. The ${n} must be an integer ${e}-${t}, and an increment of 100. Falling back to default font weight.`),!1):!0}return!1},convertHeadingFontSizeToRem=(n,i,e,t)=>{const o=parseFontSize(n,i,t);if(o?.endsWith("rem"))return o;if(o?.endsWith("px"))return`${parseFloat(o)/e}rem`},setHeadingFontSizes=(n,i,e,t)=>{const o={...n};return t&&t.forEach((d,p)=>{const h=`h${p+1}FontSize`,y=convertHeadingFontSizeToRem(`${h} in headingFontSizes`,d,e,i);y&&(o[h]=y)}),o},setFontWeights=(n,i,e,t,o)=>{const d={...n,h1FontWeight:i?600:n.h1FontWeight};return e&&isValidFontWeight("baseFontWeight",e,100,600)&&(d.normal=e,d.semiBold=e+100,d.bold=e+200,d.extrabold=e+300,d.code=e,d.codeBold=e+200,d.codeExtraBold=e+300),t&&isValidFontWeight("codeFontWeight",t,100,600)&&(d.code=t,d.codeBold=t+200,d.codeExtraBold=t+300),o&&o.forEach((p,h)=>{const y=`h${h+1}FontWeight`;isValidFontWeight(`${y} in headingFontWeights`,p,100,900,i)&&(d[y]=p)}),d},validateChartColors=(n,i)=>i.map(e=>parseColor(e,n)).filter(e=>e!==void 0),createEmotionTheme=(n,i=baseTheme)=>{const{colors:e,genericFonts:t,inSidebar:o}=i.emotion,{baseFontSize:d,baseFontWeight:p,baseRadius:h,buttonRadius:y,codeFontSize:$,codeFontWeight:E,showWidgetBorder:M,headingFont:H,headingFontSizes:Z,headingFontWeights:be,bodyFont:ye,codeFont:we,showSidebarBorder:xe,linkUnderline:Ce,chartCategoricalColors:Ne,chartSequentialColors:Fe,...Me}=n,Le=Object.entries(Me).reduce((gt,[$t,Mt])=>{const qt=parseColor(Mt,$t,o);return qt&&(gt[$t]=qt),gt},{}),{secondaryBackgroundColor:ze,backgroundColor:Ke,primaryColor:Ve,textColor:je,dataframeBorderColor:We,dataframeHeaderBackgroundColor:Xe,widgetBorderColor:Qe,borderColor:Ye,linkColor:Ue,codeTextColor:ot,codeBackgroundColor:dt,redColor:st,orangeColor:pt,yellowColor:Be,blueColor:qe,greenColor:rt,violetColor:He,grayColor:Ot}=Le,Ct={...e,primary:Ve??e.primary,bodyText:je??e.bodyText,secondaryBg:ze??e.secondaryBg,bgColor:Ke??e.bgColor,redColor:st??e.redColor,orangeColor:pt??e.orangeColor,yellowColor:Be??e.yellowColor,blueColor:qe??e.blueColor,greenColor:rt??e.greenColor,violetColor:He??e.violetColor,grayColor:Ot??e.grayColor,secondary:Ve??e.primary},tt={colors:{...createEmotionColors(Ct)},showSidebarBorder:xe??i.emotion.showSidebarBorder,linkUnderline:Ce??i.emotion.linkUnderline,radii:{...i.emotion.radii},fontSizes:{...i.emotion.fontSizes},fontWeights:{...i.emotion.fontWeights}};if(tt.colors.codeBackgroundColor=dt??e.codeBackgroundColor,tt.colors.dataframeHeaderBackgroundColor=Xe??e.dataframeHeaderBackgroundColor,notNullOrUndefined(Ye)){tt.colors.borderColor=Ye;const gt=transparentize(Ye,.55);tt.colors.borderColorLight=gt,tt.colors.dataframeBorderColor=gt}if(notNullOrUndefined(We)&&(tt.colors.dataframeBorderColor=We),(M||Qe)&&(tt.colors.widgetBorderColor=Qe||tt.colors.borderColor),tt.colors=setBackgroundColors(tt.colors,Le),tt.colors=setTextColors(tt.colors,Le),tt.colors.link=Ue??tt.colors.blueTextColor,tt.colors.codeTextColor=ot??tt.colors.greenTextColor,notNullOrUndefined(Ne)&&Ne.length>0){const gt=validateChartColors("chartCategoricalColors",Ne);gt.length>0&&(tt.colors.chartCategoricalColors=gt)}if(notNullOrUndefined(Fe)&&Fe.length>0){const gt=validateChartColors("chartSequentialColors",Fe);gt.length===10?tt.colors.chartSequentialColors=gt:LOG$h.warn(`Invalid chartSequentialColors: ${Fe.toString()}. Falling back to default chartSequentialColors.`)}if(notNullOrUndefined(h)){const[gt,$t]=parseRadius(h);if(notNullOrUndefined(gt)&&!isNaN(gt)){const Mt=addCssUnit(gt,$t);tt.radii.default=Mt,tt.radii.button=Mt,tt.radii.md=addCssUnit(roundToTwoDecimals(gt*.5),$t),tt.radii.xl=addCssUnit(roundToTwoDecimals(gt*1.5),$t),tt.radii.xxl=addCssUnit(roundToTwoDecimals(gt*2),$t)}else LOG$h.warn(`Invalid base radius: ${h}. Falling back to default base radius.`)}if(notNullOrUndefined(y)){const[gt,$t]=parseRadius(y);notNullOrUndefined(gt)&&!isNaN(gt)?tt.radii.button=addCssUnit(gt,$t):LOG$h.warn(`Invalid button radius: ${y}. Falling back to default button radius.`)}if(d&&d>0&&(tt.fontSizes.baseFontSize=d),$){const gt=parseFontSize("codeFontSize",$,o);gt&&(tt.fontSizes.codeFontSize=gt)}tt.fontSizes=setHeadingFontSizes(tt.fontSizes,o,tt.fontSizes.baseFontSize,Z),tt.fontWeights=setFontWeights(i.emotion.fontWeights,o,p,E,be);const wt={...t,bodyFont:ye?parseFont(ye,fonts.sansSerif):t.bodyFont,codeFont:we?parseFont(we,fonts.monospace):t.codeFont,headingFont:H?parseFont(H,fonts.sansSerif):t.headingFont};return ye&&!H&&(wt.headingFont=parseFont(ye,fonts.sansSerif)),{...i.emotion,genericFonts:wt,...tt}},toThemeInput=n=>{const{colors:i}=n;return{primaryColor:i.primary,backgroundColor:i.bgColor,secondaryBackgroundColor:i.secondaryBg,textColor:i.bodyText,bodyFont:n.genericFonts.bodyFont}},toExportedTheme=n=>{const{colors:i}=n,e=toThemeInput(n);return{primaryColor:e.primaryColor,backgroundColor:e.backgroundColor,secondaryBackgroundColor:e.secondaryBackgroundColor,textColor:e.textColor,bodyFont:e.bodyFont,base:bgColorToBaseString(e.backgroundColor),...computeDerivedColors(i)}},completeThemeInput=(n,i)=>new CustomThemeConfig({...toThemeInput(i.emotion),...n}),createTheme=(n,i,e,t=!1)=>{let o;e?o=completeThemeInput(i,e):i.base===CustomThemeConfig.BaseTheme.DARK?o=completeThemeInput(i,darkTheme):o=completeThemeInput(i,lightTheme);const d=o.backgroundColor,p=merge$1(cloneDeep(e||(getLuminance(d)>.5?lightTheme:darkTheme)),{emotion:{inSidebar:t}}),h=createEmotionTheme(o,p),y=cloneDeep(createBaseUiTheme(h,p.primitives));return{...p,name:n,emotion:h,basewebTheme:y,themeInput:i}},getCachedTheme=()=>{if(!localStorageAvailable())return null;const n=window.localStorage.getItem(LocalStore.ACTIVE_THEME);if(!n)return null;const{name:i,themeInput:e}=JSON.parse(n);switch(i){case lightTheme.name:return getMergedLightTheme();case darkTheme.name:return getMergedDarkTheme();case CUSTOM_THEME_LIGHT_NAME:return{...createTheme(i,e),displayName:"Light"};case CUSTOM_THEME_DARK_NAME:return{...createTheme(i,e),displayName:"Dark"};default:return createTheme(i,e)}},deleteOldCachedThemes=()=>{const{CACHED_THEME_VERSION:n,CACHED_THEME_BASE_KEY:i}=LocalStore,{localStorage:e}=window;e.removeItem("stActiveTheme"),e.removeItem(i);for(let t=1;t<=n;t++)e.removeItem(`${i}-v${t}`)},setCachedTheme=n=>{if(!localStorageAvailable()||(deleteOldCachedThemes(),isLightThemeInQueryParams()||isDarkThemeInQueryParams()))return;const i={name:n.name,...!isPresetTheme(n)&&{themeInput:toThemeInput(n.emotion)}};window.localStorage.setItem(LocalStore.ACTIVE_THEME,JSON.stringify(i))},removeCachedTheme=()=>{localStorageAvailable()&&window.localStorage.removeItem(LocalStore.ACTIVE_THEME)},getHostSpecifiedThemeOnly=()=>isLightThemeInQueryParams()?getMergedLightTheme():isDarkThemeInQueryParams()?getMergedDarkTheme():null,getHostSpecifiedTheme=()=>getHostSpecifiedThemeOnly()??createAutoTheme(),getDefaultTheme=()=>{const n=getCachedTheme();return n&&n.name!==AUTO_THEME_NAME?n:getHostSpecifiedTheme()},whiteSpace=/\s+/;function computeSpacingStyle(n,i){return n===""?"":n.split(whiteSpace).map(e=>e==="0"?i.spacing.none:e in i.spacing?i.spacing[e]:(LOG$h.error(`Invalid spacing value: ${e}`),i.spacing.none)).join(" ")}function addCssUnit(n,i){return`${n}${i}`}function roundToTwoDecimals(n){return parseFloat(n.toFixed(2))}function blend(n,i){if(i===void 0)return n;const[e,t,o,d]=parseToRgba(n);if(d===1)return n;const[p,h,y,$]=parseToRgba(i),E=d+$*(1-d),M=Math.round((d*e+$*p*(1-d))/E),H=Math.round((d*t+$*h*(1-d))/E),Z=Math.round((d*o+$*y*(1-d))/E);return toHex(`rgba(${M}, ${H}, ${Z}, ${E})`)}const getFocusBoxShadow=(n,i=.5,e="0.2rem")=>`0 0 0 ${e} ${transparentize(n,i)}`,getPrimaryFocusBoxShadow=n=>getFocusBoxShadow(n.colors.primary),convertRemToPx=n=>parseFloat(n.replace(/rem$/,""))*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),skipProtobufDefaults=(n,i)=>{if(i===""||i===null||Array.isArray(i)&&i.length===0)return n},handleSectionInheritance=(n,i)=>{const e=i==="light",t=e?CustomThemeConfig.BaseTheme.LIGHT:CustomThemeConfig.BaseTheme.DARK,{light:o,dark:d,sidebar:p,...h}=n,y=e?o:d,{sidebar:$,...E}=y||{},M=mergeWith({},h,E,{base:t},skipProtobufDefaults);return(p||$)&&(M.sidebar=mergeWith({},p,$,skipProtobufDefaults)),M},hasThemeSectionConfigs=n=>{if(!n)return!1;const i=e=>e==null?!1:Array.isArray(e)?e.length>0:typeof e=="object"?Object.values(e).some(i):!0;return Object.values(n).some(i)},createCustomThemes=n=>{const i=hasThemeSectionConfigs(n.light),e=hasThemeSectionConfigs(n.dark),t=[];if(i||e){const o=handleSectionInheritance(n,"light"),d={...createTheme(CUSTOM_THEME_LIGHT_NAME,o),displayName:"Light"},p=handleSectionInheritance(n,"dark"),h={...createTheme(CUSTOM_THEME_DARK_NAME,p),displayName:"Dark"},$={...getSystemThemePreference()==="dark"?h:d,displayName:AUTO_THEME_NAME,name:CUSTOM_THEME_AUTO_NAME};t.push(d,h,$)}else{const o=createTheme(CUSTOM_THEME_NAME,n);t.push(o)}return t},setSidebarHeadingFontSizes=n=>merge$1([],["1.5rem","1.25rem","1.125rem","1rem","0.875rem","0.75rem"],n||[]),createSidebarTheme=n=>{const i=n.themeInput?.sidebar,{bgColor:e,secondaryBg:t}=n.emotion.colors,o=i?.backgroundColor||t,d=i?.secondaryBackgroundColor||e,p=setSidebarHeadingFontSizes(i?.headingFontSizes);let h=getLuminance(o)>.5?CustomThemeConfig.BaseTheme.LIGHT:CustomThemeConfig.BaseTheme.DARK;n.name===CUSTOM_THEME_LIGHT_NAME?h=CustomThemeConfig.BaseTheme.LIGHT:n.name===CUSTOM_THEME_DARK_NAME&&(h=CustomThemeConfig.BaseTheme.DARK);const y=mergeWith({},n.themeInput,i,{base:h,backgroundColor:o,secondaryBackgroundColor:d,headingFontSizes:p},skipProtobufDefaults);return createTheme("Sidebar",y,void 0,!0)},THEME_MAPPING={[lightTheme.name]:CUSTOM_THEME_LIGHT_NAME,[darkTheme.name]:CUSTOM_THEME_DARK_NAME,[CUSTOM_THEME_LIGHT_NAME]:lightTheme.name,[CUSTOM_THEME_DARK_NAME]:darkTheme.name},mapCachedThemeToAvailableTheme=(n,i)=>{if(!n)return null;const e=i.find(o=>o.name===n.name);if(e)return e;const t=THEME_MAPPING[n.name];return t?i.find(o=>o.name===t)??null:null},isPositiveNumber=n=>typeof n=="number"&&n>=0&&!isNaN(n),isNonZeroPositiveNumber=n=>typeof n=="number"&&n>0&&!isNaN(n),getWidth=(n,i)=>{if(i?.useContainerWidth)return{type:"stretch"};const e=n.widthConfig?.useStretch||i?.widthConfig?.useStretch,t=n?.widthConfig?.useContent||i?.widthConfig?.useContent,o=n?.widthConfig?.pixelWidth||i?.widthConfig?.pixelWidth||n.widthConfig?.pixelWidth===0,d=n.widthConfig?.remWidth;return e?{type:"stretch"}:t?{type:"content"}:d&&isPositiveNumber(n.widthConfig?.remWidth)?{type:"rem",rem:n.widthConfig.remWidth}:o&&isPositiveNumber(n.widthConfig?.pixelWidth)?{type:"pixel",pixels:n.widthConfig.pixelWidth}:o&&isPositiveNumber(i?.widthConfig?.pixelWidth)?{type:"pixel",pixels:i.widthConfig.pixelWidth}:isNonZeroPositiveNumber(i?.width)&&!n.widthConfig?{type:"pixel",pixels:i.width}:{type:"auto"}},getHeight=(n,i)=>{const e=!!n.heightConfig?.useStretch,t=!!n.heightConfig?.useContent,o=!!n.heightConfig?.pixelHeight||n.heightConfig?.pixelHeight===0,d=n.heightConfig?.remHeight;return e?{type:"stretch"}:t?{type:"content"}:d&&isPositiveNumber(n.heightConfig?.remHeight)?{type:"rem",rem:n.heightConfig.remHeight}:o&&isPositiveNumber(n.heightConfig?.pixelHeight)?{type:"pixel",pixels:n.heightConfig.pixelHeight}:isNonZeroPositiveNumber(i?.height)&&!n.heightConfig?{type:"pixel",pixels:i.height}:{type:"auto"}},getFlex=(n,i,e,t)=>{if(e===Direction.HORIZONTAL)switch(n.type){case"pixel":return`0 0 ${n.pixels}px`;case"rem":return`0 0 ${n.rem}rem`;case"content":return"0 0 fit-content";case"stretch":return`1 1 ${t??"fit-content"}`;case"auto":return;default:assertNever(n)}else if(e===Direction.VERTICAL)switch(i.type){case"pixel":return`0 0 ${i.pixels}px`;case"rem":return`0 0 ${i.rem}rem`;case"content":case"stretch":case"auto":return;default:assertNever(i)}},getDirection=n=>n?.direction,calculateMinWidthWithParentConstraint=(n,i,e=32)=>{if(i===void 0||n===void 0||n==="fit-content")return n;const t=convertRemToPx(n);return i<t&&i>e?`${i-e}px`:n},useLayoutStyles=({element:n,subElement:i,styleOverrides:e,minStretchBehavior:t})=>{const o=reactExports.useContext(FlexContext);return reactExports.useMemo(()=>{if(!n)return{width:"auto",height:"auto",overflow:"visible"};const p=getWidth(n,i);let h,y;switch(p.type){case"stretch":h="100%";break;case"rem":h=`${p.rem}rem`;break;case"pixel":h=`${p.pixels}px`;break;case"content":h="fit-content";break;case"auto":h="auto";break;default:assertNever(p)}const $=getDirection(o);o?.isInContentWidthContainer&&p.type==="stretch"&&t!==void 0&&(y=calculateMinWidthWithParentConstraint(t,o?.parentWidth));const E=getHeight(n,i);let M,H="visible";switch(E.type){case"stretch":M="100%";break;case"content":M="auto";break;case"rem":M=`${E.rem}rem`;break;case"pixel":M=`${E.pixels}px`,H="auto";break;case"auto":M="auto";break;default:assertNever(E)}const Z=getFlex(p,E,$,t),be=getTextAlignmentStyle("textAlignmentConfig"in n?n.textAlignmentConfig:void 0);return{...{width:h,height:M,overflow:H,flex:Z,minWidth:y,textAlign:be},...e}},[n,i,e,o,t])};var ScriptRunState=(function(n){return n.NOT_RUNNING="notRunning",n.RUNNING="running",n.RERUN_REQUESTED="rerunRequested",n.STOP_REQUESTED="stopRequested",n.COMPILATION_ERROR="compilationError",n})({});const ScriptRunContext=reactExports.createContext({scriptRunState:ScriptRunState.NOT_RUNNING,scriptRunId:"<null>",fragmentIdsThisRun:[]});ScriptRunContext.displayName="ScriptRunContext";var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$1(function(n){return reactPropsRegex.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function n(i){return i!=="theme"},getDefaultShouldForwardProp=function n(i){return typeof i=="string"&&i.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function n(i,e,t){var o;if(e){var d=e.shouldForwardProp;o=i.__emotion_forwardProp&&d?function(p){return i.__emotion_forwardProp(p)&&d(p)}:d}return typeof o!="function"&&t&&(o=i.__emotion_forwardProp),o},Insertion=function n(i){var e=i.cache,t=i.serialized,o=i.isStringTag;return registerStyles(e,t,o),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(e,t,o)}),null},createStyled=function n(i,e){var t=i.__emotion_real===i,o=t&&i.__emotion_base||i,d,p;e!==void 0&&(d=e.label,p=e.target);var h=composeShouldForwardProps(i,e,t),y=h||getDefaultShouldForwardProp(o),$=!y("as");return function(){var E=arguments,M=t&&i.__emotion_styles!==void 0?i.__emotion_styles.slice(0):[];if(d!==void 0&&M.push("label:"+d+";"),E[0]==null||E[0].raw===void 0)M.push.apply(M,E);else{var H=E[0];M.push(H[0]);for(var Z=E.length,be=1;be<Z;be++)M.push(E[be],H[be])}var ye=withEmotionCache(function(we,xe,Ce){var Ne=$&&we.as||o,Fe="",Me=[],Le=we;if(we.theme==null){Le={};for(var ze in we)Le[ze]=we[ze];Le.theme=reactExports.useContext(ThemeContext$2)}typeof we.className=="string"?Fe=getRegisteredStyles(xe.registered,Me,we.className):we.className!=null&&(Fe=we.className+" ");var Ke=serializeStyles(M.concat(Me),xe.registered,Le);Fe+=xe.key+"-"+Ke.name,p!==void 0&&(Fe+=" "+p);var Ve=$&&h===void 0?getDefaultShouldForwardProp(Ne):y,je={};for(var We in we)$&&We==="as"||Ve(We)&&(je[We]=we[We]);return je.className=Fe,Ce&&(je.ref=Ce),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:xe,serialized:Ke,isStringTag:typeof Ne=="string"}),reactExports.createElement(Ne,je))});return ye.displayName=d!==void 0?d:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",ye.defaultProps=i.defaultProps,ye.__emotion_real=ye,ye.__emotion_base=o,ye.__emotion_styles=M,ye.__emotion_forwardProp=h,Object.defineProperty(ye,"toString",{value:function(){return"."+p}}),ye.withComponent=function(we,xe){var Ce=n(we,_extends$A({},e,xe,{shouldForwardProp:composeShouldForwardProps(ye,xe,!0)}));return Ce.apply(void 0,M)},ye}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],styled=createStyled.bind(null);tags.forEach(function(n){styled[n]=styled(n)});var SIZE$3={medium:"medium"},spin={from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},StyledSpinner=styled$1("i",function(n){var i=n.$theme,e=n.$color,t=e===void 0?i.colors.contentAccent:e,o=n.$borderWidth,d=n.$size,p=d===void 0?SIZE$3.medium:d,h={large:i.sizing.scale300,medium:i.sizing.scale100,small:i.sizing.scale0}[o||p],y={large:i.sizing.scale1000,medium:i.sizing.scale900,small:i.sizing.scale800}[p];return h||(h=i.sizing[o],h||(h="".concat(parseInt(o),"px"))),y||(y=i.sizing[p],y||(y="".concat(parseInt(p),"px"))),{display:"block",animationName:spin,animationDuration:i.animation.timing1000,animationIterationCount:"infinite",animationTimingFunction:"linear",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderRadius:"50%",borderTopColor:t,borderRightColor:i.colors.backgroundTertiary,borderBottomColor:i.colors.backgroundTertiary,borderLeftColor:i.colors.backgroundTertiary,borderLeftWidth:h,borderRightWidth:h,borderTopWidth:h,borderBottomWidth:h,width:y,height:y,cursor:"wait"}});StyledSpinner.displayName="StyledSpinner";StyledSpinner.displayName="StyledSpinner";const StyledSpinnerIcon=styled(StyledSpinner,{shouldForwardProp:n=>isPropValid(n)&&!["size"].includes(n),target:"e85ta9p0"})(({size:n="lg",margin:i="",padding:e="",theme:t})=>{const o=`calc(${t.iconSizes[n]} * 0.80)`;return{width:o,height:o,fontSize:o,justifyContents:"center",margin:computeSpacingStyle(i,t),padding:computeSpacingStyle(e,t),borderColor:t.colors.fadedText10,borderTopColor:t.colors.bodyText,borderWidth:t.sizes.spinnerThickness,flexGrow:0,flexShrink:0}}),StyledIcon=styled("span",{shouldForwardProp:n=>isPropValid(n)&&!["size","as"].includes(n),target:"e85ta9p1"})(({color:n,size:i,margin:e,padding:t,theme:o})=>({color:n||"inherit",fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:o.iconSizes[i],width:o.iconSizes[i],height:o.iconSizes[i],margin:computeSpacingStyle(e,o),padding:computeSpacingStyle(t,o),flexShrink:0})),StyledDynamicIcon=styled("span",{target:"e85ta9p2"})(({size:n="lg",margin:i="",padding:e="",theme:t})=>({fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:t.iconSizes[n],width:t.iconSizes[n],height:t.iconSizes[n],margin:computeSpacingStyle(i,t),padding:computeSpacingStyle(e,t),flexShrink:0})),StyledImageIcon=styled("img",{target:"e85ta9p3"})({width:"100%",height:"100%"}),StyledEmojiIcon=styled("span",{target:"e85ta9p4"})(({size:n,margin:i,padding:e,theme:t,color:o})=>{const d=`calc(${t.iconSizes[n]} * 0.90)`;return{display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:d,width:d,height:d,margin:computeSpacingStyle(i,t),padding:computeSpacingStyle(e,t),color:o}}),getDefaultProps$1=({size:n,margin:i,padding:e,color:t})=>({size:n||"md",margin:i||"",padding:e||"",color:t||void 0}),Icon$2=({content:n,color:i,size:e,margin:t,padding:o,testid:d})=>jsx$1(StyledIcon,{as:n,"aria-hidden":"true","data-testid":d,...getDefaultProps$1({size:e,margin:t,padding:o,color:i})}),EmojiIcon=({size:n,margin:i,padding:e,children:t,color:o,testid:d})=>(typeof t=="string"&&(t=t.replace(/^emoji:/,"")),jsx$1(StyledEmojiIcon,{"data-testid":d||"stIconEmoji","aria-hidden":"true",...getDefaultProps$1({size:n,margin:i,padding:e,color:o}),children:t})),StyledMaterialIcon=styled("span",{target:"evzmhao0"})(({size:n,margin:i,padding:e,theme:t,color:o})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",color:o,fontSize:t.iconSizes[n],width:t.iconSizes[n],height:t.iconSizes[n],margin:computeSpacingStyle(i,t),padding:computeSpacingStyle(e,t),userSelect:"none",fontFamily:t.genericFonts.iconFont,fontWeight:t.fontWeights.normal,fontStyle:"normal",lineHeight:t.lineHeights.none,letterSpacing:"normal",textTransform:"none",whiteSpace:"nowrap",wordWrap:"normal",direction:"ltr",fontFeatureSettings:"liga",MozFontFeatureSettings:"liga",WebkitFontFeatureSettings:"liga",WebkitFontSmoothing:"antialiased"})),getDefaultProps=({size:n,margin:i,padding:e,color:t})=>({size:n||"md",margin:i||"",padding:e||"",color:t||"inherit"}),MaterialFontIcon=({iconName:n,...i})=>jsx$1(StyledMaterialIcon,{...getDefaultProps(i),"data-testid":i.testid||"stIconMaterial",translate:"no",children:n});function parseIconPackEntry(n){const i=n.match(/^:(.+)\/(.+):$/);if(i===null)return{pack:"emoji",icon:n};const e=i[1],t=i[2];return{pack:e,icon:t}}function isMaterialIcon(n){if(!n)return!1;const i=parseIconPackEntry(n);return i.pack==="material"&&i.icon!==""}function getFilledStarIconSrc(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg2MF84NDMpIj48cGF0aCBkPSJNOS45OTk5NCAxNC4zOTE2TDEzLjQ1ODMgMTYuNDgzM0MxNC4wOTE2IDE2Ljg2NjYgMTQuODY2NiAxNi4zIDE0LjY5OTkgMTUuNTgzM0wxMy43ODMzIDExLjY1TDE2Ljg0MTYgOC45OTk5N0MxNy4zOTk5IDguNTE2NjMgMTcuMDk5OSA3LjU5OTk3IDE2LjM2NjYgNy41NDE2M0wxMi4zNDE2IDcuMTk5OTdMMTAuNzY2NiAzLjQ4MzNDMTAuNDgzMyAyLjgwODMgOS41MTY2MSAyLjgwODMgOS4yMzMyNyAzLjQ4MzNMNy42NTgyNyA3LjE5MTYzTDMuNjMzMjcgNy41MzMzQzIuODk5OTQgNy41OTE2MyAyLjU5OTk0IDguNTA4MyAzLjE1ODI3IDguOTkxNjNMNi4yMTY2MSAxMS42NDE2TDUuMjk5OTQgMTUuNTc1QzUuMTMzMjcgMTYuMjkxNiA1LjkwODI3IDE2Ljg1ODMgNi41NDE2MSAxNi40NzVMOS45OTk5NCAxNC4zOTE2WiIgZmlsbD0iI0ZBQ0EyQiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzE4NjBfODQzIj48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+"}const DynamicIconDispatcher=({iconValue:n,...i})=>{if(n==="spinner")return jsx$1(StyledDynamicIcon,{...i,children:jsx$1(StyledSpinnerIcon,{"data-testid":i.testid||"stSpinnerIcon",...i})});const{pack:e,icon:t}=parseIconPackEntry(n);switch(e){case"material":switch(t){case"star_filled":return jsx$1(StyledDynamicIcon,{...i,children:jsx$1(StyledImageIcon,{src:getFilledStarIconSrc(),"data-testid":i.testid||"stImageIcon"})});default:return jsx$1(StyledDynamicIcon,{...i,children:jsx$1(MaterialFontIcon,{pack:e,iconName:t,...i})})}case"emoji":default:return jsx$1(StyledDynamicIcon,{...i,children:jsx$1(EmojiIcon,{...i,children:t})})}},DynamicIcon=n=>jsx$1(reactExports.Suspense,{fallback:jsx$1(StyledDynamicIcon,{...n,children:jsx$1(EmojiIcon,{...n,children:" "})}),children:jsx$1(DynamicIconDispatcher,{...n})},n.iconValue),LibConfigContext=reactExports.createContext({locale:window.navigator.language,mapboxToken:void 0,enforceDownloadInNewTab:void 0,resourceCrossOriginMode:void 0});LibConfigContext.displayName="LibConfigContext";var Pe=Object.defineProperty,a$1=(n,i)=>Pe(n,"name",{value:i,configurable:!0}),P=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(n,i,e,t,o,d){this.type=n,this.name=i,this.prefix=e,this.value=t,this.suffix=o,this.modifier=d}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};a$1(P,"Part");var Re=/[$_\p{ID_Start}]/u,Ee=/[$_\u200C\u200D\p{ID_Continue}]/u,v=".*";function Oe(n,i){return(i?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(n)}a$1(Oe,"isASCII");function D(n,i=!1){let e=[],t=0;for(;t<n.length;){let o=n[t],d=a$1(function(p){if(!i)throw new TypeError(p);e.push({type:"INVALID_CHAR",index:t,value:n[t++]})},"ErrorOrInvalid");if(o==="*"){e.push({type:"ASTERISK",index:t,value:n[t++]});continue}if(o==="+"||o==="?"){e.push({type:"OTHER_MODIFIER",index:t,value:n[t++]});continue}if(o==="\\"){e.push({type:"ESCAPED_CHAR",index:t++,value:n[t++]});continue}if(o==="{"){e.push({type:"OPEN",index:t,value:n[t++]});continue}if(o==="}"){e.push({type:"CLOSE",index:t,value:n[t++]});continue}if(o===":"){let p="",h=t+1;for(;h<n.length;){let y=n.substr(h,1);if(h===t+1&&Re.test(y)||h!==t+1&&Ee.test(y)){p+=n[h++];continue}break}if(!p){d(`Missing parameter name at ${t}`);continue}e.push({type:"NAME",index:t,value:p}),t=h;continue}if(o==="("){let p=1,h="",y=t+1,$=!1;if(n[y]==="?"){d(`Pattern cannot start with "?" at ${y}`);continue}for(;y<n.length;){if(!Oe(n[y],!1)){d(`Invalid character '${n[y]}' at ${y}.`),$=!0;break}if(n[y]==="\\"){h+=n[y++]+n[y++];continue}if(n[y]===")"){if(p--,p===0){y++;break}}else if(n[y]==="("&&(p++,n[y+1]!=="?")){d(`Capturing groups are not allowed at ${y}`),$=!0;break}h+=n[y++]}if($)continue;if(p){d(`Unbalanced pattern at ${t}`);continue}if(!h){d(`Missing pattern at ${t}`);continue}e.push({type:"REGEX",index:t,value:h}),t=y;continue}e.push({type:"CHAR",index:t,value:n[t++]})}return e.push({type:"END",index:t,value:""}),e}a$1(D,"lexer");function F(n,i={}){let e=D(n);i.delimiter??="/#?",i.prefixes??="./";let t=`[^${x(i.delimiter)}]+?`,o=[],d=0,p=0,h=new Set,y=a$1(Ce=>{if(p<e.length&&e[p].type===Ce)return e[p++].value},"tryConsume"),$=a$1(()=>y("OTHER_MODIFIER")??y("ASTERISK"),"tryConsumeModifier"),E=a$1(Ce=>{let Ne=y(Ce);if(Ne!==void 0)return Ne;let{type:Fe,index:Me}=e[p];throw new TypeError(`Unexpected ${Fe} at ${Me}, expected ${Ce}`)},"mustConsume"),M=a$1(()=>{let Ce="",Ne;for(;Ne=y("CHAR")??y("ESCAPED_CHAR");)Ce+=Ne;return Ce},"consumeText"),H=a$1(Ce=>Ce,"DefaultEncodePart"),Z=i.encodePart||H,be="",ye=a$1(Ce=>{be+=Ce},"appendToPendingFixedValue"),we=a$1(()=>{be.length&&(o.push(new P(3,"","",Z(be),"",3)),be="")},"maybeAddPartFromPendingFixedValue"),xe=a$1((Ce,Ne,Fe,Me,Le)=>{let ze=3;switch(Le){case"?":ze=1;break;case"*":ze=0;break;case"+":ze=2;break}if(!Ne&&!Fe&&ze===3){ye(Ce);return}if(we(),!Ne&&!Fe){if(!Ce)return;o.push(new P(3,"","",Z(Ce),"",ze));return}let Ke;Fe?Fe==="*"?Ke=v:Ke=Fe:Ke=t;let Ve=2;Ke===t?(Ve=1,Ke=""):Ke===v&&(Ve=0,Ke="");let je;if(Ne?je=Ne:Fe&&(je=d++),h.has(je))throw new TypeError(`Duplicate name '${je}'.`);h.add(je),o.push(new P(Ve,je,Z(Ce),Ke,Z(Me),ze))},"addPart");for(;p<e.length;){let Ce=y("CHAR"),Ne=y("NAME"),Fe=y("REGEX");if(!Ne&&!Fe&&(Fe=y("ASTERISK")),Ne||Fe){let Le=Ce??"";i.prefixes.indexOf(Le)===-1&&(ye(Le),Le=""),we();let ze=$();xe(Le,Ne,Fe,"",ze);continue}let Me=Ce??y("ESCAPED_CHAR");if(Me){ye(Me);continue}if(y("OPEN")){let Le=M(),ze=y("NAME"),Ke=y("REGEX");!ze&&!Ke&&(Ke=y("ASTERISK"));let Ve=M();E("CLOSE");let je=$();xe(Le,ze,Ke,Ve,je);continue}we(),E("END")}return o}a$1(F,"parse");function x(n){return n.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a$1(x,"escapeString");function B(n){return n&&n.ignoreCase?"ui":"u"}a$1(B,"flags");function q(n,i,e){return W(F(n,e),i,e)}a$1(q,"stringToRegexp");function T(n){switch(n){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}a$1(T,"modifierToString");function W(n,i,e={}){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let t=e.start?"^":"";for(let h of n){if(h.type===3){h.modifier===3?t+=x(h.value):t+=`(?:${x(h.value)})${T(h.modifier)}`;continue}i&&i.push(h.name);let y=`[^${x(e.delimiter)}]+?`,$=h.value;if(h.type===1?$=y:h.type===0&&($=v),!h.prefix.length&&!h.suffix.length){h.modifier===3||h.modifier===1?t+=`(${$})${T(h.modifier)}`:t+=`((?:${$})${T(h.modifier)})`;continue}if(h.modifier===3||h.modifier===1){t+=`(?:${x(h.prefix)}(${$})${x(h.suffix)})`,t+=T(h.modifier);continue}t+=`(?:${x(h.prefix)}`,t+=`((?:${$})(?:`,t+=x(h.suffix),t+=x(h.prefix),t+=`(?:${$}))*)${x(h.suffix)})`,h.modifier===0&&(t+="?")}let o=`[${x(e.endsWith)}]|$`,d=`[${x(e.delimiter)}]`;if(e.end)return e.strict||(t+=`${d}?`),e.endsWith.length?t+=`(?=${o})`:t+="$",new RegExp(t,B(e));e.strict||(t+=`(?:${d}(?=${o}))?`);let p=!1;if(n.length){let h=n[n.length-1];h.type===3&&h.modifier===3&&(p=e.delimiter.indexOf(h)>-1)}return p||(t+=`(?=${d}|${o})`),new RegExp(t,B(e))}a$1(W,"partsToRegexp");var b={delimiter:"",prefixes:"",sensitive:!0,strict:!0},J={delimiter:".",prefixes:"",sensitive:!0,strict:!0},Q={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ee(n,i){return n.length?n[0]==="/"?!0:!i||n.length<2?!1:(n[0]=="\\"||n[0]=="{")&&n[1]=="/":!1}a$1(ee,"isAbsolutePathname");function te(n,i){return n.startsWith(i)?n.substring(i.length,n.length):n}a$1(te,"maybeStripPrefix");function ke(n,i){return n.endsWith(i)?n.substr(0,n.length-i.length):n}a$1(ke,"maybeStripSuffix");function _$1(n){return!n||n.length<2?!1:n[0]==="["||(n[0]==="\\"||n[0]==="{")&&n[1]==="["}a$1(_$1,"treatAsIPv6Hostname");var re$1=["ftp","file","http","https","ws","wss"];function U(n){if(!n)return!0;for(let i of re$1)if(n.test(i))return!0;return!1}a$1(U,"isSpecialScheme");function ne(n,i){if(n=te(n,"#"),i||n==="")return n;let e=new URL("https://example.com");return e.hash=n,e.hash?e.hash.substring(1,e.hash.length):""}a$1(ne,"canonicalizeHash");function se(n,i){if(n=te(n,"?"),i||n==="")return n;let e=new URL("https://example.com");return e.search=n,e.search?e.search.substring(1,e.search.length):""}a$1(se,"canonicalizeSearch");function ie(n,i){return i||n===""?n:_$1(n)?K(n):j(n)}a$1(ie,"canonicalizeHostname");function ae(n,i){if(i||n==="")return n;let e=new URL("https://example.com");return e.password=n,e.password}a$1(ae,"canonicalizePassword");function oe(n,i){if(i||n==="")return n;let e=new URL("https://example.com");return e.username=n,e.username}a$1(oe,"canonicalizeUsername");function ce(n,i,e){if(e||n==="")return n;if(i&&!re$1.includes(i))return new URL(`${i}:${n}`).pathname;let t=n[0]=="/";return n=new URL(t?n:"/-"+n,"https://example.com").pathname,t||(n=n.substring(2,n.length)),n}a$1(ce,"canonicalizePathname");function le(n,i,e){return z(i)===n&&(n=""),e||n===""?n:G(n)}a$1(le,"canonicalizePort");function fe(n,i){return n=ke(n,":"),i||n===""?n:w(n)}a$1(fe,"canonicalizeProtocol");function z(n){switch(n){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}a$1(z,"defaultPortForProtocol");function w(n){if(n==="")return n;if(/^[-+.A-Za-z0-9]*$/.test(n))return n.toLowerCase();throw new TypeError(`Invalid protocol '${n}'.`)}a$1(w,"protocolEncodeCallback");function he(n){if(n==="")return n;let i=new URL("https://example.com");return i.username=n,i.username}a$1(he,"usernameEncodeCallback");function ue(n){if(n==="")return n;let i=new URL("https://example.com");return i.password=n,i.password}a$1(ue,"passwordEncodeCallback");function j(n){if(n==="")return n;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(n))throw new TypeError(`Invalid hostname '${n}'`);let i=new URL("https://example.com");return i.hostname=n,i.hostname}a$1(j,"hostnameEncodeCallback");function K(n){if(n==="")return n;if(/[^0-9a-fA-F[\]:]/g.test(n))throw new TypeError(`Invalid IPv6 hostname '${n}'`);return n.toLowerCase()}a$1(K,"ipv6HostnameEncodeCallback");function G(n){if(n===""||/^[0-9]*$/.test(n)&&parseInt(n)<=65535)return n;throw new TypeError(`Invalid port '${n}'.`)}a$1(G,"portEncodeCallback");function de(n){if(n==="")return n;let i=new URL("https://example.com");return i.pathname=n[0]!=="/"?"/-"+n:n,n[0]!=="/"?i.pathname.substring(2,i.pathname.length):i.pathname}a$1(de,"standardURLPathnameEncodeCallback");function pe(n){return n===""?n:new URL(`data:${n}`).pathname}a$1(pe,"pathURLPathnameEncodeCallback");function ge(n){if(n==="")return n;let i=new URL("https://example.com");return i.search=n,i.search.substring(1,i.search.length)}a$1(ge,"searchEncodeCallback");function me(n){if(n==="")return n;let i=new URL("https://example.com");return i.hash=n,i.hash.substring(1,i.hash.length)}a$1(me,"hashEncodeCallback");var C=class{#o;#r=[];#t={};#e=0;#i=1;#u=0;#l=0;#p=0;#h=0;#y=!1;constructor(n){this.#o=n}get result(){return this.#t}parse(){for(this.#r=D(this.#o,!0);this.#e<this.#r.length;this.#e+=this.#i){if(this.#i=1,this.#r[this.#e].type==="END"){if(this.#l===0){this.#v(),this.#c()?this.#n(9,1):this.#d()?this.#n(8,1):this.#n(7,0);continue}else if(this.#l===2){this.#f(5);continue}this.#n(10,0);break}if(this.#p>0)if(this.#x())this.#p-=1;else continue;if(this.#T()){this.#p+=1;continue}switch(this.#l){case 0:this.#S()&&this.#f(1);break;case 1:if(this.#S()){this.#E();let n=7,i=1;this.#w()?(n=2,i=3):this.#y&&(n=2),this.#n(n,i)}break;case 2:this.#m()?this.#f(3):(this.#b()||this.#d()||this.#c())&&this.#f(5);break;case 3:this.#_()?this.#n(4,1):this.#m()&&this.#n(5,1);break;case 4:this.#m()&&this.#n(5,1);break;case 5:this.#C()?this.#h+=1:this.#k()&&(this.#h-=1),this.#$()&&!this.#h?this.#n(6,1):this.#b()?this.#n(7,0):this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 6:this.#b()?this.#n(7,0):this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 7:this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 8:this.#c()&&this.#n(9,1);break}}this.#t.hostname!==void 0&&this.#t.port===void 0&&(this.#t.port="")}#n(n,i){switch(this.#l){case 0:break;case 1:this.#t.protocol=this.#s();break;case 2:break;case 3:this.#t.username=this.#s();break;case 4:this.#t.password=this.#s();break;case 5:this.#t.hostname=this.#s();break;case 6:this.#t.port=this.#s();break;case 7:this.#t.pathname=this.#s();break;case 8:this.#t.search=this.#s();break;case 9:this.#t.hash=this.#s();break}this.#l!==0&&n!==10&&([1,2,3,4].includes(this.#l)&&[6,7,8,9].includes(n)&&(this.#t.hostname??=""),[1,2,3,4,5,6].includes(this.#l)&&[8,9].includes(n)&&(this.#t.pathname??=this.#y?"/":""),[1,2,3,4,5,6,7].includes(this.#l)&&n===9&&(this.#t.search??="")),this.#O(n,i)}#O(n,i){this.#l=n,this.#u=this.#e+i,this.#e+=i,this.#i=0}#v(){this.#e=this.#u,this.#i=0}#f(n){this.#v(),this.#l=n}#g(n){return n<0&&(n=this.#r.length-n),n<this.#r.length?this.#r[n]:this.#r[this.#r.length-1]}#a(n,i){let e=this.#g(n);return e.value===i&&(e.type==="CHAR"||e.type==="ESCAPED_CHAR"||e.type==="INVALID_CHAR")}#S(){return this.#a(this.#e,":")}#w(){return this.#a(this.#e+1,"/")&&this.#a(this.#e+2,"/")}#m(){return this.#a(this.#e,"@")}#_(){return this.#a(this.#e,":")}#$(){return this.#a(this.#e,":")}#b(){return this.#a(this.#e,"/")}#d(){if(this.#a(this.#e,"?"))return!0;if(this.#r[this.#e].value!=="?")return!1;let n=this.#g(this.#e-1);return n.type!=="NAME"&&n.type!=="REGEX"&&n.type!=="CLOSE"&&n.type!=="ASTERISK"}#c(){return this.#a(this.#e,"#")}#T(){return this.#r[this.#e].type=="OPEN"}#x(){return this.#r[this.#e].type=="CLOSE"}#C(){return this.#a(this.#e,"[")}#k(){return this.#a(this.#e,"]")}#s(){let n=this.#r[this.#e],i=this.#g(this.#u).index;return this.#o.substring(i,n.index)}#E(){let n={};Object.assign(n,b),n.encodePart=w;let i=q(this.#s(),void 0,n);this.#y=U(i)}};a$1(C,"Parser");var V=["protocol","username","password","hostname","port","pathname","search","hash"],O="*";function Se(n,i){if(typeof n!="string")throw new TypeError("parameter 1 is not of type 'string'.");let e=new URL(n,i);return{protocol:e.protocol.substring(0,e.protocol.length-1),username:e.username,password:e.password,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search!==""?e.search.substring(1,e.search.length):void 0,hash:e.hash!==""?e.hash.substring(1,e.hash.length):void 0}}a$1(Se,"extractValues");function R$1(n,i){return i?I(n):n}a$1(R$1,"processBaseURLString");function L$1(n,i,e){let t;if(typeof i.baseURL=="string")try{t=new URL(i.baseURL),i.protocol===void 0&&(n.protocol=R$1(t.protocol.substring(0,t.protocol.length-1),e)),!e&&i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.username===void 0&&(n.username=R$1(t.username,e)),!e&&i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.username===void 0&&i.password===void 0&&(n.password=R$1(t.password,e)),i.protocol===void 0&&i.hostname===void 0&&(n.hostname=R$1(t.hostname,e)),i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&(n.port=R$1(t.port,e)),i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.pathname===void 0&&(n.pathname=R$1(t.pathname,e)),i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.pathname===void 0&&i.search===void 0&&(n.search=R$1(t.search.substring(1,t.search.length),e)),i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.pathname===void 0&&i.search===void 0&&i.hash===void 0&&(n.hash=R$1(t.hash.substring(1,t.hash.length),e))}catch{throw new TypeError(`invalid baseURL '${i.baseURL}'.`)}if(typeof i.protocol=="string"&&(n.protocol=fe(i.protocol,e)),typeof i.username=="string"&&(n.username=oe(i.username,e)),typeof i.password=="string"&&(n.password=ae(i.password,e)),typeof i.hostname=="string"&&(n.hostname=ie(i.hostname,e)),typeof i.port=="string"&&(n.port=le(i.port,n.protocol,e)),typeof i.pathname=="string"){if(n.pathname=i.pathname,t&&!ee(n.pathname,e)){let o=t.pathname.lastIndexOf("/");o>=0&&(n.pathname=R$1(t.pathname.substring(0,o+1),e)+n.pathname)}n.pathname=ce(n.pathname,n.protocol,e)}return typeof i.search=="string"&&(n.search=se(i.search,e)),typeof i.hash=="string"&&(n.hash=ne(i.hash,e)),n}a$1(L$1,"applyInit");function I(n){return n.replace(/([+*?:{}()\\])/g,"\\$1")}a$1(I,"escapePatternString");function Te(n){return n.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a$1(Te,"escapeRegexpString");function Ae(n,i){i.delimiter??="/#?",i.prefixes??="./",i.sensitive??=!1,i.strict??=!1,i.end??=!0,i.start??=!0,i.endsWith="";let e=".*",t=`[^${Te(i.delimiter)}]+?`,o=/[$_\u200C\u200D\p{ID_Continue}]/u,d="";for(let p=0;p<n.length;++p){let h=n[p];if(h.type===3){if(h.modifier===3){d+=I(h.value);continue}d+=`{${I(h.value)}}${T(h.modifier)}`;continue}let y=h.hasCustomName(),$=!!h.suffix.length||!!h.prefix.length&&(h.prefix.length!==1||!i.prefixes.includes(h.prefix)),E=p>0?n[p-1]:null,M=p<n.length-1?n[p+1]:null;if(!$&&y&&h.type===1&&h.modifier===3&&M&&!M.prefix.length&&!M.suffix.length)if(M.type===3){let H=M.value.length>0?M.value[0]:"";$=o.test(H)}else $=!M.hasCustomName();if(!$&&!h.prefix.length&&E&&E.type===3){let H=E.value[E.value.length-1];$=i.prefixes.includes(H)}$&&(d+="{"),d+=I(h.prefix),y&&(d+=`:${h.name}`),h.type===2?d+=`(${h.value})`:h.type===1?y||(d+=`(${t})`):h.type===0&&(!y&&(!E||E.type===3||E.modifier!==3||$||h.prefix!=="")?d+="*":d+=`(${e})`),h.type===1&&y&&h.suffix.length&&o.test(h.suffix[0])&&(d+="\\"),d+=I(h.suffix),$&&(d+="}"),h.modifier!==3&&(d+=T(h.modifier))}return d}a$1(Ae,"partsToPattern");var Y=class{#o;#r={};#t={};#e={};#i={};#u=!1;constructor(n={},i,e){try{let t;if(typeof i=="string"?t=i:e=i,typeof n=="string"){let h=new C(n);if(h.parse(),n=h.result,t===void 0&&typeof n.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");n.baseURL=t}else{if(!n||typeof n!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(t)throw new TypeError("parameter 1 is not of type 'string'.")}typeof e>"u"&&(e={ignoreCase:!1});let o={ignoreCase:e.ignoreCase===!0},d={pathname:O,protocol:O,username:O,password:O,hostname:O,port:O,search:O,hash:O};this.#o=L$1(d,n,!0),z(this.#o.protocol)===this.#o.port&&(this.#o.port="");let p;for(p of V){if(!(p in this.#o))continue;let h={},y=this.#o[p];switch(this.#t[p]=[],p){case"protocol":Object.assign(h,b),h.encodePart=w;break;case"username":Object.assign(h,b),h.encodePart=he;break;case"password":Object.assign(h,b),h.encodePart=ue;break;case"hostname":Object.assign(h,J),_$1(y)?h.encodePart=K:h.encodePart=j;break;case"port":Object.assign(h,b),h.encodePart=G;break;case"pathname":U(this.#r.protocol)?(Object.assign(h,Q,o),h.encodePart=de):(Object.assign(h,b,o),h.encodePart=pe);break;case"search":Object.assign(h,b,o),h.encodePart=ge;break;case"hash":Object.assign(h,b,o),h.encodePart=me;break}try{this.#i[p]=F(y,h),this.#r[p]=W(this.#i[p],this.#t[p],h),this.#e[p]=Ae(this.#i[p],h),this.#u=this.#u||this.#i[p].some($=>$.type===2)}catch{throw new TypeError(`invalid ${p} pattern '${this.#o[p]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(n={},i){let e={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof n!="string"&&i)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof n>"u")return!1;try{typeof n=="object"?e=L$1(e,n,!1):e=L$1(e,Se(n,i),!1)}catch{return!1}let t;for(t of V)if(!this.#r[t].exec(e[t]))return!1;return!0}exec(n={},i){let e={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof n!="string"&&i)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof n>"u")return;try{typeof n=="object"?e=L$1(e,n,!1):e=L$1(e,Se(n,i),!1)}catch{return null}let t={};i?t.inputs=[n,i]:t.inputs=[n];let o;for(o of V){let d=this.#r[o].exec(e[o]);if(!d)return null;let p={};for(let[h,y]of this.#t[o].entries())if(typeof y=="string"||typeof y=="number"){let $=d[h+1];p[y]=$}t[o]={input:e[o]??"",groups:p}}return t}static compareComponent(n,i,e){let t=a$1((h,y)=>{for(let $ of["type","modifier","prefix","value","suffix"]){if(h[$]<y[$])return-1;if(h[$]!==y[$])return 1}return 0},"comparePart"),o=new P(3,"","","","",3),d=new P(0,"","","","",3),p=a$1((h,y)=>{let $=0;for(;$<Math.min(h.length,y.length);++$){let E=t(h[$],y[$]);if(E)return E}return h.length===y.length?0:t(h[$]??o,y[$]??o)},"comparePartList");return!i.#e[n]&&!e.#e[n]?0:i.#e[n]&&!e.#e[n]?p(i.#i[n],[d]):!i.#e[n]&&e.#e[n]?p([d],e.#i[n]):p(i.#i[n],e.#i[n])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#u}};a$1(Y,"URLPattern");globalThis.URLPattern||(globalThis.URLPattern=Y);function isValidOrigin(n,i){let e,t,o;try{e=new URLPattern(n),t=new URLPattern({protocol:e.protocol,hostname:e.hostname}),o=new URL(i)}catch{return!1}return o.hostname==="localhost"&&t.test(o)?!0:e.test(o)}function getCrossOriginAttribute(n,i){if(i)try{const e=new URL(i);return StreamlitConfig.BACKEND_BASE_URL&&e.origin===new URL(StreamlitConfig.BACKEND_BASE_URL).origin?n:void 0}catch{return StreamlitConfig.BACKEND_BASE_URL?n:void 0}}const useCrossOriginAttribute=n=>{const{resourceCrossOriginMode:i}=reactExports.useContext(LibConfigContext);if(n)return getCrossOriginAttribute(i,n)},useEmotionTheme=()=>useTheme(),StyledChatMessageContainer=styled("div",{target:"e9vv8y20"})(({theme:n,background:i})=>{const e=hasLightBackgroundColor(n);return{width:"100%",display:"flex",alignItems:"flex-start",gap:n.spacing.sm,padding:n.spacing.lg,paddingRight:i?n.spacing.lg:0,borderRadius:n.radii.default,...i?{backgroundColor:transparentize(e?n.colors.gray20:n.colors.gray90,.5)}:{}}}),StyledMessageContent=styled("div",{target:"e9vv8y21"})(({theme:n})=>({color:n.colors.bodyText,margin:"auto",flexGrow:1,minWidth:0})),StyledAvatarBackground=styled("div",{target:"e9vv8y22"})(({theme:n})=>{const i=hasLightBackgroundColor(n);return{display:"flex",border:`${n.sizes.borderWidth} solid ${i?n.colors.gray40:n.colors.gray85}`,backgroundColor:i?n.colors.white:n.colors.gray100,color:i?n.colors.gray90:n.colors.white,lineHeight:n.lineHeights.none,fontSize:n.fontSizes.md,flexShrink:0,width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,borderRadius:n.radii.default,alignItems:"center",justifyContent:"center"}}),StyledAvatarIcon=styled("div",{target:"e9vv8y23"})(({theme:n,background:i})=>{const e=hasLightBackgroundColor(n);return{display:"flex",width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,flexShrink:0,borderRadius:n.radii.default,alignItems:"center",justifyContent:"center",backgroundColor:i,color:e?n.colors.white:n.colors.gray100}}),StyledAvatarImage=styled("img",{target:"e9vv8y24"})(({theme:n})=>({width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,flexShrink:0,borderRadius:n.radii.default,objectFit:"cover",display:"flex"}));function ChatMessageAvatar(n){const{avatar:i,avatarType:e,name:t,endpoints:o}=n,d=useEmotionTheme(),p=useCrossOriginAttribute(i);if(i)switch(e){case void 0:break;case Block$1.ChatMessage.AvatarType.IMAGE:return jsx$1(StyledAvatarImage,{src:o.buildMediaURL(i),alt:`${t} avatar`,crossOrigin:p});case Block$1.ChatMessage.AvatarType.EMOJI:return jsx$1(StyledAvatarBackground,{children:i});case Block$1.ChatMessage.AvatarType.ICON:if(i==="user")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarUser",background:d.colors.redColor,children:jsx$1(DynamicIcon,{size:"lg",iconValue:":material/face:"})});if(i==="assistant")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarAssistant",background:d.colors.orangeColor,children:jsx$1(DynamicIcon,{size:"lg",iconValue:":material/smart_toy:"})});if(i.startsWith(":material"))return jsx$1(StyledAvatarBackground,{"data-testid":"stChatMessageAvatarCustom",children:jsx$1(DynamicIcon,{size:"lg",iconValue:i,color:d.colors.bodyText})})}return jsx$1(StyledAvatarBackground,{children:t?t.charAt(0).toUpperCase():"🧑💻"})}const ChatMessage=({endpoints:n,element:i,children:e})=>{const{avatar:t,avatarType:o,name:d}=i;return jsxs(StyledChatMessageContainer,{className:"stChatMessage","data-testid":"stChatMessage",background:["user","human"].includes(d.toLowerCase()),children:[jsx$1(ChatMessageAvatar,{name:d,avatar:t,avatarType:o,endpoints:n}),jsx$1(StyledMessageContent,{"data-testid":"stChatMessageContent","aria-label":`Chat message from ${d}`,children:e})]})},ChatMessage$1=reactExports.memo(ChatMessage),IsDialogContext=reactExports.createContext(!1);IsDialogContext.displayName="IsDialogContext";function _objectWithoutPropertiesLoose$p(n,i){if(n==null)return{};var e={};for(var t in n)if({}.hasOwnProperty.call(n,t)){if(i.indexOf(t)!==-1)continue;e[t]=n[t]}return e}var propTypes={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=n,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var n=requireReactPropTypesSecret();function i(){}function e(){}return e.resetWarningCache=i,factoryWithThrowingShims=function(){function t(p,h,y,$,E,M){if(M!==n){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}}t.isRequired=t;function o(){return t}var d={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:o,element:t,elementType:t,instanceOf:o,node:t,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:e,resetWarningCache:i};return d.PropTypes=d,d},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes.exports=requireFactoryWithThrowingShims()()),propTypes.exports}var propTypesExports=requirePropTypes();const PropTypes=getDefaultExportFromCjs(propTypesExports);var FOCUS_GROUP="data-focus-lock",FOCUS_DISABLED="data-focus-lock-disabled",FOCUS_ALLOW="data-no-focus-lock",FOCUS_AUTO="data-autofocus-inside",FOCUS_NO_AUTOFOCUS="data-no-autofocus";function assignRef(n,i){return typeof n=="function"?n(i):n&&(n.current=i),n}function useCallbackRef(n,i){var e=reactExports.useState(function(){return{value:n,callback:i,facade:{get current(){return e.value},set current(t){var o=e.value;o!==t&&(e.value=t,e.callback(t,o))}}}})[0];return e.callback=i,e.facade}var useIsomorphicLayoutEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,currentValues=new WeakMap;function useMergeRefs(n,i){var e=useCallbackRef(null,function(t){return n.forEach(function(o){return assignRef(o,t)})});return useIsomorphicLayoutEffect(function(){var t=currentValues.get(e);if(t){var o=new Set(t),d=new Set(n),p=e.current;o.forEach(function(h){d.has(h)||assignRef(h,null)}),d.forEach(function(h){o.has(h)||assignRef(h,p)})}currentValues.set(e,n)},[n]),e}var hiddenGuard={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function ItoI(n){return n}function innerCreateMedium(n,i){i===void 0&&(i=ItoI);var e=[],t=!1,o={read:function(){if(t)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return e.length?e[e.length-1]:n},useMedium:function(d){var p=i(d,t);return e.push(p),function(){e=e.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(t=!0;e.length;){var p=e;e=[],p.forEach(d)}e={push:function(h){return d(h)},filter:function(){return e}}},assignMedium:function(d){t=!0;var p=[];if(e.length){var h=e;e=[],h.forEach(d),p=e}var y=function(){var E=p;p=[],E.forEach(d)},$=function(){return Promise.resolve().then(y)};$(),e={push:function(E){p.push(E),$()},filter:function(E){return p=p.filter(E),e}}}};return o}function createMedium(n,i){return i===void 0&&(i=ItoI),innerCreateMedium(n,i)}function createSidecarMedium(n){n===void 0&&(n={});var i=innerCreateMedium(null);return i.options=__assign$2({async:!0,ssr:!1},n),i}var mediumFocus=createMedium({},function(n){var i=n.target,e=n.currentTarget;return{target:i,currentTarget:e}}),mediumBlur=createMedium(),mediumEffect=createMedium(),mediumSidecar=createSidecarMedium({async:!0,ssr:typeof document<"u"}),focusScope=reactExports.createContext(void 0),emptyArray=[],FocusLock=reactExports.forwardRef(function n(i,e){var t,o=reactExports.useState(),d=o[0],p=o[1],h=reactExports.useRef(),y=reactExports.useRef(!1),$=reactExports.useRef(null),E=reactExports.useState({}),M=E[1],H=i.children,Z=i.disabled,be=Z===void 0?!1:Z,ye=i.noFocusGuards,we=ye===void 0?!1:ye,xe=i.persistentFocus,Ce=xe===void 0?!1:xe,Ne=i.crossFrame,Fe=Ne===void 0?!0:Ne,Me=i.autoFocus,Le=Me===void 0?!0:Me;i.allowTextSelection;var ze=i.group,Ke=i.className,Ve=i.whiteList,je=i.hasPositiveIndices,We=i.shards,Xe=We===void 0?emptyArray:We,Qe=i.as,Ye=Qe===void 0?"div":Qe,Ue=i.lockProps,ot=Ue===void 0?{}:Ue,dt=i.sideCar,st=i.returnFocus,pt=st===void 0?!1:st,Be=i.focusOptions,qe=i.onActivation,rt=i.onDeactivation,He=reactExports.useState({}),Ot=He[0],Ct=reactExports.useCallback(function(Yt){var zt=Yt.captureFocusRestore;if(!$.current){var nn,Ut=(nn=document)==null?void 0:nn.activeElement;$.current=Ut,Ut!==document.body&&($.current=zt(Ut))}h.current&&qe&&qe(h.current),y.current=!0,M()},[qe]),tt=reactExports.useCallback(function(){y.current=!1,rt&&rt(h.current),M()},[rt]),wt=reactExports.useCallback(function(Yt){var zt=$.current;if(zt){var nn=(typeof zt=="function"?zt():zt)||document.body,Ut=typeof pt=="function"?pt(nn):pt;if(Ut){var Zt=typeof Ut=="object"?Ut:void 0;$.current=null,Yt?Promise.resolve().then(function(){return nn.focus(Zt)}):nn.focus(Zt)}}},[pt]),gt=reactExports.useCallback(function(Yt){y.current&&mediumFocus.useMedium(Yt)},[]),$t=mediumBlur.useMedium,Mt=reactExports.useCallback(function(Yt){h.current!==Yt&&(h.current=Yt,p(Yt))},[]),qt=_extends$A((t={},t[FOCUS_DISABLED]=be&&"disabled",t[FOCUS_GROUP]=ze,t),ot),cn=we!==!0,en=cn&&we!=="tail",Wt=useMergeRefs([e,Mt]),dn=reactExports.useMemo(function(){return{observed:h,shards:Xe,enabled:!be,active:y.current}},[be,y.current,Xe,d]);return reactExports.createElement(reactExports.Fragment,null,cn&&[reactExports.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:be?-1:0,style:hiddenGuard}),je?reactExports.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:be?-1:1,style:hiddenGuard}):null],!be&&reactExports.createElement(dt,{id:Ot,sideCar:mediumSidecar,observed:d,disabled:be,persistentFocus:Ce,crossFrame:Fe,autoFocus:Le,whiteList:Ve,shards:Xe,onActivation:Ct,onDeactivation:tt,returnFocus:wt,focusOptions:Be,noFocusGuards:we}),reactExports.createElement(Ye,_extends$A({ref:Wt},qt,{className:Ke,onBlur:$t,onFocus:gt}),reactExports.createElement(focusScope.Provider,{value:dn},H)),en&&reactExports.createElement("div",{"data-focus-guard":!0,tabIndex:be?-1:0,style:hiddenGuard}))});FocusLock.propTypes={};function _setPrototypeOf$d(n,i){return _setPrototypeOf$d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf$d(n,i)}function _inheritsLoose(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,_setPrototypeOf$d(n,i)}function _typeof$e(n){"@babel/helpers - typeof";return _typeof$e=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$e(n)}function toPrimitive(n,i){if(_typeof$e(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,i);if(_typeof$e(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}function toPropertyKey(n){var i=toPrimitive(n,"string");return _typeof$e(i)=="symbol"?i:i+""}function _defineProperty$s(n,i,e){return(i=toPropertyKey(i))in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function withSideEffect(n,i){function e(t){return t.displayName||t.name||"Component"}return function(o){var d=[],p;function h(){p=n(d.map(function($){return $.props})),i(p)}var y=(function($){_inheritsLoose(E,$);function E(){return $.apply(this,arguments)||this}E.peek=function(){return p};var M=E.prototype;return M.componentDidMount=function(){d.push(this),h()},M.componentDidUpdate=function(){h()},M.componentWillUnmount=function(){var Z=d.indexOf(this);d.splice(Z,1),h()},M.render=function(){return React.createElement(o,this.props)},E})(reactExports.PureComponent);return _defineProperty$s(y,"displayName","SideEffect("+e(o)+")"),y}}var toArray$1=function(n){for(var i=Array(n.length),e=0;e<n.length;++e)i[e]=n[e];return i},asArray=function(n){return Array.isArray(n)?n:[n]},getFirst=function(n){return Array.isArray(n)?n[0]:n},isElementHidden=function(n){if(n.nodeType!==Node.ELEMENT_NODE)return!1;var i=window.getComputedStyle(n,null);return!i||!i.getPropertyValue?!1:i.getPropertyValue("display")==="none"||i.getPropertyValue("visibility")==="hidden"},getParentNode=function(n){return n.parentNode&&n.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode},isTopNode=function(n){return n===document||n&&n.nodeType===Node.DOCUMENT_NODE},isInert=function(n){return n.hasAttribute("inert")},isVisibleUncached=function(n,i){return!n||isTopNode(n)||!isElementHidden(n)&&!isInert(n)&&i(getParentNode(n))},isVisibleCached=function(n,i){var e=n.get(i);if(e!==void 0)return e;var t=isVisibleUncached(i,isVisibleCached.bind(void 0,n));return n.set(i,t),t},isAutoFocusAllowedUncached=function(n,i){return n&&!isTopNode(n)?isAutoFocusAllowed(n)?i(getParentNode(n)):!1:!0},isAutoFocusAllowedCached=function(n,i){var e=n.get(i);if(e!==void 0)return e;var t=isAutoFocusAllowedUncached(i,isAutoFocusAllowedCached.bind(void 0,n));return n.set(i,t),t},getDataset=function(n){return n.dataset},isHTMLButtonElement=function(n){return n.tagName==="BUTTON"},isHTMLInputElement=function(n){return n.tagName==="INPUT"},isRadioElement=function(n){return isHTMLInputElement(n)&&n.type==="radio"},notHiddenInput=function(n){return!((isHTMLInputElement(n)||isHTMLButtonElement(n))&&(n.type==="hidden"||n.disabled))},isAutoFocusAllowed=function(n){var i=n.getAttribute(FOCUS_NO_AUTOFOCUS);return![!0,"true",""].includes(i)},isGuard=function(n){var i;return!!(n&&(!((i=getDataset(n))===null||i===void 0)&&i.focusGuard))},isNotAGuard=function(n){return!isGuard(n)},isDefined=function(n){return!!n},tabSort=function(n,i){var e=Math.max(0,n.tabIndex),t=Math.max(0,i.tabIndex),o=e-t,d=n.index-i.index;if(o){if(!e)return 1;if(!t)return-1}return o||d},getTabIndex=function(n){return n.tabIndex<0&&!n.hasAttribute("tabindex")?0:n.tabIndex},orderByTabIndex=function(n,i,e){return toArray$1(n).map(function(t,o){var d=getTabIndex(t);return{node:t,index:o,tabIndex:e&&d===-1?(t.dataset||{}).focusGuard?0:-1:d}}).filter(function(t){return!i||t.tabIndex>=0}).sort(tabSort)},tabbables=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],queryTabbables=tabbables.join(","),queryGuardTabbables="".concat(queryTabbables,", [data-focus-guard]"),getFocusablesWithShadowDom=function(n,i){return toArray$1((n.shadowRoot||n).children).reduce(function(e,t){return e.concat(t.matches(i?queryGuardTabbables:queryTabbables)?[t]:[],getFocusablesWithShadowDom(t))},[])},getFocusablesWithIFrame=function(n,i){var e;return n instanceof HTMLIFrameElement&&(!((e=n.contentDocument)===null||e===void 0)&&e.body)?getFocusables([n.contentDocument.body],i):[n]},getFocusables=function(n,i){return n.reduce(function(e,t){var o,d=getFocusablesWithShadowDom(t,i),p=(o=[]).concat.apply(o,d.map(function(h){return getFocusablesWithIFrame(h,i)}));return e.concat(p,t.parentNode?toArray$1(t.parentNode.querySelectorAll(queryTabbables)).filter(function(h){return h===t}):[])},[])},getParentAutofocusables=function(n){var i=n.querySelectorAll("[".concat(FOCUS_AUTO,"]"));return toArray$1(i).map(function(e){return getFocusables([e])}).reduce(function(e,t){return e.concat(t)},[])},filterFocusable=function(n,i){return toArray$1(n).filter(function(e){return isVisibleCached(i,e)}).filter(function(e){return notHiddenInput(e)})},filterAutoFocusable=function(n,i){return i===void 0&&(i=new Map),toArray$1(n).filter(function(e){return isAutoFocusAllowedCached(i,e)})},getTabbableNodes=function(n,i,e){return orderByTabIndex(filterFocusable(getFocusables(n,e),i),!0,e)},getFocusableNodes=function(n,i){return orderByTabIndex(filterFocusable(getFocusables(n),i),!1)},parentAutofocusables=function(n,i){return filterFocusable(getParentAutofocusables(n),i)},contains=function(n,i){return n.shadowRoot?contains(n.shadowRoot,i):Object.getPrototypeOf(n).contains!==void 0&&Object.getPrototypeOf(n).contains.call(n,i)?!0:toArray$1(n.children).some(function(e){var t;if(e instanceof HTMLIFrameElement){var o=(t=e.contentDocument)===null||t===void 0?void 0:t.body;return o?contains(o,i):!1}return contains(e,i)})},filterNested=function(n){for(var i=new Set,e=n.length,t=0;t<e;t+=1)for(var o=t+1;o<e;o+=1){var d=n[t].compareDocumentPosition(n[o]);(d&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&i.add(o),(d&Node.DOCUMENT_POSITION_CONTAINS)>0&&i.add(t)}return n.filter(function(p,h){return!i.has(h)})},getTopParent=function(n){return n.parentNode?getTopParent(n.parentNode):n},getAllAffectedNodes=function(n){var i=asArray(n);return i.filter(Boolean).reduce(function(e,t){var o=t.getAttribute(FOCUS_GROUP);return e.push.apply(e,o?filterNested(toArray$1(getTopParent(t).querySelectorAll("[".concat(FOCUS_GROUP,'="').concat(o,'"]:not([').concat(FOCUS_DISABLED,'="disabled"])')))):[t]),e},[])},safeProbe=function(n){try{return n()}catch{return}},getActiveElement=function(n){if(n===void 0&&(n=document),!(!n||!n.activeElement)){var i=n.activeElement;return i.shadowRoot?getActiveElement(i.shadowRoot):i instanceof HTMLIFrameElement&&safeProbe(function(){return i.contentWindow.document})?getActiveElement(i.contentWindow.document):i}},focusInFrame=function(n,i){return n===i},focusInsideIframe=function(n,i){return!!toArray$1(n.querySelectorAll("iframe")).some(function(e){return focusInFrame(e,i)})},focusInside=function(n,i){return i===void 0&&(i=getActiveElement(getFirst(n).ownerDocument)),!i||i.dataset&&i.dataset.focusGuard?!1:getAllAffectedNodes(n).some(function(e){return contains(e,i)||focusInsideIframe(e,i)})},focusIsHidden=function(n){n===void 0&&(n=document);var i=getActiveElement(n);return i?toArray$1(n.querySelectorAll("[".concat(FOCUS_ALLOW,"]"))).some(function(e){return contains(e,i)}):!1},findSelectedRadio=function(n,i){return i.filter(isRadioElement).filter(function(e){return e.name===n.name}).filter(function(e){return e.checked})[0]||n},correctNode=function(n,i){return isRadioElement(n)&&n.name?findSelectedRadio(n,i):n},correctNodes=function(n){var i=new Set;return n.forEach(function(e){return i.add(correctNode(e,n))}),n.filter(function(e){return i.has(e)})},pickFirstFocus=function(n){return n[0]&&n.length>1?correctNode(n[0],n):n[0]},pickFocusable=function(n,i){return n.indexOf(correctNode(i,n))},NEW_FOCUS="NEW_FOCUS",newFocus=function(n,i,e,t,o){var d=n.length,p=n[0],h=n[d-1],y=isGuard(t);if(!(t&&n.indexOf(t)>=0)){var $=t!==void 0?e.indexOf(t):-1,E=o?e.indexOf(o):$,M=o?n.indexOf(o):-1;if($===-1)return M!==-1?M:NEW_FOCUS;if(M===-1)return NEW_FOCUS;var H=$-E,Z=e.indexOf(p),be=e.indexOf(h),ye=correctNodes(e),we=t!==void 0?ye.indexOf(t):-1,xe=we-(o?ye.indexOf(o):$);if(!H&&M>=0||i.length===0)return M;var Ce=pickFocusable(n,i[0]),Ne=pickFocusable(n,i[i.length-1]);if($<=Z&&y&&Math.abs(H)>1)return Ne;if($>=be&&y&&Math.abs(H)>1)return Ce;if(H&&Math.abs(xe)>1)return M;if($<=Z)return Ne;if($>be)return Ce;if(H)return Math.abs(H)>1?M:(d+M+H)%d}},findAutoFocused=function(n){return function(i){var e,t=(e=getDataset(i))===null||e===void 0?void 0:e.autofocus;return i.autofocus||t!==void 0&&t!=="false"||n.indexOf(i)>=0}},pickAutofocus=function(n,i,e){var t=n.map(function(d){var p=d.node;return p}),o=filterAutoFocusable(t.filter(findAutoFocused(e)));return o&&o.length?pickFirstFocus(o):pickFirstFocus(filterAutoFocusable(i))},getParents=function(n,i){return i===void 0&&(i=[]),i.push(n),n.parentNode&&getParents(n.parentNode.host||n.parentNode,i),i},getCommonParent=function(n,i){for(var e=getParents(n),t=getParents(i),o=0;o<e.length;o+=1){var d=e[o];if(t.indexOf(d)>=0)return d}return!1},getTopCommonParent=function(n,i,e){var t=asArray(n),o=asArray(i),d=t[0],p=!1;return o.filter(Boolean).forEach(function(h){p=getCommonParent(p||h,h)||p,e.filter(Boolean).forEach(function(y){var $=getCommonParent(d,y);$&&(!p||contains($,p)?p=$:p=getCommonParent($,p))})}),p},allParentAutofocusables=function(n,i){return n.reduce(function(e,t){return e.concat(parentAutofocusables(t,i))},[])},reorderNodes=function(n,i){var e=new Map;return i.forEach(function(t){return e.set(t.node,t)}),n.map(function(t){return e.get(t)}).filter(isDefined)},focusSolver=function(n,i){var e=getActiveElement(asArray(n).length>0?document:getFirst(n).ownerDocument),t=getAllAffectedNodes(n).filter(isNotAGuard),o=getTopCommonParent(e||n,n,t),d=new Map,p=getFocusableNodes(t,d),h=p.filter(function(be){var ye=be.node;return isNotAGuard(ye)});if(h[0]){var y=getFocusableNodes([o],d).map(function(be){var ye=be.node;return ye}),$=reorderNodes(y,h),E=$.map(function(be){var ye=be.node;return ye}),M=$.filter(function(be){var ye=be.tabIndex;return ye>=0}).map(function(be){var ye=be.node;return ye}),H=newFocus(E,M,y,e,i);if(H===NEW_FOCUS){var Z=pickAutofocus(p,M,allParentAutofocusables(t,d))||pickAutofocus(p,E,allParentAutofocusables(t,d));if(Z)return{node:Z};console.warn("focus-lock: cannot find any node to move focus into");return}return H===void 0?H:$[H]}},expandFocusableNodes=function(n){var i=getAllAffectedNodes(n).filter(isNotAGuard),e=getTopCommonParent(n,n,i),t=orderByTabIndex(getFocusables([e],!0),!0,!0),o=getFocusables(i,!1);return t.map(function(d){var p=d.node,h=d.index;return{node:p,index:h,lockItem:o.indexOf(p)>=0,guard:isGuard(p)}})},focusOn=function(n,i){n&&("focus"in n&&n.focus(i),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus())},guardCount=0,lockDisabled=!1,moveFocusInside=function(n,i,e){e===void 0&&(e={});var t=focusSolver(n,i);if(!lockDisabled&&t){if(guardCount>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),lockDisabled=!0,setTimeout(function(){lockDisabled=!1},1);return}guardCount++,focusOn(t.node,e.focusOptions),guardCount--}};function weakRef(n){if(!n)return null;if(typeof WeakRef>"u")return function(){return n||null};var i=n?new WeakRef(n):null;return function(){return i?.deref()||null}}var recordElementLocation=function(n){if(!n)return null;for(var i=[],e=n;e&&e!==document.body;)i.push({current:weakRef(e),parent:weakRef(e.parentElement),left:weakRef(e.previousElementSibling),right:weakRef(e.nextElementSibling)}),e=e.parentElement;return{element:weakRef(n),stack:i,ownerDocument:n.ownerDocument}},restoreFocusTo=function(n){var i,e,t,o,d;if(n)for(var p=n.stack,h=n.ownerDocument,y=new Map,$=0,E=p;$<E.length;$++){var M=E[$],H=(i=M.parent)===null||i===void 0?void 0:i.call(M);if(H&&h.contains(H)){for(var Z=(e=M.left)===null||e===void 0?void 0:e.call(M),be=M.current(),ye=H.contains(be)?be:void 0,we=(t=M.right)===null||t===void 0?void 0:t.call(M),xe=getTabbableNodes([H],y),Ce=(d=(o=ye??Z?.nextElementSibling)!==null&&o!==void 0?o:we)!==null&&d!==void 0?d:Z;Ce;){for(var Ne=0,Fe=xe;Ne<Fe.length;Ne++){var Me=Fe[Ne];if(Ce?.contains(Me.node))return Me.node}Ce=Ce.nextElementSibling}if(xe.length)return xe[0].node}}},captureFocusRestore=function(n){var i=recordElementLocation(n);return function(){return restoreFocusTo(i)}},getRelativeFocusable=function(n,i,e){if(!n||!i)return console.error("no element or scope given"),{};var t=asArray(i);if(t.every(function(p){return!contains(p,n)}))return console.error("Active element is not contained in the scope"),{};var o=e?getTabbableNodes(t,new Map):getFocusableNodes(t,new Map),d=o.findIndex(function(p){var h=p.node;return h===n});if(d!==-1)return{prev:o[d-1],next:o[d+1],first:o[0],last:o[o.length-1]}},getBoundary=function(n,i){var e=i?getTabbableNodes(asArray(n),new Map):getFocusableNodes(asArray(n),new Map);return{first:e[0],last:e[e.length-1]}},defaultOptions=function(n){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},n)},moveFocus=function(n,i,e){i===void 0&&(i={});var t=defaultOptions(i),o=getRelativeFocusable(n,t.scope,t.onlyTabbable);if(o){var d=e(o,t.cycle);d&&focusOn(d.node,t.focusOptions)}},focusNextElement=function(n,i){i===void 0&&(i={}),moveFocus(n,i,function(e,t){var o=e.next,d=e.first;return o||t&&d})},focusPrevElement=function(n,i){i===void 0&&(i={}),moveFocus(n,i,function(e,t){var o=e.prev,d=e.last;return o||t&&d})},pickBoundary=function(n,i,e){var t,o=getBoundary(n,(t=i.onlyTabbable)!==null&&t!==void 0?t:!0),d=o[e];d&&focusOn(d.node,i.focusOptions)},focusFirstElement=function(n,i){i===void 0&&(i={}),pickBoundary(n,i,"first")},focusLastElement=function(n,i){i===void 0&&(i={}),pickBoundary(n,i,"last")};function deferAction(n){setTimeout(n,1)}var inlineProp=function n(i,e){var t={};return t[i]=e,t},extractRef=function n(i){return i&&"current"in i?i.current:i},focusOnBody=function n(){return document&&document.activeElement===document.body},isFreeFocus=function n(){return focusOnBody()||focusIsHidden()},lastActiveTrap=null,lastActiveFocus=null,tryRestoreFocus=function n(){return null},lastPortaledElement=null,focusWasOutsideWindow=!1,windowFocused=!1,defaultWhitelist=function n(){return!0},focusWhitelisted=function n(i){return(lastActiveTrap.whiteList||defaultWhitelist)(i)},recordPortal=function n(i,e){lastPortaledElement={observerNode:i,portaledElement:e}},focusIsPortaledPair=function n(i){return lastPortaledElement&&lastPortaledElement.portaledElement===i};function autoGuard(n,i,e,t){var o=null,d=n;do{var p=t[d];if(p.guard)p.node.dataset.focusAutoGuard&&(o=p);else if(p.lockItem){if(d!==n)return;o=null}else break}while((d+=e)!==i);o&&(o.node.tabIndex=0)}var focusWasOutside=function n(i){return i?!!focusWasOutsideWindow:focusWasOutsideWindow==="meanwhile"},checkInHost=function n(i,e,t){return e&&(e.host===i&&(!e.activeElement||t.contains(e.activeElement))||e.parentNode&&n(i,e.parentNode,t))},withinHost=function n(i,e){return e.some(function(t){return checkInHost(i,t,t)})},getNodeFocusables=function n(i){return getFocusableNodes(i,new Map)},isNotFocusable=function n(i){return!getNodeFocusables([i.parentNode]).some(function(e){return e.node===i})},activateTrap=function n(){var i=!1;if(lastActiveTrap){var e=lastActiveTrap,t=e.observed,o=e.persistentFocus,d=e.autoFocus,p=e.shards,h=e.crossFrame,y=e.focusOptions,$=e.noFocusGuards,E=t||lastPortaledElement&&lastPortaledElement.portaledElement;if(focusOnBody()&&lastActiveFocus&&(!document.body.contains(lastActiveFocus)||isNotFocusable(lastActiveFocus))){lastActiveFocus=null;var M=tryRestoreFocus();M&&M.focus()}var H=document&&document.activeElement;if(E){var Z=[E].concat(p.map(extractRef).filter(Boolean)),be=function(){if(!focusWasOutside(h)||!$||!lastActiveFocus||windowFocused)return!1;var Ne=getNodeFocusables(Z),Fe=Ne.findIndex(function(Me){var Le=Me.node;return Le===lastActiveFocus});return Fe===0||Fe===Ne.length-1};if((!H||focusWhitelisted(H))&&(o||be()||!isFreeFocus()||!lastActiveFocus&&d)&&(E&&!(focusInside(Z)||H&&withinHost(H,Z)||focusIsPortaledPair(H))&&(document&&!lastActiveFocus&&H&&!d?(H.blur&&H.blur(),document.body.focus()):(i=moveFocusInside(Z,lastActiveFocus,{focusOptions:y}),lastPortaledElement={})),focusWasOutsideWindow=!1,lastActiveFocus=document&&document.activeElement,tryRestoreFocus=captureFocusRestore(lastActiveFocus)),document&&H!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var ye=document&&document.activeElement,we=expandFocusableNodes(Z),xe=we.map(function(Ce){var Ne=Ce.node;return Ne}).indexOf(ye);xe>-1&&(we.filter(function(Ce){var Ne=Ce.guard,Fe=Ce.node;return Ne&&Fe.dataset.focusAutoGuard}).forEach(function(Ce){var Ne=Ce.node;return Ne.removeAttribute("tabIndex")}),autoGuard(xe,we.length,1,we),autoGuard(xe,-1,-1,we))}}}return i},onTrap=function n(i){activateTrap()&&i&&(i.stopPropagation(),i.preventDefault())},onBlur=function n(){return deferAction(activateTrap)},onFocus=function n(i){var e=i.target,t=i.currentTarget;t.contains(e)||recordPortal(t,e)},FocusWatcher=function n(){return null},onWindowFocus=function n(){windowFocused=!0},onWindowBlur=function n(){windowFocused=!1,focusWasOutsideWindow="just",deferAction(function(){focusWasOutsideWindow="meanwhile"})},attachHandler=function n(){document.addEventListener("focusin",onTrap),document.addEventListener("focusout",onBlur),window.addEventListener("focus",onWindowFocus),window.addEventListener("blur",onWindowBlur)},detachHandler=function n(){document.removeEventListener("focusin",onTrap),document.removeEventListener("focusout",onBlur),window.removeEventListener("focus",onWindowFocus),window.removeEventListener("blur",onWindowBlur)};function reducePropsToState(n){return n.filter(function(i){var e=i.disabled;return!e})}var focusLockAPI={moveFocusInside,focusInside,focusNextElement,focusPrevElement,focusFirstElement,focusLastElement,captureFocusRestore};function handleStateChangeOnClient(n){var i=n.slice(-1)[0];i&&!lastActiveTrap&&attachHandler();var e=lastActiveTrap,t=e&&i&&i.id===e.id;lastActiveTrap=i,e&&!t&&(e.onDeactivation(),n.filter(function(o){var d=o.id;return d===e.id}).length||e.returnFocus(!i)),i?(lastActiveFocus=null,(!t||e.observed!==i.observed)&&i.onActivation(focusLockAPI),activateTrap(),deferAction(activateTrap)):(detachHandler(),lastActiveFocus=null)}mediumFocus.assignSyncMedium(onFocus);mediumBlur.assignMedium(onBlur);mediumEffect.assignMedium(function(n){return n(focusLockAPI)});const FocusTrap=withSideEffect(reducePropsToState,handleStateChangeOnClient)(FocusWatcher);var FocusLockCombination=reactExports.forwardRef(function n(i,e){return reactExports.createElement(FocusLock,_extends$A({sideCar:FocusTrap,ref:e},i))}),_ref=FocusLock.propTypes||{};_ref.sideCar;_objectWithoutPropertiesLoose$p(_ref,["sideCar"]);FocusLockCombination.propTypes={};var useFocusInside=function n(i){reactExports.useEffect(function(){var e=!0;return mediumEffect.useMedium(function(t){var o=i&&i.current;e&&o&&(t.focusInside(o)||t.moveFocusInside(o,null))}),function(){e=!1}},[i])};function MoveFocusInside(n){var i=n.disabled,e=i===void 0?!1:i,t=n.className,o=n.children,d=reactExports.useRef(null);return useFocusInside(e?void 0:d),reactExports.createElement("div",_extends$A({},inlineProp(FOCUS_AUTO,!e),{ref:d,className:t}),o)}MoveFocusInside.propTypes={};var SIZE$2={default:"default",full:"full",auto:"auto"},SIZE_WIDTHS={default:"500px",full:"100%",auto:"auto"},ROLE={dialog:"dialog"},CLOSE_SOURCE={closeButton:"closeButton",backdrop:"backdrop",escape:"escape"};function ownKeys$o(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$n(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$o(Object(e),!0).forEach(function(t){_defineProperty$r(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$o(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$r(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function getSizeStyles(n){var i={maxWidth:"100%",width:null};return typeof n=="number"?i.width="".concat(n,"px"):SIZE$2[n]?i.width=SIZE_WIDTHS[n]:typeof n=="string"&&(i.width=n),n===SIZE$2.full&&(i.alignSelf="stretch"),i}var Root$3=styled$1("div",function(n){var i=n.$isOpen;return{position:"fixed",overflow:"auto",right:0,bottom:0,top:0,left:0,pointerEvents:i?"auto":"none"}});Root$3.displayName="Root";Root$3.displayName="Root";var DialogContainer=styled$1("div",function(n){var i=n.$animate,e=n.$isOpen,t=n.$isVisible,o=n.$theme,d={transitionProperty:"opacity",transitionDuration:o.animation.timing400,transitionTimingFunction:o.animation.easeOutCurve};return _objectSpread$n({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"100%",userSelect:"none",pointerEvents:"auto",backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",opacity:t&&e?1:0},i?d:null)});DialogContainer.displayName="DialogContainer";DialogContainer.displayName="DialogContainer";var Dialog$2=styled$1("div",function(n){var i=n.$animate,e=n.$isOpen,t=n.$isVisible,o=n.$size,d=n.$theme;return _objectSpread$n(_objectSpread$n(_objectSpread$n({position:"relative",backgroundColor:d.colors.backgroundPrimary,borderTopLeftRadius:d.borders.radius500,borderTopRightRadius:d.borders.radius500,borderBottomRightRadius:d.borders.radius500,borderBottomLeftRadius:d.borders.radius500,marginLeft:d.sizing.scale600,marginTop:d.sizing.scale600,marginRight:d.sizing.scale600,marginBottom:d.sizing.scale600},getSizeStyles(o)),{},{opacity:t&&e?1:0,transform:t?"translateY(0)":"translateY(20px)"},i?{transitionProperty:"opacity, transform",transitionDuration:d.animation.timing400,transitionTimingFunction:d.animation.easeOutCurve}:null),{},{userSelect:"text",pointerEvents:e?"all":"none",":focus":{outline:"none"}})});Dialog$2.displayName="Dialog";Dialog$2.displayName="Dialog";var Close=styled$1("button",function(n){var i,e=n.$theme,t=n.$isFocusVisible,o=e.direction==="rtl"?"left":"right";return i={background:"transparent",outline:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,color:e.colors.modalCloseColor,transitionProperty:"color, border-color",transitionDuration:e.animation.timing200,borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",":hover":{color:e.colors.modalCloseColorHover},":focus":{outline:t?"3px solid ".concat(e.colors.accent):"none"},position:"absolute",top:e.sizing.scale500},_defineProperty$r(i,o,e.sizing.scale500),_defineProperty$r(i,"width",e.sizing.scale800),_defineProperty$r(i,"height",e.sizing.scale800),_defineProperty$r(i,"display","flex"),_defineProperty$r(i,"justifyContent","center"),_defineProperty$r(i,"alignItems","center"),_defineProperty$r(i,"cursor","pointer"),i});Close.displayName="Close";Close.displayName="Close";var ModalHeader$1=styled$1("div",function(n){var i,e=n.$theme,t=e.direction==="rtl"?"marginRight":"marginLeft",o=e.direction==="rtl"?"marginLeft":"marginRight";return _objectSpread$n(_objectSpread$n({},e.typography.font550),{},(i={color:e.colors.contentPrimary,marginTop:e.sizing.scale900,marginBottom:e.sizing.scale600},_defineProperty$r(i,t,e.sizing.scale800),_defineProperty$r(i,o,e.sizing.scale900),i))});ModalHeader$1.displayName="ModalHeader";ModalHeader$1.displayName="ModalHeader";var ModalBody$2=styled$1("div",function(n){var i=n.$theme;return _objectSpread$n(_objectSpread$n({},i.typography.font200),{},{color:i.colors.contentSecondary,marginTop:i.sizing.scale600,marginLeft:i.sizing.scale800,marginRight:i.sizing.scale800,marginBottom:i.sizing.scale700})});ModalBody$2.displayName="ModalBody";ModalBody$2.displayName="ModalBody";var ModalFooter$1=styled$1("div",function(n){var i=n.$theme;return _objectSpread$n(_objectSpread$n({},i.typography.font200),{},{marginTop:i.sizing.scale700,marginLeft:i.sizing.scale800,marginRight:i.sizing.scale800,paddingTop:i.sizing.scale500,paddingBottom:i.sizing.scale500,textAlign:i.direction==="rtl"?"left":"right"})});ModalFooter$1.displayName="ModalFooter";ModalFooter$1.displayName="ModalFooter";function CloseIcon(){return reactExports.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{stroke:"currentColor"},xmlns:"http://www.w3.org/2000/svg"},reactExports.createElement("path",{d:"M9 1L5 5M1 9L5 5M5 5L1 1M5 5L9 9",strokeWidth:"2",strokeLinecap:"round"}))}function _typeof$d(n){"@babel/helpers - typeof";return _typeof$d=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$d(n)}function _extends$t(){return _extends$t=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$t.apply(this,arguments)}function _slicedToArray$k(n,i){return _arrayWithHoles$k(n)||_iterableToArrayLimit$k(n,i)||_unsupportedIterableToArray$k(n,i)||_nonIterableRest$k()}function _nonIterableRest$k(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
50
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$l(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$l(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$l(n,i)}}function _iterableToArray$3(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function _arrayWithoutHoles$3(n){if(Array.isArray(n))return _arrayLikeToArray$l(n)}function _arrayLikeToArray$l(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 _classCallCheck$g(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(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$g(n,i,e){return i&&_defineProperties$g(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$g(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$g(n,i)}function _setPrototypeOf$g(n,i){return _setPrototypeOf$g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$g(n,i)}function _createSuper$g(n){var i=_isNativeReflectConstruct$g();return function(){var t=_getPrototypeOf$g(n),o;if(i){var d=_getPrototypeOf$g(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$g(this,o)}}function _possibleConstructorReturn$g(n,i){if(i&&(_typeof$h(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$g(n)}function _assertThisInitialized$g(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$g(){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$g(n){return _getPrototypeOf$g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$g(n)}function _defineProperty$v(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var StyledAppContainer=styled$1("div",{});StyledAppContainer.displayName="StyledAppContainer";var StyledLayersContainer=styled$1("div",{});StyledLayersContainer.displayName="StyledLayersContainer";function defaultEventHandlerFn(){}var LayersContext=reactExports.createContext({addEscapeHandler:defaultEventHandlerFn,removeEscapeHandler:defaultEventHandlerFn,addKeyDownHandler:defaultEventHandlerFn,removeKeyDownHandler:defaultEventHandlerFn,addKeyUpHandler:defaultEventHandlerFn,removeKeyUpHandler:defaultEventHandlerFn,addKeyPressHandler:defaultEventHandlerFn,removeKeyPressHandler:defaultEventHandlerFn,addDocClickHandler:defaultEventHandlerFn,removeDocClickHandler:defaultEventHandlerFn,host:void 0,zIndex:void 0}),Provider=LayersContext.Provider,Consumer=LayersContext.Consumer,LayersManager=(function(n){_inherits$g(e,n);var i=_createSuper$g(e);function e(t){var o;return _classCallCheck$g(this,e),o=i.call(this,t),_defineProperty$v(_assertThisInitialized$g(o),"host",reactExports.createRef()),_defineProperty$v(_assertThisInitialized$g(o),"containerRef",reactExports.createRef()),_defineProperty$v(_assertThisInitialized$g(o),"onDocumentClick",function(d){var p=o.state.docClickHandlers[o.state.docClickHandlers.length-1];p&&p(d)}),_defineProperty$v(_assertThisInitialized$g(o),"onKeyDown",function(d){var p=o.state.keyDownHandlers[o.state.keyDownHandlers.length-1];p&&p(d)}),_defineProperty$v(_assertThisInitialized$g(o),"onKeyUp",function(d){if(d.key==="Escape"){var p=o.state.escapeKeyHandlers[o.state.escapeKeyHandlers.length-1];p&&p()}var h=o.state.keyUpHandlers[o.state.keyUpHandlers.length-1];h&&h(d)}),_defineProperty$v(_assertThisInitialized$g(o),"onKeyPress",function(d){var p=o.state.keyPressHandlers[o.state.keyPressHandlers.length-1];p&&p(d)}),_defineProperty$v(_assertThisInitialized$g(o),"onAddEscapeHandler",function(d){o.setState(function(p){return{escapeKeyHandlers:[].concat(_toConsumableArray$3(p.escapeKeyHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveEscapeHandler",function(d){o.setState(function(p){return{escapeKeyHandlers:p.escapeKeyHandlers.filter(function(h){return h!==d})}})}),_defineProperty$v(_assertThisInitialized$g(o),"onAddKeyDownHandler",function(d){o.setState(function(p){return{keyDownHandlers:[].concat(_toConsumableArray$3(p.keyDownHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveKeyDownHandler",function(d){o.setState(function(p){return{keyDownHandlers:p.keyDownHandlers.filter(function(h){return h!==d})}})}),_defineProperty$v(_assertThisInitialized$g(o),"onAddKeyUpHandler",function(d){o.setState(function(p){return{keyUpHandlers:[].concat(_toConsumableArray$3(p.keyUpHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveKeyUpHandler",function(d){o.setState(function(p){return{keyUpHandlers:p.keyUpHandlers.filter(function(h){return h!==d})}})}),_defineProperty$v(_assertThisInitialized$g(o),"onAddKeyPressHandler",function(d){o.setState(function(p){return{keyPressHandlers:[].concat(_toConsumableArray$3(p.keyPressHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveKeyPressHandler",function(d){o.setState(function(p){return{keyPressHandlers:p.keyPressHandlers.filter(function(h){return h!==d})}})}),_defineProperty$v(_assertThisInitialized$g(o),"onAddDocClickHandler",function(d){o.setState(function(p){return{docClickHandlers:[].concat(_toConsumableArray$3(p.docClickHandlers),[d])}})}),_defineProperty$v(_assertThisInitialized$g(o),"onRemoveDocClickHandler",function(d){o.setState(function(p){return{docClickHandlers:p.docClickHandlers.filter(function(h){return h!==d})}})}),o.state={escapeKeyHandlers:[],keyDownHandlers:[],keyUpHandlers:[],keyPressHandlers:[],docClickHandlers:[]},o}return _createClass$g(e,[{key:"componentDidMount",value:function(){this.forceUpdate(),initFocusVisible(this.containerRef.current),typeof document<"u"&&(document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("keypress",this.onKeyPress),document.addEventListener("mousedown",this.onDocumentClick))}},{key:"componentWillUnmount",value:function(){typeof document<"u"&&(document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("keypress",this.onKeyPress),document.removeEventListener("mousedown",this.onDocumentClick))}},{key:"render",value:function(){var o=this,d=this.props.overrides,p=d===void 0?{}:d,h=getOverrides(p.AppContainer,StyledAppContainer),y=_slicedToArray$l(h,2),$=y[0],E=y[1],M=getOverrides(p.LayersContainer,StyledLayersContainer),H=_slicedToArray$l(M,2),Z=H[0],be=H[1];return reactExports.createElement(Consumer,null,function(ye){var we=ye.host;return reactExports.createElement(Provider,{value:{host:we||o.host.current,zIndex:o.props.zIndex,addEscapeHandler:o.onAddEscapeHandler,removeEscapeHandler:o.onRemoveEscapeHandler,addKeyDownHandler:o.onAddKeyDownHandler,removeKeyDownHandler:o.onRemoveKeyDownHandler,addKeyUpHandler:o.onAddKeyUpHandler,removeKeyUpHandler:o.onRemoveKeyUpHandler,addKeyPressHandler:o.onAddKeyPressHandler,removeKeyPressHandler:o.onRemoveKeyPressHandler,addDocClickHandler:o.onAddDocClickHandler,removeDocClickHandler:o.onRemoveDocClickHandler}},reactExports.createElement($,_extends$w({},E,{ref:o.containerRef}),o.props.children),reactExports.createElement(Z,_extends$w({},be,{ref:o.host})))})}}]),e})(reactExports.Component),reactDomExports=requireReactDom();const ReactDOM=getDefaultExportFromCjs(reactDomExports);function _typeof$g(n){"@babel/helpers - typeof";return _typeof$g=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$g(n)}function _extends$v(){return _extends$v=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$v.apply(this,arguments)}function _classCallCheck$f(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(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$f(n,i,e){return i&&_defineProperties$f(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$f(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$f(n,i)}function _setPrototypeOf$f(n,i){return _setPrototypeOf$f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$f(n,i)}function _createSuper$f(n){var i=_isNativeReflectConstruct$f();return function(){var t=_getPrototypeOf$f(n),o;if(i){var d=_getPrototypeOf$f(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$f(this,o)}}function _possibleConstructorReturn$f(n,i){if(i&&(_typeof$g(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$f(n)}function _assertThisInitialized$f(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$f(){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$f(n){return _getPrototypeOf$f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$f(n)}function _defineProperty$u(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Container=styled$1("div",function(n){var i=n.$zIndex;return{position:"absolute",top:0,left:0,right:0,zIndex:i||null}});Container.displayName="Container";var LayerComponent=(function(n){_inherits$f(e,n);var i=_createSuper$f(e);function e(){var t;_classCallCheck$f(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$u(_assertThisInitialized$f(t),"state",{container:null}),_defineProperty$u(_assertThisInitialized$f(t),"onEscape",function(){t.props.onEscape&&t.props.onEscape()}),_defineProperty$u(_assertThisInitialized$f(t),"onKeyDown",function(h){t.props.onKeyDown&&t.props.onKeyDown(h)}),_defineProperty$u(_assertThisInitialized$f(t),"onKeyUp",function(h){t.props.onKeyUp&&t.props.onKeyUp(h)}),_defineProperty$u(_assertThisInitialized$f(t),"onKeyPress",function(h){t.props.onKeyPress&&t.props.onKeyPress(h)}),_defineProperty$u(_assertThisInitialized$f(t),"onDocumentClick",function(h){t.props.onDocumentClick&&t.props.onDocumentClick(h)}),t}return _createClass$f(e,[{key:"componentDidMount",value:function(){this.context.addEscapeHandler(this.onEscape),this.context.addKeyDownHandler(this.onKeyDown),this.context.addKeyUpHandler(this.onKeyUp),this.context.addKeyPressHandler(this.onKeyPress),this.props.isHoverLayer||this.context.addDocClickHandler(this.onDocumentClick);var o=this.props,d=o.onMount,p=o.mountNode,h=o.host;if(p){d&&d();return}var y=h!==void 0,$=y?h:document.body;$&&this.addContainer($)}},{key:"componentDidUpdate",value:function(o){var d=this.props,p=d.host,h=d.mountNode;h||(p&&p!==o.host&&o.host===null&&this.addContainer(p),o.isHoverLayer!=this.props.isHoverLayer&&(this.props.isHoverLayer?this.context.removeDocClickHandler(this.onDocumentClick):this.context.addDocClickHandler(this.onDocumentClick)))}},{key:"componentWillUnmount",value:function(){this.context.removeEscapeHandler(this.onEscape),this.context.removeKeyDownHandler(this.onKeyDown),this.context.removeKeyUpHandler(this.onKeyUp),this.context.removeKeyPressHandler(this.onKeyPress),this.context.removeDocClickHandler(this.onDocumentClick),this.props.onUnmount&&this.props.onUnmount();var o=this.props.host,d=this.state.container;o&&d&&o.contains(d)&&o.removeChild(d)}},{key:"addContainer",value:function(o){var d=this.props,p=d.index,h=d.mountNode,y=d.onMount;if(!h&&o){var $=o.ownerDocument.createElement("div"),E=typeof p=="number"?o.children[p]:null;E?o.insertBefore($,E):o.appendChild($),this.setState({container:$},function(){y&&y()})}}},{key:"render",value:function(){var o=this.state.container,d=this.props,p=d.children,h=d.mountNode,y=d.zIndex,$=y?reactExports.createElement(Container,{$zIndex:y},p):p;return typeof document<"u"?h?ReactDOM.createPortal($,h):o?ReactDOM.createPortal($,o):null:null}}]),e})(reactExports.Component);_defineProperty$u(LayerComponent,"contextType",LayersContext);function Layer(n){return reactExports.createElement(Consumer,null,function(i){var e=i.host,t=i.zIndex;return reactExports.createElement(LayerComponent,_extends$v({},n,{host:e,zIndex:t}))})}var isBrowser$1=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=(function(){for(var n=["Edge","Trident","Firefox"],i=0;i<n.length;i+=1)if(isBrowser$1&&navigator.userAgent.indexOf(n[i])>=0)return 1;return 0})();function microtaskDebounce(n){var i=!1;return function(){i||(i=!0,window.Promise.resolve().then(function(){i=!1,n()}))}}function taskDebounce(n){var i=!1;return function(){i||(i=!0,setTimeout(function(){i=!1,n()},timeoutDuration))}}var supportsMicroTasks=isBrowser$1&&window.Promise,debounce$1=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction(n){var i={};return n&&i.toString.call(n)==="[object Function]"}function getStyleComputedProperty(n,i){if(n.nodeType!==1)return[];var e=n.ownerDocument.defaultView,t=e.getComputedStyle(n,null);return i?t[i]:t}function getParentNode$1(n){return n.nodeName==="HTML"?n:n.parentNode||n.host}function getScrollParent(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var i=getStyleComputedProperty(n),e=i.overflow,t=i.overflowX,o=i.overflowY;return/(auto|scroll|overlay)/.test(e+o+t)?n:getScrollParent(getParentNode$1(n))}function getReferenceNode(n){return n&&n.referenceNode?n.referenceNode:n}var isIE11=isBrowser$1&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser$1&&/MSIE 10/.test(navigator.userAgent);function isIE(n){return n===11?isIE11:n===10?isIE10:isIE11||isIE10}function getOffsetParent(n){if(!n)return document.documentElement;for(var i=isIE(10)?document.body:null,e=n.offsetParent||null;e===i&&n.nextElementSibling;)e=(n=n.nextElementSibling).offsetParent;var t=e&&e.nodeName;return!t||t==="BODY"||t==="HTML"?n?n.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(e.nodeName)!==-1&&getStyleComputedProperty(e,"position")==="static"?getOffsetParent(e):e}function isOffsetContainer(n){var i=n.nodeName;return i==="BODY"?!1:i==="HTML"||getOffsetParent(n.firstElementChild)===n}function getRoot(n){return n.parentNode!==null?getRoot(n.parentNode):n}function findCommonOffsetParent(n,i){if(!n||!n.nodeType||!i||!i.nodeType)return document.documentElement;var e=n.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING,t=e?n:i,o=e?i:n,d=document.createRange();d.setStart(t,0),d.setEnd(o,0);var p=d.commonAncestorContainer;if(n!==p&&i!==p||t.contains(o))return isOffsetContainer(p)?p:getOffsetParent(p);var h=getRoot(n);return h.host?findCommonOffsetParent(h.host,i):findCommonOffsetParent(n,getRoot(i).host)}function getScroll(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",e=i==="top"?"scrollTop":"scrollLeft",t=n.nodeName;if(t==="BODY"||t==="HTML"){var o=n.ownerDocument.documentElement,d=n.ownerDocument.scrollingElement||o;return d[e]}return n[e]}function includeScroll(n,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=getScroll(i,"top"),o=getScroll(i,"left"),d=e?-1:1;return n.top+=t*d,n.bottom+=t*d,n.left+=o*d,n.right+=o*d,n}function getBordersSize$1(n,i){var e=i==="x"?"Left":"Top",t=e==="Left"?"Right":"Bottom";return parseFloat(n["border"+e+"Width"])+parseFloat(n["border"+t+"Width"])}function getSize(n,i,e,t){return Math.max(i["offset"+n],i["scroll"+n],e["client"+n],e["offset"+n],e["scroll"+n],isIE(10)?parseInt(e["offset"+n])+parseInt(t["margin"+(n==="Height"?"Top":"Left")])+parseInt(t["margin"+(n==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(n){var i=n.body,e=n.documentElement,t=isIE(10)&&getComputedStyle(e);return{height:getSize("Height",i,e,t),width:getSize("Width",i,e,t)}}var classCallCheck=function(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")},createClass=(function(){function n(i,e){for(var t=0;t<e.length;t++){var o=e[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,o.key,o)}}return function(i,e,t){return e&&n(i.prototype,e),t&&n(i,t),i}})(),defineProperty=function(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n},_extends$u=Object.assign||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};function getClientRect(n){return _extends$u({},n,{right:n.left+n.width,bottom:n.top+n.height})}function getBoundingClientRect(n){var i={};try{if(isIE(10)){i=n.getBoundingClientRect();var e=getScroll(n,"top"),t=getScroll(n,"left");i.top+=e,i.left+=t,i.bottom+=e,i.right+=t}else i=n.getBoundingClientRect()}catch{}var o={left:i.left,top:i.top,width:i.right-i.left,height:i.bottom-i.top},d=n.nodeName==="HTML"?getWindowSizes(n.ownerDocument):{},p=d.width||n.clientWidth||o.width,h=d.height||n.clientHeight||o.height,y=n.offsetWidth-p,$=n.offsetHeight-h;if(y||$){var E=getStyleComputedProperty(n);y-=getBordersSize$1(E,"x"),$-=getBordersSize$1(E,"y"),o.width-=y,o.height-=$}return getClientRect(o)}function getOffsetRectRelativeToArbitraryNode(n,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=isIE(10),o=i.nodeName==="HTML",d=getBoundingClientRect(n),p=getBoundingClientRect(i),h=getScrollParent(n),y=getStyleComputedProperty(i),$=parseFloat(y.borderTopWidth),E=parseFloat(y.borderLeftWidth);e&&o&&(p.top=Math.max(p.top,0),p.left=Math.max(p.left,0));var M=getClientRect({top:d.top-p.top-$,left:d.left-p.left-E,width:d.width,height:d.height});if(M.marginTop=0,M.marginLeft=0,!t&&o){var H=parseFloat(y.marginTop),Z=parseFloat(y.marginLeft);M.top-=$-H,M.bottom-=$-H,M.left-=E-Z,M.right-=E-Z,M.marginTop=H,M.marginLeft=Z}return(t&&!e?i.contains(h):i===h&&h.nodeName!=="BODY")&&(M=includeScroll(M,i)),M}function getViewportOffsetRectRelativeToArtbitraryNode(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=n.ownerDocument.documentElement,t=getOffsetRectRelativeToArbitraryNode(n,e),o=Math.max(e.clientWidth,window.innerWidth||0),d=Math.max(e.clientHeight,window.innerHeight||0),p=i?0:getScroll(e),h=i?0:getScroll(e,"left"),y={top:p-t.top+t.marginTop,left:h-t.left+t.marginLeft,width:o,height:d};return getClientRect(y)}function isFixed$1(n){var i=n.nodeName;if(i==="BODY"||i==="HTML")return!1;if(getStyleComputedProperty(n,"position")==="fixed")return!0;var e=getParentNode$1(n);return e?isFixed$1(e):!1}function getFixedPositionOffsetParent(n){if(!n||!n.parentElement||isIE())return document.documentElement;for(var i=n.parentElement;i&&getStyleComputedProperty(i,"transform")==="none";)i=i.parentElement;return i||document.documentElement}function getBoundaries(n,i,e,t){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,d={top:0,left:0},p=o?getFixedPositionOffsetParent(n):findCommonOffsetParent(n,getReferenceNode(i));if(t==="viewport")d=getViewportOffsetRectRelativeToArtbitraryNode(p,o);else{var h=void 0;t==="scrollParent"?(h=getScrollParent(getParentNode$1(i)),h.nodeName==="BODY"&&(h=n.ownerDocument.documentElement)):t==="window"?h=n.ownerDocument.documentElement:h=t;var y=getOffsetRectRelativeToArbitraryNode(h,p,o);if(h.nodeName==="HTML"&&!isFixed$1(p)){var $=getWindowSizes(n.ownerDocument),E=$.height,M=$.width;d.top+=y.top-y.marginTop,d.bottom=E+y.top,d.left+=y.left-y.marginLeft,d.right=M+y.left}else d=y}e=e||0;var H=typeof e=="number";return d.left+=H?e:e.left||0,d.top+=H?e:e.top||0,d.right-=H?e:e.right||0,d.bottom-=H?e:e.bottom||0,d}function getArea(n){var i=n.width,e=n.height;return i*e}function computeAutoPlacement(n,i,e,t,o){var d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(n.indexOf("auto")===-1)return n;var p=getBoundaries(e,t,d,o),h={top:{width:p.width,height:i.top-p.top},right:{width:p.right-i.right,height:p.height},bottom:{width:p.width,height:p.bottom-i.bottom},left:{width:i.left-p.left,height:p.height}},y=Object.keys(h).map(function(H){return _extends$u({key:H},h[H],{area:getArea(h[H])})}).sort(function(H,Z){return Z.area-H.area}),$=y.filter(function(H){var Z=H.width,be=H.height;return Z>=e.clientWidth&&be>=e.clientHeight}),E=$.length>0?$[0].key:y[0].key,M=n.split("-")[1];return E+(M?"-"+M:"")}function getReferenceOffsets(n,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=t?getFixedPositionOffsetParent(i):findCommonOffsetParent(i,getReferenceNode(e));return getOffsetRectRelativeToArbitraryNode(e,o,t)}function getOuterSizes(n){var i=n.ownerDocument.defaultView,e=i.getComputedStyle(n),t=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),o=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0),d={width:n.offsetWidth+o,height:n.offsetHeight+t};return d}function getOppositePlacement(n){var i={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(e){return i[e]})}function getPopperOffsets(n,i,e){e=e.split("-")[0];var t=getOuterSizes(n),o={width:t.width,height:t.height},d=["right","left"].indexOf(e)!==-1,p=d?"top":"left",h=d?"left":"top",y=d?"height":"width",$=d?"width":"height";return o[p]=i[p]+i[y]/2-t[y]/2,e===h?o[h]=i[h]-t[$]:o[h]=i[getOppositePlacement(h)],o}function find$1(n,i){return Array.prototype.find?n.find(i):n.filter(i)[0]}function findIndex(n,i,e){if(Array.prototype.findIndex)return n.findIndex(function(o){return o[i]===e});var t=find$1(n,function(o){return o[i]===e});return n.indexOf(t)}function runModifiers(n,i,e){var t=e===void 0?n:n.slice(0,findIndex(n,"name",e));return t.forEach(function(o){o.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var d=o.function||o.fn;o.enabled&&isFunction(d)&&(i.offsets.popper=getClientRect(i.offsets.popper),i.offsets.reference=getClientRect(i.offsets.reference),i=d(i,o))}),i}function update(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),n.placement=computeAutoPlacement(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),n.originalPlacement=n.placement,n.positionFixed=this.options.positionFixed,n.offsets.popper=getPopperOffsets(this.popper,n.offsets.reference,n.placement),n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",n=runModifiers(this.modifiers,n),this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function isModifierEnabled(n,i){return n.some(function(e){var t=e.name,o=e.enabled;return o&&t===i})}function getSupportedPropertyName(n){for(var i=[!1,"ms","Webkit","Moz","O"],e=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<i.length;t++){var o=i[t],d=o?""+o+e:n;if(typeof document.body.style[d]<"u")return d}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow(n){var i=n.ownerDocument;return i?i.defaultView:window}function attachToScrollParents(n,i,e,t){var o=n.nodeName==="BODY",d=o?n.ownerDocument.defaultView:n;d.addEventListener(i,e,{passive:!0}),o||attachToScrollParents(getScrollParent(d.parentNode),i,e,t),t.push(d)}function setupEventListeners(n,i,e,t){e.updateBound=t,getWindow(n).addEventListener("resize",e.updateBound,{passive:!0});var o=getScrollParent(n);return attachToScrollParents(o,"scroll",e.updateBound,e.scrollParents),e.scrollElement=o,e.eventsEnabled=!0,e}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(n,i){return getWindow(n).removeEventListener("resize",i.updateBound),i.scrollParents.forEach(function(e){e.removeEventListener("scroll",i.updateBound)}),i.updateBound=null,i.scrollParents=[],i.scrollElement=null,i.eventsEnabled=!1,i}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(n){return n!==""&&!isNaN(parseFloat(n))&&isFinite(n)}function setStyles(n,i){Object.keys(i).forEach(function(e){var t="";["width","height","top","right","bottom","left"].indexOf(e)!==-1&&isNumeric(i[e])&&(t="px"),n.style[e]=i[e]+t})}function setAttributes(n,i){Object.keys(i).forEach(function(e){var t=i[e];t!==!1?n.setAttribute(e,i[e]):n.removeAttribute(e)})}function applyStyle(n){return setStyles(n.instance.popper,n.styles),setAttributes(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&setStyles(n.arrowElement,n.arrowStyles),n}function applyStyleOnLoad(n,i,e,t,o){var d=getReferenceOffsets(o,i,n,e.positionFixed),p=computeAutoPlacement(e.placement,d,i,n,e.modifiers.flip.boundariesElement,e.modifiers.flip.padding);return i.setAttribute("x-placement",p),setStyles(i,{position:e.positionFixed?"fixed":"absolute"}),e}function getRoundedOffsets(n,i){var e=n.offsets,t=e.popper,o=e.reference,d=Math.round,p=Math.floor,h=function(xe){return xe},y=d(o.width),$=d(t.width),E=["left","right"].indexOf(n.placement)!==-1,M=n.placement.indexOf("-")!==-1,H=y%2===$%2,Z=y%2===1&&$%2===1,be=i?E||M||H?d:p:h,ye=i?d:h;return{left:be(Z&&!M&&i?t.left-1:t.left),top:ye(t.top),bottom:ye(t.bottom),right:be(t.right)}}var isFirefox=isBrowser$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(n,i){var e=i.x,t=i.y,o=n.offsets.popper,d=find$1(n.instance.modifiers,function(Ne){return Ne.name==="applyStyle"}).gpuAcceleration;d!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var p=d!==void 0?d:i.gpuAcceleration,h=getOffsetParent(n.instance.popper),y=getBoundingClientRect(h),$={position:o.position},E=getRoundedOffsets(n,window.devicePixelRatio<2||!isFirefox),M=e==="bottom"?"top":"bottom",H=t==="right"?"left":"right",Z=getSupportedPropertyName("transform"),be=void 0,ye=void 0;if(M==="bottom"?h.nodeName==="HTML"?ye=-h.clientHeight+E.bottom:ye=-y.height+E.bottom:ye=E.top,H==="right"?h.nodeName==="HTML"?be=-h.clientWidth+E.right:be=-y.width+E.right:be=E.left,p&&Z)$[Z]="translate3d("+be+"px, "+ye+"px, 0)",$[M]=0,$[H]=0,$.willChange="transform";else{var we=M==="bottom"?-1:1,xe=H==="right"?-1:1;$[M]=ye*we,$[H]=be*xe,$.willChange=M+", "+H}var Ce={"x-placement":n.placement};return n.attributes=_extends$u({},Ce,n.attributes),n.styles=_extends$u({},$,n.styles),n.arrowStyles=_extends$u({},n.offsets.arrow,n.arrowStyles),n}function isModifierRequired(n,i,e){var t=find$1(n,function(h){var y=h.name;return y===i}),o=!!t&&n.some(function(h){return h.name===e&&h.enabled&&h.order<t.order});if(!o){var d="`"+i+"`",p="`"+e+"`";console.warn(p+" modifier is required by "+d+" modifier in order to work, be sure to include it before "+d+"!")}return o}function arrow(n,i){var e;if(!isModifierRequired(n.instance.modifiers,"arrow","keepTogether"))return n;var t=i.element;if(typeof t=="string"){if(t=n.instance.popper.querySelector(t),!t)return n}else if(!n.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var o=n.placement.split("-")[0],d=n.offsets,p=d.popper,h=d.reference,y=["left","right"].indexOf(o)!==-1,$=y?"height":"width",E=y?"Top":"Left",M=E.toLowerCase(),H=y?"left":"top",Z=y?"bottom":"right",be=getOuterSizes(t)[$];h[Z]-be<p[M]&&(n.offsets.popper[M]-=p[M]-(h[Z]-be)),h[M]+be>p[Z]&&(n.offsets.popper[M]+=h[M]+be-p[Z]),n.offsets.popper=getClientRect(n.offsets.popper);var ye=h[M]+h[$]/2-be/2,we=getStyleComputedProperty(n.instance.popper),xe=parseFloat(we["margin"+E]),Ce=parseFloat(we["border"+E+"Width"]),Ne=ye-n.offsets.popper[M]-xe-Ce;return Ne=Math.max(Math.min(p[$]-be,Ne),0),n.arrowElement=t,n.offsets.arrow=(e={},defineProperty(e,M,Math.round(Ne)),defineProperty(e,H,""),e),n}function getOppositeVariation(n){return n==="end"?"start":n==="start"?"end":n}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements.slice(3);function clockwise(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=validPlacements.indexOf(n),t=validPlacements.slice(e+1).concat(validPlacements.slice(0,e));return i?t.reverse():t}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip(n,i){if(isModifierEnabled(n.instance.modifiers,"inner")||n.flipped&&n.placement===n.originalPlacement)return n;var e=getBoundaries(n.instance.popper,n.instance.reference,i.padding,i.boundariesElement,n.positionFixed),t=n.placement.split("-")[0],o=getOppositePlacement(t),d=n.placement.split("-")[1]||"",p=[];switch(i.behavior){case BEHAVIORS.FLIP:p=[t,o];break;case BEHAVIORS.CLOCKWISE:p=clockwise(t);break;case BEHAVIORS.COUNTERCLOCKWISE:p=clockwise(t,!0);break;default:p=i.behavior}return p.forEach(function(h,y){if(t!==h||p.length===y+1)return n;t=n.placement.split("-")[0],o=getOppositePlacement(t);var $=n.offsets.popper,E=n.offsets.reference,M=Math.floor,H=t==="left"&&M($.right)>M(E.left)||t==="right"&&M($.left)<M(E.right)||t==="top"&&M($.bottom)>M(E.top)||t==="bottom"&&M($.top)<M(E.bottom),Z=M($.left)<M(e.left),be=M($.right)>M(e.right),ye=M($.top)<M(e.top),we=M($.bottom)>M(e.bottom),xe=t==="left"&&Z||t==="right"&&be||t==="top"&&ye||t==="bottom"&&we,Ce=["top","bottom"].indexOf(t)!==-1,Ne=!!i.flipVariations&&(Ce&&d==="start"&&Z||Ce&&d==="end"&&be||!Ce&&d==="start"&&ye||!Ce&&d==="end"&&we),Fe=!!i.flipVariationsByContent&&(Ce&&d==="start"&&be||Ce&&d==="end"&&Z||!Ce&&d==="start"&&we||!Ce&&d==="end"&&ye),Me=Ne||Fe;(H||xe||Me)&&(n.flipped=!0,(H||xe)&&(t=p[y+1]),Me&&(d=getOppositeVariation(d)),n.placement=t+(d?"-"+d:""),n.offsets.popper=_extends$u({},n.offsets.popper,getPopperOffsets(n.instance.popper,n.offsets.reference,n.placement)),n=runModifiers(n.instance.modifiers,n,"flip"))}),n}function keepTogether(n){var i=n.offsets,e=i.popper,t=i.reference,o=n.placement.split("-")[0],d=Math.floor,p=["top","bottom"].indexOf(o)!==-1,h=p?"right":"bottom",y=p?"left":"top",$=p?"width":"height";return e[h]<d(t[y])&&(n.offsets.popper[y]=d(t[y])-e[$]),e[y]>d(t[h])&&(n.offsets.popper[y]=d(t[h])),n}function toValue(n,i,e,t){var o=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),d=+o[1],p=o[2];if(!d)return n;if(p.indexOf("%")===0){var h=void 0;switch(p){case"%p":h=e;break;case"%":case"%r":default:h=t}var y=getClientRect(h);return y[i]/100*d}else if(p==="vh"||p==="vw"){var $=void 0;return p==="vh"?$=Math.max(document.documentElement.clientHeight,window.innerHeight||0):$=Math.max(document.documentElement.clientWidth,window.innerWidth||0),$/100*d}else return d}function parseOffset(n,i,e,t){var o=[0,0],d=["right","left"].indexOf(t)!==-1,p=n.split(/(\+|\-)/).map(function(E){return E.trim()}),h=p.indexOf(find$1(p,function(E){return E.search(/,|\s/)!==-1}));p[h]&&p[h].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var y=/\s*,\s*|\s+/,$=h!==-1?[p.slice(0,h).concat([p[h].split(y)[0]]),[p[h].split(y)[1]].concat(p.slice(h+1))]:[p];return $=$.map(function(E,M){var H=(M===1?!d:d)?"height":"width",Z=!1;return E.reduce(function(be,ye){return be[be.length-1]===""&&["+","-"].indexOf(ye)!==-1?(be[be.length-1]=ye,Z=!0,be):Z?(be[be.length-1]+=ye,Z=!1,be):be.concat(ye)},[]).map(function(be){return toValue(be,H,i,e)})}),$.forEach(function(E,M){E.forEach(function(H,Z){isNumeric(H)&&(o[M]+=H*(E[Z-1]==="-"?-1:1))})}),o}function offset(n,i){var e=i.offset,t=n.placement,o=n.offsets,d=o.popper,p=o.reference,h=t.split("-")[0],y=void 0;return isNumeric(+e)?y=[+e,0]:y=parseOffset(e,d,p,h),h==="left"?(d.top+=y[0],d.left-=y[1]):h==="right"?(d.top+=y[0],d.left+=y[1]):h==="top"?(d.left+=y[0],d.top-=y[1]):h==="bottom"&&(d.left+=y[0],d.top+=y[1]),n.popper=d,n}function preventOverflow(n,i){var e=i.boundariesElement||getOffsetParent(n.instance.popper);n.instance.reference===e&&(e=getOffsetParent(e));var t=getSupportedPropertyName("transform"),o=n.instance.popper.style,d=o.top,p=o.left,h=o[t];o.top="",o.left="",o[t]="";var y=getBoundaries(n.instance.popper,n.instance.reference,i.padding,e,n.positionFixed);o.top=d,o.left=p,o[t]=h,i.boundaries=y;var $=i.priority,E=n.offsets.popper,M={primary:function(Z){var be=E[Z];return E[Z]<y[Z]&&!i.escapeWithReference&&(be=Math.max(E[Z],y[Z])),defineProperty({},Z,be)},secondary:function(Z){var be=Z==="right"?"left":"top",ye=E[be];return E[Z]>y[Z]&&!i.escapeWithReference&&(ye=Math.min(E[be],y[Z]-(Z==="right"?E.width:E.height))),defineProperty({},be,ye)}};return $.forEach(function(H){var Z=["left","top"].indexOf(H)!==-1?"primary":"secondary";E=_extends$u({},E,M[Z](H))}),n.offsets.popper=E,n}function shift(n){var i=n.placement,e=i.split("-")[0],t=i.split("-")[1];if(t){var o=n.offsets,d=o.reference,p=o.popper,h=["bottom","top"].indexOf(e)!==-1,y=h?"left":"top",$=h?"width":"height",E={start:defineProperty({},y,d[y]),end:defineProperty({},y,d[y]+d[$]-p[$])};n.offsets.popper=_extends$u({},p,E[t])}return n}function hide(n){if(!isModifierRequired(n.instance.modifiers,"hide","preventOverflow"))return n;var i=n.offsets.reference,e=find$1(n.instance.modifiers,function(t){return t.name==="preventOverflow"}).boundaries;if(i.bottom<e.top||i.left>e.right||i.top>e.bottom||i.right<e.left){if(n.hide===!0)return n;n.hide=!0,n.attributes["x-out-of-boundaries"]=""}else{if(n.hide===!1)return n;n.hide=!1,n.attributes["x-out-of-boundaries"]=!1}return n}function inner(n){var i=n.placement,e=i.split("-")[0],t=n.offsets,o=t.popper,d=t.reference,p=["left","right"].indexOf(e)!==-1,h=["top","left"].indexOf(e)===-1;return o[p?"left":"top"]=d[e]-(h?o[p?"width":"height"]:0),n.placement=getOppositePlacement(i),n.offsets.popper=getClientRect(o),n}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner},hide:{order:800,enabled:!0,fn:hide},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function n(){},onUpdate:function n(){},modifiers},Popper=(function(){function n(i,e){var t=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,n),this.scheduleUpdate=function(){return requestAnimationFrame(t.update)},this.update=debounce$1(this.update.bind(this)),this.options=_extends$u({},n.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=i&&i.jquery?i[0]:i,this.popper=e&&e.jquery?e[0]:e,this.options.modifiers={},Object.keys(_extends$u({},n.Defaults.modifiers,o.modifiers)).forEach(function(p){t.options.modifiers[p]=_extends$u({},n.Defaults.modifiers[p]||{},o.modifiers?o.modifiers[p]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(p){return _extends$u({name:p},t.options.modifiers[p])}).sort(function(p,h){return p.order-h.order}),this.modifiers.forEach(function(p){p.enabled&&isFunction(p.onLoad)&&p.onLoad(t.reference,t.popper,t.options,p,t.state)}),this.update();var d=this.options.eventsEnabled;d&&this.enableEventListeners(),this.state.eventsEnabled=d}return createClass(n,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),n})();Popper.Utils=(typeof window<"u"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;function toPopperPlacement(n){return n.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function parsePopperOffset(n){return{top:Math.floor(n.top||0),left:Math.floor(n.left||0)}}var TETHER_PLACEMENT={auto:"auto"};function _typeof$f(n){"@babel/helpers - typeof";return _typeof$f=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$f(n)}var _excluded$p=["modifiers"];function ownKeys$p(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$o(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$p(Object(e),!0).forEach(function(t){_defineProperty$t(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$p(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _objectWithoutProperties$q(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$q(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$q(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 _classCallCheck$e(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(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$e(n,i,e){return i&&_defineProperties$e(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$e(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$e(n,i)}function _setPrototypeOf$e(n,i){return _setPrototypeOf$e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$e(n,i)}function _createSuper$e(n){var i=_isNativeReflectConstruct$e();return function(){var t=_getPrototypeOf$e(n),o;if(i){var d=_getPrototypeOf$e(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$e(this,o)}}function _possibleConstructorReturn$e(n,i){if(i&&(_typeof$f(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$e(n)}function _assertThisInitialized$e(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$e(){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$e(n){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$e(n)}function _defineProperty$t(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Tether=(function(n){_inherits$e(e,n);var i=_createSuper$e(e);function e(){var t;_classCallCheck$e(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$t(_assertThisInitialized$e(t),"popper",void 0),_defineProperty$t(_assertThisInitialized$e(t),"popperHeight",0),_defineProperty$t(_assertThisInitialized$e(t),"popperWidth",0),_defineProperty$t(_assertThisInitialized$e(t),"anchorHeight",0),_defineProperty$t(_assertThisInitialized$e(t),"anchorWidth",0),_defineProperty$t(_assertThisInitialized$e(t),"state",{isMounted:!1}),_defineProperty$t(_assertThisInitialized$e(t),"onPopperUpdate",function(h){var y={popper:parsePopperOffset(h.offsets.popper),arrow:h.offsets.arrow?parsePopperOffset(h.offsets.arrow):{top:0,left:0}};t.props.onPopperUpdate(y,h)}),t}return _createClass$e(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(o,d){if(this.props.anchorRef){var p=this.props.anchorRef.getBoundingClientRect(),h=p.height,y=p.width;(this.anchorHeight!==h||this.anchorWidth!==y)&&(this.anchorHeight=h,this.anchorWidth=y,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){var $=this.props.popperRef.getBoundingClientRect(),E=$.height,M=$.width;(this.popperHeight!==E||this.popperWidth!==M)&&(this.popperHeight=E,this.popperWidth=M,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==d.isMounted&&this.props.anchorRef&&this.initializePopper()}}},{key:"componentWillUnmount",value:function(){this.destroyPopover()}},{key:"initializePopper",value:function(){var o=this.props,d=o.placement,p=o.popperOptions,h=p.modifiers,y=_objectWithoutProperties$q(p,_excluded$p);!this.props.anchorRef||!this.props.popperRef||(this.popper=new Popper(this.props.anchorRef,this.props.popperRef,_objectSpread$o({placement:toPopperPlacement(d),modifiers:_objectSpread$o({arrow:{element:this.props.arrowRef,enabled:!!this.props.arrowRef},computeStyle:{gpuAcceleration:!1},applyStyle:{enabled:!1},applyReactStyle:{enabled:!0,fn:this.onPopperUpdate,order:900},preventOverflow:{enabled:!0}},h)},y)))}},{key:"destroyPopover",value:function(){this.popper&&(this.popper.destroy(),delete this.popper)}},{key:"render",value:function(){return this.props.children||null}}]),e})(reactExports.Component);_defineProperty$t(Tether,"defaultProps",{anchorRef:null,onPopperUpdate:function n(){return null},placement:TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var BaseProvider=function n(i){var e=i.children,t=i.overrides,o=i.theme,d=i.zIndex;return reactExports.createElement(LayersManager,{zIndex:d,overrides:t},reactExports.createElement(UIDReset,{prefix:"bui"},reactExports.createElement(ThemeProvider$1,{theme:o},e)))};const createBaseUiThemePrimitives=(n,i)=>{const{colors:e,genericFonts:t}=i;return{...n,primaryFontFamily:t.bodyFont,primary100:e.primary,primary200:e.primary,primary300:e.primary,primary400:e.primary,primary500:e.primary,primary600:e.primary,primary700:e.primary,mono100:e.bgColor,mono200:e.secondaryBg,mono300:e.gray30,mono400:e.gray30,mono500:e.gray60,mono600:e.fadedText40,mono700:e.gray60,mono800:e.bodyText,mono900:e.bodyText,mono1000:e.black}},createBaseUiThemeOverrides=n=>{const{inSidebar:i,colors:e,genericFonts:t,fontSizes:o,lineHeights:d,radii:p}=n,h={fontFamily:t.bodyFont,fontSize:o.md,fontSizeSm:o.sm,fontWeight:"normal",lineHeight:d.base,lineHeightTight:d.tight},y=e.secondaryBg,$=i?e.secondaryBg:e.bgColor,E=i?e.bgColor:e.secondaryBg;return{borders:{radius100:p.default,radius200:p.default,radius300:p.default,radius400:p.default,radius500:p.default,useRoundedCorners:!0,buttonBorderRadiusMini:p.md,buttonBorderRadius:p.default,checkboxBorderRadius:`min(${p.md}, ${p.maxCheckbox})`,inputBorderRadiusMini:p.md,inputBorderRadius:p.default,popoverBorderRadius:p.default,surfaceBorderRadius:p.default,tagBorderRadius:p.md},typography:{font100:{},font150:{...h},font200:{},font250:{},font300:{...h},font350:{...h},font400:{...h},font450:{...h},font460:{...h},font470:{...h},font500:{...h},font600:{},LabelXSmall:{...h},LabelSmall:{...h},LabelMedium:{...h},LabelLarge:{...h},ParagraphSmall:{...h}},colors:{white:e.white,black:e.black,primary:e.primary,primaryA:e.primary,backgroundPrimary:e.bgColor,backgroundSecondary:y,backgroundTertiary:e.bgColor,borderOpaque:e.darkenedBgMix25,accent:transparentize(e.primary,.5),tagPrimarySolidBackground:e.primary,tagPrimaryFontDisabled:e.fadedText40,tagPrimaryOutlinedDisabled:e.transparent,borderSelected:e.primary,contentPrimary:e.bodyText,inputPlaceholder:e.fadedText60,tickFillDisabled:e.fadedText40,tickMarkFill:e.gray20,tickFillSelected:e.primary,datepickerBackground:$,calendarBackground:$,calendarForeground:e.bodyText,calendarDayForegroundPseudoSelected:e.bodyText,calendarHeaderBackground:E,calendarHeaderBackgroundActive:E,calendarHeaderForeground:e.bodyText,calendarHeaderForegroundDisabled:e.gray40,calendarDayBackgroundSelected:e.primary,calendarDayBackgroundSelectedHighlighted:e.primary,calendarDayForegroundSelected:e.white,calendarDayForegroundSelectedHighlighted:e.white,calendarDayForegroundPseudoSelectedHighlighted:e.bodyText,menuFontHighlighted:e.bodyText,menuFontSelected:e.bodyText,modalCloseColor:e.bodyText,notificationInfoBackground:e.blueBackgroundColor,notificationInfoText:e.blueTextColor,notificationPositiveBackground:e.greenBackgroundColor,notificationPositiveText:e.greenTextColor,notificationWarningBackground:e.yellowBackgroundColor,notificationWarningText:e.yellowTextColor,notificationNegativeBackground:e.redBackgroundColor,notificationNegativeText:e.redTextColor,progressbarTrackFill:y,tickFill:e.lightenedBg05,tickMarkFillDisabled:e.lightenedBg05,menuFill:$,buttonDisabledFill:e.lightenedBg05,tickFillHover:y,inputFillDisabled:y,inputFillActive:y,toggleTrackFillDisabled:y,tickFillActive:y,sliderTrackFillDisabled:y,inputBorder:e.widgetBorderColor||y,inputFill:y,inputEnhanceFill:y,inputEnhancerFillDisabled:y,buttonDisabledSpinnerBackground:e.gray40,toggleTrackFill:e.gray40,sliderTrackFill:e.gray40,sliderHandleInnerFill:e.gray40,sliderHandleInnerFillDisabled:e.gray40}}},createBaseUiTheme=(n,i=primitives)=>createLightTheme(createBaseUiThemePrimitives(i,n),createBaseUiThemeOverrides(n)),computeDerivedColors=n=>{const{bodyText:i,secondaryBg:e,bgColor:t}=n,o=getLuminance(t)>.5,d=transparentize(i,.9),p=transparentize(i,.8),h=transparentize(i,.7),y=transparentize(i,.6),$=transparentize(i,.4),E=mix$1(t,e,.5),M=o?darken(E,.3):lighten(E,.6),H=transparentize(M,.75),Z=transparentize(M,.85),be=lighten(t,.025);return{fadedText05:d,fadedText10:p,fadedText20:h,fadedText40:y,fadedText60:$,bgMix:E,darkenedBgMix100:M,darkenedBgMix25:H,darkenedBgMix15:Z,lightenedBg05:be}};function _isLightBackground(n){return getLuminance(n)>.5}function hasLightBackgroundColor(n){return _isLightBackground(n.colors.bgColor)}const createEmotionColors=n=>{const i=computeDerivedColors(n),e=defaultCategoricalColorsArray(n),t=defaultSequentialColorsArray(n);return{...n,...i,link:n.blueTextColor,codeTextColor:n.greenTextColor,codeBackgroundColor:i.bgMix,borderColor:i.fadedText10,borderColorLight:i.fadedText05,dataframeBorderColor:i.fadedText05,dataframeHeaderBackgroundColor:i.bgMix,headingColor:n.bodyText,chartCategoricalColors:e,chartSequentialColors:t}};function getDividerColors(n){const{redColor:i,orangeColor:e,yellowColor:t,blueColor:o,greenColor:d,violetColor:p,grayColor:h}=n.colors;return{red:i,orange:e,yellow:t,blue:o,green:d,violet:p,gray:h,grey:h,rainbow:`linear-gradient(to right, ${i}, ${e}, ${t}, ${d}, ${o}, ${p})`}}function getMarkdownBgColors(n){const i=hasLightBackgroundColor(n),e=n.colors;return{redbg:e.redBackgroundColor,orangebg:e.orangeBackgroundColor,yellowbg:e.yellowBackgroundColor,bluebg:e.blueBackgroundColor,greenbg:e.greenBackgroundColor,violetbg:e.violetBackgroundColor,purplebg:transparentize(e[i?"purple90":"purple80"],i?.9:.7),graybg:e.grayBackgroundColor,primarybg:transparentize(e.primary,i?.9:.7)}}function getMarkdownTextColors(n){const i=hasLightBackgroundColor(n),e=n.colors,t=e.primary,o=e.redTextColor,d=e.orangeTextColor,p=e.yellowTextColor,h=e.blueTextColor,y=e.greenTextColor,$=e.violetTextColor,E=i?e.purple100:e.purple80,M=e.grayTextColor;return{red:o,orange:d,yellow:p,green:y,blue:h,violet:$,purple:E,gray:M,primary:t}}function getGray70(n){return hasLightBackgroundColor(n)?n.colors.gray70:n.colors.gray30}function getGray30(n){return hasLightBackgroundColor(n)?n.colors.gray30:n.colors.gray85}function getGray90(n){return hasLightBackgroundColor(n)?n.colors.gray90:n.colors.gray10}function getBlue80(n){return hasLightBackgroundColor(n)?n.colors.blue80:n.colors.blue40}function getBlueArrayAsc(n){return[n.blue10,n.blue20,n.blue30,n.blue40,n.blue50,n.blue60,n.blue70,n.blue80,n.blue90,n.blue100]}function getBlueArrayDesc(n){return[n.blue100,n.blue90,n.blue80,n.blue70,n.blue60,n.blue50,n.blue40,n.blue30,n.blue20,n.blue10]}function getDivergingColorsArray(n){const{colors:i}=n;return[i.red100,i.red90,i.red70,i.red50,i.red30,i.blue30,i.blue50,i.blue70,i.blue90,i.blue100]}function defaultSequentialColorsArray(n){return _isLightBackground(n.bgColor)?getBlueArrayAsc(n):getBlueArrayDesc(n)}function defaultCategoricalColorsArray(n){return _isLightBackground(n.bgColor)?[n.blue80,n.blue40,n.red80,n.red40,n.blueGreen80,n.green40,n.orange80,n.orange50,n.purple80,n.gray40]:[n.blue40,n.blue80,n.red40,n.red80,n.green40,n.blueGreen80,n.orange50,n.orange80,n.purple80,n.gray40]}function getDecreasingRed(n){return hasLightBackgroundColor(n)?n.colors.red80:n.colors.red40}function getIncreasingGreen(n){return hasLightBackgroundColor(n)?n.colors.blueGreen80:n.colors.green40}const breakpoints={hideWidgetDetails:"11.25rem",hideNumberInputControls:"7.5rem",sm:"576px",columns:"640px",md:"768px"},colors={transparent:"transparent",black:"#000000",white:"#ffffff",gray10:"#fafafa",gray20:"#f0f2f6",gray30:"#e6eaf1",gray40:"#d5dae5",gray50:"#bfc5d3",gray60:"#a3a8b8",gray70:"#808495",gray80:"#555867",gray85:"#31333F",gray90:"#262730",gray100:"#0e1117",red10:"#fff0f0",red20:"#ffdede",red30:"#ffc7c7",red40:"#ffabab",red50:"#ff8c8c",red60:"#ff6c6c",red70:"#ff4b4b",red80:"#ff2b2b",red90:"#bd4043",red100:"#7d353b",orange10:"#fffae8",orange20:"#fff6d0",orange30:"#ffecb0",orange40:"#ffe08e",orange50:"#ffd16a",orange60:"#ffbd45",orange70:"#ffa421",orange80:"#ff8700",orange90:"#ed6f13",orange95:"#e2660c",orange100:"#d95a00",yellow10:"#ffffe1",yellow20:"#ffffc2",yellow30:"#ffffa0",yellow40:"#ffff7d",yellow50:"#ffff59",yellow60:"#fff835",yellow65:"#ffff12",yellow70:"#ffe312",yellow80:"#faca2b",yellow90:"#edbb16",yellow100:"#dea816",yellow110:"#916e10",yellow115:"#926c05",green10:"#dffde9",green20:"#c0fcd3",green30:"#9ef6bb",green40:"#7defa1",green50:"#5ce488",green60:"#3dd56d",green70:"#21c354",green80:"#09ab3b",green90:"#158237",green100:"#177233",blueGreen10:"#dcfffb",blueGreen20:"#bafff7",blueGreen30:"#93ffee",blueGreen40:"#6bfde3",blueGreen50:"#45f4d5",blueGreen60:"#20e7c5",blueGreen70:"#00d4b1",blueGreen80:"#29b09d",blueGreen90:"#2c867c",blueGreen100:"#246e69",lightBlue10:"#e0feff",lightBlue20:"#bffdff",lightBlue30:"#9af8ff",lightBlue40:"#73efff",lightBlue50:"#4be4ff",lightBlue60:"#24d4ff",lightBlue70:"#00c0f2",lightBlue80:"#00a4d4",lightBlue90:"#0d8cb5",lightBlue100:"#15799e",blue10:"#e4f5ff",blue20:"#c7ebff",blue30:"#a6dcff",blue40:"#83c9ff",blue50:"#60b4ff",blue60:"#3d9df3",blue65:"#1c83ff",blue70:"#1c83e1",blue80:"#0068c9",blue90:"#0054a3",blue100:"#004280",purple10:"#f5ebff",purple20:"#ebd6ff",purple30:"#dbbbff",purple40:"#c89dff",purple50:"#b27eff",purple60:"#9a5dff",purple70:"#803df5",purple80:"#6d3fc0",purple90:"#583f84",purple100:"#3f3163"},iconSizes={xs:"0.5rem",sm:"0.75rem",md:"0.9rem",base:"1rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.8rem",threeXL:"2.3rem"},radii={md:"0.25rem",default:"0.5rem",xl:"0.75rem",xxl:"1rem",button:"0.5rem",chatInput:"1.25rem",full:"9999px",maxCheckbox:"0.35rem"},sizes={full:"100%",headerHeight:"3.75rem",fullScreenHeaderHeight:"2.875rem",sidebarTopSpace:"6rem",toastWidth:"21rem",contentMaxWidth:"736px",maxChartTooltipWidth:"30rem",checkbox:"1rem",borderWidth:"1px",smallElementHeight:"1.5rem",minElementHeight:"2.5rem",largestElementHeight:"4.25rem",smallLogoHeight:"1.25rem",defaultLogoHeight:"1.5rem",largeLogoHeight:"2rem",sliderThumb:"0.75rem",wideSidePadding:"5rem",headerDecorationHeight:"0.125rem",appRunningMen:"1.6rem",appStatusMaxWidth:"20rem",spinnerSize:"1.375rem",spinnerThickness:"0.125rem",tabHeight:"2.5rem",minPopupWidth:"20rem",maxTooltipHeight:"18.75rem",chatAvatarSize:"2rem",clearIconSize:"1.5em",numberInputControlsWidth:"2rem",emptyDropdownHeight:"5.625rem",dropdownItemHeight:"2.5rem",maxDropdownHeight:"18.75rem",appDefaultBottomPadding:"3.5rem",defaultMapHeight:"31.25rem",defaultChartHeight:"21.875rem",defaultChartWidth:"25rem",minMenuWidth:"8rem",minChatInputFileListHeight:"3rem",chatInputFileIconSize:"2.25rem",headerItemHeight:"1.75rem",headerRightContentMaxWidth:"12.5rem",chatInputTextareaMinHeight:"1.5rem",chatInputPrimaryButtonSize:"2rem",chatInputButtonVerticalOffset:"0.1875rem",dialogLargeWidth:"80rem",defaultStrokeWidth:2.25,metricStrokeWidth:2},spacing={px:"1px",none:"0",threeXS:"0.125rem",twoXS:"0.25rem",xs:"0.375rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.25rem",twoXL:"1.5rem",threeXL:"2rem",fourXL:"4rem",fiveXL:"6rem",sixXL:"8rem"},fonts={sansSerif:'"Source Sans", sans-serif',monospace:'"Source Code Pro", monospace',serif:'"Source Serif", serif',materialIcons:"Material Symbols Rounded"},genericFonts={bodyFont:fonts.sansSerif,codeFont:fonts.monospace,headingFont:fonts.sansSerif,iconFont:fonts.materialIcons},fontSizes={baseFontSize:16,twoSm:"0.75rem",sm:"0.875rem",md:"1rem",mdLg:"1.125rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.75rem",threeXL:"2.25rem",fourXL:"2.75rem",codeFontSize:"0.875rem",inlineCodeFontSize:"0.75em",h1FontSize:"2.75rem",h2FontSize:"2.25rem",h3FontSize:"1.75rem",h4FontSize:"1.5rem",h5FontSize:"1.25rem",h6FontSize:"1rem"},fontWeights={normal:400,semiBold:500,bold:600,extrabold:700,code:400,codeBold:600,codeExtraBold:700,h1FontWeight:700,h2FontWeight:600,h3FontWeight:600,h4FontWeight:600,h5FontWeight:600,h6FontWeight:600},lineHeights={none:1,headings:1.2,tight:1.25,inputWidget:1.4,small:1.5,base:1.6,menuItem:2},sidebar=100,menuButton=sidebar+10,balloons=1e6,header=balloons-10,bottom=sidebar-1,sidebarMobile=balloons-5,fullscreenWrapper=balloons+50,headerDecoration=balloons-1,popup=fullscreenWrapper+10,tablePortal=fullscreenWrapper+60,cacheSpinner=sidebar+1,toast=popup+1,zIndices={hide:-1,auto:"auto",base:0,priority:1,sidebar,menuButton,balloons,header,sidebarMobile,popup,fullscreenWrapper,tablePortal,bottom,cacheSpinner,toast,headerDecoration},requiredThemeColors={bgColor:colors.white,secondaryBg:colors.gray20,bodyText:colors.gray85,primary:colors.red70,secondary:colors.blue70,redColor:colors.red70,orangeColor:colors.orange70,yellowColor:colors.yellow80,blueColor:colors.blue70,greenColor:colors.green70,violetColor:colors.purple70,grayColor:colors.gray60,redBackgroundColor:transparentize(colors.red80,.9),orangeBackgroundColor:transparentize(colors.orange70,.9),yellowBackgroundColor:transparentize(colors.yellow65,.9),blueBackgroundColor:transparentize(colors.blue65,.9),greenBackgroundColor:transparentize(colors.green70,.9),violetBackgroundColor:transparentize(colors.purple60,.9),grayBackgroundColor:transparentize(colors.gray85,.9),redTextColor:colors.red90,orangeTextColor:colors.orange95,yellowTextColor:colors.yellow115,blueTextColor:colors.blue90,greenTextColor:colors.green90,violetTextColor:colors.purple90,grayTextColor:transparentize(colors.gray85,.4)},optionalThemeColors={},themeColors={...colors,...requiredThemeColors,...optionalThemeColors},emotionBaseTheme={inSidebar:!1,showSidebarBorder:!1,linkUnderline:!0,breakpoints,colors:createEmotionColors(themeColors),fonts,fontSizes,fontWeights,genericFonts,iconSizes,lineHeights,radii,sizes,spacing,zIndices},genericColors$1={...colors,bgColor:colors.gray100,bodyText:colors.gray10,primary:colors.red70,secondaryBg:colors.gray90,redColor:colors.red80,orangeColor:colors.orange80,yellowColor:colors.yellow70,blueColor:colors.blue80,greenColor:colors.green80,violetColor:colors.purple70,grayColor:colors.gray80,redBackgroundColor:transparentize(colors.red60,.8),orangeBackgroundColor:transparentize(colors.orange80,.8),yellowBackgroundColor:transparentize(colors.yellow65,.8),blueBackgroundColor:transparentize(colors.blue60,.8),greenBackgroundColor:transparentize(colors.green60,.8),violetBackgroundColor:transparentize(colors.purple60,.8),grayBackgroundColor:transparentize(colors.gray70,.8),redTextColor:colors.red60,orangeTextColor:colors.orange60,yellowTextColor:colors.yellow20,blueTextColor:colors.blue60,greenTextColor:colors.green50,violetTextColor:colors.purple50,grayTextColor:transparentize(colors.gray10,.4)},emotionDarkTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors$1})},genericColors={...colors},emotionLightTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors})},baseuiLightTheme=createBaseUiTheme(emotionLightTheme,primitives),baseuiDarkTheme=createBaseUiTheme(emotionDarkTheme,primitives$1),STALE_TRANSITION_PARAMS="1s ease-in 0.5s",STALE_STYLES={opacity:.33,transition:`opacity ${STALE_TRANSITION_PARAMS}`},globalStyles=n=>css("html{font-size:",n.fontSizes.baseFontSize,"px;}@media print{html{height:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact;}}*,*::before,*::after{box-sizing:border-box;}body{margin:0;font-family:",n.genericFonts.bodyFont,";font-weight:",n.fontWeights.normal,";line-height:",n.lineHeights.base,";color:",n.colors.bodyText,";background-color:",n.colors.bgColor,";-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:",transparentize(n.colors.black,1),';-webkit-font-smoothing:auto;}body.embedded{overflow:hidden;}body.embedded:hover{overflow:auto;}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important;}p,ol,ul,dl{margin:0 0 1rem 0;padding:0;font-size:1rem;font-weight:',n.fontWeights.normal,';}ol ol,ul ul,ol ul,ul ol{margin-bottom:0;}a:not([href]):not([class]){&,&:hover{color:inherit;text-decoration:none;}}img,svg{vertical-align:middle;}input,button,select,optgroup,textarea{margin:0;font-family:inherit;line-height:inherit;font-size:inherit;}button,input{overflow:visible;}button,[role="button"]{&:not(:disabled){cursor:pointer;}}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button;}[hidden]{display:none !important;}@supports (scrollbar-color:transparent transparent){*{scrollbar-width:thin;scrollbar-color:transparent transparent;}*:hover{scrollbar-color:',n.colors.fadedText40," transparent;}}@supports not (scrollbar-color:transparent transparent){::-webkit-scrollbar{background:transparent;border-radius:",n.radii.full,";height:6px;width:6px;}::-webkit-scrollbar:active{background:",n.colors.fadedText10,";}:hover::-webkit-scrollbar-thumb:vertical,:hover::-webkit-scrollbar-thumb:horizontal{background:",n.colors.fadedText40,";border-radius:",n.radii.full,";}}"),baseTheme={name:"base",emotion:emotionBaseTheme,basewebTheme:baseuiLightTheme,primitives},darkTheme={name:"Dark",emotion:emotionDarkTheme,basewebTheme:baseuiDarkTheme,primitives:primitives$1},lightTheme={name:"Light",emotion:emotionLightTheme,basewebTheme:baseuiLightTheme,primitives},CACHED_THEME_VERSION=1,CACHED_THEME_BASE_KEY=`stActiveTheme-${window.location.pathname}`,LocalStore={CACHED_THEME_VERSION,CACHED_THEME_BASE_KEY,ACTIVE_THEME:`${CACHED_THEME_BASE_KEY}-v${CACHED_THEME_VERSION}`},AUTO_THEME_NAME="Use system setting",CUSTOM_THEME_NAME="Custom Theme",CUSTOM_THEME_LIGHT_NAME="Custom Theme Light",CUSTOM_THEME_DARK_NAME="Custom Theme Dark",CUSTOM_THEME_AUTO_NAME="Custom Theme Auto",LOG$h=loglevelExports.getLogger("theme:utils");function sortThemeInputKeys(n){if(n==null)return n;if(Array.isArray(n))return n.map(i=>sortThemeInputKeys(i));if(typeof n=="object"){const i={};return Object.keys(n).sort().forEach(e=>{i[e]=sortThemeInputKeys(n[e])}),i}return n}function mergeTheme(n,i){if(i&&isObject$1(i)){const e=new CustomThemeConfig(i);return createTheme(n.name,e,n)}return n}const getMergedLightTheme=once(()=>mergeTheme(lightTheme,StreamlitConfig.LIGHT_THEME)),getMergedDarkTheme=once(()=>mergeTheme(darkTheme,StreamlitConfig.DARK_THEME)),getSystemThemePreference=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",getSystemTheme=()=>getSystemThemePreference()==="dark"?getMergedDarkTheme():getMergedLightTheme(),createAutoTheme=()=>({...getSystemTheme(),name:AUTO_THEME_NAME}),createPresetThemes=()=>[createAutoTheme(),getMergedLightTheme(),getMergedDarkTheme()],isPresetTheme=n=>createPresetThemes().map(e=>e.name).includes(n.name),bgColorToBaseString=n=>n===void 0||getLuminance(n)>.5?"light":"dark",isColor=n=>{const i=new Option().style;return i.color=n,i.color!==""},roundFontSizeToNearestEighth=n=>Math.round(n*8)/8,parseFont=(n,i=fonts.sansSerif)=>{const e=n.trim();if(!e)return i;const t={"sans-serif":fonts.sansSerif,serif:fonts.serif,monospace:fonts.monospace},o=e.toLowerCase().replaceAll(" ","-");return o in t?t[o]:`${e}, ${i}`},parseColor=(n,i,e=!1)=>{if(isColor(n))return n;if(isColor(`#${n}`))return`#${n}`;if(i.toLowerCase().includes("color")){const o=e?"theme.sidebar":"theme";LOG$h.warn(`Invalid color passed for ${i} in ${o}: "${n}"`)}},resolveBgColor=(n,i,e,t)=>n||(i?transparentize(i,t?.9:.8):e),resolveTextColor=(n,i,e,t)=>n||(i?t?darken(i,.15):lighten(i,.15):e),setBackgroundColors=(n,i)=>{const e={...n},t={redBackgroundColor:{main:i.redColor,background:i.redBackgroundColor},orangeBackgroundColor:{main:i.orangeColor,background:i.orangeBackgroundColor},yellowBackgroundColor:{main:i.yellowColor,background:i.yellowBackgroundColor},blueBackgroundColor:{main:i.blueColor,background:i.blueBackgroundColor},greenBackgroundColor:{main:i.greenColor,background:i.greenBackgroundColor},violetBackgroundColor:{main:i.violetColor,background:i.violetBackgroundColor},grayBackgroundColor:{main:i.grayColor,background:i.grayBackgroundColor}},o=getLuminance(e.bgColor)>.5;return Object.entries(t).forEach(([d,{main:p,background:h}])=>{const y=d;e[y]=resolveBgColor(h,p,n[y],o)}),e},setTextColors=(n,i)=>{const e={...n},t={redTextColor:{main:i.redColor,text:i.redTextColor},orangeTextColor:{main:i.orangeColor,text:i.orangeTextColor},yellowTextColor:{main:i.yellowColor,text:i.yellowTextColor},blueTextColor:{main:i.blueColor,text:i.blueTextColor},greenTextColor:{main:i.greenColor,text:i.greenTextColor},violetTextColor:{main:i.violetColor,text:i.violetTextColor},grayTextColor:{main:i.grayColor,text:i.grayTextColor}},o=getLuminance(e.bgColor)>.5;return Object.entries(t).forEach(([d,{main:p,text:h}])=>{const y=d;e[y]=resolveTextColor(h,p,n[y],o)}),e},parseRadius=n=>{let i="rem",e;const t=n.trim().toLowerCase();return t==="none"?e=0:t==="small"?e=.35:t==="medium"?e=.5:t==="large"?e=1:t==="full"?e=1.4:t.endsWith("rem")?e=parseFloat(t):t.endsWith("px")?(e=parseFloat(t),i="px"):isNaN(parseFloat(t))||(e=parseFloat(t),i="px"),[e,i]},parseFontSize=(n,i,e)=>{const t=e?"theme.sidebar":"theme";if(typeof i=="string"){const o=i.trim().toLowerCase(),d=parseFloat(o);if(d&&(o.endsWith("rem")||o.endsWith("px")))return o;if(d.toString()===o)return`${o}px`}LOG$h.warn(`Invalid size passed for ${n} in ${t}: ${i}. Falling back to default ${n}.`)},isValidFontWeight=(n,i,e,t,o)=>{const d=o?"theme.sidebar":"theme";if(notNullOrUndefined(i)){const p=Number.isInteger(i),h=i%100===0,y=i>=e&&i<=t;return!p||!h||!y?(LOG$h.warn(`Invalid ${n}: ${i} in ${d}. The ${n} must be an integer ${e}-${t}, and an increment of 100. Falling back to default font weight.`),!1):!0}return!1},convertHeadingFontSizeToRem=(n,i,e,t)=>{const o=parseFontSize(n,i,t);if(o?.endsWith("rem"))return o;if(o?.endsWith("px"))return`${parseFloat(o)/e}rem`},setHeadingFontSizes=(n,i,e,t)=>{const o={...n};return t&&t.forEach((d,p)=>{const h=`h${p+1}FontSize`,y=convertHeadingFontSizeToRem(`${h} in headingFontSizes`,d,e,i);y&&(o[h]=y)}),o},setFontWeights=(n,i,e,t,o)=>{const d={...n,h1FontWeight:i?600:n.h1FontWeight};return e&&isValidFontWeight("baseFontWeight",e,100,600)&&(d.normal=e,d.semiBold=e+100,d.bold=e+200,d.extrabold=e+300,d.code=e,d.codeBold=e+200,d.codeExtraBold=e+300),t&&isValidFontWeight("codeFontWeight",t,100,600)&&(d.code=t,d.codeBold=t+200,d.codeExtraBold=t+300),o&&o.forEach((p,h)=>{const y=`h${h+1}FontWeight`;isValidFontWeight(`${y} in headingFontWeights`,p,100,900,i)&&(d[y]=p)}),d},validateChartColors=(n,i)=>i.map(e=>parseColor(e,n)).filter(e=>e!==void 0),createEmotionTheme=(n,i=baseTheme)=>{const{colors:e,genericFonts:t,inSidebar:o}=i.emotion,{baseFontSize:d,baseFontWeight:p,baseRadius:h,buttonRadius:y,codeFontSize:$,codeFontWeight:E,showWidgetBorder:M,headingFont:H,headingFontSizes:Z,headingFontWeights:be,bodyFont:ye,codeFont:we,showSidebarBorder:xe,linkUnderline:Ce,chartCategoricalColors:Ne,chartSequentialColors:Fe,...Me}=n,Le=Object.entries(Me).reduce((gt,[$t,Mt])=>{const qt=parseColor(Mt,$t,o);return qt&&(gt[$t]=qt),gt},{}),{secondaryBackgroundColor:ze,backgroundColor:Ke,primaryColor:Ve,textColor:je,dataframeBorderColor:We,dataframeHeaderBackgroundColor:Xe,widgetBorderColor:Qe,borderColor:Ye,linkColor:Ue,codeTextColor:ot,codeBackgroundColor:dt,redColor:st,orangeColor:pt,yellowColor:Be,blueColor:qe,greenColor:rt,violetColor:He,grayColor:Ot}=Le,Ct={...e,primary:Ve??e.primary,bodyText:je??e.bodyText,secondaryBg:ze??e.secondaryBg,bgColor:Ke??e.bgColor,redColor:st??e.redColor,orangeColor:pt??e.orangeColor,yellowColor:Be??e.yellowColor,blueColor:qe??e.blueColor,greenColor:rt??e.greenColor,violetColor:He??e.violetColor,grayColor:Ot??e.grayColor,secondary:Ve??e.primary},tt={colors:{...createEmotionColors(Ct)},showSidebarBorder:xe??i.emotion.showSidebarBorder,linkUnderline:Ce??i.emotion.linkUnderline,radii:{...i.emotion.radii},fontSizes:{...i.emotion.fontSizes},fontWeights:{...i.emotion.fontWeights}};if(tt.colors.codeBackgroundColor=dt??e.codeBackgroundColor,tt.colors.dataframeHeaderBackgroundColor=Xe??e.dataframeHeaderBackgroundColor,notNullOrUndefined(Ye)){tt.colors.borderColor=Ye;const gt=transparentize(Ye,.55);tt.colors.borderColorLight=gt,tt.colors.dataframeBorderColor=gt}if(notNullOrUndefined(We)&&(tt.colors.dataframeBorderColor=We),(M||Qe)&&(tt.colors.widgetBorderColor=Qe||tt.colors.borderColor),tt.colors=setBackgroundColors(tt.colors,Le),tt.colors=setTextColors(tt.colors,Le),tt.colors.link=Ue??tt.colors.blueTextColor,tt.colors.codeTextColor=ot??tt.colors.greenTextColor,notNullOrUndefined(Ne)&&Ne.length>0){const gt=validateChartColors("chartCategoricalColors",Ne);gt.length>0&&(tt.colors.chartCategoricalColors=gt)}if(notNullOrUndefined(Fe)&&Fe.length>0){const gt=validateChartColors("chartSequentialColors",Fe);gt.length===10?tt.colors.chartSequentialColors=gt:LOG$h.warn(`Invalid chartSequentialColors: ${Fe.toString()}. Falling back to default chartSequentialColors.`)}if(notNullOrUndefined(h)){const[gt,$t]=parseRadius(h);if(notNullOrUndefined(gt)&&!isNaN(gt)){const Mt=addCssUnit(gt,$t);tt.radii.default=Mt,tt.radii.button=Mt,tt.radii.md=addCssUnit(roundToTwoDecimals(gt*.5),$t),tt.radii.xl=addCssUnit(roundToTwoDecimals(gt*1.5),$t),tt.radii.xxl=addCssUnit(roundToTwoDecimals(gt*2),$t)}else LOG$h.warn(`Invalid base radius: ${h}. Falling back to default base radius.`)}if(notNullOrUndefined(y)){const[gt,$t]=parseRadius(y);notNullOrUndefined(gt)&&!isNaN(gt)?tt.radii.button=addCssUnit(gt,$t):LOG$h.warn(`Invalid button radius: ${y}. Falling back to default button radius.`)}if(d&&d>0&&(tt.fontSizes.baseFontSize=d),$){const gt=parseFontSize("codeFontSize",$,o);gt&&(tt.fontSizes.codeFontSize=gt)}tt.fontSizes=setHeadingFontSizes(tt.fontSizes,o,tt.fontSizes.baseFontSize,Z),tt.fontWeights=setFontWeights(i.emotion.fontWeights,o,p,E,be);const wt={...t,bodyFont:ye?parseFont(ye,fonts.sansSerif):t.bodyFont,codeFont:we?parseFont(we,fonts.monospace):t.codeFont,headingFont:H?parseFont(H,fonts.sansSerif):t.headingFont};return ye&&!H&&(wt.headingFont=parseFont(ye,fonts.sansSerif)),{...i.emotion,genericFonts:wt,...tt}},toThemeInput=n=>{const{colors:i}=n;return{primaryColor:i.primary,backgroundColor:i.bgColor,secondaryBackgroundColor:i.secondaryBg,textColor:i.bodyText,bodyFont:n.genericFonts.bodyFont}},toExportedTheme=n=>{const{colors:i}=n,e=toThemeInput(n);return{primaryColor:e.primaryColor,backgroundColor:e.backgroundColor,secondaryBackgroundColor:e.secondaryBackgroundColor,textColor:e.textColor,bodyFont:e.bodyFont,base:bgColorToBaseString(e.backgroundColor),...computeDerivedColors(i)}},completeThemeInput=(n,i)=>new CustomThemeConfig({...toThemeInput(i.emotion),...n}),createTheme=(n,i,e,t=!1)=>{let o;e?o=completeThemeInput(i,e):i.base===CustomThemeConfig.BaseTheme.DARK?o=completeThemeInput(i,darkTheme):o=completeThemeInput(i,lightTheme);const d=o.backgroundColor,p=merge$1(cloneDeep(e||(getLuminance(d)>.5?lightTheme:darkTheme)),{emotion:{inSidebar:t}}),h=createEmotionTheme(o,p),y=cloneDeep(createBaseUiTheme(h,p.primitives));return{...p,name:n,emotion:h,basewebTheme:y,themeInput:i}},getCachedTheme=()=>{if(!localStorageAvailable())return null;const n=window.localStorage.getItem(LocalStore.ACTIVE_THEME);if(!n)return null;const{name:i,themeInput:e}=JSON.parse(n);switch(i){case lightTheme.name:return getMergedLightTheme();case darkTheme.name:return getMergedDarkTheme();case CUSTOM_THEME_LIGHT_NAME:return{...createTheme(i,e),displayName:"Light"};case CUSTOM_THEME_DARK_NAME:return{...createTheme(i,e),displayName:"Dark"};default:return createTheme(i,e)}},deleteOldCachedThemes=()=>{const{CACHED_THEME_VERSION:n,CACHED_THEME_BASE_KEY:i}=LocalStore,{localStorage:e}=window;e.removeItem("stActiveTheme"),e.removeItem(i);for(let t=1;t<=n;t++)e.removeItem(`${i}-v${t}`)},setCachedTheme=n=>{if(!localStorageAvailable()||(deleteOldCachedThemes(),isLightThemeInQueryParams()||isDarkThemeInQueryParams()))return;const i={name:n.name,...!isPresetTheme(n)&&{themeInput:toThemeInput(n.emotion)}};window.localStorage.setItem(LocalStore.ACTIVE_THEME,JSON.stringify(i))},removeCachedTheme=()=>{localStorageAvailable()&&window.localStorage.removeItem(LocalStore.ACTIVE_THEME)},getHostSpecifiedThemeOnly=()=>isLightThemeInQueryParams()?getMergedLightTheme():isDarkThemeInQueryParams()?getMergedDarkTheme():null,getHostSpecifiedTheme=()=>getHostSpecifiedThemeOnly()??createAutoTheme(),getDefaultTheme=()=>{const n=getCachedTheme();return n&&n.name!==AUTO_THEME_NAME?n:getHostSpecifiedTheme()},whiteSpace=/\s+/;function computeSpacingStyle(n,i){return n===""?"":n.split(whiteSpace).map(e=>e==="0"?i.spacing.none:e in i.spacing?i.spacing[e]:(LOG$h.error(`Invalid spacing value: ${e}`),i.spacing.none)).join(" ")}function addCssUnit(n,i){return`${n}${i}`}function roundToTwoDecimals(n){return parseFloat(n.toFixed(2))}function blend(n,i){if(i===void 0)return n;const[e,t,o,d]=parseToRgba(n);if(d===1)return n;const[p,h,y,$]=parseToRgba(i),E=d+$*(1-d),M=Math.round((d*e+$*p*(1-d))/E),H=Math.round((d*t+$*h*(1-d))/E),Z=Math.round((d*o+$*y*(1-d))/E);return toHex(`rgba(${M}, ${H}, ${Z}, ${E})`)}const getFocusBoxShadow=(n,i=.5,e="0.2rem")=>`0 0 0 ${e} ${transparentize(n,i)}`,getPrimaryFocusBoxShadow=n=>getFocusBoxShadow(n.colors.primary),convertRemToPx=n=>parseFloat(n.replace(/rem$/,""))*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),skipProtobufDefaults=(n,i)=>{if(i===""||i===null||Array.isArray(i)&&i.length===0)return n},handleSectionInheritance=(n,i)=>{const e=i==="light",t=e?CustomThemeConfig.BaseTheme.LIGHT:CustomThemeConfig.BaseTheme.DARK,{light:o,dark:d,sidebar:p,...h}=n,y=e?o:d,{sidebar:$,...E}=y||{},M=mergeWith({},h,E,{base:t},skipProtobufDefaults);return(p||$)&&(M.sidebar=mergeWith({},p,$,skipProtobufDefaults)),M},hasThemeSectionConfigs=n=>{if(!n)return!1;const i=e=>e==null?!1:Array.isArray(e)?e.length>0:typeof e=="object"?Object.values(e).some(i):!0;return Object.values(n).some(i)},createCustomThemes=n=>{const i=hasThemeSectionConfigs(n.light),e=hasThemeSectionConfigs(n.dark),t=[];if(i||e){const o=handleSectionInheritance(n,"light"),d={...createTheme(CUSTOM_THEME_LIGHT_NAME,o),displayName:"Light"},p=handleSectionInheritance(n,"dark"),h={...createTheme(CUSTOM_THEME_DARK_NAME,p),displayName:"Dark"},$={...getSystemThemePreference()==="dark"?h:d,displayName:AUTO_THEME_NAME,name:CUSTOM_THEME_AUTO_NAME};t.push(d,h,$)}else{const o=createTheme(CUSTOM_THEME_NAME,n);t.push(o)}return t},setSidebarHeadingFontSizes=n=>merge$1([],["1.5rem","1.25rem","1.125rem","1rem","0.875rem","0.75rem"],n||[]),createSidebarTheme=n=>{const i=n.themeInput?.sidebar,{bgColor:e,secondaryBg:t}=n.emotion.colors,o=i?.backgroundColor||t,d=i?.secondaryBackgroundColor||e,p=setSidebarHeadingFontSizes(i?.headingFontSizes);let h=getLuminance(o)>.5?CustomThemeConfig.BaseTheme.LIGHT:CustomThemeConfig.BaseTheme.DARK;n.name===CUSTOM_THEME_LIGHT_NAME?h=CustomThemeConfig.BaseTheme.LIGHT:n.name===CUSTOM_THEME_DARK_NAME&&(h=CustomThemeConfig.BaseTheme.DARK);const y=mergeWith({},n.themeInput,i,{base:h,backgroundColor:o,secondaryBackgroundColor:d,headingFontSizes:p},skipProtobufDefaults);return createTheme("Sidebar",y,void 0,!0)},THEME_MAPPING={[lightTheme.name]:CUSTOM_THEME_LIGHT_NAME,[darkTheme.name]:CUSTOM_THEME_DARK_NAME,[CUSTOM_THEME_LIGHT_NAME]:lightTheme.name,[CUSTOM_THEME_DARK_NAME]:darkTheme.name},mapCachedThemeToAvailableTheme=(n,i)=>{if(!n)return null;const e=i.find(o=>o.name===n.name);if(e)return e;const t=THEME_MAPPING[n.name];return t?i.find(o=>o.name===t)??null:null},isPositiveNumber=n=>typeof n=="number"&&n>=0&&!isNaN(n),isNonZeroPositiveNumber=n=>typeof n=="number"&&n>0&&!isNaN(n),getWidth=(n,i)=>{if(i?.useContainerWidth)return{type:"stretch"};const e=n.widthConfig?.useStretch||i?.widthConfig?.useStretch,t=n?.widthConfig?.useContent||i?.widthConfig?.useContent,o=n?.widthConfig?.pixelWidth||i?.widthConfig?.pixelWidth||n.widthConfig?.pixelWidth===0,d=n.widthConfig?.remWidth;return e?{type:"stretch"}:t?{type:"content"}:d&&isPositiveNumber(n.widthConfig?.remWidth)?{type:"rem",rem:n.widthConfig.remWidth}:o&&isPositiveNumber(n.widthConfig?.pixelWidth)?{type:"pixel",pixels:n.widthConfig.pixelWidth}:o&&isPositiveNumber(i?.widthConfig?.pixelWidth)?{type:"pixel",pixels:i.widthConfig.pixelWidth}:isNonZeroPositiveNumber(i?.width)&&!n.widthConfig?{type:"pixel",pixels:i.width}:{type:"auto"}},getHeight=(n,i)=>{const e=!!n.heightConfig?.useStretch,t=!!n.heightConfig?.useContent,o=!!n.heightConfig?.pixelHeight||n.heightConfig?.pixelHeight===0,d=n.heightConfig?.remHeight;return e?{type:"stretch"}:t?{type:"content"}:d&&isPositiveNumber(n.heightConfig?.remHeight)?{type:"rem",rem:n.heightConfig.remHeight}:o&&isPositiveNumber(n.heightConfig?.pixelHeight)?{type:"pixel",pixels:n.heightConfig.pixelHeight}:isNonZeroPositiveNumber(i?.height)&&!n.heightConfig?{type:"pixel",pixels:i.height}:{type:"auto"}},getFlex=(n,i,e,t)=>{if(e===Direction.HORIZONTAL)switch(n.type){case"pixel":return`0 0 ${n.pixels}px`;case"rem":return`0 0 ${n.rem}rem`;case"content":return"0 0 fit-content";case"stretch":return`1 1 ${t??"fit-content"}`;case"auto":return;default:assertNever(n)}else if(e===Direction.VERTICAL)switch(i.type){case"pixel":return`0 0 ${i.pixels}px`;case"rem":return`0 0 ${i.rem}rem`;case"content":case"stretch":case"auto":return;default:assertNever(i)}},getDirection=n=>n?.direction,calculateMinWidthWithParentConstraint=(n,i,e=32)=>{if(i===void 0||n===void 0||n==="fit-content")return n;const t=convertRemToPx(n);return i<t&&i>e?`${i-e}px`:n},useLayoutStyles=({element:n,subElement:i,styleOverrides:e,minStretchBehavior:t})=>{const o=reactExports.useContext(FlexContext);return reactExports.useMemo(()=>{if(!n)return{width:"auto",height:"auto",overflow:"visible"};const p=getWidth(n,i);let h,y;switch(p.type){case"stretch":h="100%";break;case"rem":h=`${p.rem}rem`;break;case"pixel":h=`${p.pixels}px`;break;case"content":h="fit-content";break;case"auto":h="auto";break;default:assertNever(p)}const $=getDirection(o);o?.isInContentWidthContainer&&p.type==="stretch"&&t!==void 0&&(y=calculateMinWidthWithParentConstraint(t,o?.parentWidth));const E=getHeight(n,i);let M,H="visible";switch(E.type){case"stretch":M="100%";break;case"content":M="auto";break;case"rem":M=`${E.rem}rem`;break;case"pixel":M=`${E.pixels}px`,H="auto";break;case"auto":M="auto";break;default:assertNever(E)}const Z=getFlex(p,E,$,t),be=getTextAlignmentStyle("textAlignmentConfig"in n?n.textAlignmentConfig:void 0);return{...{width:h,height:M,overflow:H,flex:Z,minWidth:y,textAlign:be},...e}},[n,i,e,o,t])};var ScriptRunState=(function(n){return n.NOT_RUNNING="notRunning",n.RUNNING="running",n.RERUN_REQUESTED="rerunRequested",n.STOP_REQUESTED="stopRequested",n.COMPILATION_ERROR="compilationError",n})({});const ScriptRunContext=reactExports.createContext({scriptRunState:ScriptRunState.NOT_RUNNING,scriptRunId:"<null>",fragmentIdsThisRun:[]});ScriptRunContext.displayName="ScriptRunContext";var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$1(function(n){return reactPropsRegex.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function n(i){return i!=="theme"},getDefaultShouldForwardProp=function n(i){return typeof i=="string"&&i.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function n(i,e,t){var o;if(e){var d=e.shouldForwardProp;o=i.__emotion_forwardProp&&d?function(p){return i.__emotion_forwardProp(p)&&d(p)}:d}return typeof o!="function"&&t&&(o=i.__emotion_forwardProp),o},Insertion=function n(i){var e=i.cache,t=i.serialized,o=i.isStringTag;return registerStyles(e,t,o),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(e,t,o)}),null},createStyled=function n(i,e){var t=i.__emotion_real===i,o=t&&i.__emotion_base||i,d,p;e!==void 0&&(d=e.label,p=e.target);var h=composeShouldForwardProps(i,e,t),y=h||getDefaultShouldForwardProp(o),$=!y("as");return function(){var E=arguments,M=t&&i.__emotion_styles!==void 0?i.__emotion_styles.slice(0):[];if(d!==void 0&&M.push("label:"+d+";"),E[0]==null||E[0].raw===void 0)M.push.apply(M,E);else{var H=E[0];M.push(H[0]);for(var Z=E.length,be=1;be<Z;be++)M.push(E[be],H[be])}var ye=withEmotionCache(function(we,xe,Ce){var Ne=$&&we.as||o,Fe="",Me=[],Le=we;if(we.theme==null){Le={};for(var ze in we)Le[ze]=we[ze];Le.theme=reactExports.useContext(ThemeContext$2)}typeof we.className=="string"?Fe=getRegisteredStyles(xe.registered,Me,we.className):we.className!=null&&(Fe=we.className+" ");var Ke=serializeStyles(M.concat(Me),xe.registered,Le);Fe+=xe.key+"-"+Ke.name,p!==void 0&&(Fe+=" "+p);var Ve=$&&h===void 0?getDefaultShouldForwardProp(Ne):y,je={};for(var We in we)$&&We==="as"||Ve(We)&&(je[We]=we[We]);return je.className=Fe,Ce&&(je.ref=Ce),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:xe,serialized:Ke,isStringTag:typeof Ne=="string"}),reactExports.createElement(Ne,je))});return ye.displayName=d!==void 0?d:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",ye.defaultProps=i.defaultProps,ye.__emotion_real=ye,ye.__emotion_base=o,ye.__emotion_styles=M,ye.__emotion_forwardProp=h,Object.defineProperty(ye,"toString",{value:function(){return"."+p}}),ye.withComponent=function(we,xe){var Ce=n(we,_extends$A({},e,xe,{shouldForwardProp:composeShouldForwardProps(ye,xe,!0)}));return Ce.apply(void 0,M)},ye}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],styled=createStyled.bind(null);tags.forEach(function(n){styled[n]=styled(n)});var SIZE$3={medium:"medium"},spin={from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},StyledSpinner=styled$1("i",function(n){var i=n.$theme,e=n.$color,t=e===void 0?i.colors.contentAccent:e,o=n.$borderWidth,d=n.$size,p=d===void 0?SIZE$3.medium:d,h={large:i.sizing.scale300,medium:i.sizing.scale100,small:i.sizing.scale0}[o||p],y={large:i.sizing.scale1000,medium:i.sizing.scale900,small:i.sizing.scale800}[p];return h||(h=i.sizing[o],h||(h="".concat(parseInt(o),"px"))),y||(y=i.sizing[p],y||(y="".concat(parseInt(p),"px"))),{display:"block",animationName:spin,animationDuration:i.animation.timing1000,animationIterationCount:"infinite",animationTimingFunction:"linear",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderRadius:"50%",borderTopColor:t,borderRightColor:i.colors.backgroundTertiary,borderBottomColor:i.colors.backgroundTertiary,borderLeftColor:i.colors.backgroundTertiary,borderLeftWidth:h,borderRightWidth:h,borderTopWidth:h,borderBottomWidth:h,width:y,height:y,cursor:"wait"}});StyledSpinner.displayName="StyledSpinner";StyledSpinner.displayName="StyledSpinner";const StyledSpinnerIcon=styled(StyledSpinner,{shouldForwardProp:n=>isPropValid(n)&&!["size"].includes(n),target:"emntfgb0"})(({size:n="lg",margin:i="",padding:e="",theme:t})=>{const o=`calc(${t.iconSizes[n]} * 0.80)`;return{width:o,height:o,fontSize:o,justifyContent:"center",margin:computeSpacingStyle(i,t),padding:computeSpacingStyle(e,t),borderColor:t.colors.fadedText10,borderTopColor:t.colors.bodyText,borderWidth:t.sizes.spinnerThickness,flexGrow:0,flexShrink:0}}),StyledIcon=styled("span",{shouldForwardProp:n=>isPropValid(n)&&!["size","as"].includes(n),target:"emntfgb1"})(({color:n,size:i,margin:e,padding:t,theme:o})=>({color:n||"inherit",fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o.iconSizes[i],width:o.iconSizes[i],height:o.iconSizes[i],margin:computeSpacingStyle(e,o),padding:computeSpacingStyle(t,o),flexShrink:0})),StyledDynamicIcon=styled("span",{target:"emntfgb2"})(({size:n="lg",margin:i="",padding:e="",theme:t})=>({fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t.iconSizes[n],width:t.iconSizes[n],height:t.iconSizes[n],margin:computeSpacingStyle(i,t),padding:computeSpacingStyle(e,t),flexShrink:0})),StyledImageIcon=styled("img",{target:"emntfgb3"})({width:"100%",height:"100%"}),StyledEmojiIcon=styled("span",{target:"emntfgb4"})(({size:n,margin:i,padding:e,theme:t,color:o})=>{const d=`calc(${t.iconSizes[n]} * 0.90)`;return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:d,width:d,height:d,margin:computeSpacingStyle(i,t),padding:computeSpacingStyle(e,t),color:o}}),getDefaultProps$1=({size:n,margin:i,padding:e,color:t})=>({size:n||"md",margin:i||"",padding:e||"",color:t||void 0}),Icon$2=({content:n,color:i,size:e,margin:t,padding:o,testid:d})=>jsx$1(StyledIcon,{as:n,"aria-hidden":"true","data-testid":d,...getDefaultProps$1({size:e,margin:t,padding:o,color:i})}),EmojiIcon=({size:n,margin:i,padding:e,children:t,color:o,testid:d})=>(typeof t=="string"&&(t=t.replace(/^emoji:/,"")),jsx$1(StyledEmojiIcon,{"data-testid":d||"stIconEmoji","aria-hidden":"true",...getDefaultProps$1({size:n,margin:i,padding:e,color:o}),children:t})),StyledMaterialIcon=styled("span",{target:"exvv1vr0"})(({size:n,margin:i,padding:e,theme:t,color:o})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",color:o,fontSize:t.iconSizes[n],width:t.iconSizes[n],height:t.iconSizes[n],margin:computeSpacingStyle(i,t),padding:computeSpacingStyle(e,t),userSelect:"none",fontFamily:t.genericFonts.iconFont,fontWeight:t.fontWeights.normal,fontStyle:"normal",lineHeight:t.lineHeights.none,letterSpacing:"normal",textTransform:"none",whiteSpace:"nowrap",wordWrap:"normal",direction:"ltr",fontFeatureSettings:"liga",MozFontFeatureSettings:"liga",WebkitFontFeatureSettings:"liga",WebkitFontSmoothing:"antialiased"})),getDefaultProps=({size:n,margin:i,padding:e,color:t})=>({size:n||"md",margin:i||"",padding:e||"",color:t||"inherit"}),MaterialFontIcon=({iconName:n,...i})=>jsx$1(StyledMaterialIcon,{...getDefaultProps(i),"data-testid":i.testid||"stIconMaterial",translate:"no",children:n});function parseIconPackEntry(n){const i=n.match(/^:(.+)\/(.+):$/);if(i===null)return{pack:"emoji",icon:n};const e=i[1],t=i[2];return{pack:e,icon:t}}function isMaterialIcon(n){if(!n)return!1;const i=parseIconPackEntry(n);return i.pack==="material"&&i.icon!==""}function getFilledStarIconSrc(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg2MF84NDMpIj48cGF0aCBkPSJNOS45OTk5NCAxNC4zOTE2TDEzLjQ1ODMgMTYuNDgzM0MxNC4wOTE2IDE2Ljg2NjYgMTQuODY2NiAxNi4zIDE0LjY5OTkgMTUuNTgzM0wxMy43ODMzIDExLjY1TDE2Ljg0MTYgOC45OTk5N0MxNy4zOTk5IDguNTE2NjMgMTcuMDk5OSA3LjU5OTk3IDE2LjM2NjYgNy41NDE2M0wxMi4zNDE2IDcuMTk5OTdMMTAuNzY2NiAzLjQ4MzNDMTAuNDgzMyAyLjgwODMgOS41MTY2MSAyLjgwODMgOS4yMzMyNyAzLjQ4MzNMNy42NTgyNyA3LjE5MTYzTDMuNjMzMjcgNy41MzMzQzIuODk5OTQgNy41OTE2MyAyLjU5OTk0IDguNTA4MyAzLjE1ODI3IDguOTkxNjNMNi4yMTY2MSAxMS42NDE2TDUuMjk5OTQgMTUuNTc1QzUuMTMzMjcgMTYuMjkxNiA1LjkwODI3IDE2Ljg1ODMgNi41NDE2MSAxNi40NzVMOS45OTk5NCAxNC4zOTE2WiIgZmlsbD0iI0ZBQ0EyQiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzE4NjBfODQzIj48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+"}const DynamicIconDispatcher=({iconValue:n,...i})=>{if(n==="spinner")return jsx$1(StyledDynamicIcon,{...i,children:jsx$1(StyledSpinnerIcon,{"data-testid":i.testid||"stSpinnerIcon",...i})});const{pack:e,icon:t}=parseIconPackEntry(n);switch(e){case"material":switch(t){case"star_filled":return jsx$1(StyledDynamicIcon,{...i,children:jsx$1(StyledImageIcon,{src:getFilledStarIconSrc(),"data-testid":i.testid||"stImageIcon"})});default:return jsx$1(StyledDynamicIcon,{...i,children:jsx$1(MaterialFontIcon,{pack:e,iconName:t,...i})})}case"emoji":default:return jsx$1(StyledDynamicIcon,{...i,children:jsx$1(EmojiIcon,{...i,children:t})})}},DynamicIcon=n=>jsx$1(reactExports.Suspense,{fallback:jsx$1(StyledDynamicIcon,{...n,children:jsx$1(EmojiIcon,{...n,children:" "})}),children:jsx$1(DynamicIconDispatcher,{...n})},n.iconValue),LibConfigContext=reactExports.createContext({locale:window.navigator.language,mapboxToken:void 0,enforceDownloadInNewTab:void 0,resourceCrossOriginMode:void 0});LibConfigContext.displayName="LibConfigContext";var Pe=Object.defineProperty,a$1=(n,i)=>Pe(n,"name",{value:i,configurable:!0}),P=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(n,i,e,t,o,d){this.type=n,this.name=i,this.prefix=e,this.value=t,this.suffix=o,this.modifier=d}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};a$1(P,"Part");var Re=/[$_\p{ID_Start}]/u,Ee=/[$_\u200C\u200D\p{ID_Continue}]/u,v=".*";function Oe(n,i){return(i?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(n)}a$1(Oe,"isASCII");function D(n,i=!1){let e=[],t=0;for(;t<n.length;){let o=n[t],d=a$1(function(p){if(!i)throw new TypeError(p);e.push({type:"INVALID_CHAR",index:t,value:n[t++]})},"ErrorOrInvalid");if(o==="*"){e.push({type:"ASTERISK",index:t,value:n[t++]});continue}if(o==="+"||o==="?"){e.push({type:"OTHER_MODIFIER",index:t,value:n[t++]});continue}if(o==="\\"){e.push({type:"ESCAPED_CHAR",index:t++,value:n[t++]});continue}if(o==="{"){e.push({type:"OPEN",index:t,value:n[t++]});continue}if(o==="}"){e.push({type:"CLOSE",index:t,value:n[t++]});continue}if(o===":"){let p="",h=t+1;for(;h<n.length;){let y=n.substr(h,1);if(h===t+1&&Re.test(y)||h!==t+1&&Ee.test(y)){p+=n[h++];continue}break}if(!p){d(`Missing parameter name at ${t}`);continue}e.push({type:"NAME",index:t,value:p}),t=h;continue}if(o==="("){let p=1,h="",y=t+1,$=!1;if(n[y]==="?"){d(`Pattern cannot start with "?" at ${y}`);continue}for(;y<n.length;){if(!Oe(n[y],!1)){d(`Invalid character '${n[y]}' at ${y}.`),$=!0;break}if(n[y]==="\\"){h+=n[y++]+n[y++];continue}if(n[y]===")"){if(p--,p===0){y++;break}}else if(n[y]==="("&&(p++,n[y+1]!=="?")){d(`Capturing groups are not allowed at ${y}`),$=!0;break}h+=n[y++]}if($)continue;if(p){d(`Unbalanced pattern at ${t}`);continue}if(!h){d(`Missing pattern at ${t}`);continue}e.push({type:"REGEX",index:t,value:h}),t=y;continue}e.push({type:"CHAR",index:t,value:n[t++]})}return e.push({type:"END",index:t,value:""}),e}a$1(D,"lexer");function F(n,i={}){let e=D(n);i.delimiter??="/#?",i.prefixes??="./";let t=`[^${x(i.delimiter)}]+?`,o=[],d=0,p=0,h=new Set,y=a$1(Ce=>{if(p<e.length&&e[p].type===Ce)return e[p++].value},"tryConsume"),$=a$1(()=>y("OTHER_MODIFIER")??y("ASTERISK"),"tryConsumeModifier"),E=a$1(Ce=>{let Ne=y(Ce);if(Ne!==void 0)return Ne;let{type:Fe,index:Me}=e[p];throw new TypeError(`Unexpected ${Fe} at ${Me}, expected ${Ce}`)},"mustConsume"),M=a$1(()=>{let Ce="",Ne;for(;Ne=y("CHAR")??y("ESCAPED_CHAR");)Ce+=Ne;return Ce},"consumeText"),H=a$1(Ce=>Ce,"DefaultEncodePart"),Z=i.encodePart||H,be="",ye=a$1(Ce=>{be+=Ce},"appendToPendingFixedValue"),we=a$1(()=>{be.length&&(o.push(new P(3,"","",Z(be),"",3)),be="")},"maybeAddPartFromPendingFixedValue"),xe=a$1((Ce,Ne,Fe,Me,Le)=>{let ze=3;switch(Le){case"?":ze=1;break;case"*":ze=0;break;case"+":ze=2;break}if(!Ne&&!Fe&&ze===3){ye(Ce);return}if(we(),!Ne&&!Fe){if(!Ce)return;o.push(new P(3,"","",Z(Ce),"",ze));return}let Ke;Fe?Fe==="*"?Ke=v:Ke=Fe:Ke=t;let Ve=2;Ke===t?(Ve=1,Ke=""):Ke===v&&(Ve=0,Ke="");let je;if(Ne?je=Ne:Fe&&(je=d++),h.has(je))throw new TypeError(`Duplicate name '${je}'.`);h.add(je),o.push(new P(Ve,je,Z(Ce),Ke,Z(Me),ze))},"addPart");for(;p<e.length;){let Ce=y("CHAR"),Ne=y("NAME"),Fe=y("REGEX");if(!Ne&&!Fe&&(Fe=y("ASTERISK")),Ne||Fe){let Le=Ce??"";i.prefixes.indexOf(Le)===-1&&(ye(Le),Le=""),we();let ze=$();xe(Le,Ne,Fe,"",ze);continue}let Me=Ce??y("ESCAPED_CHAR");if(Me){ye(Me);continue}if(y("OPEN")){let Le=M(),ze=y("NAME"),Ke=y("REGEX");!ze&&!Ke&&(Ke=y("ASTERISK"));let Ve=M();E("CLOSE");let je=$();xe(Le,ze,Ke,Ve,je);continue}we(),E("END")}return o}a$1(F,"parse");function x(n){return n.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a$1(x,"escapeString");function B(n){return n&&n.ignoreCase?"ui":"u"}a$1(B,"flags");function q(n,i,e){return W(F(n,e),i,e)}a$1(q,"stringToRegexp");function T(n){switch(n){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}a$1(T,"modifierToString");function W(n,i,e={}){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let t=e.start?"^":"";for(let h of n){if(h.type===3){h.modifier===3?t+=x(h.value):t+=`(?:${x(h.value)})${T(h.modifier)}`;continue}i&&i.push(h.name);let y=`[^${x(e.delimiter)}]+?`,$=h.value;if(h.type===1?$=y:h.type===0&&($=v),!h.prefix.length&&!h.suffix.length){h.modifier===3||h.modifier===1?t+=`(${$})${T(h.modifier)}`:t+=`((?:${$})${T(h.modifier)})`;continue}if(h.modifier===3||h.modifier===1){t+=`(?:${x(h.prefix)}(${$})${x(h.suffix)})`,t+=T(h.modifier);continue}t+=`(?:${x(h.prefix)}`,t+=`((?:${$})(?:`,t+=x(h.suffix),t+=x(h.prefix),t+=`(?:${$}))*)${x(h.suffix)})`,h.modifier===0&&(t+="?")}let o=`[${x(e.endsWith)}]|$`,d=`[${x(e.delimiter)}]`;if(e.end)return e.strict||(t+=`${d}?`),e.endsWith.length?t+=`(?=${o})`:t+="$",new RegExp(t,B(e));e.strict||(t+=`(?:${d}(?=${o}))?`);let p=!1;if(n.length){let h=n[n.length-1];h.type===3&&h.modifier===3&&(p=e.delimiter.indexOf(h)>-1)}return p||(t+=`(?=${d}|${o})`),new RegExp(t,B(e))}a$1(W,"partsToRegexp");var b={delimiter:"",prefixes:"",sensitive:!0,strict:!0},J={delimiter:".",prefixes:"",sensitive:!0,strict:!0},Q={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ee(n,i){return n.length?n[0]==="/"?!0:!i||n.length<2?!1:(n[0]=="\\"||n[0]=="{")&&n[1]=="/":!1}a$1(ee,"isAbsolutePathname");function te(n,i){return n.startsWith(i)?n.substring(i.length,n.length):n}a$1(te,"maybeStripPrefix");function ke(n,i){return n.endsWith(i)?n.substr(0,n.length-i.length):n}a$1(ke,"maybeStripSuffix");function _$1(n){return!n||n.length<2?!1:n[0]==="["||(n[0]==="\\"||n[0]==="{")&&n[1]==="["}a$1(_$1,"treatAsIPv6Hostname");var re$1=["ftp","file","http","https","ws","wss"];function U(n){if(!n)return!0;for(let i of re$1)if(n.test(i))return!0;return!1}a$1(U,"isSpecialScheme");function ne(n,i){if(n=te(n,"#"),i||n==="")return n;let e=new URL("https://example.com");return e.hash=n,e.hash?e.hash.substring(1,e.hash.length):""}a$1(ne,"canonicalizeHash");function se(n,i){if(n=te(n,"?"),i||n==="")return n;let e=new URL("https://example.com");return e.search=n,e.search?e.search.substring(1,e.search.length):""}a$1(se,"canonicalizeSearch");function ie(n,i){return i||n===""?n:_$1(n)?K(n):j(n)}a$1(ie,"canonicalizeHostname");function ae(n,i){if(i||n==="")return n;let e=new URL("https://example.com");return e.password=n,e.password}a$1(ae,"canonicalizePassword");function oe(n,i){if(i||n==="")return n;let e=new URL("https://example.com");return e.username=n,e.username}a$1(oe,"canonicalizeUsername");function ce(n,i,e){if(e||n==="")return n;if(i&&!re$1.includes(i))return new URL(`${i}:${n}`).pathname;let t=n[0]=="/";return n=new URL(t?n:"/-"+n,"https://example.com").pathname,t||(n=n.substring(2,n.length)),n}a$1(ce,"canonicalizePathname");function le(n,i,e){return z(i)===n&&(n=""),e||n===""?n:G(n)}a$1(le,"canonicalizePort");function fe(n,i){return n=ke(n,":"),i||n===""?n:w(n)}a$1(fe,"canonicalizeProtocol");function z(n){switch(n){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}a$1(z,"defaultPortForProtocol");function w(n){if(n==="")return n;if(/^[-+.A-Za-z0-9]*$/.test(n))return n.toLowerCase();throw new TypeError(`Invalid protocol '${n}'.`)}a$1(w,"protocolEncodeCallback");function he(n){if(n==="")return n;let i=new URL("https://example.com");return i.username=n,i.username}a$1(he,"usernameEncodeCallback");function ue(n){if(n==="")return n;let i=new URL("https://example.com");return i.password=n,i.password}a$1(ue,"passwordEncodeCallback");function j(n){if(n==="")return n;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(n))throw new TypeError(`Invalid hostname '${n}'`);let i=new URL("https://example.com");return i.hostname=n,i.hostname}a$1(j,"hostnameEncodeCallback");function K(n){if(n==="")return n;if(/[^0-9a-fA-F[\]:]/g.test(n))throw new TypeError(`Invalid IPv6 hostname '${n}'`);return n.toLowerCase()}a$1(K,"ipv6HostnameEncodeCallback");function G(n){if(n===""||/^[0-9]*$/.test(n)&&parseInt(n)<=65535)return n;throw new TypeError(`Invalid port '${n}'.`)}a$1(G,"portEncodeCallback");function de(n){if(n==="")return n;let i=new URL("https://example.com");return i.pathname=n[0]!=="/"?"/-"+n:n,n[0]!=="/"?i.pathname.substring(2,i.pathname.length):i.pathname}a$1(de,"standardURLPathnameEncodeCallback");function pe(n){return n===""?n:new URL(`data:${n}`).pathname}a$1(pe,"pathURLPathnameEncodeCallback");function ge(n){if(n==="")return n;let i=new URL("https://example.com");return i.search=n,i.search.substring(1,i.search.length)}a$1(ge,"searchEncodeCallback");function me(n){if(n==="")return n;let i=new URL("https://example.com");return i.hash=n,i.hash.substring(1,i.hash.length)}a$1(me,"hashEncodeCallback");var C=class{#o;#r=[];#t={};#e=0;#i=1;#u=0;#l=0;#p=0;#h=0;#y=!1;constructor(n){this.#o=n}get result(){return this.#t}parse(){for(this.#r=D(this.#o,!0);this.#e<this.#r.length;this.#e+=this.#i){if(this.#i=1,this.#r[this.#e].type==="END"){if(this.#l===0){this.#v(),this.#c()?this.#n(9,1):this.#d()?this.#n(8,1):this.#n(7,0);continue}else if(this.#l===2){this.#f(5);continue}this.#n(10,0);break}if(this.#p>0)if(this.#x())this.#p-=1;else continue;if(this.#T()){this.#p+=1;continue}switch(this.#l){case 0:this.#S()&&this.#f(1);break;case 1:if(this.#S()){this.#E();let n=7,i=1;this.#w()?(n=2,i=3):this.#y&&(n=2),this.#n(n,i)}break;case 2:this.#m()?this.#f(3):(this.#b()||this.#d()||this.#c())&&this.#f(5);break;case 3:this.#_()?this.#n(4,1):this.#m()&&this.#n(5,1);break;case 4:this.#m()&&this.#n(5,1);break;case 5:this.#C()?this.#h+=1:this.#k()&&(this.#h-=1),this.#$()&&!this.#h?this.#n(6,1):this.#b()?this.#n(7,0):this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 6:this.#b()?this.#n(7,0):this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 7:this.#d()?this.#n(8,1):this.#c()&&this.#n(9,1);break;case 8:this.#c()&&this.#n(9,1);break}}this.#t.hostname!==void 0&&this.#t.port===void 0&&(this.#t.port="")}#n(n,i){switch(this.#l){case 0:break;case 1:this.#t.protocol=this.#s();break;case 2:break;case 3:this.#t.username=this.#s();break;case 4:this.#t.password=this.#s();break;case 5:this.#t.hostname=this.#s();break;case 6:this.#t.port=this.#s();break;case 7:this.#t.pathname=this.#s();break;case 8:this.#t.search=this.#s();break;case 9:this.#t.hash=this.#s();break}this.#l!==0&&n!==10&&([1,2,3,4].includes(this.#l)&&[6,7,8,9].includes(n)&&(this.#t.hostname??=""),[1,2,3,4,5,6].includes(this.#l)&&[8,9].includes(n)&&(this.#t.pathname??=this.#y?"/":""),[1,2,3,4,5,6,7].includes(this.#l)&&n===9&&(this.#t.search??="")),this.#O(n,i)}#O(n,i){this.#l=n,this.#u=this.#e+i,this.#e+=i,this.#i=0}#v(){this.#e=this.#u,this.#i=0}#f(n){this.#v(),this.#l=n}#g(n){return n<0&&(n=this.#r.length-n),n<this.#r.length?this.#r[n]:this.#r[this.#r.length-1]}#a(n,i){let e=this.#g(n);return e.value===i&&(e.type==="CHAR"||e.type==="ESCAPED_CHAR"||e.type==="INVALID_CHAR")}#S(){return this.#a(this.#e,":")}#w(){return this.#a(this.#e+1,"/")&&this.#a(this.#e+2,"/")}#m(){return this.#a(this.#e,"@")}#_(){return this.#a(this.#e,":")}#$(){return this.#a(this.#e,":")}#b(){return this.#a(this.#e,"/")}#d(){if(this.#a(this.#e,"?"))return!0;if(this.#r[this.#e].value!=="?")return!1;let n=this.#g(this.#e-1);return n.type!=="NAME"&&n.type!=="REGEX"&&n.type!=="CLOSE"&&n.type!=="ASTERISK"}#c(){return this.#a(this.#e,"#")}#T(){return this.#r[this.#e].type=="OPEN"}#x(){return this.#r[this.#e].type=="CLOSE"}#C(){return this.#a(this.#e,"[")}#k(){return this.#a(this.#e,"]")}#s(){let n=this.#r[this.#e],i=this.#g(this.#u).index;return this.#o.substring(i,n.index)}#E(){let n={};Object.assign(n,b),n.encodePart=w;let i=q(this.#s(),void 0,n);this.#y=U(i)}};a$1(C,"Parser");var V=["protocol","username","password","hostname","port","pathname","search","hash"],O="*";function Se(n,i){if(typeof n!="string")throw new TypeError("parameter 1 is not of type 'string'.");let e=new URL(n,i);return{protocol:e.protocol.substring(0,e.protocol.length-1),username:e.username,password:e.password,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search!==""?e.search.substring(1,e.search.length):void 0,hash:e.hash!==""?e.hash.substring(1,e.hash.length):void 0}}a$1(Se,"extractValues");function R$1(n,i){return i?I(n):n}a$1(R$1,"processBaseURLString");function L$1(n,i,e){let t;if(typeof i.baseURL=="string")try{t=new URL(i.baseURL),i.protocol===void 0&&(n.protocol=R$1(t.protocol.substring(0,t.protocol.length-1),e)),!e&&i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.username===void 0&&(n.username=R$1(t.username,e)),!e&&i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.username===void 0&&i.password===void 0&&(n.password=R$1(t.password,e)),i.protocol===void 0&&i.hostname===void 0&&(n.hostname=R$1(t.hostname,e)),i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&(n.port=R$1(t.port,e)),i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.pathname===void 0&&(n.pathname=R$1(t.pathname,e)),i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.pathname===void 0&&i.search===void 0&&(n.search=R$1(t.search.substring(1,t.search.length),e)),i.protocol===void 0&&i.hostname===void 0&&i.port===void 0&&i.pathname===void 0&&i.search===void 0&&i.hash===void 0&&(n.hash=R$1(t.hash.substring(1,t.hash.length),e))}catch{throw new TypeError(`invalid baseURL '${i.baseURL}'.`)}if(typeof i.protocol=="string"&&(n.protocol=fe(i.protocol,e)),typeof i.username=="string"&&(n.username=oe(i.username,e)),typeof i.password=="string"&&(n.password=ae(i.password,e)),typeof i.hostname=="string"&&(n.hostname=ie(i.hostname,e)),typeof i.port=="string"&&(n.port=le(i.port,n.protocol,e)),typeof i.pathname=="string"){if(n.pathname=i.pathname,t&&!ee(n.pathname,e)){let o=t.pathname.lastIndexOf("/");o>=0&&(n.pathname=R$1(t.pathname.substring(0,o+1),e)+n.pathname)}n.pathname=ce(n.pathname,n.protocol,e)}return typeof i.search=="string"&&(n.search=se(i.search,e)),typeof i.hash=="string"&&(n.hash=ne(i.hash,e)),n}a$1(L$1,"applyInit");function I(n){return n.replace(/([+*?:{}()\\])/g,"\\$1")}a$1(I,"escapePatternString");function Te(n){return n.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a$1(Te,"escapeRegexpString");function Ae(n,i){i.delimiter??="/#?",i.prefixes??="./",i.sensitive??=!1,i.strict??=!1,i.end??=!0,i.start??=!0,i.endsWith="";let e=".*",t=`[^${Te(i.delimiter)}]+?`,o=/[$_\u200C\u200D\p{ID_Continue}]/u,d="";for(let p=0;p<n.length;++p){let h=n[p];if(h.type===3){if(h.modifier===3){d+=I(h.value);continue}d+=`{${I(h.value)}}${T(h.modifier)}`;continue}let y=h.hasCustomName(),$=!!h.suffix.length||!!h.prefix.length&&(h.prefix.length!==1||!i.prefixes.includes(h.prefix)),E=p>0?n[p-1]:null,M=p<n.length-1?n[p+1]:null;if(!$&&y&&h.type===1&&h.modifier===3&&M&&!M.prefix.length&&!M.suffix.length)if(M.type===3){let H=M.value.length>0?M.value[0]:"";$=o.test(H)}else $=!M.hasCustomName();if(!$&&!h.prefix.length&&E&&E.type===3){let H=E.value[E.value.length-1];$=i.prefixes.includes(H)}$&&(d+="{"),d+=I(h.prefix),y&&(d+=`:${h.name}`),h.type===2?d+=`(${h.value})`:h.type===1?y||(d+=`(${t})`):h.type===0&&(!y&&(!E||E.type===3||E.modifier!==3||$||h.prefix!=="")?d+="*":d+=`(${e})`),h.type===1&&y&&h.suffix.length&&o.test(h.suffix[0])&&(d+="\\"),d+=I(h.suffix),$&&(d+="}"),h.modifier!==3&&(d+=T(h.modifier))}return d}a$1(Ae,"partsToPattern");var Y=class{#o;#r={};#t={};#e={};#i={};#u=!1;constructor(n={},i,e){try{let t;if(typeof i=="string"?t=i:e=i,typeof n=="string"){let h=new C(n);if(h.parse(),n=h.result,t===void 0&&typeof n.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");n.baseURL=t}else{if(!n||typeof n!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(t)throw new TypeError("parameter 1 is not of type 'string'.")}typeof e>"u"&&(e={ignoreCase:!1});let o={ignoreCase:e.ignoreCase===!0},d={pathname:O,protocol:O,username:O,password:O,hostname:O,port:O,search:O,hash:O};this.#o=L$1(d,n,!0),z(this.#o.protocol)===this.#o.port&&(this.#o.port="");let p;for(p of V){if(!(p in this.#o))continue;let h={},y=this.#o[p];switch(this.#t[p]=[],p){case"protocol":Object.assign(h,b),h.encodePart=w;break;case"username":Object.assign(h,b),h.encodePart=he;break;case"password":Object.assign(h,b),h.encodePart=ue;break;case"hostname":Object.assign(h,J),_$1(y)?h.encodePart=K:h.encodePart=j;break;case"port":Object.assign(h,b),h.encodePart=G;break;case"pathname":U(this.#r.protocol)?(Object.assign(h,Q,o),h.encodePart=de):(Object.assign(h,b,o),h.encodePart=pe);break;case"search":Object.assign(h,b,o),h.encodePart=ge;break;case"hash":Object.assign(h,b,o),h.encodePart=me;break}try{this.#i[p]=F(y,h),this.#r[p]=W(this.#i[p],this.#t[p],h),this.#e[p]=Ae(this.#i[p],h),this.#u=this.#u||this.#i[p].some($=>$.type===2)}catch{throw new TypeError(`invalid ${p} pattern '${this.#o[p]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(n={},i){let e={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof n!="string"&&i)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof n>"u")return!1;try{typeof n=="object"?e=L$1(e,n,!1):e=L$1(e,Se(n,i),!1)}catch{return!1}let t;for(t of V)if(!this.#r[t].exec(e[t]))return!1;return!0}exec(n={},i){let e={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof n!="string"&&i)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof n>"u")return;try{typeof n=="object"?e=L$1(e,n,!1):e=L$1(e,Se(n,i),!1)}catch{return null}let t={};i?t.inputs=[n,i]:t.inputs=[n];let o;for(o of V){let d=this.#r[o].exec(e[o]);if(!d)return null;let p={};for(let[h,y]of this.#t[o].entries())if(typeof y=="string"||typeof y=="number"){let $=d[h+1];p[y]=$}t[o]={input:e[o]??"",groups:p}}return t}static compareComponent(n,i,e){let t=a$1((h,y)=>{for(let $ of["type","modifier","prefix","value","suffix"]){if(h[$]<y[$])return-1;if(h[$]!==y[$])return 1}return 0},"comparePart"),o=new P(3,"","","","",3),d=new P(0,"","","","",3),p=a$1((h,y)=>{let $=0;for(;$<Math.min(h.length,y.length);++$){let E=t(h[$],y[$]);if(E)return E}return h.length===y.length?0:t(h[$]??o,y[$]??o)},"comparePartList");return!i.#e[n]&&!e.#e[n]?0:i.#e[n]&&!e.#e[n]?p(i.#i[n],[d]):!i.#e[n]&&e.#e[n]?p([d],e.#i[n]):p(i.#i[n],e.#i[n])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#u}};a$1(Y,"URLPattern");globalThis.URLPattern||(globalThis.URLPattern=Y);function isValidOrigin(n,i){let e,t,o;try{e=new URLPattern(n),t=new URLPattern({protocol:e.protocol,hostname:e.hostname}),o=new URL(i)}catch{return!1}return o.hostname==="localhost"&&t.test(o)?!0:e.test(o)}function getCrossOriginAttribute(n,i){if(i)try{const e=new URL(i);return StreamlitConfig.BACKEND_BASE_URL&&e.origin===new URL(StreamlitConfig.BACKEND_BASE_URL).origin?n:void 0}catch{return StreamlitConfig.BACKEND_BASE_URL?n:void 0}}const useCrossOriginAttribute=n=>{const{resourceCrossOriginMode:i}=reactExports.useContext(LibConfigContext);if(n)return getCrossOriginAttribute(i,n)},useEmotionTheme=()=>useTheme(),StyledChatMessageContainer=styled("div",{target:"e9vv8y20"})(({theme:n,background:i})=>{const e=hasLightBackgroundColor(n);return{width:"100%",display:"flex",alignItems:"flex-start",gap:n.spacing.sm,padding:n.spacing.lg,paddingRight:i?n.spacing.lg:0,borderRadius:n.radii.default,...i?{backgroundColor:transparentize(e?n.colors.gray20:n.colors.gray90,.5)}:{}}}),StyledMessageContent=styled("div",{target:"e9vv8y21"})(({theme:n})=>({color:n.colors.bodyText,margin:"auto",flexGrow:1,minWidth:0})),StyledAvatarBackground=styled("div",{target:"e9vv8y22"})(({theme:n})=>{const i=hasLightBackgroundColor(n);return{display:"flex",border:`${n.sizes.borderWidth} solid ${i?n.colors.gray40:n.colors.gray85}`,backgroundColor:i?n.colors.white:n.colors.gray100,color:i?n.colors.gray90:n.colors.white,lineHeight:n.lineHeights.none,fontSize:n.fontSizes.md,flexShrink:0,width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,borderRadius:n.radii.default,alignItems:"center",justifyContent:"center"}}),StyledAvatarIcon=styled("div",{target:"e9vv8y23"})(({theme:n,background:i})=>{const e=hasLightBackgroundColor(n);return{display:"flex",width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,flexShrink:0,borderRadius:n.radii.default,alignItems:"center",justifyContent:"center",backgroundColor:i,color:e?n.colors.white:n.colors.gray100}}),StyledAvatarImage=styled("img",{target:"e9vv8y24"})(({theme:n})=>({width:n.sizes.chatAvatarSize,height:n.sizes.chatAvatarSize,flexShrink:0,borderRadius:n.radii.default,objectFit:"cover",display:"flex"}));function ChatMessageAvatar(n){const{avatar:i,avatarType:e,name:t,endpoints:o}=n,d=useEmotionTheme(),p=useCrossOriginAttribute(i);if(i)switch(e){case void 0:break;case Block$1.ChatMessage.AvatarType.IMAGE:return jsx$1(StyledAvatarImage,{src:o.buildMediaURL(i),alt:`${t} avatar`,crossOrigin:p});case Block$1.ChatMessage.AvatarType.EMOJI:return jsx$1(StyledAvatarBackground,{children:i});case Block$1.ChatMessage.AvatarType.ICON:if(i==="user")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarUser",background:d.colors.redColor,children:jsx$1(DynamicIcon,{size:"lg",iconValue:":material/face:"})});if(i==="assistant")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarAssistant",background:d.colors.orangeColor,children:jsx$1(DynamicIcon,{size:"lg",iconValue:":material/smart_toy:"})});if(i.startsWith(":material"))return jsx$1(StyledAvatarBackground,{"data-testid":"stChatMessageAvatarCustom",children:jsx$1(DynamicIcon,{size:"lg",iconValue:i,color:d.colors.bodyText})})}return jsx$1(StyledAvatarBackground,{children:t?t.charAt(0).toUpperCase():"🧑💻"})}const ChatMessage=({endpoints:n,element:i,children:e})=>{const{avatar:t,avatarType:o,name:d}=i;return jsxs(StyledChatMessageContainer,{className:"stChatMessage","data-testid":"stChatMessage",background:["user","human"].includes(d.toLowerCase()),children:[jsx$1(ChatMessageAvatar,{name:d,avatar:t,avatarType:o,endpoints:n}),jsx$1(StyledMessageContent,{"data-testid":"stChatMessageContent","aria-label":`Chat message from ${d}`,children:e})]})},ChatMessage$1=reactExports.memo(ChatMessage),IsDialogContext=reactExports.createContext(!1);IsDialogContext.displayName="IsDialogContext";function _objectWithoutPropertiesLoose$p(n,i){if(n==null)return{};var e={};for(var t in n)if({}.hasOwnProperty.call(n,t)){if(i.indexOf(t)!==-1)continue;e[t]=n[t]}return e}var propTypes={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=n,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var n=requireReactPropTypesSecret();function i(){}function e(){}return e.resetWarningCache=i,factoryWithThrowingShims=function(){function t(p,h,y,$,E,M){if(M!==n){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}}t.isRequired=t;function o(){return t}var d={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:o,element:t,elementType:t,instanceOf:o,node:t,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:e,resetWarningCache:i};return d.PropTypes=d,d},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes.exports=requireFactoryWithThrowingShims()()),propTypes.exports}var propTypesExports=requirePropTypes();const PropTypes=getDefaultExportFromCjs(propTypesExports);var FOCUS_GROUP="data-focus-lock",FOCUS_DISABLED="data-focus-lock-disabled",FOCUS_ALLOW="data-no-focus-lock",FOCUS_AUTO="data-autofocus-inside",FOCUS_NO_AUTOFOCUS="data-no-autofocus";function assignRef(n,i){return typeof n=="function"?n(i):n&&(n.current=i),n}function useCallbackRef(n,i){var e=reactExports.useState(function(){return{value:n,callback:i,facade:{get current(){return e.value},set current(t){var o=e.value;o!==t&&(e.value=t,e.callback(t,o))}}}})[0];return e.callback=i,e.facade}var useIsomorphicLayoutEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,currentValues=new WeakMap;function useMergeRefs(n,i){var e=useCallbackRef(null,function(t){return n.forEach(function(o){return assignRef(o,t)})});return useIsomorphicLayoutEffect(function(){var t=currentValues.get(e);if(t){var o=new Set(t),d=new Set(n),p=e.current;o.forEach(function(h){d.has(h)||assignRef(h,null)}),d.forEach(function(h){o.has(h)||assignRef(h,p)})}currentValues.set(e,n)},[n]),e}var hiddenGuard={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function ItoI(n){return n}function innerCreateMedium(n,i){i===void 0&&(i=ItoI);var e=[],t=!1,o={read:function(){if(t)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return e.length?e[e.length-1]:n},useMedium:function(d){var p=i(d,t);return e.push(p),function(){e=e.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(t=!0;e.length;){var p=e;e=[],p.forEach(d)}e={push:function(h){return d(h)},filter:function(){return e}}},assignMedium:function(d){t=!0;var p=[];if(e.length){var h=e;e=[],h.forEach(d),p=e}var y=function(){var E=p;p=[],E.forEach(d)},$=function(){return Promise.resolve().then(y)};$(),e={push:function(E){p.push(E),$()},filter:function(E){return p=p.filter(E),e}}}};return o}function createMedium(n,i){return i===void 0&&(i=ItoI),innerCreateMedium(n,i)}function createSidecarMedium(n){n===void 0&&(n={});var i=innerCreateMedium(null);return i.options=__assign$2({async:!0,ssr:!1},n),i}var mediumFocus=createMedium({},function(n){var i=n.target,e=n.currentTarget;return{target:i,currentTarget:e}}),mediumBlur=createMedium(),mediumEffect=createMedium(),mediumSidecar=createSidecarMedium({async:!0,ssr:typeof document<"u"}),focusScope=reactExports.createContext(void 0),emptyArray=[],FocusLock=reactExports.forwardRef(function n(i,e){var t,o=reactExports.useState(),d=o[0],p=o[1],h=reactExports.useRef(),y=reactExports.useRef(!1),$=reactExports.useRef(null),E=reactExports.useState({}),M=E[1],H=i.children,Z=i.disabled,be=Z===void 0?!1:Z,ye=i.noFocusGuards,we=ye===void 0?!1:ye,xe=i.persistentFocus,Ce=xe===void 0?!1:xe,Ne=i.crossFrame,Fe=Ne===void 0?!0:Ne,Me=i.autoFocus,Le=Me===void 0?!0:Me;i.allowTextSelection;var ze=i.group,Ke=i.className,Ve=i.whiteList,je=i.hasPositiveIndices,We=i.shards,Xe=We===void 0?emptyArray:We,Qe=i.as,Ye=Qe===void 0?"div":Qe,Ue=i.lockProps,ot=Ue===void 0?{}:Ue,dt=i.sideCar,st=i.returnFocus,pt=st===void 0?!1:st,Be=i.focusOptions,qe=i.onActivation,rt=i.onDeactivation,He=reactExports.useState({}),Ot=He[0],Ct=reactExports.useCallback(function(Yt){var zt=Yt.captureFocusRestore;if(!$.current){var nn,Ut=(nn=document)==null?void 0:nn.activeElement;$.current=Ut,Ut!==document.body&&($.current=zt(Ut))}h.current&&qe&&qe(h.current),y.current=!0,M()},[qe]),tt=reactExports.useCallback(function(){y.current=!1,rt&&rt(h.current),M()},[rt]),wt=reactExports.useCallback(function(Yt){var zt=$.current;if(zt){var nn=(typeof zt=="function"?zt():zt)||document.body,Ut=typeof pt=="function"?pt(nn):pt;if(Ut){var Zt=typeof Ut=="object"?Ut:void 0;$.current=null,Yt?Promise.resolve().then(function(){return nn.focus(Zt)}):nn.focus(Zt)}}},[pt]),gt=reactExports.useCallback(function(Yt){y.current&&mediumFocus.useMedium(Yt)},[]),$t=mediumBlur.useMedium,Mt=reactExports.useCallback(function(Yt){h.current!==Yt&&(h.current=Yt,p(Yt))},[]),qt=_extends$A((t={},t[FOCUS_DISABLED]=be&&"disabled",t[FOCUS_GROUP]=ze,t),ot),cn=we!==!0,en=cn&&we!=="tail",Wt=useMergeRefs([e,Mt]),dn=reactExports.useMemo(function(){return{observed:h,shards:Xe,enabled:!be,active:y.current}},[be,y.current,Xe,d]);return reactExports.createElement(reactExports.Fragment,null,cn&&[reactExports.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:be?-1:0,style:hiddenGuard}),je?reactExports.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:be?-1:1,style:hiddenGuard}):null],!be&&reactExports.createElement(dt,{id:Ot,sideCar:mediumSidecar,observed:d,disabled:be,persistentFocus:Ce,crossFrame:Fe,autoFocus:Le,whiteList:Ve,shards:Xe,onActivation:Ct,onDeactivation:tt,returnFocus:wt,focusOptions:Be,noFocusGuards:we}),reactExports.createElement(Ye,_extends$A({ref:Wt},qt,{className:Ke,onBlur:$t,onFocus:gt}),reactExports.createElement(focusScope.Provider,{value:dn},H)),en&&reactExports.createElement("div",{"data-focus-guard":!0,tabIndex:be?-1:0,style:hiddenGuard}))});FocusLock.propTypes={};function _setPrototypeOf$d(n,i){return _setPrototypeOf$d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf$d(n,i)}function _inheritsLoose(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,_setPrototypeOf$d(n,i)}function _typeof$e(n){"@babel/helpers - typeof";return _typeof$e=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$e(n)}function toPrimitive(n,i){if(_typeof$e(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,i);if(_typeof$e(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}function toPropertyKey(n){var i=toPrimitive(n,"string");return _typeof$e(i)=="symbol"?i:i+""}function _defineProperty$s(n,i,e){return(i=toPropertyKey(i))in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function withSideEffect(n,i){function e(t){return t.displayName||t.name||"Component"}return function(o){var d=[],p;function h(){p=n(d.map(function($){return $.props})),i(p)}var y=(function($){_inheritsLoose(E,$);function E(){return $.apply(this,arguments)||this}E.peek=function(){return p};var M=E.prototype;return M.componentDidMount=function(){d.push(this),h()},M.componentDidUpdate=function(){h()},M.componentWillUnmount=function(){var Z=d.indexOf(this);d.splice(Z,1),h()},M.render=function(){return React.createElement(o,this.props)},E})(reactExports.PureComponent);return _defineProperty$s(y,"displayName","SideEffect("+e(o)+")"),y}}var toArray$1=function(n){for(var i=Array(n.length),e=0;e<n.length;++e)i[e]=n[e];return i},asArray=function(n){return Array.isArray(n)?n:[n]},getFirst=function(n){return Array.isArray(n)?n[0]:n},isElementHidden=function(n){if(n.nodeType!==Node.ELEMENT_NODE)return!1;var i=window.getComputedStyle(n,null);return!i||!i.getPropertyValue?!1:i.getPropertyValue("display")==="none"||i.getPropertyValue("visibility")==="hidden"},getParentNode=function(n){return n.parentNode&&n.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode},isTopNode=function(n){return n===document||n&&n.nodeType===Node.DOCUMENT_NODE},isInert=function(n){return n.hasAttribute("inert")},isVisibleUncached=function(n,i){return!n||isTopNode(n)||!isElementHidden(n)&&!isInert(n)&&i(getParentNode(n))},isVisibleCached=function(n,i){var e=n.get(i);if(e!==void 0)return e;var t=isVisibleUncached(i,isVisibleCached.bind(void 0,n));return n.set(i,t),t},isAutoFocusAllowedUncached=function(n,i){return n&&!isTopNode(n)?isAutoFocusAllowed(n)?i(getParentNode(n)):!1:!0},isAutoFocusAllowedCached=function(n,i){var e=n.get(i);if(e!==void 0)return e;var t=isAutoFocusAllowedUncached(i,isAutoFocusAllowedCached.bind(void 0,n));return n.set(i,t),t},getDataset=function(n){return n.dataset},isHTMLButtonElement=function(n){return n.tagName==="BUTTON"},isHTMLInputElement=function(n){return n.tagName==="INPUT"},isRadioElement=function(n){return isHTMLInputElement(n)&&n.type==="radio"},notHiddenInput=function(n){return!((isHTMLInputElement(n)||isHTMLButtonElement(n))&&(n.type==="hidden"||n.disabled))},isAutoFocusAllowed=function(n){var i=n.getAttribute(FOCUS_NO_AUTOFOCUS);return![!0,"true",""].includes(i)},isGuard=function(n){var i;return!!(n&&(!((i=getDataset(n))===null||i===void 0)&&i.focusGuard))},isNotAGuard=function(n){return!isGuard(n)},isDefined=function(n){return!!n},tabSort=function(n,i){var e=Math.max(0,n.tabIndex),t=Math.max(0,i.tabIndex),o=e-t,d=n.index-i.index;if(o){if(!e)return 1;if(!t)return-1}return o||d},getTabIndex=function(n){return n.tabIndex<0&&!n.hasAttribute("tabindex")?0:n.tabIndex},orderByTabIndex=function(n,i,e){return toArray$1(n).map(function(t,o){var d=getTabIndex(t);return{node:t,index:o,tabIndex:e&&d===-1?(t.dataset||{}).focusGuard?0:-1:d}}).filter(function(t){return!i||t.tabIndex>=0}).sort(tabSort)},tabbables=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],queryTabbables=tabbables.join(","),queryGuardTabbables="".concat(queryTabbables,", [data-focus-guard]"),getFocusablesWithShadowDom=function(n,i){return toArray$1((n.shadowRoot||n).children).reduce(function(e,t){return e.concat(t.matches(i?queryGuardTabbables:queryTabbables)?[t]:[],getFocusablesWithShadowDom(t))},[])},getFocusablesWithIFrame=function(n,i){var e;return n instanceof HTMLIFrameElement&&(!((e=n.contentDocument)===null||e===void 0)&&e.body)?getFocusables([n.contentDocument.body],i):[n]},getFocusables=function(n,i){return n.reduce(function(e,t){var o,d=getFocusablesWithShadowDom(t,i),p=(o=[]).concat.apply(o,d.map(function(h){return getFocusablesWithIFrame(h,i)}));return e.concat(p,t.parentNode?toArray$1(t.parentNode.querySelectorAll(queryTabbables)).filter(function(h){return h===t}):[])},[])},getParentAutofocusables=function(n){var i=n.querySelectorAll("[".concat(FOCUS_AUTO,"]"));return toArray$1(i).map(function(e){return getFocusables([e])}).reduce(function(e,t){return e.concat(t)},[])},filterFocusable=function(n,i){return toArray$1(n).filter(function(e){return isVisibleCached(i,e)}).filter(function(e){return notHiddenInput(e)})},filterAutoFocusable=function(n,i){return i===void 0&&(i=new Map),toArray$1(n).filter(function(e){return isAutoFocusAllowedCached(i,e)})},getTabbableNodes=function(n,i,e){return orderByTabIndex(filterFocusable(getFocusables(n,e),i),!0,e)},getFocusableNodes=function(n,i){return orderByTabIndex(filterFocusable(getFocusables(n),i),!1)},parentAutofocusables=function(n,i){return filterFocusable(getParentAutofocusables(n),i)},contains=function(n,i){return n.shadowRoot?contains(n.shadowRoot,i):Object.getPrototypeOf(n).contains!==void 0&&Object.getPrototypeOf(n).contains.call(n,i)?!0:toArray$1(n.children).some(function(e){var t;if(e instanceof HTMLIFrameElement){var o=(t=e.contentDocument)===null||t===void 0?void 0:t.body;return o?contains(o,i):!1}return contains(e,i)})},filterNested=function(n){for(var i=new Set,e=n.length,t=0;t<e;t+=1)for(var o=t+1;o<e;o+=1){var d=n[t].compareDocumentPosition(n[o]);(d&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&i.add(o),(d&Node.DOCUMENT_POSITION_CONTAINS)>0&&i.add(t)}return n.filter(function(p,h){return!i.has(h)})},getTopParent=function(n){return n.parentNode?getTopParent(n.parentNode):n},getAllAffectedNodes=function(n){var i=asArray(n);return i.filter(Boolean).reduce(function(e,t){var o=t.getAttribute(FOCUS_GROUP);return e.push.apply(e,o?filterNested(toArray$1(getTopParent(t).querySelectorAll("[".concat(FOCUS_GROUP,'="').concat(o,'"]:not([').concat(FOCUS_DISABLED,'="disabled"])')))):[t]),e},[])},safeProbe=function(n){try{return n()}catch{return}},getActiveElement=function(n){if(n===void 0&&(n=document),!(!n||!n.activeElement)){var i=n.activeElement;return i.shadowRoot?getActiveElement(i.shadowRoot):i instanceof HTMLIFrameElement&&safeProbe(function(){return i.contentWindow.document})?getActiveElement(i.contentWindow.document):i}},focusInFrame=function(n,i){return n===i},focusInsideIframe=function(n,i){return!!toArray$1(n.querySelectorAll("iframe")).some(function(e){return focusInFrame(e,i)})},focusInside=function(n,i){return i===void 0&&(i=getActiveElement(getFirst(n).ownerDocument)),!i||i.dataset&&i.dataset.focusGuard?!1:getAllAffectedNodes(n).some(function(e){return contains(e,i)||focusInsideIframe(e,i)})},focusIsHidden=function(n){n===void 0&&(n=document);var i=getActiveElement(n);return i?toArray$1(n.querySelectorAll("[".concat(FOCUS_ALLOW,"]"))).some(function(e){return contains(e,i)}):!1},findSelectedRadio=function(n,i){return i.filter(isRadioElement).filter(function(e){return e.name===n.name}).filter(function(e){return e.checked})[0]||n},correctNode=function(n,i){return isRadioElement(n)&&n.name?findSelectedRadio(n,i):n},correctNodes=function(n){var i=new Set;return n.forEach(function(e){return i.add(correctNode(e,n))}),n.filter(function(e){return i.has(e)})},pickFirstFocus=function(n){return n[0]&&n.length>1?correctNode(n[0],n):n[0]},pickFocusable=function(n,i){return n.indexOf(correctNode(i,n))},NEW_FOCUS="NEW_FOCUS",newFocus=function(n,i,e,t,o){var d=n.length,p=n[0],h=n[d-1],y=isGuard(t);if(!(t&&n.indexOf(t)>=0)){var $=t!==void 0?e.indexOf(t):-1,E=o?e.indexOf(o):$,M=o?n.indexOf(o):-1;if($===-1)return M!==-1?M:NEW_FOCUS;if(M===-1)return NEW_FOCUS;var H=$-E,Z=e.indexOf(p),be=e.indexOf(h),ye=correctNodes(e),we=t!==void 0?ye.indexOf(t):-1,xe=we-(o?ye.indexOf(o):$);if(!H&&M>=0||i.length===0)return M;var Ce=pickFocusable(n,i[0]),Ne=pickFocusable(n,i[i.length-1]);if($<=Z&&y&&Math.abs(H)>1)return Ne;if($>=be&&y&&Math.abs(H)>1)return Ce;if(H&&Math.abs(xe)>1)return M;if($<=Z)return Ne;if($>be)return Ce;if(H)return Math.abs(H)>1?M:(d+M+H)%d}},findAutoFocused=function(n){return function(i){var e,t=(e=getDataset(i))===null||e===void 0?void 0:e.autofocus;return i.autofocus||t!==void 0&&t!=="false"||n.indexOf(i)>=0}},pickAutofocus=function(n,i,e){var t=n.map(function(d){var p=d.node;return p}),o=filterAutoFocusable(t.filter(findAutoFocused(e)));return o&&o.length?pickFirstFocus(o):pickFirstFocus(filterAutoFocusable(i))},getParents=function(n,i){return i===void 0&&(i=[]),i.push(n),n.parentNode&&getParents(n.parentNode.host||n.parentNode,i),i},getCommonParent=function(n,i){for(var e=getParents(n),t=getParents(i),o=0;o<e.length;o+=1){var d=e[o];if(t.indexOf(d)>=0)return d}return!1},getTopCommonParent=function(n,i,e){var t=asArray(n),o=asArray(i),d=t[0],p=!1;return o.filter(Boolean).forEach(function(h){p=getCommonParent(p||h,h)||p,e.filter(Boolean).forEach(function(y){var $=getCommonParent(d,y);$&&(!p||contains($,p)?p=$:p=getCommonParent($,p))})}),p},allParentAutofocusables=function(n,i){return n.reduce(function(e,t){return e.concat(parentAutofocusables(t,i))},[])},reorderNodes=function(n,i){var e=new Map;return i.forEach(function(t){return e.set(t.node,t)}),n.map(function(t){return e.get(t)}).filter(isDefined)},focusSolver=function(n,i){var e=getActiveElement(asArray(n).length>0?document:getFirst(n).ownerDocument),t=getAllAffectedNodes(n).filter(isNotAGuard),o=getTopCommonParent(e||n,n,t),d=new Map,p=getFocusableNodes(t,d),h=p.filter(function(be){var ye=be.node;return isNotAGuard(ye)});if(h[0]){var y=getFocusableNodes([o],d).map(function(be){var ye=be.node;return ye}),$=reorderNodes(y,h),E=$.map(function(be){var ye=be.node;return ye}),M=$.filter(function(be){var ye=be.tabIndex;return ye>=0}).map(function(be){var ye=be.node;return ye}),H=newFocus(E,M,y,e,i);if(H===NEW_FOCUS){var Z=pickAutofocus(p,M,allParentAutofocusables(t,d))||pickAutofocus(p,E,allParentAutofocusables(t,d));if(Z)return{node:Z};console.warn("focus-lock: cannot find any node to move focus into");return}return H===void 0?H:$[H]}},expandFocusableNodes=function(n){var i=getAllAffectedNodes(n).filter(isNotAGuard),e=getTopCommonParent(n,n,i),t=orderByTabIndex(getFocusables([e],!0),!0,!0),o=getFocusables(i,!1);return t.map(function(d){var p=d.node,h=d.index;return{node:p,index:h,lockItem:o.indexOf(p)>=0,guard:isGuard(p)}})},focusOn=function(n,i){n&&("focus"in n&&n.focus(i),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus())},guardCount=0,lockDisabled=!1,moveFocusInside=function(n,i,e){e===void 0&&(e={});var t=focusSolver(n,i);if(!lockDisabled&&t){if(guardCount>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),lockDisabled=!0,setTimeout(function(){lockDisabled=!1},1);return}guardCount++,focusOn(t.node,e.focusOptions),guardCount--}};function weakRef(n){if(!n)return null;if(typeof WeakRef>"u")return function(){return n||null};var i=n?new WeakRef(n):null;return function(){return i?.deref()||null}}var recordElementLocation=function(n){if(!n)return null;for(var i=[],e=n;e&&e!==document.body;)i.push({current:weakRef(e),parent:weakRef(e.parentElement),left:weakRef(e.previousElementSibling),right:weakRef(e.nextElementSibling)}),e=e.parentElement;return{element:weakRef(n),stack:i,ownerDocument:n.ownerDocument}},restoreFocusTo=function(n){var i,e,t,o,d;if(n)for(var p=n.stack,h=n.ownerDocument,y=new Map,$=0,E=p;$<E.length;$++){var M=E[$],H=(i=M.parent)===null||i===void 0?void 0:i.call(M);if(H&&h.contains(H)){for(var Z=(e=M.left)===null||e===void 0?void 0:e.call(M),be=M.current(),ye=H.contains(be)?be:void 0,we=(t=M.right)===null||t===void 0?void 0:t.call(M),xe=getTabbableNodes([H],y),Ce=(d=(o=ye??Z?.nextElementSibling)!==null&&o!==void 0?o:we)!==null&&d!==void 0?d:Z;Ce;){for(var Ne=0,Fe=xe;Ne<Fe.length;Ne++){var Me=Fe[Ne];if(Ce?.contains(Me.node))return Me.node}Ce=Ce.nextElementSibling}if(xe.length)return xe[0].node}}},captureFocusRestore=function(n){var i=recordElementLocation(n);return function(){return restoreFocusTo(i)}},getRelativeFocusable=function(n,i,e){if(!n||!i)return console.error("no element or scope given"),{};var t=asArray(i);if(t.every(function(p){return!contains(p,n)}))return console.error("Active element is not contained in the scope"),{};var o=e?getTabbableNodes(t,new Map):getFocusableNodes(t,new Map),d=o.findIndex(function(p){var h=p.node;return h===n});if(d!==-1)return{prev:o[d-1],next:o[d+1],first:o[0],last:o[o.length-1]}},getBoundary=function(n,i){var e=i?getTabbableNodes(asArray(n),new Map):getFocusableNodes(asArray(n),new Map);return{first:e[0],last:e[e.length-1]}},defaultOptions=function(n){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},n)},moveFocus=function(n,i,e){i===void 0&&(i={});var t=defaultOptions(i),o=getRelativeFocusable(n,t.scope,t.onlyTabbable);if(o){var d=e(o,t.cycle);d&&focusOn(d.node,t.focusOptions)}},focusNextElement=function(n,i){i===void 0&&(i={}),moveFocus(n,i,function(e,t){var o=e.next,d=e.first;return o||t&&d})},focusPrevElement=function(n,i){i===void 0&&(i={}),moveFocus(n,i,function(e,t){var o=e.prev,d=e.last;return o||t&&d})},pickBoundary=function(n,i,e){var t,o=getBoundary(n,(t=i.onlyTabbable)!==null&&t!==void 0?t:!0),d=o[e];d&&focusOn(d.node,i.focusOptions)},focusFirstElement=function(n,i){i===void 0&&(i={}),pickBoundary(n,i,"first")},focusLastElement=function(n,i){i===void 0&&(i={}),pickBoundary(n,i,"last")};function deferAction(n){setTimeout(n,1)}var inlineProp=function n(i,e){var t={};return t[i]=e,t},extractRef=function n(i){return i&&"current"in i?i.current:i},focusOnBody=function n(){return document&&document.activeElement===document.body},isFreeFocus=function n(){return focusOnBody()||focusIsHidden()},lastActiveTrap=null,lastActiveFocus=null,tryRestoreFocus=function n(){return null},lastPortaledElement=null,focusWasOutsideWindow=!1,windowFocused=!1,defaultWhitelist=function n(){return!0},focusWhitelisted=function n(i){return(lastActiveTrap.whiteList||defaultWhitelist)(i)},recordPortal=function n(i,e){lastPortaledElement={observerNode:i,portaledElement:e}},focusIsPortaledPair=function n(i){return lastPortaledElement&&lastPortaledElement.portaledElement===i};function autoGuard(n,i,e,t){var o=null,d=n;do{var p=t[d];if(p.guard)p.node.dataset.focusAutoGuard&&(o=p);else if(p.lockItem){if(d!==n)return;o=null}else break}while((d+=e)!==i);o&&(o.node.tabIndex=0)}var focusWasOutside=function n(i){return i?!!focusWasOutsideWindow:focusWasOutsideWindow==="meanwhile"},checkInHost=function n(i,e,t){return e&&(e.host===i&&(!e.activeElement||t.contains(e.activeElement))||e.parentNode&&n(i,e.parentNode,t))},withinHost=function n(i,e){return e.some(function(t){return checkInHost(i,t,t)})},getNodeFocusables=function n(i){return getFocusableNodes(i,new Map)},isNotFocusable=function n(i){return!getNodeFocusables([i.parentNode]).some(function(e){return e.node===i})},activateTrap=function n(){var i=!1;if(lastActiveTrap){var e=lastActiveTrap,t=e.observed,o=e.persistentFocus,d=e.autoFocus,p=e.shards,h=e.crossFrame,y=e.focusOptions,$=e.noFocusGuards,E=t||lastPortaledElement&&lastPortaledElement.portaledElement;if(focusOnBody()&&lastActiveFocus&&(!document.body.contains(lastActiveFocus)||isNotFocusable(lastActiveFocus))){lastActiveFocus=null;var M=tryRestoreFocus();M&&M.focus()}var H=document&&document.activeElement;if(E){var Z=[E].concat(p.map(extractRef).filter(Boolean)),be=function(){if(!focusWasOutside(h)||!$||!lastActiveFocus||windowFocused)return!1;var Ne=getNodeFocusables(Z),Fe=Ne.findIndex(function(Me){var Le=Me.node;return Le===lastActiveFocus});return Fe===0||Fe===Ne.length-1};if((!H||focusWhitelisted(H))&&(o||be()||!isFreeFocus()||!lastActiveFocus&&d)&&(E&&!(focusInside(Z)||H&&withinHost(H,Z)||focusIsPortaledPair(H))&&(document&&!lastActiveFocus&&H&&!d?(H.blur&&H.blur(),document.body.focus()):(i=moveFocusInside(Z,lastActiveFocus,{focusOptions:y}),lastPortaledElement={})),focusWasOutsideWindow=!1,lastActiveFocus=document&&document.activeElement,tryRestoreFocus=captureFocusRestore(lastActiveFocus)),document&&H!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var ye=document&&document.activeElement,we=expandFocusableNodes(Z),xe=we.map(function(Ce){var Ne=Ce.node;return Ne}).indexOf(ye);xe>-1&&(we.filter(function(Ce){var Ne=Ce.guard,Fe=Ce.node;return Ne&&Fe.dataset.focusAutoGuard}).forEach(function(Ce){var Ne=Ce.node;return Ne.removeAttribute("tabIndex")}),autoGuard(xe,we.length,1,we),autoGuard(xe,-1,-1,we))}}}return i},onTrap=function n(i){activateTrap()&&i&&(i.stopPropagation(),i.preventDefault())},onBlur=function n(){return deferAction(activateTrap)},onFocus=function n(i){var e=i.target,t=i.currentTarget;t.contains(e)||recordPortal(t,e)},FocusWatcher=function n(){return null},onWindowFocus=function n(){windowFocused=!0},onWindowBlur=function n(){windowFocused=!1,focusWasOutsideWindow="just",deferAction(function(){focusWasOutsideWindow="meanwhile"})},attachHandler=function n(){document.addEventListener("focusin",onTrap),document.addEventListener("focusout",onBlur),window.addEventListener("focus",onWindowFocus),window.addEventListener("blur",onWindowBlur)},detachHandler=function n(){document.removeEventListener("focusin",onTrap),document.removeEventListener("focusout",onBlur),window.removeEventListener("focus",onWindowFocus),window.removeEventListener("blur",onWindowBlur)};function reducePropsToState(n){return n.filter(function(i){var e=i.disabled;return!e})}var focusLockAPI={moveFocusInside,focusInside,focusNextElement,focusPrevElement,focusFirstElement,focusLastElement,captureFocusRestore};function handleStateChangeOnClient(n){var i=n.slice(-1)[0];i&&!lastActiveTrap&&attachHandler();var e=lastActiveTrap,t=e&&i&&i.id===e.id;lastActiveTrap=i,e&&!t&&(e.onDeactivation(),n.filter(function(o){var d=o.id;return d===e.id}).length||e.returnFocus(!i)),i?(lastActiveFocus=null,(!t||e.observed!==i.observed)&&i.onActivation(focusLockAPI),activateTrap(),deferAction(activateTrap)):(detachHandler(),lastActiveFocus=null)}mediumFocus.assignSyncMedium(onFocus);mediumBlur.assignMedium(onBlur);mediumEffect.assignMedium(function(n){return n(focusLockAPI)});const FocusTrap=withSideEffect(reducePropsToState,handleStateChangeOnClient)(FocusWatcher);var FocusLockCombination=reactExports.forwardRef(function n(i,e){return reactExports.createElement(FocusLock,_extends$A({sideCar:FocusTrap,ref:e},i))}),_ref=FocusLock.propTypes||{};_ref.sideCar;_objectWithoutPropertiesLoose$p(_ref,["sideCar"]);FocusLockCombination.propTypes={};var useFocusInside=function n(i){reactExports.useEffect(function(){var e=!0;return mediumEffect.useMedium(function(t){var o=i&&i.current;e&&o&&(t.focusInside(o)||t.moveFocusInside(o,null))}),function(){e=!1}},[i])};function MoveFocusInside(n){var i=n.disabled,e=i===void 0?!1:i,t=n.className,o=n.children,d=reactExports.useRef(null);return useFocusInside(e?void 0:d),reactExports.createElement("div",_extends$A({},inlineProp(FOCUS_AUTO,!e),{ref:d,className:t}),o)}MoveFocusInside.propTypes={};var SIZE$2={default:"default",full:"full",auto:"auto"},SIZE_WIDTHS={default:"500px",full:"100%",auto:"auto"},ROLE={dialog:"dialog"},CLOSE_SOURCE={closeButton:"closeButton",backdrop:"backdrop",escape:"escape"};function ownKeys$o(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$n(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$o(Object(e),!0).forEach(function(t){_defineProperty$r(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$o(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$r(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function getSizeStyles(n){var i={maxWidth:"100%",width:null};return typeof n=="number"?i.width="".concat(n,"px"):SIZE$2[n]?i.width=SIZE_WIDTHS[n]:typeof n=="string"&&(i.width=n),n===SIZE$2.full&&(i.alignSelf="stretch"),i}var Root$3=styled$1("div",function(n){var i=n.$isOpen;return{position:"fixed",overflow:"auto",right:0,bottom:0,top:0,left:0,pointerEvents:i?"auto":"none"}});Root$3.displayName="Root";Root$3.displayName="Root";var DialogContainer=styled$1("div",function(n){var i=n.$animate,e=n.$isOpen,t=n.$isVisible,o=n.$theme,d={transitionProperty:"opacity",transitionDuration:o.animation.timing400,transitionTimingFunction:o.animation.easeOutCurve};return _objectSpread$n({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"100%",userSelect:"none",pointerEvents:"auto",backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",opacity:t&&e?1:0},i?d:null)});DialogContainer.displayName="DialogContainer";DialogContainer.displayName="DialogContainer";var Dialog$2=styled$1("div",function(n){var i=n.$animate,e=n.$isOpen,t=n.$isVisible,o=n.$size,d=n.$theme;return _objectSpread$n(_objectSpread$n(_objectSpread$n({position:"relative",backgroundColor:d.colors.backgroundPrimary,borderTopLeftRadius:d.borders.radius500,borderTopRightRadius:d.borders.radius500,borderBottomRightRadius:d.borders.radius500,borderBottomLeftRadius:d.borders.radius500,marginLeft:d.sizing.scale600,marginTop:d.sizing.scale600,marginRight:d.sizing.scale600,marginBottom:d.sizing.scale600},getSizeStyles(o)),{},{opacity:t&&e?1:0,transform:t?"translateY(0)":"translateY(20px)"},i?{transitionProperty:"opacity, transform",transitionDuration:d.animation.timing400,transitionTimingFunction:d.animation.easeOutCurve}:null),{},{userSelect:"text",pointerEvents:e?"all":"none",":focus":{outline:"none"}})});Dialog$2.displayName="Dialog";Dialog$2.displayName="Dialog";var Close=styled$1("button",function(n){var i,e=n.$theme,t=n.$isFocusVisible,o=e.direction==="rtl"?"left":"right";return i={background:"transparent",outline:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,color:e.colors.modalCloseColor,transitionProperty:"color, border-color",transitionDuration:e.animation.timing200,borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",":hover":{color:e.colors.modalCloseColorHover},":focus":{outline:t?"3px solid ".concat(e.colors.accent):"none"},position:"absolute",top:e.sizing.scale500},_defineProperty$r(i,o,e.sizing.scale500),_defineProperty$r(i,"width",e.sizing.scale800),_defineProperty$r(i,"height",e.sizing.scale800),_defineProperty$r(i,"display","flex"),_defineProperty$r(i,"justifyContent","center"),_defineProperty$r(i,"alignItems","center"),_defineProperty$r(i,"cursor","pointer"),i});Close.displayName="Close";Close.displayName="Close";var ModalHeader$1=styled$1("div",function(n){var i,e=n.$theme,t=e.direction==="rtl"?"marginRight":"marginLeft",o=e.direction==="rtl"?"marginLeft":"marginRight";return _objectSpread$n(_objectSpread$n({},e.typography.font550),{},(i={color:e.colors.contentPrimary,marginTop:e.sizing.scale900,marginBottom:e.sizing.scale600},_defineProperty$r(i,t,e.sizing.scale800),_defineProperty$r(i,o,e.sizing.scale900),i))});ModalHeader$1.displayName="ModalHeader";ModalHeader$1.displayName="ModalHeader";var ModalBody$2=styled$1("div",function(n){var i=n.$theme;return _objectSpread$n(_objectSpread$n({},i.typography.font200),{},{color:i.colors.contentSecondary,marginTop:i.sizing.scale600,marginLeft:i.sizing.scale800,marginRight:i.sizing.scale800,marginBottom:i.sizing.scale700})});ModalBody$2.displayName="ModalBody";ModalBody$2.displayName="ModalBody";var ModalFooter$1=styled$1("div",function(n){var i=n.$theme;return _objectSpread$n(_objectSpread$n({},i.typography.font200),{},{marginTop:i.sizing.scale700,marginLeft:i.sizing.scale800,marginRight:i.sizing.scale800,paddingTop:i.sizing.scale500,paddingBottom:i.sizing.scale500,textAlign:i.direction==="rtl"?"left":"right"})});ModalFooter$1.displayName="ModalFooter";ModalFooter$1.displayName="ModalFooter";function CloseIcon(){return reactExports.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{stroke:"currentColor"},xmlns:"http://www.w3.org/2000/svg"},reactExports.createElement("path",{d:"M9 1L5 5M1 9L5 5M5 5L1 1M5 5L9 9",strokeWidth:"2",strokeLinecap:"round"}))}function _typeof$d(n){"@babel/helpers - typeof";return _typeof$d=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$d(n)}function _extends$t(){return _extends$t=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$t.apply(this,arguments)}function _slicedToArray$k(n,i){return _arrayWithHoles$k(n)||_iterableToArrayLimit$k(n,i)||_unsupportedIterableToArray$k(n,i)||_nonIterableRest$k()}function _nonIterableRest$k(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
51
51
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$k(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$k(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$k(n,i)}}function _arrayLikeToArray$k(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$k(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$k(n){if(Array.isArray(n))return n}function _classCallCheck$d(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$d(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$d(n,i,e){return i&&_defineProperties$d(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$d(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$c(n,i)}function _setPrototypeOf$c(n,i){return _setPrototypeOf$c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$c(n,i)}function _createSuper$d(n){var i=_isNativeReflectConstruct$d();return function(){var t=_getPrototypeOf$d(n),o;if(i){var d=_getPrototypeOf$d(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$d(this,o)}}function _possibleConstructorReturn$d(n,i){if(i&&(_typeof$d(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$d(n)}function _assertThisInitialized$d(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$d(){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$d(n){return _getPrototypeOf$d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$d(n)}function _defineProperty$q(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Modal$1=(function(n){_inherits$d(e,n);var i=_createSuper$d(e);function e(){var t;_classCallCheck$d(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$q(_assertThisInitialized$d(t),"animateOutTimer",void 0),_defineProperty$q(_assertThisInitialized$d(t),"animateStartTimer",void 0),_defineProperty$q(_assertThisInitialized$d(t),"dialogContainerRef",reactExports.createRef()),_defineProperty$q(_assertThisInitialized$d(t),"lastFocus",null),_defineProperty$q(_assertThisInitialized$d(t),"lastMountNodeOverflowStyle",null),_defineProperty$q(_assertThisInitialized$d(t),"rootRef",reactExports.createRef()),_defineProperty$q(_assertThisInitialized$d(t),"state",{isVisible:!1,mounted:!1,isFocusVisible:!1}),_defineProperty$q(_assertThisInitialized$d(t),"handleFocus",function(h){isFocusVisible(h)&&t.setState({isFocusVisible:!0})}),_defineProperty$q(_assertThisInitialized$d(t),"handleBlur",function(h){t.state.isFocusVisible!==!1&&t.setState({isFocusVisible:!1})}),_defineProperty$q(_assertThisInitialized$d(t),"onEscape",function(){t.props.closeable&&t.triggerClose(CLOSE_SOURCE.escape)}),_defineProperty$q(_assertThisInitialized$d(t),"onDocumentClick",function(h){h.target&&h.target instanceof HTMLElement&&h.target.contains(t.dialogContainerRef.current)&&t.onBackdropClick()}),_defineProperty$q(_assertThisInitialized$d(t),"onBackdropClick",function(){t.props.closeable&&t.triggerClose(CLOSE_SOURCE.backdrop)}),_defineProperty$q(_assertThisInitialized$d(t),"onCloseClick",function(){t.triggerClose(CLOSE_SOURCE.closeButton)}),_defineProperty$q(_assertThisInitialized$d(t),"animateOutComplete",function(){t.setState({isVisible:!1})}),t}return _createClass$d(e,[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"componentWillUnmount",value:function(){this.resetMountNodeScroll(),this.clearTimers()}},{key:"componentDidUpdate",value:function(o,d){var p=this.props.isOpen;(p!==o.isOpen||p&&this.state.mounted&&!d.mounted)&&(p?this.didOpen():this.didClose())}},{key:"disableMountNodeScroll",value:function(){var o=this.getMountNode();this.lastMountNodeOverflowStyle=o.style.overflow||"",o.style.overflow="hidden"}},{key:"resetMountNodeScroll",value:function(){var o=this.getMountNode(),d=this.lastMountNodeOverflowStyle;o&&d!==null&&(o.style.overflow==="hidden"&&(o.style.overflow=d||""),this.lastMountNodeOverflowStyle=null)}},{key:"clearTimers",value:function(){this.animateOutTimer&&clearTimeout(this.animateOutTimer),this.animateStartTimer&&cancelAnimationFrame(this.animateStartTimer)}},{key:"didOpen",value:function(){var o=this,d=this.rootRef.current;d&&(d.scrollTop=0),this.clearTimers(),this.disableMountNodeScroll(),this.animateStartTimer=requestAnimationFrame(function(){o.setState({isVisible:!0})})}},{key:"didClose",value:function(){this.resetMountNodeScroll(),this.animateOutTimer=setTimeout(this.animateOutComplete,500)}},{key:"triggerClose",value:function(o){this.props.onClose&&o&&this.props.onClose({closeSource:o})}},{key:"getSharedProps",value:function(){var o=this.props,d=o.animate,p=o.isOpen,h=o.size,y=o.role,$=o.closeable;return{$animate:d,$isVisible:this.state.isVisible,$isOpen:!!p,$size:h,$role:y,$closeable:!!$,$isFocusVisible:this.state.isFocusVisible}}},{key:"getMountNode",value:function(){var o=this.props.mountNode;return o||document.body}},{key:"getChildren",value:function(){var o=this.props.children;return typeof o=="function"?o():o}},{key:"renderModal",value:function(){var o=this,d=this.props,p=d.overrides,h=p===void 0?{}:p,y=d.closeable,$=d.role,E=d.autoFocus,M=d.focusLock,H=d.returnFocus,Z=h.Root,be=h.Dialog,ye=h.DialogContainer,we=h.Close,xe=getOverrides(Z,Root$3),Ce=_slicedToArray$k(xe,2),Ne=Ce[0],Fe=Ce[1],Me=getOverrides(ye,DialogContainer),Le=_slicedToArray$k(Me,2),ze=Le[0],Ke=Le[1],Ve=getOverrides(be,Dialog$2),je=_slicedToArray$k(Ve,2),We=je[0],Xe=je[1],Qe=getOverrides(we,Close),Ye=_slicedToArray$k(Qe,2),Ue=Ye[0],ot=Ye[1],dt=this.getSharedProps(),st=this.getChildren();return reactExports.createElement(LocaleContext.Consumer,null,function(pt){return reactExports.createElement(FocusLockCombination,{disabled:!M,crossFrame:!1,returnFocus:H,autoFocus:E},reactExports.createElement(Ne,_extends$t({"data-baseweb":"modal",ref:o.rootRef},dt,Fe),reactExports.createElement(ze,_extends$t({ref:o.dialogContainerRef},dt,Ke),reactExports.createElement(We,_extends$t({tabIndex:-1,"aria-modal":!0,"aria-label":"dialog",role:$},dt,Xe),st,y?reactExports.createElement(Ue,_extends$t({"aria-label":pt.modal.close,onClick:o.onCloseClick},dt,ot,{onFocus:forkFocus(ot,o.handleFocus),onBlur:forkBlur(ot,o.handleBlur)}),reactExports.createElement(CloseIcon,null)):null))))})}},{key:"render",value:function(){return!this.state.mounted||!this.props.isOpen&&!this.state.isVisible?null:reactExports.createElement(Layer,{onEscape:this.onEscape,onDocumentClick:this.onDocumentClick,mountNode:this.props.mountNode},this.renderModal())}}]),e})(reactExports.Component);_defineProperty$q(Modal$1,"defaultProps",{animate:!0,autoFocus:!0,focusLock:!0,returnFocus:!0,closeable:!0,name:"dialog",isOpen:!1,overrides:{},role:ROLE.dialog,size:SIZE$2.default});var BaseButtonKind=(function(n){return n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n.GHOST="ghost",n.BORDERLESS_ICON="borderlessIcon",n.BORDERLESS_ICON_ACTIVE="borderlessIconActive",n.MINIMAL="minimal",n.PRIMARY_FORM_SUBMIT="primaryFormSubmit",n.SECONDARY_FORM_SUBMIT="secondaryFormSubmit",n.TERTIARY_FORM_SUBMIT="tertiaryFormSubmit",n.HEADER_BUTTON="header",n.HEADER_NO_PADDING="headerNoPadding",n.ELEMENT_TOOLBAR="elementToolbar",n.PILLS="pills",n.PILLS_ACTIVE="pillsActive",n.SEGMENTED_CONTROL="segmented_control",n.SEGMENTED_CONTROL_ACTIVE="segmented_controlActive",n})({}),BaseButtonSize=(function(n){return n.XSMALL="xsmall",n.SMALL="small",n.MEDIUM="medium",n.LARGE="large",n})({});function getSizeStyle(n,i){switch(n){case"xsmall":return{padding:`${i.spacing.twoXS} ${i.spacing.sm}`,fontSize:i.fontSizes.sm};case"small":return{padding:`${i.spacing.twoXS} ${i.spacing.md}`};case"large":return{padding:`${i.spacing.md} ${i.spacing.md}`};default:return{padding:`${i.spacing.xs} ${i.spacing.md}`}}}const StyledBaseButton=styled("button",{target:"e27ue8x0"})(({containerWidth:n,size:i,theme:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.button,minHeight:e.sizes.minElementHeight,margin:e.spacing.none,lineHeight:e.lineHeights.base,textTransform:"none",fontSize:"inherit",fontFamily:"inherit",color:"inherit",width:n?"100%":"auto",cursor:"pointer",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(e)},...getSizeStyle(i,e)})),StyledPrimaryButton=styled(StyledBaseButton,{target:"e27ue8x1"})(({theme:n})=>({backgroundColor:n.colors.primary,color:n.colors.white,border:`${n.sizes.borderWidth} solid ${n.colors.primary}`,"&:hover, &:focus-visible":{backgroundColor:darken(n.colors.primary,.15),borderColor:darken(n.colors.primary,.15)},"&:active":{backgroundColor:n.colors.primary,borderColor:darken(n.colors.primary,.15)},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledSecondaryButton=styled(StyledBaseButton,{target:"e27ue8x2"})(({theme:n})=>({backgroundColor:n.colors.lightenedBg05,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:hover, &:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledTertiaryButton=styled(StyledBaseButton,{target:"e27ue8x3"})(({theme:n})=>({padding:n.spacing.none,backgroundColor:n.colors.transparent,border:"none","&:hover, &:focus-visible":{color:n.colors.primary},"&:hover:not(:disabled), &:focus-visible:not(:disabled)":{"span.stMarkdownColoredText":{color:"inherit !important"}},"&:active":{color:darken(n.colors.primary,.25)},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledGhostButton=styled(StyledBaseButton,{target:"e27ue8x4"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:`${n.sizes.borderWidth} solid ${n.colors.transparent}`,"&:hover, &:focus-visible":{borderColor:n.colors.transparent,color:n.colors.primary},"&:active":{color:n.colors.primary,borderColor:n.colors.transparent,backgroundColor:n.colors.transparent},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledMinimalButton=styled(StyledBaseButton,{target:"e27ue8x5"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",boxShadow:"none",padding:n.spacing.none,"&:hover, &:active, &:focus-visible":{color:n.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledPrimaryFormSubmitButton=styled(StyledPrimaryButton,{target:"e27ue8x6"})(),StyledSecondaryFormSubmitButton=styled(StyledSecondaryButton,{target:"e27ue8x7"})(),StyledTertiaryFormSubmitButton=styled(StyledTertiaryButton,{target:"e27ue8x8"})(),StyledButtonGroupBaseButton=styled(StyledBaseButton,{target:"e27ue8x9"})(({theme:n})=>({background:n.colors.bgColor,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,height:n.sizes.largeLogoHeight,minHeight:n.sizes.largeLogoHeight,maxWidth:n.sizes.contentMaxWidth,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:hover, &:focus-visible":{backgroundColor:n.colors.darkenedBgMix15},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.transparent,color:n.colors.fadedText40,cursor:"not-allowed"},"& div":{textOverflow:"ellipsis",overflow:"hidden"},"& p":{textOverflow:"ellipsis",overflow:"hidden"}})),StyledPillsButton=styled(StyledButtonGroupBaseButton,{target:"e27ue8x10"})(({theme:n,containerWidth:i})=>({borderRadius:n.radii.full,padding:`${n.spacing.twoXS} ${n.spacing.md}`,flex:i?"1 1 fit-content":""})),StyledPillsButtonActive=styled(StyledPillsButton,{target:"e27ue8x11"})(({theme:n})=>({backgroundColor:transparentize(n.colors.primary,.9),borderColor:n.colors.primary,color:n.colors.primary,"&:hover, &:focus-visible":{backgroundColor:transparentize(n.colors.primary,.8),borderColor:n.colors.primary,color:n.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.fadedText05,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledSegmentedControlButton=styled(StyledButtonGroupBaseButton,{target:"e27ue8x12"})(({theme:n,containerWidth:i})=>({padding:`${n.spacing.twoXS} ${n.spacing.lg}`,borderRadius:"0",flex:i?"1 1 fit-content":"",maxWidth:"100%",marginRight:`-${n.sizes.borderWidth}`,"&:first-child":{borderTopLeftRadius:n.radii.button,borderBottomLeftRadius:n.radii.button},"&:last-child":{borderTopRightRadius:n.radii.button,borderBottomRightRadius:n.radii.button,marginRight:n.spacing.none},"&:focus-visible":{zIndex:n.zIndices.priority}})),StyledSegmentedControlButtonActive=styled(StyledSegmentedControlButton,{target:"e27ue8x13"})(({theme:n})=>({backgroundColor:transparentize(n.colors.primary,.9),borderColor:n.colors.primary,color:n.colors.primary,zIndex:n.zIndices.priority,"&:hover, &:focus-visible":{backgroundColor:transparentize(n.colors.primary,.8)},"&:disabled, &:disabled:hover, &:disabled:active":{borderColor:n.colors.borderColor,backgroundColor:n.colors.fadedText05,color:n.colors.fadedText40,cursor:"not-allowed"}})),StyledHeaderButton=styled(StyledBaseButton,{target:"e27ue8x14"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",padding:`0 ${n.spacing.sm}`,fontSize:n.fontSizes.sm,marginLeft:n.spacing.threeXS,marginRight:n.spacing.threeXS,lineHeight:n.lineHeights.none,minWidth:n.sizes.headerItemHeight,minHeight:n.sizes.headerItemHeight,"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:getFocusBoxShadow(n.colors.gray90,.8)},"&:hover":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledHeaderNoPaddingButton=styled(StyledHeaderButton,{target:"e27ue8x15"})(()=>({padding:0})),StyledBorderlessIconButton=styled(StyledBaseButton,{target:"e27ue8x16"})(({size:n,theme:i})=>{const e={xsmall:i.spacing.threeXS,small:i.spacing.twoXS,medium:i.spacing.md,large:i.spacing.lg};return{backgroundColor:i.colors.transparent,color:i.colors.fadedText60,padding:e[n],marginLeft:i.spacing.none,marginRight:i.spacing.none,flex:"0 0 fit-content",border:"none",display:"flex",minHeight:"unset","&:focus":{boxShadow:"none",outline:"none"},"&:hover":{color:i.colors.bodyText},"&:disabled, &:disabled:hover, &:disabled:active":{color:i.colors.fadedText10,cursor:"not-allowed",img:{opacity:.4}}}}),StyledBorderlessIconButtonActive=styled(StyledBorderlessIconButton,{target:"e27ue8x17"})(({theme:n})=>({color:n.colors.bodyText,"&:disabled, &:disabled:hover, &:disabled:active":{color:n.colors.fadedText40}})),StyledTooltipNormal=styled("div",{target:"e27ue8x18"})(({theme:n})=>({display:"block",[`@media (max-width: ${n.breakpoints.sm})`]:{display:"none"}})),StyledTooltipMobile=styled("div",{target:"e27ue8x19"})(({theme:n})=>({display:"none",[`@media (max-width: ${n.breakpoints.sm})`]:{display:"block"}})),StyledElementToolbarButton=styled(StyledBaseButton,{target:"e27ue8x20"})(({theme:n})=>({backgroundColor:n.colors.transparent,border:"none",padding:n.spacing.twoXS,fontSize:n.fontSizes.twoSm,marginLeft:n.spacing.none,marginRight:n.spacing.none,display:"flex",gap:n.spacing.xs,alignItems:"center",minHeight:"unset",lineHeight:n.iconSizes.md,width:"auto","&:focus":{outline:"none",border:"none",boxShadow:"none"},"&:focus-visible":{outline:"none",border:"none",boxShadow:"none",backgroundColor:n.colors.darkenedBgMix25},"&:hover":{backgroundColor:n.colors.darkenedBgMix15},"&:active":{backgroundColor:n.colors.darkenedBgMix25},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:n.colors.gray30,borderColor:n.colors.transparent,color:n.colors.gray60}})),StyledButtonGroup=styled("div",{target:"e27ue8x21"})(({containerWidth:n})=>({width:n?"100%":"auto"})),StyledButtonLabel=styled("div",{target:"e27ue8x22"})(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),StyledButtonMainLabel=styled("span",{target:"e27ue8x23"})(({theme:n})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",gap:n.spacing.sm,minWidth:0})),StyledButtonShortcut=styled("kbd",{target:"e27ue8x24"})(({theme:n})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:n.fontSizes.sm,opacity:.6,fontFamily:"inherit",lineHeight:n.lineHeights.tight,letterSpacing:"0.01em"}));function BaseButton(n){const{kind:i,size:e,disabled:t,onClick:o,containerWidth:d,children:p,autoFocus:h}=n;let y=StyledPrimaryButton;return i===BaseButtonKind.SECONDARY?y=StyledSecondaryButton:i===BaseButtonKind.TERTIARY?y=StyledTertiaryButton:i===BaseButtonKind.GHOST?y=StyledGhostButton:i===BaseButtonKind.PILLS?y=StyledPillsButton:i===BaseButtonKind.PILLS_ACTIVE?y=StyledPillsButtonActive:i===BaseButtonKind.SEGMENTED_CONTROL?y=StyledSegmentedControlButton:i===BaseButtonKind.SEGMENTED_CONTROL_ACTIVE?y=StyledSegmentedControlButtonActive:i===BaseButtonKind.BORDERLESS_ICON?y=StyledBorderlessIconButton:i===BaseButtonKind.BORDERLESS_ICON_ACTIVE?y=StyledBorderlessIconButtonActive:i===BaseButtonKind.MINIMAL?y=StyledMinimalButton:i===BaseButtonKind.PRIMARY_FORM_SUBMIT?y=StyledPrimaryFormSubmitButton:i===BaseButtonKind.SECONDARY_FORM_SUBMIT?y=StyledSecondaryFormSubmitButton:i===BaseButtonKind.TERTIARY_FORM_SUBMIT?y=StyledTertiaryFormSubmitButton:i===BaseButtonKind.HEADER_BUTTON?y=StyledHeaderButton:i===BaseButtonKind.HEADER_NO_PADDING?y=StyledHeaderNoPaddingButton:i===BaseButtonKind.ELEMENT_TOOLBAR&&(y=StyledElementToolbarButton),jsx$1(y,{kind:i,size:e??BaseButtonSize.MEDIUM,containerWidth:d||!1,disabled:t||!1,onClick:o||(()=>{}),autoFocus:h||!1,"data-testid":n["data-testid"]??`stBaseButton-${i}`,"aria-label":n["aria-label"]??"",children:p})}const StyledWrapper=styled("div",{target:"e1bi6yfx0"})({display:"table",tableLayout:"fixed",width:"100%"}),StyledEllipsizedDiv=styled("div",{target:"e1bi6yfx1"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell"}),StyledTooltipContentWrapper=styled("div",{target:"e1bi6yfx2"})(({theme:n})=>({boxSizing:"border-box",fontSize:`${n.fontSizes.sm}`,maxWidth:`calc(${n.sizes.contentMaxWidth} - 2 * ${n.spacing.threeXL})`,maxHeight:n.sizes.maxTooltipHeight,overflow:"auto",padding:`${n.spacing.xs} ${n.spacing.md}`,[`@media (max-width: ${n.breakpoints.sm})`]:{maxWidth:`calc(100% - ${n.spacing.threeXL})`},img:{maxWidth:"100%"},"*":{fontSize:n.fontSizes.sm}}));var PLACEMENT$1={auto:"auto",topLeft:"topLeft",top:"top",topRight:"topRight",rightTop:"rightTop",right:"right",rightBottom:"rightBottom",bottomRight:"bottomRight",bottom:"bottom",bottomLeft:"bottomLeft",leftBottom:"leftBottom",left:"left",leftTop:"leftTop"},TRIGGER_TYPE={click:"click",hover:"hover"},STATE_CHANGE_TYPE$1={open:"open",close:"close"},ACCESSIBILITY_TYPE={none:"none",menu:"menu",tooltip:"tooltip"},POPOVER_MARGIN=8,ARROW_SIZE=6,ANIMATE_OUT_TIME=0,ANIMATE_IN_TIME=20,ARROW_WIDTH=Math.ceil(Math.sqrt(Math.pow(ARROW_SIZE*2,2)/2));function _typeof$c(n){"@babel/helpers - typeof";return _typeof$c=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$c(n)}function ownKeys$n(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$m(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$n(Object(e),!0).forEach(function(t){_defineProperty$p(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$n(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$c(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$c(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$c(n,i,e){return i&&_defineProperties$c(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$c(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$b(n,i)}function _setPrototypeOf$b(n,i){return _setPrototypeOf$b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$b(n,i)}function _createSuper$c(n){var i=_isNativeReflectConstruct$c();return function(){var t=_getPrototypeOf$c(n),o;if(i){var d=_getPrototypeOf$c(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$c(this,o)}}function _possibleConstructorReturn$c(n,i){if(i&&(_typeof$c(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$c(n)}function _assertThisInitialized$c(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$c(){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$c(n){return _getPrototypeOf$c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$c(n)}function _defineProperty$p(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var defaultStateReducer=function n(i,e){return e},StatefulContainer$1=(function(n){_inherits$c(e,n);var i=_createSuper$c(e);function e(){var t;_classCallCheck$c(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$p(_assertThisInitialized$c(t),"state",_objectSpread$m({isOpen:!1},t.props.initialState)),_defineProperty$p(_assertThisInitialized$c(t),"onBlur",function(h){t.props.onBlur&&t.props.onBlur(h),!(t.props.focusLock||t.props.autoFocus)&&t.close()}),_defineProperty$p(_assertThisInitialized$c(t),"onClick",function(h){t.props.onClick&&t.props.onClick(h),t.state.isOpen?t.close():t.open()}),_defineProperty$p(_assertThisInitialized$c(t),"onClickOutside",function(){t.close()}),_defineProperty$p(_assertThisInitialized$c(t),"onEsc",function(){t.close()}),_defineProperty$p(_assertThisInitialized$c(t),"onFocus",function(h){t.props.onFocus&&t.props.onFocus(h),isFocusVisible(h)&&t.open()}),_defineProperty$p(_assertThisInitialized$c(t),"onMouseEnter",function(h){t.props.onMouseEnter&&t.props.onMouseEnter(h),t.open()}),_defineProperty$p(_assertThisInitialized$c(t),"onMouseLeave",function(h){t.props.onMouseLeave&&t.props.onMouseLeave(h),t.close()}),_defineProperty$p(_assertThisInitialized$c(t),"onContentClose",function(){t.close()}),_defineProperty$p(_assertThisInitialized$c(t),"renderContent",function(){var h=t.props.content;return typeof h=="function"?h({close:t.onContentClose}):h}),t}return _createClass$c(e,[{key:"open",value:function(){this.internalSetState(STATE_CHANGE_TYPE$1.open,{isOpen:!0}),this.props.onOpen&&this.props.onOpen()}},{key:"close",value:function(){this.internalSetState(STATE_CHANGE_TYPE$1.close,{isOpen:!1}),this.props.onClose&&this.props.onClose()}},{key:"internalSetState",value:function(o,d){var p=this.props.stateReducer;if(typeof p!="function"){this.setState(d);return}this.setState(function(h){return p(o,d,h)})}},{key:"render",value:function(){var o=this.props,d=o.accessibilityType,p=o.autoFocus,h=o.animateOutTime,y=o.dismissOnClickOutside,$=o.dismissOnEsc,E=o.focusLock,M=o.ignoreBoundary,H=o.mountNode,Z=o.onBlur,be=o.onClick,ye=o.onFocus,we=o.onMouseEnter,xe=o.onMouseLeave,Ce=o.onMouseEnterDelay,Ne=o.onMouseLeaveDelay,Fe=o.overrides,Me=o.placement,Le=o.popperOptions,ze=o.renderAll,Ke=o.returnFocus,Ve=o.showArrow,je=o.triggerType,We=o.popoverMargin,Xe=o.focusOptions,Qe={accessibilityType:d,animateOutTime:h,autoFocus:p,content:this.renderContent,focusLock:E,ignoreBoundary:M,isOpen:this.state.isOpen,mountNode:H,onBlur:Z,onClick:be,onFocus:ye,onMouseEnter:we,onMouseLeave:xe,onMouseEnterDelay:Ce,onMouseLeaveDelay:Ne,overrides:Fe,placement:Me,popperOptions:Le,renderAll:ze,returnFocus:Ke,showArrow:Ve,triggerType:je,popoverMargin:We,focusOptions:Xe};return y&&(Qe.onClickOutside=this.onClickOutside),$&&(Qe.onEsc=this.onEsc),je===TRIGGER_TYPE.hover?(Qe.onBlur=this.onBlur,Qe.onFocus=this.onFocus,Qe.onMouseEnter=this.onMouseEnter,Qe.onMouseLeave=this.onMouseLeave):Qe.onClick=this.onClick,this.props.children(Qe)}}]),e})(reactExports.Component);_defineProperty$p(StatefulContainer$1,"defaultProps",{accessibilityType:ACCESSIBILITY_TYPE.menu,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT$1.auto,popperOptions:{},showArrow:!1,triggerType:TRIGGER_TYPE.click,dismissOnClickOutside:!0,dismissOnEsc:!0,stateReducer:defaultStateReducer,popoverMargin:POPOVER_MARGIN});function ownKeys$m(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$l(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$m(Object(e),!0).forEach(function(t){_defineProperty$o(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$m(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$o(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$j(n,i){return _arrayWithHoles$j(n)||_iterableToArrayLimit$j(n,i)||_unsupportedIterableToArray$j(n,i)||_nonIterableRest$j()}function _nonIterableRest$j(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
52
52
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$j(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$j(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$j(n,i)}}function _arrayLikeToArray$j(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$j(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$j(n){if(Array.isArray(n))return n}var OPPOSITE_POSITIONS={top:"bottom",bottom:"top",right:"left",left:"right"};function getOppositePosition(n){return OPPOSITE_POSITIONS[n]}function isVerticalPosition(n){return n==="top"||n==="bottom"}function capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)}function fromPopperPlacement(n){var i=n.replace(/(top|bottom)-start$/,"$1Left").replace(/(top|bottom)-end$/,"$1Right").replace(/(left|right)-start$/,"$1Top").replace(/(left|right)-end$/,"$1Bottom");return PLACEMENT$1[i]||null}function splitPlacement(n){var i=n.match(/^([a-z]+)([A-Z][a-z]+)?/)||[];return i.slice(1,3).filter(Boolean).map(function(e){return e.toLowerCase()})}function getPopoverMarginStyles(n,i,e){var t=splitPlacement(i),o=_slicedToArray$j(t,1),d=o[0],p=getOppositePosition(d);if(!p)return null;var h="margin".concat(capitalize(p));return _defineProperty$o({},h,"".concat(n+e,"px"))}function getStartPosition(n,i,e,t){n=_objectSpread$l({},n);var o=splitPlacement(i),d=_slicedToArray$j(o,1),p=d[0],h=(e>0?e:t)*2;return isVerticalPosition(p)?n.top+=p==="top"?h:-h:n.left+=p==="left"?h:-h,"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getEndPosition(n){return"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getArrowPositionStyles(n,i){var e,t=splitPlacement(i),o=_slicedToArray$j(t,1),d=o[0],p=getOppositePosition(d);if(!p)return null;var h=isVerticalPosition(d)?"left":"top";return e={},_defineProperty$o(e,h,"".concat(n[h],"px")),_defineProperty$o(e,p,"-".concat(ARROW_SIZE-2,"px")),e}function ownKeys$l(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$k(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$l(Object(e),!0).forEach(function(t){_defineProperty$n(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$l(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$n(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function getBodyStyles(n){var i=n.$animationDuration,e=n.$isOpen,t=n.$isAnimating,o=n.$placement,d=n.$popoverOffset,p=n.$showArrow,h=n.$theme,y=n.$popoverMargin,$=n.$isHoverTrigger;return _objectSpread$k(_objectSpread$k({position:"absolute",top:0,left:0,backgroundColor:h.colors.backgroundTertiary,borderTopLeftRadius:h.borders.popoverBorderRadius,borderTopRightRadius:h.borders.popoverBorderRadius,borderBottomRightRadius:h.borders.popoverBorderRadius,borderBottomLeftRadius:h.borders.popoverBorderRadius,boxShadow:h.lighting.shadow600,transitionProperty:"opacity,transform",transitionDuration:t?e?"0.1s":"".concat(i,"ms"):"0s",transitionTimingFunction:e?h.animation.easeOutCurve:h.animation.easeInCurve,opacity:t&&e?1:0,transform:t&&e?getEndPosition(d):getStartPosition(d,o,p?ARROW_SIZE:0,y)},getPopoverMarginStyles(p?ARROW_SIZE:0,o,y)),$?{animationDuration:".1s",animationName:{"0%":{pointerEvents:"none"},"99%":{pointerEvents:"none"},"100%":{pointerEvents:"auto"}}}:{})}var Body$3=styled$1("div",getBodyStyles);Body$3.displayName="Body";Body$3.displayName="Body";function getArrowStyles(n){var i=n.$arrowOffset,e=n.$placement,t=n.$theme;return _objectSpread$k({backgroundColor:t.colors.backgroundTertiary,boxShadow:t.lighting.shadow600,width:"".concat(ARROW_WIDTH,"px"),height:"".concat(ARROW_WIDTH,"px"),transform:"rotate(45deg)",position:"absolute"},getArrowPositionStyles(i,e))}var Arrow$1=styled$1("div",getArrowStyles);Arrow$1.displayName="Arrow";Arrow$1.displayName="Arrow";function getInnerStyles(n){var i=n.$theme;return{backgroundColor:i.colors.backgroundTertiary,borderTopLeftRadius:i.borders.popoverBorderRadius,borderTopRightRadius:i.borders.popoverBorderRadius,borderBottomRightRadius:i.borders.popoverBorderRadius,borderBottomLeftRadius:i.borders.popoverBorderRadius,color:i.colors.contentPrimary,position:"relative"}}var Inner$1=styled$1("div",getInnerStyles);Inner$1.displayName="Inner";Inner$1.displayName="Inner";var Padding=styled$1("div",{paddingLeft:"12px",paddingTop:"12px",paddingRight:"12px",paddingBottom:"12px"});Padding.displayName="Padding";Padding.displayName="Padding";var Hidden=styled$1("div",{display:"none"});Hidden.displayName="Hidden";Hidden.displayName="Hidden";var baseDefaultProps$1={accessibilityType:ACCESSIBILITY_TYPE.menu,focusLock:!1,autoFocus:!0,returnFocus:!0,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT$1.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,renderAll:!1};function ownKeys$k(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$j(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$k(Object(e),!0).forEach(function(t){_defineProperty$m(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$k(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$s(){return _extends$s=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$s.apply(this,arguments)}function _typeof$b(n){"@babel/helpers - typeof";return _typeof$b=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$b(n)}function _classCallCheck$b(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$b(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$b(n,i,e){return i&&_defineProperties$b(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$b(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$a(n,i)}function _setPrototypeOf$a(n,i){return _setPrototypeOf$a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$a(n,i)}function _createSuper$b(n){var i=_isNativeReflectConstruct$b();return function(){var t=_getPrototypeOf$b(n),o;if(i){var d=_getPrototypeOf$b(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$b(this,o)}}function _possibleConstructorReturn$b(n,i){if(i&&(_typeof$b(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$b(n)}function _assertThisInitialized$b(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$b(){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$b(n){return _getPrototypeOf$b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$b(n)}function _defineProperty$m(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var PopoverInner=(function(n){_inherits$b(e,n);var i=_createSuper$b(e);function e(){var t;_classCallCheck$b(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$m(_assertThisInitialized$b(t),"animateInTimer",void 0),_defineProperty$m(_assertThisInitialized$b(t),"animateOutTimer",void 0),_defineProperty$m(_assertThisInitialized$b(t),"animateOutCompleteTimer",void 0),_defineProperty$m(_assertThisInitialized$b(t),"onMouseEnterTimer",void 0),_defineProperty$m(_assertThisInitialized$b(t),"onMouseLeaveTimer",void 0),_defineProperty$m(_assertThisInitialized$b(t),"anchorRef",reactExports.createRef()),_defineProperty$m(_assertThisInitialized$b(t),"popperRef",reactExports.createRef()),_defineProperty$m(_assertThisInitialized$b(t),"arrowRef",reactExports.createRef()),_defineProperty$m(_assertThisInitialized$b(t),"state",t.getDefaultState(t.props)),_defineProperty$m(_assertThisInitialized$b(t),"animateIn",function(){t.props.isOpen&&t.setState({isAnimating:!0})}),_defineProperty$m(_assertThisInitialized$b(t),"animateOut",function(){t.props.isOpen||(t.setState({isAnimating:!0}),t.animateOutCompleteTimer=setTimeout(function(){t.setState({isAnimating:!1,placement:t.props.placement})},t.props.animateOutTime||ANIMATE_OUT_TIME))}),_defineProperty$m(_assertThisInitialized$b(t),"onAnchorClick",function(h){t.props.onClick&&t.props.onClick(h)}),_defineProperty$m(_assertThisInitialized$b(t),"onAnchorMouseEnter",function(h){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer),t.triggerOnMouseEnterWithDelay(h)}),_defineProperty$m(_assertThisInitialized$b(t),"onAnchorMouseLeave",function(h){t.onMouseEnterTimer&&clearTimeout(t.onMouseEnterTimer),t.triggerOnMouseLeaveWithDelay(h)}),_defineProperty$m(_assertThisInitialized$b(t),"onPopoverMouseEnter",function(){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer)}),_defineProperty$m(_assertThisInitialized$b(t),"onPopoverMouseLeave",function(h){t.triggerOnMouseLeaveWithDelay(h)}),_defineProperty$m(_assertThisInitialized$b(t),"onPopperUpdate",function(h,y){var $=fromPopperPlacement(y.placement)||PLACEMENT$1.top;return t.setState({arrowOffset:h.arrow,popoverOffset:h.popper,placement:$}),t.animateInTimer=setTimeout(t.animateIn,ANIMATE_IN_TIME),y}),_defineProperty$m(_assertThisInitialized$b(t),"triggerOnMouseLeave",function(h){t.props.onMouseLeave&&t.props.onMouseLeave(h)}),_defineProperty$m(_assertThisInitialized$b(t),"triggerOnMouseEnter",function(h){t.props.onMouseEnter&&t.props.onMouseEnter(h)}),_defineProperty$m(_assertThisInitialized$b(t),"onDocumentClick",function(h){var y=h.composedPath?h.composedPath()[0]:h.target,$=t.popperRef.current,E=t.anchorRef.current;!$||$===y||y instanceof Node&&$.contains(y)||!E||E===y||y instanceof Node&&E.contains(y)||t.props.onClickOutside&&t.props.onClickOutside(h)}),t}return _createClass$b(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(o,d){this.init(o,d),this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip&&this.props.autoFocus&&!this.state.autoFocusAfterPositioning&&this.popperRef.current!==null&&this.popperRef.current.getBoundingClientRect().top>0&&this.setState({autoFocusAfterPositioning:!0})}},{key:"init",value:function(o,d){if(this.props.isOpen!==o.isOpen||this.state.isMounted!==d.isMounted||this.state.isLayerMounted!==d.isLayerMounted){if(this.props.isOpen&&this.state.isLayerMounted){this.clearTimers();return}if(!this.props.isOpen&&o.isOpen){this.animateOutTimer=setTimeout(this.animateOut,20);return}}}},{key:"componentWillUnmount",value:function(){this.clearTimers()}},{key:"getDefaultState",value:function(o){return{isAnimating:!1,arrowOffset:{left:0,top:0},popoverOffset:{left:0,top:0},placement:o.placement,isMounted:!1,isLayerMounted:!1,autoFocusAfterPositioning:!1}}},{key:"clearTimers",value:function(){[this.animateInTimer,this.animateOutTimer,this.animateOutCompleteTimer,this.onMouseEnterTimer,this.onMouseLeaveTimer].forEach(function(o){o&&clearTimeout(o)})}},{key:"triggerOnMouseLeaveWithDelay",value:function(o){var d=this,p=this.props.onMouseLeaveDelay;if(p){this.onMouseLeaveTimer=setTimeout(function(){return d.triggerOnMouseLeave(o)},p);return}this.triggerOnMouseLeave(o)}},{key:"triggerOnMouseEnterWithDelay",value:function(o){var d=this,p=this.props.onMouseEnterDelay;if(p){this.onMouseEnterTimer=setTimeout(function(){return d.triggerOnMouseEnter(o)},p);return}this.triggerOnMouseEnter(o)}},{key:"isClickTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.click}},{key:"isHoverTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.hover}},{key:"isAccessibilityTypeMenu",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.menu}},{key:"isAccessibilityTypeTooltip",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.tooltip}},{key:"getAnchorIdAttr",value:function(){var o=this.getPopoverIdAttr();return o?"".concat(o,"__anchor"):null}},{key:"getPopoverIdAttr",value:function(){return this.props.id||null}},{key:"getAnchorProps",value:function(){var o=this.props.isOpen,d={ref:this.anchorRef},p=this.getPopoverIdAttr();if(this.isAccessibilityTypeMenu()){var h=this.isClickTrigger()?"aria-controls":"aria-owns";d[h]=o?p:null,d["aria-haspopup"]=!0,d["aria-expanded"]=!!o}else this.isAccessibilityTypeTooltip()&&(d.id=this.getAnchorIdAttr(),d["aria-describedby"]=o?p:null);return this.isHoverTrigger()?(d.onMouseEnter=this.onAnchorMouseEnter,d.onMouseLeave=this.onAnchorMouseLeave,d.onBlur=this.props.onBlur,d.onFocus=this.props.onFocus):d.onClick=this.onAnchorClick,d}},{key:"getPopoverBodyProps",value:function(){var o={},d=this.getPopoverIdAttr();return this.isAccessibilityTypeMenu()?o.id=d:this.isAccessibilityTypeTooltip()&&(o.id=d,o.role="tooltip"),this.isHoverTrigger()&&(o.onMouseEnter=this.onPopoverMouseEnter,o.onMouseLeave=this.onPopoverMouseLeave),o}},{key:"getSharedProps",value:function(){var o=this.props,d=o.isOpen,p=o.showArrow,h=o.popoverMargin,y=h===void 0?POPOVER_MARGIN:h,$=this.state,E=$.isAnimating,M=$.arrowOffset,H=$.popoverOffset,Z=$.placement;return{$showArrow:!!p,$arrowOffset:M,$popoverOffset:H,$placement:Z,$isAnimating:E,$animationDuration:this.props.animateOutTime||ANIMATE_OUT_TIME,$isOpen:d,$popoverMargin:y,$isHoverTrigger:this.isHoverTrigger()}}},{key:"getAnchorFromChildren",value:function(){var o=this.props.children,d=reactExports.Children.toArray(o);return d.length!==1&&console.error("[baseui] Exactly 1 child must be passed to Popover/Tooltip, found ".concat(d.length," children")),d[0]}},{key:"renderAnchor",value:function(){var o=this.getAnchorFromChildren();if(!o)return null;var d=reactExports.isValidElement(o),p=this.getAnchorProps();return _typeof$b(o)==="object"&&d?reactExports.cloneElement(o,p):reactExports.createElement("span",_extends$s({key:"popover-anchor"},p),o)}},{key:"renderPopover",value:function(o){var d=this.props,p=d.showArrow,h=d.overrides,y=h===void 0?{}:h,$=y.Arrow,E=y.Body,M=y.Inner,H=getOverride($)||Arrow$1,Z=getOverride(E)||Body$3,be=getOverride(M)||Inner$1,ye=this.getSharedProps(),we=this.getPopoverBodyProps();return reactExports.createElement(Z,_extends$s({key:"popover-body",ref:this.popperRef,"data-baseweb":this.props["data-baseweb"]||"popover"},we,ye,getOverrideProps(E)),p?reactExports.createElement(H,_extends$s({key:"popover-arrow",ref:this.arrowRef},ye,getOverrideProps($))):null,reactExports.createElement(be,_extends$s({},ye,getOverrideProps(M)),o))}},{key:"renderContent",value:function(){var o=this.props.content;return typeof o=="function"?o():o}},{key:"render",value:function(){var o=this,d=this.state.isMounted&&(this.props.isOpen||this.state.isAnimating),p=[this.renderAnchor()],h=d||this.props.renderAll?this.renderContent():null,y={modifiers:{preventOverflow:{enabled:!this.props.ignoreBoundary,padding:0}}};return h&&(d?p.push(reactExports.createElement(Layer,{key:"new-layer",mountNode:this.props.mountNode,onEscape:this.props.onEsc,onDocumentClick:this.isHoverTrigger()?void 0:this.onDocumentClick,isHoverLayer:this.isHoverTrigger(),onMount:function(){return o.setState({isLayerMounted:!0})},onUnmount:function(){return o.setState({isLayerMounted:!1})}},reactExports.createElement(Tether,{anchorRef:this.anchorRef.current,arrowRef:this.arrowRef.current,popperRef:this.popperRef.current,popperOptions:_objectSpread$j(_objectSpread$j({},y),this.props.popperOptions),onPopperUpdate:this.onPopperUpdate,placement:this.state.placement},this.props.focusLock&&this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip?reactExports.createElement(FocusLockCombination,{disabled:!this.props.focusLock,noFocusGuards:!1,returnFocus:!this.isHoverTrigger()&&this.props.returnFocus,autoFocus:this.state.autoFocusAfterPositioning,crossFrame:!1,focusOptions:this.props.focusOptions},this.renderPopover(h)):reactExports.createElement(MoveFocusInside,{disabled:!this.props.autoFocus||!this.state.autoFocusAfterPositioning},this.renderPopover(h))))):p.push(reactExports.createElement(Hidden,{key:"hidden-layer"},h))),p}}]),e})(reactExports.Component);_defineProperty$m(PopoverInner,"defaultProps",baseDefaultProps$1);var Popover$2=function n(i){var e=i.innerRef,t=useUID();return reactExports.createElement(PopoverInner,_extends$s({id:i.id||t,ref:e},i))};Popover$2.defaultProps=baseDefaultProps$1;var _excluded$o=["children"];function _objectWithoutProperties$p(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$o(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$o(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 StatefulPopover(n){var i=n.children,e=_objectWithoutProperties$p(n,_excluded$o);return reactExports.createElement(StatefulContainer$1,e,function(t){return reactExports.createElement(Popover$2,t,i)})}StatefulPopover.defaultProps={accessibilityType:ACCESSIBILITY_TYPE.menu,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT$1.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,dismissOnClickOutside:!0,dismissOnEsc:!0,stateReducer:function n(i,e){return e},popoverMargin:POPOVER_MARGIN};var baseDefaultProps={accessibilityType:ACCESSIBILITY_TYPE.tooltip,focusLock:!1,autoFocus:!1,returnFocus:!1,onMouseEnterDelay:200,onMouseLeaveDelay:200,overrides:{},placement:PLACEMENT$1.auto,popoverMargin:0,showArrow:!1,triggerType:TRIGGER_TYPE.hover,renderAll:!1};function _typeof$a(n){"@babel/helpers - typeof";return _typeof$a=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$a(n)}function ownKeys$j(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$i(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$j(Object(e),!0).forEach(function(t){_defineProperty$l(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$j(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$a(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$a(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$a(n,i,e){return i&&_defineProperties$a(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$a(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$9(n,i)}function _setPrototypeOf$9(n,i){return _setPrototypeOf$9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$9(n,i)}function _createSuper$a(n){var i=_isNativeReflectConstruct$a();return function(){var t=_getPrototypeOf$a(n),o;if(i){var d=_getPrototypeOf$a(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$a(this,o)}}function _possibleConstructorReturn$a(n,i){if(i&&(_typeof$a(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$a(n)}function _assertThisInitialized$a(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$a(){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$a(n){return _getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$a(n)}function _defineProperty$l(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var StatefulContainer=(function(n){_inherits$a(e,n);var i=_createSuper$a(e);function e(){return _classCallCheck$a(this,e),i.apply(this,arguments)}return _createClass$a(e,[{key:"render",value:function(){return reactExports.createElement(StatefulContainer$1,this.props)}}]),e})(reactExports.Component);_defineProperty$l(StatefulContainer,"defaultProps",_objectSpread$i({},baseDefaultProps));function ownKeys$i(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$h(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$i(Object(e),!0).forEach(function(t){_defineProperty$k(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$i(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$k(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Body$2=styled$1("div",function(n){return _objectSpread$h(_objectSpread$h({},getBodyStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,boxShadow:n.$theme.lighting.shadow400,color:n.$theme.colors.tooltipText,transitionProperty:"opacity",transform:getEndPosition(n.$popoverOffset)})});Body$2.displayName="Body";Body$2.displayName="Body";var Inner=styled$1("div",function(n){return _objectSpread$h(_objectSpread$h(_objectSpread$h({},getInnerStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,paddingTop:n.$theme.sizing.scale300,paddingBottom:n.$theme.sizing.scale300,paddingLeft:n.$theme.sizing.scale600,paddingRight:n.$theme.sizing.scale600},n.$theme.typography.font150),{},{color:n.$theme.colors.tooltipText})});Inner.displayName="Inner";Inner.displayName="Inner";var Arrow=styled$1("div",function(n){return _objectSpread$h(_objectSpread$h({},getArrowStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground})});Arrow.displayName="Arrow";Arrow.displayName="Arrow";function _typeof$9(n){"@babel/helpers - typeof";return _typeof$9=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$9(n)}function ownKeys$h(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$g(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$h(Object(e),!0).forEach(function(t){_defineProperty$j(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$h(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$r(){return _extends$r=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$r.apply(this,arguments)}function _classCallCheck$9(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(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$9(n,i,e){return i&&_defineProperties$9(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$9(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$8(n,i)}function _setPrototypeOf$8(n,i){return _setPrototypeOf$8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$8(n,i)}function _createSuper$9(n){var i=_isNativeReflectConstruct$9();return function(){var t=_getPrototypeOf$9(n),o;if(i){var d=_getPrototypeOf$9(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$9(this,o)}}function _possibleConstructorReturn$9(n,i){if(i&&(_typeof$9(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$9(n)}function _assertThisInitialized$9(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$9(){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$9(n){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$9(n)}function _defineProperty$j(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Tooltip$2=(function(n){_inherits$9(e,n);var i=_createSuper$9(e);function e(){return _classCallCheck$9(this,e),i.apply(this,arguments)}return _createClass$9(e,[{key:"render",value:function(){var o=mergeOverrides({Arrow,Body:Body$2,Inner},this.props.overrides);return reactExports.createElement(Popover$2,_extends$r({autoFocus:!1,"data-baseweb":"tooltip"},this.props,{overrides:o}))}}]),e})(reactExports.Component);_defineProperty$j(Tooltip$2,"defaultProps",_objectSpread$g({},baseDefaultProps));var _excluded$n=["children"];function _objectWithoutProperties$o(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$n(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$n(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 StatefulTooltip(n){var i=n.children,e=_objectWithoutProperties$o(n,_excluded$n);return reactExports.createElement(StatefulContainer,e,function(t){return reactExports.createElement(Tooltip$2,t,i)})}StatefulTooltip.defaultProps=StatefulContainer.defaultProps;function useTooltipMeasurementSideEffect(n,i){const{innerWidth:e}=useWindowDimensionsContext();reactExports.useEffect(()=>{const t=n?.parentElement;if(!t)return;(async()=>{const d=()=>{const H=t.getBoundingClientRect();return H.x!==0||H.y!==0?H:null};let p=null,h=0;const y=5;for(;!p&&h<y;)p=d(),p||(h++,await new Promise(H=>requestAnimationFrame(H)));p||(p=t.getBoundingClientRect());const $=p.x,E=$+p.width-e,M=t.parentElement;if(E>0&&M){const H=new DOMMatrix(window.getComputedStyle(M)?.transform);M.style.transform=`translate3d(${H.e-E}px, ${H.f}px, 0px)`}$<0&&(t.style.left=`${-$}px`)})()},[n,i,e])}var Placement=(function(n){return n.AUTO="auto",n.TOP_LEFT="topLeft",n.TOP="top",n.TOP_RIGHT="topRight",n.RIGHT_TOP="rightTop",n.RIGHT="right",n.RIGHT_BOTTOM="rightBottom",n.BOTTOM_RIGHT="bottomRight",n.BOTTOM="bottom",n.BOTTOM_LEFT="bottomLeft",n.LEFT_BOTTOM="leftBottom",n.LEFT="left",n.LEFT_TOP="leftTop",n})({});const generateDefaultTooltipOverrides=(n,i)=>{const{colors:e,fontSizes:t,radii:o,fontWeights:d}=n;return{Body:{style:{borderTopLeftRadius:o.default,borderTopRightRadius:o.default,borderBottomLeftRadius:o.default,borderBottomRightRadius:o.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:hasLightBackgroundColor(n)?e.bgColor:e.secondaryBg,color:e.bodyText,fontSize:t.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"},...i}}};function Tooltip({content:n,placement:i,children:e,inline:t,style:o,onMouseEnterDelay:d,overrides:p,containerWidth:h,error:y}){const $=useEmotionTheme(),[E,M]=reactExports.useState(null),[H,Z]=reactExports.useState(!1),be=reactExports.useRef(null),ye=reactExports.useCallback(()=>{Z(!0)},[]),we=reactExports.useCallback(()=>{Z(!1),be.current=null},[]);reactExports.useEffect(()=>()=>{be.current=null},[]);const xe=reactExports.useCallback(Fe=>{if(Fe.key!=="Escape"||!H)return;const Me=Fe.currentTarget,Le=Me.ownerDocument?.activeElement;Le instanceof HTMLElement&&Me.contains(Le)&&(be.current?.(),Fe.preventDefault(),Fe.stopPropagation())},[H]);useTooltipMeasurementSideEffect(E,H);const Ce=generateDefaultTooltipOverrides($,p),Ne=reactExports.useCallback(({close:Fe})=>(be.current=Fe,jsx$1(StyledTooltipContentWrapper,{className:y?"stTooltipErrorContent":"stTooltipContent","data-testid":y?"stTooltipErrorContent":"stTooltipContent",ref:M,children:n})),[n,y,M]);return jsx$1(StatefulTooltip,{onOpen:ye,onClose:we,content:n?Ne:null,placement:PLACEMENT$1[i],accessibilityType:ACCESSIBILITY_TYPE.tooltip,showArrow:!1,popoverMargin:10,onMouseEnterDelay:d,overrides:Ce,children:jsx$1("div",{style:{display:"flex",flexDirection:"row",justifyContent:t?"flex-end":"",width:h?"100%":"auto",...o},onKeyDownCapture:xe,"data-testid":y?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",className:y?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",children:e})})}const Tooltip$1=reactExports.memo(Tooltip);function OverflowTooltip({content:n,placement:i,children:e,inline:t,style:o}){const d=reactExports.useRef(null),[p,h]=reactExports.useState(!1);return reactExports.useEffect(()=>{const y=d?.current?d.current.offsetWidth<d.current.scrollWidth:!1;y!==p&&h(y)},[e,p]),jsx$1(Tooltip$1,{content:p?n:"",placement:i,inline:t,children:jsx$1(StyledWrapper,{children:jsx$1(StyledEllipsizedDiv,{ref:d,style:o,children:e})})})}const StyledTooltipTriggerButton=styled("button",{target:"e96ujdg0"})(({theme:n})=>({background:"none",border:"none",padding:0,margin:0,color:"inherit",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:0,cursor:"help","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default}})),StyledTooltipIconWrapper=styled("div",{target:"e96ujdg1"})(({isLatex:n,theme:i})=>({display:"flex",alignItems:"center",marginTop:n?i.spacing.md:"0","& .stTooltipHoverTarget svg.icon":{stroke:i.colors.fadedText60,strokeWidth:i.sizes.defaultStrokeWidth}})),StyledLabelHelpWrapper=styled("div",{target:"e96ujdg2"})(({isLatex:n})=>({display:"flex",flexDirection:"row",alignItems:"center",visibility:"visible",width:n?"fit-content":"100%",...n?{maxWidth:"100%",marginInline:"auto"}:{}})),StyledLabelHelpInline=styled("label",{target:"e96ujdg3"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));function _extends$q(){return _extends$q=Object.assign||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$q.apply(this,arguments)}function _objectWithoutProperties$n(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$m(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$m(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}var Check=reactExports.forwardRef(function(n,i){var e=n.color,t=e===void 0?"currentColor":e,o=n.size,d=o===void 0?24:o,p=_objectWithoutProperties$n(n,["color","size"]);return React.createElement("svg",_extends$q({ref:i,xmlns:"http://www.w3.org/2000/svg",width:d,height:d,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),React.createElement("polyline",{points:"20 6 9 17 4 12"}))});Check.propTypes={color:PropTypes.string,size:PropTypes.oneOfType([PropTypes.string,PropTypes.number])};Check.displayName="Check";function _extends$p(){return _extends$p=Object.assign||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$p.apply(this,arguments)}function _objectWithoutProperties$m(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$l(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$l(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}var Copy=reactExports.forwardRef(function(n,i){var e=n.color,t=e===void 0?"currentColor":e,o=n.size,d=o===void 0?24:o,p=_objectWithoutProperties$m(n,["color","size"]);return React.createElement("svg",_extends$p({ref:i,xmlns:"http://www.w3.org/2000/svg",width:d,height:d,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),React.createElement("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),React.createElement("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))});Copy.propTypes={color:PropTypes.string,size:PropTypes.oneOfType([PropTypes.string,PropTypes.number])};Copy.displayName="Copy";function _extends$o(){return _extends$o=Object.assign||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$o.apply(this,arguments)}function _objectWithoutProperties$l(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$k(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$k(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}var HelpCircle=reactExports.forwardRef(function(n,i){var e=n.color,t=e===void 0?"currentColor":e,o=n.size,d=o===void 0?24:o,p=_objectWithoutProperties$l(n,["color","size"]);return React.createElement("svg",_extends$o({ref:i,xmlns:"http://www.w3.org/2000/svg",width:d,height:d,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),React.createElement("circle",{cx:"12",cy:"12",r:"10"}),React.createElement("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),React.createElement("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"}))});HelpCircle.propTypes={color:PropTypes.string,size:PropTypes.oneOfType([PropTypes.string,PropTypes.number])};HelpCircle.displayName="HelpCircle";function _extends$n(){return _extends$n=Object.assign||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$n.apply(this,arguments)}function _objectWithoutProperties$k(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$j(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$j(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}var Link2=reactExports.forwardRef(function(n,i){var e=n.color,t=e===void 0?"currentColor":e,o=n.size,d=o===void 0?24:o,p=_objectWithoutProperties$k(n,["color","size"]);return React.createElement("svg",_extends$n({ref:i,xmlns:"http://www.w3.org/2000/svg",width:d,height:d,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),React.createElement("path",{d:"M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"}),React.createElement("line",{x1:"8",y1:"12",x2:"16",y2:"12"}))});Link2.propTypes={color:PropTypes.string,size:PropTypes.oneOfType([PropTypes.string,PropTypes.number])};Link2.displayName="Link2";const scriptRel="modulepreload",assetsURL=function(n,i){return new URL(n,i).href},seen={},__vitePreload=function n(i,e,t){let o=Promise.resolve();if(e&&e.length>0){let $=function(E){return Promise.all(E.map(M=>Promise.resolve(M).then(H=>({status:"fulfilled",value:H}),H=>({status:"rejected",reason:H}))))};const p=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),y=h?.nonce||h?.getAttribute("nonce");o=$(e.map(E=>{if(E=assetsURL(E,t),E in seen)return;seen[E]=!0;const M=E.endsWith(".css"),H=M?'[rel="stylesheet"]':"";if(t)for(let be=p.length-1;be>=0;be--){const ye=p[be];if(ye.href===E&&(!M||ye.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${E}"]${H}`))return;const Z=document.createElement("link");if(Z.rel=M?"stylesheet":scriptRel,M||(Z.as="script"),Z.crossOrigin="",Z.href=E,y&&Z.setAttribute("nonce",y),document.head.appendChild(Z),M)return new Promise((be,ye)=>{Z.addEventListener("load",be),Z.addEventListener("error",()=>ye(new Error(`Unable to preload CSS for ${E}`)))})}))}function d(p){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=p,window.dispatchEvent(h),!h.defaultPrevented)throw p}return o.then(p=>{for(const h of p||[])h.status==="rejected"&&d(h.reason);return i().catch(d)})};function escapeStringRegexp$1(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const replacements=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ə","A"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ō","O"],["Ő","O"],["Ø","O"],["Œ","OE"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ə","a"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ō","o"],["ő","o"],["ø","o"],["œ","oe"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","a"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ","a"],["ُ","u"],["ِ","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ու","u"],["ՈՒ","U"],["Ու","U"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","k"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","O"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(c)"],["ⓓ","(d)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"],["−","-"],["⁓","-"]],danishNorwegianReplacements=[["æ","ae"],["Æ","Ae"],["ø","oe"],["Ø","Oe"],["å","aa"],["Å","Aa"]],localeReplacements={sv:[["ä","a"],["Ä","A"],["ö","o"],["Ö","O"],["å","a"],["Å","A"]],da:danishNorwegianReplacements,nb:danishNorwegianReplacements,de:[["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["ß","ss"],["ẞ","Ss"]],tr:[["â","a"],["Â","A"],["ö","o"],["Ö","O"],["ü","u"],["Ü","U"]],hu:[["ű","u"],["Ű","U"],["ö","o"],["Ö","O"],["ü","u"],["Ü","U"],["á","a"],["Á","A"],["é","e"],["É","E"],["í","i"],["Í","I"],["ó","o"],["Ó","O"],["ú","u"],["Ú","U"]],sr:[["ђ","dj"],["Ђ","Dj"],["џ","dz"],["Џ","Dz"],["љ","lj"],["Љ","Lj"],["њ","nj"],["Њ","Nj"],["ћ","c"],["Ћ","C"],["ч","ch"],["Ч","Ch"],["ш","sh"],["Ш","Sh"],["ж","zh"],["Ж","Zh"]]},doCustomReplacements=(n,i)=>{for(const[e,t]of i)n=n.replaceAll(e,t);return n},getLocaleReplacements=n=>{if(!n)return[];const i=n.toLowerCase().replace(/^no(-|$)/,"nb$1");return localeReplacements[i]||localeReplacements[i.split("-")[0]]||[]};function transliterate(n,i){if(typeof n!="string")throw new TypeError(`Expected a string, got \`${typeof n}\``);i={customReplacements:[],...i};const e=getLocaleReplacements(i.locale),t=new Map([...replacements,...e,...i.customReplacements]);return n=n.normalize(),n=doCustomReplacements(n,t),n=n.normalize("NFD").replaceAll(new RegExp("\\p{Diacritic}","gu"),"").normalize(),n=n.replaceAll(new RegExp("\\p{Dash_Punctuation}","gu"),"-"),n}const overridableReplacements=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],decamelize=n=>n.replaceAll(/([A-Z]{2,})(\d+)/g,"$1 $2").replaceAll(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replaceAll(/([a-z\d])([A-Z])/g,"$1 $2").replaceAll(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"),removeMootSeparators=(n,i)=>{const e=escapeStringRegexp$1(i);return n.replaceAll(new RegExp(`(?:${e}){2,}`,"g"),i).replaceAll(new RegExp(`^(?:${e})|(?:${e})$`,"g"),"")},buildPatternSlug=n=>{let i=String.raw`a-z\d`;if(i+=n.lowercase?"":"A-Z",n.transliterate===!1&&(i+=String.raw`\p{L}\p{N}`),n.preserveCharacters.length>0)for(const t of n.preserveCharacters){if(t===n.separator)throw new Error(`The separator character \`${n.separator}\` cannot be included in preserved characters: ${n.preserveCharacters}`);i+=escapeStringRegexp$1(t)}const e=n.transliterate?"g":"gu";return new RegExp(`[^${i}]+`,e)};function slugify(n,i){if(typeof n!="string")throw new TypeError(`Expected a string, got \`${typeof n}\``);i={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],transliterate:!0,...i};const e=i.preserveLeadingUnderscore&&n.startsWith("_"),t=i.preserveTrailingDash&&n.endsWith("-");if(i.transliterate){const d=new Map([...overridableReplacements,...i.customReplacements]);n=transliterate(n,{customReplacements:d,locale:i.locale})}else if(i.customReplacements.length>0)for(const[d,p]of i.customReplacements)n=n.replaceAll(d,p);i.decamelize&&(n=decamelize(n));const o=buildPatternSlug(i);return i.lowercase&&(n=i.locale?n.toLocaleLowerCase(i.locale):n.toLowerCase()),n=n.replaceAll(/([a-zA-Z\d]+)['\u2019]([ts])(\s|$)/g,"$1$2$3"),n=n.replace(o,i.separator),n=n.replaceAll("\\",""),i.separator&&(n=removeMootSeparators(n,i.separator)),e&&(n=`_${n}`),t&&(n=`${n}-`),n}function escapeStringRegexp(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const convert=(function(n){if(n==null)return ok$1;if(typeof n=="function")return castFactory(n);if(typeof n=="object")return Array.isArray(n)?anyFactory(n):propsFactory(n);if(typeof n=="string")return typeFactory(n);throw new Error("Expected function, string, or object as test")});function anyFactory(n){const i=[];let e=-1;for(;++e<n.length;)i[e]=convert(n[e]);return castFactory(t);function t(...o){let d=-1;for(;++d<i.length;)if(i[d].apply(this,o))return!0;return!1}}function propsFactory(n){const i=n;return castFactory(e);function e(t){const o=t;let d;for(d in n)if(o[d]!==i[d])return!1;return!0}}function typeFactory(n){return castFactory(i);function i(e){return e&&e.type===n}}function castFactory(n){return i;function i(e,t,o){return!!(looksLikeANode(e)&&n.call(this,e,typeof t=="number"?t:void 0,o||void 0))}}function ok$1(){return!0}function looksLikeANode(n){return n!==null&&typeof n=="object"&&"type"in n}function color(n){return n}const empty$1=[],CONTINUE=!0,EXIT=!1,SKIP="skip";function visitParents(n,i,e,t){let o;typeof i=="function"&&typeof e!="function"?(t=e,e=i):o=i;const d=convert(o),p=t?-1:1;h(n,void 0,[])();function h(y,$,E){const M=y&&typeof y=="object"?y:{};if(typeof M.type=="string"){const Z=typeof M.tagName=="string"?M.tagName:typeof M.name=="string"?M.name:void 0;Object.defineProperty(H,"name",{value:"node ("+(y.type+(Z?"<"+Z+">":""))+")"})}return H;function H(){let Z=empty$1,be,ye,we;if((!i||d(y,$,E[E.length-1]||void 0))&&(Z=toResult(e(y,E)),Z[0]===EXIT))return Z;if("children"in y&&y.children){const xe=y;if(xe.children&&Z[0]!==SKIP)for(ye=(t?xe.children.length:-1)+p,we=E.concat(xe);ye>-1&&ye<xe.children.length;){const Ce=xe.children[ye];if(be=h(Ce,ye,we)(),be[0]===EXIT)return be;ye=typeof be[1]=="number"?be[1]:ye+p}}return Z}}}function toResult(n){return Array.isArray(n)?n:typeof n=="number"?[CONTINUE,n]:n==null?empty$1:[n]}function findAndReplace(n,i,e){const o=convert((e||{}).ignore||[]),d=toPairs(i);let p=-1;for(;++p<d.length;)visitParents(n,"text",h);function h($,E){let M=-1,H;for(;++M<E.length;){const Z=E[M],be=H?H.children:void 0;if(o(Z,be?be.indexOf(Z):void 0,H))return;H=Z}if(H)return y($,E)}function y($,E){const M=E[E.length-1],H=d[p][0],Z=d[p][1];let be=0;const we=M.children.indexOf($);let xe=!1,Ce=[];H.lastIndex=0;let Ne=H.exec($.value);for(;Ne;){const Fe=Ne.index,Me={index:Ne.index,input:Ne.input,stack:[...E,$]};let Le=Z(...Ne,Me);if(typeof Le=="string"&&(Le=Le.length>0?{type:"text",value:Le}:void 0),Le===!1?H.lastIndex=Fe+1:(be!==Fe&&Ce.push({type:"text",value:$.value.slice(be,Fe)}),Array.isArray(Le)?Ce.push(...Le):Le&&Ce.push(Le),be=Fe+Ne[0].length,xe=!0),!H.global)break;Ne=H.exec($.value)}return xe?(be<$.value.length&&Ce.push({type:"text",value:$.value.slice(be)}),M.children.splice(we,1,...Ce)):Ce=[$],we+Ce.length}}function toPairs(n){const i=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const e=!n[0]||Array.isArray(n[0])?n:[n];let t=-1;for(;++t<e.length;){const o=e[t];i.push([toExpression(o[0]),toFunction(o[1])])}return i}function toExpression(n){return typeof n=="string"?new RegExp(escapeStringRegexp(n),"g"):n}function toFunction(n){return typeof n=="function"?n:function(){return n}}function ok(){}function unreachable(){}function parse$2(n){const i=[],e=String(n||"");let t=e.indexOf(","),o=0,d=!1;for(;!d;){t===-1&&(t=e.length,d=!0);const p=e.slice(o,t).trim();(p||!d)&&i.push(p),o=t+1,t=e.indexOf(",",o)}return i}function stringify$1(n,i){const e={};return(n[n.length-1]===""?[...n,""]:n).join((e.padRight?" ":"")+","+(e.padLeft===!1?"":" ")).trim()}const nameRe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nameReJsx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,emptyOptions$5={};function name(n,i){return(emptyOptions$5.jsx?nameReJsx:nameRe).test(n)}const re=/[ \t\n\f\r]/g;function whitespace(n){return typeof n=="object"?n.type==="text"?empty(n.value):!1:empty(n)}function empty(n){return n.replace(re,"")===""}class Schema{constructor(i,e,t){this.normal=e,this.property=i,t&&(this.space=t)}}Schema.prototype.normal={};Schema.prototype.property={};Schema.prototype.space=void 0;function merge(n,i){const e={},t={};for(const o of n)Object.assign(e,o.property),Object.assign(t,o.normal);return new Schema(e,t,i)}function normalize$1(n){return n.toLowerCase()}class Info{constructor(i,e){this.attribute=e,this.property=i}}Info.prototype.attribute="";Info.prototype.booleanish=!1;Info.prototype.boolean=!1;Info.prototype.commaOrSpaceSeparated=!1;Info.prototype.commaSeparated=!1;Info.prototype.defined=!1;Info.prototype.mustUseProperty=!1;Info.prototype.number=!1;Info.prototype.overloadedBoolean=!1;Info.prototype.property="";Info.prototype.spaceSeparated=!1;Info.prototype.space=void 0;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const types$1=Object.freeze(Object.defineProperty({__proto__:null,boolean,booleanish,commaOrSpaceSeparated,commaSeparated,number,overloadedBoolean,spaceSeparated},Symbol.toStringTag,{value:"Module"})),checks=Object.keys(types$1);class DefinedInfo extends Info{constructor(i,e,t,o){let d=-1;if(super(i,e),mark$1(this,"space",o),typeof t=="number")for(;++d<checks.length;){const p=checks[d];mark$1(this,checks[d],(t&types$1[p])===types$1[p])}}}DefinedInfo.prototype.defined=!0;function mark$1(n,i,e){e&&(n[i]=e)}function create(n){const i={},e={};for(const[t,o]of Object.entries(n.properties)){const d=new DefinedInfo(t,n.transform(n.attributes||{},t),o,n.space);n.mustUseProperty&&n.mustUseProperty.includes(t)&&(d.mustUseProperty=!0),i[t]=d,e[normalize$1(t)]=t,e[normalize$1(d.attribute)]=t}return new Schema(i,e,n.space)}const aria=create({properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null},transform(n,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function caseSensitiveTransform(n,i){return i in n?n[i]:i}function caseInsensitiveTransform(n,i){return caseSensitiveTransform(n,i.toLowerCase())}const html$3=create({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,blocking:spaceSeparated,capture:null,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:overloadedBoolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:boolean,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shadowRootClonable:boolean,shadowRootDelegatesFocus:boolean,shadowRootMode:null,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null},space:"html",transform:caseInsensitiveTransform}),svg$1=create({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:caseSensitiveTransform}),xlink=create({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,i){return"xlink:"+i.slice(5).toLowerCase()}}),xmlns=create({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:caseInsensitiveTransform}),xml=create({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,i){return"xml:"+i.slice(3).toLowerCase()}}),hastToReact={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},cap$1=/[A-Z]/g,dash=/-[a-z]/g,valid=/^data[-\w.:]+$/i;function find(n,i){const e=normalize$1(i);let t=i,o=Info;if(e in n.normal)return n.property[n.normal[e]];if(e.length>4&&e.slice(0,4)==="data"&&valid.test(i)){if(i.charAt(4)==="-"){const d=i.slice(5).replace(dash,camelcase);t="data"+d.charAt(0).toUpperCase()+d.slice(1)}else{const d=i.slice(4);if(!dash.test(d)){let p=d.replace(cap$1,kebab);p.charAt(0)!=="-"&&(p="-"+p),i="data"+p}}o=DefinedInfo}return new o(t,i)}function kebab(n){return"-"+n.toLowerCase()}function camelcase(n){return n.charAt(1).toUpperCase()}const html$2=merge([aria,html$3,xlink,xmlns,xml],"html"),svg=merge([aria,svg$1,xlink,xmlns,xml],"svg");function parse$1(n){const i=String(n||"").trim();return i?i.split(/[ \t\n\r\f]+/g):[]}function stringify(n){return n.join(" ").trim()}var cjs$1={},inlineStyleParser,hasRequiredInlineStyleParser;function requireInlineStyleParser(){if(hasRequiredInlineStyleParser)return inlineStyleParser;hasRequiredInlineStyleParser=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,e=/^\s*/,t=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,d=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,p=/^[;\s]*/,h=/^\s+|\s+$/g,y=`
|
|
53
53
|
`,$="/",E="*",M="",H="comment",Z="declaration";inlineStyleParser=function(ye,we){if(typeof ye!="string")throw new TypeError("First argument must be a string");if(!ye)return[];we=we||{};var xe=1,Ce=1;function Ne(Qe){var Ye=Qe.match(i);Ye&&(xe+=Ye.length);var Ue=Qe.lastIndexOf(y);Ce=~Ue?Qe.length-Ue:Ce+Qe.length}function Fe(){var Qe={line:xe,column:Ce};return function(Ye){return Ye.position=new Me(Qe),Ke(),Ye}}function Me(Qe){this.start=Qe,this.end={line:xe,column:Ce},this.source=we.source}Me.prototype.content=ye;function Le(Qe){var Ye=new Error(we.source+":"+xe+":"+Ce+": "+Qe);if(Ye.reason=Qe,Ye.filename=we.source,Ye.line=xe,Ye.column=Ce,Ye.source=ye,!we.silent)throw Ye}function ze(Qe){var Ye=Qe.exec(ye);if(Ye){var Ue=Ye[0];return Ne(Ue),ye=ye.slice(Ue.length),Ye}}function Ke(){ze(e)}function Ve(Qe){var Ye;for(Qe=Qe||[];Ye=je();)Ye!==!1&&Qe.push(Ye);return Qe}function je(){var Qe=Fe();if(!($!=ye.charAt(0)||E!=ye.charAt(1))){for(var Ye=2;M!=ye.charAt(Ye)&&(E!=ye.charAt(Ye)||$!=ye.charAt(Ye+1));)++Ye;if(Ye+=2,M===ye.charAt(Ye-1))return Le("End of comment missing");var Ue=ye.slice(2,Ye-2);return Ce+=2,Ne(Ue),ye=ye.slice(Ye),Ce+=2,Qe({type:H,comment:Ue})}}function We(){var Qe=Fe(),Ye=ze(t);if(Ye){if(je(),!ze(o))return Le("property missing ':'");var Ue=ze(d),ot=Qe({type:Z,property:be(Ye[0].replace(n,M)),value:Ue?be(Ue[0].replace(n,M)):M});return ze(p),ot}}function Xe(){var Qe=[];Ve(Qe);for(var Ye;Ye=We();)Ye!==!1&&(Qe.push(Ye),Ve(Qe));return Qe}return Ke(),Xe()};function be(ye){return ye?ye.replace(h,M):M}return inlineStyleParser}var hasRequiredCjs$1;function requireCjs$1(){if(hasRequiredCjs$1)return cjs$1;hasRequiredCjs$1=1;var n=cjs$1&&cjs$1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cjs$1,"__esModule",{value:!0}),cjs$1.default=e;var i=n(requireInlineStyleParser());function e(t,o){var d=null;if(!t||typeof t!="string")return d;var p=(0,i.default)(t),h=typeof o=="function";return p.forEach(function(y){if(y.type==="declaration"){var $=y.property,E=y.value;h?o($,E,y):E&&(d=d||{},d[$]=E)}}),d}return cjs$1}var utilities={},hasRequiredUtilities;function requireUtilities(){if(hasRequiredUtilities)return utilities;hasRequiredUtilities=1,Object.defineProperty(utilities,"__esModule",{value:!0}),utilities.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,e=/^[^-]+$/,t=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,d=function($){return!$||e.test($)||n.test($)},p=function($,E){return E.toUpperCase()},h=function($,E){return"".concat(E,"-")},y=function($,E){return E===void 0&&(E={}),d($)?$:($=$.toLowerCase(),E.reactCompat?$=$.replace(o,h):$=$.replace(t,h),$.replace(i,p))};return utilities.camelCase=y,utilities}var cjs,hasRequiredCjs;function requireCjs(){if(hasRequiredCjs)return cjs;hasRequiredCjs=1;var n=cjs&&cjs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},i=n(requireCjs$1()),e=requireUtilities();function t(o,d){var p={};return!o||typeof o!="string"||(0,i.default)(o,function(h,y){h&&y&&(p[(0,e.camelCase)(h,d)]=y)}),p}return t.default=t,cjs=t,cjs}var cjsExports=requireCjs();const styleToJs=getDefaultExportFromCjs(cjsExports),pointEnd=point$2("end"),pointStart=point$2("start");function point$2(n){return i;function i(e){const t=e&&e.position&&e.position[n]||{};if(typeof t.line=="number"&&t.line>0&&typeof t.column=="number"&&t.column>0)return{line:t.line,column:t.column,offset:typeof t.offset=="number"&&t.offset>-1?t.offset:void 0}}}function position$1(n){const i=pointStart(n),e=pointEnd(n);if(i&&e)return{start:i,end:e}}function stringifyPosition(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?position(n.position):"start"in n||"end"in n?position(n):"line"in n||"column"in n?point$1(n):""}function point$1(n){return index$1(n&&n.line)+":"+index$1(n&&n.column)}function position(n){return point$1(n&&n.start)+"-"+point$1(n&&n.end)}function index$1(n){return n&&typeof n=="number"?n:1}class VFileMessage extends Error{constructor(i,e,t){super(),typeof e=="string"&&(t=e,e=void 0);let o="",d={},p=!1;if(e&&("line"in e&&"column"in e?d={place:e}:"start"in e&&"end"in e?d={place:e}:"type"in e?d={ancestors:[e],place:e.position}:d={...e}),typeof i=="string"?o=i:!d.cause&&i&&(p=!0,o=i.message,d.cause=i),!d.ruleId&&!d.source&&typeof t=="string"){const y=t.indexOf(":");y===-1?d.ruleId=t:(d.source=t.slice(0,y),d.ruleId=t.slice(y+1))}if(!d.place&&d.ancestors&&d.ancestors){const y=d.ancestors[d.ancestors.length-1];y&&(d.place=y.position)}const h=d.place&&"start"in d.place?d.place.start:d.place;this.ancestors=d.ancestors||void 0,this.cause=d.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=h?h.line:void 0,this.name=stringifyPosition(d.place)||"1:1",this.place=d.place||void 0,this.reason=this.message,this.ruleId=d.ruleId||void 0,this.source=d.source||void 0,this.stack=p&&d.cause&&typeof d.cause.stack=="string"?d.cause.stack:"",this.actual,this.expected,this.note,this.url}}VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype.stack="";VFileMessage.prototype.column=void 0;VFileMessage.prototype.line=void 0;VFileMessage.prototype.ancestors=void 0;VFileMessage.prototype.cause=void 0;VFileMessage.prototype.fatal=void 0;VFileMessage.prototype.place=void 0;VFileMessage.prototype.ruleId=void 0;VFileMessage.prototype.source=void 0;const own$4={}.hasOwnProperty,emptyMap=new Map,cap=/[A-Z]/g,tableElements=new Set(["table","tbody","thead","tfoot","tr"]),tableCellElement=new Set(["td","th"]),docs="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function toJsxRuntime(n,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const e=i.filePath||void 0;let t;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");t=developmentCreate(e,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");t=productionCreate(e,i.jsx,i.jsxs)}const o={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:t,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:e,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?svg:html$2,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},d=one$1(o,n,void 0);return d&&typeof d!="string"?d:o.create(n,o.Fragment,{children:d||void 0},void 0)}function one$1(n,i,e){if(i.type==="element")return element$1(n,i,e);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return mdxExpression(n,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return mdxJsxElement(n,i,e);if(i.type==="mdxjsEsm")return mdxEsm(n,i);if(i.type==="root")return root$3(n,i,e);if(i.type==="text")return text$5(n,i)}function element$1(n,i,e){const t=n.schema;let o=t;i.tagName.toLowerCase()==="svg"&&t.space==="html"&&(o=svg,n.schema=o),n.ancestors.push(i);const d=findComponentFromName(n,i.tagName,!1),p=createElementProps(n,i);let h=createChildren(n,i);return tableElements.has(i.tagName)&&(h=h.filter(function(y){return typeof y=="string"?!whitespace(y):!0})),addNode(n,p,d,i),addChildren(p,h),n.ancestors.pop(),n.schema=t,n.create(i,d,p,e)}function mdxExpression(n,i){if(i.data&&i.data.estree&&n.evaluater){const t=i.data.estree.body[0];return t.type,n.evaluater.evaluateExpression(t.expression)}crashEstree(n,i.position)}function mdxEsm(n,i){if(i.data&&i.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(i.data.estree);crashEstree(n,i.position)}function mdxJsxElement(n,i,e){const t=n.schema;let o=t;i.name==="svg"&&t.space==="html"&&(o=svg,n.schema=o),n.ancestors.push(i);const d=i.name===null?n.Fragment:findComponentFromName(n,i.name,!0),p=createJsxElementProps(n,i),h=createChildren(n,i);return addNode(n,p,d,i),addChildren(p,h),n.ancestors.pop(),n.schema=t,n.create(i,d,p,e)}function root$3(n,i,e){const t={};return addChildren(t,createChildren(n,i)),n.create(i,n.Fragment,t,e)}function text$5(n,i){return i.value}function addNode(n,i,e,t){typeof e!="string"&&e!==n.Fragment&&n.passNode&&(i.node=t)}function addChildren(n,i){if(i.length>0){const e=i.length>1?i:i[0];e&&(n.children=e)}}function productionCreate(n,i,e){return t;function t(o,d,p,h){const $=Array.isArray(p.children)?e:i;return h?$(d,p,h):$(d,p)}}function developmentCreate(n,i){return e;function e(t,o,d,p){const h=Array.isArray(d.children),y=pointStart(t);return i(o,d,p,h,{columnNumber:y?y.column-1:void 0,fileName:n,lineNumber:y?y.line:void 0},void 0)}}function createElementProps(n,i){const e={};let t,o;for(o in i.properties)if(o!=="children"&&own$4.call(i.properties,o)){const d=createProperty(n,o,i.properties[o]);if(d){const[p,h]=d;n.tableCellAlignToStyle&&p==="align"&&typeof h=="string"&&tableCellElement.has(i.tagName)?t=h:e[p]=h}}if(t){const d=e.style||(e.style={});d[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=t}return e}function createJsxElementProps(n,i){const e={};for(const t of i.attributes)if(t.type==="mdxJsxExpressionAttribute")if(t.data&&t.data.estree&&n.evaluater){const d=t.data.estree.body[0];d.type;const p=d.expression;p.type;const h=p.properties[0];h.type,Object.assign(e,n.evaluater.evaluateExpression(h.argument))}else crashEstree(n,i.position);else{const o=t.name;let d;if(t.value&&typeof t.value=="object")if(t.value.data&&t.value.data.estree&&n.evaluater){const h=t.value.data.estree.body[0];h.type,d=n.evaluater.evaluateExpression(h.expression)}else crashEstree(n,i.position);else d=t.value===null?!0:t.value;e[o]=d}return e}function createChildren(n,i){const e=[];let t=-1;const o=n.passKeys?new Map:emptyMap;for(;++t<i.children.length;){const d=i.children[t];let p;if(n.passKeys){const y=d.type==="element"?d.tagName:d.type==="mdxJsxFlowElement"||d.type==="mdxJsxTextElement"?d.name:void 0;if(y){const $=o.get(y)||0;p=y+"-"+$,o.set(y,$+1)}}const h=one$1(n,d,p);h!==void 0&&e.push(h)}return e}function createProperty(n,i,e){const t=find(n.schema,i);if(!(e==null||typeof e=="number"&&Number.isNaN(e))){if(Array.isArray(e)&&(e=t.commaSeparated?stringify$1(e):stringify(e)),t.property==="style"){let o=typeof e=="object"?e:parseStyle(n,String(e));return n.stylePropertyNameCase==="css"&&(o=transformStylesToCssCasing(o)),["style",o]}return[n.elementAttributeNameCase==="react"&&t.space?hastToReact[t.property]||t.property:t.attribute,e]}}function parseStyle(n,i){try{return styleToJs(i,{reactCompat:!0})}catch(e){if(n.ignoreInvalidStyle)return{};const t=e,o=new VFileMessage("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=n.filePath||void 0,o.url=docs+"#cannot-parse-style-attribute",o}}function findComponentFromName(n,i,e){let t;if(!e)t={type:"Literal",value:i};else if(i.includes(".")){const o=i.split(".");let d=-1,p;for(;++d<o.length;){const h=name(o[d])?{type:"Identifier",name:o[d]}:{type:"Literal",value:o[d]};p=p?{type:"MemberExpression",object:p,property:h,computed:!!(d&&h.type==="Literal"),optional:!1}:h}t=p}else t=name(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(t.type==="Literal"){const o=t.value;return own$4.call(n.components,o)?n.components[o]:o}if(n.evaluater)return n.evaluater.evaluateExpression(t);crashEstree(n)}function crashEstree(n,i){const e=new VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw e.file=n.filePath||void 0,e.url=docs+"#cannot-handle-mdx-estrees-without-createevaluater",e}function transformStylesToCssCasing(n){const i={};let e;for(e in n)own$4.call(n,e)&&(i[transformStyleToCssCasing(e)]=n[e]);return i}function transformStyleToCssCasing(n){let i=n.replace(cap,toDash);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function toDash(n){return"-"+n.toLowerCase()}const urlAttributes={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},emptyOptions$4={};function toString$1(n,i){const e=emptyOptions$4,t=typeof e.includeImageAlt=="boolean"?e.includeImageAlt:!0,o=typeof e.includeHtml=="boolean"?e.includeHtml:!0;return one(n,t,o)}function one(n,i,e){if(node(n)){if("value"in n)return n.type==="html"&&!e?"":n.value;if(i&&"alt"in n&&n.alt)return n.alt;if("children"in n)return all(n.children,i,e)}return Array.isArray(n)?all(n,i,e):""}function all(n,i,e){const t=[];let o=-1;for(;++o<n.length;)t[o]=one(n[o],i,e);return t.join("")}function node(n){return!!(n&&typeof n=="object")}const element=document.createElement("i");function decodeNamedCharacterReference(n){const i="&"+n+";";element.innerHTML=i;const e=element.textContent;return e.charCodeAt(e.length-1)===59&&n!=="semi"||e===i?!1:e}function splice(n,i,e,t){const o=n.length;let d=0,p;if(i<0?i=-i>o?0:o+i:i=i>o?o:i,e=e>0?e:0,t.length<1e4)p=Array.from(t),p.unshift(i,e),n.splice(...p);else for(e&&n.splice(i,e);d<t.length;)p=t.slice(d,d+1e4),p.unshift(i,0),n.splice(...p),d+=1e4,i+=1e4}function push(n,i){return n.length>0?(splice(n,n.length,0,i),n):i}const hasOwnProperty={}.hasOwnProperty;function combineExtensions(n){const i={};let e=-1;for(;++e<n.length;)syntaxExtension(i,n[e]);return i}function syntaxExtension(n,i){let e;for(e in i){const o=(hasOwnProperty.call(n,e)?n[e]:void 0)||(n[e]={}),d=i[e];let p;if(d)for(p in d){hasOwnProperty.call(o,p)||(o[p]=[]);const h=d[p];constructs(o[p],Array.isArray(h)?h:h?[h]:[])}}}function constructs(n,i){let e=-1;const t=[];for(;++e<i.length;)(i[e].add==="after"?n:t).push(i[e]);splice(n,0,0,t)}function decodeNumericCharacterReference(n,i){const e=Number.parseInt(n,i);return e<9||e===11||e>13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)===65535||(e&65535)===65534||e>1114111?"�":String.fromCodePoint(e)}function normalizeIdentifier(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(n){return n!==null&&(n<32||n===127)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(n){return n!==null&&n<-2}function markdownLineEndingOrSpace(n){return n!==null&&(n<0||n===32)}function markdownSpace(n){return n===-2||n===-1||n===32}const unicodePunctuation=regexCheck(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=regexCheck(/\s/);function regexCheck(n){return i;function i(e){return e!==null&&e>-1&&n.test(String.fromCharCode(e))}}function normalizeUri(n){const i=[];let e=-1,t=0,o=0;for(;++e<n.length;){const d=n.charCodeAt(e);let p="";if(d===37&&asciiAlphanumeric(n.charCodeAt(e+1))&&asciiAlphanumeric(n.charCodeAt(e+2)))o=2;else if(d<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(d))||(p=String.fromCharCode(d));else if(d>55295&&d<57344){const h=n.charCodeAt(e+1);d<56320&&h>56319&&h<57344?(p=String.fromCharCode(d,h),o=1):p="�"}else p=String.fromCharCode(d);p&&(i.push(n.slice(t,e),encodeURIComponent(p)),t=e+o+1,p=""),o&&(e+=o,o=0)}return i.join("")+n.slice(t)}function factorySpace(n,i,e,t){const o=t?t-1:Number.POSITIVE_INFINITY;let d=0;return p;function p(y){return markdownSpace(y)?(n.enter(e),h(y)):i(y)}function h(y){return markdownSpace(y)&&d++<o?(n.consume(y),h):(n.exit(e),i(y))}}const content$1={tokenize:initializeContent};function initializeContent(n){const i=n.attempt(this.parser.constructs.contentInitial,t,o);let e;return i;function t(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),factorySpace(n,i,"linePrefix")}function o(h){return n.enter("paragraph"),d(h)}function d(h){const y=n.enter("chunkText",{contentType:"text",previous:e});return e&&(e.next=y),e=y,p(h)}function p(h){if(h===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(h);return}return markdownLineEnding(h)?(n.consume(h),n.exit("chunkText"),d):(n.consume(h),p)}}const document$2={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(n){const i=this,e=[];let t=0,o,d,p;return h;function h(Ne){if(t<e.length){const Fe=e[t];return i.containerState=Fe[1],n.attempt(Fe[0].continuation,y,$)(Ne)}return $(Ne)}function y(Ne){if(t++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,o&&Ce();const Fe=i.events.length;let Me=Fe,Le;for(;Me--;)if(i.events[Me][0]==="exit"&&i.events[Me][1].type==="chunkFlow"){Le=i.events[Me][1].end;break}xe(t);let ze=Fe;for(;ze<i.events.length;)i.events[ze][1].end={...Le},ze++;return splice(i.events,Me+1,0,i.events.slice(Fe)),i.events.length=ze,$(Ne)}return h(Ne)}function $(Ne){if(t===e.length){if(!o)return H(Ne);if(o.currentConstruct&&o.currentConstruct.concrete)return be(Ne);i.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return i.containerState={},n.check(containerConstruct,E,M)(Ne)}function E(Ne){return o&&Ce(),xe(t),H(Ne)}function M(Ne){return i.parser.lazy[i.now().line]=t!==e.length,p=i.now().offset,be(Ne)}function H(Ne){return i.containerState={},n.attempt(containerConstruct,Z,be)(Ne)}function Z(Ne){return t++,e.push([i.currentConstruct,i.containerState]),H(Ne)}function be(Ne){if(Ne===null){o&&Ce(),xe(0),n.consume(Ne);return}return o=o||i.parser.flow(i.now()),n.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:d}),ye(Ne)}function ye(Ne){if(Ne===null){we(n.exit("chunkFlow"),!0),xe(0),n.consume(Ne);return}return markdownLineEnding(Ne)?(n.consume(Ne),we(n.exit("chunkFlow")),t=0,i.interrupt=void 0,h):(n.consume(Ne),ye)}function we(Ne,Fe){const Me=i.sliceStream(Ne);if(Fe&&Me.push(null),Ne.previous=d,d&&(d.next=Ne),d=Ne,o.defineSkip(Ne.start),o.write(Me),i.parser.lazy[Ne.start.line]){let Le=o.events.length;for(;Le--;)if(o.events[Le][1].start.offset<p&&(!o.events[Le][1].end||o.events[Le][1].end.offset>p))return;const ze=i.events.length;let Ke=ze,Ve,je;for(;Ke--;)if(i.events[Ke][0]==="exit"&&i.events[Ke][1].type==="chunkFlow"){if(Ve){je=i.events[Ke][1].end;break}Ve=!0}for(xe(t),Le=ze;Le<i.events.length;)i.events[Le][1].end={...je},Le++;splice(i.events,Ke+1,0,i.events.slice(ze)),i.events.length=Le}}function xe(Ne){let Fe=e.length;for(;Fe-- >Ne;){const Me=e[Fe];i.containerState=Me[1],Me[0].exit.call(i,n)}e.length=Ne}function Ce(){o.write([null]),d=void 0,o=void 0,i.containerState._closeFlow=void 0}}function tokenizeContainer(n,i,e){return factorySpace(n,n.attempt(this.parser.constructs.document,i,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(n){if(n===null||markdownLineEndingOrSpace(n)||unicodeWhitespace(n))return 1;if(unicodePunctuation(n))return 2}function resolveAll(n,i,e){const t=[];let o=-1;for(;++o<n.length;){const d=n[o].resolveAll;d&&!t.includes(d)&&(i=d(i,e),t.push(d))}return i}const attention={name:"attention",resolveAll:resolveAllAttention,tokenize:tokenizeAttention};function resolveAllAttention(n,i){let e=-1,t,o,d,p,h,y,$,E;for(;++e<n.length;)if(n[e][0]==="enter"&&n[e][1].type==="attentionSequence"&&n[e][1]._close){for(t=e;t--;)if(n[t][0]==="exit"&&n[t][1].type==="attentionSequence"&&n[t][1]._open&&i.sliceSerialize(n[t][1]).charCodeAt(0)===i.sliceSerialize(n[e][1]).charCodeAt(0)){if((n[t][1]._close||n[e][1]._open)&&(n[e][1].end.offset-n[e][1].start.offset)%3&&!((n[t][1].end.offset-n[t][1].start.offset+n[e][1].end.offset-n[e][1].start.offset)%3))continue;y=n[t][1].end.offset-n[t][1].start.offset>1&&n[e][1].end.offset-n[e][1].start.offset>1?2:1;const M={...n[t][1].end},H={...n[e][1].start};movePoint(M,-y),movePoint(H,y),p={type:y>1?"strongSequence":"emphasisSequence",start:M,end:{...n[t][1].end}},h={type:y>1?"strongSequence":"emphasisSequence",start:{...n[e][1].start},end:H},d={type:y>1?"strongText":"emphasisText",start:{...n[t][1].end},end:{...n[e][1].start}},o={type:y>1?"strong":"emphasis",start:{...p.start},end:{...h.end}},n[t][1].end={...p.start},n[e][1].start={...h.end},$=[],n[t][1].end.offset-n[t][1].start.offset&&($=push($,[["enter",n[t][1],i],["exit",n[t][1],i]])),$=push($,[["enter",o,i],["enter",p,i],["exit",p,i],["enter",d,i]]),$=push($,resolveAll(i.parser.constructs.insideSpan.null,n.slice(t+1,e),i)),$=push($,[["exit",d,i],["enter",h,i],["exit",h,i],["exit",o,i]]),n[e][1].end.offset-n[e][1].start.offset?(E=2,$=push($,[["enter",n[e][1],i],["exit",n[e][1],i]])):E=0,splice(n,t-1,e-t+3,$),e=t+$.length-E-2;break}}for(e=-1;++e<n.length;)n[e][1].type==="attentionSequence"&&(n[e][1].type="data");return n}function tokenizeAttention(n,i){const e=this.parser.constructs.attentionMarkers.null,t=this.previous,o=classifyCharacter(t);let d;return p;function p(y){return d=y,n.enter("attentionSequence"),h(y)}function h(y){if(y===d)return n.consume(y),h;const $=n.exit("attentionSequence"),E=classifyCharacter(y),M=!E||E===2&&o||e.includes(y),H=!o||o===2&&E||e.includes(t);return $._open=!!(d===42?M:M&&(o||!H)),$._close=!!(d===42?H:H&&(E||!M)),i(y)}}function movePoint(n,i){n.column+=i,n.offset+=i,n._bufferIndex+=i}const autolink={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(n,i,e){let t=0;return o;function o(Z){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(Z),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),d}function d(Z){return asciiAlpha(Z)?(n.consume(Z),p):Z===64?e(Z):$(Z)}function p(Z){return Z===43||Z===45||Z===46||asciiAlphanumeric(Z)?(t=1,h(Z)):$(Z)}function h(Z){return Z===58?(n.consume(Z),t=0,y):(Z===43||Z===45||Z===46||asciiAlphanumeric(Z))&&t++<32?(n.consume(Z),h):(t=0,$(Z))}function y(Z){return Z===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(Z),n.exit("autolinkMarker"),n.exit("autolink"),i):Z===null||Z===32||Z===60||asciiControl(Z)?e(Z):(n.consume(Z),y)}function $(Z){return Z===64?(n.consume(Z),E):asciiAtext(Z)?(n.consume(Z),$):e(Z)}function E(Z){return asciiAlphanumeric(Z)?M(Z):e(Z)}function M(Z){return Z===46?(n.consume(Z),t=0,E):Z===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(Z),n.exit("autolinkMarker"),n.exit("autolink"),i):H(Z)}function H(Z){if((Z===45||asciiAlphanumeric(Z))&&t++<63){const be=Z===45?H:M;return n.consume(Z),be}return e(Z)}}const blankLine={partial:!0,tokenize:tokenizeBlankLine};function tokenizeBlankLine(n,i,e){return t;function t(d){return markdownSpace(d)?factorySpace(n,o,"linePrefix")(d):o(d)}function o(d){return d===null||markdownLineEnding(d)?i(d):e(d)}}const blockQuote={continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit$2,name:"blockQuote",tokenize:tokenizeBlockQuoteStart};function tokenizeBlockQuoteStart(n,i,e){const t=this;return o;function o(p){if(p===62){const h=t.containerState;return h.open||(n.enter("blockQuote",{_container:!0}),h.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(p),n.exit("blockQuoteMarker"),d}return e(p)}function d(p){return markdownSpace(p)?(n.enter("blockQuotePrefixWhitespace"),n.consume(p),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),i):(n.exit("blockQuotePrefix"),i(p))}}function tokenizeBlockQuoteContinuation(n,i,e){const t=this;return o;function o(p){return markdownSpace(p)?factorySpace(n,d,"linePrefix",t.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):d(p)}function d(p){return n.attempt(blockQuote,i,e)(p)}}function exit$2(n){n.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(n,i,e){return t;function t(d){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(d),n.exit("escapeMarker"),o}function o(d){return asciiPunctuation(d)?(n.enter("characterEscapeValue"),n.consume(d),n.exit("characterEscapeValue"),n.exit("characterEscape"),i):e(d)}}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(n,i,e){const t=this;let o=0,d,p;return h;function h(M){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(M),n.exit("characterReferenceMarker"),y}function y(M){return M===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(M),n.exit("characterReferenceMarkerNumeric"),$):(n.enter("characterReferenceValue"),d=31,p=asciiAlphanumeric,E(M))}function $(M){return M===88||M===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(M),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),d=6,p=asciiHexDigit,E):(n.enter("characterReferenceValue"),d=7,p=asciiDigit,E(M))}function E(M){if(M===59&&o){const H=n.exit("characterReferenceValue");return p===asciiAlphanumeric&&!decodeNamedCharacterReference(t.sliceSerialize(H))?e(M):(n.enter("characterReferenceMarker"),n.consume(M),n.exit("characterReferenceMarker"),n.exit("characterReference"),i)}return p(M)&&o++<d?(n.consume(M),E):e(M)}}const nonLazyContinuation$1={partial:!0,tokenize:tokenizeNonLazyContinuation$1},codeFenced={concrete:!0,name:"codeFenced",tokenize:tokenizeCodeFenced};function tokenizeCodeFenced(n,i,e){const t=this,o={partial:!0,tokenize:Me};let d=0,p=0,h;return y;function y(Le){return $(Le)}function $(Le){const ze=t.events[t.events.length-1];return d=ze&&ze[1].type==="linePrefix"?ze[2].sliceSerialize(ze[1],!0).length:0,h=Le,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),E(Le)}function E(Le){return Le===h?(p++,n.consume(Le),E):p<3?e(Le):(n.exit("codeFencedFenceSequence"),markdownSpace(Le)?factorySpace(n,M,"whitespace")(Le):M(Le))}function M(Le){return Le===null||markdownLineEnding(Le)?(n.exit("codeFencedFence"),t.interrupt?i(Le):n.check(nonLazyContinuation$1,ye,Fe)(Le)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),H(Le))}function H(Le){return Le===null||markdownLineEnding(Le)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),M(Le)):markdownSpace(Le)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),factorySpace(n,Z,"whitespace")(Le)):Le===96&&Le===h?e(Le):(n.consume(Le),H)}function Z(Le){return Le===null||markdownLineEnding(Le)?M(Le):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),be(Le))}function be(Le){return Le===null||markdownLineEnding(Le)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),M(Le)):Le===96&&Le===h?e(Le):(n.consume(Le),be)}function ye(Le){return n.attempt(o,Fe,we)(Le)}function we(Le){return n.enter("lineEnding"),n.consume(Le),n.exit("lineEnding"),xe}function xe(Le){return d>0&&markdownSpace(Le)?factorySpace(n,Ce,"linePrefix",d+1)(Le):Ce(Le)}function Ce(Le){return Le===null||markdownLineEnding(Le)?n.check(nonLazyContinuation$1,ye,Fe)(Le):(n.enter("codeFlowValue"),Ne(Le))}function Ne(Le){return Le===null||markdownLineEnding(Le)?(n.exit("codeFlowValue"),Ce(Le)):(n.consume(Le),Ne)}function Fe(Le){return n.exit("codeFenced"),i(Le)}function Me(Le,ze,Ke){let Ve=0;return je;function je(Ue){return Le.enter("lineEnding"),Le.consume(Ue),Le.exit("lineEnding"),We}function We(Ue){return Le.enter("codeFencedFence"),markdownSpace(Ue)?factorySpace(Le,Xe,"linePrefix",t.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Ue):Xe(Ue)}function Xe(Ue){return Ue===h?(Le.enter("codeFencedFenceSequence"),Qe(Ue)):Ke(Ue)}function Qe(Ue){return Ue===h?(Ve++,Le.consume(Ue),Qe):Ve>=p?(Le.exit("codeFencedFenceSequence"),markdownSpace(Ue)?factorySpace(Le,Ye,"whitespace")(Ue):Ye(Ue)):Ke(Ue)}function Ye(Ue){return Ue===null||markdownLineEnding(Ue)?(Le.exit("codeFencedFence"),ze(Ue)):Ke(Ue)}}}function tokenizeNonLazyContinuation$1(n,i,e){const t=this;return o;function o(p){return p===null?e(p):(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),d)}function d(p){return t.parser.lazy[t.now().line]?e(p):i(p)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(n,i,e){const t=this;return o;function o($){return n.enter("codeIndented"),factorySpace(n,d,"linePrefix",5)($)}function d($){const E=t.events[t.events.length-1];return E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?p($):e($)}function p($){return $===null?y($):markdownLineEnding($)?n.attempt(furtherStart,p,y)($):(n.enter("codeFlowValue"),h($))}function h($){return $===null||markdownLineEnding($)?(n.exit("codeFlowValue"),p($)):(n.consume($),h)}function y($){return n.exit("codeIndented"),i($)}}function tokenizeFurtherStart(n,i,e){const t=this;return o;function o(p){return t.parser.lazy[t.now().line]?e(p):markdownLineEnding(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),o):factorySpace(n,d,"linePrefix",5)(p)}function d(p){const h=t.events[t.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(p):markdownLineEnding(p)?o(p):e(p)}}const codeText={name:"codeText",previous:previous$3,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(n){let i=n.length-4,e=3,t,o;if((n[e][1].type==="lineEnding"||n[e][1].type==="space")&&(n[i][1].type==="lineEnding"||n[i][1].type==="space")){for(t=e;++t<i;)if(n[t][1].type==="codeTextData"){n[e][1].type="codeTextPadding",n[i][1].type="codeTextPadding",e+=2,i-=2;break}}for(t=e-1,i++;++t<=i;)o===void 0?t!==i&&n[t][1].type!=="lineEnding"&&(o=t):(t===i||n[t][1].type==="lineEnding")&&(n[o][1].type="codeTextData",t!==o+2&&(n[o][1].end=n[t-1][1].end,n.splice(o+2,t-o-2),i-=t-o-2,t=o+2),o=void 0);return n}function previous$3(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tokenizeCodeText(n,i,e){let t=0,o,d;return p;function p(M){return n.enter("codeText"),n.enter("codeTextSequence"),h(M)}function h(M){return M===96?(n.consume(M),t++,h):(n.exit("codeTextSequence"),y(M))}function y(M){return M===null?e(M):M===32?(n.enter("space"),n.consume(M),n.exit("space"),y):M===96?(d=n.enter("codeTextSequence"),o=0,E(M)):markdownLineEnding(M)?(n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),y):(n.enter("codeTextData"),$(M))}function $(M){return M===null||M===32||M===96||markdownLineEnding(M)?(n.exit("codeTextData"),y(M)):(n.consume(M),$)}function E(M){return M===96?(n.consume(M),o++,E):o===t?(n.exit("codeTextSequence"),n.exit("codeText"),i(M)):(d.type="codeTextData",$(M))}}class SpliceBuffer{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,e){const t=e??Number.POSITIVE_INFINITY;return t<this.left.length?this.left.slice(i,t):i>this.left.length?this.right.slice(this.right.length-t+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-t+this.left.length).reverse())}splice(i,e,t){const o=e||0;this.setCursor(Math.trunc(i));const d=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return t&&chunkedPush(this.left,t),d.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),chunkedPush(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),chunkedPush(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const e=this.left.splice(i,Number.POSITIVE_INFINITY);chunkedPush(this.right,e.reverse())}else{const e=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);chunkedPush(this.left,e.reverse())}}}function chunkedPush(n,i){let e=0;if(i.length<1e4)n.push(...i);else for(;e<i.length;)n.push(...i.slice(e,e+1e4)),e+=1e4}function subtokenize(n){const i={};let e=-1,t,o,d,p,h,y,$;const E=new SpliceBuffer(n);for(;++e<E.length;){for(;e in i;)e=i[e];if(t=E.get(e),e&&t[1].type==="chunkFlow"&&E.get(e-1)[1].type==="listItemPrefix"&&(y=t[1]._tokenizer.events,d=0,d<y.length&&y[d][1].type==="lineEndingBlank"&&(d+=2),d<y.length&&y[d][1].type==="content"))for(;++d<y.length&&y[d][1].type!=="content";)y[d][1].type==="chunkText"&&(y[d][1]._isInFirstContentOfListItem=!0,d++);if(t[0]==="enter")t[1].contentType&&(Object.assign(i,subcontent(E,e)),e=i[e],$=!0);else if(t[1]._container){for(d=e,o=void 0;d--;)if(p=E.get(d),p[1].type==="lineEnding"||p[1].type==="lineEndingBlank")p[0]==="enter"&&(o&&(E.get(o)[1].type="lineEndingBlank"),p[1].type="lineEnding",o=d);else if(p[1].type!=="linePrefix")break;o&&(t[1].end={...E.get(o)[1].start},h=E.slice(o,e),h.unshift(t),E.splice(o,e-o+1,h))}}return splice(n,0,Number.POSITIVE_INFINITY,E.slice(0)),!$}function subcontent(n,i){const e=n.get(i)[1],t=n.get(i)[2];let o=i-1;const d=[],p=e._tokenizer||t.parser[e.contentType](e.start),h=p.events,y=[],$={};let E,M,H=-1,Z=e,be=0,ye=0;const we=[ye];for(;Z;){for(;n.get(++o)[1]!==Z;);d.push(o),Z._tokenizer||(E=t.sliceStream(Z),Z.next||E.push(null),M&&p.defineSkip(Z.start),Z._isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=!0),p.write(E),Z._isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=void 0)),M=Z,Z=Z.next}for(Z=e;++H<h.length;)h[H][0]==="exit"&&h[H-1][0]==="enter"&&h[H][1].type===h[H-1][1].type&&h[H][1].start.line!==h[H][1].end.line&&(ye=H+1,we.push(ye),Z._tokenizer=void 0,Z.previous=void 0,Z=Z.next);for(p.events=[],Z?(Z._tokenizer=void 0,Z.previous=void 0):we.pop(),H=we.length;H--;){const xe=h.slice(we[H],we[H+1]),Ce=d.pop();y.push([Ce,Ce+xe.length-1]),n.splice(Ce,2,xe)}for(y.reverse(),H=-1;++H<y.length;)$[be+y[H][0]]=be+y[H][1],be+=y[H][1]-y[H][0]-1;return $}const content={resolve:resolveContent,tokenize:tokenizeContent},continuationConstruct={partial:!0,tokenize:tokenizeContinuation};function resolveContent(n){return subtokenize(n),n}function tokenizeContent(n,i){let e;return t;function t(h){return n.enter("content"),e=n.enter("chunkContent",{contentType:"content"}),o(h)}function o(h){return h===null?d(h):markdownLineEnding(h)?n.check(continuationConstruct,p,d)(h):(n.consume(h),o)}function d(h){return n.exit("chunkContent"),n.exit("content"),i(h)}function p(h){return n.consume(h),n.exit("chunkContent"),e.next=n.enter("chunkContent",{contentType:"content",previous:e}),e=e.next,o}}function tokenizeContinuation(n,i,e){const t=this;return o;function o(p){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),factorySpace(n,d,"linePrefix")}function d(p){if(p===null||markdownLineEnding(p))return e(p);const h=t.events[t.events.length-1];return!t.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(p):n.interrupt(t.parser.constructs.flow,e,i)(p)}}function factoryDestination(n,i,e,t,o,d,p,h,y){const $=y||Number.POSITIVE_INFINITY;let E=0;return M;function M(xe){return xe===60?(n.enter(t),n.enter(o),n.enter(d),n.consume(xe),n.exit(d),H):xe===null||xe===32||xe===41||asciiControl(xe)?e(xe):(n.enter(t),n.enter(p),n.enter(h),n.enter("chunkString",{contentType:"string"}),ye(xe))}function H(xe){return xe===62?(n.enter(d),n.consume(xe),n.exit(d),n.exit(o),n.exit(t),i):(n.enter(h),n.enter("chunkString",{contentType:"string"}),Z(xe))}function Z(xe){return xe===62?(n.exit("chunkString"),n.exit(h),H(xe)):xe===null||xe===60||markdownLineEnding(xe)?e(xe):(n.consume(xe),xe===92?be:Z)}function be(xe){return xe===60||xe===62||xe===92?(n.consume(xe),Z):Z(xe)}function ye(xe){return!E&&(xe===null||xe===41||markdownLineEndingOrSpace(xe))?(n.exit("chunkString"),n.exit(h),n.exit(p),n.exit(t),i(xe)):E<$&&xe===40?(n.consume(xe),E++,ye):xe===41?(n.consume(xe),E--,ye):xe===null||xe===32||xe===40||asciiControl(xe)?e(xe):(n.consume(xe),xe===92?we:ye)}function we(xe){return xe===40||xe===41||xe===92?(n.consume(xe),ye):ye(xe)}}function factoryLabel$1(n,i,e,t,o,d){const p=this;let h=0,y;return $;function $(Z){return n.enter(t),n.enter(o),n.consume(Z),n.exit(o),n.enter(d),E}function E(Z){return h>999||Z===null||Z===91||Z===93&&!y||Z===94&&!h&&"_hiddenFootnoteSupport"in p.parser.constructs?e(Z):Z===93?(n.exit(d),n.enter(o),n.consume(Z),n.exit(o),n.exit(t),i):markdownLineEnding(Z)?(n.enter("lineEnding"),n.consume(Z),n.exit("lineEnding"),E):(n.enter("chunkString",{contentType:"string"}),M(Z))}function M(Z){return Z===null||Z===91||Z===93||markdownLineEnding(Z)||h++>999?(n.exit("chunkString"),E(Z)):(n.consume(Z),y||(y=!markdownSpace(Z)),Z===92?H:M)}function H(Z){return Z===91||Z===92||Z===93?(n.consume(Z),h++,M):M(Z)}}function factoryTitle(n,i,e,t,o,d){let p;return h;function h(H){return H===34||H===39||H===40?(n.enter(t),n.enter(o),n.consume(H),n.exit(o),p=H===40?41:H,y):e(H)}function y(H){return H===p?(n.enter(o),n.consume(H),n.exit(o),n.exit(t),i):(n.enter(d),$(H))}function $(H){return H===p?(n.exit(d),y(p)):H===null?e(H):markdownLineEnding(H)?(n.enter("lineEnding"),n.consume(H),n.exit("lineEnding"),factorySpace(n,$,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),E(H))}function E(H){return H===p||H===null||markdownLineEnding(H)?(n.exit("chunkString"),$(H)):(n.consume(H),H===92?M:E)}function M(H){return H===p||H===92?(n.consume(H),E):E(H)}}function factoryWhitespace(n,i){let e;return t;function t(o){return markdownLineEnding(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),e=!0,t):markdownSpace(o)?factorySpace(n,t,e?"linePrefix":"lineSuffix")(o):i(o)}}const definition$1={name:"definition",tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(n,i,e){const t=this;let o;return d;function d(Z){return n.enter("definition"),p(Z)}function p(Z){return factoryLabel$1.call(t,n,h,e,"definitionLabel","definitionLabelMarker","definitionLabelString")(Z)}function h(Z){return o=normalizeIdentifier(t.sliceSerialize(t.events[t.events.length-1][1]).slice(1,-1)),Z===58?(n.enter("definitionMarker"),n.consume(Z),n.exit("definitionMarker"),y):e(Z)}function y(Z){return markdownLineEndingOrSpace(Z)?factoryWhitespace(n,$)(Z):$(Z)}function $(Z){return factoryDestination(n,E,e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(Z)}function E(Z){return n.attempt(titleBefore,M,M)(Z)}function M(Z){return markdownSpace(Z)?factorySpace(n,H,"whitespace")(Z):H(Z)}function H(Z){return Z===null||markdownLineEnding(Z)?(n.exit("definition"),t.parser.defined.push(o),i(Z)):e(Z)}}function tokenizeTitleBefore(n,i,e){return t;function t(h){return markdownLineEndingOrSpace(h)?factoryWhitespace(n,o)(h):e(h)}function o(h){return factoryTitle(n,d,e,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function d(h){return markdownSpace(h)?factorySpace(n,p,"whitespace")(h):p(h)}function p(h){return h===null||markdownLineEnding(h)?i(h):e(h)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(n,i,e){return t;function t(d){return n.enter("hardBreakEscape"),n.consume(d),o}function o(d){return markdownLineEnding(d)?(n.exit("hardBreakEscape"),i(d)):e(d)}}const headingAtx={name:"headingAtx",resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(n,i){let e=n.length-2,t=3,o,d;return n[t][1].type==="whitespace"&&(t+=2),e-2>t&&n[e][1].type==="whitespace"&&(e-=2),n[e][1].type==="atxHeadingSequence"&&(t===e-1||e-4>t&&n[e-2][1].type==="whitespace")&&(e-=t+1===e?2:4),e>t&&(o={type:"atxHeadingText",start:n[t][1].start,end:n[e][1].end},d={type:"chunkText",start:n[t][1].start,end:n[e][1].end,contentType:"text"},splice(n,t,e-t+1,[["enter",o,i],["enter",d,i],["exit",d,i],["exit",o,i]])),n}function tokenizeHeadingAtx(n,i,e){let t=0;return o;function o(E){return n.enter("atxHeading"),d(E)}function d(E){return n.enter("atxHeadingSequence"),p(E)}function p(E){return E===35&&t++<6?(n.consume(E),p):E===null||markdownLineEndingOrSpace(E)?(n.exit("atxHeadingSequence"),h(E)):e(E)}function h(E){return E===35?(n.enter("atxHeadingSequence"),y(E)):E===null||markdownLineEnding(E)?(n.exit("atxHeading"),i(E)):markdownSpace(E)?factorySpace(n,h,"whitespace")(E):(n.enter("atxHeadingText"),$(E))}function y(E){return E===35?(n.consume(E),y):(n.exit("atxHeadingSequence"),h(E))}function $(E){return E===null||E===35||markdownLineEndingOrSpace(E)?(n.exit("atxHeadingText"),h(E)):(n.consume(E),$)}}const htmlBlockNames=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={concrete:!0,name:"htmlFlow",resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(n){let i=n.length;for(;i--&&!(n[i][0]==="enter"&&n[i][1].type==="htmlFlow"););return i>1&&n[i-2][1].type==="linePrefix"&&(n[i][1].start=n[i-2][1].start,n[i+1][1].start=n[i-2][1].start,n.splice(i-2,2)),n}function tokenizeHtmlFlow(n,i,e){const t=this;let o,d,p,h,y;return $;function $(He){return E(He)}function E(He){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(He),M}function M(He){return He===33?(n.consume(He),H):He===47?(n.consume(He),d=!0,ye):He===63?(n.consume(He),o=3,t.interrupt?i:Be):asciiAlpha(He)?(n.consume(He),p=String.fromCharCode(He),we):e(He)}function H(He){return He===45?(n.consume(He),o=2,Z):He===91?(n.consume(He),o=5,h=0,be):asciiAlpha(He)?(n.consume(He),o=4,t.interrupt?i:Be):e(He)}function Z(He){return He===45?(n.consume(He),t.interrupt?i:Be):e(He)}function be(He){const Ot="CDATA[";return He===Ot.charCodeAt(h++)?(n.consume(He),h===Ot.length?t.interrupt?i:Xe:be):e(He)}function ye(He){return asciiAlpha(He)?(n.consume(He),p=String.fromCharCode(He),we):e(He)}function we(He){if(He===null||He===47||He===62||markdownLineEndingOrSpace(He)){const Ot=He===47,Ct=p.toLowerCase();return!Ot&&!d&&htmlRawNames.includes(Ct)?(o=1,t.interrupt?i(He):Xe(He)):htmlBlockNames.includes(p.toLowerCase())?(o=6,Ot?(n.consume(He),xe):t.interrupt?i(He):Xe(He)):(o=7,t.interrupt&&!t.parser.lazy[t.now().line]?e(He):d?Ce(He):Ne(He))}return He===45||asciiAlphanumeric(He)?(n.consume(He),p+=String.fromCharCode(He),we):e(He)}function xe(He){return He===62?(n.consume(He),t.interrupt?i:Xe):e(He)}function Ce(He){return markdownSpace(He)?(n.consume(He),Ce):je(He)}function Ne(He){return He===47?(n.consume(He),je):He===58||He===95||asciiAlpha(He)?(n.consume(He),Fe):markdownSpace(He)?(n.consume(He),Ne):je(He)}function Fe(He){return He===45||He===46||He===58||He===95||asciiAlphanumeric(He)?(n.consume(He),Fe):Me(He)}function Me(He){return He===61?(n.consume(He),Le):markdownSpace(He)?(n.consume(He),Me):Ne(He)}function Le(He){return He===null||He===60||He===61||He===62||He===96?e(He):He===34||He===39?(n.consume(He),y=He,ze):markdownSpace(He)?(n.consume(He),Le):Ke(He)}function ze(He){return He===y?(n.consume(He),y=null,Ve):He===null||markdownLineEnding(He)?e(He):(n.consume(He),ze)}function Ke(He){return He===null||He===34||He===39||He===47||He===60||He===61||He===62||He===96||markdownLineEndingOrSpace(He)?Me(He):(n.consume(He),Ke)}function Ve(He){return He===47||He===62||markdownSpace(He)?Ne(He):e(He)}function je(He){return He===62?(n.consume(He),We):e(He)}function We(He){return He===null||markdownLineEnding(He)?Xe(He):markdownSpace(He)?(n.consume(He),We):e(He)}function Xe(He){return He===45&&o===2?(n.consume(He),ot):He===60&&o===1?(n.consume(He),dt):He===62&&o===4?(n.consume(He),qe):He===63&&o===3?(n.consume(He),Be):He===93&&o===5?(n.consume(He),pt):markdownLineEnding(He)&&(o===6||o===7)?(n.exit("htmlFlowData"),n.check(blankLineBefore,rt,Qe)(He)):He===null||markdownLineEnding(He)?(n.exit("htmlFlowData"),Qe(He)):(n.consume(He),Xe)}function Qe(He){return n.check(nonLazyContinuationStart,Ye,rt)(He)}function Ye(He){return n.enter("lineEnding"),n.consume(He),n.exit("lineEnding"),Ue}function Ue(He){return He===null||markdownLineEnding(He)?Qe(He):(n.enter("htmlFlowData"),Xe(He))}function ot(He){return He===45?(n.consume(He),Be):Xe(He)}function dt(He){return He===47?(n.consume(He),p="",st):Xe(He)}function st(He){if(He===62){const Ot=p.toLowerCase();return htmlRawNames.includes(Ot)?(n.consume(He),qe):Xe(He)}return asciiAlpha(He)&&p.length<8?(n.consume(He),p+=String.fromCharCode(He),st):Xe(He)}function pt(He){return He===93?(n.consume(He),Be):Xe(He)}function Be(He){return He===62?(n.consume(He),qe):He===45&&o===2?(n.consume(He),Be):Xe(He)}function qe(He){return He===null||markdownLineEnding(He)?(n.exit("htmlFlowData"),rt(He)):(n.consume(He),qe)}function rt(He){return n.exit("htmlFlow"),i(He)}}function tokenizeNonLazyContinuationStart(n,i,e){const t=this;return o;function o(p){return markdownLineEnding(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),d):e(p)}function d(p){return t.parser.lazy[t.now().line]?e(p):i(p)}}function tokenizeBlankLineBefore(n,i,e){return t;function t(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),n.attempt(blankLine,i,e)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(n,i,e){const t=this;let o,d,p;return h;function h(Be){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(Be),y}function y(Be){return Be===33?(n.consume(Be),$):Be===47?(n.consume(Be),Me):Be===63?(n.consume(Be),Ne):asciiAlpha(Be)?(n.consume(Be),Ke):e(Be)}function $(Be){return Be===45?(n.consume(Be),E):Be===91?(n.consume(Be),d=0,be):asciiAlpha(Be)?(n.consume(Be),Ce):e(Be)}function E(Be){return Be===45?(n.consume(Be),Z):e(Be)}function M(Be){return Be===null?e(Be):Be===45?(n.consume(Be),H):markdownLineEnding(Be)?(p=M,dt(Be)):(n.consume(Be),M)}function H(Be){return Be===45?(n.consume(Be),Z):M(Be)}function Z(Be){return Be===62?ot(Be):Be===45?H(Be):M(Be)}function be(Be){const qe="CDATA[";return Be===qe.charCodeAt(d++)?(n.consume(Be),d===qe.length?ye:be):e(Be)}function ye(Be){return Be===null?e(Be):Be===93?(n.consume(Be),we):markdownLineEnding(Be)?(p=ye,dt(Be)):(n.consume(Be),ye)}function we(Be){return Be===93?(n.consume(Be),xe):ye(Be)}function xe(Be){return Be===62?ot(Be):Be===93?(n.consume(Be),xe):ye(Be)}function Ce(Be){return Be===null||Be===62?ot(Be):markdownLineEnding(Be)?(p=Ce,dt(Be)):(n.consume(Be),Ce)}function Ne(Be){return Be===null?e(Be):Be===63?(n.consume(Be),Fe):markdownLineEnding(Be)?(p=Ne,dt(Be)):(n.consume(Be),Ne)}function Fe(Be){return Be===62?ot(Be):Ne(Be)}function Me(Be){return asciiAlpha(Be)?(n.consume(Be),Le):e(Be)}function Le(Be){return Be===45||asciiAlphanumeric(Be)?(n.consume(Be),Le):ze(Be)}function ze(Be){return markdownLineEnding(Be)?(p=ze,dt(Be)):markdownSpace(Be)?(n.consume(Be),ze):ot(Be)}function Ke(Be){return Be===45||asciiAlphanumeric(Be)?(n.consume(Be),Ke):Be===47||Be===62||markdownLineEndingOrSpace(Be)?Ve(Be):e(Be)}function Ve(Be){return Be===47?(n.consume(Be),ot):Be===58||Be===95||asciiAlpha(Be)?(n.consume(Be),je):markdownLineEnding(Be)?(p=Ve,dt(Be)):markdownSpace(Be)?(n.consume(Be),Ve):ot(Be)}function je(Be){return Be===45||Be===46||Be===58||Be===95||asciiAlphanumeric(Be)?(n.consume(Be),je):We(Be)}function We(Be){return Be===61?(n.consume(Be),Xe):markdownLineEnding(Be)?(p=We,dt(Be)):markdownSpace(Be)?(n.consume(Be),We):Ve(Be)}function Xe(Be){return Be===null||Be===60||Be===61||Be===62||Be===96?e(Be):Be===34||Be===39?(n.consume(Be),o=Be,Qe):markdownLineEnding(Be)?(p=Xe,dt(Be)):markdownSpace(Be)?(n.consume(Be),Xe):(n.consume(Be),Ye)}function Qe(Be){return Be===o?(n.consume(Be),o=void 0,Ue):Be===null?e(Be):markdownLineEnding(Be)?(p=Qe,dt(Be)):(n.consume(Be),Qe)}function Ye(Be){return Be===null||Be===34||Be===39||Be===60||Be===61||Be===96?e(Be):Be===47||Be===62||markdownLineEndingOrSpace(Be)?Ve(Be):(n.consume(Be),Ye)}function Ue(Be){return Be===47||Be===62||markdownLineEndingOrSpace(Be)?Ve(Be):e(Be)}function ot(Be){return Be===62?(n.consume(Be),n.exit("htmlTextData"),n.exit("htmlText"),i):e(Be)}function dt(Be){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(Be),n.exit("lineEnding"),st}function st(Be){return markdownSpace(Be)?factorySpace(n,pt,"linePrefix",t.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Be):pt(Be)}function pt(Be){return n.enter("htmlTextData"),p(Be)}}const labelEnd={name:"labelEnd",resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(n){let i=-1;const e=[];for(;++i<n.length;){const t=n[i][1];if(e.push(n[i]),t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd"){const o=t.type==="labelImage"?4:2;t.type="data",i+=o}}return n.length!==e.length&&splice(n,0,n.length,e),n}function resolveToLabelEnd(n,i){let e=n.length,t=0,o,d,p,h;for(;e--;)if(o=n[e][1],d){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;n[e][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(p){if(n[e][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(d=e,o.type!=="labelLink")){t=2;break}}else o.type==="labelEnd"&&(p=e);const y={type:n[d][1].type==="labelLink"?"link":"image",start:{...n[d][1].start},end:{...n[n.length-1][1].end}},$={type:"label",start:{...n[d][1].start},end:{...n[p][1].end}},E={type:"labelText",start:{...n[d+t+2][1].end},end:{...n[p-2][1].start}};return h=[["enter",y,i],["enter",$,i]],h=push(h,n.slice(d+1,d+t+3)),h=push(h,[["enter",E,i]]),h=push(h,resolveAll(i.parser.constructs.insideSpan.null,n.slice(d+t+4,p-3),i)),h=push(h,[["exit",E,i],n[p-2],n[p-1],["exit",$,i]]),h=push(h,n.slice(p+1)),h=push(h,[["exit",y,i]]),splice(n,d,n.length,h),n}function tokenizeLabelEnd(n,i,e){const t=this;let o=t.events.length,d,p;for(;o--;)if((t.events[o][1].type==="labelImage"||t.events[o][1].type==="labelLink")&&!t.events[o][1]._balanced){d=t.events[o][1];break}return h;function h(H){return d?d._inactive?M(H):(p=t.parser.defined.includes(normalizeIdentifier(t.sliceSerialize({start:d.end,end:t.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(H),n.exit("labelMarker"),n.exit("labelEnd"),y):e(H)}function y(H){return H===40?n.attempt(resourceConstruct,E,p?E:M)(H):H===91?n.attempt(referenceFullConstruct,E,p?$:M)(H):p?E(H):M(H)}function $(H){return n.attempt(referenceCollapsedConstruct,E,M)(H)}function E(H){return i(H)}function M(H){return d._balanced=!0,e(H)}}function tokenizeResource(n,i,e){return t;function t(M){return n.enter("resource"),n.enter("resourceMarker"),n.consume(M),n.exit("resourceMarker"),o}function o(M){return markdownLineEndingOrSpace(M)?factoryWhitespace(n,d)(M):d(M)}function d(M){return M===41?E(M):factoryDestination(n,p,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(M)}function p(M){return markdownLineEndingOrSpace(M)?factoryWhitespace(n,y)(M):E(M)}function h(M){return e(M)}function y(M){return M===34||M===39||M===40?factoryTitle(n,$,e,"resourceTitle","resourceTitleMarker","resourceTitleString")(M):E(M)}function $(M){return markdownLineEndingOrSpace(M)?factoryWhitespace(n,E)(M):E(M)}function E(M){return M===41?(n.enter("resourceMarker"),n.consume(M),n.exit("resourceMarker"),n.exit("resource"),i):e(M)}}function tokenizeReferenceFull(n,i,e){const t=this;return o;function o(h){return factoryLabel$1.call(t,n,d,p,"reference","referenceMarker","referenceString")(h)}function d(h){return t.parser.defined.includes(normalizeIdentifier(t.sliceSerialize(t.events[t.events.length-1][1]).slice(1,-1)))?i(h):e(h)}function p(h){return e(h)}}function tokenizeReferenceCollapsed(n,i,e){return t;function t(d){return n.enter("reference"),n.enter("referenceMarker"),n.consume(d),n.exit("referenceMarker"),o}function o(d){return d===93?(n.enter("referenceMarker"),n.consume(d),n.exit("referenceMarker"),n.exit("reference"),i):e(d)}}const labelStartImage={name:"labelStartImage",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartImage};function tokenizeLabelStartImage(n,i,e){const t=this;return o;function o(h){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(h),n.exit("labelImageMarker"),d}function d(h){return h===91?(n.enter("labelMarker"),n.consume(h),n.exit("labelMarker"),n.exit("labelImage"),p):e(h)}function p(h){return h===94&&"_hiddenFootnoteSupport"in t.parser.constructs?e(h):i(h)}}const labelStartLink={name:"labelStartLink",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartLink};function tokenizeLabelStartLink(n,i,e){const t=this;return o;function o(p){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(p),n.exit("labelMarker"),n.exit("labelLink"),d}function d(p){return p===94&&"_hiddenFootnoteSupport"in t.parser.constructs?e(p):i(p)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(n,i){return e;function e(t){return n.enter("lineEnding"),n.consume(t),n.exit("lineEnding"),factorySpace(n,i,"linePrefix")}}const thematicBreak$2={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(n,i,e){let t=0,o;return d;function d($){return n.enter("thematicBreak"),p($)}function p($){return o=$,h($)}function h($){return $===o?(n.enter("thematicBreakSequence"),y($)):t>=3&&($===null||markdownLineEnding($))?(n.exit("thematicBreak"),i($)):e($)}function y($){return $===o?(n.consume($),t++,y):(n.exit("thematicBreakSequence"),markdownSpace($)?factorySpace(n,h,"whitespace")($):h($))}}const list$2={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:"list",tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent$1};function tokenizeListStart(n,i,e){const t=this,o=t.events[t.events.length-1];let d=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,p=0;return h;function h(Z){const be=t.containerState.type||(Z===42||Z===43||Z===45?"listUnordered":"listOrdered");if(be==="listUnordered"?!t.containerState.marker||Z===t.containerState.marker:asciiDigit(Z)){if(t.containerState.type||(t.containerState.type=be,n.enter(be,{_container:!0})),be==="listUnordered")return n.enter("listItemPrefix"),Z===42||Z===45?n.check(thematicBreak$2,e,$)(Z):$(Z);if(!t.interrupt||Z===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),y(Z)}return e(Z)}function y(Z){return asciiDigit(Z)&&++p<10?(n.consume(Z),y):(!t.interrupt||p<2)&&(t.containerState.marker?Z===t.containerState.marker:Z===41||Z===46)?(n.exit("listItemValue"),$(Z)):e(Z)}function $(Z){return n.enter("listItemMarker"),n.consume(Z),n.exit("listItemMarker"),t.containerState.marker=t.containerState.marker||Z,n.check(blankLine,t.interrupt?e:E,n.attempt(listItemPrefixWhitespaceConstruct,H,M))}function E(Z){return t.containerState.initialBlankLine=!0,d++,H(Z)}function M(Z){return markdownSpace(Z)?(n.enter("listItemPrefixWhitespace"),n.consume(Z),n.exit("listItemPrefixWhitespace"),H):e(Z)}function H(Z){return t.containerState.size=d+t.sliceSerialize(n.exit("listItemPrefix"),!0).length,i(Z)}}function tokenizeListContinuation(n,i,e){const t=this;return t.containerState._closeFlow=void 0,n.check(blankLine,o,d);function o(h){return t.containerState.furtherBlankLines=t.containerState.furtherBlankLines||t.containerState.initialBlankLine,factorySpace(n,i,"listItemIndent",t.containerState.size+1)(h)}function d(h){return t.containerState.furtherBlankLines||!markdownSpace(h)?(t.containerState.furtherBlankLines=void 0,t.containerState.initialBlankLine=void 0,p(h)):(t.containerState.furtherBlankLines=void 0,t.containerState.initialBlankLine=void 0,n.attempt(indentConstruct,i,p)(h))}function p(h){return t.containerState._closeFlow=!0,t.interrupt=void 0,factorySpace(n,n.attempt(list$2,i,e),"linePrefix",t.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function tokenizeIndent$1(n,i,e){const t=this;return factorySpace(n,o,"listItemIndent",t.containerState.size+1);function o(d){const p=t.events[t.events.length-1];return p&&p[1].type==="listItemIndent"&&p[2].sliceSerialize(p[1],!0).length===t.containerState.size?i(d):e(d)}}function tokenizeListEnd(n){n.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(n,i,e){const t=this;return factorySpace(n,o,"listItemPrefixWhitespace",t.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(d){const p=t.events[t.events.length-1];return!markdownSpace(d)&&p&&p[1].type==="listItemPrefixWhitespace"?i(d):e(d)}}const setextUnderline={name:"setextUnderline",resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(n,i){let e=n.length,t,o,d;for(;e--;)if(n[e][0]==="enter"){if(n[e][1].type==="content"){t=e;break}n[e][1].type==="paragraph"&&(o=e)}else n[e][1].type==="content"&&n.splice(e,1),!d&&n[e][1].type==="definition"&&(d=e);const p={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[o][1].type="setextHeadingText",d?(n.splice(o,0,["enter",p,i]),n.splice(d+1,0,["exit",n[t][1],i]),n[t][1].end={...n[d][1].end}):n[t][1]=p,n.push(["exit",p,i]),n}function tokenizeSetextUnderline(n,i,e){const t=this;let o;return d;function d($){let E=t.events.length,M;for(;E--;)if(t.events[E][1].type!=="lineEnding"&&t.events[E][1].type!=="linePrefix"&&t.events[E][1].type!=="content"){M=t.events[E][1].type==="paragraph";break}return!t.parser.lazy[t.now().line]&&(t.interrupt||M)?(n.enter("setextHeadingLine"),o=$,p($)):e($)}function p($){return n.enter("setextHeadingLineSequence"),h($)}function h($){return $===o?(n.consume($),h):(n.exit("setextHeadingLineSequence"),markdownSpace($)?factorySpace(n,y,"lineSuffix")($):y($))}function y($){return $===null||markdownLineEnding($)?(n.exit("setextHeadingLine"),i($)):e($)}}const flow$1={tokenize:initializeFlow};function initializeFlow(n){const i=this,e=n.attempt(blankLine,t,n.attempt(this.parser.constructs.flowInitial,o,factorySpace(n,n.attempt(this.parser.constructs.flow,o,n.attempt(content,o)),"linePrefix")));return e;function t(d){if(d===null){n.consume(d);return}return n.enter("lineEndingBlank"),n.consume(d),n.exit("lineEndingBlank"),i.currentConstruct=void 0,e}function o(d){if(d===null){n.consume(d);return}return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),i.currentConstruct=void 0,e}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$4=initializeFactory("text");function initializeFactory(n){return{resolveAll:createResolver(n==="text"?resolveAllLineSuffixes:void 0),tokenize:i};function i(e){const t=this,o=this.parser.constructs[n],d=e.attempt(o,p,h);return p;function p(E){return $(E)?d(E):h(E)}function h(E){if(E===null){e.consume(E);return}return e.enter("data"),e.consume(E),y}function y(E){return $(E)?(e.exit("data"),d(E)):(e.consume(E),y)}function $(E){if(E===null)return!0;const M=o[E];let H=-1;if(M)for(;++H<M.length;){const Z=M[H];if(!Z.previous||Z.previous.call(t,t.previous))return!0}return!1}}}function createResolver(n){return i;function i(e,t){let o=-1,d;for(;++o<=e.length;)d===void 0?e[o]&&e[o][1].type==="data"&&(d=o,o++):(!e[o]||e[o][1].type!=="data")&&(o!==d+2&&(e[d][1].end=e[o-1][1].end,e.splice(d+2,o-d-2),o=d+2),d=void 0);return n?n(e,t):e}}function resolveAllLineSuffixes(n,i){let e=0;for(;++e<=n.length;)if((e===n.length||n[e][1].type==="lineEnding")&&n[e-1][1].type==="data"){const t=n[e-1][1],o=i.sliceStream(t);let d=o.length,p=-1,h=0,y;for(;d--;){const $=o[d];if(typeof $=="string"){for(p=$.length;$.charCodeAt(p-1)===32;)h++,p--;if(p)break;p=-1}else if($===-2)y=!0,h++;else if($!==-1){d++;break}}if(h){const $={type:e===n.length||y||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:d?p:t.start._bufferIndex+p,_index:t.start._index+d,line:t.end.line,column:t.end.column-h,offset:t.end.offset-h},end:{...t.end}};t.end={...$.start},t.start.offset===t.end.offset?Object.assign(t,$):(n.splice(e,0,["enter",$,i],["exit",$,i]),e+=2)}e++}return n}const document$1={42:list$2,43:list$2,45:list$2,48:list$2,49:list$2,50:list$2,51:list$2,52:list$2,53:list$2,54:list$2,55:list$2,56:list$2,57:list$2,62:blockQuote},contentInitial={91:definition$1},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={35:headingAtx,42:thematicBreak$2,45:[setextUnderline,thematicBreak$2],60:htmlFlow,61:setextUnderline,95:thematicBreak$2,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text$3={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]},defaultConstructs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers,contentInitial,disable,document:document$1,flow,flowInitial,insideSpan,string,text:text$3},Symbol.toStringTag,{value:"Module"}));function createTokenizer(n,i,e){let t={_bufferIndex:-1,_index:0,line:e&&e.line||1,column:e&&e.column||1,offset:e&&e.offset||0};const o={},d=[];let p=[],h=[];const y={attempt:ze(Me),check:ze(Le),consume:Ce,enter:Ne,exit:Fe,interrupt:ze(Le,{interrupt:!0})},$={code:null,containerState:{},defineSkip:ye,events:[],now:be,parser:n,previous:null,sliceSerialize:H,sliceStream:Z,write:M};let E=i.tokenize.call($,y);return i.resolveAll&&d.push(i),$;function M(We){return p=push(p,We),we(),p[p.length-1]!==null?[]:(Ke(i,0),$.events=resolveAll(d,$.events,$),$.events)}function H(We,Xe){return serializeChunks(Z(We),Xe)}function Z(We){return sliceChunks(p,We)}function be(){const{_bufferIndex:We,_index:Xe,line:Qe,column:Ye,offset:Ue}=t;return{_bufferIndex:We,_index:Xe,line:Qe,column:Ye,offset:Ue}}function ye(We){o[We.line]=We.column,je()}function we(){let We;for(;t._index<p.length;){const Xe=p[t._index];if(typeof Xe=="string")for(We=t._index,t._bufferIndex<0&&(t._bufferIndex=0);t._index===We&&t._bufferIndex<Xe.length;)xe(Xe.charCodeAt(t._bufferIndex));else xe(Xe)}}function xe(We){E=E(We)}function Ce(We){markdownLineEnding(We)?(t.line++,t.column=1,t.offset+=We===-3?2:1,je()):We!==-1&&(t.column++,t.offset++),t._bufferIndex<0?t._index++:(t._bufferIndex++,t._bufferIndex===p[t._index].length&&(t._bufferIndex=-1,t._index++)),$.previous=We}function Ne(We,Xe){const Qe=Xe||{};return Qe.type=We,Qe.start=be(),$.events.push(["enter",Qe,$]),h.push(Qe),Qe}function Fe(We){const Xe=h.pop();return Xe.end=be(),$.events.push(["exit",Xe,$]),Xe}function Me(We,Xe){Ke(We,Xe.from)}function Le(We,Xe){Xe.restore()}function ze(We,Xe){return Qe;function Qe(Ye,Ue,ot){let dt,st,pt,Be;return Array.isArray(Ye)?rt(Ye):"tokenize"in Ye?rt([Ye]):qe(Ye);function qe(tt){return wt;function wt(gt){const $t=gt!==null&&tt[gt],Mt=gt!==null&&tt.null,qt=[...Array.isArray($t)?$t:$t?[$t]:[],...Array.isArray(Mt)?Mt:Mt?[Mt]:[]];return rt(qt)(gt)}}function rt(tt){return dt=tt,st=0,tt.length===0?ot:He(tt[st])}function He(tt){return wt;function wt(gt){return Be=Ve(),pt=tt,tt.partial||($.currentConstruct=tt),tt.name&&$.parser.constructs.disable.null.includes(tt.name)?Ct():tt.tokenize.call(Xe?Object.assign(Object.create($),Xe):$,y,Ot,Ct)(gt)}}function Ot(tt){return We(pt,Be),Ue}function Ct(tt){return Be.restore(),++st<dt.length?He(dt[st]):ot}}}function Ke(We,Xe){We.resolveAll&&!d.includes(We)&&d.push(We),We.resolve&&splice($.events,Xe,$.events.length-Xe,We.resolve($.events.slice(Xe),$)),We.resolveTo&&($.events=We.resolveTo($.events,$))}function Ve(){const We=be(),Xe=$.previous,Qe=$.currentConstruct,Ye=$.events.length,Ue=Array.from(h);return{from:Ye,restore:ot};function ot(){t=We,$.previous=Xe,$.currentConstruct=Qe,$.events.length=Ye,h=Ue,je()}}function je(){t.line in o&&t.column<2&&(t.column=o[t.line],t.offset+=o[t.line]-1)}}function sliceChunks(n,i){const e=i.start._index,t=i.start._bufferIndex,o=i.end._index,d=i.end._bufferIndex;let p;if(e===o)p=[n[e].slice(t,d)];else{if(p=n.slice(e,o),t>-1){const h=p[0];typeof h=="string"?p[0]=h.slice(t):p.shift()}d>0&&p.push(n[o].slice(0,d))}return p}function serializeChunks(n,i){let e=-1;const t=[];let o;for(;++e<n.length;){const d=n[e];let p;if(typeof d=="string")p=d;else switch(d){case-5:{p="\r";break}case-4:{p=`
|
|
@@ -93,7 +93,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
93
93
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$f(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$f(n,i)}}function _iterableToArray$2(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function _arrayWithoutHoles$2(n){if(Array.isArray(n))return _arrayLikeToArray$f(n)}function _arrayLikeToArray$f(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function ownKeys$e(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$d(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$e(Object(e),!0).forEach(function(t){_defineProperty$f(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$e(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$7(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$7(n,i,e){return i&&_defineProperties$7(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$7(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$6(n,i)}function _setPrototypeOf$6(n,i){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$6(n,i)}function _createSuper$7(n){var i=_isNativeReflectConstruct$7();return function(){var t=_getPrototypeOf$7(n),o;if(i){var d=_getPrototypeOf$7(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$7(this,o)}}function _possibleConstructorReturn$7(n,i){if(i&&(_typeof$7(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$7(n)}function _assertThisInitialized$7(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(n){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$7(n)}function _defineProperty$f(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var toasterRef,ToasterContainer=(function(n){_inherits$7(e,n);var i=_createSuper$7(e);function e(t){var o;return _classCallCheck$7(this,e),o=i.call(this,t),_defineProperty$f(_assertThisInitialized$7(o),"state",{isMounted:!1,toasts:[]}),_defineProperty$f(_assertThisInitialized$7(o),"dismissHandlers",{}),_defineProperty$f(_assertThisInitialized$7(o),"toastId",0),_defineProperty$f(_assertThisInitialized$7(o),"getToastProps",function(d){var p=o.props,h=p.autoFocus,y=p.autoHideDuration,$=p.closeable,E=d.key||"toast-".concat(o.toastId++);return _objectSpread$d(_objectSpread$d({autoFocus:h,autoHideDuration:y,closeable:$},d),{},{key:E})}),_defineProperty$f(_assertThisInitialized$7(o),"show",function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(o.state.toasts.map(function(h){return h.key}).includes(d.key))return o.update(d.key,d),d.key;var p=o.getToastProps(d);return o.setState(function(h){var y=h.toasts;return{toasts:[].concat(_toConsumableArray$2(y),[p])}}),p.key}),_defineProperty$f(_assertThisInitialized$7(o),"update",function(d,p){o.setState(function(h){var y=h.toasts,$=y.map(function(E){if(E.key===d){var M=_objectSpread$d(_objectSpread$d(_objectSpread$d({},E),o.getToastProps(_objectSpread$d({autoHideDuration:E.autoHideDuration},p))),{},{key:d},o.props.resetAutoHideTimerOnUpdate?{__updated:(+E.__updated||0)+1}:{});return M}return E});return{toasts:$}})}),_defineProperty$f(_assertThisInitialized$7(o),"dismiss",function(d){o.dismissHandlers[d]&&o.dismissHandlers[d]()}),_defineProperty$f(_assertThisInitialized$7(o),"clearAll",function(){Object.keys(o.dismissHandlers).forEach(function(d){o.dismissHandlers[d]()})}),_defineProperty$f(_assertThisInitialized$7(o),"clear",function(d){d===void 0?o.clearAll():o.dismiss(d)}),_defineProperty$f(_assertThisInitialized$7(o),"internalOnClose",function(d){delete o.dismissHandlers[d],o.setState(function(p){var h=p.toasts;return{toasts:h.filter(function(y){return y.key!==d})}})}),_defineProperty$f(_assertThisInitialized$7(o),"getOnCloseHandler",function(d,p){return function(){o.internalOnClose(d),typeof p=="function"&&p()}}),_defineProperty$f(_assertThisInitialized$7(o),"renderToast",function(d){var p=d.onClose,h=d.children,y=d.key,$=_objectWithoutProperties$h(d,_excluded$k),E=o.props.overrides,M=E.ToastBody,H=E.ToastCloseIcon,Z=E.ToastInnerContainer,be=mergeOverrides({Body:Body$1,CloseIcon:CloseIconSvg,InnerContainer},{Body:M||{},CloseIcon:H||{},InnerContainer:Z||{}}),ye=mergeOverrides(be,d.overrides);return reactExports.createElement(Toast$1,_extends$j({},$,{overrides:ye,key:y,onClose:o.getOnCloseHandler(y,p)}),function(we){var xe=we.dismiss;return o.dismissHandlers[y]=xe,h})}),_defineProperty$f(_assertThisInitialized$7(o),"getSharedProps",function(){var d=o.props.placement;return{$placement:d}}),toasterRef=_assertThisInitialized$7(o),o}return _createClass$7(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"render",value:function(){for(var o=this.getSharedProps(),d=this.props.overrides.Root,p=getOverrides(d,Root$2),h=_slicedToArray$f(p,2),y=h[0],$=h[1],E=this.state.toasts.length,M=[],H=E-1;H>=0;H--)M.push(this.renderToast(this.state.toasts[H]));var Z=reactExports.createElement(y,_extends$j({"data-baseweb":"toaster"},o,$),M);return this.state.isMounted?reactExports.createElement(reactExports.Fragment,null,this.props.usePortal&&typeof document<"u"&&document.body?ReactDOM.createPortal(Z,document.body):Z,this.props.children):reactExports.createElement(reactExports.Fragment,null,this.props.children)}}]),e})(reactExports.Component);_defineProperty$f(ToasterContainer,"defaultProps",{autoFocus:!1,autoHideDuration:0,children:null,closeable:!0,overrides:{},placement:PLACEMENT.top,resetAutoHideTimerOnUpdate:!0,usePortal:!0});var toaster={getRef:function n(){return toasterRef},show:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=this.getRef();if(t)return t.show(_objectSpread$d(_objectSpread$d({},e),{},{children:i}))},info:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(i,_objectSpread$d(_objectSpread$d({},e),{},{kind:KIND$1.info}))},positive:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(i,_objectSpread$d(_objectSpread$d({},e),{},{kind:KIND$1.positive}))},warning:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(i,_objectSpread$d(_objectSpread$d({},e),{},{kind:KIND$1.warning}))},negative:function n(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.show(i,_objectSpread$d(_objectSpread$d({},e),{},{kind:KIND$1.negative}))},update:function n(i,e){var t=this.getRef();t&&t.update(i,e)},clear:function n(i){var e=this.getRef();e&&e.clear(i)}};function _typeof$6(n){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$6(n)}function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$i.apply(this,arguments)}function _classCallCheck$6(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$6(n,i,e){return i&&_defineProperties$6(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$6(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$5(n,i)}function _setPrototypeOf$5(n,i){return _setPrototypeOf$5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$5(n,i)}function _createSuper$6(n){var i=_isNativeReflectConstruct$6();return function(){var t=_getPrototypeOf$6(n),o;if(i){var d=_getPrototypeOf$6(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$6(this,o)}}function _possibleConstructorReturn$6(n,i){if(i&&(_typeof$6(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(n)}function _assertThisInitialized$6(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(n){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$6(n)}function _defineProperty$e(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Notification=(function(n){_inherits$6(e,n);var i=_createSuper$6(e);function e(){return _classCallCheck$6(this,e),i.apply(this,arguments)}return _createClass$6(e,[{key:"render",value:function(){var o=mergeOverrides({Body:{style:function(p){var h=p.$theme;return{marginTop:h.sizing.scale600,marginRight:h.sizing.scale600,marginBottom:h.sizing.scale600,marginLeft:h.sizing.scale600}}}},this.props.overrides);return reactExports.createElement(Toast$1,_extends$i({"data-baseweb":"notification"},this.props,{overrides:o}))}}]),e})(reactExports.Component);_defineProperty$e(Notification,"defaultProps",{notificationType:TYPE$1.inline,closeable:!1});const StyledAlertContent$1=styled("div",{target:"e5p6yly0"})(({theme:n})=>({pre:{backgroundColor:n.colors.transparent,paddingTop:n.spacing.lg,paddingBottom:n.spacing.lg,paddingRight:n.spacing.lg,paddingLeft:n.spacing.lg,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"pre, code":{backgroundColor:n.colors.transparent,color:"inherit"}},code:{backgroundColor:n.colors.transparent,padding:n.spacing.none},"pre, code":{color:"inherit"},a:{color:"inherit",textDecoration:"underline"}}));var Kind=(function(n){return n.ERROR="error",n.INFO="info",n.SUCCESS="success",n.WARNING="warning",n})({});function getNotificationKind(n){switch(n){case"error":return KIND$1.negative;case"info":return KIND$1.info;case"success":return KIND$1.positive;case"warning":return KIND$1.warning;default:throw new Error(`Unexpected alert type: ${n}`)}}function AlertContainer({kind:n,width:i,children:e}){const t=useEmotionTheme(),o=n.charAt(0).toUpperCase()+n.slice(1);return jsx$1(Notification,{kind:getNotificationKind(n),overrides:{Body:{style:{fontWeight:t.fontWeights.normal,marginTop:t.spacing.none,marginBottom:t.spacing.none,marginLeft:t.spacing.none,marginRight:t.spacing.none,width:i?i.toString():void 0,border:0,borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default,borderTopLeftRadius:t.radii.default,borderBottomLeftRadius:t.radii.default,paddingTop:t.spacing.lg,paddingBottom:t.spacing.lg,paddingRight:t.spacing.lg,paddingLeft:t.spacing.lg},props:{"data-testid":"stAlertContainer",className:"stAlertContainer"}},InnerContainer:{style:{width:"100%",lineHeight:t.lineHeights.small}}},children:jsx$1(StyledAlertContent$1,{"data-testid":`stAlertContent${o}`,children:e})})}const StyledStackTrace=styled("pre",{target:"e1p6lu300"})(({theme:n})=>({whiteSpace:"pre-wrap",wordWrap:"break-word",color:"inherit",fontSize:n.fontSizes.codeFontSize,fontFamily:n.genericFonts.codeFont,fontWeight:n.fontWeights.code,backgroundColor:n.colors.transparent,overflowX:"auto",margin:0,borderRadius:n.radii.default,padding:n.spacing.lg,border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`})),StyledErrorName=styled("strong",{target:"e1p6lu301"})(({theme:n})=>({fontWeight:n.fontWeights.codeBold}));function ErrorElement(n){const{name:i,message:e,stack:t,width:o}=n,d=t?t.split(`
|
|
94
94
|
`):[];d.shift();const p=d.map(h=>h.trim()).join(`
|
|
95
95
|
`);return jsxs(AlertContainer,{kind:Kind.ERROR,width:o,children:[jsxs(StyledErrorName,{children:[i,": "]}),e,t?jsx$1(StyledStackTrace,{"data-testid":"stErrorElementStack",children:jsx$1(StyledCode,{wrapLines:!1,children:p})}):null]})}const LOG$g=loglevelExports.getLogger("ErrorBoundary"),Ss=class Ss extends reactExports.PureComponent{constructor(){super(...arguments),this.state={error:null},this.componentDidCatch=i=>{LOG$g.error(`${i.name}: ${i.message}
|
|
96
|
-
${i.stack}`)}}render(){const{error:i}=this.state;return i?i.name==="ChunkLoadError"?jsx$1(ErrorElement,{width:this.props.width,name:"Network issue",message:jsxs("p",{children:["Cannot load Streamlit frontend code. This can happen when you update Streamlit while a Streamlit app is running.",jsx$1("br",{}),"To fix this, simply reload this app by pressing"," ",jsx$1(StyledInlineCode,{children:"F5"}),","," ",jsx$1(StyledInlineCode,{children:"Ctrl+R"}),", or"," ",jsx$1(StyledInlineCode,{children:"Cmd+R"}),".",jsx$1("br",{}),"If the error persists, try force-clearing your browser's cache as described"," ",jsx$1("a",{href:"https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Cache_clearing_and_disabling",rel:"noopener noreferrer",target:"_blank",children:"here"})]})}):jsx$1(ErrorElement,{width:this.props.width,name:i.name,message:i.message,stack:i.stack}):this.props.children}};Ss.getDerivedStateFromError=i=>({error:i});let ErrorBoundary=Ss;function convertRemToEm(n){return n.replace(/rem$/,"em")}function sharedMarkdownStyle(n){return{a:{color:n.colors.link,textDecoration:n.linkUnderline?"underline":"none","&:focus":{outline:"none",boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default}}}}function convertFontSizes(n,i,e){if(i){const t=roundFontSizeToNearestEighth(parseFloat(n)*.65),o=`${Math.max(t,.75)}rem`;return e?convertRemToEm(o):o}return e?convertRemToEm(n):n}function getMarkdownHeadingDefinitions(n,i,e){return{"h1, h2, h3, h4, h5, h6":{fontFamily:n.genericFonts.headingFont,lineHeight:n.lineHeights.headings,margin:0,color:"inherit"},h1:{fontSize:convertFontSizes(n.fontSizes.h1FontSize,i,e),fontWeight:n.fontWeights.h1FontWeight,padding:`${n.spacing.xl} 0 ${n.spacing.lg} 0`},"h1 b, h1 strong":{fontWeight:n.fontWeights.h1FontWeight},"h2, h3":{letterSpacing:"-0.005em"},h2:{fontSize:convertFontSizes(n.fontSizes.h2FontSize,i,e),fontWeight:n.fontWeights.h2FontWeight,padding:`${n.spacing.lg} 0 ${n.spacing.lg} 0`},h3:{fontSize:convertFontSizes(n.fontSizes.h3FontSize,i,e),fontWeight:n.fontWeights.h3FontWeight,padding:`${n.spacing.md} 0 ${n.spacing.lg} 0`},h4:{fontSize:convertFontSizes(n.fontSizes.h4FontSize,i,e),fontWeight:n.fontWeights.h4FontWeight,padding:`${n.spacing.sm} 0 ${n.spacing.lg} 0`},h5:{fontSize:convertFontSizes(n.fontSizes.h5FontSize,i,e),fontWeight:n.fontWeights.h5FontWeight,padding:`${n.spacing.xs} 0 ${n.spacing.lg} 0`},h6:{fontSize:convertFontSizes(n.fontSizes.h6FontSize,i,e),fontWeight:n.fontWeights.h6FontWeight,padding:`${n.spacing.twoXS} 0 ${n.spacing.lg} 0`}}}const StyledStreamlitMarkdown=styled("div",{target:"eg78z5t0"})(({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:"eg78z5t1"})(({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:"eg78z5t2"})(({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:"eg78z5t3"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"eg78z5t4"})(({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:"eg78z5t5"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"eg78z5t6"})({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.DaITTdfQ.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.DLB_Wwth.js"),__vite__mapDeps([3,1,2]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.DKUtJ1wC.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.DSl8Wr3R.js"),__vite__mapDeps([6,2]),import.meta.url));function containsEmojiShortcodes(n){return/:(?!material\/|streamlit:)[\w+-][\w_+-]*:/.test(n)}function containsMathSyntax(n){return new RegExp("\\$\\$[\\s\\S]+?\\$\\$|\\$(?!\\s)[^$\\n]+?(?<!\\s)\\$").test(n)}var Tags=(function(n){return n.H1="h1",n.H2="h2",n.H3="h3",n})({});function rehypeSetCodeInlineProperty(){return n=>{visit(n,"element",(i,e,t)=>{i.tagName==="code"&&(t?.type==="element"&&t.tagName==="pre"?i.properties={...i.properties,inline:!1}:i.properties={...i.properties,inline:!0})})}}function createAnchorFromText(n){if(!n)return"";const i=slugify(n);return i.length>0?i:xxhash.h32(n,43981).toString(16)}function transformLinkUri(n){return n}const scrollNodeIntoView=once(n=>{n.scrollIntoView(!0)}),HeaderActionElements=({elementId:n,help:i,hideAnchor:e})=>{const t=useEmotionTheme();return!i&&e?jsx$1(Fragment,{}):jsxs(StyledHeadingActionElements,{"data-testid":"stHeaderActionElements",children:[i&&jsx$1(InlineTooltipIcon,{content:i}),n&&!e&&jsx$1(StyledLinkIcon,{href:`#${n}`,"aria-label":"Link to heading",children:jsx$1(Link2,{size:convertRemToPx(t.iconSizes.base),"aria-hidden":"true"})})]})},HeadingWithActionElements=({tag:n,anchor:i,help:e,hideAnchor:t,children:o,tagProps:d})=>{const p=reactExports.useContext(IsSidebarContext),h=reactExports.useContext(IsDialogContext),[y,$]=reactExports.useState(i),E=reactExports.useCallback(Fe=>{if(Fe===null)return;const Me=i||createAnchorFromText(Fe.textContent);$(Me);const Le=window.location.hash.slice(1);Le&&Le===Me&&scrollNodeIntoView(Fe)},[i]),M=p||h,H=jsx$1(HeaderActionElements,{elementId:y,help:e,hideAnchor:t||M}),Z=reactExports.useId(),be=e||y&&!t&&!M?Z:void 0,ye=y?{id:y}:{},we=be?{"aria-labelledby":be}:{},xe={...M?{}:{ref:E,...ye},...we},Ne=jsxs(n,{...d,...xe,children:[be?jsx$1("span",{id:be,children:o}):o,H]});return M?Ne:jsx$1(StyledHeadingWithActionElements,{"data-testid":"stHeadingWithActionElements",children:Ne})},CustomHeading=({node:n,children:i,...e})=>{const t=e["data-anchor"];return jsx$1(HeadingWithActionElements,{tag:n.tagName,anchor:t,tagProps:e,children:i})},CustomCodeTag=({inline:n,className:i,children:e,...t})=>{const o=/language-(\w+)/.exec(i||""),d=String(e??"").replace(/^\n/,"").replace(/\n$/,""),p=o?.[1]||"";return n?jsx$1(StyledInlineCode,{className:i,...omit(t,"node"),children:e}):jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(StreamlitSyntaxHighlighter$1,{language:p,showLineNumbers:!1,children:d})})})},CustomPreTag=({children:n})=>jsx$1(StyledPreWrapper,{"data-testid":"stMarkdownPre",children:n}),CustomMediaTag=({node:n,...i})=>{const e=useCrossOriginAttribute(i.src),t=n.tagName,o={...i,crossOrigin:e};return jsx$1(t,{...o})},HelpTextContext=reactExports.createContext(void 0);HelpTextContext.displayName="HelpTextContext";const CustomHelpIcon=({children:n})=>{const e=reactExports.useContext(HelpTextContext)||(typeof n=="string"?n:"");return jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:e})})},BASE_RENDERERS={pre:CustomPreTag,code:CustomCodeTag,h1:CustomHeading,h2:CustomHeading,h3:CustomHeading,h4:CustomHeading,h5:CustomHeading,h6:CustomHeading,img:CustomMediaTag,video:CustomMediaTag,audio:CustomMediaTag,"streamlit-help-icon":CustomHelpIcon};function createColorMapping(n){const{red:i,orange:e,yellow:t,green:o,blue:d,violet:p,purple:h,gray:y,primary:$}=getMarkdownTextColors(n),{redbg:E,orangebg:M,yellowbg:H,greenbg:Z,bluebg:be,violetbg:ye,purplebg:we,graybg:xe,primarybg:Ce}=getMarkdownBgColors(n);return new Map(Object.entries({red:`color: ${i}`,orange:`color: ${e}`,yellow:`color: ${t}`,blue:`color: ${d}`,green:`color: ${o}`,violet:`color: ${p}`,gray:`color: ${y}`,grey:`color: ${y}`,primary:`color: ${$}`,rainbow:`color: transparent; background-clip: text; -webkit-background-clip: text; background-image: linear-gradient(to right,
|
|
96
|
+
${i.stack}`)}}render(){const{error:i}=this.state;return i?i.name==="ChunkLoadError"?jsx$1(ErrorElement,{width:this.props.width,name:"Network issue",message:jsxs("p",{children:["Cannot load Streamlit frontend code. This can happen when you update Streamlit while a Streamlit app is running.",jsx$1("br",{}),"To fix this, simply reload this app by pressing"," ",jsx$1(StyledInlineCode,{children:"F5"}),","," ",jsx$1(StyledInlineCode,{children:"Ctrl+R"}),", or"," ",jsx$1(StyledInlineCode,{children:"Cmd+R"}),".",jsx$1("br",{}),"If the error persists, try force-clearing your browser's cache as described"," ",jsx$1("a",{href:"https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Cache_clearing_and_disabling",rel:"noopener noreferrer",target:"_blank",children:"here"})]})}):jsx$1(ErrorElement,{width:this.props.width,name:i.name,message:i.message,stack:i.stack}):this.props.children}};Ss.getDerivedStateFromError=i=>({error:i});let ErrorBoundary=Ss;function convertRemToEm(n){return n.replace(/rem$/,"em")}function sharedMarkdownStyle(n){return{a:{color:n.colors.link,textDecoration:n.linkUnderline?"underline":"none","&:focus":{outline:"none",boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default}}}}function convertFontSizes(n,i,e){if(i){const t=roundFontSizeToNearestEighth(parseFloat(n)*.65),o=`${Math.max(t,.75)}rem`;return e?convertRemToEm(o):o}return e?convertRemToEm(n):n}function getMarkdownHeadingDefinitions(n,i,e){return{"h1, h2, h3, h4, h5, h6":{fontFamily:n.genericFonts.headingFont,lineHeight:n.lineHeights.headings,margin:0,color:"inherit"},h1:{fontSize:convertFontSizes(n.fontSizes.h1FontSize,i,e),fontWeight:n.fontWeights.h1FontWeight,padding:`${n.spacing.xl} 0 ${n.spacing.lg} 0`},"h1 b, h1 strong":{fontWeight:n.fontWeights.h1FontWeight},"h2, h3":{letterSpacing:"-0.005em"},h2:{fontSize:convertFontSizes(n.fontSizes.h2FontSize,i,e),fontWeight:n.fontWeights.h2FontWeight,padding:`${n.spacing.lg} 0 ${n.spacing.lg} 0`},h3:{fontSize:convertFontSizes(n.fontSizes.h3FontSize,i,e),fontWeight:n.fontWeights.h3FontWeight,padding:`${n.spacing.md} 0 ${n.spacing.lg} 0`},h4:{fontSize:convertFontSizes(n.fontSizes.h4FontSize,i,e),fontWeight:n.fontWeights.h4FontWeight,padding:`${n.spacing.sm} 0 ${n.spacing.lg} 0`},h5:{fontSize:convertFontSizes(n.fontSizes.h5FontSize,i,e),fontWeight:n.fontWeights.h5FontWeight,padding:`${n.spacing.xs} 0 ${n.spacing.lg} 0`},h6:{fontSize:convertFontSizes(n.fontSizes.h6FontSize,i,e),fontWeight:n.fontWeights.h6FontWeight,padding:`${n.spacing.twoXS} 0 ${n.spacing.lg} 0`}}}const StyledStreamlitMarkdown=styled("div",{target:"eg78z5t0"})(({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:"eg78z5t1"})(({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:"eg78z5t2"})(({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:"eg78z5t3"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"eg78z5t4"})(({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:"eg78z5t5"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"eg78z5t6"})({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.19_qtO6t.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.OpATzEaW.js"),__vite__mapDeps([3,1,2]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.Ca7MUNWJ.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.9jZF8jX1.js"),__vite__mapDeps([6,2]),import.meta.url));function containsEmojiShortcodes(n){return/:(?!material\/|streamlit:)[\w+-][\w_+-]*:/.test(n)}function containsMathSyntax(n){return new RegExp("\\$\\$[\\s\\S]+?\\$\\$|\\$(?!\\s)[^$\\n]+?(?<!\\s)\\$").test(n)}var Tags=(function(n){return n.H1="h1",n.H2="h2",n.H3="h3",n})({});function rehypeSetCodeInlineProperty(){return n=>{visit(n,"element",(i,e,t)=>{i.tagName==="code"&&(t?.type==="element"&&t.tagName==="pre"?i.properties={...i.properties,inline:!1}:i.properties={...i.properties,inline:!0})})}}function createAnchorFromText(n){if(!n)return"";const i=slugify(n);return i.length>0?i:xxhash.h32(n,43981).toString(16)}function transformLinkUri(n){return n}const scrollNodeIntoView=once(n=>{n.scrollIntoView(!0)}),HeaderActionElements=({elementId:n,help:i,hideAnchor:e})=>{const t=useEmotionTheme();return!i&&e?jsx$1(Fragment,{}):jsxs(StyledHeadingActionElements,{"data-testid":"stHeaderActionElements",children:[i&&jsx$1(InlineTooltipIcon,{content:i}),n&&!e&&jsx$1(StyledLinkIcon,{href:`#${n}`,"aria-label":"Link to heading",children:jsx$1(Link2,{size:convertRemToPx(t.iconSizes.base),"aria-hidden":"true"})})]})},HeadingWithActionElements=({tag:n,anchor:i,help:e,hideAnchor:t,children:o,tagProps:d})=>{const p=reactExports.useContext(IsSidebarContext),h=reactExports.useContext(IsDialogContext),[y,$]=reactExports.useState(i),E=reactExports.useCallback(Fe=>{if(Fe===null)return;const Me=i||createAnchorFromText(Fe.textContent);$(Me);const Le=window.location.hash.slice(1);Le&&Le===Me&&scrollNodeIntoView(Fe)},[i]),M=p||h,H=jsx$1(HeaderActionElements,{elementId:y,help:e,hideAnchor:t||M}),Z=reactExports.useId(),be=e||y&&!t&&!M?Z:void 0,ye=y?{id:y}:{},we=be?{"aria-labelledby":be}:{},xe={...M?{}:{ref:E,...ye},...we},Ne=jsxs(n,{...d,...xe,children:[be?jsx$1("span",{id:be,children:o}):o,H]});return M?Ne:jsx$1(StyledHeadingWithActionElements,{"data-testid":"stHeadingWithActionElements",children:Ne})},CustomHeading=({node:n,children:i,...e})=>{const t=e["data-anchor"];return jsx$1(HeadingWithActionElements,{tag:n.tagName,anchor:t,tagProps:e,children:i})},CustomCodeTag=({inline:n,className:i,children:e,...t})=>{const o=/language-(\w+)/.exec(i||""),d=String(e??"").replace(/^\n/,"").replace(/\n$/,""),p=o?.[1]||"";return n?jsx$1(StyledInlineCode,{className:i,...omit(t,"node"),children:e}):jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(StreamlitSyntaxHighlighter$1,{language:p,showLineNumbers:!1,children:d})})})},CustomPreTag=({children:n})=>jsx$1(StyledPreWrapper,{"data-testid":"stMarkdownPre",children:n}),CustomMediaTag=({node:n,...i})=>{const e=useCrossOriginAttribute(i.src),t=n.tagName,o={...i,crossOrigin:e};return jsx$1(t,{...o})},HelpTextContext=reactExports.createContext(void 0);HelpTextContext.displayName="HelpTextContext";const CustomHelpIcon=({children:n})=>{const e=reactExports.useContext(HelpTextContext)||(typeof n=="string"?n:"");return jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:e})})},BASE_RENDERERS={pre:CustomPreTag,code:CustomCodeTag,h1:CustomHeading,h2:CustomHeading,h3:CustomHeading,h4:CustomHeading,h5:CustomHeading,h6:CustomHeading,img:CustomMediaTag,video:CustomMediaTag,audio:CustomMediaTag,"streamlit-help-icon":CustomHelpIcon};function createColorMapping(n){const{red:i,orange:e,yellow:t,green:o,blue:d,violet:p,purple:h,gray:y,primary:$}=getMarkdownTextColors(n),{redbg:E,orangebg:M,yellowbg:H,greenbg:Z,bluebg:be,violetbg:ye,purplebg:we,graybg:xe,primarybg:Ce}=getMarkdownBgColors(n);return new Map(Object.entries({red:`color: ${i}`,orange:`color: ${e}`,yellow:`color: ${t}`,blue:`color: ${d}`,green:`color: ${o}`,violet:`color: ${p}`,gray:`color: ${y}`,grey:`color: ${y}`,primary:`color: ${$}`,rainbow:`color: transparent; background-clip: text; -webkit-background-clip: text; background-image: linear-gradient(to right,
|
|
97
97
|
${i}, ${e}, ${t}, ${o}, ${d}, ${p}, ${h});`,"red-background":`background-color: ${E}`,"orange-background":`background-color: ${M}`,"yellow-background":`background-color: ${H}`,"blue-background":`background-color: ${be}`,"green-background":`background-color: ${Z}`,"violet-background":`background-color: ${ye}`,"gray-background":`background-color: ${xe}`,"grey-background":`background-color: ${xe}`,"primary-background":`background-color: ${Ce}`,"rainbow-background":`background: linear-gradient(to right,
|
|
98
98
|
${E}, ${M}, ${H}, ${Z}, ${be}, ${ye}, ${we});`}))}function createRemarkHelpIcon(){return()=>n=>(visit(n,"textDirective",(i,e,t)=>{if(String(i.name)==="help"){const d=i.data||(i.data={});d.hName="streamlit-help-icon",d.hProperties=d.hProperties||{};return}}),n)}function createRemarkColoringAndSmall(n,i){return()=>e=>(visit(e,"textDirective",(t,o,d)=>{const p=String(t.name);if(p==="small"){const y=t.data||(t.data={});y.hName="span",y.hProperties=y.hProperties||{},y.hProperties.style=`font-size: ${n.fontSizes.sm};`;return}const h=p.match(/^(.+)-badge$/);if(h&&i.has(h[1])){const y=h[1];if(y==="rainbow")return;const $=i.get(y),E=i.get(`${y}-background`);if($&&E){const M=t.data||(t.data={});M.hName="span",M.hProperties=M.hProperties||{},M.hProperties.className="stMarkdownBadge",M.hProperties.style=`${E}; ${$}; font-size: ${n.fontSizes.sm};`;return}}if(i.has(p)){const y=t.data||(t.data={}),$=i.get(p);y.hName="span",y.hProperties=y.hProperties||{},y.hProperties.style=$,y.hProperties.className="stMarkdownColoredText",$&&(/background-color:/.test($)||/background:/.test($))&&(y.hProperties.className="stMarkdownColoredBackground");return}}),e)}function createRemarkUnsupportedDirectivesCleanup(){return()=>n=>(visit(n,"textDirective",(i,e,t)=>{if(!i.data?.hName&&t&&e!==void 0){const o={type:"text",value:`:${i.name}`};t.children[e]=o}}),n)}function createRemarkMaterialIcons(n){return()=>i=>{function e(t,o){return{type:"text",value:t,data:{hName:"span",hProperties:{role:"img",ariaLabel:o+" icon",translate:"no",style:`
|
|
99
99
|
display: inline-block;
|
|
@@ -116,7 +116,7 @@ For more information, refer to the [documentation for forms](https://docs.stream
|
|
|
116
116
|
${n.stackTrace?.join(`
|
|
117
117
|
`)}`,t=`https://www.google.com/search?q=${encodeURIComponent(i)}`,o=`https://chatgpt.com/?q=${encodeURIComponent(e)}`,{copyToClipboard:d}=useCopyToClipboard(),p=reactExports.useCallback(()=>{d(e)},[d,e]);return jsx$1("div",{className:"stException","data-testid":"stException",children:jsx$1(AlertContainer,{kind:n.isWarning?Kind.WARNING:Kind.ERROR,children:jsxs(StyledExceptionWrapper,{children:[jsx$1(StyledExceptionMessage,{"data-testid":"stExceptionMessage",children:jsx$1(ExceptionMessage,{type:n.type,message:n.message,messageIsMarkdown:n.messageIsMarkdown})}),n.stackTrace&&n.stackTrace.length>0?jsx$1(StackTrace,{stackTrace:n.stackTrace}):null,isLocalhost()&&jsxs(StyledExceptionLinks,{children:[jsx$1(StyledExceptionCopyButton,{onClick:p,children:"Copy"}),jsx$1("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Ask Google"}),jsx$1("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:"Ask ChatGPT"})]})]})})})}const ExceptionElement$1=reactExports.memo(ExceptionElement),SINGLE_BADGE_REGEX=/^:\w+-badge\[((?:\\.|[^\]\\])*)\]$/;function Markdown({element:n}){const{allowHtml:i,body:e,elementType:t,help:o,isCaption:d}=n,p=t===Markdown$3.Type.LATEX,h=t===Markdown$3.Type.NATIVE&&SINGLE_BADGE_REGEX.test(e.trim());let y;if(o&&h)y=jsx$1(BaseButtonTooltip,{help:o,containerWidth:!1,children:jsx$1(StreamlitMarkdown$1,{isCaption:d,source:e,allowHTML:i})});else if(o&&p)y=jsxs(StyledLabelHelpWrapper,{isLatex:p,children:[jsx$1(StreamlitMarkdown$1,{isCaption:d,source:e,allowHTML:i}),jsx$1(InlineTooltipIcon,{content:o,isLatex:p})]});else{const $=o?`${e} :help[]`:e;y=jsx$1(StyledLabelHelpWrapper,{isLatex:p,children:jsx$1(StreamlitMarkdown$1,{isCaption:d,source:$,allowHTML:i,helpText:o})})}return jsx$1("div",{className:"stMarkdown","data-testid":"stMarkdown",children:y})}const Markdown$1=reactExports.memo(Markdown),StyledText=styled("span",{target:"e1fbzn630"})(({theme:n})=>({fontFamily:n.genericFonts.bodyFont,color:n.colors.bodyText,whiteSpace:"pre-line",whiteSpaceCollapse:"preserve",wordBreak:"break-word",display:"inline-block",verticalAlign:"middle",width:"100%"})),StyledInlineHelpIcon=styled("span",{target:"e1fbzn631"})(({theme:n})=>({display:"inline-block",verticalAlign:"middle",marginLeft:n.spacing.twoXS,transform:"translateY(-0.05em)"}));function TextElement({element:n}){return jsx$1(StyledLabelHelpWrapper,{className:"stText","data-testid":"stText",children:jsxs(StyledText,{children:[n.body,n.help&&jsx$1(StyledInlineHelpIcon,{children:jsx$1(InlineTooltipIcon,{content:n.help})})]})})}const TextElement$1=reactExports.memo(TextElement),katex_min=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function makeMarkdownHeading(n,i){switch(n.toLowerCase()){case Tags.H1:return`# ${i}`;case Tags.H2:return`## ${i}`;case Tags.H3:return`### ${i}`;default:throw new Error(`Unrecognized tag for header: ${n}`)}}const OVERRIDE_COMPONENTS={p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment};function Heading(n){const{element:i}=n,{tag:e,anchor:t,body:o,help:d,hideAnchor:p,divider:h}=i,y=reactExports.useContext(IsDialogContext),[$,...E]=o.split(`
|
|
118
118
|
`);return jsxs("div",{className:"stHeading","data-testid":"stHeading",children:[jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInDialog:y,"data-testid":"stMarkdownContainer",children:[jsx$1(HeadingWithActionElements,{anchor:t,help:d,hideAnchor:p,tag:e,children:jsx$1(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(e,$),overrideComponents:OVERRIDE_COMPONENTS})}),E.length>0&&jsx$1(RenderedMarkdown,{source:E.join(`
|
|
119
|
-
`),allowHTML:!1})]}),h&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:h.includes("linear"),color:h})]})}const StyledCheckbox$1=styled("div",{target:"eczd22r0"})(({theme:n})=>({display:"flex",alignItems:"center",minHeight:n.sizes.smallElementHeight})),StyledContent=styled("div",{target:"eczd22r1"})(({visibility:n})=>({display:n===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:n===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(n,i){switch(n){case streamlit.GapSize.XXSMALL:return i.spacing.twoXS;case streamlit.GapSize.XSMALL:return i.spacing.sm;case streamlit.GapSize.SMALL:return i.spacing.lg;case streamlit.GapSize.MEDIUM:return i.spacing.threeXL;case streamlit.GapSize.LARGE:return i.spacing.fourXL;case streamlit.GapSize.XLARGE:return i.spacing.fiveXL;case streamlit.GapSize.XXLARGE:return i.spacing.sixXL;case streamlit.GapSize.NONE:return i.spacing.none;default:return i.spacing.lg}}const StyledSpace=styled("div",{target:"e12zf7d50"})({width:"100%",height:"100%"}),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=styled("div",{target:"e12zf7d51"})(({theme:n,isStale:i,width:e,height:t,elementType:o,overflow:d,flex:p,minWidth:h,textAlign:y})=>({width:e,height:t,textAlign:y,maxWidth:"100%",minWidth:e==="0px"?0:h??"1rem",position:"relative",overflow:d,flex:p,"@media print":{overflow:"visible"},":has(> .stCacheSpinner)":{height:n.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${n.spacing.lg}`,zIndex:n.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${n.spacing.xs}`,marginBottom:`-${n.spacing.xs}`},...i&&o!=="skeleton"&&STALE_STYLES,...o==="empty"?{display:"none"}:{},...o==="space"?{minWidth:0,minHeight:0}:{},...GLOBAL_ELEMENTS.includes(o)?{marginBottom:`-${n.spacing.lg}`}:{}})),StyledColumn=styled("div",{target:"e12zf7d52"})(({theme:n,weight:i,gap:e,showBorder:t,verticalAlignment:o})=>{const{VerticalAlignment:d}=Block$1.Column,p=i*100,h=translateGapWidth(e,n),y=h===n.spacing.none?`${p}%`:`calc(${p}% - ${h})`;return{width:y,flex:`1 1 ${y}`,[`@media (max-width: ${n.breakpoints.columns})`]:{minWidth:`calc(100% - ${n.spacing.twoXL})`},...o===d.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:n.spacing.sm}},...o===d.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:n.spacing.sm}},...o===d.CENTER&&{marginTop:"auto",marginBottom:"auto"},...t&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`}}}),getAlignItems=n=>{switch(n){case Block$1.FlexContainer.Align.ALIGN_START:return"start";case Block$1.FlexContainer.Align.ALIGN_CENTER:return"center";case Block$1.FlexContainer.Align.ALIGN_END:return"end";case Block$1.FlexContainer.Align.STRETCH:return"stretch";case Block$1.FlexContainer.Align.ALIGN_UNDEFINED:case void 0:case null:return"stretch";default:assertNever(n)}},getJustifyContent=n=>{switch(n){case Block$1.FlexContainer.Justify.JUSTIFY_START:return"start";case Block$1.FlexContainer.Justify.JUSTIFY_CENTER:return"center";case Block$1.FlexContainer.Justify.JUSTIFY_END:return"end";case Block$1.FlexContainer.Justify.SPACE_BETWEEN:return"space-between";case Block$1.FlexContainer.Justify.JUSTIFY_UNDEFINED:case void 0:case null:return"start";default:assertNever(n)}},StyledFlexContainerBlock=styled("div",{target:"e12zf7d53"})(({theme:n,direction:i,gap:e,flex:t,$wrap:o,height:d,border:p,align:h,justify:y,overflow:$})=>{let E;return e!==void 0&&(E=translateGapWidth(e,n)),{display:"flex",gap:E,width:"100%",maxWidth:"100%",height:d??"auto",minWidth:"1rem",flexDirection:i,flex:t,alignItems:getAlignItems(h),justifyContent:getJustifyContent(y),flexWrap:o?"wrap":"nowrap",...p&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`},overflow:$}}),StyledLayoutWrapper=styled("div",{target:"e12zf7d54"})(({width:n,height:i,flex:e})=>({display:"flex",flexDirection:"column",width:n,maxWidth:"100%",minWidth:"1rem",height:i,flex:e})),LARGE_STRETCH_BEHAVIOR$1=["graphvizChart","arrowVegaLiteChart","deckGlJsonChart","plotlyChart","docString","arrowDataFrame","json","audioInput","fileUploader","cameraInput","audio","video","code","buttonGroup","iframe"],MEDIUM_STRETCH_BEHAVIOR$1=["dateInput","radio","slider","textArea","progress","multiselect","selectbox","timeInput","numberInput","textInput"],WIDTH_STRETCH_OVERRIDE=["componentInstance","skeleton"],VISIBLE_OVERFLOW_OVERRIDE=["iframe","arrowDataFrame","deckGlJsonChart","arrowVegaLiteChart","graphvizChart"],StyledElementContainerLayoutWrapper=({node:n,...i})=>{const{isInHorizontalLayout:e,isInRoot:t}=useRequiredContext(FlexContext);let o;LARGE_STRETCH_BEHAVIOR$1.includes(n.element.type??"")?o="14rem":MEDIUM_STRETCH_BEHAVIOR$1.includes(n.element.type??"")&&(o="8rem"),n.element.type==="buttonGroup"&&n.element.buttonGroup?.style===ButtonGroup$1.Style.BORDERLESS&&(o="fit-content");const d=reactExports.useMemo(()=>{const h={};if(WIDTH_STRETCH_OVERRIDE.includes(n.element.type??"")&&(h.width="100%"),VISIBLE_OVERFLOW_OVERRIDE.includes(n.element.type??"")&&(h.overflow="visible"),n.element.type==="textArea")return n.element.heightConfig?.useStretch?{height:"100%",flex:"1 1 8rem"}:e?{height:"auto"}:{height:"auto",flex:""};if(n.element.type==="arrowVegaLiteChart")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),e&&!n.element.widthConfig&&(h.flex="1 1 14rem"),h;if(n.element.type==="arrowDataFrame")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),h;if(n.element.type==="imgs"){const y=!n.element.widthConfig||n.element.widthConfig.useStretch;h.width=y?"100%":"auto"}return h},[n.element.type,n.element.heightConfig?.useStretch,e,t,n.element.widthConfig]);let p=useLayoutStyles({element:n.element,subElement:n.element?.type&&n.element[n.element.type]||void 0,styleOverrides:d,minStretchBehavior:o});return n.element.type==="space"&&(e?p={...p,height:"auto"}:p={...p,width:"auto"}),jsx$1(StyledElementContainer,{...i,...p})},ArrowTable=reactExports.lazy(()=>__vitePreload(()=>import("./index.B4x2O71H.js"),__vite__mapDeps([7,8,9,10,11]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index._nL4Yjdr.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.D6ea3OJl.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.BCCeRfnu.js"),__vite__mapDeps([34,35]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.CAobVzMK.js"),__vite__mapDeps([36,25,13,14,17,37,16,30,31,38]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.BVit6ClT.js"),__vite__mapDeps([39,32,31,13,14]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.6_D2Y2jA.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.DtGneC7j.js"),__vite__mapDeps([40,41]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.D2EVLt1U.js"),__vite__mapDeps([42,13,14]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.DcKOiCiE.js"),__vite__mapDeps([43,17,18]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.DredtYc0.js"),__vite__mapDeps([44,45]),import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.BHMoYAbd.js"),__vite__mapDeps([46,29,30,31,32,47,20,10,21]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.P-CMMGUY.js"),__vite__mapDeps([48,45]),import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.B0GsKOuI.js"),__vite__mapDeps([49,13,16]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.BkDplL5I.js"),__vite__mapDeps([50,51]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.TO9vodwr.js"),__vite__mapDeps([52,35]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.B6EliwN_.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.DSl8Wr3R.js"),__vite__mapDeps([6,2]),import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.wLJVkoPD.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.qzz9PjCO.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BFopzcDu.js"),__vite__mapDeps([53,54,14,16,24,55,26]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.BMPclSge.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.CD8IIWcc.js"),__vite__mapDeps([56,45]),import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bb9kjc_v.js"),__vite__mapDeps([57,47,37,16]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.CcHnYd9w.js"),__vite__mapDeps([58,59,55,41]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dewn3Ni9.js"),__vite__mapDeps([60,61,16,51,55]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.i_eQw7NS.js"),__vite__mapDeps([62,63,61,54,64,65,66,67,33,68]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.Ba6hzYdl.js"),__vite__mapDeps([69,47,37,16,23]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.B6Uhb_NP.js"),__vite__mapDeps([70,37,16,19,47]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.B9DrCSR6.js"),__vite__mapDeps([71,9,37,16,72,73,74,66,68]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CjQo7CUO.js"),__vite__mapDeps([75,9,72,73,74,66,37,16,76,68]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.D2v1x0i_.js"),__vite__mapDeps([77,45,24]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.CcJEaOpw.js"),__vite__mapDeps([78,16,63,61,51]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.DozBVd6-.js"),__vite__mapDeps([79,45,16]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.DeGjj5Xy.js"),__vite__mapDeps([80,37,16,27,11]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dt0Psatx.js"),__vite__mapDeps([81,64,37,16,21,82,74,66]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.DbTMA1_Q.js"),__vite__mapDeps([83,47,37,16]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.B2TDaHdI.js"),__vite__mapDeps([84,37,16]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.BXCQzqUL.js"),__vite__mapDeps([85,9,59,37,16,22,20,10,21]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.CT9jvPcD.js"),__vite__mapDeps([86,64,37,16,87,67,65,66,82]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.C8PH2B2k.js"),__vite__mapDeps([88,64,37,16,87,67,82,74,66]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BgVtKHgk.js"),__vite__mapDeps([89,37,16,76,73]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.B7EzT2pL.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.CIlqaESj.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.DGYHxruh.js"),__vite__mapDeps([7,8,9,10,11]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.43b777iP.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.BVT89mQw.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.CvIqsWy1.js"),__vite__mapDeps([34,35]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.na9UBuse.js"),__vite__mapDeps([36,25,13,14,17,37,16,30,31,38]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.CYE7b5Du.js"),__vite__mapDeps([39,32,31,13,14]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.CP-hoxJM.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.Xg-Qttib.js"),__vite__mapDeps([40,41]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.B9kZB0o1.js"),__vite__mapDeps([42,13,14]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.DJ7P09eb.js"),__vite__mapDeps([43,17,18]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.CIbgt5wY.js"),__vite__mapDeps([44,45]),import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.BXEC4cf3.js"),__vite__mapDeps([46,29,30,31,32,47,20,10,21]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.B03eQZoH.js"),__vite__mapDeps([48,45]),import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.D6X2coHR.js"),__vite__mapDeps([49,13,16]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.BAI9aHCq.js"),__vite__mapDeps([50,51]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.BGBTkulf.js"),__vite__mapDeps([52,35]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.BbSFVZ3p.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.9jZF8jX1.js"),__vite__mapDeps([6,2]),import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.D1pK_Vw2.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.BoX8d5rK.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Fu73QtkD.js"),__vite__mapDeps([53,54,14,16,24,55,26]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.CvB9JBqS.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.CJ4oJe0V.js"),__vite__mapDeps([56,45]),import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.Boa0Egng.js"),__vite__mapDeps([57,47,37,16]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dh5SAThV.js"),__vite__mapDeps([58,59,55,41]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.j4fnjyHo.js"),__vite__mapDeps([60,61,16,51,55]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CrPjcPY1.js"),__vite__mapDeps([62,63,61,54,64,65,66,67,33,68]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.C0fSEz-3.js"),__vite__mapDeps([69,47,37,16,23]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.BnfTPrHb.js"),__vite__mapDeps([70,37,16,19,47]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.KtjGDGY5.js"),__vite__mapDeps([71,9,37,16,72,73,74,66,68]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.BzwlrgZO.js"),__vite__mapDeps([75,9,72,73,74,66,37,16,76,68]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.pU9mQeVC.js"),__vite__mapDeps([77,45,24]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.QHnxuesF.js"),__vite__mapDeps([78,16,63,61,51]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.whRT3Vm3.js"),__vite__mapDeps([79,45,16]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.CFCBhOfx.js"),__vite__mapDeps([80,37,16,27,11]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CCQ5p_WC.js"),__vite__mapDeps([81,64,37,16,21,82,74,66]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.slgxPafU.js"),__vite__mapDeps([83,47,37,16]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.CCFwVy90.js"),__vite__mapDeps([84,37,16]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.CSfsEKCF.js"),__vite__mapDeps([85,9,59,37,16,22,20,10,21]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.BF23fbfs.js"),__vite__mapDeps([86,64,37,16,87,67,65,66,82]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CVlg41MB.js"),__vite__mapDeps([88,64,37,16,87,67,82,74,66]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.WXybx2Xq.js"),__vite__mapDeps([89,37,16,76,73]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.BkSwGJoh.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.KN1VmyYN.js"),[],import.meta.url),e=n.replace(/-/g,"_"),t=i.get(e);return t&&t!==e&&i.has(t)?t:""}const StyledWidgetLabel=styled("label",{target:"e1kt9bl70"})(({disabled:n,labelVisibility:i,theme:e})=>({fontSize:e.fontSizes.sm,color:n?e.colors.fadedText40:e.colors.bodyText,display:i===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:i===LabelVisibilityOptions.Hidden?"hidden":"visible",marginBottom:e.spacing.twoXS,height:"auto",minHeight:e.fontSizes.xl,verticalAlign:"middle",flexDirection:"row",alignItems:"center"})),StyledWidgetLabelHelp=styled("div",{target:"e1kt9bl71"})({display:"flex",flexDirection:"row",justifyContent:"flex-end",flex:1}),StyledWidgetInstructions=styled("div",{target:"e1kt9bl72"})(({theme:n})=>({fontSize:n.fontSizes.twoSm,color:n.colors.fadedText60,margin:n.spacing.none,textAlign:"right",position:"absolute",bottom:n.spacing.threeXS,right:`calc(${n.fontSizes.mdLg} * 0.5)`})),StyledWidgetLabelHelpInline=styled("span",{target:"e1kt9bl73"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));function WidgetLabel({label:n,children:i,disabled:e,labelVisibility:t,htmlFor:o}){return isNullOrUndefined(n)?jsx$1(Fragment,{}):jsxs(StyledWidgetLabel,{"data-testid":"stWidgetLabel",disabled:e,labelVisibility:t,htmlFor:o,children:[jsx$1("span",{"aria-hidden":"true",children:jsx$1(StreamlitMarkdown$1,{source:n,allowHTML:!1,isLabel:!0})}),i]})}function WidgetLabelHelpIcon({content:n,label:i,ariaLabel:e,placement:t=Placement.TOP_RIGHT,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h}){return jsx$1(StyledWidgetLabelHelp,{children:jsx$1(TooltipIcon,{content:n,placement:t,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h,ariaLabel:e??getHelpTooltipAriaLabel(i)})})}const arrayComparator=(n,i)=>n.length!==i.length?!1:n.every((e,t)=>Object.is(e,i[t])),useExecuteWhenChanged=(n,i,e=arrayComparator)=>{const[t,o]=reactExports.useState(i);e(t,i)||(o(i),n())};var _excluded$i=["title","size","color","overrides"];function _extends$g(){return _extends$g=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$g.apply(this,arguments)}function _objectWithoutProperties$f(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$e(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$e(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$d(n,i){return _arrayWithHoles$d(n)||_iterableToArrayLimit$d(n,i)||_unsupportedIterableToArray$d(n,i)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
120
120
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$d(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$d(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$d(n,i)}}function _arrayLikeToArray$d(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$d(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$d(n){if(Array.isArray(n))return n}function ChevronDown(n,i){var e=useStyletron(),t=_slicedToArray$d(e,2),o=t[1],d=n.title,p=d===void 0?"Down":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$f(n,_excluded$i),H=mergeOverride({component:o.icons&&o.icons.ChevronDown?o.icons.ChevronDown:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$g({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{transform:"rotate(270, 12, 12)",fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const ChevronDown$1=reactExports.forwardRef(ChevronDown);var _excluded$h=["title","size","color","overrides"];function _extends$f(){return _extends$f=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$f.apply(this,arguments)}function _objectWithoutProperties$e(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$d(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$d(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$c(n,i){return _arrayWithHoles$c(n)||_iterableToArrayLimit$c(n,i)||_unsupportedIterableToArray$c(n,i)||_nonIterableRest$c()}function _nonIterableRest$c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
121
121
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$c(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$c(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$c(n,i)}}function _arrayLikeToArray$c(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$c(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$c(n){if(Array.isArray(n))return n}function DeleteAlt(n,i){var e=useStyletron(),t=_slicedToArray$c(e,2),o=t[1],d=n.title,p=d===void 0?"Delete Alt":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$e(n,_excluded$h),H=mergeOverride({component:o.icons&&o.icons.DeleteAlt?o.icons.DeleteAlt:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$f({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}const DeleteAlt$1=reactExports.forwardRef(DeleteAlt);var _excluded$g=["title","size","color","overrides"];function _extends$e(){return _extends$e=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$e.apply(this,arguments)}function _objectWithoutProperties$d(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$c(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$c(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$b(n,i){return _arrayWithHoles$b(n)||_iterableToArrayLimit$b(n,i)||_unsupportedIterableToArray$b(n,i)||_nonIterableRest$b()}function _nonIterableRest$b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
122
122
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$b(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$b(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$b(n,i)}}function _arrayLikeToArray$b(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$b(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$b(n){if(Array.isArray(n))return n}function Search(n,i){var e=useStyletron(),t=_slicedToArray$b(e,2),o=t[1],d=n.title,p=d===void 0?"Search":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$d(n,_excluded$g),H=mergeOverride({component:o.icons&&o.icons.Search?o.icons.Search:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$e({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 6C8.79086 6 7 7.79086 7 10C7 12.2091 8.79086 14 11 14C13.2091 14 15 12.2091 15 10C15 7.79086 13.2091 6 11 6ZM5 10C5 6.68629 7.68629 4 11 4C14.3137 4 17 6.68629 17 10C17 11.2958 16.5892 12.4957 15.8907 13.4765L19.7071 17.2929C20.0976 17.6834 20.0976 18.3166 19.7071 18.7071C19.3166 19.0976 18.6834 19.0976 18.2929 18.7071L14.4765 14.8907C13.4957 15.5892 12.2958 16 11 16C7.68629 16 5 13.3137 5 10Z"}))}const SearchIconComponent=reactExports.forwardRef(Search);var _excluded$f=["title","size","color","overrides"];function _extends$d(){return _extends$d=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$d.apply(this,arguments)}function _objectWithoutProperties$c(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$b(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$b(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$a(n,i){return _arrayWithHoles$a(n)||_iterableToArrayLimit$a(n,i)||_unsupportedIterableToArray$a(n,i)||_nonIterableRest$a()}function _nonIterableRest$a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -152,4 +152,4 @@ Event: ${i}`)}async pingServer(){const i=doInitPings(this.args.baseUriPartsList,
|
|
|
152
152
|
The app's main file \`${n}\` has
|
|
153
153
|
not been pushed to GitHub. Please add it to continue.
|
|
154
154
|
`,allowHTML:!1})}}const DEPLOY_URL="https://share.streamlit.io/deploy",STREAMLIT_CLOUD_URL="https://streamlit.io/cloud",STREAMLIT_COMMUNITY_CLOUD_DOCS_URL="https://share.streamlit.io/cloud-getting-started",STREAMLIT_DEPLOY_TUTORIAL_URL="https://share.streamlit.io/deployment-tutorial",SNOWFLAKE_LEARN_MORE_URL="https://share.streamlit.io/sis-about",SNOWFLAKE_TRIAL_URL="https://share.streamlit.io/snowflake-trial",StyledParagraph=styled("p",{target:"euwf8ug0"})({textAlign:"justify"});function NoRepositoryDetected(){return{title:"Unable to deploy",body:jsxs(StyledParagraph,{children:["The app’s code is not connected to a remote GitHub repository. To deploy on Streamlit Community Cloud, please put your code in a GitHub repository and publish the current branch. Read more in"," ",jsx$1("a",{href:STREAMLIT_COMMUNITY_CLOUD_DOCS_URL,rel:"noopener noreferrer",target:"_blank",children:"our documentation"}),"."]})}}function DeployCard(n){const{colors:i,spacing:e,radii:t,breakpoints:o,sizes:d}=useEmotionTheme(),{children:p}=n;return jsx$1(Card,{overrides:{Root:{style:{borderTopWidth:d.borderWidth,borderBottomWidth:d.borderWidth,borderLeftWidth:d.borderWidth,borderRightWidth:d.borderWidth,borderTopStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"solid",borderTopColor:i.borderColor,borderBottomColor:i.borderColor,borderLeftColor:i.borderColor,borderRightColor:i.borderColor,borderTopLeftRadius:"none",borderTopRightRadius:"none",borderBottomLeftRadius:"none",borderBottomRightRadius:"none",":last-child":{borderRightStyle:"none",borderBottomRightRadius:t.xl},":first-child":{borderBottomLeftRadius:t.xl},[`@media (max-width: ${o.md})`]:{":last-child":{borderBottomLeftRadius:t.xl}}}},Contents:{style:{marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%"}},Body:{style:{padding:e.twoXL,marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%",display:"flex",flexDirection:"column",[`@media (max-width: ${o.md})`]:{padding:e.xl}}}},children:p})}const Checkmark="data:image/svg+xml,%3csvg%20width='12'%20height='9'%20viewBox='0%200%2012%209'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.00009%206.78L1.68676%204.46667C1.42676%204.20667%201.00676%204.20667%200.746758%204.46667C0.486758%204.72667%200.486758%205.14667%200.746758%205.40667L3.53342%208.19334C3.79342%208.45334%204.21342%208.45334%204.47342%208.19334L11.5268%201.14C11.7868%200.880005%2011.7868%200.460005%2011.5268%200.200005C11.2668%20-0.0599951%2010.8468%20-0.0599951%2010.5868%200.200005L4.00009%206.78Z'%20fill='%23808495'/%3e%3c/svg%3e",StyledHeader$1=styled("div",{target:"ep91p7v0"})(({theme:n})=>({fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.bold,fontSize:n.fontSizes.lg,marginTop:n.spacing.twoXL,marginBottom:n.spacing.twoXS,[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.md}})),StyledSubheader=styled("div",{target:"ep91p7v1"})(({theme:n})=>({fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.normal,fontSize:n.fontSizes.md,marginTop:n.spacing.twoXS,marginBottom:n.spacing.md,[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.md}})),StyledCardContainer=styled("div",{target:"ep91p7v2"})(({theme:n})=>({display:"grid",maxWidth:`calc(1.25 * ${n.sizes.contentMaxWidth})`,gridTemplateColumns:"1fr 1fr 1fr",gridGap:n.spacing.none,[`@media (max-width: ${n.breakpoints.md})`]:{gridTemplateColumns:"1fr"}})),StyledElement=styled("div",{target:"ep91p7v3"})(({theme:n})=>({display:"inline-flex",marginTop:n.spacing.sm,"& > span":{fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.normal,fontSize:n.fontSizes.md,marginLeft:n.spacing.twoXL,color:n.colors.gray70},"& > img":{position:"absolute",marginTop:n.spacing.sm}})),StyledActionsWrapper=styled("div",{target:"ep91p7v4"})(({theme:n})=>({display:"flex",marginTop:n.spacing.threeXL,"& > button":{marginRight:n.spacing.twoXL},[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.xl}}));function DeployListElement(n){const{children:i}=n;return jsxs(StyledElement,{children:[jsx$1("img",{src:Checkmark,alt:"Checkmark"}),jsx$1("span",{children:i})]})}function ModalBody({children:n}){const{colors:i,fontSizes:e,spacing:t}=useEmotionTheme();return jsx$1(ModalBody$2,{style:{marginTop:t.none,marginLeft:t.none,marginRight:t.none,marginBottom:t.none,paddingTop:t.md,paddingRight:t.none,paddingBottom:t.none,paddingLeft:t.none,color:i.bodyText,fontSize:e.md,overflowY:"auto"},children:n})}function DeployModal(n){const{children:i,onClose:e}=n;return jsxs(Modal,{isOpen:!0,closeable:!0,onClose:e,size:"auto",children:[jsx$1(ModalHeader,{children:"Deploy this app using..."}),jsx$1(ModalBody,{children:i})]})}const{GitStates}=GitInfo,openUrl=n=>{window.open(n,"_blank")},getDeployAppUrl=n=>{if(n){const i=new URL(DEPLOY_URL);return i.searchParams.set("repository",n.repository??""),i.searchParams.set("branch",n.branch??""),i.searchParams.set("mainModule",n.module??""),i.toString()}return STREAMLIT_CLOUD_URL};function DeployDialog(n){const{gitInfo:i,onClose:e,metricsMgr:t,showDeployError:o,isDeployErrorModalOpen:d}=n,p=reactExports.useCallback(()=>{if(t.enqueue("menuClick",{label:"deployButtonInDialog"}),!i){const Z=NoRepositoryDetected();o(Z.title,Z.body);return}const{repository:h,branch:y,module:$,untrackedFiles:E,state:M}=i;if((!h||!y||!$)&&M===GitStates.DEFAULT){const Z=NoRepositoryDetected();o(Z.title,Z.body);return}if(M===GitStates.HEAD_DETACHED){const Z=DetachedHead();o(Z.title,Z.body);return}if($&&E?.includes($)){const Z=ModuleIsNotAdded($);o(Z.title,Z.body);return}d&&e(),openUrl(getDeployAppUrl(i))},[t,i,d,o,e]);return jsx$1(DeployModal,{onClose:e,children:jsxs(StyledCardContainer,{children:[jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:StreamlitLogo,alt:"Streamlit Logo","data-testid":"stDeployDialogCommunityCloudIcon"}),jsx$1(StyledHeader$1,{children:"Streamlit Community Cloud"}),jsx$1(StyledSubheader,{children:"For community, always free"}),jsx$1(DeployListElement,{children:"For personal hobbies and learning"}),jsx$1(DeployListElement,{children:"Deploy unlimited public apps"}),jsx$1(DeployListElement,{children:"Explore and learn from Streamlit’s community and popular apps"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.PRIMARY,onClick:p,children:"Deploy now"}),jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"readMoreCommunityCloudInDeployDialog"}),openUrl(STREAMLIT_COMMUNITY_CLOUD_DOCS_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:Snowflake,alt:"Snowflake","data-testid":"stDeployDialogSnowflakeDeploymentIcon"}),jsx$1(StyledHeader$1,{children:"Snowflake"}),jsx$1(StyledSubheader,{children:"For enterprise"}),jsx$1(DeployListElement,{children:"Enterprise-level security, support, and fully managed infrastructure"}),jsx$1(DeployListElement,{children:"Deploy unlimited private apps with role-based sharing"}),jsx$1(DeployListElement,{children:"Integrate with Snowflake’s full data stack"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:()=>{t.enqueue("menuClick",{label:"startTrialInDeployDialog"}),openUrl(SNOWFLAKE_TRIAL_URL)},children:"Start trial"}),jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"learnMoreSnowflakeInDeployDialog"}),openUrl(SNOWFLAKE_LEARN_MORE_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:2},children:[jsx$1("img",{src:Rocket,alt:"Rocket","data-testid":"stDeployDialogCustomDeploymentIcon"}),jsx$1(StyledHeader$1,{children:"Other platforms"}),jsx$1(StyledSubheader,{children:"For custom deployment "}),jsx$1(DeployListElement,{children:"Deploy on your own hardware or cloud service"}),jsx$1(DeployListElement,{children:"Set up and maintain your own authentication, resources, and costs"})]}),jsx$1(Action,{children:jsx$1(StyledActionsWrapper,{children:jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"readMoreDeployTutorialInDeployDialog"}),openUrl(STREAMLIT_DEPLOY_TUTORIAL_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})})})]})]})})}const StyledDialogBody=styled("div",{target:"e1mwyxu0"})(({theme:n})=>({display:"grid",gap:n.spacing.twoXL,gridTemplateColumns:"1fr 1fr",margin:0,padding:0})),StyledFullRow=styled("div",{target:"e1mwyxu1"})(({theme:n})=>({gridColumnStart:1,gridColumnEnd:-1,display:"grid",gap:n.spacing.xs})),StyledHeader=styled("h2",{target:"e1mwyxu2"})(({theme:n})=>({paddingBottom:0,paddingTop:0,marginBottom:n.spacing.md,marginTop:"0",fontWeight:n.fontWeights.bold,fontSize:n.fontSizes.md,lineHeight:n.lineHeights.tight,color:n.colors.bodyText,display:"grid",gridAutoFlow:"row",gap:n.spacing.xs,"&:first-of-type":{marginTop:0}})),StyledLabel=styled("label",{target:"e1mwyxu3"})(({theme:n})=>({paddingBottom:0,paddingTop:0,marginBottom:0,marginTop:0,lineHeight:n.lineHeights.tight,fontSize:n.fontSizes.sm})),StyledCheckbox=styled("input",{target:"e1mwyxu6"})(({theme:n})=>({marginRight:n.spacing.xs,appearance:"none",border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,width:n.fontSizes.md,height:n.fontSizes.md,borderRadius:`min(${n.radii.md}, ${n.radii.maxCheckbox})`,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,verticalAlign:"middle",overflow:"hidden","&:focus-visible":{outline:`2px solid ${n.colors.primary}`},"&:checked":{backgroundColor:n.colors.primary,"&:after":{content:'"✓"',fontFamily:n.fonts.monospace,fontSize:n.fontSizes.md,color:n.colors.white,lineHeight:n.lineHeights.none}},"&:disabled":{backgroundColor:n.colors.darkenedBgMix15}})),StyledDeployErrorContent=styled("div",{target:"e1mwyxu7"})(({theme:n})=>({"& > ul":{paddingLeft:n.spacing.twoXL}})),StyledErrorText=styled("div",{target:"e1mwyxu8"})(({theme:n,hasCodeBelow:i})=>({...i&&{marginBottom:n.spacing.lg}})),SettingsDialog=reactExports.memo(function n({isServerConnected:i,onClose:e,onSave:t,settings:o,allowRunOnSave:d,animateModal:p,metricsMgr:h,sessionInfo:y}){const{activeTheme:$,availableThemes:E,setTheme:M}=reactExports.useContext(ThemeContext),H=reactExports.useRef(o),Z=reactExports.useRef(!0),[be,ye]=reactExports.useState({...o}),we=reactExports.useCallback((Fe,Me)=>{ye(Le=>({...Le,[Fe]:Me}))},[]);reactExports.useEffect(()=>{if(Z.current){Z.current=!1;return}H.current=be,t(H.current)},[t,be]);const xe=reactExports.useCallback(Fe=>{we(Fe.target.name,Fe.target.checked)},[we]),Ce=reactExports.useCallback(Fe=>{let Me;Fe&&(Me=E.find(Le=>Le.name.startsWith("Custom Theme")?Le.displayName===Fe:Le.name===Fe)),Me===void 0&&(Me=E[0]),h.enqueue("menuClick",{label:"changeTheme"}),M(Me)},[M,h,E]),Ne=reactExports.useCallback(()=>E.map(Fe=>Fe.displayName??Fe.name),[E]);return jsxs(Modal,{animate:p,isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:"Settings"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogBody,{children:[d&&jsxs(StyledFullRow,{children:[jsx$1(StyledHeader,{children:"Development"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{disabled:!i,type:"checkbox",name:"runOnSave",checked:be.runOnSave&&i,onChange:xe})," ","Run on save"]}),jsx$1(StreamlitMarkdown$1,{source:"Automatically updates the app when the underlying code is updated.",allowHTML:!1,isCaption:!0})]}),jsxs(StyledFullRow,{children:[jsx$1(StyledHeader,{children:"Appearance"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{type:"checkbox",name:"wideMode",checked:be.wideMode,onChange:xe})," ","Wide mode"]}),jsx$1(StreamlitMarkdown$1,{source:" Turn on to make this app occupy the entire width of the screen.",allowHTML:!1,isCaption:!0})]}),!!E.length&&jsxs(StyledFullRow,{children:[jsx$1(StyledLabel,{children:"Choose app theme"}),jsx$1(UISelectbox,{options:Ne(),disabled:$.name===CUSTOM_THEME_NAME,onChange:Ce,value:$.displayName??$.name,placeholder:"",acceptNewOptions:!1})]}),y.isSet&&jsx$1("div",{"data-testid":"stVersionInfo",children:jsx$1(StreamlitMarkdown$1,{source:`Made with Streamlit ${y.current.streamlitVersion}`,allowHTML:!1,isCaption:!0})})]})})]})});function StreamlitDialog(n){switch(n.type){case DialogType.ABOUT:return jsx$1(AboutDialog,{...n});case DialogType.CLEAR_CACHE:return jsx$1(ClearCacheDialog,{...n});case DialogType.SETTINGS:return jsx$1(SettingsDialog,{...n});case DialogType.SCRIPT_COMPILE_ERROR:return jsx$1(ScriptCompileErrorDialog,{...n});case DialogType.WARNING:case DialogType.CONNECTION_ERROR:return jsx$1(WarningDialog,{...n});case DialogType.DEPLOY_DIALOG:return jsx$1(DeployDialog,{...n});case DialogType.DEPLOY_ERROR:return jsx$1(DeployErrorDialog,{...n});case void 0:return noDialog(n);default:return typeNotRecognizedDialog(n)}}function AboutDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"About"}),jsx$1(ModalBody$1,{children:n.aboutSectionMd&&jsx$1(StreamlitMarkdown$1,{source:n.aboutSectionMd,allowHTML:!1})})]})}function ClearCacheDialog(n){const e=["**Are you sure you want to clear the app's function caches?**","This will remove all cached entries from functions using","`@st.cache_data` and `@st.cache_resource`."].join(`
|
|
155
|
-
`);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:e,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:n.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:n.confirmCallback,children:"Clear caches"})]})]})})}function ScriptCompileErrorDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitErrorCodeBlock$1,{children:n.exception?.message?n.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:n.onClose,children:"Close"})})]})}function WarningDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:n.title}),jsx$1(ModalBody$1,{children:n.msg})]})}function DeployErrorDialog({title:n,msg:i,onClose:e,onContinue:t,onTryAgain:o}){const d=()=>{e(),t&&t()};return jsxs(Modal,{isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:n}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:i})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:o,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:d,children:t?"Continue anyway":"Close"})]})]})}function noDialog({onClose:n}){return jsx$1(Modal,{isOpen:!1,onClose:n})}function typeNotRecognizedDialog(n){return jsx$1(Modal,{isOpen:!0,onClose:n.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${n.type}" not recognized.`})})}function parseLinks(n){const i=[];let e=0,t=0;const o=/\[([^\]]+)\]\(([^)]+)\)/g;let d;for(;(d=o.exec(n))!==null;)d.index>e&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e,d.index)},t++)),i.push(jsx$1("a",{href:d[2],target:"_blank",rel:"noopener noreferrer",children:d[1]},t++)),e=d.index+d[0].length;return e<n.length&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e)},t++)),i}function DialogErrorMessage({message:n,codeBlock:i}){return jsxs(Fragment,{children:[jsx$1(StyledErrorText,{hasCodeBelow:!!i,children:parseLinks(n)}),i&&jsx$1(StreamlitErrorCodeBlock$1,{children:i})]})}const DialogErrorMessage$1=reactExports.memo(DialogErrorMessage),StyledActionButtonContainer=styled("div",{target:"eyud7440"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,alignItems:"center",lineHeight:n.iconSizes.md})),StyledActionButtonIcon=styled("div",{target:"eyud7441"})(({theme:n,icon:i})=>({background:`url("${i}") no-repeat center / contain`,width:n.iconSizes.base,height:n.iconSizes.base})),StyledToolbarActions=styled("div",{target:"eyud7442"})({display:"flex",alignItems:"center",flexDirection:"row"});function ActionButton({label:n,icon:i,onClick:e}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:e,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[i&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:i}),n&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:n})]})})})}function ToolbarActions({sendMessageToHost:n,hostToolbarItems:i,metricsMgr:e}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:i.map(({key:t,label:o,icon:d})=>jsx$1(ActionButton,{label:o,icon:d,onClick:()=>{e.enqueue("menuClick",{label:t}),n({type:"TOOLBAR_ITEM_CALLBACK",key:t})}},t))})}const screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=styled("div",{target:"erg7rn60"})(({theme:n})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:n.sizes.full,height:n.sizes.full,fontSize:"40vh",color:n.colors.redTextColor,fontWeight:n.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${n.colors.grayTextColor}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:n,endCallback:i})=>{const[e,t]=reactExports.useState(n);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const d=e-1;d>=0&&t(d),d===0&&i()},children:jsx$1("span",{children:e})},`frame${e}`)},StyledRecordAudioLabel=styled("label",{target:"ez2zj4i0"})({margin:0}),StyledInstruction=styled("p",{target:"ez2zj4i1"})({margin:0}),ScreencastDialog=({onClose:n,toggleRecordAudio:i,recordAudio:e,startRecording:t})=>{const[o,d]=reactExports.useState(e),p=reactExports.useCallback(y=>{const{checked:$}=y.target;$!==o&&(d($),i())},[o,i]),h=reactExports.useCallback(()=>{t(),n()},[t,n]);return jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio","aria-label":"Also record audio",checked:o,onChange:p})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:h,children:"Start recording!"})})]})},StyledScreenCastWarningDialog=styled("div",{target:"e15jpqoz0"})({display:"flex"}),StyledUnsupportedScreenCastIcon=styled("div",{target:"e15jpqoz1"})(({theme:n})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:n.spacing.twoXL,marginLeft:n.spacing.sm,fontSize:n.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=styled("p",{target:"e15jpqoz2"})(({theme:n})=>({margin:n.spacing.none})),UnsupportedBrowserDialog=({onClose:n})=>jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),StyledVideo=styled("video",{target:"e1y8cy420"})(({theme:n})=>({width:n.sizes.full,borderRadius:n.radii.md})),StyledDialogContainer=styled("div",{target:"e1y8cy421"})(({theme:n})=>({display:"flex",flexDirection:"column",width:n.sizes.full})),StyledRow=styled("div",{target:"e1y8cy422"})(({theme:n})=>({display:"flex",flexDirection:"row",paddingTop:n.spacing.md,paddingBottom:n.spacing.md})),StyledFirstColumn=styled("div",{target:"e1y8cy423"})(({theme:n})=>({paddingRight:n.spacing.lg,textAlign:"right",color:n.colors.grayTextColor,fontWeight:n.fontWeights.bold,width:"6em"})),StyledSecondColumn=styled("div",{target:"e1y8cy424"})(({theme:n})=>({flex:1,paddingRight:n.spacing.lg,marginRight:"6em",[`@media (max-width: ${n.breakpoints.sm})`]:{marginRight:n.spacing.none}})),StyledVideoFormatInstructions=styled("p",{target:"e1y8cy425"})(({theme:n})=>({marginTop:n.spacing.sm,marginBottom:n.spacing.none,fontSize:n.fontSizes.sm})),StyledDownloadButtonContainer=styled("div",{target:"e1y8cy426"})(({theme:n})=>({marginTop:n.spacing.twoXS})),VideoRecordedDialog=({onClose:n,videoBlob:i,fileName:e})=>{const t=URL.createObjectURL(i),o=()=>{const d=document.createElement("a");d.setAttribute("href",t),d.setAttribute("download",`${e}.webm`),d.click(),n()};return jsxs(Modal,{isOpen:!0,onClose:n,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:t,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:o,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},LOG$2=loglevelExports.getLogger("withScreencast");function withScreencast(n){const i=e=>{const{testOverride:t}=e,o=reactExports.useRef(null),[d,p]=reactExports.useState("streamlit-screencast"),[h,y]=reactExports.useState(!1),[$,E]=reactExports.useState(void 0),[M,H]=reactExports.useState(t||"OFF"),Z=reactExports.useCallback(()=>{y(Fe=>!Fe)},[]),be=reactExports.useCallback(async()=>{if(!(M==="OFF"||isNullOrUndefined(o.current))){if(M==="COUNTDOWN"){H("OFF");return}if(M==="RECORDING"){const Fe=o.current;if(!Fe||Fe.getState()==="inactive")H("OFF");else{const Me=await Fe.stop();E(Me),H("PREVIEW_FILE")}}}},[M]),ye=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}o.current=new ScreenCastRecorder({recordAudio:h,onErrorOrStop:()=>{be().catch(Fe=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Fe}`))}});try{await o.current.initialize()}catch(Fe){LOG$2.warn(`ScreenCastRecorder.initialize error: ${Fe}`),H("UNSUPPORTED");return}H("COUNTDOWN")},[h,be]),we=reactExports.useCallback(Fe=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}if(M==="OFF"){p(Fe),H("SETUP");return}be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[M,be]),xe=reactExports.useCallback(()=>{if(isNullOrUndefined(o.current))throw new Error("Countdown finished but recorder is null");o.current.start()?H("RECORDING"):be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[be]),Ce=reactExports.useCallback(()=>{H("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(n,{...e,screenCast:{currentState:M,toggleRecordAudio:Z,startRecording:we,stopRecording:be}}),M==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:Ce}),M==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:h,onClose:Ce,startRecording:ye,toggleRecordAudio:Z}),M==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:xe}),M==="PREVIEW_FILE"&&$&&jsx$1(VideoRecordedDialog,{onClose:Ce,videoBlob:$,fileName:d})]})};return i.displayName=`withScreencast(${n.displayName||n.name||"Component"})`,hoistNonReactStatics(i,n)}const useViewportSize=()=>{const{activeTheme:n}=reactExports.useContext(ThemeContext),{innerWidth:i}=useWindowDimensionsContext(),e=parseInt(n.emotion.breakpoints.md,10);return{isMobile:i<e}},DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",LOG$1=loglevelExports.getLogger("MetricsManager");class MetricsManager{constructor(i){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e="")=>{this.metricsUrl=e},this.sessionInfo=i}async initialize({gatherUsageStats:i,sendMessageToHost:e}){this.sendMessageToHost=e,this.actuallySendMetrics=i&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(LOG$1.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),LOG$1.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(i,e={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([i,e]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(i,e))}setMetadata(i){this.metadata=i}async requestDefaultMetricsConfig(){const i=localStorageAvailable();if(i){const e=window.localStorage.getItem("stMetricsConfig");if(e){this.metricsUrl=e;return}}try{const e=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!e.ok)this.metricsUrl=void 0,LOG$1.error("Failed to fetch metrics config: ",e.status);else{const t=await e.json();this.metricsUrl=t.url??void 0,i&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(e){LOG$1.error("Failed to fetch metrics config:",e)}}send(i,e={}){const t=this.buildEventProto(i,e);this.metricsUrl==="postMessage"?this.postMessageEvent(i,t):this.track(t)}sendPendingEvents(){this.pendingEvents.forEach(([i,e])=>{this.send(i,e)}),this.pendingEvents=[]}async track(i){const e=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i.toJSON())});await fetch(e)}postMessageEvent(i,e){this.sendMessageToHost({type:"METRICS_EVENT",eventName:i,data:e})}buildEventProto(i,e){const t=new MetricsEvent({event:i,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:isWebdriver(),...this.getContextData()});if(i==="menuClick")t.label=e.label;else if(i==="pageProfile")return new MetricsEvent({...t,...e});return t}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const i="ajs_anonymous_id",e=localStorageAvailable(),t=getCookie(i),o=e?window.localStorage.getItem(i):null,d=new Date;if(d.setFullYear(new Date().getFullYear()+1),t)this.anonymousId=t,e&&window.localStorage.setItem(i,t);else if(o){try{this.anonymousId=JSON.parse(o)}catch{this.anonymousId=o}setCookie(i,this.anonymousId,d)}else this.anonymousId=v4(),setCookie(i,this.anonymousId,d),e&&window.localStorage.setItem(i,this.anonymousId)}}function isWebdriver(){return window.navigator?.webdriver??!1}class SessionEventDispatcher{constructor(){this.onSessionEvent=new distExports.Signal}handleSessionEventMsg(i){this.onSessionEvent.emit(i)}}const StyledApp=styled("div",{target:"e1vju3fw0"})(({theme:n})=>{const i=hasLightBackgroundColor(n);return{position:"absolute",background:n.colors.bgColor,color:n.colors.bodyText,top:n.spacing.none,left:n.spacing.none,right:n.spacing.none,bottom:n.spacing.none,colorScheme:i?"light":"dark",overflow:"hidden","@media print":{float:"none",height:n.sizes.full,position:"static",overflow:"visible"}}});function getBrowserInfo(){const i=new UAParser().getResult();return{browserName:i.browser.name||"Unknown",browserVersion:i.browser.version||"Unknown",deviceType:i.device.type||"desktop",os:i.os.name||"Unknown"}}const showDevelopmentOptions=(n,i)=>i==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==i||Config.ToolbarMode.MINIMAL==i?!1:n||isLocalhost();function getTitle(n){return n||"Streamlit"}class AppNavigation{constructor(i,e,t,o){this.hostCommunicationMgr=i,this.onUpdatePageUrl=e,this.onPageNotFound=t,this.onPageIconChange=o,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(i){return this.mainScriptHash!==i.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=i.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=i.config?.hideSidebarNav??null),document.title=getTitle(""),[{currentPageScriptHash:i.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(i){const{sections:e,position:t,appPages:o}=i;this.appPages=o,this.hideSidebarNav=t===Navigation.Position.HIDDEN;const d=i.pageScriptHash,p=o.find($=>$.pageScriptHash===d),h=o.find($=>$.isDefault);this.mainPage=h;const y=p.urlPathname;if(!this.isPageTitleSet){const $=getTitle(p.pageName);document.title=$,this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:p.pageName??""})}return!this.isPageIconSet&&p.icon&&this.onPageIconChange(p.icon),this.onUpdatePageUrl(h.urlPathname??"",y,p.isDefault??!1),[{appPages:o,navSections:e,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:i.expanded,currentPageScriptHash:d},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:o}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:p.isDefault?"":y,currentPageScriptHash:d})}]}handlePageNotFound(i){return this.onPageNotFound(i),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}findPageByUrlPath(i){return this.appPages.find(e=>i.endsWith("/"+e.urlPathname))??this.mainPage}handlePageConfigChanged(i){i.favicon&&(this.isPageIconSet=!0),i.title&&(this.isPageTitleSet=!0)}clearPageElements(i,e){return i.filterMainScriptElements(e)}}function includeIfDefined(n){return Object.entries(n).reduce((i,[e,t])=>(t!==void 0&&(i[e]=t),i),{})}function preferWindowValue(n,i){return n??i}function reconcileHostConfigValues(n,i){if(!n)return i;const e=isValidAllowedOrigins(n.allowedOrigins)?n.allowedOrigins:void 0;return{...i,allowedOrigins:preferWindowValue(e,i.allowedOrigins),useExternalAuthToken:preferWindowValue(n.useExternalAuthToken,i.useExternalAuthToken),enableCustomParentMessages:preferWindowValue(n.enableCustomParentMessages,i.enableCustomParentMessages),blockErrorDialogs:preferWindowValue(n.blockErrorDialogs,i.blockErrorDialogs),mapboxToken:preferWindowValue(n.mapboxToken,i.mapboxToken),disableFullscreenMode:preferWindowValue(n.disableFullscreenMode,i.disableFullscreenMode),enforceDownloadInNewTab:preferWindowValue(n.enforceDownloadInNewTab,i.enforceDownloadInNewTab),resourceCrossOriginMode:preferWindowValue(n.resourceCrossOriginMode,i.resourceCrossOriginMode),setAnonymousCrossOriginPropertyOnMediaElements:i.setAnonymousCrossOriginPropertyOnMediaElements,metricsUrl:preferWindowValue(n.metricsUrl,i.metricsUrl)}}var define_PACKAGE_METADATA_default={version:"1.52.2"};const INITIAL_SCRIPT_RUN_ID="<null>",LOG=loglevelExports.getLogger("App");class App extends reactExports.PureComponent{constructor(i){super(i),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(e,t,o)=>{const d={type:DialogType.DEPLOY_ERROR,title:e,msg:t,onContinue:o,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(d)},this.handleThemeMessage=(e,t)=>{const[,o,d]=createPresetThemes(),p=isPresetTheme(this.props.theme.activeTheme);e===o.name&&p?this.props.theme.setTheme(o):e===d.name&&p?this.props.theme.setTheme(d):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${e}`),e===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const t=this.state.scriptRunState===ScriptRunState.RUNNING,o=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||t||o||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?(LOG.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===DialogType.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:e!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:e}):reactDomExports.flushSync(()=>{this.setState({connectionState:e})})},this.handleGitInfoChanged=e=>{this.setState({gitInfo:e})},this.handleCustomParentMessage=e=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:e.message}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{const t=(o,d,p)=>{const h=o[d];if(h in p)return p[h](o[h]);throw new Error(`Cannot handle ${d} "${h}".`)};try{t(e,"type",{newSession:o=>this.handleNewSession(o),sessionStatusChanged:o=>this.handleSessionStatusChanged(o),sessionEvent:o=>this.handleSessionEvent(o),delta:o=>this.handleDeltaMsg(o,e.metadata),pageConfigChanged:o=>this.handlePageConfigChanged(o),pageInfoChanged:o=>this.handlePageInfoChanged(o),pagesChanged:o=>{},pageNotFound:o=>this.handlePageNotFound(o),gitInfoChanged:o=>this.handleGitInfoChanged(o),scriptFinished:o=>this.handleScriptFinished(o),pageProfile:o=>this.handlePageProfileMsg(o),autoRerun:o=>this.handleAutoRerun(o),fileUrlsResponse:o=>this.uploadClient.onFileURLsResponse(o),deferredFileResponse:o=>this.handleDeferredFileResponse(o),parentMessage:o=>this.handleCustomParentMessage(o),logo:o=>this.handleLogo(o,e.metadata),navigation:o=>this.handleNavigation(o),authRedirect:o=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:o.url}):window.location.href=o.url}})}catch(o){const d=ensureError(o);LOG.error(d),this.showError("Bad message format",{message:d.message})}},this.handleLogo=(e,t)=>{this.setState(o=>({elements:o.elements.appRootWithLogo(e,{activeScriptHash:t.activeScriptHash,scriptRunId:o.scriptRunId})}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:o,layout:d,initialSidebarState:p,initialSidebarWidth:h,menuItems:y}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),o&&this.onPageIconChanged(o),d!==this.state.layout&&d!==PageConfig.Layout.LAYOUT_UNSET&&this.setState(E=>({layout:d,userSettings:{...E.userSettings,wideMode:d===PageConfig.Layout.WIDE}})),p!==this.state.initialSidebarState&&p!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:p}));const $=h?.pixelWidth!==void 0?h.pixelWidth:void 0;notNullOrUndefined($)&&$!==this.state.initialSidebarWidth&&this.setState(()=>({initialSidebarWidth:$})),y&&this.setState(E=>(y.clearAboutMd&&(y.aboutSectionMd=""),{menuItems:{...E.menuItems,...y}}))},this.handlePageInfoChanged=e=>{const{queryString:t}=e,o=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",o),this.setState({queryParams:t}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:t?`?${t}`:""})},this.onPageNotFound=e=>{const t=e?`You have requested page /${e}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",{message:`${t}. Running the app's main page.`})},this.handlePageNotFound=e=>{const{pageName:t}=e;this.maybeSetState(this.appNavigation.handlePageNotFound(t))},this.onPageIconChanged=e=>{handleFavicon(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=e=>{this.setState({navigationPosition:e.position}),this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{const t=PageProfile.toObject(e),o=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...t,isFragmentRun:!!t.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:o})},this.handleAutoRerun=e=>{const t=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)},e.interval*1e3);this.setState(o=>({autoReruns:[...o.autoReruns,t]}))},this.handleSessionStatusChanged=e=>{this.setState(t=>{let{scriptRunState:o}=t,{dialog:d}=t;return e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.STOP_REQUESTED?(o=ScriptRunState.RUNNING,notNullOrUndefined(d)&&d.type===DialogType.SCRIPT_COMPILE_ERROR&&(d=void 0)):!e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&t.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(o=ScriptRunState.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:!!e.runOnSave},dialog:d,scriptRunState:o,scriptChangedOnDisk:e.scriptIsRunning?!1:t.scriptChangedOnDisk}})},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),e.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const t={type:DialogType.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(t,e.scriptCompilationException?.message??"No message")}else e.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(e,t,o)=>{const d=this.getBaseUriParts();if(d){let p;StreamlitConfig.MAIN_PAGE_BASE_URL?p=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:p=d.pathname;const h=extractPageNameFromPathName(document.location.pathname,p);if((h===""?e:h)!==t){const $=o?"":t,E=this.state.queryParams||preserveEmbedQueryParams(),M=E?`?${E}`:"",Z=`${p==="/"?"":p}/${$}${M}`;window.history.pushState({},"",Z)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(e);const{appHash:o,currentPageScriptHash:d}=this.state,{scriptRunId:p,name:h,mainScriptPath:y,fragmentIdsThisRun:$,pageScriptHash:E,mainScriptHash:M}=e;if($.length)this.setState({fragmentIdsThisRun:$,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Z=e.config,be=e.customTheme;this.processThemeInput(be),this.setState({allowRunOnSave:Z.allowRunOnSave,hideTopBar:Z.hideTopBar,toolbarMode:Z.toolbarMode,latestRunTime:performance.now(),mainScriptHash:M,fragmentIdsThisRun:$}),this.maybeSetState(this.appNavigation.handleNewSession(e)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const H=hashString(this.sessionInfo.current.installationId+y);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(H),this.metricsMgr.enqueue("updateReport"),o===H&&d===E?this.setState(Z=>({elements:Z.elements.clearTransientNodes($),scriptRunId:p})):this.clearAppState(H,p,h,M)},this.handleInitialization=e=>{const t=e.initialize,o=e.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:o.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),o=document.location.toString().includes("#"),d=t?.pageScriptHash===e;isNullOrUndefined(t)||o&&d||this.onPageChange(t.pageScriptHash,void 0,!0)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=JSON.parse(JSON.stringify(e)),o=sortThemeInputKeys(t);return hashString(JSON.stringify(o))},this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:o}=e;if(this.setState({userSettings:e}),t!==o&&this.isServerConnected()){const d=new BackMsg({setRunOnSave:o});d.type="setRunOnSave",this.sendBackMsg(d)}},this.handleDeltaMsg=(e,t)=>{this.setState(o=>({elements:o.elements.applyDelta(o.scriptRunId,e,t)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new BackMsg({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new BackMsg({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(e=>{clearInterval(e)}),this.setState({autoReruns:[]})},this.rerunScript=(e=!1)=>{if(this.closeDialog(),!this.isServerConnected()){LOG.error("Cannot rerun script when disconnected from server.");return}this.state.scriptRunState===ScriptRunState.RUNNING||this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),e===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){LOG.error("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=(e,t,o)=>{const{elements:d,mainScriptHash:p}=this.state;this.cleanupAutoReruns();const h=this.appNavigation.clearPageElements(d,p),y=new Set(Array.from(h.getElements()).map($=>getElementId($)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(y),void 0,e,void 0,t,o)},this.isAppInReadyState=e=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&e.scriptRunState===ScriptRunState.RUNNING&&e.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(e,t,o,d,p,h)=>{const y=this.getBaseUriParts();if(!y){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:$}=this.state;let E=p??this.getQueryString(),M="";const H={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(o){if(o!==$&&!h){const be=preserveEmbedQueryParams();E=getQueryString(p,be),this.setState({queryParams:E}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:E})}}else if($)o=$;else{let be;StreamlitConfig.MAIN_PAGE_BASE_URL?be=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:be=y.pathname,M=extractPageNameFromPathName(document.location.pathname,be),o=""}const Z=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:E,widgetStates:e,pageScriptHash:o,pageName:M,fragmentId:t,isAutoRerun:d,cachedMessageHashes:Z,contextInfo:H}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){LOG.error("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const e=new BackMsg({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const e={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new BackMsg({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new BackMsg({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?(LOG.info(e),this.connectionManager.sendMessage(e)):LOG.error(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.state.connectionErrorDismissed||this.showError("Connection error",e,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(e=!0)=>{const t={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:e,metricsMgr:this.metricsMgr};this.openDialog(t)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:e?.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let t;try{const o=getIFrameEnclosingApp(this.embeddingId);o?.contentWindow?t=o.contentWindow.window:t=window}catch{t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast,o=getScreencastTimestamp();t(`streamlit-${e}-${o}`)},this.handleFullScreen=e=>{this.setState({isFullScreen:e})},this.setLibConfig=e=>{this.setState({libConfig:e})},this.setAppConfig=e=>{this.setState({appConfig:e})},this.addScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)}))},this.removeScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.filter(d=>d!==e)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:e}=this.state,t=e&&e.length>0?e:document.location.search;return t.startsWith("?")?t.substring(1):t},this.getThemeColorScheme=()=>{const{activeTheme:e}=this.props.theme;return hasLightBackgroundColor(e.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&e?.length>0},this.showDeployButton=()=>showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&!this.isInCloudEnvironment()&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue("menuClick",{label:"deployButtonInApp"}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(e,t)=>{const o=this.isServerConnected(),d=this.sessionInfo.isSet;if(o&&d){const p=new BackMsg({fileUrlsRequest:{requestId:e,fileNames:t.map(h=>h.name),sessionId:this.sessionInfo.current.sessionId}});p.type="fileUrlsRequest",this.sendBackMsg(p)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${o}, isSessionInfoSet: ${d})`),this.uploadClient.onFileURLsResponse({responseId:e,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=e=>{const t=this.isServerConnected(),o=this.sessionInfo.isSet;if(!t||!o)return Promise.reject(new Error("Not connected to server or session not initialized"));const d=Promise.withResolvers(),p=this.deferredFileListeners.get(e)??new Set,h=$=>{p.delete(h),d.resolve($)};p.add(h),this.deferredFileListeners.set(e,p);const y=new BackMsg({deferredFileRequest:{fileId:e,sessionId:this.sessionInfo.current.sessionId}});return y.type="deferredFileRequest",this.sendBackMsg(y),d.promise},this.handleDeferredFileResponse=e=>{const t=this.deferredFileListeners.get(e.fileId);if(!(!t||t.size===0)){for(const o of Array.from(t))try{o(e)}catch{}this.deferredFileListeners.delete(e.fileId)}},this.handleKeyDown=(e,t)=>{if(!((e==="c"||e==="r")&&isKeyboardEventFromEditableTarget(t)))switch(e){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=e=>{e==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:e}=this.state;return!!(e?.aboutSectionMd||e?.getHelpUrl&&!e?.hideGetHelp||e?.reportABugUrl&&!e?.hideReportABug)},this.shouldShowToolbar=(e,t)=>{const o=!isEmbed()||isToolbarDisplayed();let d;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?d=e.length>0||t.length>0||this.hasAppDefinedMenuItems():d=!0,o&&d},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet(),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,initialSidebarWidth:void 0,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:"",gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:Navigation.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:i.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:e=>{this.setState({inputsDisabled:e})},themeChanged:this.handleThemeMessage,pageChanged:e=>this.onPageChange(e),isOwnerChanged:e=>this.setState({isOwner:e}),fileUploadClientConfigChanged:e=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(e)},hostMenuItemsChanged:e=>{this.setState({hostMenuItems:e})},hostToolbarItemsChanged:e=>{this.setState({hostToolbarItems:e})},hostHideSidebarNavChanged:e=>{this.setState({hostHideSidebarNav:e})},sidebarChevronDownshiftChanged:e=>{this.setState({sidebarChevronDownshift:e})},pageLinkBaseUrlChanged:e=>{this.setState({pageLinkBaseUrl:e})},queryParamsChanged:e=>{this.setState({queryParams:e})},deployedAppMetadataChanged:e=>{this.setState({deployedAppMetadata:e})},restartWebsocketConnection:()=>{this.connectionManager||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(e,t,o,d,p)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:e,error:t,message:o,source:d,customComponentName:p})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}applyInitialHostConfig(){if(!isHostConfigBypassEnabled())return;const i=StreamlitConfig.HOST_CONFIG,e=includeIfDefined({allowedOrigins:i.allowedOrigins,useExternalAuthToken:i.useExternalAuthToken,enableCustomParentMessages:i.enableCustomParentMessages,blockErrorDialogs:i.blockErrorDialogs});this.hostCommunicationMgr.setAllowedOrigins(e),this.setAppConfig(e);const t=includeIfDefined({mapboxToken:i.mapboxToken,disableFullscreenMode:i.disableFullscreenMode,enforceDownloadInNewTab:i.enforceDownloadInNewTab,resourceCrossOriginMode:i.resourceCrossOriginMode});Object.keys(t).length>0&&this.setLibConfig(t),i.metricsUrl!==void 0&&this.metricsMgr.setMetricsConfig(i.metricsUrl)}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.applyInitialHostConfig(),this.connectionManager=new ConnectionManager({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(i,e,t)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:"Websocket Connection",error:i,message:e,source:t})},onHostConfigResp:i=>{const e=reconcileHostConfigValues(StreamlitConfig.HOST_CONFIG,i),{allowedOrigins:t,useExternalAuthToken:o,disableFullscreenMode:d,enableCustomParentMessages:p,mapboxToken:h,enforceDownloadInNewTab:y,metricsUrl:$,blockErrorDialogs:E,setAnonymousCrossOriginPropertyOnMediaElements:M,resourceCrossOriginMode:H}=e,Z={allowedOrigins:t,useExternalAuthToken:o,enableCustomParentMessages:p,blockErrorDialogs:E},be={mapboxToken:h,disableFullscreenMode:d,enforceDownloadInNewTab:y,resourceCrossOriginMode:H??(M?"anonymous":void 0)};this.metricsMgr.setMetricsConfig($),this.hostCommunicationMgr.setAllowedOrigins(Z),this.setAppConfig(Z),this.setLibConfig(be)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const i=document.querySelectorAll("[data-iframe-height]"),e=Array.from(i).map(t=>Math.ceil(t.getBoundingClientRect().bottom));return Math.max(0,...e)}},__vitePreload(()=>import("./iframeResizer.contentWindow.Cedt4qbc.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)&¬NullOrUndefined(t.streamlitVersion))return e!=t.streamlitVersion}return!1}maybeSetState(i){if(i){const[e,t]=i;this.setState(e,t)}}processThemeInput(i){const e=this.createThemeHash(i);if(e===this.state.themeHash)return;this.setState({themeHash:e});const t=!isPresetTheme(this.props.theme.activeTheme);if(i){const o=createCustomThemes(i);this.props.theme.addThemes(o,{keepPresetThemes:!1});const p=getHostSpecifiedThemeOnly()??getCachedTheme(),h=mapCachedThemeToAvailableTheme(p,o);if(h)this.setAndSendTheme(h);else if(o.length>1){const y=o.findIndex($=>$.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(o[y])}else this.setAndSendTheme(o[0])}else if(this.props.theme.addThemes([]),t){const d=getHostSpecifiedThemeOnly()??getCachedTheme(),h=mapCachedThemeToAvailableTheme(d,[lightTheme,darkTheme]);h?this.setAndSendTheme(h):this.setAndSendTheme(createAutoTheme())}(i?.fontFaces&&i.fontFaces.length>0||i?.fontSources&&i.fontSources.length>0)&&this.props.theme.setFonts(i)}handleScriptFinished(i){(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:o})=>({elements:o.clearStaleNodes(e,t)}),()=>{const e=new Set(Array.from(this.state.elements.getElements()).map(t=>getElementId(t)).filter(notUndefined));this.widgetMgr.removeInactive(e)}),this.connectionManager!==null&&i!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(i,e,t,o){this.setState(d=>{const p=this.appNavigation.clearPageElements(d.elements,o);return{scriptRunId:e,scriptName:t,appHash:i,elements:p}},()=>{const d=new Set(Array.from(this.state.elements.getElements()).map(p=>getElementId(p)).filter(notUndefined));this.widgetMgr.removeInactive(d)})}openDialog(i){this.setState({dialog:i})}render(){const{allowRunOnSave:i,connectionState:e,dialog:t,elements:o,initialSidebarState:d,menuItems:p,isFullScreen:h,scriptRunId:y,scriptRunState:$,userSettings:E,hideTopBar:M,hideSidebarNav:H,expandSidebarNav:Z,currentPageScriptHash:be,hostHideSidebarNav:ye,pageLinkBaseUrl:we,sidebarChevronDownshift:xe,hostMenuItems:Ce,hostToolbarItems:Ne,libConfig:Fe,inputsDisabled:Me,appPages:Le,navSections:ze,navigationPosition:Ke,scriptChangedOnDisk:Ve}=this.state,je=this.props.isMobileViewport?Navigation.Position.SIDEBAR:Ke,We=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),Xe=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":E.wideMode}),Qe=t?StreamlitDialog({...t,onClose:this.closeDialog}):null,Ye=this.shouldShowToolbar(Ce,Ne),Ue=!isEmbed()||isPaddingDisplayed(),ot=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:d,initialSidebarWidth:this.state.initialSidebarWidth,pageLinkBaseUrl:we,currentPageScriptHash:be,onPageChange:this.onPageChange,navSections:ze,appPages:Le,appLogo:o.logo,sidebarChevronDownshift:xe,expandSidebarNav:Z,hideSidebarNav:H||ye||je===Navigation.Position.TOP,isFullScreen:h,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:$,scriptRunId:y,mapboxToken:Fe.mapboxToken,enforceDownloadInNewTab:Fe.enforceDownloadInNewTab,resourceCrossOriginMode:Fe.resourceCrossOriginMode,requestDeferredFile:this.requestDeferredFile,children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:Xe,"data-testid":"stApp","data-test-script-state":y==INITIAL_SCRIPT_RUN_ID?"initial":$,"data-test-connection-state":e,children:[jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:o,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:je,wideMode:E.wideMode,embedded:isEmbed(),showPadding:Ue,disableScrolling:ot,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Me||e!==ConnectionState.CONNECTED,showToolbar:Ye,disableFullscreenMode:Fe.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:jsxs(Fragment,{children:[!M&&jsx$1(StatusWidget,{connectionState:e,scriptRunState:$,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:i,showScriptChangedActions:Ve}),!M&&jsx$1(ToolbarActions,{hostToolbarItems:Ne,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!Ve&&jsx$1(DeployButton,{onClick:this.deployButtonClicked}),!M&&jsx$1(MainMenu$1,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:Ce,developmentMode:We,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:p,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]})}),Qe]})})})}}const AppWithScreenCast=withScreencast(App),AppWrapper=n=>{const{isMobile:i}=useViewportSize();return jsx$1(AppWithScreenCast,{...n,isMobileViewport:i})};function useThemeManager(){const n=getDefaultTheme(),[i,e]=reactExports.useState(n),[t,o]=reactExports.useState(n.themeInput?.fontFaces??[]),[d,p]=reactExports.useState(null),[h,y]=reactExports.useState(()=>[...createPresetThemes(),...isPresetTheme(n)?[]:[n]]),$=(be,ye={})=>{const{keepPresetThemes:we=!0}=ye;y([...we?createPresetThemes():[],...be])},E=reactExports.useCallback(be=>{e(ye=>be!==ye?(be.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(be),be):ye)},[e]),M=reactExports.useCallback(()=>{i.name===AUTO_THEME_NAME&&E(getHostSpecifiedTheme());const be=h.filter(ye=>ye.name!==AUTO_THEME_NAME);y([createAutoTheme(),...be])},[i.name,h,E]),H=reactExports.useCallback(be=>{be.fontFaces&&o(be.fontFaces);const ye=[...be.fontSources||[],...be.sidebar?.fontSources||[]],we={};ye.forEach(xe=>{xe.sourceUrl&&xe.configName&&(we[xe.configName]=xe.sourceUrl)}),p(Object.keys(we).length>0?we:null)},[o,p]),Z=reactExports.useCallback(be=>{H(be);const ye=new CustomThemeConfig(be),we=createTheme(CUSTOM_THEME_NAME,ye);E(we)},[H,E]);return reactExports.useEffect(()=>{const be=window.matchMedia("(prefers-color-scheme: dark)");return be.addEventListener("change",M),window.addEventListener("afterprint",M),()=>{window.removeEventListener("afterprint",M),be.removeEventListener("change",M)}},[i,h,M]),[{setTheme:E,activeTheme:i,addThemes:$,availableThemes:h,setFonts:H,setImportedTheme:Z},t,d]}const ThemedApp=({streamlitExecutionStartedAt:n})=>{const[i,e,t]=useThemeManager(),{activeTheme:o}=i;return jsx$1(RootStyleProvider,{theme:o,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[e.length>0&&jsx$1(FontFaceDeclaration,{fontFaces:e}),t&&jsx$1(FontSources,{fontSources:t}),jsx$1(AppWrapper,{theme:i,streamlitExecutionStartedAt:n})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"}),rootDomNode=document.getElementById("root");if(!rootDomNode)throw new Error("#root DOM element not found");const reactRoot=clientExports.createRoot(rootDomNode);reactRoot.render(jsx$1(reactExports.StrictMode,{children:jsx$1(HelmetProvider,{children:jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})})})}));export{toaster as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,styled as F,StyledDropdownListItem as G,isPropValid as H,DownloadContext as I,StyledErrorMessage as J,toString$2 as K,LibConfigContext as L,findAndReplace as M,Arrow$2 as N,range as O,Placement as P,isNumericType as Q,DataFrameCellType as R,StreamlitConfig as S,TooltipIcon as T,UISelectbox as U,useCrossOriginAttribute as V,loglevelExports as W,useRequiredContext as X,NavigationContext as Y,DynamicIcon as Z,_extends$A as _,BaseButtonTooltip as a,TYPE as a$,Fragment as a0,Kind as a1,AlertElement$1 as a2,Video$1 as a3,keyframes as a4,StyledWidgetInstructions as a5,isFromMac as a6,FormsContext as a7,StyledFormSubmitContent as a8,Form$1 as a9,Tooltip$1 as aA,IsSidebarContext as aB,LabelVisibilityOptions as aC,React as aD,find as aE,parse$1 as aF,parse$2 as aG,normalize$1 as aH,html$2 as aI,svg as aJ,useCopyToClipboard as aK,ACCESSIBILITY_TYPE as aL,Popover$2 as aM,ensureError as aN,ErrorElement as aO,hexToRgb as aP,withWrapper as aQ,__vitePreload as aR,blend as aS,SetCache as aT,cacheHas as aU,baseRest as aV,isArrayLikeObject as aW,useSelectCommon as aX,StyledValueContainer as aY,Select as aZ,VirtualDropdown as a_,isInForm as aa,convertRemToPx as ab,WidgetLabelHelpIcon as ac,WidgetLabel as ad,isMaterialIcon as ae,getBorderColor as af,TextInput$1 as ag,getDefaultExportFromCjs as ah,darken as ai,getPrimaryFocusBoxShadow as aj,PortalContext as ak,reactDomExports as al,classNames as am,requireReact as an,styled$1 as ao,isFocusVisible as ap,getOverride as aq,getOverrideProps as ar,root$4 as as,toNumber as at,isObject$1 as au,mergeOverrides as av,CUSTOM_INPUT_TYPE as aw,ChevronDown$1 as ax,PLACEMENT$1 as ay,Icon$2 as az,BaseButton as b,util_bn_ as b$,Metric$1 as b0,transparentize as b1,StyledWidgetLabel as b2,Global as b3,getCrossOriginAttribute as b4,_arrayLikeToArray as b5,_unsupportedIterableToArray as b6,ViewStateContext as b7,useWindowDimensionsContext as b8,LocaleContext as b9,Skeleton as bA,ComponentRegistry as bB,__awaiter as bC,PropTypes as bD,isFromWindows as bE,requirePropTypes as bF,merge$1 as bG,getIncreasingGreen as bH,getDecreasingRed as bI,getBlue80 as bJ,getGray30 as bK,getGray70 as bL,getGray90 as bM,getDivergingColorsArray as bN,keysToSnakeCase as bO,PlotlyChart$1 as bP,themeColors as bQ,isMobile as bR,UploadedFileInfo as bS,FileUploaderState as bT,ThemeContext$1 as bU,pick$1 as bV,Slider$1 as bW,zip as bX,baseSlice as bY,baseToString as bZ,trimmedEndIndex as b_,shouldWidthStretch as ba,ButtonGroup$1 as bb,LabelVisibilityMessage as bc,StyledButtonGroup as bd,NumberInput$1 as be,isDatetimeType as bf,isDateType as bg,getTimezone as bh,debounce$2 as bi,isEqual$1 as bj,shouldHeightStretch as bk,useStyletron as bl,mergeOverride as bm,toObjectOverride as bn,Icon$1 as bo,DeleteAlt$1 as bp,forkBlur as bq,forkFocus as br,addCssUnit as bs,convert as bt,visitParents as bu,SKIP as bv,toExportedTheme as bw,ArrowDataframe as bx,useTimeout as by,Skeleton$1 as bz,BaseButtonSize as c,_assertThisInitialized as c$,util_int_ as c0,util_bit_ as c1,util_math_ as c2,util_buffer_ as c3,util_vector_ as c4,util_pretty_ as c5,util_interval_ as c6,compareTypes as c7,compareFields as c8,compareSchemas as c9,StatefulMenu as cA,ok as cB,stringify$1 as cC,stringify as cD,pointStart as cE,visit as cF,pointEnd as cG,structuredClone$1 as cH,identity as cI,arrayEach as cJ,baseEach as cK,isArray$1 as cL,arrayMap as cM,baseMap as cN,baseIteratee as cO,baseForOwn as cP,isObjectLike as cQ,baseGetTag as cR,isPlainObject$3 as cS,cloneDeep$1 as cT,useExecuteWhenChanged as cU,StatefulPopover as cV,_typeof$e as cW,_inherits as cX,_createSuper as cY,_classCallCheck as cZ,_defineProperty$s as c_,getAugmentedNamespace as ca,isStringType as cb,isTimeType as cc,isPeriodType as cd,isIntervalType as ce,isDurationType as cf,isDecimalType as cg,isFloatType as ch,isObjectType as ci,isListType as cj,TimeUnit as ck,Struct as cl,ThemeProvider$1 as cm,createThemedStyled as cn,createThemedUseStyletron as co,createThemedWithStyle as cp,expandBorderStyles as cq,withStyle as cr,requireReactIs$1 as cs,AcceptFileValue as ct,assertNever as cu,chatInputAcceptFileProtoValueToEnum as cv,tableFromIPC as cw,v4 as cx,requireReactDom as cy,UIDConsumer as cz,Box as d,_createClass as d0,filterOptions as d1,mergeWith as d2,parseEntities as d3,StyledPre as d4,CopyButton$1 as d5,StyledCopyButtonContainer as d6,StyledCodeBlock as d7,propTypesExports as d8,_slicedToArray as d9,isBooleanType as dA,Field as dB,Null as dC,isRangeIndexType as dD,isEmptyType as dE,isBytesType as dF,isCategoricalType as dG,fontSizes as dH,_objectWithoutProperties$1 as dI,_objectSpread2 as dJ,jsx as dK,css as dL,lighten as dM,mix$1 as dN,TRIGGER_TYPE as dO,StyledTooltipContentWrapper as dP,FlexContext as dQ,useScrollbarGutterSize as dR,Resizable as dS,index as da,_getPrototypeOf as db,_possibleConstructorReturn as dc,parseToRgba as dd,DeckGlJsonChart$1 as de,hasPath as df,isArrayLike as dg,isBuffer as dh,isTypedArray as di,isArguments as dj,getTag as dk,isPrototype as dl,baseKeys as dm,Set$1 as dn,setToArray as dp,requireClassnames as dq,groupBy as dr,flatten as ds,Vector as dt,getLuminance as du,parseIconPackEntry as dv,genericFonts as dw,getMarkdownBgColors as dx,isUnsignedIntegerType as dy,isIntegerType as dz,isNullOrUndefined as e,StyledWidgetLabelHelpInline as f,getHelpTooltipAriaLabel as g,hoistNonReactStatics as h,isValidFormId as i,jsx$1 as j,useCalculatedDimensions as k,useEmotionTheme as l,hasLightBackgroundColor as m,notNullOrUndefined as n,jsxs as o,labelVisibilityProtoValueToEnum as p,StreamlitMarkdown$1 as q,reactExports as r,streamlit as s,StyledContent as t,useRegisterShortcut as u,getFocusBoxShadow as v,StyledCheckbox$1 as w,getOverrides as x,SIZE$1 as y,ENHANCER_POSITION as z};
|
|
155
|
+
`);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:e,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:n.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:n.confirmCallback,children:"Clear caches"})]})]})})}function ScriptCompileErrorDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitErrorCodeBlock$1,{children:n.exception?.message?n.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:n.onClose,children:"Close"})})]})}function WarningDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:n.title}),jsx$1(ModalBody$1,{children:n.msg})]})}function DeployErrorDialog({title:n,msg:i,onClose:e,onContinue:t,onTryAgain:o}){const d=()=>{e(),t&&t()};return jsxs(Modal,{isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:n}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:i})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:o,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:d,children:t?"Continue anyway":"Close"})]})]})}function noDialog({onClose:n}){return jsx$1(Modal,{isOpen:!1,onClose:n})}function typeNotRecognizedDialog(n){return jsx$1(Modal,{isOpen:!0,onClose:n.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${n.type}" not recognized.`})})}function parseLinks(n){const i=[];let e=0,t=0;const o=/\[([^\]]+)\]\(([^)]+)\)/g;let d;for(;(d=o.exec(n))!==null;)d.index>e&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e,d.index)},t++)),i.push(jsx$1("a",{href:d[2],target:"_blank",rel:"noopener noreferrer",children:d[1]},t++)),e=d.index+d[0].length;return e<n.length&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e)},t++)),i}function DialogErrorMessage({message:n,codeBlock:i}){return jsxs(Fragment,{children:[jsx$1(StyledErrorText,{hasCodeBelow:!!i,children:parseLinks(n)}),i&&jsx$1(StreamlitErrorCodeBlock$1,{children:i})]})}const DialogErrorMessage$1=reactExports.memo(DialogErrorMessage),StyledActionButtonContainer=styled("div",{target:"eyud7440"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,alignItems:"center",lineHeight:n.iconSizes.md})),StyledActionButtonIcon=styled("div",{target:"eyud7441"})(({theme:n,icon:i})=>({background:`url("${i}") no-repeat center / contain`,width:n.iconSizes.base,height:n.iconSizes.base})),StyledToolbarActions=styled("div",{target:"eyud7442"})({display:"flex",alignItems:"center",flexDirection:"row"});function ActionButton({label:n,icon:i,onClick:e}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:e,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[i&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:i}),n&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:n})]})})})}function ToolbarActions({sendMessageToHost:n,hostToolbarItems:i,metricsMgr:e}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:i.map(({key:t,label:o,icon:d})=>jsx$1(ActionButton,{label:o,icon:d,onClick:()=>{e.enqueue("menuClick",{label:t}),n({type:"TOOLBAR_ITEM_CALLBACK",key:t})}},t))})}const screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=styled("div",{target:"erg7rn60"})(({theme:n})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:n.sizes.full,height:n.sizes.full,fontSize:"40vh",color:n.colors.redTextColor,fontWeight:n.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${n.colors.grayTextColor}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:n,endCallback:i})=>{const[e,t]=reactExports.useState(n);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const d=e-1;d>=0&&t(d),d===0&&i()},children:jsx$1("span",{children:e})},`frame${e}`)},StyledRecordAudioLabel=styled("label",{target:"ez2zj4i0"})({margin:0}),StyledInstruction=styled("p",{target:"ez2zj4i1"})({margin:0}),ScreencastDialog=({onClose:n,toggleRecordAudio:i,recordAudio:e,startRecording:t})=>{const[o,d]=reactExports.useState(e),p=reactExports.useCallback(y=>{const{checked:$}=y.target;$!==o&&(d($),i())},[o,i]),h=reactExports.useCallback(()=>{t(),n()},[t,n]);return jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio","aria-label":"Also record audio",checked:o,onChange:p})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:h,children:"Start recording!"})})]})},StyledScreenCastWarningDialog=styled("div",{target:"e15jpqoz0"})({display:"flex"}),StyledUnsupportedScreenCastIcon=styled("div",{target:"e15jpqoz1"})(({theme:n})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:n.spacing.twoXL,marginLeft:n.spacing.sm,fontSize:n.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=styled("p",{target:"e15jpqoz2"})(({theme:n})=>({margin:n.spacing.none})),UnsupportedBrowserDialog=({onClose:n})=>jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),StyledVideo=styled("video",{target:"e1y8cy420"})(({theme:n})=>({width:n.sizes.full,borderRadius:n.radii.md})),StyledDialogContainer=styled("div",{target:"e1y8cy421"})(({theme:n})=>({display:"flex",flexDirection:"column",width:n.sizes.full})),StyledRow=styled("div",{target:"e1y8cy422"})(({theme:n})=>({display:"flex",flexDirection:"row",paddingTop:n.spacing.md,paddingBottom:n.spacing.md})),StyledFirstColumn=styled("div",{target:"e1y8cy423"})(({theme:n})=>({paddingRight:n.spacing.lg,textAlign:"right",color:n.colors.grayTextColor,fontWeight:n.fontWeights.bold,width:"6em"})),StyledSecondColumn=styled("div",{target:"e1y8cy424"})(({theme:n})=>({flex:1,paddingRight:n.spacing.lg,marginRight:"6em",[`@media (max-width: ${n.breakpoints.sm})`]:{marginRight:n.spacing.none}})),StyledVideoFormatInstructions=styled("p",{target:"e1y8cy425"})(({theme:n})=>({marginTop:n.spacing.sm,marginBottom:n.spacing.none,fontSize:n.fontSizes.sm})),StyledDownloadButtonContainer=styled("div",{target:"e1y8cy426"})(({theme:n})=>({marginTop:n.spacing.twoXS})),VideoRecordedDialog=({onClose:n,videoBlob:i,fileName:e})=>{const t=URL.createObjectURL(i),o=()=>{const d=document.createElement("a");d.setAttribute("href",t),d.setAttribute("download",`${e}.webm`),d.click(),n()};return jsxs(Modal,{isOpen:!0,onClose:n,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:t,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:o,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},LOG$2=loglevelExports.getLogger("withScreencast");function withScreencast(n){const i=e=>{const{testOverride:t}=e,o=reactExports.useRef(null),[d,p]=reactExports.useState("streamlit-screencast"),[h,y]=reactExports.useState(!1),[$,E]=reactExports.useState(void 0),[M,H]=reactExports.useState(t||"OFF"),Z=reactExports.useCallback(()=>{y(Fe=>!Fe)},[]),be=reactExports.useCallback(async()=>{if(!(M==="OFF"||isNullOrUndefined(o.current))){if(M==="COUNTDOWN"){H("OFF");return}if(M==="RECORDING"){const Fe=o.current;if(!Fe||Fe.getState()==="inactive")H("OFF");else{const Me=await Fe.stop();E(Me),H("PREVIEW_FILE")}}}},[M]),ye=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}o.current=new ScreenCastRecorder({recordAudio:h,onErrorOrStop:()=>{be().catch(Fe=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Fe}`))}});try{await o.current.initialize()}catch(Fe){LOG$2.warn(`ScreenCastRecorder.initialize error: ${Fe}`),H("UNSUPPORTED");return}H("COUNTDOWN")},[h,be]),we=reactExports.useCallback(Fe=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}if(M==="OFF"){p(Fe),H("SETUP");return}be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[M,be]),xe=reactExports.useCallback(()=>{if(isNullOrUndefined(o.current))throw new Error("Countdown finished but recorder is null");o.current.start()?H("RECORDING"):be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[be]),Ce=reactExports.useCallback(()=>{H("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(n,{...e,screenCast:{currentState:M,toggleRecordAudio:Z,startRecording:we,stopRecording:be}}),M==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:Ce}),M==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:h,onClose:Ce,startRecording:ye,toggleRecordAudio:Z}),M==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:xe}),M==="PREVIEW_FILE"&&$&&jsx$1(VideoRecordedDialog,{onClose:Ce,videoBlob:$,fileName:d})]})};return i.displayName=`withScreencast(${n.displayName||n.name||"Component"})`,hoistNonReactStatics(i,n)}const useViewportSize=()=>{const{activeTheme:n}=reactExports.useContext(ThemeContext),{innerWidth:i}=useWindowDimensionsContext(),e=parseInt(n.emotion.breakpoints.md,10);return{isMobile:i<e}},DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",LOG$1=loglevelExports.getLogger("MetricsManager");class MetricsManager{constructor(i){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e="")=>{this.metricsUrl=e},this.sessionInfo=i}async initialize({gatherUsageStats:i,sendMessageToHost:e}){this.sendMessageToHost=e,this.actuallySendMetrics=i&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(LOG$1.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),LOG$1.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(i,e={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([i,e]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(i,e))}setMetadata(i){this.metadata=i}async requestDefaultMetricsConfig(){const i=localStorageAvailable();if(i){const e=window.localStorage.getItem("stMetricsConfig");if(e){this.metricsUrl=e;return}}try{const e=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!e.ok)this.metricsUrl=void 0,LOG$1.error("Failed to fetch metrics config: ",e.status);else{const t=await e.json();this.metricsUrl=t.url??void 0,i&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(e){LOG$1.error("Failed to fetch metrics config:",e)}}send(i,e={}){const t=this.buildEventProto(i,e);this.metricsUrl==="postMessage"?this.postMessageEvent(i,t):this.track(t)}sendPendingEvents(){this.pendingEvents.forEach(([i,e])=>{this.send(i,e)}),this.pendingEvents=[]}async track(i){const e=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i.toJSON())});await fetch(e)}postMessageEvent(i,e){this.sendMessageToHost({type:"METRICS_EVENT",eventName:i,data:e})}buildEventProto(i,e){const t=new MetricsEvent({event:i,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:isWebdriver(),...this.getContextData()});if(i==="menuClick")t.label=e.label;else if(i==="pageProfile")return new MetricsEvent({...t,...e});return t}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const i="ajs_anonymous_id",e=localStorageAvailable(),t=getCookie(i),o=e?window.localStorage.getItem(i):null,d=new Date;if(d.setFullYear(new Date().getFullYear()+1),t)this.anonymousId=t,e&&window.localStorage.setItem(i,t);else if(o){try{this.anonymousId=JSON.parse(o)}catch{this.anonymousId=o}setCookie(i,this.anonymousId,d)}else this.anonymousId=v4(),setCookie(i,this.anonymousId,d),e&&window.localStorage.setItem(i,this.anonymousId)}}function isWebdriver(){return window.navigator?.webdriver??!1}class SessionEventDispatcher{constructor(){this.onSessionEvent=new distExports.Signal}handleSessionEventMsg(i){this.onSessionEvent.emit(i)}}const StyledApp=styled("div",{target:"e1vju3fw0"})(({theme:n})=>{const i=hasLightBackgroundColor(n);return{position:"absolute",background:n.colors.bgColor,color:n.colors.bodyText,top:n.spacing.none,left:n.spacing.none,right:n.spacing.none,bottom:n.spacing.none,colorScheme:i?"light":"dark",overflow:"hidden","@media print":{float:"none",height:n.sizes.full,position:"static",overflow:"visible"}}});function getBrowserInfo(){const i=new UAParser().getResult();return{browserName:i.browser.name||"Unknown",browserVersion:i.browser.version||"Unknown",deviceType:i.device.type||"desktop",os:i.os.name||"Unknown"}}const showDevelopmentOptions=(n,i)=>i==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==i||Config.ToolbarMode.MINIMAL==i?!1:n||isLocalhost();function getTitle(n){return n||"Streamlit"}class AppNavigation{constructor(i,e,t,o){this.hostCommunicationMgr=i,this.onUpdatePageUrl=e,this.onPageNotFound=t,this.onPageIconChange=o,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(i){return this.mainScriptHash!==i.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=i.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=i.config?.hideSidebarNav??null),document.title=getTitle(""),[{currentPageScriptHash:i.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(i){const{sections:e,position:t,appPages:o}=i;this.appPages=o,this.hideSidebarNav=t===Navigation.Position.HIDDEN;const d=i.pageScriptHash,p=o.find($=>$.pageScriptHash===d),h=o.find($=>$.isDefault);this.mainPage=h;const y=p.urlPathname;if(!this.isPageTitleSet){const $=getTitle(p.pageName);document.title=$,this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:p.pageName??""})}return!this.isPageIconSet&&p.icon&&this.onPageIconChange(p.icon),this.onUpdatePageUrl(h.urlPathname??"",y,p.isDefault??!1),[{appPages:o,navSections:e,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:i.expanded,currentPageScriptHash:d},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:o}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:p.isDefault?"":y,currentPageScriptHash:d})}]}handlePageNotFound(i){return this.onPageNotFound(i),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}findPageByUrlPath(i){return this.appPages.find(e=>i.endsWith("/"+e.urlPathname))??this.mainPage}handlePageConfigChanged(i){i.favicon&&(this.isPageIconSet=!0),i.title&&(this.isPageTitleSet=!0)}clearPageElements(i,e){return i.filterMainScriptElements(e)}}function includeIfDefined(n){return Object.entries(n).reduce((i,[e,t])=>(t!==void 0&&(i[e]=t),i),{})}function preferWindowValue(n,i){return n??i}function reconcileHostConfigValues(n,i){if(!n)return i;const e=isValidAllowedOrigins(n.allowedOrigins)?n.allowedOrigins:void 0;return{...i,allowedOrigins:preferWindowValue(e,i.allowedOrigins),useExternalAuthToken:preferWindowValue(n.useExternalAuthToken,i.useExternalAuthToken),enableCustomParentMessages:preferWindowValue(n.enableCustomParentMessages,i.enableCustomParentMessages),blockErrorDialogs:preferWindowValue(n.blockErrorDialogs,i.blockErrorDialogs),mapboxToken:preferWindowValue(n.mapboxToken,i.mapboxToken),disableFullscreenMode:preferWindowValue(n.disableFullscreenMode,i.disableFullscreenMode),enforceDownloadInNewTab:preferWindowValue(n.enforceDownloadInNewTab,i.enforceDownloadInNewTab),resourceCrossOriginMode:preferWindowValue(n.resourceCrossOriginMode,i.resourceCrossOriginMode),setAnonymousCrossOriginPropertyOnMediaElements:i.setAnonymousCrossOriginPropertyOnMediaElements,metricsUrl:preferWindowValue(n.metricsUrl,i.metricsUrl)}}var define_PACKAGE_METADATA_default={version:"1.52.2"};const INITIAL_SCRIPT_RUN_ID="<null>",LOG=loglevelExports.getLogger("App");class App extends reactExports.PureComponent{constructor(i){super(i),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(e,t,o)=>{const d={type:DialogType.DEPLOY_ERROR,title:e,msg:t,onContinue:o,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(d)},this.handleThemeMessage=(e,t)=>{const[,o,d]=createPresetThemes(),p=isPresetTheme(this.props.theme.activeTheme);e===o.name&&p?this.props.theme.setTheme(o):e===d.name&&p?this.props.theme.setTheme(d):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${e}`),e===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const t=this.state.scriptRunState===ScriptRunState.RUNNING,o=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||t||o||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?(LOG.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===DialogType.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:e!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:e}):reactDomExports.flushSync(()=>{this.setState({connectionState:e})})},this.handleGitInfoChanged=e=>{this.setState({gitInfo:e})},this.handleCustomParentMessage=e=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:e.message}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{const t=(o,d,p)=>{const h=o[d];if(h in p)return p[h](o[h]);throw new Error(`Cannot handle ${d} "${h}".`)};try{t(e,"type",{newSession:o=>this.handleNewSession(o),sessionStatusChanged:o=>this.handleSessionStatusChanged(o),sessionEvent:o=>this.handleSessionEvent(o),delta:o=>this.handleDeltaMsg(o,e.metadata),pageConfigChanged:o=>this.handlePageConfigChanged(o),pageInfoChanged:o=>this.handlePageInfoChanged(o),pagesChanged:o=>{},pageNotFound:o=>this.handlePageNotFound(o),gitInfoChanged:o=>this.handleGitInfoChanged(o),scriptFinished:o=>this.handleScriptFinished(o),pageProfile:o=>this.handlePageProfileMsg(o),autoRerun:o=>this.handleAutoRerun(o),fileUrlsResponse:o=>this.uploadClient.onFileURLsResponse(o),deferredFileResponse:o=>this.handleDeferredFileResponse(o),parentMessage:o=>this.handleCustomParentMessage(o),logo:o=>this.handleLogo(o,e.metadata),navigation:o=>this.handleNavigation(o),authRedirect:o=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:o.url}):window.location.href=o.url}})}catch(o){const d=ensureError(o);LOG.error(d),this.showError("Bad message format",{message:d.message})}},this.handleLogo=(e,t)=>{this.setState(o=>({elements:o.elements.appRootWithLogo(e,{activeScriptHash:t.activeScriptHash,scriptRunId:o.scriptRunId})}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:o,layout:d,initialSidebarState:p,initialSidebarWidth:h,menuItems:y}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),o&&this.onPageIconChanged(o),d!==this.state.layout&&d!==PageConfig.Layout.LAYOUT_UNSET&&this.setState(E=>({layout:d,userSettings:{...E.userSettings,wideMode:d===PageConfig.Layout.WIDE}})),p!==this.state.initialSidebarState&&p!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:p}));const $=h?.pixelWidth!==void 0?h.pixelWidth:void 0;notNullOrUndefined($)&&$!==this.state.initialSidebarWidth&&this.setState(()=>({initialSidebarWidth:$})),y&&this.setState(E=>(y.clearAboutMd&&(y.aboutSectionMd=""),{menuItems:{...E.menuItems,...y}}))},this.handlePageInfoChanged=e=>{const{queryString:t}=e,o=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",o),this.setState({queryParams:t}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:t?`?${t}`:""})},this.onPageNotFound=e=>{const t=e?`You have requested page /${e}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",{message:`${t}. Running the app's main page.`})},this.handlePageNotFound=e=>{const{pageName:t}=e;this.maybeSetState(this.appNavigation.handlePageNotFound(t))},this.onPageIconChanged=e=>{handleFavicon(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=e=>{this.setState({navigationPosition:e.position}),this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{const t=PageProfile.toObject(e),o=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...t,isFragmentRun:!!t.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:o})},this.handleAutoRerun=e=>{const t=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)},e.interval*1e3);this.setState(o=>({autoReruns:[...o.autoReruns,t]}))},this.handleSessionStatusChanged=e=>{this.setState(t=>{let{scriptRunState:o}=t,{dialog:d}=t;return e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.STOP_REQUESTED?(o=ScriptRunState.RUNNING,notNullOrUndefined(d)&&d.type===DialogType.SCRIPT_COMPILE_ERROR&&(d=void 0)):!e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&t.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(o=ScriptRunState.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:!!e.runOnSave},dialog:d,scriptRunState:o,scriptChangedOnDisk:e.scriptIsRunning?!1:t.scriptChangedOnDisk}})},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),e.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const t={type:DialogType.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(t,e.scriptCompilationException?.message??"No message")}else e.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(e,t,o)=>{const d=this.getBaseUriParts();if(d){let p;StreamlitConfig.MAIN_PAGE_BASE_URL?p=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:p=d.pathname;const h=extractPageNameFromPathName(document.location.pathname,p);if((h===""?e:h)!==t){const $=o?"":t,E=this.state.queryParams||preserveEmbedQueryParams(),M=E?`?${E}`:"",Z=`${p==="/"?"":p}/${$}${M}`;window.history.pushState({},"",Z)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(e);const{appHash:o,currentPageScriptHash:d}=this.state,{scriptRunId:p,name:h,mainScriptPath:y,fragmentIdsThisRun:$,pageScriptHash:E,mainScriptHash:M}=e;if($.length)this.setState({fragmentIdsThisRun:$,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Z=e.config,be=e.customTheme;this.processThemeInput(be),this.setState({allowRunOnSave:Z.allowRunOnSave,hideTopBar:Z.hideTopBar,toolbarMode:Z.toolbarMode,latestRunTime:performance.now(),mainScriptHash:M,fragmentIdsThisRun:$}),this.maybeSetState(this.appNavigation.handleNewSession(e)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const H=hashString(this.sessionInfo.current.installationId+y);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(H),this.metricsMgr.enqueue("updateReport"),o===H&&d===E?this.setState(Z=>({elements:Z.elements.clearTransientNodes($),scriptRunId:p})):this.clearAppState(H,p,h,M)},this.handleInitialization=e=>{const t=e.initialize,o=e.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:o.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),o=document.location.toString().includes("#"),d=t?.pageScriptHash===e;isNullOrUndefined(t)||o&&d||this.onPageChange(t.pageScriptHash,void 0,!0)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=JSON.parse(JSON.stringify(e)),o=sortThemeInputKeys(t);return hashString(JSON.stringify(o))},this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:o}=e;if(this.setState({userSettings:e}),t!==o&&this.isServerConnected()){const d=new BackMsg({setRunOnSave:o});d.type="setRunOnSave",this.sendBackMsg(d)}},this.handleDeltaMsg=(e,t)=>{this.setState(o=>({elements:o.elements.applyDelta(o.scriptRunId,e,t)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new BackMsg({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new BackMsg({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(e=>{clearInterval(e)}),this.setState({autoReruns:[]})},this.rerunScript=(e=!1)=>{if(this.closeDialog(),!this.isServerConnected()){LOG.error("Cannot rerun script when disconnected from server.");return}this.state.scriptRunState===ScriptRunState.RUNNING||this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),e===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){LOG.error("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=(e,t,o)=>{const{elements:d,mainScriptHash:p}=this.state;this.cleanupAutoReruns();const h=this.appNavigation.clearPageElements(d,p),y=new Set(Array.from(h.getElements()).map($=>getElementId($)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(y),void 0,e,void 0,t,o)},this.isAppInReadyState=e=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&e.scriptRunState===ScriptRunState.RUNNING&&e.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(e,t,o,d,p,h)=>{const y=this.getBaseUriParts();if(!y){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:$}=this.state;let E=p??this.getQueryString(),M="";const H={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(o){if(o!==$&&!h){const be=preserveEmbedQueryParams();E=getQueryString(p,be),this.setState({queryParams:E}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:E})}}else if($)o=$;else{let be;StreamlitConfig.MAIN_PAGE_BASE_URL?be=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:be=y.pathname,M=extractPageNameFromPathName(document.location.pathname,be),o=""}const Z=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:E,widgetStates:e,pageScriptHash:o,pageName:M,fragmentId:t,isAutoRerun:d,cachedMessageHashes:Z,contextInfo:H}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){LOG.error("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const e=new BackMsg({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const e={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new BackMsg({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new BackMsg({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?(LOG.info(e),this.connectionManager.sendMessage(e)):LOG.error(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.state.connectionErrorDismissed||this.showError("Connection error",e,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(e=!0)=>{const t={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:e,metricsMgr:this.metricsMgr};this.openDialog(t)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:e?.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let t;try{const o=getIFrameEnclosingApp(this.embeddingId);o?.contentWindow?t=o.contentWindow.window:t=window}catch{t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast,o=getScreencastTimestamp();t(`streamlit-${e}-${o}`)},this.handleFullScreen=e=>{this.setState({isFullScreen:e})},this.setLibConfig=e=>{this.setState({libConfig:e})},this.setAppConfig=e=>{this.setState({appConfig:e})},this.addScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)}))},this.removeScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.filter(d=>d!==e)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:e}=this.state,t=e&&e.length>0?e:document.location.search;return t.startsWith("?")?t.substring(1):t},this.getThemeColorScheme=()=>{const{activeTheme:e}=this.props.theme;return hasLightBackgroundColor(e.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&e?.length>0},this.showDeployButton=()=>showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&!this.isInCloudEnvironment()&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue("menuClick",{label:"deployButtonInApp"}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(e,t)=>{const o=this.isServerConnected(),d=this.sessionInfo.isSet;if(o&&d){const p=new BackMsg({fileUrlsRequest:{requestId:e,fileNames:t.map(h=>h.name),sessionId:this.sessionInfo.current.sessionId}});p.type="fileUrlsRequest",this.sendBackMsg(p)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${o}, isSessionInfoSet: ${d})`),this.uploadClient.onFileURLsResponse({responseId:e,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=e=>{const t=this.isServerConnected(),o=this.sessionInfo.isSet;if(!t||!o)return Promise.reject(new Error("Not connected to server or session not initialized"));const d=Promise.withResolvers(),p=this.deferredFileListeners.get(e)??new Set,h=$=>{p.delete(h),d.resolve($)};p.add(h),this.deferredFileListeners.set(e,p);const y=new BackMsg({deferredFileRequest:{fileId:e,sessionId:this.sessionInfo.current.sessionId}});return y.type="deferredFileRequest",this.sendBackMsg(y),d.promise},this.handleDeferredFileResponse=e=>{const t=this.deferredFileListeners.get(e.fileId);if(!(!t||t.size===0)){for(const o of Array.from(t))try{o(e)}catch{}this.deferredFileListeners.delete(e.fileId)}},this.handleKeyDown=(e,t)=>{if(!((e==="c"||e==="r")&&isKeyboardEventFromEditableTarget(t)))switch(e){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=e=>{e==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:e}=this.state;return!!(e?.aboutSectionMd||e?.getHelpUrl&&!e?.hideGetHelp||e?.reportABugUrl&&!e?.hideReportABug)},this.shouldShowToolbar=(e,t)=>{const o=!isEmbed()||isToolbarDisplayed();let d;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?d=e.length>0||t.length>0||this.hasAppDefinedMenuItems():d=!0,o&&d},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet(),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,initialSidebarWidth:void 0,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:"",gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:Navigation.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:i.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:e=>{this.setState({inputsDisabled:e})},themeChanged:this.handleThemeMessage,pageChanged:e=>this.onPageChange(e),isOwnerChanged:e=>this.setState({isOwner:e}),fileUploadClientConfigChanged:e=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(e)},hostMenuItemsChanged:e=>{this.setState({hostMenuItems:e})},hostToolbarItemsChanged:e=>{this.setState({hostToolbarItems:e})},hostHideSidebarNavChanged:e=>{this.setState({hostHideSidebarNav:e})},sidebarChevronDownshiftChanged:e=>{this.setState({sidebarChevronDownshift:e})},pageLinkBaseUrlChanged:e=>{this.setState({pageLinkBaseUrl:e})},queryParamsChanged:e=>{this.setState({queryParams:e})},deployedAppMetadataChanged:e=>{this.setState({deployedAppMetadata:e})},restartWebsocketConnection:()=>{this.connectionManager||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(e,t,o,d,p)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:e,error:t,message:o,source:d,customComponentName:p})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}applyInitialHostConfig(){if(!isHostConfigBypassEnabled())return;const i=StreamlitConfig.HOST_CONFIG,e=includeIfDefined({allowedOrigins:i.allowedOrigins,useExternalAuthToken:i.useExternalAuthToken,enableCustomParentMessages:i.enableCustomParentMessages,blockErrorDialogs:i.blockErrorDialogs});this.hostCommunicationMgr.setAllowedOrigins(e),this.setAppConfig(e);const t=includeIfDefined({mapboxToken:i.mapboxToken,disableFullscreenMode:i.disableFullscreenMode,enforceDownloadInNewTab:i.enforceDownloadInNewTab,resourceCrossOriginMode:i.resourceCrossOriginMode});Object.keys(t).length>0&&this.setLibConfig(t),i.metricsUrl!==void 0&&this.metricsMgr.setMetricsConfig(i.metricsUrl)}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.applyInitialHostConfig(),this.connectionManager=new ConnectionManager({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(i,e,t)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:"Websocket Connection",error:i,message:e,source:t})},onHostConfigResp:i=>{const e=reconcileHostConfigValues(StreamlitConfig.HOST_CONFIG,i),{allowedOrigins:t,useExternalAuthToken:o,disableFullscreenMode:d,enableCustomParentMessages:p,mapboxToken:h,enforceDownloadInNewTab:y,metricsUrl:$,blockErrorDialogs:E,setAnonymousCrossOriginPropertyOnMediaElements:M,resourceCrossOriginMode:H}=e,Z={allowedOrigins:t,useExternalAuthToken:o,enableCustomParentMessages:p,blockErrorDialogs:E},be={mapboxToken:h,disableFullscreenMode:d,enforceDownloadInNewTab:y,resourceCrossOriginMode:H??(M?"anonymous":void 0)};this.metricsMgr.setMetricsConfig($),this.hostCommunicationMgr.setAllowedOrigins(Z),this.setAppConfig(Z),this.setLibConfig(be)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const i=document.querySelectorAll("[data-iframe-height]"),e=Array.from(i).map(t=>Math.ceil(t.getBoundingClientRect().bottom));return Math.max(0,...e)}},__vitePreload(()=>import("./iframeResizer.contentWindow.B6EBvI9L.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)&¬NullOrUndefined(t.streamlitVersion))return e!=t.streamlitVersion}return!1}maybeSetState(i){if(i){const[e,t]=i;this.setState(e,t)}}processThemeInput(i){const e=this.createThemeHash(i);if(e===this.state.themeHash)return;this.setState({themeHash:e});const t=!isPresetTheme(this.props.theme.activeTheme);if(i){const o=createCustomThemes(i);this.props.theme.addThemes(o,{keepPresetThemes:!1});const p=getHostSpecifiedThemeOnly()??getCachedTheme(),h=mapCachedThemeToAvailableTheme(p,o);if(h)this.setAndSendTheme(h);else if(o.length>1){const y=o.findIndex($=>$.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(o[y])}else this.setAndSendTheme(o[0])}else if(this.props.theme.addThemes([]),t){const d=getHostSpecifiedThemeOnly()??getCachedTheme(),h=mapCachedThemeToAvailableTheme(d,[lightTheme,darkTheme]);h?this.setAndSendTheme(h):this.setAndSendTheme(createAutoTheme())}(i?.fontFaces&&i.fontFaces.length>0||i?.fontSources&&i.fontSources.length>0)&&this.props.theme.setFonts(i)}handleScriptFinished(i){(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:o})=>({elements:o.clearStaleNodes(e,t)}),()=>{const e=new Set(Array.from(this.state.elements.getElements()).map(t=>getElementId(t)).filter(notUndefined));this.widgetMgr.removeInactive(e)}),this.connectionManager!==null&&i!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(i,e,t,o){this.setState(d=>{const p=this.appNavigation.clearPageElements(d.elements,o);return{scriptRunId:e,scriptName:t,appHash:i,elements:p}},()=>{const d=new Set(Array.from(this.state.elements.getElements()).map(p=>getElementId(p)).filter(notUndefined));this.widgetMgr.removeInactive(d)})}openDialog(i){this.setState({dialog:i})}render(){const{allowRunOnSave:i,connectionState:e,dialog:t,elements:o,initialSidebarState:d,menuItems:p,isFullScreen:h,scriptRunId:y,scriptRunState:$,userSettings:E,hideTopBar:M,hideSidebarNav:H,expandSidebarNav:Z,currentPageScriptHash:be,hostHideSidebarNav:ye,pageLinkBaseUrl:we,sidebarChevronDownshift:xe,hostMenuItems:Ce,hostToolbarItems:Ne,libConfig:Fe,inputsDisabled:Me,appPages:Le,navSections:ze,navigationPosition:Ke,scriptChangedOnDisk:Ve}=this.state,je=this.props.isMobileViewport?Navigation.Position.SIDEBAR:Ke,We=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),Xe=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":E.wideMode}),Qe=t?StreamlitDialog({...t,onClose:this.closeDialog}):null,Ye=this.shouldShowToolbar(Ce,Ne),Ue=!isEmbed()||isPaddingDisplayed(),ot=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:d,initialSidebarWidth:this.state.initialSidebarWidth,pageLinkBaseUrl:we,currentPageScriptHash:be,onPageChange:this.onPageChange,navSections:ze,appPages:Le,appLogo:o.logo,sidebarChevronDownshift:xe,expandSidebarNav:Z,hideSidebarNav:H||ye||je===Navigation.Position.TOP,isFullScreen:h,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:$,scriptRunId:y,mapboxToken:Fe.mapboxToken,enforceDownloadInNewTab:Fe.enforceDownloadInNewTab,resourceCrossOriginMode:Fe.resourceCrossOriginMode,requestDeferredFile:this.requestDeferredFile,children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:Xe,"data-testid":"stApp","data-test-script-state":y==INITIAL_SCRIPT_RUN_ID?"initial":$,"data-test-connection-state":e,children:[jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:o,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:je,wideMode:E.wideMode,embedded:isEmbed(),showPadding:Ue,disableScrolling:ot,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Me||e!==ConnectionState.CONNECTED,showToolbar:Ye,disableFullscreenMode:Fe.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:jsxs(Fragment,{children:[!M&&jsx$1(StatusWidget,{connectionState:e,scriptRunState:$,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:i,showScriptChangedActions:Ve}),!M&&jsx$1(ToolbarActions,{hostToolbarItems:Ne,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!Ve&&jsx$1(DeployButton,{onClick:this.deployButtonClicked}),!M&&jsx$1(MainMenu$1,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:Ce,developmentMode:We,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:p,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]})}),Qe]})})})}}const AppWithScreenCast=withScreencast(App),AppWrapper=n=>{const{isMobile:i}=useViewportSize();return jsx$1(AppWithScreenCast,{...n,isMobileViewport:i})};function useThemeManager(){const n=getDefaultTheme(),[i,e]=reactExports.useState(n),[t,o]=reactExports.useState(n.themeInput?.fontFaces??[]),[d,p]=reactExports.useState(null),[h,y]=reactExports.useState(()=>[...createPresetThemes(),...isPresetTheme(n)?[]:[n]]),$=(be,ye={})=>{const{keepPresetThemes:we=!0}=ye;y([...we?createPresetThemes():[],...be])},E=reactExports.useCallback(be=>{e(ye=>be!==ye?(be.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(be),be):ye)},[e]),M=reactExports.useCallback(()=>{i.name===AUTO_THEME_NAME&&E(getHostSpecifiedTheme());const be=h.filter(ye=>ye.name!==AUTO_THEME_NAME);y([createAutoTheme(),...be])},[i.name,h,E]),H=reactExports.useCallback(be=>{be.fontFaces&&o(be.fontFaces);const ye=[...be.fontSources||[],...be.sidebar?.fontSources||[]],we={};ye.forEach(xe=>{xe.sourceUrl&&xe.configName&&(we[xe.configName]=xe.sourceUrl)}),p(Object.keys(we).length>0?we:null)},[o,p]),Z=reactExports.useCallback(be=>{H(be);const ye=new CustomThemeConfig(be),we=createTheme(CUSTOM_THEME_NAME,ye);E(we)},[H,E]);return reactExports.useEffect(()=>{const be=window.matchMedia("(prefers-color-scheme: dark)");return be.addEventListener("change",M),window.addEventListener("afterprint",M),()=>{window.removeEventListener("afterprint",M),be.removeEventListener("change",M)}},[i,h,M]),[{setTheme:E,activeTheme:i,addThemes:$,availableThemes:h,setFonts:H,setImportedTheme:Z},t,d]}const ThemedApp=({streamlitExecutionStartedAt:n})=>{const[i,e,t]=useThemeManager(),{activeTheme:o}=i;return jsx$1(RootStyleProvider,{theme:o,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[e.length>0&&jsx$1(FontFaceDeclaration,{fontFaces:e}),t&&jsx$1(FontSources,{fontSources:t}),jsx$1(AppWrapper,{theme:i,streamlitExecutionStartedAt:n})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"}),rootDomNode=document.getElementById("root");if(!rootDomNode)throw new Error("#root DOM element not found");const reactRoot=clientExports.createRoot(rootDomNode);reactRoot.render(jsx$1(reactExports.StrictMode,{children:jsx$1(HelmetProvider,{children:jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})})})}));export{toaster as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,styled as F,StyledDropdownListItem as G,isPropValid as H,DownloadContext as I,StyledErrorMessage as J,toString$2 as K,LibConfigContext as L,findAndReplace as M,Arrow$2 as N,range as O,Placement as P,isNumericType as Q,DataFrameCellType as R,StreamlitConfig as S,TooltipIcon as T,UISelectbox as U,useCrossOriginAttribute as V,loglevelExports as W,useRequiredContext as X,NavigationContext as Y,DynamicIcon as Z,_extends$A as _,BaseButtonTooltip as a,TYPE as a$,Fragment as a0,Kind as a1,AlertElement$1 as a2,Video$1 as a3,keyframes as a4,StyledWidgetInstructions as a5,isFromMac as a6,FormsContext as a7,StyledFormSubmitContent as a8,Form$1 as a9,Tooltip$1 as aA,IsSidebarContext as aB,LabelVisibilityOptions as aC,React as aD,find as aE,parse$1 as aF,parse$2 as aG,normalize$1 as aH,html$2 as aI,svg as aJ,useCopyToClipboard as aK,ACCESSIBILITY_TYPE as aL,Popover$2 as aM,ensureError as aN,ErrorElement as aO,hexToRgb as aP,withWrapper as aQ,__vitePreload as aR,blend as aS,SetCache as aT,cacheHas as aU,baseRest as aV,isArrayLikeObject as aW,useSelectCommon as aX,StyledValueContainer as aY,Select as aZ,VirtualDropdown as a_,isInForm as aa,convertRemToPx as ab,WidgetLabelHelpIcon as ac,WidgetLabel as ad,isMaterialIcon as ae,getBorderColor as af,TextInput$1 as ag,getDefaultExportFromCjs as ah,darken as ai,getPrimaryFocusBoxShadow as aj,PortalContext as ak,reactDomExports as al,classNames as am,requireReact as an,styled$1 as ao,isFocusVisible as ap,getOverride as aq,getOverrideProps as ar,root$4 as as,toNumber as at,isObject$1 as au,mergeOverrides as av,CUSTOM_INPUT_TYPE as aw,ChevronDown$1 as ax,PLACEMENT$1 as ay,Icon$2 as az,BaseButton as b,util_bn_ as b$,Metric$1 as b0,transparentize as b1,StyledWidgetLabel as b2,Global as b3,getCrossOriginAttribute as b4,_arrayLikeToArray as b5,_unsupportedIterableToArray as b6,ViewStateContext as b7,useWindowDimensionsContext as b8,LocaleContext as b9,Skeleton as bA,ComponentRegistry as bB,__awaiter as bC,PropTypes as bD,isFromWindows as bE,requirePropTypes as bF,merge$1 as bG,getIncreasingGreen as bH,getDecreasingRed as bI,getBlue80 as bJ,getGray30 as bK,getGray70 as bL,getGray90 as bM,getDivergingColorsArray as bN,keysToSnakeCase as bO,PlotlyChart$1 as bP,themeColors as bQ,isMobile as bR,UploadedFileInfo as bS,FileUploaderState as bT,ThemeContext$1 as bU,pick$1 as bV,Slider$1 as bW,zip as bX,baseSlice as bY,baseToString as bZ,trimmedEndIndex as b_,shouldWidthStretch as ba,ButtonGroup$1 as bb,LabelVisibilityMessage as bc,StyledButtonGroup as bd,NumberInput$1 as be,isDatetimeType as bf,isDateType as bg,getTimezone as bh,debounce$2 as bi,isEqual$1 as bj,shouldHeightStretch as bk,useStyletron as bl,mergeOverride as bm,toObjectOverride as bn,Icon$1 as bo,DeleteAlt$1 as bp,forkBlur as bq,forkFocus as br,addCssUnit as bs,convert as bt,visitParents as bu,SKIP as bv,toExportedTheme as bw,ArrowDataframe as bx,useTimeout as by,Skeleton$1 as bz,BaseButtonSize as c,_assertThisInitialized as c$,util_int_ as c0,util_bit_ as c1,util_math_ as c2,util_buffer_ as c3,util_vector_ as c4,util_pretty_ as c5,util_interval_ as c6,compareTypes as c7,compareFields as c8,compareSchemas as c9,StatefulMenu as cA,ok as cB,stringify$1 as cC,stringify as cD,pointStart as cE,visit as cF,pointEnd as cG,structuredClone$1 as cH,identity as cI,arrayEach as cJ,baseEach as cK,isArray$1 as cL,arrayMap as cM,baseMap as cN,baseIteratee as cO,baseForOwn as cP,isObjectLike as cQ,baseGetTag as cR,isPlainObject$3 as cS,cloneDeep$1 as cT,useExecuteWhenChanged as cU,StatefulPopover as cV,_typeof$e as cW,_inherits as cX,_createSuper as cY,_classCallCheck as cZ,_defineProperty$s as c_,getAugmentedNamespace as ca,isStringType as cb,isTimeType as cc,isPeriodType as cd,isIntervalType as ce,isDurationType as cf,isDecimalType as cg,isFloatType as ch,isObjectType as ci,isListType as cj,TimeUnit as ck,Struct as cl,ThemeProvider$1 as cm,createThemedStyled as cn,createThemedUseStyletron as co,createThemedWithStyle as cp,expandBorderStyles as cq,withStyle as cr,requireReactIs$1 as cs,tableFromIPC as ct,assertNever as cu,v4 as cv,AcceptFileValue as cw,chatInputAcceptFileProtoValueToEnum as cx,requireReactDom as cy,UIDConsumer as cz,Box as d,_createClass as d0,filterOptions as d1,mergeWith as d2,parseEntities as d3,StyledPre as d4,CopyButton$1 as d5,StyledCopyButtonContainer as d6,StyledCodeBlock as d7,propTypesExports as d8,_slicedToArray as d9,isBooleanType as dA,Field as dB,Null as dC,isRangeIndexType as dD,isEmptyType as dE,isBytesType as dF,isCategoricalType as dG,fontSizes as dH,_objectWithoutProperties$1 as dI,_objectSpread2 as dJ,jsx as dK,css as dL,lighten as dM,mix$1 as dN,TRIGGER_TYPE as dO,StyledTooltipContentWrapper as dP,FlexContext as dQ,useScrollbarGutterSize as dR,Resizable as dS,index as da,_getPrototypeOf as db,_possibleConstructorReturn as dc,parseToRgba as dd,DeckGlJsonChart$1 as de,hasPath as df,isArrayLike as dg,isBuffer as dh,isTypedArray as di,isArguments as dj,getTag as dk,isPrototype as dl,baseKeys as dm,Set$1 as dn,setToArray as dp,requireClassnames as dq,groupBy as dr,flatten as ds,Vector as dt,getLuminance as du,parseIconPackEntry as dv,genericFonts as dw,getMarkdownBgColors as dx,isUnsignedIntegerType as dy,isIntegerType as dz,isNullOrUndefined as e,StyledWidgetLabelHelpInline as f,getHelpTooltipAriaLabel as g,hoistNonReactStatics as h,isValidFormId as i,jsx$1 as j,useCalculatedDimensions as k,useEmotionTheme as l,hasLightBackgroundColor as m,notNullOrUndefined as n,jsxs as o,labelVisibilityProtoValueToEnum as p,StreamlitMarkdown$1 as q,reactExports as r,streamlit as s,StyledContent as t,useRegisterShortcut as u,getFocusBoxShadow as v,StyledCheckbox$1 as w,getOverrides as x,SIZE$1 as y,ENHANCER_POSITION as z};
|