streamlit-nightly 1.41.2.dev20241218__py2.py3-none-any.whl → 1.41.2.dev20241220__py2.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/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.C2o3CsoA.js → FileDownload.esm.DPBKyOWK.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.BhG8aAyi.js → FormClearHelper.C3t6Hrs8.js} +1 -1
- streamlit/static/static/js/{Hooks.Deb3RV7W.js → Hooks.CLbBlyNP.js} +1 -1
- streamlit/static/static/js/{InputInstructions.C0LQtChu.js → InputInstructions.BRk7b0gh.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BMhI_OcU.js → ProgressBar.CM8m7RxJ.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.Baq4z9CU.js → RenderInPortalIfExists.DiM_RlO2.js} +1 -1
- streamlit/static/static/js/{Toolbar.DsQulSGR.js → Toolbar.DfVzn1J_.js} +1 -1
- streamlit/static/static/js/{base-input.BC5Jbe-K.js → base-input.f48IMSP0.js} +1 -1
- streamlit/static/static/js/{createSuper.DWB5DhEw.js → createSuper.BOmG1Nab.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DWcHE8bD.js → data-grid-overlay-editor.BtGmDsvq.js} +1 -1
- streamlit/static/static/js/{downloader.BzKSiQ-7.js → downloader.nhZNtdcE.js} +1 -1
- streamlit/static/static/js/{es6.CTbdyhwh.js → es6.BnYoDOb0.js} +2 -2
- streamlit/static/static/js/{getPrototypeOf.C2VuQjyl.js → getPrototypeOf.DBWt125B.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.D80IJd7i.js → iframeResizer.contentWindow.CDjnvFyQ.js} +1 -1
- streamlit/static/static/js/{index.CVUfgzaG.js → index.BBBYxfwb.js} +1 -1
- streamlit/static/static/js/{index.DqNg1x9r.js → index.BIWXRasw.js} +1 -1
- streamlit/static/static/js/{index.DtPGZ6UE.js → index.BLIDOW15.js} +1 -1
- streamlit/static/static/js/{index.DRXNtfhF.js → index.BREkMUTS.js} +1 -1
- streamlit/static/static/js/{index.CMOnpQt4.js → index.BRFptg5h.js} +1 -1
- streamlit/static/static/js/{index.AV9bktPa.js → index.BS8yN0si.js} +1 -1
- streamlit/static/static/js/{index.Dw2JgHHH.js → index.Be3Sh62A.js} +1 -1
- streamlit/static/static/js/{index.BGYJCEox.js → index.BmWgOP2u.js} +1 -1
- streamlit/static/static/js/{index.mT0dy1zZ.js → index.BraZUBxd.js} +1 -1
- streamlit/static/static/js/{index.DoPaL107.js → index.Bugr6UId.js} +1 -1
- streamlit/static/static/js/{index.R2Lh_aam.js → index.BvYFvNzz.js} +1 -1
- streamlit/static/static/js/{index.CVCFfiYa.js → index.C2wErDQu.js} +1 -1
- streamlit/static/static/js/{index.Ce6ykjki.js → index.C4IZLilO.js} +1 -1
- streamlit/static/static/js/{index.D-F-jU8X.js → index.CGFLXsMI.js} +1 -1
- streamlit/static/static/js/{index.BkzC-Laz.js → index.CXT5R7I7.js} +1 -1
- streamlit/static/static/js/{index.v6oUo74c.js → index.CbVFFm3x.js} +1 -1
- streamlit/static/static/js/{index.Ngz2_5VS.js → index.CvpZ5Nja.js} +1 -1
- streamlit/static/static/js/{index.Duul_60V.js → index.CvwjoTQx.js} +59 -59
- streamlit/static/static/js/{index.DrNN9gLg.js → index.CwMp1tsE.js} +1 -1
- streamlit/static/static/js/{index.DUU9ewBx.js → index.D5lmlOSF.js} +1 -1
- streamlit/static/static/js/{index.vKdYBY7v.js → index.DCactJDE.js} +1 -1
- streamlit/static/static/js/{index.BuXEemP9.js → index.DPnzPNn9.js} +1 -1
- streamlit/static/static/js/{index.DNaEPTIQ.js → index.DjxunPkj.js} +1 -1
- streamlit/static/static/js/{index.w1nNyMea.js → index.DmRbgFya.js} +1 -1
- streamlit/static/static/js/{index.fV5QaduN.js → index.DqHdEwRV.js} +1 -1
- streamlit/static/static/js/{index.MQuot7H3.js → index.Dzm3dyfl.js} +1 -1
- streamlit/static/static/js/{index.BP4KepTF.js → index.Fi7IVV2V.js} +1 -1
- streamlit/static/static/js/{index.DJ2KsQBY.js → index.IrPwhnqy.js} +1 -1
- streamlit/static/static/js/index.My7aeSv9.js +1 -0
- streamlit/static/static/js/{index.D5liyd63.js → index.Ng6Hz9CN.js} +1 -1
- streamlit/static/static/js/{index.HflMUepR.js → index.SQPPTQm6.js} +1 -1
- streamlit/static/static/js/{index.BHURk4se.js → index.WXkLaOYO.js} +1 -1
- streamlit/static/static/js/{index.SFxJlqiy.js → index.gOhapwEl.js} +1 -1
- streamlit/static/static/js/{index.CQykbR6O.js → index.hLH-NVjX.js} +4 -4
- streamlit/static/static/js/{index.Ck92cJzb.js → index.oX5UNl1X.js} +1 -1
- streamlit/static/static/js/{index.IFRZKSN9.js → index.pBJooeet.js} +1 -1
- streamlit/static/static/js/{index.D_GowxVI.js → index.qYyPlFTQ.js} +1 -1
- streamlit/static/static/js/{input.C-oL-qz2.js → input.DI-Jt41x.js} +1 -1
- streamlit/static/static/js/{memory.gLWIz2xp.js → memory.BNpEwPa9.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DIZM1D3p.js → number-overlay-editor.DQB_8RTv.js} +1 -1
- streamlit/static/static/js/{sandbox.CFV9W2g3.js → sandbox.BNZe1FQv.js} +1 -1
- streamlit/static/static/js/{slicedToArray.CIK2_kQL.js → slicedToArray.jpCPeYwK.js} +1 -1
- streamlit/static/static/js/{textarea.CoEl1NwK.js → textarea.BzVKUorw.js} +1 -1
- streamlit/static/static/js/{timepicker.DrA0MPs8.js → timepicker.DkbmCWT8.js} +1 -1
- streamlit/static/static/js/{uniqueId.B3SLfhd2.js → uniqueId.C-AETne7.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.DAApt6jA.js → useBasicWidgetState.PEMqM7sS.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DeS_RHQ6.js → useOnInputChange.DmhqE1Mf.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.DD9yWtT4.js → withFullScreenWrapper.CyMhYOfp.js} +1 -1
- {streamlit_nightly-1.41.2.dev20241218.dist-info → streamlit_nightly-1.41.2.dev20241220.dist-info}/METADATA +8 -1
- {streamlit_nightly-1.41.2.dev20241218.dist-info → streamlit_nightly-1.41.2.dev20241220.dist-info}/RECORD +69 -69
- streamlit/static/static/js/index.gmoKc2tU.js +0 -1
- {streamlit_nightly-1.41.2.dev20241218.data → streamlit_nightly-1.41.2.dev20241220.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20241218.dist-info → streamlit_nightly-1.41.2.dev20241220.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20241218.dist-info → streamlit_nightly-1.41.2.dev20241220.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20241218.dist-info → streamlit_nightly-1.41.2.dev20241220.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.DjxunPkj.js","./RenderInPortalIfExists.DiM_RlO2.js","./index.pBJooeet.js","./index.CvwjoTQx.js","./FormClearHelper.C3t6Hrs8.js","./withFullScreenWrapper.CyMhYOfp.js","./Toolbar.DfVzn1J_.js","./sprintf.C-r3gIuM.js","./createDownloadLinkElement.DZMwyjvU.js","./slicedToArray.jpCPeYwK.js","./getPrototypeOf.DBWt125B.js","./createSuper.BOmG1Nab.js","./FileDownload.esm.DPBKyOWK.js","../css/index.B26BQfSF.css","./index.IrPwhnqy.js","./threshold.skajmqVB.js","./string.Bl9OLDCw.js","./timer.DwZfkapc.js","./index.BmWgOP2u.js","./useBasicWidgetState.PEMqM7sS.js","./_commonjs-dynamic-modules.TDtrdbi3.js","../css/index.CG16XVnL.css","./index.Bugr6UId.js","./index.BS8yN0si.js","./index.gOhapwEl.js","./index.C2wErDQu.js","./Hooks.CLbBlyNP.js","./index.BvYFvNzz.js","./index.BRFptg5h.js","./index.CbVFFm3x.js","./UploadFileInfo.C-jY39rj.js","./ProgressBar.CM8m7RxJ.js","./index.My7aeSv9.js","./InputInstructions.BRk7b0gh.js","./inputUtils.CQWz5UKz.js","./textarea.BzVKUorw.js","./base-input.f48IMSP0.js","./index.BBBYxfwb.js","./index.D5lmlOSF.js","./index.DmRbgFya.js","./timepicker.DkbmCWT8.js","./input.DI-Jt41x.js","./index.Be3Sh62A.js","./index.oX5UNl1X.js","./index.CvpZ5Nja.js","./index.SQPPTQm6.js","./index.Ng6Hz9CN.js","./index.DPnzPNn9.js","./index.C4IZLilO.js","./uniqueId.C-AETne7.js","./useOnInputChange.DmhqE1Mf.js","./index.BLIDOW15.js","./index.DCactJDE.js","./index.DqHdEwRV.js"])))=>i.map(i=>d[i]);
|
2
2
|
var sr=Object.defineProperty;var Wn=tt=>{throw TypeError(tt)};var ur=(tt,nt,et)=>nt in tt?sr(tt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):tt[nt]=et;var T1=(tt,nt,et)=>ur(tt,typeof nt!="symbol"?nt+"":nt,et),Rn=(tt,nt,et)=>nt.has(tt)||Wn("Cannot "+et);var _0=(tt,nt,et)=>(Rn(tt,nt,"read from private field"),et?et.call(tt):nt.get(tt)),Q0=(tt,nt,et)=>nt.has(tt)?Wn("Cannot add the same private member more than once"):nt instanceof WeakSet?nt.add(tt):nt.set(tt,et),K0=(tt,nt,et,rt)=>(Rn(tt,nt,"write to private field"),rt?rt.call(tt,et):nt.set(tt,et),et),$0=(tt,nt,et)=>(Rn(tt,nt,"access private method"),et);function _mergeNamespaces(tt,nt){for(var et=0;et<nt.length;et++){const rt=nt[et];if(typeof rt!="string"&&!Array.isArray(rt)){for(const ot in rt)if(ot!=="default"&&!(ot in tt)){const at=Object.getOwnPropertyDescriptor(rt,ot);at&&Object.defineProperty(tt,ot,at.get?at:{enumerable:!0,get:()=>rt[ot]})}}}return Object.freeze(Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"}))}(function(){const nt=document.createElement("link").relList;if(nt&&nt.supports&&nt.supports("modulepreload"))return;for(const ot of document.querySelectorAll('link[rel="modulepreload"]'))rt(ot);new MutationObserver(ot=>{for(const at of ot)if(at.type==="childList")for(const st of at.addedNodes)st.tagName==="LINK"&&st.rel==="modulepreload"&&rt(st)}).observe(document,{childList:!0,subtree:!0});function et(ot){const at={};return ot.integrity&&(at.integrity=ot.integrity),ot.referrerPolicy&&(at.referrerPolicy=ot.referrerPolicy),ot.crossOrigin==="use-credentials"?at.credentials="include":ot.crossOrigin==="anonymous"?at.credentials="omit":at.credentials="same-origin",at}function rt(ot){if(ot.ep)return;ot.ep=!0;const at=et(ot);fetch(ot.href,at)}})();var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(tt){return tt&&tt.__esModule&&Object.prototype.hasOwnProperty.call(tt,"default")?tt.default:tt}function getAugmentedNamespace(tt){if(tt.__esModule)return tt;var nt=tt.default;if(typeof nt=="function"){var et=function rt(){return this instanceof rt?Reflect.construct(nt,arguments,this.constructor):nt.apply(this,arguments)};et.prototype=nt.prototype}else et={};return Object.defineProperty(et,"__esModule",{value:!0}),Object.keys(tt).forEach(function(rt){var ot=Object.getOwnPropertyDescriptor(tt,rt);Object.defineProperty(et,rt,ot.get?ot:{enumerable:!0,get:function(){return tt[rt]}})}),et}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/**
|
3
3
|
* @license React
|
4
4
|
* react.production.min.js
|
@@ -680,7 +680,7 @@ If this is an installed component that works locally, the app may be having trou
|
|
680
680
|
|
681
681
|
For more troubleshooting help, please see the [Streamlit Component docs](${COMPONENT_DEVELOPER_URL}) or visit our [forums](${COMMUNITY_URL}).`,et}function tryParseArgs(tt,nt,et,rt){if(!rt)try{return parseArgs(tt,nt)}catch(ot){const at=ensureError(ot);et(at)}return[{},[]]}function compareDataframeArgs(tt,nt){return tt===nt||tt.length===nt.length&&tt.every((et,rt)=>{const ot=nt[rt];return et.key===ot.key&&et.value===ot.value})}function ComponentInstance(tt){const[nt,et]=reactExports.useState(),{disabled:rt,element:ot,registry:at,theme:st,widgetMgr:ut,width:ct,fragmentId:pt}=tt,{componentName:dt,jsonArgs:ft,specialArgs:bt,url:ht}=ot,[Mt,mt]=tryParseArgs(ft,bt,et,nt),Ot=reactExports.useRef({args:{},dataframeArgs:[]}),zt=compareDataframeArgs(Ot.current.dataframeArgs,mt);Ot.current.args=Mt,Ot.current.dataframeArgs=mt;const[yt,vt]=reactExports.useState(),[At,St]=reactExports.useState(isNaN(Mt.height)?void 0:Mt.height),Et=reactExports.useRef(!1),Tt=reactExports.useRef(null),Rt=reactExports.useRef(),Ct=useTimeout(()=>logWarning(getWarnMessage(dt,ht)),COMPONENT_READY_WARNING_TIME_MS/4),wt=useTimeout(()=>vt(!0),COMPONENT_READY_WARNING_TIME_MS);if(reactExports.useEffect(()=>{Et.current&&sendRenderMessage(Ot.current.args,Ot.current.dataframeArgs,rt,st,Tt.current??void 0)},[rt,At,zt,ft,st,ct]),reactExports.useEffect(()=>{const jt=Ut=>{Ut!==void 0&&Ut!==At&&(isNullOrUndefined$1(Tt.current)||(Tt.current.height=Ut.toString(),St(Ut)))},s0=()=>{sendRenderMessage(Ot.current.args,Ot.current.dataframeArgs,rt,st,Tt.current??void 0),Ct(),wt(),Et.current=!0,vt(!1)};Rt.current={isReady:()=>Et.current,element:ot,widgetMgr:ut,setComponentError:et,componentReadyCallback:s0,frameHeightCallback:jt,fragmentId:pt}},[dt,rt,ot,At,zt,yt,ft,st,ut,wt,Ct,pt]),reactExports.useEffect(()=>{var s0;const jt=((s0=Tt.current)==null?void 0:s0.contentWindow)??void 0;if(jt)return at.registerListener(jt,createIframeMessageHandler(Rt)),()=>{jt&&at.deregisterListener(jt)}},[at,dt]),nt)return jsx$1(ErrorElement,{name:nt.name,message:nt.message});const Lt=!Et.current&&!yt&&At!==0&&jsx$1(Skeleton,{element:Skeleton$1.create({height:At,style:Skeleton$1.SkeletonStyle.ELEMENT})}),Ht=!Et.current&&yt?jsx$1(AlertElement,{width:ct,body:getWarnMessage(dt,ht),kind:Kind.WARNING}):null;return jsxs(Fragment,{children:[Lt,Ht,jsx$1(StyledComponentIframe,{className:"stCustomComponentV1","data-testid":"stCustomComponentV1",allow:DEFAULT_IFRAME_FEATURE_POLICY,ref:Tt,src:getSrc(dt,at,ht),width:ct,height:At??0,scrolling:"no",sandbox:DEFAULT_IFRAME_SANDBOX_POLICY,title:dt,componentReady:Et.current})]})}const ComponentInstance$1=withTheme(ComponentInstance);class ComponentRegistry{constructor(nt){this.msgListeners=new Map,this.registerListener=(et,rt)=>{this.msgListeners.has(et),this.msgListeners.set(et,rt)},this.deregisterListener=et=>{this.msgListeners.delete(et)},this.getComponentURL=(et,rt)=>this.endpoints.buildComponentURL(et,rt),this.onMessageEvent=et=>{if(isNullOrUndefined$1(et.data)||!et.data.hasOwnProperty("isStreamlitMessage"))return;if(isNullOrUndefined$1(et.source)){logWarning("Received component message with no eventSource!",et.data);return}const rt=this.msgListeners.get(et.source);if(isNullOrUndefined$1(rt)||typeof rt!="function"){logWarning("Received component message for unregistered ComponentInstance!",et.data);return}const{type:ot}=et.data;if(isNullOrUndefined$1(ot)){logWarning("Received Streamlit message with no type!",et.data);return}rt(ot,et.data)},this.endpoints=nt,window.addEventListener("message",this.onMessageEvent)}}const Maybe=reactExports.memo(function tt({children:nt}){return jsx$1(Fragment,{children:nt})},(tt,nt)=>!(tt.enable||nt.enable));function makeMarkdownHeading(tt,nt){switch(tt.toLowerCase()){case Tags.H1:return`# ${nt}`;case Tags.H2:return`## ${nt}`;case Tags.H3:return`### ${nt}`;default:throw new Error(`Unrecognized tag for header: ${tt}`)}}function Heading(tt){const{width:nt,element:et}=tt,{tag:rt,anchor:ot,body:at,help:st,hideAnchor:ut,divider:ct}=et,pt=React$1.useContext(IsSidebarContext),dt=React$1.useContext(IsDialogContext),[ft,...bt]=at.split(`
|
682
682
|
`);return jsxs("div",{style:{width:nt},className:"stHeading","data-testid":"stHeading",children:[jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInSidebarOrDialog:pt||dt,style:{width:nt},"data-testid":"stMarkdownContainer",children:[jsx$1(HeadingWithActionElements,{anchor:ot,help:st,hideAnchor:ut,tag:rt,children:jsx$1(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(rt,ft),overrideComponents:{p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment}})}),bt.length>0&&jsx$1(RenderedMarkdown,{source:bt.join(`
|
683
|
-
`),allowHTML:!1})]}),ct&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:ct.includes("linear"),color:ct})]})}const StyledCheckbox$1=newStyled("div",{target:"e1eyve560"})(({width:tt,theme:nt})=>({width:tt,display:"flex",alignItems:"center",minHeight:nt.sizes.smallElementHeight})),StyledContent=newStyled("div",{target:"e1eyve561"})(({visibility:tt})=>({display:tt===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:tt===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(tt,nt){let et=nt.spacing.lg;return tt==="medium"?et=nt.spacing.threeXL:tt==="large"&&(et=nt.spacing.fourXL),et}const StyledHorizontalBlock=newStyled("div",{target:"epboeck0"})(({theme:tt,gap:nt})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(nt,tt)})),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=newStyled("div",{target:"epboeck1"})(({theme:tt,isStale:nt,width:et,elementType:rt})=>({width:et,position:"relative","@media print":{overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:tt.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${tt.spacing.lg}`,zIndex:tt.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${tt.spacing.xs}`,marginBottom:`-${tt.spacing.xs}`},...nt&&rt!=="skeleton"?{opacity:.33,transition:"opacity 1s ease-in 0.5s"}:{},...rt==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(rt)?{marginBottom:`-${tt.spacing.lg}`}:{}})),StyledColumn=newStyled("div",{target:"epboeck2"})(({theme:tt,weight:nt,gap:et,showBorder:rt,verticalAlignment:ot})=>{const{VerticalAlignment:at}=Block$2.Column,st=nt*100,ut=translateGapWidth(et,tt),ct=`calc(${st}% - ${ut})`;return{width:ct,flex:`1 1 ${ct}`,[`@media (max-width: ${tt.breakpoints.columns})`]:{minWidth:`calc(100% - ${tt.spacing.twoXL})`},...ot===at.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:tt.spacing.sm}},...ot===at.TOP&&{[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginTop:tt.spacing.sm}},...ot===at.CENTER&&{marginTop:"auto",marginBottom:"auto"},...rt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`}}}),StyledVerticalBlock=newStyled("div",{target:"epboeck3"})(({width:tt,theme:nt})=>({width:tt,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:nt.spacing.lg})),StyledVerticalBlockWrapper=newStyled("div",{target:"epboeck4"})({display:"flex",flexDirection:"column",flex:1}),StyledVerticalBlockBorderWrapper=newStyled("div",{target:"epboeck5"})(({theme:tt,border:nt,height:et})=>({...nt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`},...et&&{height:`${et}px`,overflow:"auto"}})),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index.BHURk4se.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.DNaEPTIQ.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.IFRZKSN9.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.Duul_60V.js").then(tt=>tt.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index.DJ2KsQBY.js"),__vite__mapDeps([14,15,16,17,4,6,5]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.D_GowxVI.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.D-F-jU8X.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BGYJCEox.js"),__vite__mapDeps([18,9,10,6,5,19,4,20,15,16,21]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.DoPaL107.js"),__vite__mapDeps([22,17,16,20,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.BP4KepTF.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.AV9bktPa.js"),__vite__mapDeps([23,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.MQuot7H3.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.mT0dy1zZ.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.SFxJlqiy.js"),__vite__mapDeps([24,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.DRXNtfhF.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CVCFfiYa.js"),__vite__mapDeps([25,4,6,26,8,12]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.BkzC-Laz.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.R2Lh_aam.js"),__vite__mapDeps([27,19,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.CMOnpQt4.js"),__vite__mapDeps([28,8]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.v6oUo74c.js"),__vite__mapDeps([29,4,30,31]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.gmoKc2tU.js"),__vite__mapDeps([32,33,34,35,36]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.CVUfgzaG.js"),__vite__mapDeps([37,19,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.DUU9ewBx.js"),__vite__mapDeps([38,19,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.w1nNyMea.js"),__vite__mapDeps([39,19,4,40,10,11,41,36]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.DqNg1x9r.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.Dw2JgHHH.js"),__vite__mapDeps([42,19,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.Ck92cJzb.js"),__vite__mapDeps([43,31]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.DrNN9gLg.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.Ngz2_5VS.js"),__vite__mapDeps([44,19,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.HflMUepR.js"),__vite__mapDeps([45,19,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.D5liyd63.js"),__vite__mapDeps([46,7,19,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.BuXEemP9.js"),__vite__mapDeps([47,4,31,26,30]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.Ce6ykjki.js"),__vite__mapDeps([48,49,50,34,33,19,4,35,36]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DtPGZ6UE.js"),__vite__mapDeps([51,49,50,34,19,4,33,41,36]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.vKdYBY7v.js"),__vite__mapDeps([52,19,4,40,10,11]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.fV5QaduN.js"),__vite__mapDeps([53,7,49,4,33,41,36]),import.meta.url)),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0,import.meta.url));function hideIfStale(tt,nt){return tt?jsx$1(Fragment,{}):nt}const RawElementNodeRenderer=tt=>{const{node:nt}=tt;if(!nt)throw new Error("ElementNode not found.");const et={width:tt.width,disableFullscreenMode:tt.disableFullscreenMode},rt={...et,widgetMgr:tt.widgetMgr,disabled:tt.widgetsDisabled,fragmentId:nt.fragmentId};switch(nt.element.type){case"alert":{const at=nt.element.alert;return jsx$1(AlertElement,{icon:at.icon,body:at.body,kind:getAlertElementKind(at.format),...et})}case"arrowTable":return jsx$1(ArrowTable,{element:nt.quiverElement,...et});case"audio":return jsx$1(Audio,{element:nt.element.audio,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"balloons":return hideIfStale(tt.isStale,jsx$1(Balloons,{scriptRunId:tt.scriptRunId}));case"bokehChart":return jsx$1(DebouncedBokehChart,{element:nt.element.bokehChart,...et});case"code":{const at=nt.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:at.language,showLineNumbers:at.showLineNumbers,wrapLines:at.wrapLines,children:at.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:nt.element.deckGlJsonChart,...rt});case"docString":return jsx$1(DocString,{element:nt.element.docString,...et});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement,{element:nt.element.exception,...et});case"graphvizChart":return jsx$1(GraphVizChart,{element:nt.element.graphvizChart,...et});case"heading":return jsx$1(Heading,{element:nt.element.heading,...et});case"iframe":return jsx$1(IFrame,{element:nt.element.iframe,...et});case"imgs":return jsx$1(ImageList,{element:nt.element.imgs,endpoints:tt.endpoints,...et});case"json":return jsx$1(Json,{element:nt.element.json,...et});case"markdown":return jsx$1(Markdown,{element:nt.element.markdown,...et});case"metric":return jsx$1(Metric,{element:nt.element.metric});case"html":return jsx$1(Html,{element:nt.element.html,...et});case"pageLink":{const at=nt.element.pageLink,st=rt.disabled||at.disabled;return jsx$1(PageLink,{element:at,disabled:st,...et})}case"progress":return jsx$1(Progress,{element:nt.element.progress,...et});case"skeleton":return jsx$1(Skeleton,{element:nt.element.skeleton});case"snow":return hideIfStale(tt.isStale,jsx$1(Snow,{scriptRunId:tt.scriptRunId}));case"spinner":return jsx$1(Spinner,{element:nt.element.spinner,...et});case"text":return jsx$1(TextElement,{element:nt.element.text,...et});case"video":return jsx$1(Video,{element:nt.element.video,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"toast":{const at=nt.element.toast;return jsx$1(Toast,{body:at.body,icon:at.icon,...et},nt.scriptRunId)}case"arrowDataFrame":{const at=nt.element.arrowDataFrame;return rt.disabled=rt.disabled||at.disabled,jsx$1(ArrowDataFrame,{element:at,data:nt.quiverElement,...at.id&&{key:at.id},...rt})}case"arrowVegaLiteChart":const ot=nt.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:ot,...rt},ot.id||void 0);case"audioInput":{const at=nt.element.audioInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(AudioInput,{uploadClient:tt.uploadClient,element:at,...rt},at.id)}case"button":{const at=nt.element.button;if(rt.disabled=rt.disabled||at.disabled,at.isFormSubmitter){const{formId:st}=at,ut=tt.formsData.formsWithUploads.has(st);return jsx$1(FormSubmitContent,{element:at,hasInProgressUpload:ut,...rt})}return jsx$1(Button,{element:at,...rt})}case"buttonGroup":{const at=nt.element.buttonGroup;return rt.disabled=rt.disabled||at.disabled,jsx$1(ButtonGroup,{element:at,...rt},at.id)}case"downloadButton":{const at=nt.element.downloadButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(DownloadButton,{endpoints:tt.endpoints,element:at,...rt},at.id)}case"cameraInput":{const at=nt.element.cameraInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(CameraInput,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"chatInput":{const at=nt.element.chatInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(ChatInput,{element:at,...rt},at.id)}case"checkbox":{const at=nt.element.checkbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Checkbox,{element:at,...rt},at.id)}case"colorPicker":{const at=nt.element.colorPicker;return rt.disabled=rt.disabled||at.disabled,jsx$1(ColorPicker,{element:at,...rt},at.id)}case"componentInstance":return jsx$1(ComponentInstance$1,{registry:tt.componentRegistry,element:nt.element.componentInstance,...rt});case"dateInput":{const at=nt.element.dateInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(DateInput,{element:at,...rt},at.id)}case"fileUploader":{const at=nt.element.fileUploader;return rt.disabled=rt.disabled||at.disabled,jsx$1(FileUploader,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"linkButton":{const at=nt.element.linkButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(LinkButton,{element:at,...rt})}case"multiselect":{const at=nt.element.multiselect;return rt.disabled=rt.disabled||at.disabled,jsx$1(Multiselect,{element:at,...rt},at.id)}case"numberInput":{const at=nt.element.numberInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(NumberInput,{element:at,...rt},at.id)}case"plotlyChart":{const at=nt.element.plotlyChart;return jsx$1(PlotlyChart,{element:at,...rt},at.id)}case"radio":{const at=nt.element.radio;return rt.disabled=rt.disabled||at.disabled,jsx$1(Radio,{element:at,...rt},at.id)}case"selectbox":{const at=nt.element.selectbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Selectbox$1,{element:at,...rt},at.id)}case"slider":{const at=nt.element.slider;return rt.disabled=rt.disabled||at.disabled,jsx$1(Slider$1,{element:at,...rt},at.id)}case"textArea":{const at=nt.element.textArea;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextArea,{element:at,...rt},at.id)}case"textInput":{const at=nt.element.textInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextInput,{element:at,...rt},at.id)}case"timeInput":{const at=nt.element.timeInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TimeInput,{element:at,...rt},at.id)}default:throw new Error(`Unrecognized Element type ${nt.element.type}`)}},ElementNodeRenderer=tt=>{const{isFullScreen:nt,fragmentIdsThisRun:et}=React$1.useContext(LibContext),{node:rt,width:ot}=tt,at=rt.element.type||"",st=shouldComponentBeEnabled(at,tt.scriptRunState),ut=isComponentStale(st,rt,tt.scriptRunState,tt.scriptRunId,et),ct=getElementId(rt.element),pt=getKeyFromId(ct);return jsx$1(Maybe,{enable:st,children:jsx$1(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(pt)),"data-testid":"stElementContainer","data-stale":ut,isStale:ut&&!nt,width:ot,elementType:at,children:jsx$1(ErrorBoundary,{width:ot,children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...tt,isStale:ut})})})})})},BlockNodeRenderer=tt=>{const{node:nt}=tt,{fragmentIdsThisRun:et}=reactExports.useContext(LibContext);if(nt.isEmpty&&!nt.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const rt=shouldComponentBeEnabled("",tt.scriptRunState),ot=isComponentStale(rt,nt,tt.scriptRunState,tt.scriptRunId,et),at={...tt,node:nt},st=tt.disableFullscreenMode||notNullOrUndefined(nt.deltaBlock.dialog)||notNullOrUndefined(nt.deltaBlock.popover),ut=jsx$1(LayoutBlock,{...at,disableFullscreenMode:st});if(nt.deltaBlock.dialog)return jsx$1(DialogWithProvider,{element:nt.deltaBlock.dialog,deltaMsgReceivedAt:nt.deltaMsgReceivedAt,children:ut});if(nt.deltaBlock.expandable)return jsx$1(Expander,{empty:nt.isEmpty,isStale:ot,element:nt.deltaBlock.expandable,children:ut});if(nt.deltaBlock.popover)return jsx$1(Popover,{empty:nt.isEmpty,element:nt.deltaBlock.popover,width:tt.width,children:ut});if(nt.deltaBlock.type==="form"){const{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,border:ft}=nt.deltaBlock.form,bt=tt.formsData.submitButtons.get(ct),ht=bt!==void 0&&bt.length>0;return jsx$1(Form,{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,width:tt.width,hasSubmitButton:ht,scriptRunState:tt.scriptRunState,widgetMgr:tt.widgetMgr,border:ft,children:ut})}if(nt.deltaBlock.chatMessage)return jsx$1(ChatMessage,{element:nt.deltaBlock.chatMessage,endpoints:tt.endpoints,children:ut});if(nt.deltaBlock.column)return jsx$1(StyledColumn,{weight:nt.deltaBlock.column.weight??0,gap:nt.deltaBlock.column.gap??"",verticalAlignment:nt.deltaBlock.column.verticalAlignment??void 0,showBorder:nt.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:ut});if(nt.deltaBlock.tabContainer){const pt={...at,isStale:ot,renderTabContent:dt=>jsx$1(VerticalBlock,{...dt})};return jsx$1(Tabs,{...pt})}return ut},ChildRenderer=tt=>{const{libConfig:nt}=reactExports.useContext(LibContext);assignDividerColor(tt.node,useTheme());const et=new Set;return jsx$1(Fragment,{children:tt.node.children&&tt.node.children.map((rt,ot)=>{const at=nt.disableFullscreenMode||tt.disableFullscreenMode;if(rt instanceof ElementNode){const st={...tt,disableFullscreenMode:at,node:rt},ut=getElementId(rt.element)||ot.toString();return et.has(ut)?null:(et.add(ut),jsx$1(ElementNodeRenderer,{...st},ut))}if(rt instanceof BlockNode){const st={...tt,disableFullscreenMode:at,node:rt};return jsx$1(BlockNodeRenderer,{...st},ot)}throw new Error(`Unrecognized AppNode: ${rt}`)})})};function ScrollToBottomVerticalBlockWrapper(tt){const{border:nt,height:et,children:rt}=tt,ot=useScrollToBottom();return jsx$1(StyledVerticalBlockBorderWrapper,{border:nt,height:et,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:ot,children:rt})}const VerticalBlock=tt=>{var ft,bt;const nt=reactExports.useRef(null),[et,rt]=React$1.useState(-1),ot=reactExports.useMemo(()=>new ResizeObserver(([ht])=>{window.requestAnimationFrame(()=>{rt(ht.target.getBoundingClientRect().width||-1)})}),[rt]),at=((ft=tt.node.deltaBlock.vertical)==null?void 0:ft.border)??!1,st=((bt=tt.node.deltaBlock.vertical)==null?void 0:bt.height)||void 0,ut=st&&tt.node.children.find(ht=>ht instanceof BlockNode&&ht.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(nt.current&&ot.observe(nt.current),()=>{ot.disconnect()}),[ot,ut]);const ct=ut?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,pt={...tt,width:et},dt=getKeyFromId(tt.node.deltaBlock.id);return jsx$1(ct,{border:at,height:st,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsx$1(StyledVerticalBlockWrapper,{ref:nt,children:jsx$1(StyledVerticalBlock,{width:et,className:classNames("stVerticalBlock",convertKeyToClassName(dt)),"data-testid":"stVerticalBlock",children:jsx$1(ChildRenderer,{...pt})})})})},HorizontalBlock=tt=>{var et;const nt=((et=tt.node.deltaBlock.horizontal)==null?void 0:et.gap)??"";return jsx$1(StyledHorizontalBlock,{gap:nt,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsx$1(ChildRenderer,{...tt})})};function LayoutBlock(tt){return tt.node.deltaBlock.horizontal?jsx$1(HorizontalBlock,{...tt}):jsx$1(VerticalBlock,{...tt})}const StyledDataFrameOverlay=newStyled("div",{target:"e1cp3dxa1"})(({theme:tt})=>({position:"fixed",top:0,left:0,zIndex:tt.zIndices.tablePortal,lineHeight:"100%"})),PortalContext=React$1.createContext(null),PortalProvider=({children:tt})=>{const nt=reactExports.useRef(null),et=reactExports.useCallback(()=>nt.current,[]);return jsxs(PortalContext.Provider,{value:et,children:[tt,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:nt})]})};function ThemeProvider({theme:tt,baseuiTheme:nt,children:et}){return jsx$1(ThemeProvider$1,{theme:nt||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:tt,children:et})})}function toCodePoint(tt,nt){const et=[];let rt=0,ot=0,at=0;for(;at<tt.length;)rt=tt.charCodeAt(at++),ot?(et.push((65536+(ot-55296<<10)+(rt-56320)).toString(16)),ot=0):55296<=rt&&rt<=56319?ot=rt:et.push(rt.toString(16));return et.join("-")}const UFE0Fg=/\uFE0F/g,U200D="";function grabTheRightIcon(tt){return toCodePoint(tt.indexOf(U200D)<0?tt.replace(UFE0Fg,""):tt)}function iconToUrl(tt){const nt=/^:(.+)\/(.+):$/,et=tt.match(nt);return et===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${et[2]}/default/24px.svg`}function handleFavicon(tt,nt,et){const rt=extractEmoji(tt);let ot;rt&&!tt.startsWith(":material")?ot=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(rt)}.png`:tt.startsWith(":material")?ot=iconToUrl(tt):ot=et.buildMediaURL(tt),overwriteFavicon(ot),nt({type:"SET_PAGE_FAVICON",favicon:ot})}function overwriteFavicon(tt){const nt=document.querySelector("link[rel='shortcut icon']");nt&&(nt.href=tt)}function extractEmoji(tt){const nt=tt.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(nt))?nodeEmoji$1.get(nt):nodeEmoji$1.hasEmoji(tt)?tt:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(tt,nt){return tt&&baseFor$1(tt,nt,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(tt){return typeof tt=="function"?tt:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(tt,nt){return tt&&baseForOwn$3(tt,castFunction$1(nt))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(tt){return this.__data__.set(tt,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(tt){return this.__data__.has(tt)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(tt){var nt=-1,et=tt==null?0:tt.length;for(this.__data__=new MapCache$1;++nt<et;)this.add(tt[nt])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1;SetCache$3.prototype.has=setCacheHas$1;var _SetCache=SetCache$3;function arraySome$2(tt,nt){for(var et=-1,rt=tt==null?0:tt.length;++et<rt;)if(nt(tt[et],et,tt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(tt,nt){return tt.has(nt)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome$1=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$b=1,COMPARE_UNORDERED_FLAG$7=2;function equalArrays$3(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$b,ut=tt.length,ct=nt.length;if(ut!=ct&&!(st&&ct>ut))return!1;var pt=at.get(tt),dt=at.get(nt);if(pt&&dt)return pt==nt&&dt==tt;var ft=-1,bt=!0,ht=et&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(at.set(tt,nt),at.set(nt,tt);++ft<ut;){var Mt=tt[ft],mt=nt[ft];if(rt)var Ot=st?rt(mt,Mt,ft,nt,tt,at):rt(Mt,mt,ft,tt,nt,at);if(Ot!==void 0){if(Ot)continue;bt=!1;break}if(ht){if(!arraySome$1(nt,function(zt,yt){if(!cacheHas$2(ht,yt)&&(Mt===zt||ot(Mt,zt,et,rt,at)))return ht.push(yt)})){bt=!1;break}}else if(!(Mt===mt||ot(Mt,mt,et,rt,at))){bt=!1;break}}return at.delete(tt),at.delete(nt),bt}var _equalArrays=equalArrays$3,Symbol$2=_Symbol,Uint8Array$2=_Uint8Array,eq$1=eq_1,equalArrays$2=_equalArrays,mapToArray$1=_mapToArray,setToArray$1=_setToArray,COMPARE_PARTIAL_FLAG$a=1,COMPARE_UNORDERED_FLAG$6=2,boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$2(tt,nt,et,rt,ot,at,st){switch(et){case dataViewTag$3:if(tt.byteLength!=nt.byteLength||tt.byteOffset!=nt.byteOffset)return!1;tt=tt.buffer,nt=nt.buffer;case arrayBufferTag$2:return!(tt.byteLength!=nt.byteLength||!at(new Uint8Array$2(tt),new Uint8Array$2(nt)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+tt,+nt);case errorTag$2:return tt.name==nt.name&&tt.message==nt.message;case regexpTag$2:case stringTag$2:return tt==nt+"";case mapTag$3:var ut=mapToArray$1;case setTag$3:var ct=rt&COMPARE_PARTIAL_FLAG$a;if(ut||(ut=setToArray$1),tt.size!=nt.size&&!ct)return!1;var pt=st.get(tt);if(pt)return pt==nt;rt|=COMPARE_UNORDERED_FLAG$6,st.set(tt,nt);var dt=equalArrays$2(ut(tt),ut(nt),rt,ot,at,st);return st.delete(tt),dt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(tt)==symbolValueOf$1.call(nt)}return!1}var _equalByTag=equalByTag$2,getAllKeys$1=_getAllKeys,COMPARE_PARTIAL_FLAG$9=1,objectProto$h=Object.prototype,hasOwnProperty$f=objectProto$h.hasOwnProperty;function equalObjects$2(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$9,ut=getAllKeys$1(tt),ct=ut.length,pt=getAllKeys$1(nt),dt=pt.length;if(ct!=dt&&!st)return!1;for(var ft=ct;ft--;){var bt=ut[ft];if(!(st?bt in nt:hasOwnProperty$f.call(nt,bt)))return!1}var ht=at.get(tt),Mt=at.get(nt);if(ht&&Mt)return ht==nt&&Mt==tt;var mt=!0;at.set(tt,nt),at.set(nt,tt);for(var Ot=st;++ft<ct;){bt=ut[ft];var zt=tt[bt],yt=nt[bt];if(rt)var vt=st?rt(yt,zt,bt,nt,tt,at):rt(zt,yt,bt,tt,nt,at);if(!(vt===void 0?zt===yt||ot(zt,yt,et,rt,at):vt)){mt=!1;break}Ot||(Ot=bt=="constructor")}if(mt&&!Ot){var At=tt.constructor,St=nt.constructor;At!=St&&"constructor"in tt&&"constructor"in nt&&!(typeof At=="function"&&At instanceof At&&typeof St=="function"&&St instanceof St)&&(mt=!1)}return at.delete(tt),at.delete(nt),mt}var _equalObjects=equalObjects$2,Stack$2=_Stack,equalArrays$1=_equalArrays,equalByTag$1=_equalByTag,equalObjects$1=_equalObjects,getTag$1=_getTag,isArray$7=isArray_1,isBuffer$2=isBufferExports,isTypedArray$2=isTypedArray_1,COMPARE_PARTIAL_FLAG$8=1,argsTag$3="[object Arguments]",arrayTag$2="[object Array]",objectTag$4="[object Object]",objectProto$g=Object.prototype,hasOwnProperty$e=objectProto$g.hasOwnProperty;function baseIsEqualDeep$2(tt,nt,et,rt,ot,at){var st=isArray$7(tt),ut=isArray$7(nt),ct=st?arrayTag$2:getTag$1(tt),pt=ut?arrayTag$2:getTag$1(nt);ct=ct==argsTag$3?objectTag$4:ct,pt=pt==argsTag$3?objectTag$4:pt;var dt=ct==objectTag$4,ft=pt==objectTag$4,bt=ct==pt;if(bt&&isBuffer$2(tt)){if(!isBuffer$2(nt))return!1;st=!0,dt=!1}if(bt&&!dt)return at||(at=new Stack$2),st||isTypedArray$2(tt)?equalArrays$1(tt,nt,et,rt,ot,at):equalByTag$1(tt,nt,ct,et,rt,ot,at);if(!(et&COMPARE_PARTIAL_FLAG$8)){var ht=dt&&hasOwnProperty$e.call(tt,"__wrapped__"),Mt=ft&&hasOwnProperty$e.call(nt,"__wrapped__");if(ht||Mt){var mt=ht?tt.value():tt,Ot=Mt?nt.value():nt;return at||(at=new Stack$2),ot(mt,Ot,et,rt,at)}}return bt?(at||(at=new Stack$2),equalObjects$1(tt,nt,et,rt,ot,at)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(tt,nt,et,rt,ot){return tt===nt?!0:tt==null||nt==null||!isObjectLike$1(tt)&&!isObjectLike$1(nt)?tt!==tt&&nt!==nt:baseIsEqualDeep$1(tt,nt,et,rt,baseIsEqual$4,ot)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(tt,nt,et,rt){var ot=et.length,at=ot,st=!rt;if(tt==null)return!at;for(tt=Object(tt);ot--;){var ut=et[ot];if(st&&ut[2]?ut[1]!==tt[ut[0]]:!(ut[0]in tt))return!1}for(;++ot<at;){ut=et[ot];var ct=ut[0],pt=tt[ct],dt=ut[1];if(st&&ut[2]){if(pt===void 0&&!(ct in tt))return!1}else{var ft=new Stack$1;if(rt)var bt=rt(pt,dt,ct,tt,nt,ft);if(!(bt===void 0?baseIsEqual$3(dt,pt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,rt,ft):bt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$3=isObject_1;function isStrictComparable$3(tt){return tt===tt&&!isObject$3(tt)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(tt){for(var nt=keys$1(tt),et=nt.length;et--;){var rt=nt[et],ot=tt[rt];nt[et]=[rt,ot,isStrictComparable$2(ot)]}return nt}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(tt,nt){return function(et){return et==null?!1:et[tt]===nt&&(nt!==void 0||tt in Object(et))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(tt){var nt=getMatchData$1(tt);return nt.length==1&&nt[0][2]?matchesStrictComparable$2(nt[0][0],nt[0][1]):function(et){return et===tt||baseIsMatch$1(et,tt,nt)}}var _baseMatches=baseMatches$2;function baseHasIn$2(tt,nt){return tt!=null&&nt in Object(tt)}var _baseHasIn=baseHasIn$2,castPath$3=_castPath,isArguments$1=isArguments_1,isArray$6=isArray_1,isIndex$2=_isIndex,isLength$1=isLength_1,toKey$4=_toKey;function hasPath$2(tt,nt,et){nt=castPath$3(nt,tt);for(var rt=-1,ot=nt.length,at=!1;++rt<ot;){var st=toKey$4(nt[rt]);if(!(at=tt!=null&&et(tt,st)))break;tt=tt[st]}return at||++rt!=ot?at:(ot=tt==null?0:tt.length,!!ot&&isLength$1(ot)&&isIndex$2(st,ot)&&(isArray$6(tt)||isArguments$1(tt)))}var _hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(tt,nt){return tt!=null&&hasPath$1(tt,nt,baseHasIn$1)}var hasIn_1=hasIn$3,baseIsEqual$2=_baseIsEqual,get$2=get_1,hasIn$2=hasIn_1,isKey$2=_isKey,isStrictComparable$1=_isStrictComparable,matchesStrictComparable$1=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG$6=1,COMPARE_UNORDERED_FLAG$4=2;function baseMatchesProperty$2(tt,nt){return isKey$2(tt)&&isStrictComparable$1(nt)?matchesStrictComparable$1(toKey$3(tt),nt):function(et){var rt=get$2(et,tt);return rt===void 0&&rt===nt?hasIn$2(et,tt):baseIsEqual$2(nt,rt,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(tt){return function(nt){return baseGet$3(nt,tt)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(tt){return isKey$1(tt)?baseProperty$1(toKey$2(tt)):basePropertyDeep$1(tt)}var property_1=property$2,baseMatches$1=_baseMatches,baseMatchesProperty$1=_baseMatchesProperty,identity$2=identity_1,isArray$5=isArray_1,property$1=property_1;function baseIteratee$5(tt){return typeof tt=="function"?tt:tt==null?identity$2:typeof tt=="object"?isArray$5(tt)?baseMatchesProperty$1(tt[0],tt[1]):baseMatches$1(tt):property$1(tt)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(tt,nt){return function(et,rt){if(et==null)return et;if(!isArrayLike$2(et))return tt(et,rt);for(var ot=et.length,at=nt?ot:-1,st=Object(et);(nt?at--:++at<ot)&&rt(st[at],at,st)!==!1;);return et}}var _createBaseEach=createBaseEach$2,baseForOwn$2=_baseForOwn,createBaseEach$1=_createBaseEach,baseEach$3=createBaseEach$1(baseForOwn$2),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$3(tt,nt){var et=-1,rt=isArrayLike$1(tt)?Array(tt.length):[];return baseEach$2(tt,function(ot,at,st){rt[++et]=nt(ot,at,st)}),rt}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(tt,nt){var et=isArray$4(tt)?arrayMap$3:baseMap$2;return et(tt,baseIteratee$4(nt))}var map_1=map$1;Object.defineProperty(flattenNames$1,"__esModule",{value:!0});flattenNames$1.flattenNames=void 0;var _isString2=isString_1,_isString3=_interopRequireDefault$7(_isString2),_forOwn2$2=forOwn_1,_forOwn3$2=_interopRequireDefault$7(_forOwn2$2),_isPlainObject2=isPlainObject_1,_isPlainObject3=_interopRequireDefault$7(_isPlainObject2),_map2=map_1,_map3=_interopRequireDefault$7(_map2);function _interopRequireDefault$7(tt){return tt&&tt.__esModule?tt:{default:tt}}var flattenNames=flattenNames$1.flattenNames=function tt(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=[];return(0,_map3.default)(nt,function(rt){Array.isArray(rt)?tt(rt).map(function(ot){return et.push(ot)}):(0,_isPlainObject3.default)(rt)?(0,_forOwn3$2.default)(rt,function(ot,at){ot===!0&&et.push(at),et.push(at+"-"+ot)}):(0,_isString3.default)(rt)&&et.push(rt)}),et};flattenNames$1.default=flattenNames;var mergeClasses$1={};Object.defineProperty(mergeClasses$1,"__esModule",{value:!0});mergeClasses$1.mergeClasses=void 0;var _forOwn2$1=forOwn_1,_forOwn3$1=_interopRequireDefault$6(_forOwn2$1),_cloneDeep2=cloneDeep_1,_cloneDeep3=_interopRequireDefault$6(_cloneDeep2),_extends$w=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$6(tt){return tt&&tt.__esModule?tt:{default:tt}}var mergeClasses=mergeClasses$1.mergeClasses=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],rt=nt.default&&(0,_cloneDeep3.default)(nt.default)||{};return et.map(function(ot){var at=nt[ot];return at&&(0,_forOwn3$1.default)(at,function(st,ut){rt[ut]||(rt[ut]={}),rt[ut]=_extends$w({},rt[ut],at[ut])}),ot}),rt};mergeClasses$1.default=mergeClasses;var autoprefix$1={};Object.defineProperty(autoprefix$1,"__esModule",{value:!0});autoprefix$1.autoprefix=void 0;var _forOwn2=forOwn_1,_forOwn3=_interopRequireDefault$5(_forOwn2),_extends$v=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$5(tt){return tt&&tt.__esModule?tt:{default:tt}}var transforms={borderRadius:function tt(nt){return{msBorderRadius:nt,MozBorderRadius:nt,OBorderRadius:nt,WebkitBorderRadius:nt,borderRadius:nt}},boxShadow:function tt(nt){return{msBoxShadow:nt,MozBoxShadow:nt,OBoxShadow:nt,WebkitBoxShadow:nt,boxShadow:nt}},userSelect:function tt(nt){return{WebkitTouchCallout:nt,KhtmlUserSelect:nt,MozUserSelect:nt,msUserSelect:nt,WebkitUserSelect:nt,userSelect:nt}},flex:function tt(nt){return{WebkitBoxFlex:nt,MozBoxFlex:nt,WebkitFlex:nt,msFlex:nt,flex:nt}},flexBasis:function tt(nt){return{WebkitFlexBasis:nt,flexBasis:nt}},justifyContent:function tt(nt){return{WebkitJustifyContent:nt,justifyContent:nt}},transition:function tt(nt){return{msTransition:nt,MozTransition:nt,OTransition:nt,WebkitTransition:nt,transition:nt}},transform:function tt(nt){return{msTransform:nt,MozTransform:nt,OTransform:nt,WebkitTransform:nt,transform:nt}},absolute:function tt(nt){var et=nt&&nt.split(" ");return{position:"absolute",top:et&&et[0],right:et&&et[1],bottom:et&&et[2],left:et&&et[3]}},extend:function tt(nt,et){var rt=et[nt];return rt||{extend:nt}}},autoprefix=autoprefix$1.autoprefix=function tt(nt){var et={};return(0,_forOwn3.default)(nt,function(rt,ot){var at={};(0,_forOwn3.default)(rt,function(st,ut){var ct=transforms[ut];ct?at=_extends$v({},at,ct(st)):at[ut]=st}),et[ot]=at}),et};autoprefix$1.default=autoprefix;var hover$1={};Object.defineProperty(hover$1,"__esModule",{value:!0});hover$1.hover=void 0;var _extends$u=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$f(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$f(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var hover=hover$1.hover=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$f(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$f(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$f(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={hover:!1},ut.handleMouseOver=function(){return ut.setState({hover:!0})},ut.handleMouseOut=function(){return ut.setState({hover:!1})},ut.render=function(){return _react2$3.default.createElement(et,{onMouseOver:ut.handleMouseOver,onMouseOut:ut.handleMouseOut},_react2$3.default.createElement(nt,_extends$u({},ut.props,ut.state)))},st),_possibleConstructorReturn$f(ut,ct)}return ot}(_react2$3.default.Component)};hover$1.default=hover;var active$1={};Object.defineProperty(active$1,"__esModule",{value:!0});active$1.active=void 0;var _extends$t=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$e(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$e(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var active=active$1.active=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$e(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$e(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$e(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={active:!1},ut.handleMouseDown=function(){return ut.setState({active:!0})},ut.handleMouseUp=function(){return ut.setState({active:!1})},ut.render=function(){return _react2$2.default.createElement(et,{onMouseDown:ut.handleMouseDown,onMouseUp:ut.handleMouseUp},_react2$2.default.createElement(nt,_extends$t({},ut.props,ut.state)))},st),_possibleConstructorReturn$e(ut,ct)}return ot}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function tt(nt,et){var rt={},ot=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;rt[st]=ut};return nt===0&&ot("first-child"),nt===et-1&&ot("last-child"),(nt===0||nt%2===0)&&ot("even"),Math.abs(nt%2)===1&&ot("odd"),ot("nth-child",nt),rt};loop.default=loopable;Object.defineProperty(lib$2,"__esModule",{value:!0});lib$2.ReactCSS=lib$2.loop=lib$2.handleActive=handleHover=lib$2.handleHover=lib$2.hover=void 0;var _flattenNames=flattenNames$1,_flattenNames2=_interopRequireDefault$2(_flattenNames),_mergeClasses=mergeClasses$1,_mergeClasses2=_interopRequireDefault$2(_mergeClasses),_autoprefix=autoprefix$1,_autoprefix2=_interopRequireDefault$2(_autoprefix),_hover2=hover$1,_hover3=_interopRequireDefault$2(_hover2),_active=active$1,_active2=_interopRequireDefault$2(_active),_loop2=loop,_loop3=_interopRequireDefault$2(_loop2);function _interopRequireDefault$2(tt){return tt&&tt.__esModule?tt:{default:tt}}lib$2.hover=_hover3.default;var handleHover=lib$2.handleHover=_hover3.default;lib$2.handleActive=_active2.default;lib$2.loop=_loop3.default;var ReactCSS=lib$2.ReactCSS=function tt(nt){for(var et=arguments.length,rt=Array(et>1?et-1:0),ot=1;ot<et;ot++)rt[ot-1]=arguments[ot];var at=(0,_flattenNames2.default)(rt),st=(0,_mergeClasses2.default)(nt,at);return(0,_autoprefix2.default)(st)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function tt(nt,et,rt,ot,at){var st=at.clientWidth,ut=at.clientHeight,ct=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,pt=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,dt=ct-(at.getBoundingClientRect().left+window.pageXOffset),ft=pt-(at.getBoundingClientRect().top+window.pageYOffset);if(rt==="vertical"){var bt=void 0;if(ft<0?bt=0:ft>ut?bt=1:bt=Math.round(ft*100/ut)/100,et.a!==bt)return{h:et.h,s:et.s,l:et.l,a:bt,source:"rgb"}}else{var ht=void 0;if(dt<0?ht=0:dt>st?ht=1:ht=Math.round(dt*100/st)/100,ot!==ht)return{h:et.h,s:et.s,l:et.l,a:ht,source:"rgb"}}return null},checkboardCache={},render=function tt(nt,et,rt,ot){if(typeof document>"u"&&!ot)return null;var at=ot?new ot:document.createElement("canvas");at.width=rt*2,at.height=rt*2;var st=at.getContext("2d");return st?(st.fillStyle=nt,st.fillRect(0,0,at.width,at.height),st.fillStyle=et,st.fillRect(0,0,rt,rt),st.translate(rt,rt),st.fillRect(0,0,rt,rt),at.toDataURL()):null},get$1=function tt(nt,et,rt,ot){var at=nt+"-"+et+"-"+rt+(ot?"-server":"");if(checkboardCache[at])return checkboardCache[at];var st=render(nt,et,rt,ot);return checkboardCache[at]=st,st},_extends$s=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},Checkboard=function tt(nt){var et=nt.white,rt=nt.grey,ot=nt.size,at=nt.renderers,st=nt.borderRadius,ut=nt.boxShadow,ct=nt.children,pt=_default$2({default:{grid:{borderRadius:st,boxShadow:ut,absolute:"0px 0px 0px 0px",background:"url("+get$1(et,rt,ot,at.canvas)+") center left"}}});return reactExports.isValidElement(ct)?React$1.cloneElement(ct,_extends$s({},ct.props,{style:_extends$s({},ct.props.style,pt.grid)})):React$1.createElement("div",{style:pt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_createClass$d=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$d(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$d(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Alpha=function(tt){_inherits$d(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$d(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$d(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$2(pt,ot.props.hsl,ot.props.direction,ot.props.a,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},ot.unbindEventListeners=function(){window.removeEventListener("mousemove",ot.handleChange),window.removeEventListener("mouseup",ot.handleMouseUp)},rt),_possibleConstructorReturn$d(ot,at)}return _createClass$d(nt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var rt=this,ot=this.props.rgb,at=_default$2({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
|
683
|
+
`),allowHTML:!1})]}),ct&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:ct.includes("linear"),color:ct})]})}const StyledCheckbox$1=newStyled("div",{target:"e1eyve560"})(({width:tt,theme:nt})=>({width:tt,display:"flex",alignItems:"center",minHeight:nt.sizes.smallElementHeight})),StyledContent=newStyled("div",{target:"e1eyve561"})(({visibility:tt})=>({display:tt===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:tt===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(tt,nt){let et=nt.spacing.lg;return tt==="medium"?et=nt.spacing.threeXL:tt==="large"&&(et=nt.spacing.fourXL),et}const StyledHorizontalBlock=newStyled("div",{target:"epboeck0"})(({theme:tt,gap:nt})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(nt,tt)})),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=newStyled("div",{target:"epboeck1"})(({theme:tt,isStale:nt,width:et,elementType:rt})=>({width:et,position:"relative","@media print":{overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:tt.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${tt.spacing.lg}`,zIndex:tt.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${tt.spacing.xs}`,marginBottom:`-${tt.spacing.xs}`},...nt&&rt!=="skeleton"?{opacity:.33,transition:"opacity 1s ease-in 0.5s"}:{},...rt==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(rt)?{marginBottom:`-${tt.spacing.lg}`}:{}})),StyledColumn=newStyled("div",{target:"epboeck2"})(({theme:tt,weight:nt,gap:et,showBorder:rt,verticalAlignment:ot})=>{const{VerticalAlignment:at}=Block$2.Column,st=nt*100,ut=translateGapWidth(et,tt),ct=`calc(${st}% - ${ut})`;return{width:ct,flex:`1 1 ${ct}`,[`@media (max-width: ${tt.breakpoints.columns})`]:{minWidth:`calc(100% - ${tt.spacing.twoXL})`},...ot===at.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:tt.spacing.sm}},...ot===at.TOP&&{[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginTop:tt.spacing.sm}},...ot===at.CENTER&&{marginTop:"auto",marginBottom:"auto"},...rt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`}}}),StyledVerticalBlock=newStyled("div",{target:"epboeck3"})(({width:tt,theme:nt})=>({width:tt,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:nt.spacing.lg})),StyledVerticalBlockWrapper=newStyled("div",{target:"epboeck4"})({display:"flex",flexDirection:"column",flex:1}),StyledVerticalBlockBorderWrapper=newStyled("div",{target:"epboeck5"})(({theme:tt,border:nt,height:et})=>({...nt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`},...et&&{height:`${et}px`,overflow:"auto"}})),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index.WXkLaOYO.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.DjxunPkj.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.pBJooeet.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.CvwjoTQx.js").then(tt=>tt.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index.IrPwhnqy.js"),__vite__mapDeps([14,15,16,17,4,6,5]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.qYyPlFTQ.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.CGFLXsMI.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BmWgOP2u.js"),__vite__mapDeps([18,9,10,6,5,19,4,20,15,16,21]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.Bugr6UId.js"),__vite__mapDeps([22,17,16,20,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.Fi7IVV2V.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.BS8yN0si.js"),__vite__mapDeps([23,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.Dzm3dyfl.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.BraZUBxd.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.gOhapwEl.js"),__vite__mapDeps([24,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.BREkMUTS.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.C2wErDQu.js"),__vite__mapDeps([25,4,6,26,8,12]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.CXT5R7I7.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.BvYFvNzz.js"),__vite__mapDeps([27,19,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.BRFptg5h.js"),__vite__mapDeps([28,8]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CbVFFm3x.js"),__vite__mapDeps([29,4,30,31]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.My7aeSv9.js"),__vite__mapDeps([32,33,34,35,36]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.BBBYxfwb.js"),__vite__mapDeps([37,19,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.D5lmlOSF.js"),__vite__mapDeps([38,19,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DmRbgFya.js"),__vite__mapDeps([39,19,4,40,10,11,41,36]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.BIWXRasw.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.Be3Sh62A.js"),__vite__mapDeps([42,19,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.oX5UNl1X.js"),__vite__mapDeps([43,31]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.CwMp1tsE.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.CvpZ5Nja.js"),__vite__mapDeps([44,19,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.SQPPTQm6.js"),__vite__mapDeps([45,19,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.Ng6Hz9CN.js"),__vite__mapDeps([46,7,19,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.DPnzPNn9.js"),__vite__mapDeps([47,4,31,26,30]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.C4IZLilO.js"),__vite__mapDeps([48,49,50,34,33,19,4,35,36]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BLIDOW15.js"),__vite__mapDeps([51,49,50,34,19,4,33,41,36]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DCactJDE.js"),__vite__mapDeps([52,19,4,40,10,11]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DqHdEwRV.js"),__vite__mapDeps([53,7,49,4,33,41,36]),import.meta.url)),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0,import.meta.url));function hideIfStale(tt,nt){return tt?jsx$1(Fragment,{}):nt}const RawElementNodeRenderer=tt=>{const{node:nt}=tt;if(!nt)throw new Error("ElementNode not found.");const et={width:tt.width,disableFullscreenMode:tt.disableFullscreenMode},rt={...et,widgetMgr:tt.widgetMgr,disabled:tt.widgetsDisabled,fragmentId:nt.fragmentId};switch(nt.element.type){case"alert":{const at=nt.element.alert;return jsx$1(AlertElement,{icon:at.icon,body:at.body,kind:getAlertElementKind(at.format),...et})}case"arrowTable":return jsx$1(ArrowTable,{element:nt.quiverElement,...et});case"audio":return jsx$1(Audio,{element:nt.element.audio,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"balloons":return hideIfStale(tt.isStale,jsx$1(Balloons,{scriptRunId:tt.scriptRunId}));case"bokehChart":return jsx$1(DebouncedBokehChart,{element:nt.element.bokehChart,...et});case"code":{const at=nt.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:at.language,showLineNumbers:at.showLineNumbers,wrapLines:at.wrapLines,children:at.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:nt.element.deckGlJsonChart,...rt});case"docString":return jsx$1(DocString,{element:nt.element.docString,...et});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement,{element:nt.element.exception,...et});case"graphvizChart":return jsx$1(GraphVizChart,{element:nt.element.graphvizChart,...et});case"heading":return jsx$1(Heading,{element:nt.element.heading,...et});case"iframe":return jsx$1(IFrame,{element:nt.element.iframe,...et});case"imgs":return jsx$1(ImageList,{element:nt.element.imgs,endpoints:tt.endpoints,...et});case"json":return jsx$1(Json,{element:nt.element.json,...et});case"markdown":return jsx$1(Markdown,{element:nt.element.markdown,...et});case"metric":return jsx$1(Metric,{element:nt.element.metric});case"html":return jsx$1(Html,{element:nt.element.html,...et});case"pageLink":{const at=nt.element.pageLink,st=rt.disabled||at.disabled;return jsx$1(PageLink,{element:at,disabled:st,...et})}case"progress":return jsx$1(Progress,{element:nt.element.progress,...et});case"skeleton":return jsx$1(Skeleton,{element:nt.element.skeleton});case"snow":return hideIfStale(tt.isStale,jsx$1(Snow,{scriptRunId:tt.scriptRunId}));case"spinner":return jsx$1(Spinner,{element:nt.element.spinner,...et});case"text":return jsx$1(TextElement,{element:nt.element.text,...et});case"video":return jsx$1(Video,{element:nt.element.video,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"toast":{const at=nt.element.toast;return jsx$1(Toast,{body:at.body,icon:at.icon,...et},nt.scriptRunId)}case"arrowDataFrame":{const at=nt.element.arrowDataFrame;return rt.disabled=rt.disabled||at.disabled,jsx$1(ArrowDataFrame,{element:at,data:nt.quiverElement,...at.id&&{key:at.id},...rt})}case"arrowVegaLiteChart":const ot=nt.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:ot,...rt},ot.id||void 0);case"audioInput":{const at=nt.element.audioInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(AudioInput,{uploadClient:tt.uploadClient,element:at,...rt},at.id)}case"button":{const at=nt.element.button;if(rt.disabled=rt.disabled||at.disabled,at.isFormSubmitter){const{formId:st}=at,ut=tt.formsData.formsWithUploads.has(st);return jsx$1(FormSubmitContent,{element:at,hasInProgressUpload:ut,...rt})}return jsx$1(Button,{element:at,...rt})}case"buttonGroup":{const at=nt.element.buttonGroup;return rt.disabled=rt.disabled||at.disabled,jsx$1(ButtonGroup,{element:at,...rt},at.id)}case"downloadButton":{const at=nt.element.downloadButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(DownloadButton,{endpoints:tt.endpoints,element:at,...rt},at.id)}case"cameraInput":{const at=nt.element.cameraInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(CameraInput,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"chatInput":{const at=nt.element.chatInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(ChatInput,{element:at,...rt},at.id)}case"checkbox":{const at=nt.element.checkbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Checkbox,{element:at,...rt},at.id)}case"colorPicker":{const at=nt.element.colorPicker;return rt.disabled=rt.disabled||at.disabled,jsx$1(ColorPicker,{element:at,...rt},at.id)}case"componentInstance":return jsx$1(ComponentInstance$1,{registry:tt.componentRegistry,element:nt.element.componentInstance,...rt});case"dateInput":{const at=nt.element.dateInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(DateInput,{element:at,...rt},at.id)}case"fileUploader":{const at=nt.element.fileUploader;return rt.disabled=rt.disabled||at.disabled,jsx$1(FileUploader,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"linkButton":{const at=nt.element.linkButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(LinkButton,{element:at,...rt})}case"multiselect":{const at=nt.element.multiselect;return rt.disabled=rt.disabled||at.disabled,jsx$1(Multiselect,{element:at,...rt},at.id)}case"numberInput":{const at=nt.element.numberInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(NumberInput,{element:at,...rt},at.id)}case"plotlyChart":{const at=nt.element.plotlyChart;return jsx$1(PlotlyChart,{element:at,...rt},at.id)}case"radio":{const at=nt.element.radio;return rt.disabled=rt.disabled||at.disabled,jsx$1(Radio,{element:at,...rt},at.id)}case"selectbox":{const at=nt.element.selectbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Selectbox$1,{element:at,...rt},at.id)}case"slider":{const at=nt.element.slider;return rt.disabled=rt.disabled||at.disabled,jsx$1(Slider$1,{element:at,...rt},at.id)}case"textArea":{const at=nt.element.textArea;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextArea,{element:at,...rt},at.id)}case"textInput":{const at=nt.element.textInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextInput,{element:at,...rt},at.id)}case"timeInput":{const at=nt.element.timeInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TimeInput,{element:at,...rt},at.id)}default:throw new Error(`Unrecognized Element type ${nt.element.type}`)}},ElementNodeRenderer=tt=>{const{isFullScreen:nt,fragmentIdsThisRun:et}=React$1.useContext(LibContext),{node:rt,width:ot}=tt,at=rt.element.type||"",st=shouldComponentBeEnabled(at,tt.scriptRunState),ut=isComponentStale(st,rt,tt.scriptRunState,tt.scriptRunId,et),ct=getElementId(rt.element),pt=getKeyFromId(ct);return jsx$1(Maybe,{enable:st,children:jsx$1(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(pt)),"data-testid":"stElementContainer","data-stale":ut,isStale:ut&&!nt,width:ot,elementType:at,children:jsx$1(ErrorBoundary,{width:ot,children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...tt,isStale:ut})})})})})},BlockNodeRenderer=tt=>{const{node:nt}=tt,{fragmentIdsThisRun:et}=reactExports.useContext(LibContext);if(nt.isEmpty&&!nt.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const rt=shouldComponentBeEnabled("",tt.scriptRunState),ot=isComponentStale(rt,nt,tt.scriptRunState,tt.scriptRunId,et),at={...tt,node:nt},st=tt.disableFullscreenMode||notNullOrUndefined(nt.deltaBlock.dialog)||notNullOrUndefined(nt.deltaBlock.popover),ut=jsx$1(LayoutBlock,{...at,disableFullscreenMode:st});if(nt.deltaBlock.dialog)return jsx$1(DialogWithProvider,{element:nt.deltaBlock.dialog,deltaMsgReceivedAt:nt.deltaMsgReceivedAt,children:ut});if(nt.deltaBlock.expandable)return jsx$1(Expander,{empty:nt.isEmpty,isStale:ot,element:nt.deltaBlock.expandable,children:ut});if(nt.deltaBlock.popover)return jsx$1(Popover,{empty:nt.isEmpty,element:nt.deltaBlock.popover,width:tt.width,children:ut});if(nt.deltaBlock.type==="form"){const{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,border:ft}=nt.deltaBlock.form,bt=tt.formsData.submitButtons.get(ct),ht=bt!==void 0&&bt.length>0;return jsx$1(Form,{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,width:tt.width,hasSubmitButton:ht,scriptRunState:tt.scriptRunState,widgetMgr:tt.widgetMgr,border:ft,children:ut})}if(nt.deltaBlock.chatMessage)return jsx$1(ChatMessage,{element:nt.deltaBlock.chatMessage,endpoints:tt.endpoints,children:ut});if(nt.deltaBlock.column)return jsx$1(StyledColumn,{weight:nt.deltaBlock.column.weight??0,gap:nt.deltaBlock.column.gap??"",verticalAlignment:nt.deltaBlock.column.verticalAlignment??void 0,showBorder:nt.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:ut});if(nt.deltaBlock.tabContainer){const pt={...at,isStale:ot,renderTabContent:dt=>jsx$1(VerticalBlock,{...dt})};return jsx$1(Tabs,{...pt})}return ut},ChildRenderer=tt=>{const{libConfig:nt}=reactExports.useContext(LibContext);assignDividerColor(tt.node,useTheme());const et=new Set;return jsx$1(Fragment,{children:tt.node.children&&tt.node.children.map((rt,ot)=>{const at=nt.disableFullscreenMode||tt.disableFullscreenMode;if(rt instanceof ElementNode){const st={...tt,disableFullscreenMode:at,node:rt},ut=getElementId(rt.element)||ot.toString();return et.has(ut)?null:(et.add(ut),jsx$1(ElementNodeRenderer,{...st},ut))}if(rt instanceof BlockNode){const st={...tt,disableFullscreenMode:at,node:rt};return jsx$1(BlockNodeRenderer,{...st},ot)}throw new Error(`Unrecognized AppNode: ${rt}`)})})};function ScrollToBottomVerticalBlockWrapper(tt){const{border:nt,height:et,children:rt}=tt,ot=useScrollToBottom();return jsx$1(StyledVerticalBlockBorderWrapper,{border:nt,height:et,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:ot,children:rt})}const VerticalBlock=tt=>{var ft,bt;const nt=reactExports.useRef(null),[et,rt]=React$1.useState(-1),ot=reactExports.useMemo(()=>new ResizeObserver(([ht])=>{window.requestAnimationFrame(()=>{rt(ht.target.getBoundingClientRect().width||-1)})}),[rt]),at=((ft=tt.node.deltaBlock.vertical)==null?void 0:ft.border)??!1,st=((bt=tt.node.deltaBlock.vertical)==null?void 0:bt.height)||void 0,ut=st&&tt.node.children.find(ht=>ht instanceof BlockNode&&ht.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(nt.current&&ot.observe(nt.current),()=>{ot.disconnect()}),[ot,ut]);const ct=ut?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,pt={...tt,width:et},dt=getKeyFromId(tt.node.deltaBlock.id);return jsx$1(ct,{border:at,height:st,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsx$1(StyledVerticalBlockWrapper,{ref:nt,children:jsx$1(StyledVerticalBlock,{width:et,className:classNames("stVerticalBlock",convertKeyToClassName(dt)),"data-testid":"stVerticalBlock",children:jsx$1(ChildRenderer,{...pt})})})})},HorizontalBlock=tt=>{var et;const nt=((et=tt.node.deltaBlock.horizontal)==null?void 0:et.gap)??"";return jsx$1(StyledHorizontalBlock,{gap:nt,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsx$1(ChildRenderer,{...tt})})};function LayoutBlock(tt){return tt.node.deltaBlock.horizontal?jsx$1(HorizontalBlock,{...tt}):jsx$1(VerticalBlock,{...tt})}const StyledDataFrameOverlay=newStyled("div",{target:"e1cp3dxa1"})(({theme:tt})=>({position:"fixed",top:0,left:0,zIndex:tt.zIndices.tablePortal,lineHeight:"100%"})),PortalContext=React$1.createContext(null),PortalProvider=({children:tt})=>{const nt=reactExports.useRef(null),et=reactExports.useCallback(()=>nt.current,[]);return jsxs(PortalContext.Provider,{value:et,children:[tt,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:nt})]})};function ThemeProvider({theme:tt,baseuiTheme:nt,children:et}){return jsx$1(ThemeProvider$1,{theme:nt||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:tt,children:et})})}function toCodePoint(tt,nt){const et=[];let rt=0,ot=0,at=0;for(;at<tt.length;)rt=tt.charCodeAt(at++),ot?(et.push((65536+(ot-55296<<10)+(rt-56320)).toString(16)),ot=0):55296<=rt&&rt<=56319?ot=rt:et.push(rt.toString(16));return et.join("-")}const UFE0Fg=/\uFE0F/g,U200D="";function grabTheRightIcon(tt){return toCodePoint(tt.indexOf(U200D)<0?tt.replace(UFE0Fg,""):tt)}function iconToUrl(tt){const nt=/^:(.+)\/(.+):$/,et=tt.match(nt);return et===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${et[2]}/default/24px.svg`}function handleFavicon(tt,nt,et){const rt=extractEmoji(tt);let ot;rt&&!tt.startsWith(":material")?ot=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(rt)}.png`:tt.startsWith(":material")?ot=iconToUrl(tt):ot=et.buildMediaURL(tt),overwriteFavicon(ot),nt({type:"SET_PAGE_FAVICON",favicon:ot})}function overwriteFavicon(tt){const nt=document.querySelector("link[rel='shortcut icon']");nt&&(nt.href=tt)}function extractEmoji(tt){const nt=tt.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(nt))?nodeEmoji$1.get(nt):nodeEmoji$1.hasEmoji(tt)?tt:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(tt,nt){return tt&&baseFor$1(tt,nt,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(tt){return typeof tt=="function"?tt:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(tt,nt){return tt&&baseForOwn$3(tt,castFunction$1(nt))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(tt){return this.__data__.set(tt,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(tt){return this.__data__.has(tt)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(tt){var nt=-1,et=tt==null?0:tt.length;for(this.__data__=new MapCache$1;++nt<et;)this.add(tt[nt])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1;SetCache$3.prototype.has=setCacheHas$1;var _SetCache=SetCache$3;function arraySome$2(tt,nt){for(var et=-1,rt=tt==null?0:tt.length;++et<rt;)if(nt(tt[et],et,tt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(tt,nt){return tt.has(nt)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome$1=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$b=1,COMPARE_UNORDERED_FLAG$7=2;function equalArrays$3(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$b,ut=tt.length,ct=nt.length;if(ut!=ct&&!(st&&ct>ut))return!1;var pt=at.get(tt),dt=at.get(nt);if(pt&&dt)return pt==nt&&dt==tt;var ft=-1,bt=!0,ht=et&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(at.set(tt,nt),at.set(nt,tt);++ft<ut;){var Mt=tt[ft],mt=nt[ft];if(rt)var Ot=st?rt(mt,Mt,ft,nt,tt,at):rt(Mt,mt,ft,tt,nt,at);if(Ot!==void 0){if(Ot)continue;bt=!1;break}if(ht){if(!arraySome$1(nt,function(zt,yt){if(!cacheHas$2(ht,yt)&&(Mt===zt||ot(Mt,zt,et,rt,at)))return ht.push(yt)})){bt=!1;break}}else if(!(Mt===mt||ot(Mt,mt,et,rt,at))){bt=!1;break}}return at.delete(tt),at.delete(nt),bt}var _equalArrays=equalArrays$3,Symbol$2=_Symbol,Uint8Array$2=_Uint8Array,eq$1=eq_1,equalArrays$2=_equalArrays,mapToArray$1=_mapToArray,setToArray$1=_setToArray,COMPARE_PARTIAL_FLAG$a=1,COMPARE_UNORDERED_FLAG$6=2,boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$2(tt,nt,et,rt,ot,at,st){switch(et){case dataViewTag$3:if(tt.byteLength!=nt.byteLength||tt.byteOffset!=nt.byteOffset)return!1;tt=tt.buffer,nt=nt.buffer;case arrayBufferTag$2:return!(tt.byteLength!=nt.byteLength||!at(new Uint8Array$2(tt),new Uint8Array$2(nt)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+tt,+nt);case errorTag$2:return tt.name==nt.name&&tt.message==nt.message;case regexpTag$2:case stringTag$2:return tt==nt+"";case mapTag$3:var ut=mapToArray$1;case setTag$3:var ct=rt&COMPARE_PARTIAL_FLAG$a;if(ut||(ut=setToArray$1),tt.size!=nt.size&&!ct)return!1;var pt=st.get(tt);if(pt)return pt==nt;rt|=COMPARE_UNORDERED_FLAG$6,st.set(tt,nt);var dt=equalArrays$2(ut(tt),ut(nt),rt,ot,at,st);return st.delete(tt),dt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(tt)==symbolValueOf$1.call(nt)}return!1}var _equalByTag=equalByTag$2,getAllKeys$1=_getAllKeys,COMPARE_PARTIAL_FLAG$9=1,objectProto$h=Object.prototype,hasOwnProperty$f=objectProto$h.hasOwnProperty;function equalObjects$2(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$9,ut=getAllKeys$1(tt),ct=ut.length,pt=getAllKeys$1(nt),dt=pt.length;if(ct!=dt&&!st)return!1;for(var ft=ct;ft--;){var bt=ut[ft];if(!(st?bt in nt:hasOwnProperty$f.call(nt,bt)))return!1}var ht=at.get(tt),Mt=at.get(nt);if(ht&&Mt)return ht==nt&&Mt==tt;var mt=!0;at.set(tt,nt),at.set(nt,tt);for(var Ot=st;++ft<ct;){bt=ut[ft];var zt=tt[bt],yt=nt[bt];if(rt)var vt=st?rt(yt,zt,bt,nt,tt,at):rt(zt,yt,bt,tt,nt,at);if(!(vt===void 0?zt===yt||ot(zt,yt,et,rt,at):vt)){mt=!1;break}Ot||(Ot=bt=="constructor")}if(mt&&!Ot){var At=tt.constructor,St=nt.constructor;At!=St&&"constructor"in tt&&"constructor"in nt&&!(typeof At=="function"&&At instanceof At&&typeof St=="function"&&St instanceof St)&&(mt=!1)}return at.delete(tt),at.delete(nt),mt}var _equalObjects=equalObjects$2,Stack$2=_Stack,equalArrays$1=_equalArrays,equalByTag$1=_equalByTag,equalObjects$1=_equalObjects,getTag$1=_getTag,isArray$7=isArray_1,isBuffer$2=isBufferExports,isTypedArray$2=isTypedArray_1,COMPARE_PARTIAL_FLAG$8=1,argsTag$3="[object Arguments]",arrayTag$2="[object Array]",objectTag$4="[object Object]",objectProto$g=Object.prototype,hasOwnProperty$e=objectProto$g.hasOwnProperty;function baseIsEqualDeep$2(tt,nt,et,rt,ot,at){var st=isArray$7(tt),ut=isArray$7(nt),ct=st?arrayTag$2:getTag$1(tt),pt=ut?arrayTag$2:getTag$1(nt);ct=ct==argsTag$3?objectTag$4:ct,pt=pt==argsTag$3?objectTag$4:pt;var dt=ct==objectTag$4,ft=pt==objectTag$4,bt=ct==pt;if(bt&&isBuffer$2(tt)){if(!isBuffer$2(nt))return!1;st=!0,dt=!1}if(bt&&!dt)return at||(at=new Stack$2),st||isTypedArray$2(tt)?equalArrays$1(tt,nt,et,rt,ot,at):equalByTag$1(tt,nt,ct,et,rt,ot,at);if(!(et&COMPARE_PARTIAL_FLAG$8)){var ht=dt&&hasOwnProperty$e.call(tt,"__wrapped__"),Mt=ft&&hasOwnProperty$e.call(nt,"__wrapped__");if(ht||Mt){var mt=ht?tt.value():tt,Ot=Mt?nt.value():nt;return at||(at=new Stack$2),ot(mt,Ot,et,rt,at)}}return bt?(at||(at=new Stack$2),equalObjects$1(tt,nt,et,rt,ot,at)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(tt,nt,et,rt,ot){return tt===nt?!0:tt==null||nt==null||!isObjectLike$1(tt)&&!isObjectLike$1(nt)?tt!==tt&&nt!==nt:baseIsEqualDeep$1(tt,nt,et,rt,baseIsEqual$4,ot)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(tt,nt,et,rt){var ot=et.length,at=ot,st=!rt;if(tt==null)return!at;for(tt=Object(tt);ot--;){var ut=et[ot];if(st&&ut[2]?ut[1]!==tt[ut[0]]:!(ut[0]in tt))return!1}for(;++ot<at;){ut=et[ot];var ct=ut[0],pt=tt[ct],dt=ut[1];if(st&&ut[2]){if(pt===void 0&&!(ct in tt))return!1}else{var ft=new Stack$1;if(rt)var bt=rt(pt,dt,ct,tt,nt,ft);if(!(bt===void 0?baseIsEqual$3(dt,pt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,rt,ft):bt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$3=isObject_1;function isStrictComparable$3(tt){return tt===tt&&!isObject$3(tt)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(tt){for(var nt=keys$1(tt),et=nt.length;et--;){var rt=nt[et],ot=tt[rt];nt[et]=[rt,ot,isStrictComparable$2(ot)]}return nt}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(tt,nt){return function(et){return et==null?!1:et[tt]===nt&&(nt!==void 0||tt in Object(et))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(tt){var nt=getMatchData$1(tt);return nt.length==1&&nt[0][2]?matchesStrictComparable$2(nt[0][0],nt[0][1]):function(et){return et===tt||baseIsMatch$1(et,tt,nt)}}var _baseMatches=baseMatches$2;function baseHasIn$2(tt,nt){return tt!=null&&nt in Object(tt)}var _baseHasIn=baseHasIn$2,castPath$3=_castPath,isArguments$1=isArguments_1,isArray$6=isArray_1,isIndex$2=_isIndex,isLength$1=isLength_1,toKey$4=_toKey;function hasPath$2(tt,nt,et){nt=castPath$3(nt,tt);for(var rt=-1,ot=nt.length,at=!1;++rt<ot;){var st=toKey$4(nt[rt]);if(!(at=tt!=null&&et(tt,st)))break;tt=tt[st]}return at||++rt!=ot?at:(ot=tt==null?0:tt.length,!!ot&&isLength$1(ot)&&isIndex$2(st,ot)&&(isArray$6(tt)||isArguments$1(tt)))}var _hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(tt,nt){return tt!=null&&hasPath$1(tt,nt,baseHasIn$1)}var hasIn_1=hasIn$3,baseIsEqual$2=_baseIsEqual,get$2=get_1,hasIn$2=hasIn_1,isKey$2=_isKey,isStrictComparable$1=_isStrictComparable,matchesStrictComparable$1=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG$6=1,COMPARE_UNORDERED_FLAG$4=2;function baseMatchesProperty$2(tt,nt){return isKey$2(tt)&&isStrictComparable$1(nt)?matchesStrictComparable$1(toKey$3(tt),nt):function(et){var rt=get$2(et,tt);return rt===void 0&&rt===nt?hasIn$2(et,tt):baseIsEqual$2(nt,rt,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(tt){return function(nt){return baseGet$3(nt,tt)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(tt){return isKey$1(tt)?baseProperty$1(toKey$2(tt)):basePropertyDeep$1(tt)}var property_1=property$2,baseMatches$1=_baseMatches,baseMatchesProperty$1=_baseMatchesProperty,identity$2=identity_1,isArray$5=isArray_1,property$1=property_1;function baseIteratee$5(tt){return typeof tt=="function"?tt:tt==null?identity$2:typeof tt=="object"?isArray$5(tt)?baseMatchesProperty$1(tt[0],tt[1]):baseMatches$1(tt):property$1(tt)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(tt,nt){return function(et,rt){if(et==null)return et;if(!isArrayLike$2(et))return tt(et,rt);for(var ot=et.length,at=nt?ot:-1,st=Object(et);(nt?at--:++at<ot)&&rt(st[at],at,st)!==!1;);return et}}var _createBaseEach=createBaseEach$2,baseForOwn$2=_baseForOwn,createBaseEach$1=_createBaseEach,baseEach$3=createBaseEach$1(baseForOwn$2),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$3(tt,nt){var et=-1,rt=isArrayLike$1(tt)?Array(tt.length):[];return baseEach$2(tt,function(ot,at,st){rt[++et]=nt(ot,at,st)}),rt}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(tt,nt){var et=isArray$4(tt)?arrayMap$3:baseMap$2;return et(tt,baseIteratee$4(nt))}var map_1=map$1;Object.defineProperty(flattenNames$1,"__esModule",{value:!0});flattenNames$1.flattenNames=void 0;var _isString2=isString_1,_isString3=_interopRequireDefault$7(_isString2),_forOwn2$2=forOwn_1,_forOwn3$2=_interopRequireDefault$7(_forOwn2$2),_isPlainObject2=isPlainObject_1,_isPlainObject3=_interopRequireDefault$7(_isPlainObject2),_map2=map_1,_map3=_interopRequireDefault$7(_map2);function _interopRequireDefault$7(tt){return tt&&tt.__esModule?tt:{default:tt}}var flattenNames=flattenNames$1.flattenNames=function tt(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=[];return(0,_map3.default)(nt,function(rt){Array.isArray(rt)?tt(rt).map(function(ot){return et.push(ot)}):(0,_isPlainObject3.default)(rt)?(0,_forOwn3$2.default)(rt,function(ot,at){ot===!0&&et.push(at),et.push(at+"-"+ot)}):(0,_isString3.default)(rt)&&et.push(rt)}),et};flattenNames$1.default=flattenNames;var mergeClasses$1={};Object.defineProperty(mergeClasses$1,"__esModule",{value:!0});mergeClasses$1.mergeClasses=void 0;var _forOwn2$1=forOwn_1,_forOwn3$1=_interopRequireDefault$6(_forOwn2$1),_cloneDeep2=cloneDeep_1,_cloneDeep3=_interopRequireDefault$6(_cloneDeep2),_extends$w=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$6(tt){return tt&&tt.__esModule?tt:{default:tt}}var mergeClasses=mergeClasses$1.mergeClasses=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],rt=nt.default&&(0,_cloneDeep3.default)(nt.default)||{};return et.map(function(ot){var at=nt[ot];return at&&(0,_forOwn3$1.default)(at,function(st,ut){rt[ut]||(rt[ut]={}),rt[ut]=_extends$w({},rt[ut],at[ut])}),ot}),rt};mergeClasses$1.default=mergeClasses;var autoprefix$1={};Object.defineProperty(autoprefix$1,"__esModule",{value:!0});autoprefix$1.autoprefix=void 0;var _forOwn2=forOwn_1,_forOwn3=_interopRequireDefault$5(_forOwn2),_extends$v=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$5(tt){return tt&&tt.__esModule?tt:{default:tt}}var transforms={borderRadius:function tt(nt){return{msBorderRadius:nt,MozBorderRadius:nt,OBorderRadius:nt,WebkitBorderRadius:nt,borderRadius:nt}},boxShadow:function tt(nt){return{msBoxShadow:nt,MozBoxShadow:nt,OBoxShadow:nt,WebkitBoxShadow:nt,boxShadow:nt}},userSelect:function tt(nt){return{WebkitTouchCallout:nt,KhtmlUserSelect:nt,MozUserSelect:nt,msUserSelect:nt,WebkitUserSelect:nt,userSelect:nt}},flex:function tt(nt){return{WebkitBoxFlex:nt,MozBoxFlex:nt,WebkitFlex:nt,msFlex:nt,flex:nt}},flexBasis:function tt(nt){return{WebkitFlexBasis:nt,flexBasis:nt}},justifyContent:function tt(nt){return{WebkitJustifyContent:nt,justifyContent:nt}},transition:function tt(nt){return{msTransition:nt,MozTransition:nt,OTransition:nt,WebkitTransition:nt,transition:nt}},transform:function tt(nt){return{msTransform:nt,MozTransform:nt,OTransform:nt,WebkitTransform:nt,transform:nt}},absolute:function tt(nt){var et=nt&&nt.split(" ");return{position:"absolute",top:et&&et[0],right:et&&et[1],bottom:et&&et[2],left:et&&et[3]}},extend:function tt(nt,et){var rt=et[nt];return rt||{extend:nt}}},autoprefix=autoprefix$1.autoprefix=function tt(nt){var et={};return(0,_forOwn3.default)(nt,function(rt,ot){var at={};(0,_forOwn3.default)(rt,function(st,ut){var ct=transforms[ut];ct?at=_extends$v({},at,ct(st)):at[ut]=st}),et[ot]=at}),et};autoprefix$1.default=autoprefix;var hover$1={};Object.defineProperty(hover$1,"__esModule",{value:!0});hover$1.hover=void 0;var _extends$u=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$f(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$f(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var hover=hover$1.hover=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$f(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$f(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$f(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={hover:!1},ut.handleMouseOver=function(){return ut.setState({hover:!0})},ut.handleMouseOut=function(){return ut.setState({hover:!1})},ut.render=function(){return _react2$3.default.createElement(et,{onMouseOver:ut.handleMouseOver,onMouseOut:ut.handleMouseOut},_react2$3.default.createElement(nt,_extends$u({},ut.props,ut.state)))},st),_possibleConstructorReturn$f(ut,ct)}return ot}(_react2$3.default.Component)};hover$1.default=hover;var active$1={};Object.defineProperty(active$1,"__esModule",{value:!0});active$1.active=void 0;var _extends$t=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$e(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$e(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var active=active$1.active=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$e(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$e(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$e(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={active:!1},ut.handleMouseDown=function(){return ut.setState({active:!0})},ut.handleMouseUp=function(){return ut.setState({active:!1})},ut.render=function(){return _react2$2.default.createElement(et,{onMouseDown:ut.handleMouseDown,onMouseUp:ut.handleMouseUp},_react2$2.default.createElement(nt,_extends$t({},ut.props,ut.state)))},st),_possibleConstructorReturn$e(ut,ct)}return ot}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function tt(nt,et){var rt={},ot=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;rt[st]=ut};return nt===0&&ot("first-child"),nt===et-1&&ot("last-child"),(nt===0||nt%2===0)&&ot("even"),Math.abs(nt%2)===1&&ot("odd"),ot("nth-child",nt),rt};loop.default=loopable;Object.defineProperty(lib$2,"__esModule",{value:!0});lib$2.ReactCSS=lib$2.loop=lib$2.handleActive=handleHover=lib$2.handleHover=lib$2.hover=void 0;var _flattenNames=flattenNames$1,_flattenNames2=_interopRequireDefault$2(_flattenNames),_mergeClasses=mergeClasses$1,_mergeClasses2=_interopRequireDefault$2(_mergeClasses),_autoprefix=autoprefix$1,_autoprefix2=_interopRequireDefault$2(_autoprefix),_hover2=hover$1,_hover3=_interopRequireDefault$2(_hover2),_active=active$1,_active2=_interopRequireDefault$2(_active),_loop2=loop,_loop3=_interopRequireDefault$2(_loop2);function _interopRequireDefault$2(tt){return tt&&tt.__esModule?tt:{default:tt}}lib$2.hover=_hover3.default;var handleHover=lib$2.handleHover=_hover3.default;lib$2.handleActive=_active2.default;lib$2.loop=_loop3.default;var ReactCSS=lib$2.ReactCSS=function tt(nt){for(var et=arguments.length,rt=Array(et>1?et-1:0),ot=1;ot<et;ot++)rt[ot-1]=arguments[ot];var at=(0,_flattenNames2.default)(rt),st=(0,_mergeClasses2.default)(nt,at);return(0,_autoprefix2.default)(st)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function tt(nt,et,rt,ot,at){var st=at.clientWidth,ut=at.clientHeight,ct=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,pt=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,dt=ct-(at.getBoundingClientRect().left+window.pageXOffset),ft=pt-(at.getBoundingClientRect().top+window.pageYOffset);if(rt==="vertical"){var bt=void 0;if(ft<0?bt=0:ft>ut?bt=1:bt=Math.round(ft*100/ut)/100,et.a!==bt)return{h:et.h,s:et.s,l:et.l,a:bt,source:"rgb"}}else{var ht=void 0;if(dt<0?ht=0:dt>st?ht=1:ht=Math.round(dt*100/st)/100,ot!==ht)return{h:et.h,s:et.s,l:et.l,a:ht,source:"rgb"}}return null},checkboardCache={},render=function tt(nt,et,rt,ot){if(typeof document>"u"&&!ot)return null;var at=ot?new ot:document.createElement("canvas");at.width=rt*2,at.height=rt*2;var st=at.getContext("2d");return st?(st.fillStyle=nt,st.fillRect(0,0,at.width,at.height),st.fillStyle=et,st.fillRect(0,0,rt,rt),st.translate(rt,rt),st.fillRect(0,0,rt,rt),at.toDataURL()):null},get$1=function tt(nt,et,rt,ot){var at=nt+"-"+et+"-"+rt+(ot?"-server":"");if(checkboardCache[at])return checkboardCache[at];var st=render(nt,et,rt,ot);return checkboardCache[at]=st,st},_extends$s=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},Checkboard=function tt(nt){var et=nt.white,rt=nt.grey,ot=nt.size,at=nt.renderers,st=nt.borderRadius,ut=nt.boxShadow,ct=nt.children,pt=_default$2({default:{grid:{borderRadius:st,boxShadow:ut,absolute:"0px 0px 0px 0px",background:"url("+get$1(et,rt,ot,at.canvas)+") center left"}}});return reactExports.isValidElement(ct)?React$1.cloneElement(ct,_extends$s({},ct.props,{style:_extends$s({},ct.props.style,pt.grid)})):React$1.createElement("div",{style:pt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_createClass$d=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$d(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$d(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Alpha=function(tt){_inherits$d(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$d(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$d(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$2(pt,ot.props.hsl,ot.props.direction,ot.props.a,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},ot.unbindEventListeners=function(){window.removeEventListener("mousemove",ot.handleChange),window.removeEventListener("mouseup",ot.handleMouseUp)},rt),_possibleConstructorReturn$d(ot,at)}return _createClass$d(nt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var rt=this,ot=this.props.rgb,at=_default$2({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
|
684
684
|
rgba(`+ot.r+","+ot.g+","+ot.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:ot.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
|
685
685
|
rgba(`+ot.r+","+ot.g+","+ot.b+", 1) 100%)"},pointer:{left:0,top:ot.a*100+"%"}},overwrite:_extends$r({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return React$1.createElement("div",{style:at.alpha},React$1.createElement("div",{style:at.checkboard},React$1.createElement(Checkboard,{renderers:this.props.renderers})),React$1.createElement("div",{style:at.gradient}),React$1.createElement("div",{style:at.container,ref:function(ut){return rt.container=ut},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("div",{style:at.pointer},this.props.pointer?React$1.createElement(this.props.pointer,this.props):React$1.createElement("div",{style:at.slider}))))}}]),nt}(reactExports.PureComponent||reactExports.Component),_createClass$c=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _defineProperty$d(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function _classCallCheck$c(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$c(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$c(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var DEFAULT_ARROW_OFFSET=1,UP_KEY_CODE=38,DOWN_KEY_CODE=40,VALID_KEY_CODES=[UP_KEY_CODE,DOWN_KEY_CODE],isValidKeyCode=function tt(nt){return VALID_KEY_CODES.indexOf(nt)>-1},getNumberValue=function tt(nt){return Number(String(nt).replace(/%/g,""))},idCounter=1,EditableInput=function(tt){_inherits$c(nt,tt);function nt(et){_classCallCheck$c(this,nt);var rt=_possibleConstructorReturn$c(this,(nt.__proto__||Object.getPrototypeOf(nt)).call(this));return rt.handleBlur=function(){rt.state.blurValue&&rt.setState({value:rt.state.blurValue,blurValue:null})},rt.handleChange=function(ot){rt.setUpdatedValue(ot.target.value,ot)},rt.handleKeyDown=function(ot){var at=getNumberValue(ot.target.value);if(!isNaN(at)&&isValidKeyCode(ot.keyCode)){var st=rt.getArrowOffset(),ut=ot.keyCode===UP_KEY_CODE?at+st:at-st;rt.setUpdatedValue(ut,ot)}},rt.handleDrag=function(ot){if(rt.props.dragLabel){var at=Math.round(rt.props.value+ot.movementX);at>=0&&at<=rt.props.dragMax&&rt.props.onChange&&rt.props.onChange(rt.getValueObjectWithLabel(at),ot)}},rt.handleMouseDown=function(ot){rt.props.dragLabel&&(ot.preventDefault(),rt.handleDrag(ot),window.addEventListener("mousemove",rt.handleDrag),window.addEventListener("mouseup",rt.handleMouseUp))},rt.handleMouseUp=function(){rt.unbindEventListeners()},rt.unbindEventListeners=function(){window.removeEventListener("mousemove",rt.handleDrag),window.removeEventListener("mouseup",rt.handleMouseUp)},rt.state={value:String(et.value).toUpperCase(),blurValue:String(et.value).toUpperCase()},rt.inputId="rc-editable-input-"+idCounter++,rt}return _createClass$c(nt,[{key:"componentDidUpdate",value:function(rt,ot){this.props.value!==this.state.value&&(rt.value!==this.props.value||ot.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(rt){return _defineProperty$d({},this.props.label,rt)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||DEFAULT_ARROW_OFFSET}},{key:"setUpdatedValue",value:function(rt,ot){var at=this.props.label?this.getValueObjectWithLabel(rt):rt;this.props.onChange&&this.props.onChange(at,ot),this.setState({value:rt})}},{key:"render",value:function(){var rt=this,ot=_default$2({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return React$1.createElement("div",{style:ot.wrap},React$1.createElement("input",{id:this.inputId,style:ot.input,ref:function(st){return rt.input=st},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?React$1.createElement("label",{htmlFor:this.inputId,style:ot.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),nt}(reactExports.PureComponent||reactExports.Component),calculateChange$1=function tt(nt,et,rt,ot){var at=ot.clientWidth,st=ot.clientHeight,ut=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,ct=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,pt=ut-(ot.getBoundingClientRect().left+window.pageXOffset),dt=ct-(ot.getBoundingClientRect().top+window.pageYOffset);if(et==="vertical"){var ft=void 0;if(dt<0)ft=359;else if(dt>st)ft=0;else{var bt=-(dt*100/st)+100;ft=360*bt/100}if(rt.h!==ft)return{h:ft,s:rt.s,l:rt.l,a:rt.a,source:"hsl"}}else{var ht=void 0;if(pt<0)ht=0;else if(pt>at)ht=359;else{var Mt=pt*100/at;ht=360*Mt/100}if(rt.h!==ht)return{h:ht,s:rt.s,l:rt.l,a:rt.a,source:"hsl"}}return null},_createClass$b=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$b(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$b(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$b(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Hue=function(tt){_inherits$b(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$b(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$b(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$1(pt,ot.props.direction,ot.props.hsl,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},rt),_possibleConstructorReturn$b(ot,at)}return _createClass$b(nt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var rt=this,ot=this.props.direction,at=ot===void 0?"horizontal":ot,st=_default$2({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:at==="vertical"});return React$1.createElement("div",{style:st.hue},React$1.createElement("div",{className:"hue-"+at,style:st.container,ref:function(ct){return rt.container=ct},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("style",null,`
|
686
686
|
.hue-horizontal {
|
@@ -721,7 +721,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
721
721
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$3(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$3(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$3(tt,nt)}}function _iterableToArray(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles(tt){if(Array.isArray(tt))return _arrayLikeToArray$3(tt)}function _arrayLikeToArray$3(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _classCallCheck(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _defineProperties(tt,nt){for(var et=0;et<nt.length;et++){var rt=nt[et];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(tt,rt.key,rt)}}function _createClass(tt,nt,et){return nt&&_defineProperties(tt.prototype,nt),Object.defineProperty(tt,"prototype",{writable:!1}),tt}function _inherits(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function");tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,writable:!0,configurable:!0}}),Object.defineProperty(tt,"prototype",{writable:!1}),nt&&_setPrototypeOf(tt,nt)}function _setPrototypeOf(tt,nt){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf(tt,nt)}function _createSuper(tt){var nt=_isNativeReflectConstruct();return function(){var rt=_getPrototypeOf(tt),ot;if(nt){var at=_getPrototypeOf(this).constructor;ot=Reflect.construct(rt,arguments,at)}else ot=rt.apply(this,arguments);return _possibleConstructorReturn(this,ot)}}function _possibleConstructorReturn(tt,nt){if(nt&&(_typeof$1(nt)==="object"||typeof nt=="function"))return nt;if(nt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(tt)}function _assertThisInitialized(tt){if(tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}function _isNativeReflectConstruct(){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(tt){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf(tt)}function _defineProperty$3(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function Noop(){return null}var isClick=function tt(nt){return nt.type==="click"},isLeftClick=function tt(nt){return nt.button!==null&&nt.button!==void 0&&nt.button===0},containsNode=function tt(nt,et){if(typeof document<"u")return et&&nt&&nt.contains(et)};function isInteractive(tt,nt){if(tt instanceof Element)for(var et=tt;et&&et!==nt;){var rt=et.getAttribute("role");if(rt==="button"||rt==="link")return!0;et.tagName&&(et=et.parentElement)}return!1}var Select$1=function(tt){_inherits(et,tt);var nt=_createSuper(et);function et(rt){var ot;return _classCallCheck(this,et),ot=nt.call(this,rt),_defineProperty$3(_assertThisInitialized(ot),"anchor",reactExports.createRef()),_defineProperty$3(_assertThisInitialized(ot),"dropdown",reactExports.createRef()),_defineProperty$3(_assertThisInitialized(ot),"input",void 0),_defineProperty$3(_assertThisInitialized(ot),"dragging",void 0),_defineProperty$3(_assertThisInitialized(ot),"focusAfterClear",void 0),_defineProperty$3(_assertThisInitialized(ot),"openAfterFocus",void 0),_defineProperty$3(_assertThisInitialized(ot),"justSelected",void 0),_defineProperty$3(_assertThisInitialized(ot),"options",[]),_defineProperty$3(_assertThisInitialized(ot),"state",{activeDescendant:null,inputValue:"",isFocused:!1,isOpen:ot.props.startOpen,isPseudoFocused:!1}),_defineProperty$3(_assertThisInitialized(ot),"isItMounted",!1),_defineProperty$3(_assertThisInitialized(ot),"handleTouchOutside",function(at){containsNode(ot.dropdown.current,at.target)||containsNode(ot.anchor.current,at.target)||ot.closeMenu()}),_defineProperty$3(_assertThisInitialized(ot),"handleTouchMove",function(){return ot.dragging=!0}),_defineProperty$3(_assertThisInitialized(ot),"handleTouchStart",function(){return ot.dragging=!1}),_defineProperty$3(_assertThisInitialized(ot),"handleTouchEnd",function(at){ot.dragging||ot.handleClick(at)}),_defineProperty$3(_assertThisInitialized(ot),"handleClick",function(at){if(!(ot.props.disabled||!isClick(at)&&!isLeftClick(at))){if(at.target===ot.input){ot.state.isFocused||(ot.openAfterFocus=ot.props.openOnClick,ot.focus()),ot.state.isOpen||ot.setState({isOpen:!0,isFocused:!0,isPseudoFocused:!1});return}if(!(ot.input&&isInteractive(at.target,ot.input))){if(!ot.props.searchable){ot.focus(),ot.state.isOpen?ot.setState({isOpen:!1,isFocused:!1}):ot.setState({isOpen:!0,isFocused:!0});return}ot.state.isFocused?(ot.focus(),ot.input&&(ot.input.value=""),ot.setState(function(st){return{isOpen:!ot.focusAfterClear&&!st.isOpen,isPseudoFocused:!1}}),ot.focusAfterClear=!1):(ot.focusAfterClear=!1,ot.openAfterFocus=ot.props.openOnClick,ot.focus())}}}),_defineProperty$3(_assertThisInitialized(ot),"handleInputFocus",function(at){if(!ot.props.disabled){ot.props.onFocus&&ot.props.onFocus(at);var st=ot.state.isOpen||ot.openAfterFocus;st=!ot.focusAfterClear&&st,ot.setState({isFocused:!0,isOpen:!!st}),ot.focusAfterClear=!1,ot.openAfterFocus=!1}}),_defineProperty$3(_assertThisInitialized(ot),"handleBlur",function(at){if(at.relatedTarget){if(containsNode(ot.anchor.current,at.relatedTarget)||containsNode(ot.dropdown.current,at.relatedTarget))return}else if(containsNode(ot.anchor.current,at.target))return;ot.props.onBlur&&ot.props.onBlur(at),ot.isItMounted&&ot.setState({isFocused:!1,isOpen:!1,isPseudoFocused:!1,inputValue:ot.props.onBlurResetsInput?"":ot.state.inputValue})}),_defineProperty$3(_assertThisInitialized(ot),"handleClickOutside",function(at){if(ot.justSelected){ot.justSelected=!1;return}if(!containsNode(ot.dropdown.current,at.target)){var st=ot.state.isFocused||ot.state.isPseudoFocused;st&&!containsNode(ot.anchor.current,at.target)&&ot.handleBlur(at)}}),_defineProperty$3(_assertThisInitialized(ot),"handleInputChange",function(at){var st=at.target.value;ot.setState({inputValue:st,isOpen:!0,isPseudoFocused:!1}),ot.props.onInputChange&&ot.props.onInputChange(at)}),_defineProperty$3(_assertThisInitialized(ot),"handleKeyDown",function(at){if(!ot.props.disabled)switch(at.keyCode){case 8:!ot.state.inputValue&&ot.props.backspaceRemoves&&(at.preventDefault(),ot.backspaceValue());break;case 9:ot.setState(function(st){return{isPseudoFocused:!1,isFocused:!1,isOpen:!1,inputValue:!ot.props.onCloseResetsInput||!ot.props.onBlurResetsInput?st.inputValue:""}});break;case 27:!ot.state.isOpen&&ot.props.clearable&&ot.props.escapeClearsValue&&(ot.clearValue(at),ot.setState({isFocused:!1,isPseudoFocused:!1}));break;case 32:if(ot.props.searchable)break;at.preventDefault(),ot.state.isOpen||ot.setState({isOpen:!0});break;case 38:at.preventDefault(),ot.state.isOpen||ot.setState({isOpen:!0});break;case 40:at.preventDefault(),ot.state.isOpen||ot.setState({isOpen:!0});break;case 33:at.preventDefault(),ot.state.isOpen||ot.setState({isOpen:!0});break;case 34:at.preventDefault(),ot.state.isOpen||ot.setState({isOpen:!0});break;case 35:if(at.shiftKey)break;at.preventDefault(),ot.state.isOpen||ot.setState({isOpen:!0});break;case 36:if(at.shiftKey)break;at.preventDefault(),ot.state.isOpen||ot.setState({isOpen:!0});break;case 46:!ot.state.inputValue&&ot.props.deleteRemoves&&(at.preventDefault(),ot.popValue());break}}),_defineProperty$3(_assertThisInitialized(ot),"getOptionLabel",function(at,st){var ut=st.option;return ut.isCreatable?"".concat(at.select.create," “").concat(ut[ot.props.labelKey],"”"):ut[ot.props.labelKey]}),_defineProperty$3(_assertThisInitialized(ot),"getValueLabel",function(at){var st=at.option;return st[ot.props.labelKey]}),_defineProperty$3(_assertThisInitialized(ot),"handleActiveDescendantChange",function(at){at?ot.setState({activeDescendant:at}):ot.setState({activeDescendant:null})}),_defineProperty$3(_assertThisInitialized(ot),"handleInputRef",function(at){ot.input=at,typeof ot.props.inputRef=="function"?ot.props.inputRef(at):ot.props.inputRef&&(ot.props.inputRef.current=at),ot.props.controlRef&&typeof ot.props.controlRef=="function"&&ot.props.controlRef(at)}),_defineProperty$3(_assertThisInitialized(ot),"selectValue",function(at){var st=at.item;if(!st.disabled){ot.justSelected=!0;var ut=ot.props.onSelectResetsInput?"":ot.state.inputValue;ot.props.multi?ot.setState({inputValue:ut,isOpen:!ot.props.closeOnSelect},function(){var ct=ot.props.value;ct.some(function(pt){return pt[ot.props.valueKey]===st[ot.props.valueKey]})?ot.removeValue(st):ot.addValue(st)}):(ot.focus(),ot.setState({inputValue:ut,isOpen:!ot.props.closeOnSelect,isFocused:!0,isPseudoFocused:!1},function(){ot.setValue([st],st,STATE_CHANGE_TYPE.select)}))}}),_defineProperty$3(_assertThisInitialized(ot),"addValue",function(at){var st=_toConsumableArray(ot.props.value);ot.setValue(st.concat(at),at,STATE_CHANGE_TYPE.select)}),_defineProperty$3(_assertThisInitialized(ot),"backspaceValue",function(){var at=ot.popValue();if(at){var st=ot.props.value.length,ut=ot.props.getValueLabel||ot.getValueLabel,ct=ut({option:at,index:st-1});if(!ot.props.backspaceClearsInputValue&&typeof ct=="string"){var pt=ct.slice(0,-1);ot.setState({inputValue:pt,isOpen:!0})}}}),_defineProperty$3(_assertThisInitialized(ot),"popValue",function(){var at=_toConsumableArray(ot.props.value),st=at.length;if(st&&at[st-1].clearableValue!==!1){var ut=at.pop();return ot.setValue(at,ut,STATE_CHANGE_TYPE.remove),ut}}),_defineProperty$3(_assertThisInitialized(ot),"removeValue",function(at){var st=_toConsumableArray(ot.props.value);ot.setValue(st.filter(function(ut){return ut[ot.props.valueKey]!==at[ot.props.valueKey]}),at,STATE_CHANGE_TYPE.remove),ot.focus()}),_defineProperty$3(_assertThisInitialized(ot),"clearValue",function(at){if(!(isClick(at)&&!isLeftClick(at))){if(ot.props.value){var st=ot.props.value.filter(function(ut){return ut.clearableValue===!1});ot.setValue(st,null,STATE_CHANGE_TYPE.clear)}ot.setState({inputValue:"",isOpen:!1}),ot.focus(),ot.focusAfterClear=!0}}),_defineProperty$3(_assertThisInitialized(ot),"shouldShowPlaceholder",function(){return!(ot.state.inputValue||ot.props.value&&ot.props.value.length)}),_defineProperty$3(_assertThisInitialized(ot),"shouldShowValue",function(){return!ot.state.inputValue}),ot.options=normalizeOptions(rt.options),ot}return _createClass(et,[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.focus(),this.isItMounted=!0;var ot=this.props.controlRef;ot&&typeof ot!="function"&&(ot.current={setDropdownOpen:this.handleDropdownOpen.bind(this),setInputValue:this.handleSetInputValue.bind(this),setInputFocus:this.handleSetInputFocus.bind(this),setInputBlur:this.handleSetInputBlur.bind(this),focus:this.handleSetInputFocus.bind(this),blur:this.handleSetInputBlur.bind(this)})}},{key:"componentDidUpdate",value:function(ot,at){var st=this;typeof document<"u"&&(at.isOpen!==this.state.isOpen&&(this.state.isOpen?(this.props.onOpen&&this.props.onOpen(),document.addEventListener("touchstart",this.handleTouchOutside)):(this.props.onClose&&this.props.onClose(),document.removeEventListener("touchstart",this.handleTouchOutside))),!at.isFocused&&this.state.isFocused&&setTimeout(function(){return document.addEventListener("click",st.handleClickOutside)},0))}},{key:"componentWillUnmount",value:function(){typeof document<"u"&&(document.removeEventListener("touchstart",this.handleTouchOutside),document.removeEventListener("click",this.handleClickOutside)),this.isItMounted=!1}},{key:"focus",value:function(){this.input&&this.input.focus()}},{key:"handleDropdownOpen",value:function(ot){this.setState({isOpen:ot})}},{key:"handleSetInputValue",value:function(ot){this.setState({inputValue:ot})}},{key:"handleSetInputFocus",value:function(){this.input.focus()}},{key:"handleSetInputBlur",value:function(){this.input.blur()}},{key:"closeMenu",value:function(){this.props.onCloseResetsInput?this.setState({inputValue:"",isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}):this.setState({isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi})}},{key:"getValueArray",value:function(ot){var at=this;if(!Array.isArray(ot)){if(ot==null)return[];ot=[ot]}return ot.map(function(st){return expandValue(st,at.props)})}},{key:"setValue",value:function(ot,at,st){this.props.onChange&&this.props.onChange({value:ot,option:at,type:st})}},{key:"renderLoading",value:function(){if(this.props.isLoading){var ot=this.props.overrides,at=ot===void 0?{}:ot,st=getOverrides(at.LoadingIndicator,StyledLoadingIndicator),ut=_slicedToArray$3(st,2),ct=ut[0],pt=ut[1];return reactExports.createElement(ct,_extends$5({role:"status"},pt),reactExports.createElement("span",{style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Loading"))}}},{key:"renderValue",value:function(ot){var at=this,st=this.props.overrides,ut=st===void 0?{}:st,ct=this.getSharedProps(),pt=this.props.getValueLabel||this.getValueLabel,dt=this.props.valueComponent||Noop;if(!ot.length)return null;if(this.props.multi)return ot.map(function(ft,bt){var ht=ct.$disabled||ft.clearableValue===!1;return reactExports.createElement(dt,_extends$5({value:ft,key:"value-".concat(bt,"-").concat(ft[at.props.valueKey]),removeValue:function(){return at.removeValue(ft)},disabled:ht,overrides:{Tag:ut.Tag,MultiValue:ut.MultiValue}},ct,{$disabled:ht}),pt({option:ft,index:bt}))});if(this.shouldShowValue())return reactExports.createElement(dt,_extends$5({value:ot[0][this.props.valueKey],disabled:this.props.disabled,overrides:{SingleValue:ut.SingleValue}},ct),pt({option:ot[0]}))}},{key:"renderInput",value:function(ot){var at=this,st=this.props.overrides,ut=st===void 0?{}:st,ct=getOverrides(ut.InputContainer,StyledInputContainer),pt=_slicedToArray$3(ct,2),dt=pt[0],ft=pt[1],bt=this.getSharedProps(),ht=this.state.isOpen,Mt=this.getValueArray(this.props.value).map(function(zt){return zt[at.props.labelKey]}).join(", "),mt=Mt.length?"Selected ".concat(Mt,". "):"",Ot="".concat(mt).concat(this.props["aria-label"]||"");return this.props.searchable?reactExports.createElement(dt,_extends$5({},bt,ft),reactExports.createElement(AutosizeInput,_extends$5({"aria-activedescendant":this.state.activeDescendant,"aria-autocomplete":"list","aria-controls":this.state.isOpen?ot:null,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-disabled":this.props.disabled||null,"aria-expanded":ht,"aria-haspopup":"listbox","aria-label":Ot,"aria-labelledby":this.props["aria-labelledby"],"aria-required":this.props.required||null,disabled:this.props.disabled||null,id:this.props.id||null,inputRef:this.handleInputRef,onChange:this.handleInputChange,onFocus:this.handleInputFocus,overrides:{Input:ut.Input},required:this.props.required&&!this.props.value.length||null,role:"combobox",value:this.state.inputValue,tabIndex:0},bt))):reactExports.createElement(dt,_extends$5({"aria-activedescendant":this.state.activeDescendant,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-disabled":this.props.disabled,"aria-labelledby":this.props["aria-labelledby"],"aria-owns":this.state.isOpen?ot:null,"aria-required":this.props.required||null,onFocus:this.handleInputFocus,tabIndex:0},bt,ft),reactExports.createElement("input",_extends$5({"aria-hidden":!0,id:this.props.id||null,ref:this.handleInputRef,style:{opacity:0,width:0,overflow:"hidden",border:"none",padding:0},tabIndex:-1},ut.Input?ut.Input.props?ut.Input.props:{}:{})))}},{key:"renderClear",value:function(){var ot,at=!!(this.props.value&&this.props.value.length||this.state.inputValue);if(!(!this.props.clearable||this.props.disabled||this.props.isLoading||!at)){var st=this.getSharedProps();st.$size;var ut=_objectWithoutProperties$3(st,_excluded$3),ct=this.props.overrides,pt=ct===void 0?{}:ct,dt=getOverrides(pt.ClearIcon,DeleteAlt$1),ft=_slicedToArray$3(dt,2),bt=ft[0],ht=ft[1],Mt=this.props.multi?"Clear all":"Clear value",mt=(ot={},_defineProperty$3(ot,SIZE$1.mini,15),_defineProperty$3(ot,SIZE$1.compact,15),_defineProperty$3(ot,SIZE$1.default,18),_defineProperty$3(ot,SIZE$1.large,22),ot);return reactExports.createElement(bt,_extends$5({title:Mt,"aria-label":Mt,onClick:this.clearValue,role:"button",size:mt[this.props.size]||mt[SIZE$1.default]},ut,ht))}}},{key:"renderArrow",value:function(){var ot;if(this.props.type!==TYPE.select)return null;var at=this.getSharedProps();at.$size;var st=_objectWithoutProperties$3(at,_excluded2$1),ut=this.props.overrides,ct=ut===void 0?{}:ut,pt=getOverrides(ct.SelectArrow,TriangleDownIcon),dt=_slicedToArray$3(pt,2),ft=dt[0],bt=dt[1];bt.overrides=mergeOverrides({Svg:{style:function(mt){var Ot=mt.$theme,zt=mt.$disabled;return{color:zt?Ot.colors.inputTextDisabled:Ot.colors.contentPrimary}}}},bt.overrides);var ht=(ot={},_defineProperty$3(ot,SIZE$1.mini,16),_defineProperty$3(ot,SIZE$1.compact,16),_defineProperty$3(ot,SIZE$1.default,20),_defineProperty$3(ot,SIZE$1.large,24),ot);return reactExports.createElement(ft,_extends$5({size:ht[this.props.size]||ht[SIZE$1.default],title:"open"},st,bt))}},{key:"renderSearch",value:function(){if(this.props.type!==TYPE.search)return null;var ot=this.props.overrides,at=ot===void 0?{}:ot,st=getOverrides(at.SearchIconContainer,StyledSearchIconContainer),ut=_slicedToArray$3(st,2),ct=ut[0],pt=ut[1],dt=getOverrides(at.SearchIcon,SearchIconComponent),ft=_slicedToArray$3(dt,2),bt=ft[0],ht=ft[1],Mt=this.getSharedProps();return reactExports.createElement(ct,_extends$5({},Mt,pt),reactExports.createElement(bt,_extends$5({size:16,title:"search"},Mt,ht)))}},{key:"filterOptions",value:function(ot){var at=this,st=this.state.inputValue.trim();this.props.filterOptions&&(this.options=this.props.filterOptions(this.options,st,ot,{valueKey:this.props.valueKey,labelKey:this.props.labelKey}));var ut=this.props.ignoreCase?function(pt){return pt[at.props.labelKey].toLowerCase()!==st.toLowerCase().trim()}:function(pt){return pt[at.props.labelKey]!==st.trim()};if(st&&this.props.creatable&&this.options.concat(this.props.value).every(ut)){var ct;this.options.push((ct={id:st},_defineProperty$3(ct,this.props.labelKey,st),_defineProperty$3(ct,this.props.valueKey,st),_defineProperty$3(ct,"isCreatable",!0),ct))}return this.options}},{key:"getSharedProps",value:function(){var ot=this.props,at=ot.clearable,st=ot.creatable,ut=ot.disabled,ct=ot.error,pt=ot.positive,dt=ot.isLoading,ft=ot.multi,bt=ot.required,ht=ot.size,Mt=ot.searchable,mt=ot.type,Ot=ot.value,zt=this.state,yt=zt.isOpen,vt=zt.isFocused,At=zt.isPseudoFocused;return{$clearable:at,$creatable:st,$disabled:ut,$error:ct,$positive:pt,$isFocused:vt,$isLoading:dt,$isOpen:yt,$isPseudoFocused:At,$multi:ft,$required:bt,$searchable:Mt,$size:ht,$type:mt,$isEmpty:!this.getValueArray(Ot).length}}},{key:"render",value:function(){var ot=this;this.options=normalizeOptions(this.props.options);var at=this.props,st=at.overrides,ut=st===void 0?{}:st,ct=at.type,pt=at.multi,dt=at.noResultsMsg,ft=at.value,bt=at.filterOutSelected,ht=getOverrides(ut.Root,StyledRoot),Mt=_slicedToArray$3(ht,2),mt=Mt[0],Ot=Mt[1],zt=getOverrides(ut.ControlContainer,StyledControlContainer),yt=_slicedToArray$3(zt,2),vt=yt[0],At=yt[1],St=getOverrides(ut.ValueContainer,StyledValueContainer),Et=_slicedToArray$3(St,2),Tt=Et[0],Rt=Et[1],Ct=getOverrides(ut.IconsContainer,StyledIconsContainer),wt=_slicedToArray$3(Ct,2),Lt=wt[0],Ht=wt[1],jt=getOverrides(ut.Popover,Popover$1),s0=_slicedToArray$3(jt,2),Ut=s0[0],Yt=s0[1],O0=getOverrides(ut.Placeholder,StyledPlaceholder),a0=_slicedToArray$3(O0,2),b0=a0[0],kt=a0[1],o0=this.getSharedProps(),qt=this.getValueArray(ft),Dt=this.filterOptions(pt&&bt?qt:null),Bt=this.state.isOpen;return o0.$isOpen=Bt,reactExports.createElement(UIDConsumer,null,function(p0){return reactExports.createElement(LocaleContext.Consumer,null,function(r0){return reactExports.createElement(Ut,_extends$5({innerRef:function(f0){f0&&(ot.anchor=f0.anchorRef)},accessibilityType:ACCESSIBILITY_TYPE.none,autoFocus:!1,focusLock:!1,mountNode:ot.props.mountNode,onEsc:function(){return ot.closeMenu()},isOpen:Bt,popoverMargin:0,content:function(){var f0={error:ot.props.error,positive:ot.props.positive,getOptionLabel:ot.props.getOptionLabel||ot.getOptionLabel.bind(ot,r0),id:p0,isLoading:ot.props.isLoading,labelKey:ot.props.labelKey,maxDropdownHeight:ot.props.maxDropdownHeight,multi:pt,noResultsMsg:dt,onActiveDescendantChange:ot.handleActiveDescendantChange,onItemSelect:ot.selectValue,options:Dt,overrides:ut,required:ot.props.required,searchable:ot.props.searchable,size:ot.props.size,type:ct,value:qt,valueKey:ot.props.valueKey,width:ot.anchor.current?ot.anchor.current.clientWidth:null,keyboardControlNode:ot.anchor};return reactExports.createElement(SelectDropdown,_extends$5({innerRef:ot.dropdown},f0))},placement:PLACEMENT.bottom},Yt),reactExports.createElement(mt,_extends$5({onBlur:ot.handleBlur,"data-baseweb":"select"},o0,Ot),reactExports.createElement(vt,_extends$5({onKeyDown:ot.handleKeyDown,onClick:ot.handleClick,onTouchEnd:ot.handleTouchEnd,onTouchMove:ot.handleTouchMove,onTouchStart:ot.handleTouchStart},o0,At),ct===TYPE.search?ot.renderSearch():null,reactExports.createElement(Tt,_extends$5({},o0,Rt),ot.renderValue(qt),ot.renderInput(p0),ot.shouldShowPlaceholder()?reactExports.createElement(b0,_extends$5({},o0,kt),typeof ot.props.placeholder<"u"?ot.props.placeholder:r0.select.placeholder):null),reactExports.createElement(Lt,_extends$5({},o0,Ht),ot.renderLoading(),ot.renderClear(),ct===TYPE.select?ot.renderArrow():null))))})})}}]),et}(reactExports.Component);_defineProperty$3(Select$1,"defaultProps",defaultProps);var tint$1={exports:{}},_curry={exports:{}};(function(tt,nt){nt.__esModule=!0,nt.default=rt;function et(ot,at,st){return function(){var ct=st.concat(Array.prototype.slice.call(arguments));return ct.length>=at?ot.apply(this,ct):et(ot,at,ct)}}function rt(ot){return et(ot,ot.length,[])}tt.exports=nt.default})(_curry,_curry.exports);var _curryExports=_curry.exports,mix={exports:{}},rgba={exports:{}},parseToRgb={exports:{}},_hslToRgb={exports:{}};(function(tt,nt){nt.__esModule=!0,nt.default=void 0;function et(st){return Math.round(st*255)}function rt(st,ut,ct){return et(st)+","+et(ut)+","+et(ct)}function ot(st,ut,ct,pt){if(pt===void 0&&(pt=rt),ut===0)return pt(ct,ct,ct);var dt=(st%360+360)%360/60,ft=(1-Math.abs(2*ct-1))*ut,bt=ft*(1-Math.abs(dt%2-1)),ht=0,Mt=0,mt=0;dt>=0&&dt<1?(ht=ft,Mt=bt):dt>=1&&dt<2?(ht=bt,Mt=ft):dt>=2&&dt<3?(Mt=ft,mt=bt):dt>=3&&dt<4?(Mt=bt,mt=ft):dt>=4&&dt<5?(ht=bt,mt=ft):dt>=5&&dt<6&&(ht=ft,mt=bt);var Ot=ct-ft/2,zt=ht+Ot,yt=Mt+Ot,vt=mt+Ot;return pt(zt,yt,vt)}var at=ot;nt.default=at,tt.exports=nt.default})(_hslToRgb,_hslToRgb.exports);var _hslToRgbExports=_hslToRgb.exports,_nameToHex={exports:{}};(function(tt,nt){nt.__esModule=!0,nt.default=void 0;var et={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function rt(at){if(typeof at!="string")return at;var st=at.toLowerCase();return et[st]?"#"+et[st]:at}var ot=rt;nt.default=ot,tt.exports=nt.default})(_nameToHex,_nameToHex.exports);var _nameToHexExports=_nameToHex.exports,_errors={exports:{}};(function(tt,nt){nt.__esModule=!0,nt.default=void 0;function et(ft){if(ft===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ft}function rt(ft,bt){ft.prototype=Object.create(bt.prototype),ft.prototype.constructor=ft,ct(ft,bt)}function ot(ft){var bt=typeof Map=="function"?new Map:void 0;return ot=function(Mt){if(Mt===null||!ut(Mt))return Mt;if(typeof Mt!="function")throw new TypeError("Super expression must either be null or a function");if(typeof bt<"u"){if(bt.has(Mt))return bt.get(Mt);bt.set(Mt,mt)}function mt(){return at(Mt,arguments,pt(this).constructor)}return mt.prototype=Object.create(Mt.prototype,{constructor:{value:mt,enumerable:!1,writable:!0,configurable:!0}}),ct(mt,Mt)},ot(ft)}function at(ft,bt,ht){return st()?at=Reflect.construct:at=function(mt,Ot,zt){var yt=[null];yt.push.apply(yt,Ot);var vt=Function.bind.apply(mt,yt),At=new vt;return zt&&ct(At,zt.prototype),At},at.apply(null,arguments)}function st(){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 ut(ft){return Function.toString.call(ft).indexOf("[native code]")!==-1}function ct(ft,bt){return ct=Object.setPrototypeOf||function(Mt,mt){return Mt.__proto__=mt,Mt},ct(ft,bt)}function pt(ft){return pt=Object.setPrototypeOf?Object.getPrototypeOf:function(ht){return ht.__proto__||Object.getPrototypeOf(ht)},pt(ft)}var dt=function(ft){rt(bt,ft);function bt(ht){var Mt;return Mt=ft.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+ht+" for more information.")||this,et(Mt)}return bt}(ot(Error));nt.default=dt,tt.exports=nt.default})(_errors,_errors.exports);var _errorsExports=_errors.exports;(function(tt,nt){nt.__esModule=!0,nt.default=Mt;var et=at(_hslToRgbExports),rt=at(_nameToHexExports),ot=at(_errorsExports);function at(mt){return mt&&mt.__esModule?mt:{default:mt}}var st=/^#[a-fA-F0-9]{6}$/,ut=/^#[a-fA-F0-9]{8}$/,ct=/^#[a-fA-F0-9]{3}$/,pt=/^#[a-fA-F0-9]{4}$/,dt=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,ft=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,bt=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,ht=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function Mt(mt){if(typeof mt!="string")throw new ot.default(3);var Ot=(0,rt.default)(mt);if(Ot.match(st))return{red:parseInt(""+Ot[1]+Ot[2],16),green:parseInt(""+Ot[3]+Ot[4],16),blue:parseInt(""+Ot[5]+Ot[6],16)};if(Ot.match(ut)){var zt=parseFloat((parseInt(""+Ot[7]+Ot[8],16)/255).toFixed(2));return{red:parseInt(""+Ot[1]+Ot[2],16),green:parseInt(""+Ot[3]+Ot[4],16),blue:parseInt(""+Ot[5]+Ot[6],16),alpha:zt}}if(Ot.match(ct))return{red:parseInt(""+Ot[1]+Ot[1],16),green:parseInt(""+Ot[2]+Ot[2],16),blue:parseInt(""+Ot[3]+Ot[3],16)};if(Ot.match(pt)){var yt=parseFloat((parseInt(""+Ot[4]+Ot[4],16)/255).toFixed(2));return{red:parseInt(""+Ot[1]+Ot[1],16),green:parseInt(""+Ot[2]+Ot[2],16),blue:parseInt(""+Ot[3]+Ot[3],16),alpha:yt}}var vt=dt.exec(Ot);if(vt)return{red:parseInt(""+vt[1],10),green:parseInt(""+vt[2],10),blue:parseInt(""+vt[3],10)};var At=ft.exec(Ot.substring(0,50));if(At)return{red:parseInt(""+At[1],10),green:parseInt(""+At[2],10),blue:parseInt(""+At[3],10),alpha:parseFloat(""+At[4])};var St=bt.exec(Ot);if(St){var Et=parseInt(""+St[1],10),Tt=parseInt(""+St[2],10)/100,Rt=parseInt(""+St[3],10)/100,Ct="rgb("+(0,et.default)(Et,Tt,Rt)+")",wt=dt.exec(Ct);if(!wt)throw new ot.default(4,Ot,Ct);return{red:parseInt(""+wt[1],10),green:parseInt(""+wt[2],10),blue:parseInt(""+wt[3],10)}}var Lt=ht.exec(Ot.substring(0,50));if(Lt){var Ht=parseInt(""+Lt[1],10),jt=parseInt(""+Lt[2],10)/100,s0=parseInt(""+Lt[3],10)/100,Ut="rgb("+(0,et.default)(Ht,jt,s0)+")",Yt=dt.exec(Ut);if(!Yt)throw new ot.default(4,Ot,Ut);return{red:parseInt(""+Yt[1],10),green:parseInt(""+Yt[2],10),blue:parseInt(""+Yt[3],10),alpha:parseFloat(""+Lt[4])}}throw new ot.default(5)}tt.exports=nt.default})(parseToRgb,parseToRgb.exports);var parseToRgbExports=parseToRgb.exports,rgb={exports:{}},_reduceHexValue={exports:{}};(function(tt,nt){nt.__esModule=!0,nt.default=void 0;var et=function(at){return at.length===7&&at[1]===at[2]&&at[3]===at[4]&&at[5]===at[6]?"#"+at[1]+at[3]+at[5]:at},rt=et;nt.default=rt,tt.exports=nt.default})(_reduceHexValue,_reduceHexValue.exports);var _reduceHexValueExports=_reduceHexValue.exports,_numberToHex={exports:{}};(function(tt,nt){nt.__esModule=!0,nt.default=void 0;function et(ot){var at=ot.toString(16);return at.length===1?"0"+at:at}var rt=et;nt.default=rt,tt.exports=nt.default})(_numberToHex,_numberToHex.exports);var _numberToHexExports=_numberToHex.exports;(function(tt,nt){nt.__esModule=!0,nt.default=st;var et=at(_reduceHexValueExports),rt=at(_numberToHexExports),ot=at(_errorsExports);function at(ut){return ut&&ut.__esModule?ut:{default:ut}}function st(ut,ct,pt){if(typeof ut=="number"&&typeof ct=="number"&&typeof pt=="number")return(0,et.default)("#"+(0,rt.default)(ut)+(0,rt.default)(ct)+(0,rt.default)(pt));if(typeof ut=="object"&&ct===void 0&&pt===void 0)return(0,et.default)("#"+(0,rt.default)(ut.red)+(0,rt.default)(ut.green)+(0,rt.default)(ut.blue));throw new ot.default(6)}tt.exports=nt.default})(rgb,rgb.exports);var rgbExports=rgb.exports;(function(tt,nt){nt.__esModule=!0,nt.default=st;var et=at(parseToRgbExports),rt=at(rgbExports),ot=at(_errorsExports);function at(ut){return ut&&ut.__esModule?ut:{default:ut}}function st(ut,ct,pt,dt){if(typeof ut=="string"&&typeof ct=="number"){var ft=(0,et.default)(ut);return"rgba("+ft.red+","+ft.green+","+ft.blue+","+ct+")"}else{if(typeof ut=="number"&&typeof ct=="number"&&typeof pt=="number"&&typeof dt=="number")return dt>=1?(0,rt.default)(ut,ct,pt):"rgba("+ut+","+ct+","+pt+","+dt+")";if(typeof ut=="object"&&ct===void 0&&pt===void 0&&dt===void 0)return ut.alpha>=1?(0,rt.default)(ut.red,ut.green,ut.blue):"rgba("+ut.red+","+ut.green+","+ut.blue+","+ut.alpha+")"}throw new ot.default(7)}tt.exports=nt.default})(rgba,rgba.exports);var rgbaExports=rgba.exports;(function(tt,nt){nt.__esModule=!0,nt.default=void 0;var et=at(_curryExports),rt=at(rgbaExports),ot=at(parseToRgbExports);function at(dt){return dt&&dt.__esModule?dt:{default:dt}}function st(){return st=Object.assign||function(dt){for(var ft=1;ft<arguments.length;ft++){var bt=arguments[ft];for(var ht in bt)Object.prototype.hasOwnProperty.call(bt,ht)&&(dt[ht]=bt[ht])}return dt},st.apply(this,arguments)}function ut(dt,ft,bt){if(ft==="transparent")return bt;if(bt==="transparent")return ft;if(dt===0)return bt;var ht=(0,ot.default)(ft),Mt=st({},ht,{alpha:typeof ht.alpha=="number"?ht.alpha:1}),mt=(0,ot.default)(bt),Ot=st({},mt,{alpha:typeof mt.alpha=="number"?mt.alpha:1}),zt=Mt.alpha-Ot.alpha,yt=parseFloat(dt)*2-1,vt=yt*zt===-1?yt:yt+zt,At=1+yt*zt,St=(vt/At+1)/2,Et=1-St,Tt={red:Math.floor(Mt.red*St+Ot.red*Et),green:Math.floor(Mt.green*St+Ot.green*Et),blue:Math.floor(Mt.blue*St+Ot.blue*Et),alpha:Mt.alpha*(parseFloat(dt)/1)+Ot.alpha*(1-parseFloat(dt)/1)};return(0,rt.default)(Tt)}var ct=(0,et.default)(ut),pt=ct;nt.default=pt,tt.exports=nt.default})(mix,mix.exports);var mixExports=mix.exports;(function(tt,nt){nt.__esModule=!0,nt.default=void 0;var et=ot(_curryExports),rt=ot(mixExports);function ot(ct){return ct&&ct.__esModule?ct:{default:ct}}function at(ct,pt){return pt==="transparent"?pt:(0,rt.default)(parseFloat(ct),"rgb(255, 255, 255)",pt)}var st=(0,et.default)(at),ut=st;nt.default=ut,tt.exports=nt.default})(tint$1,tint$1.exports);var tintExports=tint$1.exports;const tint=getDefaultExportFromCjs$1(tintExports);var shade$1={exports:{}};(function(tt,nt){nt.__esModule=!0,nt.default=void 0;var et=ot(_curryExports),rt=ot(mixExports);function ot(ct){return ct&&ct.__esModule?ct:{default:ct}}function at(ct,pt){return pt==="transparent"?pt:(0,rt.default)(parseFloat(ct),"rgb(0, 0, 0)",pt)}var st=(0,et.default)(at),ut=st;nt.default=ut,tt.exports=nt.default})(shade$1,shade$1.exports);var shadeExports=shade$1.exports;const shade=getDefaultExportFromCjs$1(shadeExports);var SIZE={small:"small",medium:"medium",large:"large"},VARIANT=Object.freeze({solid:"solid",light:"light",outlined:"outlined"}),KIND={custom:"custom",neutral:"neutral",primary:"primary",accent:"accent",positive:"positive",warning:"warning",negative:"negative",black:"black",blue:"blue",green:"green",red:"red",yellow:"yellow",orange:"orange",purple:"purple",brown:"brown"},_neutralColorStates,_primaryColorStates,_accentColorStates,_positiveColorStates,_warningColorStates,_negativeColorStates,_orangeColorStates,_purpleColorStates,_brownColorStates,_customColorStates,_colorMap;function ownKeys$1(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$1(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$1(Object(et),!0).forEach(function(rt){_defineProperty$2(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$1(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _defineProperty$2(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function customOnRamp(tt,nt){switch(nt){case"0":return"white";case"50":return tint(.8,tt);case"100":return tint(.6,tt);case"200":return tint(.4,tt);case"300":return tint(.2,tt);case"400":return tt;case"500":return shade(.2,tt);case"600":return shade(.4,tt);case"700":return shade(.6,tt);case"800":return shade(.8,tt);case"1000":return"black";default:return tt}}var COLOR_STATE={disabled:"disabled",solid:"solid",outline:"outline"},pick$2=function tt(nt,et,rt){return nt.name&&nt.name.includes("dark")?rt:et},neutralColorStates=(_neutralColorStates={},_defineProperty$2(_neutralColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:tt.colors.tagNeutralFontDisabled,backgroundColor:null,borderColor:tt.colors.tagNeutralOutlinedDisabled}}),_defineProperty$2(_neutralColorStates,COLOR_STATE.solid,function(tt,nt){return{color:tt.colors.tagNeutralSolidFont,backgroundColor:tt.colors.tagNeutralSolidBackground,borderColor:null}}),_defineProperty$2(_neutralColorStates,COLOR_STATE.outline,function(tt,nt){return{color:tt.colors.tagNeutralOutlinedFont,backgroundColor:null,borderColor:tt.colors.tagNeutralOutlinedBackground}}),_neutralColorStates),primaryColorStates=(_primaryColorStates={},_defineProperty$2(_primaryColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:tt.colors.tagPrimaryFontDisabled,backgroundColor:null,borderColor:tt.colors.tagPrimaryOutlinedDisabled}}),_defineProperty$2(_primaryColorStates,COLOR_STATE.solid,function(tt,nt){return{color:tt.colors.tagPrimarySolidFont,backgroundColor:tt.colors.tagPrimarySolidBackground,borderColor:null}}),_defineProperty$2(_primaryColorStates,COLOR_STATE.outline,function(tt,nt){return{color:tt.colors.tagPrimaryOutlinedFont,backgroundColor:null,borderColor:tt.colors.tagPrimaryOutlinedBackground}}),_primaryColorStates),accentColorStates=(_accentColorStates={},_defineProperty$2(_accentColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:tt.colors.tagAccentFontDisabled,backgroundColor:null,borderColor:tt.colors.tagAccentOutlinedDisabled}}),_defineProperty$2(_accentColorStates,COLOR_STATE.solid,function(tt,nt){return{color:tt.colors.tagAccentSolidFont,backgroundColor:tt.colors.tagAccentSolidBackground,borderColor:null}}),_defineProperty$2(_accentColorStates,COLOR_STATE.outline,function(tt,nt){return{color:tt.colors.tagAccentOutlinedFont,backgroundColor:null,borderColor:tt.colors.tagAccentOutlinedBackground}}),_accentColorStates),positiveColorStates=(_positiveColorStates={},_defineProperty$2(_positiveColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:tt.colors.tagPositiveFontDisabled,backgroundColor:null,borderColor:tt.colors.tagPositiveOutlinedDisabled}}),_defineProperty$2(_positiveColorStates,COLOR_STATE.solid,function(tt,nt){return{color:tt.colors.tagPositiveSolidFont,backgroundColor:tt.colors.tagPositiveSolidBackground,borderColor:null}}),_defineProperty$2(_positiveColorStates,COLOR_STATE.outline,function(tt,nt){return{color:tt.colors.tagPositiveOutlinedFont,backgroundColor:null,borderColor:tt.colors.tagPositiveOutlinedBackground}}),_positiveColorStates),warningColorStates=(_warningColorStates={},_defineProperty$2(_warningColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:tt.colors.tagWarningFontDisabled,backgroundColor:null,borderColor:tt.colors.tagWarningOutlinedDisabled}}),_defineProperty$2(_warningColorStates,COLOR_STATE.solid,function(tt,nt){return{color:tt.colors.tagWarningSolidFont,backgroundColor:tt.colors.tagWarningSolidBackground,borderColor:null}}),_defineProperty$2(_warningColorStates,COLOR_STATE.outline,function(tt,nt){return{color:tt.colors.tagWarningOutlinedFont,backgroundColor:null,borderColor:tt.colors.tagWarningOutlinedBackground}}),_warningColorStates),negativeColorStates=(_negativeColorStates={},_defineProperty$2(_negativeColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:tt.colors.tagNegativeFontDisabled,backgroundColor:null,borderColor:tt.colors.tagNegativeOutlinedDisabled}}),_defineProperty$2(_negativeColorStates,COLOR_STATE.solid,function(tt,nt){return{color:tt.colors.tagNegativeSolidFont,backgroundColor:tt.colors.tagNegativeSolidBackground,borderColor:null}}),_defineProperty$2(_negativeColorStates,COLOR_STATE.outline,function(tt,nt){return{color:tt.colors.tagNegativeOutlinedFont,backgroundColor:null,borderColor:tt.colors.tagNegativeOutlinedBackground}}),_negativeColorStates),orangeColorStates=(_orangeColorStates={},_defineProperty$2(_orangeColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:pick$2(tt,colors$1.orange200,colors$1.orange600),backgroundColor:null,borderColor:pick$2(tt,colors$1.orange200,colors$1.orange700)}}),_defineProperty$2(_orangeColorStates,COLOR_STATE.solid,function(tt,nt){return{color:colors$1.white,backgroundColor:pick$2(tt,colors$1.orange400,colors$1.orange500),borderColor:null}}),_defineProperty$2(_orangeColorStates,COLOR_STATE.outline,function(tt,nt){return{color:pick$2(tt,colors$1.orange400,colors$1.orange300),backgroundColor:null,borderColor:pick$2(tt,colors$1.orange200,colors$1.orange500)}}),_orangeColorStates),purpleColorStates=(_purpleColorStates={},_defineProperty$2(_purpleColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:pick$2(tt,colors$1.purple200,colors$1.purple600),backgroundColor:null,borderColor:pick$2(tt,colors$1.purple200,colors$1.purple700)}}),_defineProperty$2(_purpleColorStates,COLOR_STATE.solid,function(tt,nt){return{color:colors$1.white,backgroundColor:pick$2(tt,colors$1.purple400,colors$1.purple500),borderColor:null}}),_defineProperty$2(_purpleColorStates,COLOR_STATE.outline,function(tt,nt){return{color:pick$2(tt,colors$1.purple400,colors$1.purple300),backgroundColor:null,borderColor:pick$2(tt,colors$1.purple200,colors$1.purple500)}}),_purpleColorStates),brownColorStates=(_brownColorStates={},_defineProperty$2(_brownColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:pick$2(tt,colors$1.brown200,colors$1.brown600),backgroundColor:null,borderColor:pick$2(tt,colors$1.brown200,colors$1.brown700)}}),_defineProperty$2(_brownColorStates,COLOR_STATE.solid,function(tt,nt){return{color:colors$1.white,backgroundColor:pick$2(tt,colors$1.brown400,colors$1.brown500),borderColor:null}}),_defineProperty$2(_brownColorStates,COLOR_STATE.outline,function(tt,nt){return{color:pick$2(tt,colors$1.brown400,colors$1.brown300),backgroundColor:null,borderColor:pick$2(tt,colors$1.brown200,colors$1.brown500)}}),_brownColorStates),customColorStates=(_customColorStates={},_defineProperty$2(_customColorStates,COLOR_STATE.disabled,function(tt,nt){return{color:customOnRamp(nt,tt.colors.tagFontDisabledRampUnit),backgroundColor:null,borderColor:customOnRamp(nt,tt.colors.tagSolidDisabledRampUnit)}}),_defineProperty$2(_customColorStates,COLOR_STATE.solid,function(tt,nt){return{color:customOnRamp(nt,tt.colors.tagSolidFontRampUnit),backgroundColor:customOnRamp(nt,tt.colors.tagSolidRampUnit),borderColor:null}}),_defineProperty$2(_customColorStates,COLOR_STATE.outline,function(tt,nt){return{color:customOnRamp(nt,tt.colors.tagOutlinedFontRampUnit),backgroundColor:null,borderColor:customOnRamp(nt,tt.colors.tagOutlinedRampUnit)}}),_customColorStates),colorMap=(_colorMap={},_defineProperty$2(_colorMap,KIND.neutral,neutralColorStates),_defineProperty$2(_colorMap,KIND.primary,primaryColorStates),_defineProperty$2(_colorMap,KIND.accent,accentColorStates),_defineProperty$2(_colorMap,KIND.positive,positiveColorStates),_defineProperty$2(_colorMap,KIND.warning,warningColorStates),_defineProperty$2(_colorMap,KIND.negative,negativeColorStates),_defineProperty$2(_colorMap,KIND.black,primaryColorStates),_defineProperty$2(_colorMap,KIND.blue,accentColorStates),_defineProperty$2(_colorMap,KIND.green,positiveColorStates),_defineProperty$2(_colorMap,KIND.red,negativeColorStates),_defineProperty$2(_colorMap,KIND.yellow,warningColorStates),_defineProperty$2(_colorMap,KIND.orange,orangeColorStates),_defineProperty$2(_colorMap,KIND.purple,purpleColorStates),_defineProperty$2(_colorMap,KIND.brown,brownColorStates),_defineProperty$2(_colorMap,KIND.custom,customColorStates),_colorMap),getColorStateFromProps=function tt(nt){return nt.$disabled?COLOR_STATE.disabled:nt.$variant===VARIANT.solid?COLOR_STATE.solid:COLOR_STATE.outline},Action$1=styled("span",function(tt){var nt,et,rt=tt.$theme,ot=tt.$disabled,at=tt.$size,st=at===void 0?SIZE.small:at,ut=rt.direction==="rtl"?"borderBottomLeftRadius":"borderBottomRightRadius",ct=rt.direction==="rtl"?"borderTopLeftRadius":"borderTopRightRadius",pt=rt.direction==="rtl"?"marginRight":"marginLeft";return et={alignItems:"center"},_defineProperty$2(et,ut,rt.borders.useRoundedCorners?rt.borders.radius400:0),_defineProperty$2(et,ct,rt.borders.useRoundedCorners?rt.borders.radius400:0),_defineProperty$2(et,"cursor",ot?"not-allowed":"pointer"),_defineProperty$2(et,"display","flex"),_defineProperty$2(et,pt,(nt={},_defineProperty$2(nt,SIZE.small,"8px"),_defineProperty$2(nt,SIZE.medium,"12px"),_defineProperty$2(nt,SIZE.large,"16px"),nt)[st]),_defineProperty$2(et,"outline","none"),_defineProperty$2(et,"transitionProperty","all"),_defineProperty$2(et,"transitionDuration","background-color"),_defineProperty$2(et,"transitionTimingFunction",rt.animation.easeOutCurve),et});Action$1.displayName="Action";Action$1.displayName="Action";var StartEnhancerContainer=styled("div",function(tt){var nt=tt.$theme,et=tt.$size,rt=et===void 0?SIZE.small:et,ot=nt.sizing.scale300;rt===SIZE.medium?ot=nt.sizing.scale400:rt===SIZE.large&&(ot=nt.sizing.scale600);var at=nt.direction==="rtl"?"paddingLeft":"paddingRight";return _defineProperty$2({alignItems:"center",display:"flex"},at,ot)});StartEnhancerContainer.displayName="StartEnhancerContainer";StartEnhancerContainer.displayName="StartEnhancerContainer";var Text=styled("span",function(tt){var nt=tt.$theme;return{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",maxWidth:tt.$theme.sizing.scale3200,order:nt.direction==="rtl"?1:0}});Text.displayName="Text";Text.displayName="Text";var Root$2=styled("span",function(tt){var nt,et,rt,ot=tt.$theme,at=tt.$kind,st=at===void 0?KIND.primary:at,ut=tt.$clickable,ct=tt.$variant,pt=tt.$disabled,dt=tt.$closeable,ft=tt.$isFocusVisible,bt=tt.$color,ht=tt.$size,Mt=ht===void 0?SIZE.small:ht,mt=ot.borders.tagBorderRadius,Ot=(nt={},_defineProperty$2(nt,SIZE.small,ot.sizing.scale300),_defineProperty$2(nt,SIZE.medium,ot.sizing.scale500),_defineProperty$2(nt,SIZE.large,ot.sizing.scale600),nt)[Mt],zt=!pt&&ct===VARIANT.solid?0:"2px",yt=colorMap[st][getColorStateFromProps(tt)](ot,bt),vt=yt.color,At=yt.backgroundColor,St=yt.borderColor;return _objectSpread$1(_objectSpread$1({},(et={},_defineProperty$2(et,SIZE.small,ot.typography.LabelSmall),_defineProperty$2(et,SIZE.medium,ot.typography.LabelMedium),_defineProperty$2(et,SIZE.large,ot.typography.LabelLarge),et)[Mt]),{},{alignItems:"center",color:vt,backgroundColor:At,borderLeftColor:St,borderRightColor:St,borderTopColor:St,borderBottomColor:St,borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:zt,borderRightWidth:zt,borderTopWidth:zt,borderBottomWidth:zt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,boxSizing:"border-box",cursor:pt?"not-allowed":ut?"pointer":"default",display:"inline-flex",height:(rt={},_defineProperty$2(rt,SIZE.small,"24px"),_defineProperty$2(rt,SIZE.medium,"32px"),_defineProperty$2(rt,SIZE.large,"40px"),rt)[Mt],justifyContent:"space-between",marginTop:"5px",marginBottom:"5px",marginLeft:"5px",marginRight:"5px",paddingTop:ot.sizing.scale0,paddingBottom:ot.sizing.scale0,paddingLeft:Ot,paddingRight:Ot,outline:"none",":hover":pt||!ut?{}:{boxShadow:"inset 0px 0px 100px ".concat(pick$2(ot,"rgba(0, 0, 0, 0.08)","rgba(255, 255, 255, 0.2)"))},":focus":pt||!ut&&!dt?{}:{boxShadow:ft?"0 0 0 3px ".concat(st===KIND.accent?ot.colors.primaryA:ot.colors.accent):"none"}})});Root$2.displayName="Root";Root$2.displayName="Root";function _typeof(tt){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},_typeof(tt)}var JOINABLE_TYPES=new Set(["string","number"]);function getTextFromChildren(tt){var nt=reactExports.Children.toArray(tt).filter(function(rt){return rt!=null});if(!nt.length)return null;var et=nt.every(function(rt){return JOINABLE_TYPES.has(_typeof(rt))});return et?nt.join(""):null}function _defineProperty$1(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function _slicedToArray$2(tt,nt){return _arrayWithHoles$2(tt)||_iterableToArrayLimit$2(tt,nt)||_unsupportedIterableToArray$2(tt,nt)||_nonIterableRest$2()}function _nonIterableRest$2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
722
722
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$2(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$2(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$2(tt,nt)}}function _arrayLikeToArray$2(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$2(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$2(tt){if(Array.isArray(tt))return tt}function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_extends$4.apply(this,arguments)}var ModifiedViewBoxDeleteIcon=function tt(nt){return reactExports.createElement(DeleteIcon,_extends$4({viewBox:"5 5 13.186 13.186"},nt))},Tag=reactExports.forwardRef(function(tt,nt){var et,rt=tt.children,ot=tt.closeable,at=ot===void 0?!0:ot,st=tt.color,ut=tt.size,ct=ut===void 0?SIZE.small:ut,pt=tt.disabled,dt=pt===void 0?!1:pt,ft=tt.isFocused,bt=ft===void 0?!1:ft,ht=tt.isHovered,Mt=ht===void 0?!1:ht,mt=tt.kind,Ot=mt===void 0?KIND.primary:mt,zt=tt.onActionClick,yt=zt===void 0?function(z0){}:zt,vt=tt.onActionKeyDown,At=vt===void 0?function(z0){}:vt,St=tt.onClick,Et=St===void 0?null:St,Tt=tt.onKeyDown,Rt=Tt===void 0?null:Tt,Ct=tt.overrides,wt=Ct===void 0?{}:Ct,Lt=tt.startEnhancer,Ht=tt.title,jt=tt.variant,s0=jt===void 0?VARIANT.light:jt,Ut=reactExports.useState(!1),Yt=_slicedToArray$2(Ut,2),O0=Yt[0],a0=Yt[1];function b0(z0){isFocusVisible(z0)&&a0(!0)}function kt(z0){O0!==!1&&a0(!1)}function o0(z0){if(z0.currentTarget===z0.target){var w0=z0.key;Et&&w0==="Enter"&&Et(z0),at&&(w0==="Backspace"||w0==="Delete")&&(yt(z0),At(z0)),Rt&&Rt(z0)}}var qt=getOverrides(wt.Root,Root$2),Dt=_slicedToArray$2(qt,2),Bt=Dt[0],p0=Dt[1],r0=getOverrides(wt.Action,Action$1),l0=_slicedToArray$2(r0,2),f0=l0[0],i0=l0[1],$t=getOverrides(wt.ActionIcon,ModifiedViewBoxDeleteIcon),It=_slicedToArray$2($t,2),Vt=It[0],xt=It[1],Ft=getOverrides(wt.StartEnhancerContainer,StartEnhancerContainer),Pt=_slicedToArray$2(Ft,2),Zt=Pt[0],Kt=Pt[1],n0=getOverrides(wt.Text,Text),c0=_slicedToArray$2(n0,2),u0=c0[0],y0=c0[1],D0=typeof Et=="function",S0=dt?{}:{onClick:Et,onKeyDown:o0},x0=dt?{}:{onClick:function(w0){w0.stopPropagation(),yt(w0)}},m0={$clickable:D0,$closeable:at,$color:st,$disabled:dt,$isFocused:bt,$isHovered:Mt,$kind:Ot,$variant:s0,$isFocusVisible:O0,$size:ct},e0=Ht||getTextFromChildren(rt),Nt=(D0||at)&&!dt,Xt=(et={},_defineProperty$1(et,SIZE.small,12),_defineProperty$1(et,SIZE.medium,16),_defineProperty$1(et,SIZE.large,20),et)[ct],d0=Lt;return reactExports.createElement(Bt,_extends$4({ref:nt,"data-baseweb":"tag","aria-label":Nt&&at?"".concat(typeof rt=="string"?"".concat(rt,", "):"","close by backspace"):null,"aria-disabled":dt?!0:null,role:Nt?"button":null,tabIndex:Nt?0:null},S0,m0,p0,{onFocus:forkFocus(p0,b0),onBlur:forkBlur(p0,kt)}),d0&&d0!==0&&reactExports.createElement(Zt,Kt,reactExports.createElement(d0,null)),reactExports.createElement(u0,_extends$4({title:e0},y0),rt),at?reactExports.createElement(f0,_extends$4({"aria-hidden":!0,role:"presentation"},x0,m0,i0),reactExports.createElement(Vt,_extends$4({size:Xt},xt))):null)});Tag.displayName="Tag";var _excluded$2=["overrides","removeValue"];function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_extends$3.apply(this,arguments)}function _slicedToArray$1(tt,nt){return _arrayWithHoles$1(tt)||_iterableToArrayLimit$1(tt,nt)||_unsupportedIterableToArray$1(tt,nt)||_nonIterableRest$1()}function _nonIterableRest$1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
723
723
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$1(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$1(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$1(tt,nt)}}function _arrayLikeToArray$1(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$1(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$1(tt){if(Array.isArray(tt))return tt}function _objectWithoutProperties$2(tt,nt){if(tt==null)return{};var et=_objectWithoutPropertiesLoose$2(tt,nt),rt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(tt);for(ot=0;ot<at.length;ot++)rt=at[ot],!(nt.indexOf(rt)>=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(et[rt]=tt[rt])}return et}function _objectWithoutPropertiesLoose$2(tt,nt){if(tt==null)return{};var et={},rt=Object.keys(tt),ot,at;for(at=0;at<rt.length;at++)ot=rt[at],!(nt.indexOf(ot)>=0)&&(et[ot]=tt[ot]);return et}function MultiValue(tt){var nt=tt.overrides,et=nt===void 0?{}:nt,rt=tt.removeValue,ot=_objectWithoutProperties$2(tt,_excluded$2),at=getOverrides(et.Tag||et.MultiValue,Tag),st=_slicedToArray$1(at,2),ut=st[0],ct=st[1];return reactExports.createElement(ut,_extends$3({variant:VARIANT.solid,overrides:{Root:{style:function(dt){var ft=dt.$theme.sizing;return{marginRight:ft.scale0,marginBottom:ft.scale0,marginLeft:ft.scale0,marginTop:ft.scale0}}}},onActionClick:rt},ot,ct),tt.children)}var _excluded$1=["overrides"];function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_extends$2.apply(this,arguments)}function _slicedToArray(tt,nt){return _arrayWithHoles(tt)||_iterableToArrayLimit(tt,nt)||_unsupportedIterableToArray(tt,nt)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
724
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray(tt,nt)}}function _arrayLikeToArray(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles(tt){if(Array.isArray(tt))return tt}function _objectWithoutProperties$1(tt,nt){if(tt==null)return{};var et=_objectWithoutPropertiesLoose$1(tt,nt),rt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(tt);for(ot=0;ot<at.length;ot++)rt=at[ot],!(nt.indexOf(rt)>=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(et[rt]=tt[rt])}return et}function _objectWithoutPropertiesLoose$1(tt,nt){if(tt==null)return{};var et={},rt=Object.keys(tt),ot,at;for(at=0;at<rt.length;at++)ot=rt[at],!(nt.indexOf(ot)>=0)&&(et[ot]=tt[ot]);return et}function Value(tt){var nt=tt.overrides,et=nt===void 0?{}:nt,rt=_objectWithoutProperties$1(tt,_excluded$1),ot=getOverrides(et.SingleValue,StyledSingleValue),at=_slicedToArray(ot,2),st=at[0],ut=at[1];return reactExports.createElement(st,_extends$2({},rt,ut),tt.children)}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_extends$1.apply(this,arguments)}function Select(tt){return reactExports.createElement(Select$1,_extends$1({},tt,{valueComponent:tt.multi?MultiValue:Value}))}var SCORE_MIN=-1/0,SCORE_MAX=1/0,SCORE_GAP_LEADING=-.005,SCORE_GAP_TRAILING=-.005,SCORE_GAP_INNER=-.01,SCORE_MATCH_CONSECUTIVE=1,SCORE_MATCH_SLASH=.9,SCORE_MATCH_WORD=.8,SCORE_MATCH_CAPITAL=.7,SCORE_MATCH_DOT=.6;function islower(tt){return tt.toLowerCase()===tt}function isupper(tt){return tt.toUpperCase()===tt}function precompute_bonus(tt){for(var nt=tt.length,et=new Array(nt),rt="/",ot=0;ot<nt;ot++){var at=tt[ot];rt==="/"?et[ot]=SCORE_MATCH_SLASH:rt==="-"||rt==="_"||rt===" "?et[ot]=SCORE_MATCH_WORD:rt==="."?et[ot]=SCORE_MATCH_DOT:islower(rt)&&isupper(at)?et[ot]=SCORE_MATCH_CAPITAL:et[ot]=0,rt=at}return et}function compute(tt,nt,et,rt){for(var ot=tt.length,at=nt.length,st=tt.toLowerCase(),ut=nt.toLowerCase(),ct=precompute_bonus(nt),pt=0;pt<ot;pt++){et[pt]=new Array(at),rt[pt]=new Array(at);for(var dt=SCORE_MIN,ft=pt===ot-1?SCORE_GAP_TRAILING:SCORE_GAP_INNER,bt=0;bt<at;bt++)if(st[pt]===ut[bt]){var ht=SCORE_MIN;pt?bt&&(ht=Math.max(rt[pt-1][bt-1]+ct[bt],et[pt-1][bt-1]+SCORE_MATCH_CONSECUTIVE)):ht=bt*SCORE_GAP_LEADING+ct[bt],et[pt][bt]=ht,rt[pt][bt]=dt=Math.max(ht,dt+ft)}else et[pt][bt]=SCORE_MIN,rt[pt][bt]=dt=dt+ft}}function score(tt,nt){var et=tt.length,rt=nt.length;if(!et||!rt)return SCORE_MIN;if(et===rt)return SCORE_MAX;if(rt>1024)return SCORE_MIN;var ot=new Array(et),at=new Array(et);return compute(tt,nt,ot,at),at[et-1][rt-1]}function hasMatch(tt,nt){tt=tt.toLowerCase(),nt=nt.toLowerCase();for(var et=tt.length,rt=0,ot=0;rt<et;rt+=1)if(ot=nt.indexOf(tt[rt],ot)+1,ot===0)return!1;return!0}function baseSortBy$1(tt,nt){var et=tt.length;for(tt.sort(nt);et--;)tt[et]=tt[et].value;return tt}var _baseSortBy=baseSortBy$1,isSymbol=isSymbol_1;function compareAscending$1(tt,nt){if(tt!==nt){var et=tt!==void 0,rt=tt===null,ot=tt===tt,at=isSymbol(tt),st=nt!==void 0,ut=nt===null,ct=nt===nt,pt=isSymbol(nt);if(!ut&&!pt&&!at&&tt>nt||at&&st&&ct&&!ut&&!pt||rt&&st&&ct||!et&&ct||!ot)return 1;if(!rt&&!at&&!pt&&tt<nt||pt&&et&&ot&&!rt&&!at||ut&&et&&ot||!st&&ot||!ct)return-1}return 0}var _compareAscending=compareAscending$1,compareAscending=_compareAscending;function compareMultiple$1(tt,nt,et){for(var rt=-1,ot=tt.criteria,at=nt.criteria,st=ot.length,ut=et.length;++rt<st;){var ct=compareAscending(ot[rt],at[rt]);if(ct){if(rt>=ut)return ct;var pt=et[rt];return ct*(pt=="desc"?-1:1)}}return tt.index-nt.index}var _compareMultiple=compareMultiple$1,arrayMap$1=_arrayMap,baseGet$1=_baseGet,baseIteratee$2=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary$1=_baseUnary,compareMultiple=_compareMultiple,identity=identity_1,isArray$2=isArray_1;function baseOrderBy$1(tt,nt,et){nt.length?nt=arrayMap$1(nt,function(at){return isArray$2(at)?function(st){return baseGet$1(st,at.length===1?at[0]:at)}:at}):nt=[identity];var rt=-1;nt=arrayMap$1(nt,baseUnary$1(baseIteratee$2));var ot=baseMap(tt,function(at,st,ut){var ct=arrayMap$1(nt,function(pt){return pt(at)});return{criteria:ct,index:++rt,value:at}});return baseSortBy(ot,function(at,st){return compareMultiple(at,st,et)})}var _baseOrderBy=baseOrderBy$1,baseFlatten=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest$1=_baseRest,isIterateeCall=_isIterateeCall,sortBy=baseRest$1(function(tt,nt){if(tt==null)return[];var et=nt.length;return et>1&&isIterateeCall(tt,nt[0],nt[1])?nt=[]:et>2&&isIterateeCall(nt[0],nt[1],nt[2])&&(nt=[nt[0]]),baseOrderBy(tt,baseFlatten(nt,1),[])}),sortBy_1=sortBy;const sortBy$1=getDefaultExportFromCjs$1(sortBy_1);var safeIsNaN=Number.isNaN||function tt(nt){return typeof nt=="number"&&nt!==nt};function isEqual$2(tt,nt){return!!(tt===nt||safeIsNaN(tt)&&safeIsNaN(nt))}function areInputsEqual(tt,nt){if(tt.length!==nt.length)return!1;for(var et=0;et<tt.length;et++)if(!isEqual$2(tt[et],nt[et]))return!1;return!0}function memoizeOne(tt,nt){nt===void 0&&(nt=areInputsEqual);var et,rt=[],ot,at=!1;function st(){for(var ut=[],ct=0;ct<arguments.length;ct++)ut[ct]=arguments[ct];return at&&et===this&&nt(ut,rt)||(ot=tt.apply(this,ut),at=!0,et=this,rt=ut),ot}return st}var hasNativePerformanceNow=typeof performance=="object"&&typeof performance.now=="function",now=hasNativePerformanceNow?function(){return performance.now()}:function(){return Date.now()};function cancelTimeout(tt){cancelAnimationFrame(tt.id)}function requestTimeout(tt,nt){var et=now();function rt(){now()-et>=nt?tt.call(null):ot.id=requestAnimationFrame(rt)}var ot={id:requestAnimationFrame(rt)};return ot}var size=-1;function getScrollbarSize(tt){if(tt===void 0&&(tt=!1),size===-1||tt){var nt=document.createElement("div"),et=nt.style;et.width="50px",et.height="50px",et.overflow="scroll",document.body.appendChild(nt),size=nt.offsetWidth-nt.clientWidth,document.body.removeChild(nt)}return size}var cachedRTLResult=null;function getRTLOffsetType(tt){if(tt===void 0&&(tt=!1),cachedRTLResult===null||tt){var nt=document.createElement("div"),et=nt.style;et.width="50px",et.height="50px",et.overflow="scroll",et.direction="rtl";var rt=document.createElement("div"),ot=rt.style;return ot.width="100px",ot.height="100px",nt.appendChild(rt),document.body.appendChild(nt),nt.scrollLeft>0?cachedRTLResult="positive-descending":(nt.scrollLeft=1,nt.scrollLeft===0?cachedRTLResult="negative":cachedRTLResult="positive-ascending"),document.body.removeChild(nt),cachedRTLResult}return cachedRTLResult}var IS_SCROLLING_DEBOUNCE_INTERVAL$1=150,defaultItemKey$1=function tt(nt,et){return nt};function createListComponent(tt){var nt,et=tt.getItemOffset,rt=tt.getEstimatedTotalSize,ot=tt.getItemSize,at=tt.getOffsetForIndexAndAlignment,st=tt.getStartIndexForOffset,ut=tt.getStopIndexForStartIndex,ct=tt.initInstanceProps,pt=tt.shouldResetStyleCacheOnItemSizeChange,dt=tt.validateProps;return nt=function(ft){_inheritsLoose(bt,ft);function bt(Mt){var mt;return mt=ft.call(this,Mt)||this,mt._instanceProps=ct(mt.props,_assertThisInitialized$e(mt)),mt._outerRef=void 0,mt._resetIsScrollingTimeoutId=null,mt.state={instance:_assertThisInitialized$e(mt),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof mt.props.initialScrollOffset=="number"?mt.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},mt._callOnItemsRendered=void 0,mt._callOnItemsRendered=memoizeOne(function(Ot,zt,yt,vt){return mt.props.onItemsRendered({overscanStartIndex:Ot,overscanStopIndex:zt,visibleStartIndex:yt,visibleStopIndex:vt})}),mt._callOnScroll=void 0,mt._callOnScroll=memoizeOne(function(Ot,zt,yt){return mt.props.onScroll({scrollDirection:Ot,scrollOffset:zt,scrollUpdateWasRequested:yt})}),mt._getItemStyle=void 0,mt._getItemStyle=function(Ot){var zt=mt.props,yt=zt.direction,vt=zt.itemSize,At=zt.layout,St=mt._getItemStyleCache(pt&&vt,pt&&At,pt&&yt),Et;if(St.hasOwnProperty(Ot))Et=St[Ot];else{var Tt=et(mt.props,Ot,mt._instanceProps),Rt=ot(mt.props,Ot,mt._instanceProps),Ct=yt==="horizontal"||At==="horizontal",wt=yt==="rtl",Lt=Ct?Tt:0;St[Ot]=Et={position:"absolute",left:wt?void 0:Lt,right:wt?Lt:void 0,top:Ct?0:Tt,height:Ct?"100%":Rt,width:Ct?Rt:"100%"}}return Et},mt._getItemStyleCache=void 0,mt._getItemStyleCache=memoizeOne(function(Ot,zt,yt){return{}}),mt._onScrollHorizontal=function(Ot){var zt=Ot.currentTarget,yt=zt.clientWidth,vt=zt.scrollLeft,At=zt.scrollWidth;mt.setState(function(St){if(St.scrollOffset===vt)return null;var Et=mt.props.direction,Tt=vt;if(Et==="rtl")switch(getRTLOffsetType()){case"negative":Tt=-vt;break;case"positive-descending":Tt=At-yt-vt;break}return Tt=Math.max(0,Math.min(Tt,At-yt)),{isScrolling:!0,scrollDirection:St.scrollOffset<Tt?"forward":"backward",scrollOffset:Tt,scrollUpdateWasRequested:!1}},mt._resetIsScrollingDebounced)},mt._onScrollVertical=function(Ot){var zt=Ot.currentTarget,yt=zt.clientHeight,vt=zt.scrollHeight,At=zt.scrollTop;mt.setState(function(St){if(St.scrollOffset===At)return null;var Et=Math.max(0,Math.min(At,vt-yt));return{isScrolling:!0,scrollDirection:St.scrollOffset<Et?"forward":"backward",scrollOffset:Et,scrollUpdateWasRequested:!1}},mt._resetIsScrollingDebounced)},mt._outerRefSetter=function(Ot){var zt=mt.props.outerRef;mt._outerRef=Ot,typeof zt=="function"?zt(Ot):zt!=null&&typeof zt=="object"&&zt.hasOwnProperty("current")&&(zt.current=Ot)},mt._resetIsScrollingDebounced=function(){mt._resetIsScrollingTimeoutId!==null&&cancelTimeout(mt._resetIsScrollingTimeoutId),mt._resetIsScrollingTimeoutId=requestTimeout(mt._resetIsScrolling,IS_SCROLLING_DEBOUNCE_INTERVAL$1)},mt._resetIsScrolling=function(){mt._resetIsScrollingTimeoutId=null,mt.setState({isScrolling:!1},function(){mt._getItemStyleCache(-1,null)})},mt}bt.getDerivedStateFromProps=function(mt,Ot){return validateSharedProps$1(mt,Ot),dt(mt),null};var ht=bt.prototype;return ht.scrollTo=function(mt){mt=Math.max(0,mt),this.setState(function(Ot){return Ot.scrollOffset===mt?null:{scrollDirection:Ot.scrollOffset<mt?"forward":"backward",scrollOffset:mt,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},ht.scrollToItem=function(mt,Ot){Ot===void 0&&(Ot="auto");var zt=this.props,yt=zt.itemCount,vt=zt.layout,At=this.state.scrollOffset;mt=Math.max(0,Math.min(mt,yt-1));var St=0;if(this._outerRef){var Et=this._outerRef;vt==="vertical"?St=Et.scrollWidth>Et.clientWidth?getScrollbarSize():0:St=Et.scrollHeight>Et.clientHeight?getScrollbarSize():0}this.scrollTo(at(this.props,mt,Ot,At,this._instanceProps,St))},ht.componentDidMount=function(){var mt=this.props,Ot=mt.direction,zt=mt.initialScrollOffset,yt=mt.layout;if(typeof zt=="number"&&this._outerRef!=null){var vt=this._outerRef;Ot==="horizontal"||yt==="horizontal"?vt.scrollLeft=zt:vt.scrollTop=zt}this._callPropsCallbacks()},ht.componentDidUpdate=function(){var mt=this.props,Ot=mt.direction,zt=mt.layout,yt=this.state,vt=yt.scrollOffset,At=yt.scrollUpdateWasRequested;if(At&&this._outerRef!=null){var St=this._outerRef;if(Ot==="horizontal"||zt==="horizontal")if(Ot==="rtl")switch(getRTLOffsetType()){case"negative":St.scrollLeft=-vt;break;case"positive-ascending":St.scrollLeft=vt;break;default:var Et=St.clientWidth,Tt=St.scrollWidth;St.scrollLeft=Tt-Et-vt;break}else St.scrollLeft=vt;else St.scrollTop=vt}this._callPropsCallbacks()},ht.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&cancelTimeout(this._resetIsScrollingTimeoutId)},ht.render=function(){var mt=this.props,Ot=mt.children,zt=mt.className,yt=mt.direction,vt=mt.height,At=mt.innerRef,St=mt.innerElementType,Et=mt.innerTagName,Tt=mt.itemCount,Rt=mt.itemData,Ct=mt.itemKey,wt=Ct===void 0?defaultItemKey$1:Ct,Lt=mt.layout,Ht=mt.outerElementType,jt=mt.outerTagName,s0=mt.style,Ut=mt.useIsScrolling,Yt=mt.width,O0=this.state.isScrolling,a0=yt==="horizontal"||Lt==="horizontal",b0=a0?this._onScrollHorizontal:this._onScrollVertical,kt=this._getRangeToRender(),o0=kt[0],qt=kt[1],Dt=[];if(Tt>0)for(var Bt=o0;Bt<=qt;Bt++)Dt.push(reactExports.createElement(Ot,{data:Rt,key:wt(Bt,Rt),index:Bt,isScrolling:Ut?O0:void 0,style:this._getItemStyle(Bt)}));var p0=rt(this.props,this._instanceProps);return reactExports.createElement(Ht||jt||"div",{className:zt,onScroll:b0,ref:this._outerRefSetter,style:_extends$Q({position:"relative",height:vt,width:Yt,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:yt},s0)},reactExports.createElement(St||Et||"div",{children:Dt,ref:At,style:{height:a0?"100%":p0,pointerEvents:O0?"none":void 0,width:a0?p0:"100%"}}))},ht._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var mt=this.props.itemCount;if(mt>0){var Ot=this._getRangeToRender(),zt=Ot[0],yt=Ot[1],vt=Ot[2],At=Ot[3];this._callOnItemsRendered(zt,yt,vt,At)}}if(typeof this.props.onScroll=="function"){var St=this.state,Et=St.scrollDirection,Tt=St.scrollOffset,Rt=St.scrollUpdateWasRequested;this._callOnScroll(Et,Tt,Rt)}},ht._getRangeToRender=function(){var mt=this.props,Ot=mt.itemCount,zt=mt.overscanCount,yt=this.state,vt=yt.isScrolling,At=yt.scrollDirection,St=yt.scrollOffset;if(Ot===0)return[0,0,0,0];var Et=st(this.props,St,this._instanceProps),Tt=ut(this.props,Et,St,this._instanceProps),Rt=!vt||At==="backward"?Math.max(1,zt):1,Ct=!vt||At==="forward"?Math.max(1,zt):1;return[Math.max(0,Et-Rt),Math.max(0,Math.min(Ot-1,Tt+Ct)),Et,Tt]},bt}(reactExports.PureComponent),nt.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},nt}var validateSharedProps$1=function tt(nt,et){nt.children,nt.direction,nt.height,nt.layout,nt.innerTagName,nt.outerTagName,nt.width,et.instance},FixedSizeList=createListComponent({getItemOffset:function tt(nt,et){var rt=nt.itemSize;return et*rt},getItemSize:function tt(nt,et){var rt=nt.itemSize;return rt},getEstimatedTotalSize:function tt(nt){var et=nt.itemCount,rt=nt.itemSize;return rt*et},getOffsetForIndexAndAlignment:function tt(nt,et,rt,ot,at,st){var ut=nt.direction,ct=nt.height,pt=nt.itemCount,dt=nt.itemSize,ft=nt.layout,bt=nt.width,ht=ut==="horizontal"||ft==="horizontal",Mt=ht?bt:ct,mt=Math.max(0,pt*dt-Mt),Ot=Math.min(mt,et*dt),zt=Math.max(0,et*dt-Mt+dt+st);switch(rt==="smart"&&(ot>=zt-Mt&&ot<=Ot+Mt?rt="auto":rt="center"),rt){case"start":return Ot;case"end":return zt;case"center":{var yt=Math.round(zt+(Ot-zt)/2);return yt<Math.ceil(Mt/2)?0:yt>mt+Math.floor(Mt/2)?mt:yt}case"auto":default:return ot>=zt&&ot<=Ot?ot:ot<zt?zt:Ot}},getStartIndexForOffset:function tt(nt,et){var rt=nt.itemCount,ot=nt.itemSize;return Math.max(0,Math.min(rt-1,Math.floor(et/ot)))},getStopIndexForStartIndex:function tt(nt,et,rt){var ot=nt.direction,at=nt.height,st=nt.itemCount,ut=nt.itemSize,ct=nt.layout,pt=nt.width,dt=ot==="horizontal"||ct==="horizontal",ft=et*ut,bt=dt?pt:at,ht=Math.ceil((bt+rt-ft)/ut);return Math.max(0,Math.min(st-1,et+ht-1))},initInstanceProps:function tt(nt){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function tt(nt){nt.itemSize}});const ThemedStyledDropdownListItem=newStyled(StyledDropdownListItem,{shouldForwardProp:isPropValid,target:"e18cachw0"})(({theme:tt,$isHighlighted:nt})=>{const et=tt.inSidebar?tt.colors.bgColor:tt.colors.secondaryBg;return{display:"flex",alignItems:"center",paddingTop:tt.spacing.none,paddingBottom:tt.spacing.none,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg,background:nt?et:void 0,[`@media (max-width: ${tt.breakpoints.md})`]:{minHeight:tt.sizes.dropdownItemHeight,height:"auto !important"},"&:hover, &:active, &:focus-visible":{background:et}}});function FixedSizeListItem(tt){const{data:nt,index:et,style:rt}=tt,{item:ot,overrides:at,...st}=nt[et].props;return jsx$1(ThemedStyledDropdownListItem,{style:rt,...st,children:jsx$1(OverflowTooltip,{content:ot.label,placement:Placement.AUTO,children:ot.label})},ot.value)}const VirtualDropdown=React$1.forwardRef((tt,nt)=>{const et=useTheme(),rt=React$1.Children.toArray(tt.children);if(!rt[0]||!rt[0].props.item){const at=rt[0]?rt[0].props:{};return jsx$1(StyledList,{$style:{height:et.sizes.emptyDropdownHeight,paddingBottom:et.spacing.none,paddingTop:et.spacing.none,paddingLeft:et.spacing.none,paddingRight:et.spacing.none,display:"flex",alignItems:"center",justifyContent:"center"},ref:nt,"data-testid":"stSelectboxVirtualDropdownEmpty",children:jsx$1(StyledEmptyState,{$style:{paddingBottom:et.spacing.none,paddingTop:et.spacing.none,paddingLeft:et.spacing.none,paddingRight:et.spacing.none,color:et.colors.fadedText60},...at})})}const ot=Math.min(convertRemToPx(et.sizes.maxDropdownHeight),rt.length*convertRemToPx(et.sizes.dropdownItemHeight));return jsx$1(StyledList,{ref:nt,$style:{paddingTop:0,paddingBottom:0},"data-testid":"stSelectboxVirtualDropdown",children:jsx$1(FixedSizeList,{width:"100%",height:ot,itemCount:rt.length,itemData:rt,itemKey:(at,st)=>st[at].props.item.value,itemSize:convertRemToPx(et.sizes.dropdownItemHeight),children:FixedSizeListItem})})});VirtualDropdown.displayName="VirtualDropdown";const NO_OPTIONS_MSG="No options to select.";function fuzzyFilterSelectOptions(tt,nt){if(!nt)return tt;const et=tt.filter(rt=>hasMatch(nt,rt.label));return sortBy$1(et,rt=>score(nt,rt.label)).reverse()}class Selectbox extends React$1.PureComponent{constructor(){super(...arguments),this.state={isEmpty:!1,value:this.props.value},this.onChange=nt=>{if(nt.value.length===0){this.setState({value:null},()=>this.props.onChange(null));return}const[et]=nt.value;this.setState({value:parseInt(et.value,10)},()=>this.props.onChange(this.state.value))},this.onInputChange=nt=>{const et=nt.target.value;this.setState({isEmpty:!et})},this.onClose=()=>{this.setState({isEmpty:!1})},this.filterOptions=(nt,et)=>fuzzyFilterSelectOptions(nt,et)}componentDidUpdate(nt){nt.value!==this.props.value&&this.state.value!==this.props.value&&this.setState((et,rt)=>({value:rt.value}))}render(){const nt={width:this.props.width},{label:et,labelVisibility:rt,help:ot,placeholder:at,theme:st,clearable:ut}=this.props;let{disabled:ct,options:pt}=this.props,dt=[];!isNullOrUndefined$1(this.state.value)&&!this.state.isEmpty&&(dt=[{label:pt.length>0?pt[this.state.value]:NO_OPTIONS_MSG,value:this.state.value.toString()}]),pt.length===0&&(pt=[NO_OPTIONS_MSG],ct=!0);const ft=pt.map((ht,Mt)=>({label:ht,value:Mt.toString()})),bt=pt.length>10;return jsxs("div",{className:"stSelectbox","data-testid":"stSelectbox",style:nt,children:[jsx$1(WidgetLabel,{label:et,labelVisibility:rt,disabled:ct,children:ot&&jsx$1(StyledWidgetLabelHelp,{children:jsx$1(TooltipIcon,{content:ot,placement:Placement.TOP_RIGHT})})}),jsx$1(Select,{disabled:ct,labelKey:"label","aria-label":et||"",onChange:this.onChange,onInputChange:this.onInputChange,onClose:this.onClose,options:ft,filterOptions:this.filterOptions,clearable:ut||!1,escapeClearsValue:ut||!1,value:dt,valueKey:"value",placeholder:at,overrides:{Root:{style:()=>({lineHeight:st.lineHeights.inputWidget})},Dropdown:{component:VirtualDropdown},ClearIcon:{props:{overrides:{Svg:{style:{color:st.colors.darkGray,padding:st.spacing.threeXS,height:st.sizes.clearIconSize,width:st.sizes.clearIconSize,":hover":{fill:st.colors.bodyText}}}}}},ControlContainer:{style:()=>({height:st.sizes.minElementHeight,borderLeftWidth:st.sizes.borderWidth,borderRightWidth:st.sizes.borderWidth,borderTopWidth:st.sizes.borderWidth,borderBottomWidth:st.sizes.borderWidth})},IconsContainer:{style:()=>({paddingRight:st.spacing.sm})},ValueContainer:{style:()=>({paddingRight:st.spacing.sm,paddingLeft:st.spacing.sm,paddingBottom:st.spacing.sm,paddingTop:st.spacing.sm})},Input:{props:{readOnly:isMobile_1&&bt===!1?"readonly":null},style:()=>({lineHeight:st.lineHeights.inputWidget})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:st.spacing.px})}}}},SelectArrow:{component:ChevronDown$1,props:{overrides:{Svg:{style:()=>({width:st.iconSizes.xl,height:st.iconSizes.xl})}}}}}})]})}}const UISelectbox=withTheme(Selectbox);class CircularBuffer{constructor(nt){this._buffer=new Array(nt),this._size=nt,this._index=0,this._wrappedCount=0}push(nt){this._buffer[this._index]=nt,this._index=(this._index+1)%this._size,this._index===0&&(this._wrappedCount=this._wrappedCount+1)}get buffer(){return this._buffer}get totalWrittenEntries(){return this._wrappedCount*this._size+this._index}}const handleRender=(tt,nt,et,rt,ot,at)=>{window.__streamlit_profiles__=window.__streamlit_profiles__||{},window.__streamlit_profiles__[tt]=window.__streamlit_profiles__[tt]||new CircularBuffer(1e3),window.__streamlit_profiles__[tt].push({phase:nt,actualDuration:et,baseDuration:rt,startTime:ot,commitTime:at})},Profiler=({id:tt,children:nt})=>jsx$1(reactExports.Profiler,{id:tt,onRender:handleRender,children:nt}),useWindowDimensions=()=>{const tt=useTheme(),[nt,et]=reactExports.useState({fullWidth:0,fullHeight:0}),rt=reactExports.useCallback(()=>{const at=convertRemToPx(tt.spacing.md),st=convertRemToPx(tt.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-at*2,fullHeight:window.innerHeight-(at+st)}},[tt.sizes.fullScreenHeaderHeight,tt.spacing.md]),ot=reactExports.useCallback(()=>{et(rt())},[rt]);return reactExports.useEffect(()=>(window.addEventListener("resize",ot),()=>{window.removeEventListener("resize",ot)}),[ot]),reactExports.useEffect(()=>{ot()},[ot]),nt},WindowDimensionsContext=reactExports.createContext(null);WindowDimensionsContext.displayName="WindowDimensionsContext";const WindowDimensionsProvider=({children:tt})=>{const nt=useWindowDimensions();if(reactExports.useContext(WindowDimensionsContext))throw new Error("WindowDimensionsProvider should only be used once per app. If you need to read window dimensions, utilize `useRequiredContext(WindowDimensionsContext)` instead.");return jsx$1(WindowDimensionsContext.Provider,{value:nt,children:tt})};var baseIsEqual=_baseIsEqual;function isEqual(tt,nt){return baseIsEqual(tt,nt)}var isEqual_1=isEqual;const isEqual$1=getDefaultExportFromCjs$1(isEqual_1);let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let tt=0;tt<256;++tt)byteToHex.push((tt+256).toString(16).slice(1));function unsafeStringify(tt,nt=0){return byteToHex[tt[nt+0]]+byteToHex[tt[nt+1]]+byteToHex[tt[nt+2]]+byteToHex[tt[nt+3]]+"-"+byteToHex[tt[nt+4]]+byteToHex[tt[nt+5]]+"-"+byteToHex[tt[nt+6]]+byteToHex[tt[nt+7]]+"-"+byteToHex[tt[nt+8]]+byteToHex[tt[nt+9]]+"-"+byteToHex[tt[nt+10]]+byteToHex[tt[nt+11]]+byteToHex[tt[nt+12]]+byteToHex[tt[nt+13]]+byteToHex[tt[nt+14]]+byteToHex[tt[nt+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(tt,nt,et){if(native.randomUUID&&!nt&&!tt)return native.randomUUID();tt=tt||{};const rt=tt.random||(tt.rng||rng)();return rt[6]=rt[6]&15|64,rt[8]=rt[8]&63|128,unsafeStringify(rt)}class Resolver{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((nt,et)=>{this.resolve=nt,this.reject=et})}}class FileUploadClient{constructor(nt){this.formsWithPendingRequests=new Map,this.pendingFileURLsRequests=new Map,this.sessionInfo=nt.sessionInfo,this.endpoints=nt.endpoints,this.pendingFormUploadsChanged=nt.formsWithPendingRequestsChanged,this.requestFileURLs=nt.requestFileURLs}async uploadFile(nt,et,rt,ot,at){return this.offsetPendingRequestCount(nt.formId,1),this.endpoints.uploadFileUploaderFile(et,rt,this.sessionInfo.current.sessionId,ot,at).finally(()=>this.offsetPendingRequestCount(nt.formId,-1))}deleteFile(nt){return this.endpoints.deleteFileAtURL?this.endpoints.deleteFileAtURL(nt,this.sessionInfo.current.sessionId):Promise.resolve()}fetchFileURLs(nt){if(!this.requestFileURLs)return Promise.resolve([]);const et=new Resolver,rt=v4();return this.pendingFileURLsRequests.set(rt,et),this.requestFileURLs(rt,nt),et.promise}onFileURLsResponse(nt){const et=nt.responseId,rt=this.pendingFileURLsRequests.get(et);rt&&(nt.errorMsg?rt.reject(nt.errorMsg):rt.resolve(nt.fileUrls||[]),this.pendingFileURLsRequests.delete(et))}getFormIdSet(){return new Set(this.formsWithPendingRequests.keys())}offsetPendingRequestCount(nt,et){if(et===0||!isValidFormId(nt))return;const rt=this.formsWithPendingRequests.get(nt)??0,ot=rt+et;if(ot<0)throw new Error(`Can't offset pendingRequestCount below 0 (formId=${nt}, curCount=${rt}, offset=${et})`);const at=this.getFormIdSet();ot===0?this.formsWithPendingRequests.delete(nt):this.formsWithPendingRequests.set(nt,ot);const st=this.getFormIdSet();isEqual$1(st,at)||this.pendingFormUploadsChanged(st)}}class CacheEntry{constructor(nt,et){this.scriptRunCount=0,this.encodedMsg=nt,this.scriptRunCount=et}getAge(nt){return nt-this.scriptRunCount}}class ForwardMsgCache{constructor(nt){this.messages=new Map,this.scriptRunCount=0,this.endpoints=nt}incrementRunCount(nt){this.scriptRunCount+=1,this.messages.forEach((et,rt)=>{et.getAge(this.scriptRunCount)>nt&&this.messages.delete(rt)})}async processMessagePayload(nt,et){if(this.maybeCacheMessage(nt,et),nt.type!=="refHash")return nt;let rt=this.getCachedMessage(nt.refHash,!0);if(notNullOrUndefined(rt))logMessage(`Cached ForwardMsg HIT [hash=${nt.refHash}]`);else{logMessage(`Cached ForwardMsg MISS [hash=${nt.refHash}]`);const ot=await this.endpoints.fetchCachedForwardMsg(nt.refHash);try{rt=ForwardMsg.decode(ot)}catch(at){throw new Error(`Failed to decode ForwardMsg (hash=${nt.refHash}): ${ensureError(at).message}`)}this.maybeCacheMessage(rt,ot)}if(!nt.metadata)throw new Error("ForwardMsg has no metadata");return rt.metadata=ForwardMsg.decode(et).metadata,rt}maybeCacheMessage(nt,et){nt.type!=="refHash"&&(!nt.metadata||!nt.metadata.cacheable||this.getCachedMessage(nt.hash,!0)===void 0&&(logMessage(`Caching ForwardMsg [hash=${nt.hash}]`),this.messages.set(nt.hash,new CacheEntry(et,this.scriptRunCount))))}getCachedMessage(nt,et){const rt=this.messages.get(nt);if(!isNullOrUndefined$1(rt))return et&&(rt.scriptRunCount=this.scriptRunCount),ForwardMsg.decode(rt.encodedMsg)}}var R=class{constructor(tt,nt,et,rt,ot,at){T1(this,"type",3);T1(this,"name","");T1(this,"prefix","");T1(this,"value","");T1(this,"suffix","");T1(this,"modifier",3);this.type=tt,this.name=nt,this.prefix=et,this.value=rt,this.suffix=ot,this.modifier=at}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},be=/[$_\p{ID_Start}]/u,Pe=/[$_\u200C\u200D\p{ID_Continue}]/u,M=".*";function Re(tt,nt){return/^[\x00-\x7F]*$/.test(tt)}function v(tt,nt=!1){let et=[],rt=0;for(;rt<tt.length;){let ot=tt[rt],at=function(st){if(!nt)throw new TypeError(st);et.push({type:"INVALID_CHAR",index:rt,value:tt[rt++]})};if(ot==="*"){et.push({type:"ASTERISK",index:rt,value:tt[rt++]});continue}if(ot==="+"||ot==="?"){et.push({type:"OTHER_MODIFIER",index:rt,value:tt[rt++]});continue}if(ot==="\\"){et.push({type:"ESCAPED_CHAR",index:rt++,value:tt[rt++]});continue}if(ot==="{"){et.push({type:"OPEN",index:rt,value:tt[rt++]});continue}if(ot==="}"){et.push({type:"CLOSE",index:rt,value:tt[rt++]});continue}if(ot===":"){let st="",ut=rt+1;for(;ut<tt.length;){let ct=tt.substr(ut,1);if(ut===rt+1&&be.test(ct)||ut!==rt+1&&Pe.test(ct)){st+=tt[ut++];continue}break}if(!st){at(`Missing parameter name at ${rt}`);continue}et.push({type:"NAME",index:rt,value:st}),rt=ut;continue}if(ot==="("){let st=1,ut="",ct=rt+1,pt=!1;if(tt[ct]==="?"){at(`Pattern cannot start with "?" at ${ct}`);continue}for(;ct<tt.length;){if(!Re(tt[ct])){at(`Invalid character '${tt[ct]}' at ${ct}.`),pt=!0;break}if(tt[ct]==="\\"){ut+=tt[ct++]+tt[ct++];continue}if(tt[ct]===")"){if(st--,st===0){ct++;break}}else if(tt[ct]==="("&&(st++,tt[ct+1]!=="?")){at(`Capturing groups are not allowed at ${ct}`),pt=!0;break}ut+=tt[ct++]}if(pt)continue;if(st){at(`Unbalanced pattern at ${rt}`);continue}if(!ut){at(`Missing pattern at ${rt}`);continue}et.push({type:"REGEX",index:rt,value:ut}),rt=ct;continue}et.push({type:"CHAR",index:rt,value:tt[rt++]})}return et.push({type:"END",index:rt,value:""}),et}function D(tt,nt={}){let et=v(tt);nt.delimiter??(nt.delimiter="/#?"),nt.prefixes??(nt.prefixes="./");let rt=`[^${S(nt.delimiter)}]+?`,ot=[],at=0,st=0,ut=new Set,ct=yt=>{if(st<et.length&&et[st].type===yt)return et[st++].value},pt=()=>ct("OTHER_MODIFIER")??ct("ASTERISK"),dt=yt=>{let vt=ct(yt);if(vt!==void 0)return vt;let{type:At,index:St}=et[st];throw new TypeError(`Unexpected ${At} at ${St}, expected ${yt}`)},ft=()=>{let yt="",vt;for(;vt=ct("CHAR")??ct("ESCAPED_CHAR");)yt+=vt;return yt},bt=yt=>yt,ht=nt.encodePart||bt,Mt="",mt=yt=>{Mt+=yt},Ot=()=>{Mt.length&&(ot.push(new R(3,"","",ht(Mt),"",3)),Mt="")},zt=(yt,vt,At,St,Et)=>{let Tt=3;switch(Et){case"?":Tt=1;break;case"*":Tt=0;break;case"+":Tt=2;break}if(!vt&&!At&&Tt===3){mt(yt);return}if(Ot(),!vt&&!At){if(!yt)return;ot.push(new R(3,"","",ht(yt),"",Tt));return}let Rt;At?At==="*"?Rt=M:Rt=At:Rt=rt;let Ct=2;Rt===rt?(Ct=1,Rt=""):Rt===M&&(Ct=0,Rt="");let wt;if(vt?wt=vt:At&&(wt=at++),ut.has(wt))throw new TypeError(`Duplicate name '${wt}'.`);ut.add(wt),ot.push(new R(Ct,wt,ht(yt),Rt,ht(St),Tt))};for(;st<et.length;){let yt=ct("CHAR"),vt=ct("NAME"),At=ct("REGEX");if(!vt&&!At&&(At=ct("ASTERISK")),vt||At){let Et=yt??"";nt.prefixes.indexOf(Et)===-1&&(mt(Et),Et=""),Ot();let Tt=pt();zt(Et,vt,At,"",Tt);continue}let St=yt??ct("ESCAPED_CHAR");if(St){mt(St);continue}if(ct("OPEN")){let Et=ft(),Tt=ct("NAME"),Rt=ct("REGEX");!Tt&&!Rt&&(Rt=ct("ASTERISK"));let Ct=ft();dt("CLOSE");let wt=pt();zt(Et,Tt,Rt,Ct,wt);continue}Ot(),dt("END")}return ot}function S(tt){return tt.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function X(tt){return tt&&tt.ignoreCase?"ui":"u"}function Z(tt,nt,et){return F(D(tt,et),nt,et)}function k(tt){switch(tt){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function F(tt,nt,et={}){et.delimiter??(et.delimiter="/#?"),et.prefixes??(et.prefixes="./"),et.sensitive??(et.sensitive=!1),et.strict??(et.strict=!1),et.end??(et.end=!0),et.start??(et.start=!0),et.endsWith="";let rt=et.start?"^":"";for(let ut of tt){if(ut.type===3){ut.modifier===3?rt+=S(ut.value):rt+=`(?:${S(ut.value)})${k(ut.modifier)}`;continue}nt&&nt.push(ut.name);let ct=`[^${S(et.delimiter)}]+?`,pt=ut.value;if(ut.type===1?pt=ct:ut.type===0&&(pt=M),!ut.prefix.length&&!ut.suffix.length){ut.modifier===3||ut.modifier===1?rt+=`(${pt})${k(ut.modifier)}`:rt+=`((?:${pt})${k(ut.modifier)})`;continue}if(ut.modifier===3||ut.modifier===1){rt+=`(?:${S(ut.prefix)}(${pt})${S(ut.suffix)})`,rt+=k(ut.modifier);continue}rt+=`(?:${S(ut.prefix)}`,rt+=`((?:${pt})(?:`,rt+=S(ut.suffix),rt+=S(ut.prefix),rt+=`(?:${pt}))*)${S(ut.suffix)})`,ut.modifier===0&&(rt+="?")}let ot=`[${S(et.endsWith)}]|$`,at=`[${S(et.delimiter)}]`;if(et.end)return et.strict||(rt+=`${at}?`),et.endsWith.length?rt+=`(?=${ot})`:rt+="$",new RegExp(rt,X(et));et.strict||(rt+=`(?:${at}(?=${ot}))?`);let st=!1;if(tt.length){let ut=tt[tt.length-1];ut.type===3&&ut.modifier===3&&(st=et.delimiter.indexOf(ut)>-1)}return st||(rt+=`(?=${at}|${ot})`),new RegExp(rt,X(et))}var x={delimiter:"",prefixes:"",sensitive:!0,strict:!0},B={delimiter:".",prefixes:"",sensitive:!0,strict:!0},q={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function J(tt,nt){return tt.length?tt[0]==="/"?!0:!nt||tt.length<2?!1:(tt[0]=="\\"||tt[0]=="{")&&tt[1]=="/":!1}function Q(tt,nt){return tt.startsWith(nt)?tt.substring(nt.length,tt.length):tt}function Ee(tt,nt){return tt.endsWith(nt)?tt.substr(0,tt.length-nt.length):tt}function W(tt){return!tt||tt.length<2?!1:tt[0]==="["||(tt[0]==="\\"||tt[0]==="{")&&tt[1]==="["}var ee=["ftp","file","http","https","ws","wss"];function N(tt){if(!tt)return!0;for(let nt of ee)if(tt.test(nt))return!0;return!1}function te(tt,nt){if(tt=Q(tt,"#"),nt||tt==="")return tt;let et=new URL("https://example.com");return et.hash=tt,et.hash?et.hash.substring(1,et.hash.length):""}function re(tt,nt){if(tt=Q(tt,"?"),nt||tt==="")return tt;let et=new URL("https://example.com");return et.search=tt,et.search?et.search.substring(1,et.search.length):""}function ne(tt,nt){return nt||tt===""?tt:W(tt)?j(tt):z(tt)}function se(tt,nt){if(nt||tt==="")return tt;let et=new URL("https://example.com");return et.password=tt,et.password}function ie(tt,nt){if(nt||tt==="")return tt;let et=new URL("https://example.com");return et.username=tt,et.username}function ae(tt,nt,et){if(et||tt==="")return tt;if(nt&&!ee.includes(nt))return new URL(`${nt}:${tt}`).pathname;let rt=tt[0]=="/";return tt=new URL(rt?tt:"/-"+tt,"https://example.com").pathname,rt||(tt=tt.substring(2,tt.length)),tt}function oe(tt,nt,et){return _(nt)===tt&&(tt=""),et||tt===""?tt:K(tt)}function ce(tt,nt){return tt=Ee(tt,":"),nt||tt===""?tt:y(tt)}function _(tt){switch(tt){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function y(tt){if(tt==="")return tt;if(/^[-+.A-Za-z0-9]*$/.test(tt))return tt.toLowerCase();throw new TypeError(`Invalid protocol '${tt}'.`)}function le(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.username=tt,nt.username}function fe(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.password=tt,nt.password}function z(tt){if(tt==="")return tt;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(tt))throw new TypeError(`Invalid hostname '${tt}'`);let nt=new URL("https://example.com");return nt.hostname=tt,nt.hostname}function j(tt){if(tt==="")return tt;if(/[^0-9a-fA-F[\]:]/g.test(tt))throw new TypeError(`Invalid IPv6 hostname '${tt}'`);return tt.toLowerCase()}function K(tt){if(tt===""||/^[0-9]*$/.test(tt)&&parseInt(tt)<=65535)return tt;throw new TypeError(`Invalid port '${tt}'.`)}function he(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.pathname=tt[0]!=="/"?"/-"+tt:tt,tt[0]!=="/"?nt.pathname.substring(2,nt.pathname.length):nt.pathname}function ue(tt){return tt===""?tt:new URL(`data:${tt}`).pathname}function de(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.search=tt,nt.search.substring(1,nt.search.length)}function pe(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.hash=tt,nt.hash.substring(1,nt.hash.length)}var U1,o1,e1,V0,D1,V1,c1,H1,X1,G1,C0,Y0,Gn,In,Mn,En,d1,Nn,Kn,Sn,Yn,Jn,_n,j1,C1,Zn,Qn,er,tr,y1,nr,Pn,H=(Pn=class{constructor(tt){Q0(this,C0);Q0(this,U1);Q0(this,o1,[]);Q0(this,e1,{});Q0(this,V0,0);Q0(this,D1,1);Q0(this,V1,0);Q0(this,c1,0);Q0(this,H1,0);Q0(this,X1,0);Q0(this,G1,!1);K0(this,U1,tt)}get result(){return _0(this,e1)}parse(){for(K0(this,o1,v(_0(this,U1),!0));_0(this,V0)<_0(this,o1).length;K0(this,V0,_0(this,V0)+_0(this,D1))){if(K0(this,D1,1),_0(this,o1)[_0(this,V0)].type==="END"){if(_0(this,c1)===0){$0(this,C0,In).call(this),$0(this,C0,C1).call(this)?$0(this,C0,Y0).call(this,9,1):$0(this,C0,j1).call(this)?$0(this,C0,Y0).call(this,8,1):$0(this,C0,Y0).call(this,7,0);continue}else if(_0(this,c1)===2){$0(this,C0,Mn).call(this,5);continue}$0(this,C0,Y0).call(this,10,0);break}if(_0(this,H1)>0)if($0(this,C0,Qn).call(this))K0(this,H1,_0(this,H1)-1);else continue;if($0(this,C0,Zn).call(this)){K0(this,H1,_0(this,H1)+1);continue}switch(_0(this,c1)){case 0:$0(this,C0,Nn).call(this)&&$0(this,C0,Mn).call(this,1);break;case 1:if($0(this,C0,Nn).call(this)){$0(this,C0,nr).call(this);let tt=7,nt=1;$0(this,C0,Kn).call(this)?(tt=2,nt=3):_0(this,G1)&&(tt=2),$0(this,C0,Y0).call(this,tt,nt)}break;case 2:$0(this,C0,Sn).call(this)?$0(this,C0,Mn).call(this,3):($0(this,C0,_n).call(this)||$0(this,C0,j1).call(this)||$0(this,C0,C1).call(this))&&$0(this,C0,Mn).call(this,5);break;case 3:$0(this,C0,Yn).call(this)?$0(this,C0,Y0).call(this,4,1):$0(this,C0,Sn).call(this)&&$0(this,C0,Y0).call(this,5,1);break;case 4:$0(this,C0,Sn).call(this)&&$0(this,C0,Y0).call(this,5,1);break;case 5:$0(this,C0,er).call(this)?K0(this,X1,_0(this,X1)+1):$0(this,C0,tr).call(this)&&K0(this,X1,_0(this,X1)-1),$0(this,C0,Jn).call(this)&&!_0(this,X1)?$0(this,C0,Y0).call(this,6,1):$0(this,C0,_n).call(this)?$0(this,C0,Y0).call(this,7,0):$0(this,C0,j1).call(this)?$0(this,C0,Y0).call(this,8,1):$0(this,C0,C1).call(this)&&$0(this,C0,Y0).call(this,9,1);break;case 6:$0(this,C0,_n).call(this)?$0(this,C0,Y0).call(this,7,0):$0(this,C0,j1).call(this)?$0(this,C0,Y0).call(this,8,1):$0(this,C0,C1).call(this)&&$0(this,C0,Y0).call(this,9,1);break;case 7:$0(this,C0,j1).call(this)?$0(this,C0,Y0).call(this,8,1):$0(this,C0,C1).call(this)&&$0(this,C0,Y0).call(this,9,1);break;case 8:$0(this,C0,C1).call(this)&&$0(this,C0,Y0).call(this,9,1);break}}_0(this,e1).hostname!==void 0&&_0(this,e1).port===void 0&&(_0(this,e1).port="")}},U1=new WeakMap,o1=new WeakMap,e1=new WeakMap,V0=new WeakMap,D1=new WeakMap,V1=new WeakMap,c1=new WeakMap,H1=new WeakMap,X1=new WeakMap,G1=new WeakMap,C0=new WeakSet,Y0=function(tt,nt){var et,rt,ot;switch(_0(this,c1)){case 0:break;case 1:_0(this,e1).protocol=$0(this,C0,y1).call(this);break;case 2:break;case 3:_0(this,e1).username=$0(this,C0,y1).call(this);break;case 4:_0(this,e1).password=$0(this,C0,y1).call(this);break;case 5:_0(this,e1).hostname=$0(this,C0,y1).call(this);break;case 6:_0(this,e1).port=$0(this,C0,y1).call(this);break;case 7:_0(this,e1).pathname=$0(this,C0,y1).call(this);break;case 8:_0(this,e1).search=$0(this,C0,y1).call(this);break;case 9:_0(this,e1).hash=$0(this,C0,y1).call(this);break}_0(this,c1)!==0&&tt!==10&&([1,2,3,4].includes(_0(this,c1))&&[6,7,8,9].includes(tt)&&((et=_0(this,e1)).hostname??(et.hostname="")),[1,2,3,4,5,6].includes(_0(this,c1))&&[8,9].includes(tt)&&((rt=_0(this,e1)).pathname??(rt.pathname=_0(this,G1)?"/":"")),[1,2,3,4,5,6,7].includes(_0(this,c1))&&tt===9&&((ot=_0(this,e1)).search??(ot.search=""))),$0(this,C0,Gn).call(this,tt,nt)},Gn=function(tt,nt){K0(this,c1,tt),K0(this,V1,_0(this,V0)+nt),K0(this,V0,_0(this,V0)+nt),K0(this,D1,0)},In=function(){K0(this,V0,_0(this,V1)),K0(this,D1,0)},Mn=function(tt){$0(this,C0,In).call(this),K0(this,c1,tt)},En=function(tt){return tt<0&&(tt=_0(this,o1).length-tt),tt<_0(this,o1).length?_0(this,o1)[tt]:_0(this,o1)[_0(this,o1).length-1]},d1=function(tt,nt){let et=$0(this,C0,En).call(this,tt);return et.value===nt&&(et.type==="CHAR"||et.type==="ESCAPED_CHAR"||et.type==="INVALID_CHAR")},Nn=function(){return $0(this,C0,d1).call(this,_0(this,V0),":")},Kn=function(){return $0(this,C0,d1).call(this,_0(this,V0)+1,"/")&&$0(this,C0,d1).call(this,_0(this,V0)+2,"/")},Sn=function(){return $0(this,C0,d1).call(this,_0(this,V0),"@")},Yn=function(){return $0(this,C0,d1).call(this,_0(this,V0),":")},Jn=function(){return $0(this,C0,d1).call(this,_0(this,V0),":")},_n=function(){return $0(this,C0,d1).call(this,_0(this,V0),"/")},j1=function(){if($0(this,C0,d1).call(this,_0(this,V0),"?"))return!0;if(_0(this,o1)[_0(this,V0)].value!=="?")return!1;let tt=$0(this,C0,En).call(this,_0(this,V0)-1);return tt.type!=="NAME"&&tt.type!=="REGEX"&&tt.type!=="CLOSE"&&tt.type!=="ASTERISK"},C1=function(){return $0(this,C0,d1).call(this,_0(this,V0),"#")},Zn=function(){return _0(this,o1)[_0(this,V0)].type=="OPEN"},Qn=function(){return _0(this,o1)[_0(this,V0)].type=="CLOSE"},er=function(){return $0(this,C0,d1).call(this,_0(this,V0),"[")},tr=function(){return $0(this,C0,d1).call(this,_0(this,V0),"]")},y1=function(){let tt=_0(this,o1)[_0(this,V0)],nt=$0(this,C0,En).call(this,_0(this,V1)).index;return _0(this,U1).substring(nt,tt.index)},nr=function(){let tt={};Object.assign(tt,x),tt.encodePart=y;let nt=Z($0(this,C0,y1).call(this),void 0,tt);K0(this,G1,N(nt))},Pn),G=["protocol","username","password","hostname","port","pathname","search","hash"],E="*";function ge(tt,nt){if(typeof tt!="string")throw new TypeError("parameter 1 is not of type 'string'.");let et=new URL(tt,nt);return{protocol:et.protocol.substring(0,et.protocol.length-1),username:et.username,password:et.password,hostname:et.hostname,port:et.port,pathname:et.pathname,search:et.search!==""?et.search.substring(1,et.search.length):void 0,hash:et.hash!==""?et.hash.substring(1,et.hash.length):void 0}}function b(tt,nt){return nt?C(tt):tt}function w(tt,nt,et){let rt;if(typeof nt.baseURL=="string")try{rt=new URL(nt.baseURL),nt.protocol===void 0&&(tt.protocol=b(rt.protocol.substring(0,rt.protocol.length-1),et)),!et&&nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.username===void 0&&(tt.username=b(rt.username,et)),!et&&nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.username===void 0&&nt.password===void 0&&(tt.password=b(rt.password,et)),nt.protocol===void 0&&nt.hostname===void 0&&(tt.hostname=b(rt.hostname,et)),nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&(tt.port=b(rt.port,et)),nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.pathname===void 0&&(tt.pathname=b(rt.pathname,et)),nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.pathname===void 0&&nt.search===void 0&&(tt.search=b(rt.search.substring(1,rt.search.length),et)),nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.pathname===void 0&&nt.search===void 0&&nt.hash===void 0&&(tt.hash=b(rt.hash.substring(1,rt.hash.length),et))}catch{throw new TypeError(`invalid baseURL '${nt.baseURL}'.`)}if(typeof nt.protocol=="string"&&(tt.protocol=ce(nt.protocol,et)),typeof nt.username=="string"&&(tt.username=ie(nt.username,et)),typeof nt.password=="string"&&(tt.password=se(nt.password,et)),typeof nt.hostname=="string"&&(tt.hostname=ne(nt.hostname,et)),typeof nt.port=="string"&&(tt.port=oe(nt.port,tt.protocol,et)),typeof nt.pathname=="string"){if(tt.pathname=nt.pathname,rt&&!J(tt.pathname,et)){let ot=rt.pathname.lastIndexOf("/");ot>=0&&(tt.pathname=b(rt.pathname.substring(0,ot+1),et)+tt.pathname)}tt.pathname=ae(tt.pathname,tt.protocol,et)}return typeof nt.search=="string"&&(tt.search=re(nt.search,et)),typeof nt.hash=="string"&&(tt.hash=te(nt.hash,et)),tt}function C(tt){return tt.replace(/([+*?:{}()\\])/g,"\\$1")}function Oe(tt){return tt.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function ke(tt,nt){nt.delimiter??(nt.delimiter="/#?"),nt.prefixes??(nt.prefixes="./"),nt.sensitive??(nt.sensitive=!1),nt.strict??(nt.strict=!1),nt.end??(nt.end=!0),nt.start??(nt.start=!0),nt.endsWith="";let et=".*",rt=`[^${Oe(nt.delimiter)}]+?`,ot=/[$_\u200C\u200D\p{ID_Continue}]/u,at="";for(let st=0;st<tt.length;++st){let ut=tt[st];if(ut.type===3){if(ut.modifier===3){at+=C(ut.value);continue}at+=`{${C(ut.value)}}${k(ut.modifier)}`;continue}let ct=ut.hasCustomName(),pt=!!ut.suffix.length||!!ut.prefix.length&&(ut.prefix.length!==1||!nt.prefixes.includes(ut.prefix)),dt=st>0?tt[st-1]:null,ft=st<tt.length-1?tt[st+1]:null;if(!pt&&ct&&ut.type===1&&ut.modifier===3&&ft&&!ft.prefix.length&&!ft.suffix.length)if(ft.type===3){let bt=ft.value.length>0?ft.value[0]:"";pt=ot.test(bt)}else pt=!ft.hasCustomName();if(!pt&&!ut.prefix.length&&dt&&dt.type===3){let bt=dt.value[dt.value.length-1];pt=nt.prefixes.includes(bt)}pt&&(at+="{"),at+=C(ut.prefix),ct&&(at+=`:${ut.name}`),ut.type===2?at+=`(${ut.value})`:ut.type===1?ct||(at+=`(${rt})`):ut.type===0&&(!ct&&(!dt||dt.type===3||dt.modifier!==3||pt||ut.prefix!=="")?at+="*":at+=`(${et})`),ut.type===1&&ct&&ut.suffix.length&&ot.test(ut.suffix[0])&&(at+="\\"),at+=C(ut.suffix),pt&&(at+="}"),ut.modifier!==3&&(at+=k(ut.modifier))}return at}var A1,$1,K1,t1,h1,Y1,jn,me=(jn=class{constructor(tt={},nt,et){Q0(this,A1);Q0(this,$1,{});Q0(this,K1,{});Q0(this,t1,{});Q0(this,h1,{});Q0(this,Y1,!1);try{let rt;if(typeof nt=="string"?rt=nt:et=nt,typeof tt=="string"){let ut=new H(tt);if(ut.parse(),tt=ut.result,rt===void 0&&typeof tt.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");tt.baseURL=rt}else{if(!tt||typeof tt!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(rt)throw new TypeError("parameter 1 is not of type 'string'.")}typeof et>"u"&&(et={ignoreCase:!1});let ot={ignoreCase:et.ignoreCase===!0};K0(this,A1,w({pathname:E,protocol:E,username:E,password:E,hostname:E,port:E,search:E,hash:E},tt,!0)),_(_0(this,A1).protocol)===_0(this,A1).port&&(_0(this,A1).port="");let st;for(st of G){if(!(st in _0(this,A1)))continue;let ut={},ct=_0(this,A1)[st];switch(_0(this,K1)[st]=[],st){case"protocol":Object.assign(ut,x),ut.encodePart=y;break;case"username":Object.assign(ut,x),ut.encodePart=le;break;case"password":Object.assign(ut,x),ut.encodePart=fe;break;case"hostname":Object.assign(ut,B),W(ct)?ut.encodePart=j:ut.encodePart=z;break;case"port":Object.assign(ut,x),ut.encodePart=K;break;case"pathname":N(_0(this,$1).protocol)?(Object.assign(ut,q,ot),ut.encodePart=he):(Object.assign(ut,x,ot),ut.encodePart=ue);break;case"search":Object.assign(ut,x,ot),ut.encodePart=de;break;case"hash":Object.assign(ut,x,ot),ut.encodePart=pe;break}try{_0(this,h1)[st]=D(ct,ut),_0(this,$1)[st]=F(_0(this,h1)[st],_0(this,K1)[st],ut),_0(this,t1)[st]=ke(_0(this,h1)[st],ut),K0(this,Y1,_0(this,Y1)||_0(this,h1)[st].some(pt=>pt.type===2))}catch{throw new TypeError(`invalid ${st} pattern '${_0(this,A1)[st]}'.`)}}}catch(rt){throw new TypeError(`Failed to construct 'URLPattern': ${rt.message}`)}}test(tt={},nt){let et={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof tt!="string"&&nt)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof tt>"u")return!1;try{typeof tt=="object"?et=w(et,tt,!1):et=w(et,ge(tt,nt),!1)}catch{return!1}let rt;for(rt of G)if(!_0(this,$1)[rt].exec(et[rt]))return!1;return!0}exec(tt={},nt){let et={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof tt!="string"&&nt)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof tt>"u")return;try{typeof tt=="object"?et=w(et,tt,!1):et=w(et,ge(tt,nt),!1)}catch{return null}let rt={};nt?rt.inputs=[tt,nt]:rt.inputs=[tt];let ot;for(ot of G){let at=_0(this,$1)[ot].exec(et[ot]);if(!at)return null;let st={};for(let[ut,ct]of _0(this,K1)[ot].entries())if(typeof ct=="string"||typeof ct=="number"){let pt=at[ut+1];st[ct]=pt}rt[ot]={input:et[ot]??"",groups:st}}return rt}static compareComponent(tt,nt,et){let rt=(ut,ct)=>{for(let pt of["type","modifier","prefix","value","suffix"]){if(ut[pt]<ct[pt])return-1;if(ut[pt]!==ct[pt])return 1}return 0},ot=new R(3,"","","","",3),at=new R(0,"","","","",3),st=(ut,ct)=>{let pt=0;for(;pt<Math.min(ut.length,ct.length);++pt){let dt=rt(ut[pt],ct[pt]);if(dt)return dt}return ut.length===ct.length?0:rt(ut[pt]??ot,ct[pt]??ot)};return!_0(nt,t1)[tt]&&!_0(et,t1)[tt]?0:_0(nt,t1)[tt]&&!_0(et,t1)[tt]?st(_0(nt,h1)[tt],[at]):!_0(nt,t1)[tt]&&_0(et,t1)[tt]?st([at],_0(et,h1)[tt]):st(_0(nt,h1)[tt],_0(et,h1)[tt])}get protocol(){return _0(this,t1).protocol}get username(){return _0(this,t1).username}get password(){return _0(this,t1).password}get hostname(){return _0(this,t1).hostname}get port(){return _0(this,t1).port}get pathname(){return _0(this,t1).pathname}get search(){return _0(this,t1).search}get hash(){return _0(this,t1).hash}get hasRegExpGroups(){return _0(this,Y1)}},A1=new WeakMap,$1=new WeakMap,K1=new WeakMap,t1=new WeakMap,h1=new WeakMap,Y1=new WeakMap,jn);globalThis.URLPattern||(globalThis.URLPattern=me);var baseSlice=_baseSlice,toInteger=toInteger_1;function take(tt,nt,et){return tt&&tt.length?(nt=et||nt===void 0?1:toInteger(nt),baseSlice(tt,0,nt<0?0:nt)):[]}var take_1=take;const take$1=getDefaultExportFromCjs$1(take_1),FINAL_SLASH_RE=/\/+$/,INITIAL_SLASH_RE=/^\/+/;function getWindowBaseUriParts(){const tt=window.location.hostname;let nt;window.location.port?nt=Number(window.location.port):nt=isHttps()?443:80;const et=window.location.pathname.replace(FINAL_SLASH_RE,"").replace(INITIAL_SLASH_RE,"");return{host:tt,port:nt,basePath:et}}function getPossibleBaseUris(){const tt=getWindowBaseUriParts(),{basePath:nt}=tt;if(!nt)return[tt];const et=nt.split("/"),rt=[];for(;et.length>0;)rt.push({...tt,basePath:et.join("/")}),et.pop();return rt.push({...tt,basePath:""}),take$1(rt,2)}function buildWsUri({host:tt,port:nt,basePath:et},rt){const ot=isHttps()?"wss":"ws",at=makePath(et,rt);return`${ot}://${tt}:${nt}/${at}`}function buildHttpUri({host:tt,port:nt,basePath:et},rt){const ot=isHttps()?"https":"http",at=makePath(et,rt);return`${ot}://${tt}:${nt}/${at}`}function makePath(tt,nt){return tt=tt.replace(FINAL_SLASH_RE,"").replace(INITIAL_SLASH_RE,""),nt=nt.replace(FINAL_SLASH_RE,"").replace(INITIAL_SLASH_RE,""),tt.length===0?nt:`${tt}/${nt}`}function isHttps(){return window.location.href.startsWith("https://")}function isValidOrigin(tt,nt){let et,rt,ot;try{et=new URLPattern(tt),rt=new URLPattern({protocol:et.protocol,hostname:et.hostname}),ot=new URL(nt)}catch{return!1}return ot.hostname==="localhost"&&rt.test(ot)?!0:et.test(ot)}const HOST_COMM_VERSION=1;class HostCommunicationManager{constructor(nt){this.openHostCommunication=()=>{window.addEventListener("message",this.receiveHostMessage),this.sendMessageToHost({type:"GUEST_READY",streamlitExecutionStartedAt:this.props.streamlitExecutionStartedAt,guestReadyAt:Date.now()})},this.closeHostCommunication=()=>{window.removeEventListener("message",this.receiveHostMessage)},this.resetAuthToken=()=>{this.deferredAuthToken=new Resolver},this.claimAuthToken=()=>this.deferredAuthToken.promise,this.setAllowedOrigins=({allowedOrigins:et,useExternalAuthToken:rt})=>{rt||this.deferredAuthToken.resolve(void 0),et!=null&&et.length&&(this.allowedOrigins=et,this.openHostCommunication())},this.sendMessageToHost=et=>{window.parent.postMessage({stCommVersion:HOST_COMM_VERSION,...et},"*")},this.receiveHostMessage=et=>{const rt=et.data;if(!(rt.stCommVersion!==HOST_COMM_VERSION||!this.allowedOrigins.find(ot=>isValidOrigin(ot,et.origin)))){if(rt.type==="CLOSE_MODAL"&&this.props.closeModal(),rt.type==="STOP_SCRIPT"&&this.props.stopScript(),rt.type==="RERUN_SCRIPT"&&this.props.rerunScript(),rt.type==="CLEAR_CACHE"&&this.props.clearCache(),rt.type==="REQUEST_PAGE_CHANGE"&&this.props.pageChanged(rt.pageScriptHash),rt.type==="SEND_APP_HEARTBEAT"&&this.props.sendAppHeartbeat(),rt.type==="SET_INPUTS_DISABLED"&&this.props.setInputsDisabled(rt.disabled),rt.type==="SET_AUTH_TOKEN"&&this.deferredAuthToken.resolve(rt.authToken),rt.type==="SET_FILE_UPLOAD_CLIENT_CONFIG"){const{prefix:ot,headers:at}=rt;this.props.fileUploadClientConfigChanged({prefix:ot,headers:at})}rt.type==="SET_IS_OWNER"&&this.props.isOwnerChanged(rt.isOwner),rt.type==="SET_MENU_ITEMS"&&this.props.hostMenuItemsChanged(rt.items),rt.type==="SET_METADATA"&&this.props.deployedAppMetadataChanged(rt.metadata),rt.type==="SET_PAGE_LINK_BASE_URL"&&this.props.pageLinkBaseUrlChanged(rt.pageLinkBaseUrl),rt.type==="SET_SIDEBAR_CHEVRON_DOWNSHIFT"&&this.props.sidebarChevronDownshiftChanged(rt.sidebarChevronDownshift),rt.type==="SET_SIDEBAR_NAV_VISIBILITY"&&this.props.hostHideSidebarNavChanged(rt.hidden),rt.type==="SET_TOOLBAR_ITEMS"&&this.props.hostToolbarItemsChanged(rt.items),rt.type==="UPDATE_FROM_QUERY_PARAMS"&&(this.props.queryParamsChanged(rt.queryParams),this.props.sendRerunBackMsg()),rt.type==="UPDATE_HASH"&&(window.location.hash=rt.hash),rt.type==="SET_CUSTOM_THEME_CONFIG"&&this.props.themeChanged(rt.themeName,rt.themeInfo),rt.type==="RESTART_WEBSOCKET_CONNECTION"&&this.props.restartWebsocketConnection(),rt.type==="TERMINATE_WEBSOCKET_CONNECTION"&&this.props.terminateWebsocketConnection()}},this.props=nt,this.allowedOrigins=[],this.deferredAuthToken=new Resolver}}class SessionInfo{get current(){if(!this._current)throw new Error("Tried to use SessionInfo before it was initialized");return this._current}get last(){return this._last}setCurrent(nt){this._last=notNullOrUndefined(this._current)?{...this._current}:void 0,this._current=notNullOrUndefined(nt)?{...nt}:void 0}clearCurrent(){this.setCurrent(void 0)}get isSet(){return notNullOrUndefined(this._current)}get isHello(){return notNullOrUndefined(this._current)&&this._current.isHello}static propsFromNewSessionMessage(nt){const et=nt.initialize,rt=nt.config,ot=et.userInfo,at=et.environmentInfo;return{appId:hashString(ot.installationIdV3+nt.mainScriptPath),sessionId:et.sessionId,streamlitVersion:at.streamlitVersion,pythonVersion:at.pythonVersion,installationId:ot.installationId,installationIdV3:ot.installationIdV3,maxCachedMessageAge:rt.maxCachedMessageAge,isHello:et.isHello}}}function findNextEventIndex(tt,nt,et){const rt=typeof nt=="number"?nt:tt.indexOf(nt);for(let ot=rt;ot<tt.length;++ot)if(et(tt[ot]))return ot}function findPrevEventIndex(tt,nt,et){const rt=typeof nt=="number"?nt:tt.indexOf(nt);for(let ot=rt;ot>=0;--ot){const at=tt[ot];if(et(at))return ot}}function findPrevEvent(tt,nt,et){const rt=findPrevEventIndex(tt,nt,et);return rt!==void 0?tt[rt]:void 0}function isHandleMessageEvent(tt){return tt.messageIndex!==void 0}function getTimeDelta(tt,nt){return Math.abs(nt.timestamp-tt.timestamp)}class RerunAnalyzer{constructor(nt,et){this.getResults=()=>{const ot=new Set;if(this.rerunEvents.forEach(pt=>{isHandleMessageEvent(pt)&&ot.add(pt.messageIndex)}),ot.size===0)return"No rerun messages found!";const at=Array.from(ot).sort(compareNumbers),st=this.rerunEvents[this.rerunEvents.length-1],ut=this.rerunEvents[0],ct={messages:at.map(this.getMessageAnalysis),rerunDuration:getTimeDelta(ut,st)};return this.requestedRerun!==void 0&&(ct.requestedRerun=!0,ct.scriptRunStateAtStart=this.requestedRerun.scriptRunState,ct.requestToRerunStart=getTimeDelta(this.requestedRerun,ut)),ct},this.getMessageAnalysis=ot=>{const at=[];let st=0;for(;st<this.rerunEvents.length;){const dt=findNextMessageEvent(this.rerunEvents,st,ot);if(dt===void 0)break;at.push(this.rerunEvents[dt]),st=dt+1}if(at.length===0)throw new Error(`No messages for the given index: ${ot}`);const ut=at[0],ct=at[at.length-1],pt={messageIndex:ot,duration:getTimeDelta(ut,ct),steps:[]};for(let dt=1;dt<at.length;++dt){const ft=at[dt-1],bt=at[dt];bt.name==="DecodedMessage"&&(pt.messageType=bt.messageType,pt.len=bt.len),pt.steps.push({name:bt.name,duration:getTimeDelta(ft,bt)})}return pt};const rt=findRunStartEventIndex(nt,et);if(rt===void 0)throw new Error("Unable to find run start!");this.rerunEvents=nt.slice(rt,et+1),this.requestedRerun=findPrevEvent(nt,rt-1,ot=>ot.name==="RequestedRerun")}}function compareNumbers(tt,nt){return tt<nt?-1:tt>nt?1:0}function findRunStartEventIndex(tt,nt){const et=findPrevEventIndex(tt,nt-1,ot=>ot.name==="DecodedMessage"&&ot.messageType==="newSession");if(et===void 0)return;const{messageIndex:rt}=tt[et];return findPrevEventIndex(tt,et,ot=>ot.name==="BeginHandleMessage"&&ot.messageIndex===rt)}function findNextMessageEvent(tt,nt,et){return findNextEventIndex(tt,nt,rt=>isHandleMessageEvent(rt)&&rt.messageIndex===et)}function getRerunAnalysis(tt,nt){return new RerunAnalyzer(tt,tt.length-1).getResults()}const Tn=class Tn{static record(nt){this.enabled&&(nt.timestamp=performance.now(),this.events.push(nt),nt.name==="DispatchedMessage"&&nt.messageType==="scriptFinished"&&(logMessage("Rerun results",getRerunAnalysis(this.events)),this.events=[]))}};Tn.enabled=!1,Tn.events=[];let PerformanceEvents=Tn;var Un;const nonce=((Un=document.currentScript)==null?void 0:Un.nonce)||"",cache=createCache({key:"st-emotion-cache",...nonce&&{nonce}});function RootStyleProvider(tt){const{children:nt,theme:et}=tt;return jsx$1(BaseProvider,{theme:et.basewebTheme,zIndex:et.emotion.zIndices.popupMenu,children:jsx$1(CacheProvider,{value:cache,children:jsxs(ThemeProvider$2,{theme:et.emotion,children:[jsx$1(Global,{styles:[globalStyles]}),nt]})})})}class Timer{constructor(){this.duration=0,this.startTime=0,this.running=!1}get isRunning(){return this.running}get remainingTime(){if(!this.running)return 0;const nt=Date.now()-this.startTime;return Math.max(this.duration-nt,0)}setTimeout(nt,et){this.cancel(),this.startTime=Date.now(),this.duration=et,this.running=!0,this.timerHandle=window.setTimeout(()=>{this.running=!1,nt()},et)}cancel(){this.timerHandle!==void 0&&(window.clearTimeout(this.timerHandle),this.timerHandle=void 0,this.running=!1)}}var src={exports:{}},indexLight={exports:{}},util$2={exports:{}},codegen_1=codegen;function codegen(tt,nt){typeof tt=="string"&&(nt=tt,tt=void 0);var et=[];function rt(at){if(typeof at!="string"){var st=ot();if(codegen.verbose&&console.log("codegen: "+st),st="return "+st,at){for(var ut=Object.keys(at),ct=new Array(ut.length+1),pt=new Array(ut.length),dt=0;dt<ut.length;)ct[dt]=ut[dt],pt[dt]=at[ut[dt++]];return ct[dt]=st,Function.apply(null,ct).apply(null,pt)}return Function(st)()}for(var ft=new Array(arguments.length-1),bt=0;bt<ft.length;)ft[bt]=arguments[++bt];if(bt=0,at=at.replace(/%([%dfijs])/g,function(Mt,mt){var Ot=ft[bt++];switch(mt){case"d":case"f":return String(Number(Ot));case"i":return String(Math.floor(Ot));case"j":return JSON.stringify(Ot);case"s":return String(Ot)}return"%"}),bt!==ft.length)throw Error("parameter count mismatch");return et.push(at),rt}function ot(at){return"function "+(at||nt||"")+"("+(tt&&tt.join(",")||"")+`){
|
724
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray(tt,nt)}}function _arrayLikeToArray(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles(tt){if(Array.isArray(tt))return tt}function _objectWithoutProperties$1(tt,nt){if(tt==null)return{};var et=_objectWithoutPropertiesLoose$1(tt,nt),rt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(tt);for(ot=0;ot<at.length;ot++)rt=at[ot],!(nt.indexOf(rt)>=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(et[rt]=tt[rt])}return et}function _objectWithoutPropertiesLoose$1(tt,nt){if(tt==null)return{};var et={},rt=Object.keys(tt),ot,at;for(at=0;at<rt.length;at++)ot=rt[at],!(nt.indexOf(ot)>=0)&&(et[ot]=tt[ot]);return et}function Value(tt){var nt=tt.overrides,et=nt===void 0?{}:nt,rt=_objectWithoutProperties$1(tt,_excluded$1),ot=getOverrides(et.SingleValue,StyledSingleValue),at=_slicedToArray(ot,2),st=at[0],ut=at[1];return reactExports.createElement(st,_extends$2({},rt,ut),tt.children)}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_extends$1.apply(this,arguments)}function Select(tt){return reactExports.createElement(Select$1,_extends$1({},tt,{valueComponent:tt.multi?MultiValue:Value}))}var SCORE_MIN=-1/0,SCORE_MAX=1/0,SCORE_GAP_LEADING=-.005,SCORE_GAP_TRAILING=-.005,SCORE_GAP_INNER=-.01,SCORE_MATCH_CONSECUTIVE=1,SCORE_MATCH_SLASH=.9,SCORE_MATCH_WORD=.8,SCORE_MATCH_CAPITAL=.7,SCORE_MATCH_DOT=.6;function islower(tt){return tt.toLowerCase()===tt}function isupper(tt){return tt.toUpperCase()===tt}function precompute_bonus(tt){for(var nt=tt.length,et=new Array(nt),rt="/",ot=0;ot<nt;ot++){var at=tt[ot];rt==="/"?et[ot]=SCORE_MATCH_SLASH:rt==="-"||rt==="_"||rt===" "?et[ot]=SCORE_MATCH_WORD:rt==="."?et[ot]=SCORE_MATCH_DOT:islower(rt)&&isupper(at)?et[ot]=SCORE_MATCH_CAPITAL:et[ot]=0,rt=at}return et}function compute(tt,nt,et,rt){for(var ot=tt.length,at=nt.length,st=tt.toLowerCase(),ut=nt.toLowerCase(),ct=precompute_bonus(nt),pt=0;pt<ot;pt++){et[pt]=new Array(at),rt[pt]=new Array(at);for(var dt=SCORE_MIN,ft=pt===ot-1?SCORE_GAP_TRAILING:SCORE_GAP_INNER,bt=0;bt<at;bt++)if(st[pt]===ut[bt]){var ht=SCORE_MIN;pt?bt&&(ht=Math.max(rt[pt-1][bt-1]+ct[bt],et[pt-1][bt-1]+SCORE_MATCH_CONSECUTIVE)):ht=bt*SCORE_GAP_LEADING+ct[bt],et[pt][bt]=ht,rt[pt][bt]=dt=Math.max(ht,dt+ft)}else et[pt][bt]=SCORE_MIN,rt[pt][bt]=dt=dt+ft}}function score(tt,nt){var et=tt.length,rt=nt.length;if(!et||!rt)return SCORE_MIN;if(et===rt)return SCORE_MAX;if(rt>1024)return SCORE_MIN;var ot=new Array(et),at=new Array(et);return compute(tt,nt,ot,at),at[et-1][rt-1]}function hasMatch(tt,nt){tt=tt.toLowerCase(),nt=nt.toLowerCase();for(var et=tt.length,rt=0,ot=0;rt<et;rt+=1)if(ot=nt.indexOf(tt[rt],ot)+1,ot===0)return!1;return!0}function baseSortBy$1(tt,nt){var et=tt.length;for(tt.sort(nt);et--;)tt[et]=tt[et].value;return tt}var _baseSortBy=baseSortBy$1,isSymbol=isSymbol_1;function compareAscending$1(tt,nt){if(tt!==nt){var et=tt!==void 0,rt=tt===null,ot=tt===tt,at=isSymbol(tt),st=nt!==void 0,ut=nt===null,ct=nt===nt,pt=isSymbol(nt);if(!ut&&!pt&&!at&&tt>nt||at&&st&&ct&&!ut&&!pt||rt&&st&&ct||!et&&ct||!ot)return 1;if(!rt&&!at&&!pt&&tt<nt||pt&&et&&ot&&!rt&&!at||ut&&et&&ot||!st&&ot||!ct)return-1}return 0}var _compareAscending=compareAscending$1,compareAscending=_compareAscending;function compareMultiple$1(tt,nt,et){for(var rt=-1,ot=tt.criteria,at=nt.criteria,st=ot.length,ut=et.length;++rt<st;){var ct=compareAscending(ot[rt],at[rt]);if(ct){if(rt>=ut)return ct;var pt=et[rt];return ct*(pt=="desc"?-1:1)}}return tt.index-nt.index}var _compareMultiple=compareMultiple$1,arrayMap$1=_arrayMap,baseGet$1=_baseGet,baseIteratee$2=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary$1=_baseUnary,compareMultiple=_compareMultiple,identity=identity_1,isArray$2=isArray_1;function baseOrderBy$1(tt,nt,et){nt.length?nt=arrayMap$1(nt,function(at){return isArray$2(at)?function(st){return baseGet$1(st,at.length===1?at[0]:at)}:at}):nt=[identity];var rt=-1;nt=arrayMap$1(nt,baseUnary$1(baseIteratee$2));var ot=baseMap(tt,function(at,st,ut){var ct=arrayMap$1(nt,function(pt){return pt(at)});return{criteria:ct,index:++rt,value:at}});return baseSortBy(ot,function(at,st){return compareMultiple(at,st,et)})}var _baseOrderBy=baseOrderBy$1,baseFlatten=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest$1=_baseRest,isIterateeCall=_isIterateeCall,sortBy=baseRest$1(function(tt,nt){if(tt==null)return[];var et=nt.length;return et>1&&isIterateeCall(tt,nt[0],nt[1])?nt=[]:et>2&&isIterateeCall(nt[0],nt[1],nt[2])&&(nt=[nt[0]]),baseOrderBy(tt,baseFlatten(nt,1),[])}),sortBy_1=sortBy;const sortBy$1=getDefaultExportFromCjs$1(sortBy_1);var safeIsNaN=Number.isNaN||function tt(nt){return typeof nt=="number"&&nt!==nt};function isEqual$2(tt,nt){return!!(tt===nt||safeIsNaN(tt)&&safeIsNaN(nt))}function areInputsEqual(tt,nt){if(tt.length!==nt.length)return!1;for(var et=0;et<tt.length;et++)if(!isEqual$2(tt[et],nt[et]))return!1;return!0}function memoizeOne(tt,nt){nt===void 0&&(nt=areInputsEqual);var et,rt=[],ot,at=!1;function st(){for(var ut=[],ct=0;ct<arguments.length;ct++)ut[ct]=arguments[ct];return at&&et===this&&nt(ut,rt)||(ot=tt.apply(this,ut),at=!0,et=this,rt=ut),ot}return st}var hasNativePerformanceNow=typeof performance=="object"&&typeof performance.now=="function",now=hasNativePerformanceNow?function(){return performance.now()}:function(){return Date.now()};function cancelTimeout(tt){cancelAnimationFrame(tt.id)}function requestTimeout(tt,nt){var et=now();function rt(){now()-et>=nt?tt.call(null):ot.id=requestAnimationFrame(rt)}var ot={id:requestAnimationFrame(rt)};return ot}var size=-1;function getScrollbarSize(tt){if(tt===void 0&&(tt=!1),size===-1||tt){var nt=document.createElement("div"),et=nt.style;et.width="50px",et.height="50px",et.overflow="scroll",document.body.appendChild(nt),size=nt.offsetWidth-nt.clientWidth,document.body.removeChild(nt)}return size}var cachedRTLResult=null;function getRTLOffsetType(tt){if(tt===void 0&&(tt=!1),cachedRTLResult===null||tt){var nt=document.createElement("div"),et=nt.style;et.width="50px",et.height="50px",et.overflow="scroll",et.direction="rtl";var rt=document.createElement("div"),ot=rt.style;return ot.width="100px",ot.height="100px",nt.appendChild(rt),document.body.appendChild(nt),nt.scrollLeft>0?cachedRTLResult="positive-descending":(nt.scrollLeft=1,nt.scrollLeft===0?cachedRTLResult="negative":cachedRTLResult="positive-ascending"),document.body.removeChild(nt),cachedRTLResult}return cachedRTLResult}var IS_SCROLLING_DEBOUNCE_INTERVAL$1=150,defaultItemKey$1=function tt(nt,et){return nt};function createListComponent(tt){var nt,et=tt.getItemOffset,rt=tt.getEstimatedTotalSize,ot=tt.getItemSize,at=tt.getOffsetForIndexAndAlignment,st=tt.getStartIndexForOffset,ut=tt.getStopIndexForStartIndex,ct=tt.initInstanceProps,pt=tt.shouldResetStyleCacheOnItemSizeChange,dt=tt.validateProps;return nt=function(ft){_inheritsLoose(bt,ft);function bt(Mt){var mt;return mt=ft.call(this,Mt)||this,mt._instanceProps=ct(mt.props,_assertThisInitialized$e(mt)),mt._outerRef=void 0,mt._resetIsScrollingTimeoutId=null,mt.state={instance:_assertThisInitialized$e(mt),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof mt.props.initialScrollOffset=="number"?mt.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},mt._callOnItemsRendered=void 0,mt._callOnItemsRendered=memoizeOne(function(Ot,zt,yt,vt){return mt.props.onItemsRendered({overscanStartIndex:Ot,overscanStopIndex:zt,visibleStartIndex:yt,visibleStopIndex:vt})}),mt._callOnScroll=void 0,mt._callOnScroll=memoizeOne(function(Ot,zt,yt){return mt.props.onScroll({scrollDirection:Ot,scrollOffset:zt,scrollUpdateWasRequested:yt})}),mt._getItemStyle=void 0,mt._getItemStyle=function(Ot){var zt=mt.props,yt=zt.direction,vt=zt.itemSize,At=zt.layout,St=mt._getItemStyleCache(pt&&vt,pt&&At,pt&&yt),Et;if(St.hasOwnProperty(Ot))Et=St[Ot];else{var Tt=et(mt.props,Ot,mt._instanceProps),Rt=ot(mt.props,Ot,mt._instanceProps),Ct=yt==="horizontal"||At==="horizontal",wt=yt==="rtl",Lt=Ct?Tt:0;St[Ot]=Et={position:"absolute",left:wt?void 0:Lt,right:wt?Lt:void 0,top:Ct?0:Tt,height:Ct?"100%":Rt,width:Ct?Rt:"100%"}}return Et},mt._getItemStyleCache=void 0,mt._getItemStyleCache=memoizeOne(function(Ot,zt,yt){return{}}),mt._onScrollHorizontal=function(Ot){var zt=Ot.currentTarget,yt=zt.clientWidth,vt=zt.scrollLeft,At=zt.scrollWidth;mt.setState(function(St){if(St.scrollOffset===vt)return null;var Et=mt.props.direction,Tt=vt;if(Et==="rtl")switch(getRTLOffsetType()){case"negative":Tt=-vt;break;case"positive-descending":Tt=At-yt-vt;break}return Tt=Math.max(0,Math.min(Tt,At-yt)),{isScrolling:!0,scrollDirection:St.scrollOffset<Tt?"forward":"backward",scrollOffset:Tt,scrollUpdateWasRequested:!1}},mt._resetIsScrollingDebounced)},mt._onScrollVertical=function(Ot){var zt=Ot.currentTarget,yt=zt.clientHeight,vt=zt.scrollHeight,At=zt.scrollTop;mt.setState(function(St){if(St.scrollOffset===At)return null;var Et=Math.max(0,Math.min(At,vt-yt));return{isScrolling:!0,scrollDirection:St.scrollOffset<Et?"forward":"backward",scrollOffset:Et,scrollUpdateWasRequested:!1}},mt._resetIsScrollingDebounced)},mt._outerRefSetter=function(Ot){var zt=mt.props.outerRef;mt._outerRef=Ot,typeof zt=="function"?zt(Ot):zt!=null&&typeof zt=="object"&&zt.hasOwnProperty("current")&&(zt.current=Ot)},mt._resetIsScrollingDebounced=function(){mt._resetIsScrollingTimeoutId!==null&&cancelTimeout(mt._resetIsScrollingTimeoutId),mt._resetIsScrollingTimeoutId=requestTimeout(mt._resetIsScrolling,IS_SCROLLING_DEBOUNCE_INTERVAL$1)},mt._resetIsScrolling=function(){mt._resetIsScrollingTimeoutId=null,mt.setState({isScrolling:!1},function(){mt._getItemStyleCache(-1,null)})},mt}bt.getDerivedStateFromProps=function(mt,Ot){return validateSharedProps$1(mt,Ot),dt(mt),null};var ht=bt.prototype;return ht.scrollTo=function(mt){mt=Math.max(0,mt),this.setState(function(Ot){return Ot.scrollOffset===mt?null:{scrollDirection:Ot.scrollOffset<mt?"forward":"backward",scrollOffset:mt,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},ht.scrollToItem=function(mt,Ot){Ot===void 0&&(Ot="auto");var zt=this.props,yt=zt.itemCount,vt=zt.layout,At=this.state.scrollOffset;mt=Math.max(0,Math.min(mt,yt-1));var St=0;if(this._outerRef){var Et=this._outerRef;vt==="vertical"?St=Et.scrollWidth>Et.clientWidth?getScrollbarSize():0:St=Et.scrollHeight>Et.clientHeight?getScrollbarSize():0}this.scrollTo(at(this.props,mt,Ot,At,this._instanceProps,St))},ht.componentDidMount=function(){var mt=this.props,Ot=mt.direction,zt=mt.initialScrollOffset,yt=mt.layout;if(typeof zt=="number"&&this._outerRef!=null){var vt=this._outerRef;Ot==="horizontal"||yt==="horizontal"?vt.scrollLeft=zt:vt.scrollTop=zt}this._callPropsCallbacks()},ht.componentDidUpdate=function(){var mt=this.props,Ot=mt.direction,zt=mt.layout,yt=this.state,vt=yt.scrollOffset,At=yt.scrollUpdateWasRequested;if(At&&this._outerRef!=null){var St=this._outerRef;if(Ot==="horizontal"||zt==="horizontal")if(Ot==="rtl")switch(getRTLOffsetType()){case"negative":St.scrollLeft=-vt;break;case"positive-ascending":St.scrollLeft=vt;break;default:var Et=St.clientWidth,Tt=St.scrollWidth;St.scrollLeft=Tt-Et-vt;break}else St.scrollLeft=vt;else St.scrollTop=vt}this._callPropsCallbacks()},ht.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&cancelTimeout(this._resetIsScrollingTimeoutId)},ht.render=function(){var mt=this.props,Ot=mt.children,zt=mt.className,yt=mt.direction,vt=mt.height,At=mt.innerRef,St=mt.innerElementType,Et=mt.innerTagName,Tt=mt.itemCount,Rt=mt.itemData,Ct=mt.itemKey,wt=Ct===void 0?defaultItemKey$1:Ct,Lt=mt.layout,Ht=mt.outerElementType,jt=mt.outerTagName,s0=mt.style,Ut=mt.useIsScrolling,Yt=mt.width,O0=this.state.isScrolling,a0=yt==="horizontal"||Lt==="horizontal",b0=a0?this._onScrollHorizontal:this._onScrollVertical,kt=this._getRangeToRender(),o0=kt[0],qt=kt[1],Dt=[];if(Tt>0)for(var Bt=o0;Bt<=qt;Bt++)Dt.push(reactExports.createElement(Ot,{data:Rt,key:wt(Bt,Rt),index:Bt,isScrolling:Ut?O0:void 0,style:this._getItemStyle(Bt)}));var p0=rt(this.props,this._instanceProps);return reactExports.createElement(Ht||jt||"div",{className:zt,onScroll:b0,ref:this._outerRefSetter,style:_extends$Q({position:"relative",height:vt,width:Yt,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:yt},s0)},reactExports.createElement(St||Et||"div",{children:Dt,ref:At,style:{height:a0?"100%":p0,pointerEvents:O0?"none":void 0,width:a0?p0:"100%"}}))},ht._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var mt=this.props.itemCount;if(mt>0){var Ot=this._getRangeToRender(),zt=Ot[0],yt=Ot[1],vt=Ot[2],At=Ot[3];this._callOnItemsRendered(zt,yt,vt,At)}}if(typeof this.props.onScroll=="function"){var St=this.state,Et=St.scrollDirection,Tt=St.scrollOffset,Rt=St.scrollUpdateWasRequested;this._callOnScroll(Et,Tt,Rt)}},ht._getRangeToRender=function(){var mt=this.props,Ot=mt.itemCount,zt=mt.overscanCount,yt=this.state,vt=yt.isScrolling,At=yt.scrollDirection,St=yt.scrollOffset;if(Ot===0)return[0,0,0,0];var Et=st(this.props,St,this._instanceProps),Tt=ut(this.props,Et,St,this._instanceProps),Rt=!vt||At==="backward"?Math.max(1,zt):1,Ct=!vt||At==="forward"?Math.max(1,zt):1;return[Math.max(0,Et-Rt),Math.max(0,Math.min(Ot-1,Tt+Ct)),Et,Tt]},bt}(reactExports.PureComponent),nt.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},nt}var validateSharedProps$1=function tt(nt,et){nt.children,nt.direction,nt.height,nt.layout,nt.innerTagName,nt.outerTagName,nt.width,et.instance},FixedSizeList=createListComponent({getItemOffset:function tt(nt,et){var rt=nt.itemSize;return et*rt},getItemSize:function tt(nt,et){var rt=nt.itemSize;return rt},getEstimatedTotalSize:function tt(nt){var et=nt.itemCount,rt=nt.itemSize;return rt*et},getOffsetForIndexAndAlignment:function tt(nt,et,rt,ot,at,st){var ut=nt.direction,ct=nt.height,pt=nt.itemCount,dt=nt.itemSize,ft=nt.layout,bt=nt.width,ht=ut==="horizontal"||ft==="horizontal",Mt=ht?bt:ct,mt=Math.max(0,pt*dt-Mt),Ot=Math.min(mt,et*dt),zt=Math.max(0,et*dt-Mt+dt+st);switch(rt==="smart"&&(ot>=zt-Mt&&ot<=Ot+Mt?rt="auto":rt="center"),rt){case"start":return Ot;case"end":return zt;case"center":{var yt=Math.round(zt+(Ot-zt)/2);return yt<Math.ceil(Mt/2)?0:yt>mt+Math.floor(Mt/2)?mt:yt}case"auto":default:return ot>=zt&&ot<=Ot?ot:ot<zt?zt:Ot}},getStartIndexForOffset:function tt(nt,et){var rt=nt.itemCount,ot=nt.itemSize;return Math.max(0,Math.min(rt-1,Math.floor(et/ot)))},getStopIndexForStartIndex:function tt(nt,et,rt){var ot=nt.direction,at=nt.height,st=nt.itemCount,ut=nt.itemSize,ct=nt.layout,pt=nt.width,dt=ot==="horizontal"||ct==="horizontal",ft=et*ut,bt=dt?pt:at,ht=Math.ceil((bt+rt-ft)/ut);return Math.max(0,Math.min(st-1,et+ht-1))},initInstanceProps:function tt(nt){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function tt(nt){nt.itemSize}});const ThemedStyledDropdownListItem=newStyled(StyledDropdownListItem,{shouldForwardProp:isPropValid,target:"e18cachw0"})(({theme:tt,$isHighlighted:nt})=>{const et=tt.inSidebar?tt.colors.bgColor:tt.colors.secondaryBg;return{display:"flex",alignItems:"center",paddingTop:tt.spacing.none,paddingBottom:tt.spacing.none,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg,background:nt?et:void 0,[`@media (max-width: ${tt.breakpoints.md})`]:{minHeight:tt.sizes.dropdownItemHeight,height:"auto !important"},"&:hover, &:active, &:focus-visible":{background:et}}});function FixedSizeListItem(tt){const{data:nt,index:et,style:rt}=tt,{item:ot,overrides:at,...st}=nt[et].props;return jsx$1(ThemedStyledDropdownListItem,{style:rt,...st,children:jsx$1(OverflowTooltip,{content:ot.label,placement:Placement.AUTO,children:ot.label})},ot.value)}const VirtualDropdown=React$1.forwardRef((tt,nt)=>{const et=useTheme(),rt=React$1.Children.toArray(tt.children);if(!rt[0]||!rt[0].props.item){const at=rt[0]?rt[0].props:{};return jsx$1(StyledList,{$style:{height:et.sizes.emptyDropdownHeight,paddingBottom:et.spacing.none,paddingTop:et.spacing.none,paddingLeft:et.spacing.none,paddingRight:et.spacing.none,display:"flex",alignItems:"center",justifyContent:"center"},ref:nt,"data-testid":"stSelectboxVirtualDropdownEmpty",children:jsx$1(StyledEmptyState,{$style:{paddingBottom:et.spacing.none,paddingTop:et.spacing.none,paddingLeft:et.spacing.none,paddingRight:et.spacing.none,color:et.colors.fadedText60},...at})})}const ot=Math.min(convertRemToPx(et.sizes.maxDropdownHeight),rt.length*convertRemToPx(et.sizes.dropdownItemHeight));return jsx$1(StyledList,{ref:nt,$style:{paddingTop:0,paddingBottom:0},"data-testid":"stSelectboxVirtualDropdown",children:jsx$1(FixedSizeList,{width:"100%",height:ot,itemCount:rt.length,itemData:rt,itemKey:(at,st)=>st[at].props.item.value,itemSize:convertRemToPx(et.sizes.dropdownItemHeight),children:FixedSizeListItem})})});VirtualDropdown.displayName="VirtualDropdown";const NO_OPTIONS_MSG="No options to select.";function fuzzyFilterSelectOptions(tt,nt){if(!nt)return tt;const et=tt.filter(rt=>hasMatch(nt,rt.label));return sortBy$1(et,rt=>score(nt,rt.label)).reverse()}const Selectbox=({disabled:tt,width:nt,value:et,onChange:rt,options:ot,label:at,labelVisibility:st,help:ut,placeholder:ct,clearable:pt})=>{const dt=useTheme(),[ft,bt]=reactExports.useState(et);reactExports.useEffect(()=>{bt(et)},[et]);const ht=reactExports.useCallback(At=>{if(At.value.length===0){bt(null),rt(null);return}const[St]=At.value,Et=parseInt(St.value,10);bt(Et),rt(Et)},[rt]),Mt=reactExports.useCallback((At,St)=>fuzzyFilterSelectOptions(At,St),[]);let mt=tt,Ot=ot,zt=[];isNullOrUndefined$1(ft)||(zt=[{label:Ot.length>0?Ot[ft]:NO_OPTIONS_MSG,value:ft.toString()}]),Ot.length===0&&(Ot=[NO_OPTIONS_MSG],mt=!0);const yt=Ot.map((At,St)=>({label:At,value:St.toString()})),vt=Ot.length>10;return jsxs("div",{className:"stSelectbox","data-testid":"stSelectbox",style:{width:nt},children:[jsx$1(WidgetLabel,{label:at,labelVisibility:st,disabled:mt,children:ut&&jsx$1(StyledWidgetLabelHelp,{children:jsx$1(TooltipIcon,{content:ut,placement:Placement.TOP_RIGHT})})}),jsx$1(Select,{disabled:mt,labelKey:"label","aria-label":at||"",onChange:ht,options:yt,filterOptions:Mt,clearable:pt||!1,escapeClearsValue:pt||!1,value:zt,valueKey:"value",placeholder:ct,overrides:{Root:{style:()=>({lineHeight:dt.lineHeights.inputWidget})},Dropdown:{component:VirtualDropdown},ClearIcon:{props:{overrides:{Svg:{style:{color:dt.colors.darkGray,padding:dt.spacing.threeXS,height:dt.sizes.clearIconSize,width:dt.sizes.clearIconSize,":hover":{fill:dt.colors.bodyText}}}}}},ControlContainer:{style:()=>({height:dt.sizes.minElementHeight,borderLeftWidth:dt.sizes.borderWidth,borderRightWidth:dt.sizes.borderWidth,borderTopWidth:dt.sizes.borderWidth,borderBottomWidth:dt.sizes.borderWidth})},IconsContainer:{style:()=>({paddingRight:dt.spacing.sm})},ValueContainer:{style:()=>({paddingRight:dt.spacing.sm,paddingLeft:dt.spacing.sm,paddingBottom:dt.spacing.sm,paddingTop:dt.spacing.sm})},Input:{props:{readOnly:isMobile_1&&!vt?"readonly":null},style:()=>({lineHeight:dt.lineHeights.inputWidget})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:dt.spacing.px})}}}},SelectArrow:{component:ChevronDown$1,props:{overrides:{Svg:{style:()=>({width:dt.iconSizes.xl,height:dt.iconSizes.xl})}}}}}})]})},UISelectbox=reactExports.memo(Selectbox);class CircularBuffer{constructor(nt){this._buffer=new Array(nt),this._size=nt,this._index=0,this._wrappedCount=0}push(nt){this._buffer[this._index]=nt,this._index=(this._index+1)%this._size,this._index===0&&(this._wrappedCount=this._wrappedCount+1)}get buffer(){return this._buffer}get totalWrittenEntries(){return this._wrappedCount*this._size+this._index}}const handleRender=(tt,nt,et,rt,ot,at)=>{window.__streamlit_profiles__=window.__streamlit_profiles__||{},window.__streamlit_profiles__[tt]=window.__streamlit_profiles__[tt]||new CircularBuffer(1e3),window.__streamlit_profiles__[tt].push({phase:nt,actualDuration:et,baseDuration:rt,startTime:ot,commitTime:at})},Profiler=({id:tt,children:nt})=>jsx$1(reactExports.Profiler,{id:tt,onRender:handleRender,children:nt}),useWindowDimensions=()=>{const tt=useTheme(),[nt,et]=reactExports.useState({fullWidth:0,fullHeight:0}),rt=reactExports.useCallback(()=>{const at=convertRemToPx(tt.spacing.md),st=convertRemToPx(tt.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-at*2,fullHeight:window.innerHeight-(at+st)}},[tt.sizes.fullScreenHeaderHeight,tt.spacing.md]),ot=reactExports.useCallback(()=>{et(rt())},[rt]);return reactExports.useEffect(()=>(window.addEventListener("resize",ot),()=>{window.removeEventListener("resize",ot)}),[ot]),reactExports.useEffect(()=>{ot()},[ot]),nt},WindowDimensionsContext=reactExports.createContext(null);WindowDimensionsContext.displayName="WindowDimensionsContext";const WindowDimensionsProvider=({children:tt})=>{const nt=useWindowDimensions();if(reactExports.useContext(WindowDimensionsContext))throw new Error("WindowDimensionsProvider should only be used once per app. If you need to read window dimensions, utilize `useRequiredContext(WindowDimensionsContext)` instead.");return jsx$1(WindowDimensionsContext.Provider,{value:nt,children:tt})};var baseIsEqual=_baseIsEqual;function isEqual(tt,nt){return baseIsEqual(tt,nt)}var isEqual_1=isEqual;const isEqual$1=getDefaultExportFromCjs$1(isEqual_1);let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let tt=0;tt<256;++tt)byteToHex.push((tt+256).toString(16).slice(1));function unsafeStringify(tt,nt=0){return byteToHex[tt[nt+0]]+byteToHex[tt[nt+1]]+byteToHex[tt[nt+2]]+byteToHex[tt[nt+3]]+"-"+byteToHex[tt[nt+4]]+byteToHex[tt[nt+5]]+"-"+byteToHex[tt[nt+6]]+byteToHex[tt[nt+7]]+"-"+byteToHex[tt[nt+8]]+byteToHex[tt[nt+9]]+"-"+byteToHex[tt[nt+10]]+byteToHex[tt[nt+11]]+byteToHex[tt[nt+12]]+byteToHex[tt[nt+13]]+byteToHex[tt[nt+14]]+byteToHex[tt[nt+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(tt,nt,et){if(native.randomUUID&&!nt&&!tt)return native.randomUUID();tt=tt||{};const rt=tt.random||(tt.rng||rng)();return rt[6]=rt[6]&15|64,rt[8]=rt[8]&63|128,unsafeStringify(rt)}class Resolver{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((nt,et)=>{this.resolve=nt,this.reject=et})}}class FileUploadClient{constructor(nt){this.formsWithPendingRequests=new Map,this.pendingFileURLsRequests=new Map,this.sessionInfo=nt.sessionInfo,this.endpoints=nt.endpoints,this.pendingFormUploadsChanged=nt.formsWithPendingRequestsChanged,this.requestFileURLs=nt.requestFileURLs}async uploadFile(nt,et,rt,ot,at){return this.offsetPendingRequestCount(nt.formId,1),this.endpoints.uploadFileUploaderFile(et,rt,this.sessionInfo.current.sessionId,ot,at).finally(()=>this.offsetPendingRequestCount(nt.formId,-1))}deleteFile(nt){return this.endpoints.deleteFileAtURL?this.endpoints.deleteFileAtURL(nt,this.sessionInfo.current.sessionId):Promise.resolve()}fetchFileURLs(nt){if(!this.requestFileURLs)return Promise.resolve([]);const et=new Resolver,rt=v4();return this.pendingFileURLsRequests.set(rt,et),this.requestFileURLs(rt,nt),et.promise}onFileURLsResponse(nt){const et=nt.responseId,rt=this.pendingFileURLsRequests.get(et);rt&&(nt.errorMsg?rt.reject(nt.errorMsg):rt.resolve(nt.fileUrls||[]),this.pendingFileURLsRequests.delete(et))}getFormIdSet(){return new Set(this.formsWithPendingRequests.keys())}offsetPendingRequestCount(nt,et){if(et===0||!isValidFormId(nt))return;const rt=this.formsWithPendingRequests.get(nt)??0,ot=rt+et;if(ot<0)throw new Error(`Can't offset pendingRequestCount below 0 (formId=${nt}, curCount=${rt}, offset=${et})`);const at=this.getFormIdSet();ot===0?this.formsWithPendingRequests.delete(nt):this.formsWithPendingRequests.set(nt,ot);const st=this.getFormIdSet();isEqual$1(st,at)||this.pendingFormUploadsChanged(st)}}class CacheEntry{constructor(nt,et){this.scriptRunCount=0,this.encodedMsg=nt,this.scriptRunCount=et}getAge(nt){return nt-this.scriptRunCount}}class ForwardMsgCache{constructor(nt){this.messages=new Map,this.scriptRunCount=0,this.endpoints=nt}incrementRunCount(nt){this.scriptRunCount+=1,this.messages.forEach((et,rt)=>{et.getAge(this.scriptRunCount)>nt&&this.messages.delete(rt)})}async processMessagePayload(nt,et){if(this.maybeCacheMessage(nt,et),nt.type!=="refHash")return nt;let rt=this.getCachedMessage(nt.refHash,!0);if(notNullOrUndefined(rt))logMessage(`Cached ForwardMsg HIT [hash=${nt.refHash}]`);else{logMessage(`Cached ForwardMsg MISS [hash=${nt.refHash}]`);const ot=await this.endpoints.fetchCachedForwardMsg(nt.refHash);try{rt=ForwardMsg.decode(ot)}catch(at){throw new Error(`Failed to decode ForwardMsg (hash=${nt.refHash}): ${ensureError(at).message}`)}this.maybeCacheMessage(rt,ot)}if(!nt.metadata)throw new Error("ForwardMsg has no metadata");return rt.metadata=ForwardMsg.decode(et).metadata,rt}maybeCacheMessage(nt,et){nt.type!=="refHash"&&(!nt.metadata||!nt.metadata.cacheable||this.getCachedMessage(nt.hash,!0)===void 0&&(logMessage(`Caching ForwardMsg [hash=${nt.hash}]`),this.messages.set(nt.hash,new CacheEntry(et,this.scriptRunCount))))}getCachedMessage(nt,et){const rt=this.messages.get(nt);if(!isNullOrUndefined$1(rt))return et&&(rt.scriptRunCount=this.scriptRunCount),ForwardMsg.decode(rt.encodedMsg)}}var R=class{constructor(tt,nt,et,rt,ot,at){T1(this,"type",3);T1(this,"name","");T1(this,"prefix","");T1(this,"value","");T1(this,"suffix","");T1(this,"modifier",3);this.type=tt,this.name=nt,this.prefix=et,this.value=rt,this.suffix=ot,this.modifier=at}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},be=/[$_\p{ID_Start}]/u,Pe=/[$_\u200C\u200D\p{ID_Continue}]/u,M=".*";function Re(tt,nt){return/^[\x00-\x7F]*$/.test(tt)}function v(tt,nt=!1){let et=[],rt=0;for(;rt<tt.length;){let ot=tt[rt],at=function(st){if(!nt)throw new TypeError(st);et.push({type:"INVALID_CHAR",index:rt,value:tt[rt++]})};if(ot==="*"){et.push({type:"ASTERISK",index:rt,value:tt[rt++]});continue}if(ot==="+"||ot==="?"){et.push({type:"OTHER_MODIFIER",index:rt,value:tt[rt++]});continue}if(ot==="\\"){et.push({type:"ESCAPED_CHAR",index:rt++,value:tt[rt++]});continue}if(ot==="{"){et.push({type:"OPEN",index:rt,value:tt[rt++]});continue}if(ot==="}"){et.push({type:"CLOSE",index:rt,value:tt[rt++]});continue}if(ot===":"){let st="",ut=rt+1;for(;ut<tt.length;){let ct=tt.substr(ut,1);if(ut===rt+1&&be.test(ct)||ut!==rt+1&&Pe.test(ct)){st+=tt[ut++];continue}break}if(!st){at(`Missing parameter name at ${rt}`);continue}et.push({type:"NAME",index:rt,value:st}),rt=ut;continue}if(ot==="("){let st=1,ut="",ct=rt+1,pt=!1;if(tt[ct]==="?"){at(`Pattern cannot start with "?" at ${ct}`);continue}for(;ct<tt.length;){if(!Re(tt[ct])){at(`Invalid character '${tt[ct]}' at ${ct}.`),pt=!0;break}if(tt[ct]==="\\"){ut+=tt[ct++]+tt[ct++];continue}if(tt[ct]===")"){if(st--,st===0){ct++;break}}else if(tt[ct]==="("&&(st++,tt[ct+1]!=="?")){at(`Capturing groups are not allowed at ${ct}`),pt=!0;break}ut+=tt[ct++]}if(pt)continue;if(st){at(`Unbalanced pattern at ${rt}`);continue}if(!ut){at(`Missing pattern at ${rt}`);continue}et.push({type:"REGEX",index:rt,value:ut}),rt=ct;continue}et.push({type:"CHAR",index:rt,value:tt[rt++]})}return et.push({type:"END",index:rt,value:""}),et}function D(tt,nt={}){let et=v(tt);nt.delimiter??(nt.delimiter="/#?"),nt.prefixes??(nt.prefixes="./");let rt=`[^${S(nt.delimiter)}]+?`,ot=[],at=0,st=0,ut=new Set,ct=yt=>{if(st<et.length&&et[st].type===yt)return et[st++].value},pt=()=>ct("OTHER_MODIFIER")??ct("ASTERISK"),dt=yt=>{let vt=ct(yt);if(vt!==void 0)return vt;let{type:At,index:St}=et[st];throw new TypeError(`Unexpected ${At} at ${St}, expected ${yt}`)},ft=()=>{let yt="",vt;for(;vt=ct("CHAR")??ct("ESCAPED_CHAR");)yt+=vt;return yt},bt=yt=>yt,ht=nt.encodePart||bt,Mt="",mt=yt=>{Mt+=yt},Ot=()=>{Mt.length&&(ot.push(new R(3,"","",ht(Mt),"",3)),Mt="")},zt=(yt,vt,At,St,Et)=>{let Tt=3;switch(Et){case"?":Tt=1;break;case"*":Tt=0;break;case"+":Tt=2;break}if(!vt&&!At&&Tt===3){mt(yt);return}if(Ot(),!vt&&!At){if(!yt)return;ot.push(new R(3,"","",ht(yt),"",Tt));return}let Rt;At?At==="*"?Rt=M:Rt=At:Rt=rt;let Ct=2;Rt===rt?(Ct=1,Rt=""):Rt===M&&(Ct=0,Rt="");let wt;if(vt?wt=vt:At&&(wt=at++),ut.has(wt))throw new TypeError(`Duplicate name '${wt}'.`);ut.add(wt),ot.push(new R(Ct,wt,ht(yt),Rt,ht(St),Tt))};for(;st<et.length;){let yt=ct("CHAR"),vt=ct("NAME"),At=ct("REGEX");if(!vt&&!At&&(At=ct("ASTERISK")),vt||At){let Et=yt??"";nt.prefixes.indexOf(Et)===-1&&(mt(Et),Et=""),Ot();let Tt=pt();zt(Et,vt,At,"",Tt);continue}let St=yt??ct("ESCAPED_CHAR");if(St){mt(St);continue}if(ct("OPEN")){let Et=ft(),Tt=ct("NAME"),Rt=ct("REGEX");!Tt&&!Rt&&(Rt=ct("ASTERISK"));let Ct=ft();dt("CLOSE");let wt=pt();zt(Et,Tt,Rt,Ct,wt);continue}Ot(),dt("END")}return ot}function S(tt){return tt.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function X(tt){return tt&&tt.ignoreCase?"ui":"u"}function Z(tt,nt,et){return F(D(tt,et),nt,et)}function k(tt){switch(tt){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function F(tt,nt,et={}){et.delimiter??(et.delimiter="/#?"),et.prefixes??(et.prefixes="./"),et.sensitive??(et.sensitive=!1),et.strict??(et.strict=!1),et.end??(et.end=!0),et.start??(et.start=!0),et.endsWith="";let rt=et.start?"^":"";for(let ut of tt){if(ut.type===3){ut.modifier===3?rt+=S(ut.value):rt+=`(?:${S(ut.value)})${k(ut.modifier)}`;continue}nt&&nt.push(ut.name);let ct=`[^${S(et.delimiter)}]+?`,pt=ut.value;if(ut.type===1?pt=ct:ut.type===0&&(pt=M),!ut.prefix.length&&!ut.suffix.length){ut.modifier===3||ut.modifier===1?rt+=`(${pt})${k(ut.modifier)}`:rt+=`((?:${pt})${k(ut.modifier)})`;continue}if(ut.modifier===3||ut.modifier===1){rt+=`(?:${S(ut.prefix)}(${pt})${S(ut.suffix)})`,rt+=k(ut.modifier);continue}rt+=`(?:${S(ut.prefix)}`,rt+=`((?:${pt})(?:`,rt+=S(ut.suffix),rt+=S(ut.prefix),rt+=`(?:${pt}))*)${S(ut.suffix)})`,ut.modifier===0&&(rt+="?")}let ot=`[${S(et.endsWith)}]|$`,at=`[${S(et.delimiter)}]`;if(et.end)return et.strict||(rt+=`${at}?`),et.endsWith.length?rt+=`(?=${ot})`:rt+="$",new RegExp(rt,X(et));et.strict||(rt+=`(?:${at}(?=${ot}))?`);let st=!1;if(tt.length){let ut=tt[tt.length-1];ut.type===3&&ut.modifier===3&&(st=et.delimiter.indexOf(ut)>-1)}return st||(rt+=`(?=${at}|${ot})`),new RegExp(rt,X(et))}var x={delimiter:"",prefixes:"",sensitive:!0,strict:!0},B={delimiter:".",prefixes:"",sensitive:!0,strict:!0},q={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function J(tt,nt){return tt.length?tt[0]==="/"?!0:!nt||tt.length<2?!1:(tt[0]=="\\"||tt[0]=="{")&&tt[1]=="/":!1}function Q(tt,nt){return tt.startsWith(nt)?tt.substring(nt.length,tt.length):tt}function Ee(tt,nt){return tt.endsWith(nt)?tt.substr(0,tt.length-nt.length):tt}function W(tt){return!tt||tt.length<2?!1:tt[0]==="["||(tt[0]==="\\"||tt[0]==="{")&&tt[1]==="["}var ee=["ftp","file","http","https","ws","wss"];function N(tt){if(!tt)return!0;for(let nt of ee)if(tt.test(nt))return!0;return!1}function te(tt,nt){if(tt=Q(tt,"#"),nt||tt==="")return tt;let et=new URL("https://example.com");return et.hash=tt,et.hash?et.hash.substring(1,et.hash.length):""}function re(tt,nt){if(tt=Q(tt,"?"),nt||tt==="")return tt;let et=new URL("https://example.com");return et.search=tt,et.search?et.search.substring(1,et.search.length):""}function ne(tt,nt){return nt||tt===""?tt:W(tt)?j(tt):z(tt)}function se(tt,nt){if(nt||tt==="")return tt;let et=new URL("https://example.com");return et.password=tt,et.password}function ie(tt,nt){if(nt||tt==="")return tt;let et=new URL("https://example.com");return et.username=tt,et.username}function ae(tt,nt,et){if(et||tt==="")return tt;if(nt&&!ee.includes(nt))return new URL(`${nt}:${tt}`).pathname;let rt=tt[0]=="/";return tt=new URL(rt?tt:"/-"+tt,"https://example.com").pathname,rt||(tt=tt.substring(2,tt.length)),tt}function oe(tt,nt,et){return _(nt)===tt&&(tt=""),et||tt===""?tt:K(tt)}function ce(tt,nt){return tt=Ee(tt,":"),nt||tt===""?tt:y(tt)}function _(tt){switch(tt){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function y(tt){if(tt==="")return tt;if(/^[-+.A-Za-z0-9]*$/.test(tt))return tt.toLowerCase();throw new TypeError(`Invalid protocol '${tt}'.`)}function le(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.username=tt,nt.username}function fe(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.password=tt,nt.password}function z(tt){if(tt==="")return tt;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(tt))throw new TypeError(`Invalid hostname '${tt}'`);let nt=new URL("https://example.com");return nt.hostname=tt,nt.hostname}function j(tt){if(tt==="")return tt;if(/[^0-9a-fA-F[\]:]/g.test(tt))throw new TypeError(`Invalid IPv6 hostname '${tt}'`);return tt.toLowerCase()}function K(tt){if(tt===""||/^[0-9]*$/.test(tt)&&parseInt(tt)<=65535)return tt;throw new TypeError(`Invalid port '${tt}'.`)}function he(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.pathname=tt[0]!=="/"?"/-"+tt:tt,tt[0]!=="/"?nt.pathname.substring(2,nt.pathname.length):nt.pathname}function ue(tt){return tt===""?tt:new URL(`data:${tt}`).pathname}function de(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.search=tt,nt.search.substring(1,nt.search.length)}function pe(tt){if(tt==="")return tt;let nt=new URL("https://example.com");return nt.hash=tt,nt.hash.substring(1,nt.hash.length)}var U1,o1,e1,V0,D1,V1,c1,H1,X1,G1,C0,Y0,Gn,In,Mn,En,d1,Nn,Kn,Sn,Yn,Jn,_n,j1,C1,Zn,Qn,er,tr,y1,nr,Pn,H=(Pn=class{constructor(tt){Q0(this,C0);Q0(this,U1);Q0(this,o1,[]);Q0(this,e1,{});Q0(this,V0,0);Q0(this,D1,1);Q0(this,V1,0);Q0(this,c1,0);Q0(this,H1,0);Q0(this,X1,0);Q0(this,G1,!1);K0(this,U1,tt)}get result(){return _0(this,e1)}parse(){for(K0(this,o1,v(_0(this,U1),!0));_0(this,V0)<_0(this,o1).length;K0(this,V0,_0(this,V0)+_0(this,D1))){if(K0(this,D1,1),_0(this,o1)[_0(this,V0)].type==="END"){if(_0(this,c1)===0){$0(this,C0,In).call(this),$0(this,C0,C1).call(this)?$0(this,C0,Y0).call(this,9,1):$0(this,C0,j1).call(this)?$0(this,C0,Y0).call(this,8,1):$0(this,C0,Y0).call(this,7,0);continue}else if(_0(this,c1)===2){$0(this,C0,Mn).call(this,5);continue}$0(this,C0,Y0).call(this,10,0);break}if(_0(this,H1)>0)if($0(this,C0,Qn).call(this))K0(this,H1,_0(this,H1)-1);else continue;if($0(this,C0,Zn).call(this)){K0(this,H1,_0(this,H1)+1);continue}switch(_0(this,c1)){case 0:$0(this,C0,Nn).call(this)&&$0(this,C0,Mn).call(this,1);break;case 1:if($0(this,C0,Nn).call(this)){$0(this,C0,nr).call(this);let tt=7,nt=1;$0(this,C0,Kn).call(this)?(tt=2,nt=3):_0(this,G1)&&(tt=2),$0(this,C0,Y0).call(this,tt,nt)}break;case 2:$0(this,C0,Sn).call(this)?$0(this,C0,Mn).call(this,3):($0(this,C0,_n).call(this)||$0(this,C0,j1).call(this)||$0(this,C0,C1).call(this))&&$0(this,C0,Mn).call(this,5);break;case 3:$0(this,C0,Yn).call(this)?$0(this,C0,Y0).call(this,4,1):$0(this,C0,Sn).call(this)&&$0(this,C0,Y0).call(this,5,1);break;case 4:$0(this,C0,Sn).call(this)&&$0(this,C0,Y0).call(this,5,1);break;case 5:$0(this,C0,er).call(this)?K0(this,X1,_0(this,X1)+1):$0(this,C0,tr).call(this)&&K0(this,X1,_0(this,X1)-1),$0(this,C0,Jn).call(this)&&!_0(this,X1)?$0(this,C0,Y0).call(this,6,1):$0(this,C0,_n).call(this)?$0(this,C0,Y0).call(this,7,0):$0(this,C0,j1).call(this)?$0(this,C0,Y0).call(this,8,1):$0(this,C0,C1).call(this)&&$0(this,C0,Y0).call(this,9,1);break;case 6:$0(this,C0,_n).call(this)?$0(this,C0,Y0).call(this,7,0):$0(this,C0,j1).call(this)?$0(this,C0,Y0).call(this,8,1):$0(this,C0,C1).call(this)&&$0(this,C0,Y0).call(this,9,1);break;case 7:$0(this,C0,j1).call(this)?$0(this,C0,Y0).call(this,8,1):$0(this,C0,C1).call(this)&&$0(this,C0,Y0).call(this,9,1);break;case 8:$0(this,C0,C1).call(this)&&$0(this,C0,Y0).call(this,9,1);break}}_0(this,e1).hostname!==void 0&&_0(this,e1).port===void 0&&(_0(this,e1).port="")}},U1=new WeakMap,o1=new WeakMap,e1=new WeakMap,V0=new WeakMap,D1=new WeakMap,V1=new WeakMap,c1=new WeakMap,H1=new WeakMap,X1=new WeakMap,G1=new WeakMap,C0=new WeakSet,Y0=function(tt,nt){var et,rt,ot;switch(_0(this,c1)){case 0:break;case 1:_0(this,e1).protocol=$0(this,C0,y1).call(this);break;case 2:break;case 3:_0(this,e1).username=$0(this,C0,y1).call(this);break;case 4:_0(this,e1).password=$0(this,C0,y1).call(this);break;case 5:_0(this,e1).hostname=$0(this,C0,y1).call(this);break;case 6:_0(this,e1).port=$0(this,C0,y1).call(this);break;case 7:_0(this,e1).pathname=$0(this,C0,y1).call(this);break;case 8:_0(this,e1).search=$0(this,C0,y1).call(this);break;case 9:_0(this,e1).hash=$0(this,C0,y1).call(this);break}_0(this,c1)!==0&&tt!==10&&([1,2,3,4].includes(_0(this,c1))&&[6,7,8,9].includes(tt)&&((et=_0(this,e1)).hostname??(et.hostname="")),[1,2,3,4,5,6].includes(_0(this,c1))&&[8,9].includes(tt)&&((rt=_0(this,e1)).pathname??(rt.pathname=_0(this,G1)?"/":"")),[1,2,3,4,5,6,7].includes(_0(this,c1))&&tt===9&&((ot=_0(this,e1)).search??(ot.search=""))),$0(this,C0,Gn).call(this,tt,nt)},Gn=function(tt,nt){K0(this,c1,tt),K0(this,V1,_0(this,V0)+nt),K0(this,V0,_0(this,V0)+nt),K0(this,D1,0)},In=function(){K0(this,V0,_0(this,V1)),K0(this,D1,0)},Mn=function(tt){$0(this,C0,In).call(this),K0(this,c1,tt)},En=function(tt){return tt<0&&(tt=_0(this,o1).length-tt),tt<_0(this,o1).length?_0(this,o1)[tt]:_0(this,o1)[_0(this,o1).length-1]},d1=function(tt,nt){let et=$0(this,C0,En).call(this,tt);return et.value===nt&&(et.type==="CHAR"||et.type==="ESCAPED_CHAR"||et.type==="INVALID_CHAR")},Nn=function(){return $0(this,C0,d1).call(this,_0(this,V0),":")},Kn=function(){return $0(this,C0,d1).call(this,_0(this,V0)+1,"/")&&$0(this,C0,d1).call(this,_0(this,V0)+2,"/")},Sn=function(){return $0(this,C0,d1).call(this,_0(this,V0),"@")},Yn=function(){return $0(this,C0,d1).call(this,_0(this,V0),":")},Jn=function(){return $0(this,C0,d1).call(this,_0(this,V0),":")},_n=function(){return $0(this,C0,d1).call(this,_0(this,V0),"/")},j1=function(){if($0(this,C0,d1).call(this,_0(this,V0),"?"))return!0;if(_0(this,o1)[_0(this,V0)].value!=="?")return!1;let tt=$0(this,C0,En).call(this,_0(this,V0)-1);return tt.type!=="NAME"&&tt.type!=="REGEX"&&tt.type!=="CLOSE"&&tt.type!=="ASTERISK"},C1=function(){return $0(this,C0,d1).call(this,_0(this,V0),"#")},Zn=function(){return _0(this,o1)[_0(this,V0)].type=="OPEN"},Qn=function(){return _0(this,o1)[_0(this,V0)].type=="CLOSE"},er=function(){return $0(this,C0,d1).call(this,_0(this,V0),"[")},tr=function(){return $0(this,C0,d1).call(this,_0(this,V0),"]")},y1=function(){let tt=_0(this,o1)[_0(this,V0)],nt=$0(this,C0,En).call(this,_0(this,V1)).index;return _0(this,U1).substring(nt,tt.index)},nr=function(){let tt={};Object.assign(tt,x),tt.encodePart=y;let nt=Z($0(this,C0,y1).call(this),void 0,tt);K0(this,G1,N(nt))},Pn),G=["protocol","username","password","hostname","port","pathname","search","hash"],E="*";function ge(tt,nt){if(typeof tt!="string")throw new TypeError("parameter 1 is not of type 'string'.");let et=new URL(tt,nt);return{protocol:et.protocol.substring(0,et.protocol.length-1),username:et.username,password:et.password,hostname:et.hostname,port:et.port,pathname:et.pathname,search:et.search!==""?et.search.substring(1,et.search.length):void 0,hash:et.hash!==""?et.hash.substring(1,et.hash.length):void 0}}function b(tt,nt){return nt?C(tt):tt}function w(tt,nt,et){let rt;if(typeof nt.baseURL=="string")try{rt=new URL(nt.baseURL),nt.protocol===void 0&&(tt.protocol=b(rt.protocol.substring(0,rt.protocol.length-1),et)),!et&&nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.username===void 0&&(tt.username=b(rt.username,et)),!et&&nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.username===void 0&&nt.password===void 0&&(tt.password=b(rt.password,et)),nt.protocol===void 0&&nt.hostname===void 0&&(tt.hostname=b(rt.hostname,et)),nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&(tt.port=b(rt.port,et)),nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.pathname===void 0&&(tt.pathname=b(rt.pathname,et)),nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.pathname===void 0&&nt.search===void 0&&(tt.search=b(rt.search.substring(1,rt.search.length),et)),nt.protocol===void 0&&nt.hostname===void 0&&nt.port===void 0&&nt.pathname===void 0&&nt.search===void 0&&nt.hash===void 0&&(tt.hash=b(rt.hash.substring(1,rt.hash.length),et))}catch{throw new TypeError(`invalid baseURL '${nt.baseURL}'.`)}if(typeof nt.protocol=="string"&&(tt.protocol=ce(nt.protocol,et)),typeof nt.username=="string"&&(tt.username=ie(nt.username,et)),typeof nt.password=="string"&&(tt.password=se(nt.password,et)),typeof nt.hostname=="string"&&(tt.hostname=ne(nt.hostname,et)),typeof nt.port=="string"&&(tt.port=oe(nt.port,tt.protocol,et)),typeof nt.pathname=="string"){if(tt.pathname=nt.pathname,rt&&!J(tt.pathname,et)){let ot=rt.pathname.lastIndexOf("/");ot>=0&&(tt.pathname=b(rt.pathname.substring(0,ot+1),et)+tt.pathname)}tt.pathname=ae(tt.pathname,tt.protocol,et)}return typeof nt.search=="string"&&(tt.search=re(nt.search,et)),typeof nt.hash=="string"&&(tt.hash=te(nt.hash,et)),tt}function C(tt){return tt.replace(/([+*?:{}()\\])/g,"\\$1")}function Oe(tt){return tt.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function ke(tt,nt){nt.delimiter??(nt.delimiter="/#?"),nt.prefixes??(nt.prefixes="./"),nt.sensitive??(nt.sensitive=!1),nt.strict??(nt.strict=!1),nt.end??(nt.end=!0),nt.start??(nt.start=!0),nt.endsWith="";let et=".*",rt=`[^${Oe(nt.delimiter)}]+?`,ot=/[$_\u200C\u200D\p{ID_Continue}]/u,at="";for(let st=0;st<tt.length;++st){let ut=tt[st];if(ut.type===3){if(ut.modifier===3){at+=C(ut.value);continue}at+=`{${C(ut.value)}}${k(ut.modifier)}`;continue}let ct=ut.hasCustomName(),pt=!!ut.suffix.length||!!ut.prefix.length&&(ut.prefix.length!==1||!nt.prefixes.includes(ut.prefix)),dt=st>0?tt[st-1]:null,ft=st<tt.length-1?tt[st+1]:null;if(!pt&&ct&&ut.type===1&&ut.modifier===3&&ft&&!ft.prefix.length&&!ft.suffix.length)if(ft.type===3){let bt=ft.value.length>0?ft.value[0]:"";pt=ot.test(bt)}else pt=!ft.hasCustomName();if(!pt&&!ut.prefix.length&&dt&&dt.type===3){let bt=dt.value[dt.value.length-1];pt=nt.prefixes.includes(bt)}pt&&(at+="{"),at+=C(ut.prefix),ct&&(at+=`:${ut.name}`),ut.type===2?at+=`(${ut.value})`:ut.type===1?ct||(at+=`(${rt})`):ut.type===0&&(!ct&&(!dt||dt.type===3||dt.modifier!==3||pt||ut.prefix!=="")?at+="*":at+=`(${et})`),ut.type===1&&ct&&ut.suffix.length&&ot.test(ut.suffix[0])&&(at+="\\"),at+=C(ut.suffix),pt&&(at+="}"),ut.modifier!==3&&(at+=k(ut.modifier))}return at}var A1,$1,K1,t1,h1,Y1,jn,me=(jn=class{constructor(tt={},nt,et){Q0(this,A1);Q0(this,$1,{});Q0(this,K1,{});Q0(this,t1,{});Q0(this,h1,{});Q0(this,Y1,!1);try{let rt;if(typeof nt=="string"?rt=nt:et=nt,typeof tt=="string"){let ut=new H(tt);if(ut.parse(),tt=ut.result,rt===void 0&&typeof tt.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");tt.baseURL=rt}else{if(!tt||typeof tt!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(rt)throw new TypeError("parameter 1 is not of type 'string'.")}typeof et>"u"&&(et={ignoreCase:!1});let ot={ignoreCase:et.ignoreCase===!0};K0(this,A1,w({pathname:E,protocol:E,username:E,password:E,hostname:E,port:E,search:E,hash:E},tt,!0)),_(_0(this,A1).protocol)===_0(this,A1).port&&(_0(this,A1).port="");let st;for(st of G){if(!(st in _0(this,A1)))continue;let ut={},ct=_0(this,A1)[st];switch(_0(this,K1)[st]=[],st){case"protocol":Object.assign(ut,x),ut.encodePart=y;break;case"username":Object.assign(ut,x),ut.encodePart=le;break;case"password":Object.assign(ut,x),ut.encodePart=fe;break;case"hostname":Object.assign(ut,B),W(ct)?ut.encodePart=j:ut.encodePart=z;break;case"port":Object.assign(ut,x),ut.encodePart=K;break;case"pathname":N(_0(this,$1).protocol)?(Object.assign(ut,q,ot),ut.encodePart=he):(Object.assign(ut,x,ot),ut.encodePart=ue);break;case"search":Object.assign(ut,x,ot),ut.encodePart=de;break;case"hash":Object.assign(ut,x,ot),ut.encodePart=pe;break}try{_0(this,h1)[st]=D(ct,ut),_0(this,$1)[st]=F(_0(this,h1)[st],_0(this,K1)[st],ut),_0(this,t1)[st]=ke(_0(this,h1)[st],ut),K0(this,Y1,_0(this,Y1)||_0(this,h1)[st].some(pt=>pt.type===2))}catch{throw new TypeError(`invalid ${st} pattern '${_0(this,A1)[st]}'.`)}}}catch(rt){throw new TypeError(`Failed to construct 'URLPattern': ${rt.message}`)}}test(tt={},nt){let et={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof tt!="string"&&nt)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof tt>"u")return!1;try{typeof tt=="object"?et=w(et,tt,!1):et=w(et,ge(tt,nt),!1)}catch{return!1}let rt;for(rt of G)if(!_0(this,$1)[rt].exec(et[rt]))return!1;return!0}exec(tt={},nt){let et={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof tt!="string"&&nt)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof tt>"u")return;try{typeof tt=="object"?et=w(et,tt,!1):et=w(et,ge(tt,nt),!1)}catch{return null}let rt={};nt?rt.inputs=[tt,nt]:rt.inputs=[tt];let ot;for(ot of G){let at=_0(this,$1)[ot].exec(et[ot]);if(!at)return null;let st={};for(let[ut,ct]of _0(this,K1)[ot].entries())if(typeof ct=="string"||typeof ct=="number"){let pt=at[ut+1];st[ct]=pt}rt[ot]={input:et[ot]??"",groups:st}}return rt}static compareComponent(tt,nt,et){let rt=(ut,ct)=>{for(let pt of["type","modifier","prefix","value","suffix"]){if(ut[pt]<ct[pt])return-1;if(ut[pt]!==ct[pt])return 1}return 0},ot=new R(3,"","","","",3),at=new R(0,"","","","",3),st=(ut,ct)=>{let pt=0;for(;pt<Math.min(ut.length,ct.length);++pt){let dt=rt(ut[pt],ct[pt]);if(dt)return dt}return ut.length===ct.length?0:rt(ut[pt]??ot,ct[pt]??ot)};return!_0(nt,t1)[tt]&&!_0(et,t1)[tt]?0:_0(nt,t1)[tt]&&!_0(et,t1)[tt]?st(_0(nt,h1)[tt],[at]):!_0(nt,t1)[tt]&&_0(et,t1)[tt]?st([at],_0(et,h1)[tt]):st(_0(nt,h1)[tt],_0(et,h1)[tt])}get protocol(){return _0(this,t1).protocol}get username(){return _0(this,t1).username}get password(){return _0(this,t1).password}get hostname(){return _0(this,t1).hostname}get port(){return _0(this,t1).port}get pathname(){return _0(this,t1).pathname}get search(){return _0(this,t1).search}get hash(){return _0(this,t1).hash}get hasRegExpGroups(){return _0(this,Y1)}},A1=new WeakMap,$1=new WeakMap,K1=new WeakMap,t1=new WeakMap,h1=new WeakMap,Y1=new WeakMap,jn);globalThis.URLPattern||(globalThis.URLPattern=me);var baseSlice=_baseSlice,toInteger=toInteger_1;function take(tt,nt,et){return tt&&tt.length?(nt=et||nt===void 0?1:toInteger(nt),baseSlice(tt,0,nt<0?0:nt)):[]}var take_1=take;const take$1=getDefaultExportFromCjs$1(take_1),FINAL_SLASH_RE=/\/+$/,INITIAL_SLASH_RE=/^\/+/;function getWindowBaseUriParts(){const tt=window.location.hostname;let nt;window.location.port?nt=Number(window.location.port):nt=isHttps()?443:80;const et=window.location.pathname.replace(FINAL_SLASH_RE,"").replace(INITIAL_SLASH_RE,"");return{host:tt,port:nt,basePath:et}}function getPossibleBaseUris(){const tt=getWindowBaseUriParts(),{basePath:nt}=tt;if(!nt)return[tt];const et=nt.split("/"),rt=[];for(;et.length>0;)rt.push({...tt,basePath:et.join("/")}),et.pop();return rt.push({...tt,basePath:""}),take$1(rt,2)}function buildWsUri({host:tt,port:nt,basePath:et},rt){const ot=isHttps()?"wss":"ws",at=makePath(et,rt);return`${ot}://${tt}:${nt}/${at}`}function buildHttpUri({host:tt,port:nt,basePath:et},rt){const ot=isHttps()?"https":"http",at=makePath(et,rt);return`${ot}://${tt}:${nt}/${at}`}function makePath(tt,nt){return tt=tt.replace(FINAL_SLASH_RE,"").replace(INITIAL_SLASH_RE,""),nt=nt.replace(FINAL_SLASH_RE,"").replace(INITIAL_SLASH_RE,""),tt.length===0?nt:`${tt}/${nt}`}function isHttps(){return window.location.href.startsWith("https://")}function isValidOrigin(tt,nt){let et,rt,ot;try{et=new URLPattern(tt),rt=new URLPattern({protocol:et.protocol,hostname:et.hostname}),ot=new URL(nt)}catch{return!1}return ot.hostname==="localhost"&&rt.test(ot)?!0:et.test(ot)}const HOST_COMM_VERSION=1;class HostCommunicationManager{constructor(nt){this.openHostCommunication=()=>{window.addEventListener("message",this.receiveHostMessage),this.sendMessageToHost({type:"GUEST_READY",streamlitExecutionStartedAt:this.props.streamlitExecutionStartedAt,guestReadyAt:Date.now()})},this.closeHostCommunication=()=>{window.removeEventListener("message",this.receiveHostMessage)},this.resetAuthToken=()=>{this.deferredAuthToken=new Resolver},this.claimAuthToken=()=>this.deferredAuthToken.promise,this.setAllowedOrigins=({allowedOrigins:et,useExternalAuthToken:rt})=>{rt||this.deferredAuthToken.resolve(void 0),et!=null&&et.length&&(this.allowedOrigins=et,this.openHostCommunication())},this.sendMessageToHost=et=>{window.parent.postMessage({stCommVersion:HOST_COMM_VERSION,...et},"*")},this.receiveHostMessage=et=>{const rt=et.data;if(!(rt.stCommVersion!==HOST_COMM_VERSION||!this.allowedOrigins.find(ot=>isValidOrigin(ot,et.origin)))){if(rt.type==="CLOSE_MODAL"&&this.props.closeModal(),rt.type==="STOP_SCRIPT"&&this.props.stopScript(),rt.type==="RERUN_SCRIPT"&&this.props.rerunScript(),rt.type==="CLEAR_CACHE"&&this.props.clearCache(),rt.type==="REQUEST_PAGE_CHANGE"&&this.props.pageChanged(rt.pageScriptHash),rt.type==="SEND_APP_HEARTBEAT"&&this.props.sendAppHeartbeat(),rt.type==="SET_INPUTS_DISABLED"&&this.props.setInputsDisabled(rt.disabled),rt.type==="SET_AUTH_TOKEN"&&this.deferredAuthToken.resolve(rt.authToken),rt.type==="SET_FILE_UPLOAD_CLIENT_CONFIG"){const{prefix:ot,headers:at}=rt;this.props.fileUploadClientConfigChanged({prefix:ot,headers:at})}rt.type==="SET_IS_OWNER"&&this.props.isOwnerChanged(rt.isOwner),rt.type==="SET_MENU_ITEMS"&&this.props.hostMenuItemsChanged(rt.items),rt.type==="SET_METADATA"&&this.props.deployedAppMetadataChanged(rt.metadata),rt.type==="SET_PAGE_LINK_BASE_URL"&&this.props.pageLinkBaseUrlChanged(rt.pageLinkBaseUrl),rt.type==="SET_SIDEBAR_CHEVRON_DOWNSHIFT"&&this.props.sidebarChevronDownshiftChanged(rt.sidebarChevronDownshift),rt.type==="SET_SIDEBAR_NAV_VISIBILITY"&&this.props.hostHideSidebarNavChanged(rt.hidden),rt.type==="SET_TOOLBAR_ITEMS"&&this.props.hostToolbarItemsChanged(rt.items),rt.type==="UPDATE_FROM_QUERY_PARAMS"&&(this.props.queryParamsChanged(rt.queryParams),this.props.sendRerunBackMsg()),rt.type==="UPDATE_HASH"&&(window.location.hash=rt.hash),rt.type==="SET_CUSTOM_THEME_CONFIG"&&this.props.themeChanged(rt.themeName,rt.themeInfo),rt.type==="RESTART_WEBSOCKET_CONNECTION"&&this.props.restartWebsocketConnection(),rt.type==="TERMINATE_WEBSOCKET_CONNECTION"&&this.props.terminateWebsocketConnection()}},this.props=nt,this.allowedOrigins=[],this.deferredAuthToken=new Resolver}}class SessionInfo{get current(){if(!this._current)throw new Error("Tried to use SessionInfo before it was initialized");return this._current}get last(){return this._last}setCurrent(nt){this._last=notNullOrUndefined(this._current)?{...this._current}:void 0,this._current=notNullOrUndefined(nt)?{...nt}:void 0}clearCurrent(){this.setCurrent(void 0)}get isSet(){return notNullOrUndefined(this._current)}get isHello(){return notNullOrUndefined(this._current)&&this._current.isHello}static propsFromNewSessionMessage(nt){const et=nt.initialize,rt=nt.config,ot=et.userInfo,at=et.environmentInfo;return{appId:hashString(ot.installationIdV3+nt.mainScriptPath),sessionId:et.sessionId,streamlitVersion:at.streamlitVersion,pythonVersion:at.pythonVersion,installationId:ot.installationId,installationIdV3:ot.installationIdV3,maxCachedMessageAge:rt.maxCachedMessageAge,isHello:et.isHello}}}function findNextEventIndex(tt,nt,et){const rt=typeof nt=="number"?nt:tt.indexOf(nt);for(let ot=rt;ot<tt.length;++ot)if(et(tt[ot]))return ot}function findPrevEventIndex(tt,nt,et){const rt=typeof nt=="number"?nt:tt.indexOf(nt);for(let ot=rt;ot>=0;--ot){const at=tt[ot];if(et(at))return ot}}function findPrevEvent(tt,nt,et){const rt=findPrevEventIndex(tt,nt,et);return rt!==void 0?tt[rt]:void 0}function isHandleMessageEvent(tt){return tt.messageIndex!==void 0}function getTimeDelta(tt,nt){return Math.abs(nt.timestamp-tt.timestamp)}class RerunAnalyzer{constructor(nt,et){this.getResults=()=>{const ot=new Set;if(this.rerunEvents.forEach(pt=>{isHandleMessageEvent(pt)&&ot.add(pt.messageIndex)}),ot.size===0)return"No rerun messages found!";const at=Array.from(ot).sort(compareNumbers),st=this.rerunEvents[this.rerunEvents.length-1],ut=this.rerunEvents[0],ct={messages:at.map(this.getMessageAnalysis),rerunDuration:getTimeDelta(ut,st)};return this.requestedRerun!==void 0&&(ct.requestedRerun=!0,ct.scriptRunStateAtStart=this.requestedRerun.scriptRunState,ct.requestToRerunStart=getTimeDelta(this.requestedRerun,ut)),ct},this.getMessageAnalysis=ot=>{const at=[];let st=0;for(;st<this.rerunEvents.length;){const dt=findNextMessageEvent(this.rerunEvents,st,ot);if(dt===void 0)break;at.push(this.rerunEvents[dt]),st=dt+1}if(at.length===0)throw new Error(`No messages for the given index: ${ot}`);const ut=at[0],ct=at[at.length-1],pt={messageIndex:ot,duration:getTimeDelta(ut,ct),steps:[]};for(let dt=1;dt<at.length;++dt){const ft=at[dt-1],bt=at[dt];bt.name==="DecodedMessage"&&(pt.messageType=bt.messageType,pt.len=bt.len),pt.steps.push({name:bt.name,duration:getTimeDelta(ft,bt)})}return pt};const rt=findRunStartEventIndex(nt,et);if(rt===void 0)throw new Error("Unable to find run start!");this.rerunEvents=nt.slice(rt,et+1),this.requestedRerun=findPrevEvent(nt,rt-1,ot=>ot.name==="RequestedRerun")}}function compareNumbers(tt,nt){return tt<nt?-1:tt>nt?1:0}function findRunStartEventIndex(tt,nt){const et=findPrevEventIndex(tt,nt-1,ot=>ot.name==="DecodedMessage"&&ot.messageType==="newSession");if(et===void 0)return;const{messageIndex:rt}=tt[et];return findPrevEventIndex(tt,et,ot=>ot.name==="BeginHandleMessage"&&ot.messageIndex===rt)}function findNextMessageEvent(tt,nt,et){return findNextEventIndex(tt,nt,rt=>isHandleMessageEvent(rt)&&rt.messageIndex===et)}function getRerunAnalysis(tt,nt){return new RerunAnalyzer(tt,tt.length-1).getResults()}const Tn=class Tn{static record(nt){this.enabled&&(nt.timestamp=performance.now(),this.events.push(nt),nt.name==="DispatchedMessage"&&nt.messageType==="scriptFinished"&&(logMessage("Rerun results",getRerunAnalysis(this.events)),this.events=[]))}};Tn.enabled=!1,Tn.events=[];let PerformanceEvents=Tn;var Un;const nonce=((Un=document.currentScript)==null?void 0:Un.nonce)||"",cache=createCache({key:"st-emotion-cache",...nonce&&{nonce}});function RootStyleProvider(tt){const{children:nt,theme:et}=tt;return jsx$1(BaseProvider,{theme:et.basewebTheme,zIndex:et.emotion.zIndices.popupMenu,children:jsx$1(CacheProvider,{value:cache,children:jsxs(ThemeProvider$2,{theme:et.emotion,children:[jsx$1(Global,{styles:[globalStyles]}),nt]})})})}class Timer{constructor(){this.duration=0,this.startTime=0,this.running=!1}get isRunning(){return this.running}get remainingTime(){if(!this.running)return 0;const nt=Date.now()-this.startTime;return Math.max(this.duration-nt,0)}setTimeout(nt,et){this.cancel(),this.startTime=Date.now(),this.duration=et,this.running=!0,this.timerHandle=window.setTimeout(()=>{this.running=!1,nt()},et)}cancel(){this.timerHandle!==void 0&&(window.clearTimeout(this.timerHandle),this.timerHandle=void 0,this.running=!1)}}var src={exports:{}},indexLight={exports:{}},util$2={exports:{}},codegen_1=codegen;function codegen(tt,nt){typeof tt=="string"&&(nt=tt,tt=void 0);var et=[];function rt(at){if(typeof at!="string"){var st=ot();if(codegen.verbose&&console.log("codegen: "+st),st="return "+st,at){for(var ut=Object.keys(at),ct=new Array(ut.length+1),pt=new Array(ut.length),dt=0;dt<ut.length;)ct[dt]=ut[dt],pt[dt]=at[ut[dt++]];return ct[dt]=st,Function.apply(null,ct).apply(null,pt)}return Function(st)()}for(var ft=new Array(arguments.length-1),bt=0;bt<ft.length;)ft[bt]=arguments[++bt];if(bt=0,at=at.replace(/%([%dfijs])/g,function(Mt,mt){var Ot=ft[bt++];switch(mt){case"d":case"f":return String(Number(Ot));case"i":return String(Math.floor(Ot));case"j":return JSON.stringify(Ot);case"s":return String(Ot)}return"%"}),bt!==ft.length)throw Error("parameter count mismatch");return et.push(at),rt}function ot(at){return"function "+(at||nt||"")+"("+(tt&&tt.join(",")||"")+`){
|
725
725
|
`+et.join(`
|
726
726
|
`)+`
|
727
727
|
}`}return rt.toString=ot,rt}codegen.verbose=!1;var fetch_1=fetch$1,asPromise=aspromise,inquire=inquire_1,fs=inquire("fs");function fetch$1(tt,nt,et){return typeof nt=="function"?(et=nt,nt={}):nt||(nt={}),et?!nt.xhr&&fs&&fs.readFile?fs.readFile(tt,function(ot,at){return ot&&typeof XMLHttpRequest<"u"?fetch$1.xhr(tt,nt,et):ot?et(ot):et(null,nt.binary?at:at.toString("utf8"))}):fetch$1.xhr(tt,nt,et):asPromise(fetch$1,this,tt,nt)}fetch$1.xhr=function tt(nt,et,rt){var ot=new XMLHttpRequest;ot.onreadystatechange=function(){if(ot.readyState===4){if(ot.status!==0&&ot.status!==200)return rt(Error("status "+ot.status));if(et.binary){var st=ot.response;if(!st){st=[];for(var ut=0;ut<ot.responseText.length;++ut)st.push(ot.responseText.charCodeAt(ut)&255)}return rt(null,typeof Uint8Array<"u"?new Uint8Array(st):st)}return rt(null,ot.responseText)}},et.binary&&("overrideMimeType"in ot&&ot.overrideMimeType("text/plain; charset=x-user-defined"),ot.responseType="arraybuffer"),ot.open("GET",nt),ot.send()};var path={};(function(tt){var nt=tt,et=nt.isAbsolute=function(at){return/^(?:\/|\w+:)/.test(at)},rt=nt.normalize=function(at){at=at.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var st=at.split("/"),ut=et(at),ct="";ut&&(ct=st.shift()+"/");for(var pt=0;pt<st.length;)st[pt]===".."?pt>0&&st[pt-1]!==".."?st.splice(--pt,2):ut?st.splice(pt,1):++pt:st[pt]==="."?st.splice(pt,1):++pt;return ct+st.join("/")};nt.resolve=function(at,st,ut){return ut||(st=rt(st)),et(st)?st:(ut||(at=rt(at)),(at=at.replace(/(?:\/|^)[^/]+$/,"")).length?rt(at+"/"+st):st)}})(path);var types$1={},hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(tt){var nt=tt,et=requireUtil(),rt=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function ot(at,st){var ut=0,ct={};for(st|=0;ut<at.length;)ct[rt[ut+st]]=at[ut++];return ct}nt.basic=ot([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),nt.defaults=ot([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",et.emptyArray,null]),nt.long=ot([0,0,0,1,1],7),nt.mapKey=ot([0,0,0,5,5,0,0,0,1,1,0,2],2),nt.packed=ot([1,5,0,0,0,5,5,0,0,0,1,1,0])}(types$1)),types$1}var field,hasRequiredField;function requireField(){if(hasRequiredField)return field;hasRequiredField=1,field=st;var tt=requireObject();((st.prototype=Object.create(tt.prototype)).constructor=st).className="Field";var nt=require_enum(),et=requireTypes(),rt=requireUtil(),ot,at=/^required|optional|repeated$/;st.fromJSON=function(ct,pt){return new st(ct,pt.id,pt.type,pt.rule,pt.extend,pt.options,pt.comment)};function st(ut,ct,pt,dt,ft,bt,ht){if(rt.isObject(dt)?(ht=ft,bt=dt,dt=ft=void 0):rt.isObject(ft)&&(ht=bt,bt=ft,ft=void 0),tt.call(this,ut,bt),!rt.isInteger(ct)||ct<0)throw TypeError("id must be a non-negative integer");if(!rt.isString(pt))throw TypeError("type must be a string");if(dt!==void 0&&!at.test(dt=dt.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(ft!==void 0&&!rt.isString(ft))throw TypeError("extend must be a string");dt==="proto3_optional"&&(dt="optional"),this.rule=dt&&dt!=="optional"?dt:void 0,this.type=pt,this.id=ct,this.extend=ft||void 0,this.required=dt==="required",this.optional=!this.required,this.repeated=dt==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=rt.Long?et.long[pt]!==void 0:!1,this.bytes=pt==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=ht}return Object.defineProperty(st.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}}),st.prototype.setOption=function(ct,pt,dt){return ct==="packed"&&(this._packed=null),tt.prototype.setOption.call(this,ct,pt,dt)},st.prototype.toJSON=function(ct){var pt=ct?!!ct.keepComments:!1;return rt.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",pt?this.comment:void 0])},st.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=et.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof ot?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof nt&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof nt))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=rt.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var ct;rt.base64.test(this.typeDefault)?rt.base64.decode(this.typeDefault,ct=rt.newBuffer(rt.base64.length(this.typeDefault)),0):rt.utf8.write(this.typeDefault,ct=rt.newBuffer(rt.utf8.length(this.typeDefault)),0),this.typeDefault=ct}return this.map?this.defaultValue=rt.emptyObject:this.repeated?this.defaultValue=rt.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof ot&&(this.parent.ctor.prototype[this.name]=this.defaultValue),tt.prototype.resolve.call(this)},st.d=function(ct,pt,dt,ft){return typeof pt=="function"?pt=rt.decorateType(pt).name:pt&&typeof pt=="object"&&(pt=rt.decorateEnum(pt).name),function(ht,Mt){rt.decorateType(ht.constructor).add(new st(Mt,ct,pt,dt,{default:ft}))}},st._configure=function(ct){ot=ct},field}var oneof,hasRequiredOneof;function requireOneof(){if(hasRequiredOneof)return oneof;hasRequiredOneof=1,oneof=rt;var tt=requireObject();((rt.prototype=Object.create(tt.prototype)).constructor=rt).className="OneOf";var nt=requireField(),et=requireUtil();function rt(at,st,ut,ct){if(Array.isArray(st)||(ut=st,st=void 0),tt.call(this,at,ut),!(st===void 0||Array.isArray(st)))throw TypeError("fieldNames must be an Array");this.oneof=st||[],this.fieldsArray=[],this.comment=ct}rt.fromJSON=function(st,ut){return new rt(st,ut.oneof,ut.options,ut.comment)},rt.prototype.toJSON=function(st){var ut=st?!!st.keepComments:!1;return et.toObject(["options",this.options,"oneof",this.oneof,"comment",ut?this.comment:void 0])};function ot(at){if(at.parent)for(var st=0;st<at.fieldsArray.length;++st)at.fieldsArray[st].parent||at.parent.add(at.fieldsArray[st])}return rt.prototype.add=function(st){if(!(st instanceof nt))throw TypeError("field must be a Field");return st.parent&&st.parent!==this.parent&&st.parent.remove(st),this.oneof.push(st.name),this.fieldsArray.push(st),st.partOf=this,ot(this),this},rt.prototype.remove=function(st){if(!(st instanceof nt))throw TypeError("field must be a Field");var ut=this.fieldsArray.indexOf(st);if(ut<0)throw Error(st+" is not a member of "+this);return this.fieldsArray.splice(ut,1),ut=this.oneof.indexOf(st.name),ut>-1&&this.oneof.splice(ut,1),st.partOf=null,this},rt.prototype.onAdd=function(st){tt.prototype.onAdd.call(this,st);for(var ut=this,ct=0;ct<this.oneof.length;++ct){var pt=st.get(this.oneof[ct]);pt&&!pt.partOf&&(pt.partOf=ut,ut.fieldsArray.push(pt))}ot(this)},rt.prototype.onRemove=function(st){for(var ut=0,ct;ut<this.fieldsArray.length;++ut)(ct=this.fieldsArray[ut]).parent&&ct.parent.remove(ct);tt.prototype.onRemove.call(this,st)},rt.d=function(){for(var st=new Array(arguments.length),ut=0;ut<arguments.length;)st[ut]=arguments[ut++];return function(pt,dt){et.decorateType(pt.constructor).add(new rt(dt,st)),Object.defineProperty(pt,dt,{get:et.oneOfGetter(st),set:et.oneOfSetter(st)})}},oneof}var namespace,hasRequiredNamespace;function requireNamespace(){if(hasRequiredNamespace)return namespace;hasRequiredNamespace=1,namespace=ct;var tt=requireObject();((ct.prototype=Object.create(tt.prototype)).constructor=ct).className="Namespace";var nt=requireField(),et=requireUtil(),rt=requireOneof(),ot,at,st;ct.fromJSON=function(ft,bt){return new ct(ft,bt.options).addJSON(bt.nested)};function ut(dt,ft){if(dt&&dt.length){for(var bt={},ht=0;ht<dt.length;++ht)bt[dt[ht].name]=dt[ht].toJSON(ft);return bt}}ct.arrayToJSON=ut,ct.isReservedId=function(ft,bt){if(ft){for(var ht=0;ht<ft.length;++ht)if(typeof ft[ht]!="string"&&ft[ht][0]<=bt&&ft[ht][1]>bt)return!0}return!1},ct.isReservedName=function(ft,bt){if(ft){for(var ht=0;ht<ft.length;++ht)if(ft[ht]===bt)return!0}return!1};function ct(dt,ft){tt.call(this,dt,ft),this.nested=void 0,this._nestedArray=null}function pt(dt){return dt._nestedArray=null,dt}return Object.defineProperty(ct.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=et.toArray(this.nested))}}),ct.prototype.toJSON=function(ft){return et.toObject(["options",this.options,"nested",ut(this.nestedArray,ft)])},ct.prototype.addJSON=function(ft){var bt=this;if(ft)for(var ht=Object.keys(ft),Mt=0,mt;Mt<ht.length;++Mt)mt=ft[ht[Mt]],bt.add((mt.fields!==void 0?ot.fromJSON:mt.values!==void 0?st.fromJSON:mt.methods!==void 0?at.fromJSON:mt.id!==void 0?nt.fromJSON:ct.fromJSON)(ht[Mt],mt));return this},ct.prototype.get=function(ft){return this.nested&&this.nested[ft]||null},ct.prototype.getEnum=function(ft){if(this.nested&&this.nested[ft]instanceof st)return this.nested[ft].values;throw Error("no such enum: "+ft)},ct.prototype.add=function(ft){if(!(ft instanceof nt&&ft.extend!==void 0||ft instanceof ot||ft instanceof rt||ft instanceof st||ft instanceof at||ft instanceof ct))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var bt=this.get(ft.name);if(bt)if(bt instanceof ct&&ft instanceof ct&&!(bt instanceof ot||bt instanceof at)){for(var ht=bt.nestedArray,Mt=0;Mt<ht.length;++Mt)ft.add(ht[Mt]);this.remove(bt),this.nested||(this.nested={}),ft.setOptions(bt.options,!0)}else throw Error("duplicate name '"+ft.name+"' in "+this)}return this.nested[ft.name]=ft,ft.onAdd(this),pt(this)},ct.prototype.remove=function(ft){if(!(ft instanceof tt))throw TypeError("object must be a ReflectionObject");if(ft.parent!==this)throw Error(ft+" is not a member of "+this);return delete this.nested[ft.name],Object.keys(this.nested).length||(this.nested=void 0),ft.onRemove(this),pt(this)},ct.prototype.define=function(ft,bt){if(et.isString(ft))ft=ft.split(".");else if(!Array.isArray(ft))throw TypeError("illegal path");if(ft&&ft.length&&ft[0]==="")throw Error("path must be relative");for(var ht=this;ft.length>0;){var Mt=ft.shift();if(ht.nested&&ht.nested[Mt]){if(ht=ht.nested[Mt],!(ht instanceof ct))throw Error("path conflicts with non-namespace objects")}else ht.add(ht=new ct(Mt))}return bt&&ht.addJSON(bt),ht},ct.prototype.resolveAll=function(){for(var ft=this.nestedArray,bt=0;bt<ft.length;)ft[bt]instanceof ct?ft[bt++].resolveAll():ft[bt++].resolve();return this.resolve()},ct.prototype.lookup=function(ft,bt,ht){if(typeof bt=="boolean"?(ht=bt,bt=void 0):bt&&!Array.isArray(bt)&&(bt=[bt]),et.isString(ft)&&ft.length){if(ft===".")return this.root;ft=ft.split(".")}else if(!ft.length)return this;if(ft[0]==="")return this.root.lookup(ft.slice(1),bt);var Mt=this.get(ft[0]);if(Mt){if(ft.length===1){if(!bt||bt.indexOf(Mt.constructor)>-1)return Mt}else if(Mt instanceof ct&&(Mt=Mt.lookup(ft.slice(1),bt,!0)))return Mt}else for(var mt=0;mt<this.nestedArray.length;++mt)if(this._nestedArray[mt]instanceof ct&&(Mt=this._nestedArray[mt].lookup(ft,bt,!0)))return Mt;return this.parent===null||ht?null:this.parent.lookup(ft,bt)},ct.prototype.lookupType=function(ft){var bt=this.lookup(ft,[ot]);if(!bt)throw Error("no such type: "+ft);return bt},ct.prototype.lookupEnum=function(ft){var bt=this.lookup(ft,[st]);if(!bt)throw Error("no such Enum '"+ft+"' in "+this);return bt},ct.prototype.lookupTypeOrEnum=function(ft){var bt=this.lookup(ft,[ot,st]);if(!bt)throw Error("no such Type or Enum '"+ft+"' in "+this);return bt},ct.prototype.lookupService=function(ft){var bt=this.lookup(ft,[at]);if(!bt)throw Error("no such Service '"+ft+"' in "+this);return bt},ct._configure=function(dt,ft,bt){ot=dt,at=ft,st=bt},namespace}var mapfield,hasRequiredMapfield;function requireMapfield(){if(hasRequiredMapfield)return mapfield;hasRequiredMapfield=1,mapfield=rt;var tt=requireField();((rt.prototype=Object.create(tt.prototype)).constructor=rt).className="MapField";var nt=requireTypes(),et=requireUtil();function rt(ot,at,st,ut,ct,pt){if(tt.call(this,ot,at,ut,void 0,void 0,ct,pt),!et.isString(st))throw TypeError("keyType must be a string");this.keyType=st,this.resolvedKeyType=null,this.map=!0}return rt.fromJSON=function(at,st){return new rt(at,st.id,st.keyType,st.type,st.options,st.comment)},rt.prototype.toJSON=function(at){var st=at?!!at.keepComments:!1;return et.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",st?this.comment:void 0])},rt.prototype.resolve=function(){if(this.resolved)return this;if(nt.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return tt.prototype.resolve.call(this)},rt.d=function(at,st,ut){return typeof ut=="function"?ut=et.decorateType(ut).name:ut&&typeof ut=="object"&&(ut=et.decorateEnum(ut).name),function(pt,dt){et.decorateType(pt.constructor).add(new rt(dt,at,st,ut))}},mapfield}var method,hasRequiredMethod;function requireMethod(){if(hasRequiredMethod)return method;hasRequiredMethod=1,method=et;var tt=requireObject();((et.prototype=Object.create(tt.prototype)).constructor=et).className="Method";var nt=requireUtil();function et(rt,ot,at,st,ut,ct,pt,dt,ft){if(nt.isObject(ut)?(pt=ut,ut=ct=void 0):nt.isObject(ct)&&(pt=ct,ct=void 0),!(ot===void 0||nt.isString(ot)))throw TypeError("type must be a string");if(!nt.isString(at))throw TypeError("requestType must be a string");if(!nt.isString(st))throw TypeError("responseType must be a string");tt.call(this,rt,pt),this.type=ot||"rpc",this.requestType=at,this.requestStream=ut?!0:void 0,this.responseType=st,this.responseStream=ct?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=dt,this.parsedOptions=ft}return et.fromJSON=function(ot,at){return new et(ot,at.type,at.requestType,at.responseType,at.requestStream,at.responseStream,at.options,at.comment,at.parsedOptions)},et.prototype.toJSON=function(ot){var at=ot?!!ot.keepComments:!1;return nt.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",at?this.comment:void 0,"parsedOptions",this.parsedOptions])},et.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),tt.prototype.resolve.call(this))},method}var service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=ot;var tt=requireNamespace();((ot.prototype=Object.create(tt.prototype)).constructor=ot).className="Service";var nt=requireMethod(),et=requireUtil(),rt=rpc;function ot(st,ut){tt.call(this,st,ut),this.methods={},this._methodsArray=null}ot.fromJSON=function(ut,ct){var pt=new ot(ut,ct.options);if(ct.methods)for(var dt=Object.keys(ct.methods),ft=0;ft<dt.length;++ft)pt.add(nt.fromJSON(dt[ft],ct.methods[dt[ft]]));return ct.nested&&pt.addJSON(ct.nested),pt.comment=ct.comment,pt},ot.prototype.toJSON=function(ut){var ct=tt.prototype.toJSON.call(this,ut),pt=ut?!!ut.keepComments:!1;return et.toObject(["options",ct&&ct.options||void 0,"methods",tt.arrayToJSON(this.methodsArray,ut)||{},"nested",ct&&ct.nested||void 0,"comment",pt?this.comment:void 0])},Object.defineProperty(ot.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=et.toArray(this.methods))}});function at(st){return st._methodsArray=null,st}return ot.prototype.get=function(ut){return this.methods[ut]||tt.prototype.get.call(this,ut)},ot.prototype.resolveAll=function(){for(var ut=this.methodsArray,ct=0;ct<ut.length;++ct)ut[ct].resolve();return tt.prototype.resolve.call(this)},ot.prototype.add=function(ut){if(this.get(ut.name))throw Error("duplicate name '"+ut.name+"' in "+this);return ut instanceof nt?(this.methods[ut.name]=ut,ut.parent=this,at(this)):tt.prototype.add.call(this,ut)},ot.prototype.remove=function(ut){if(ut instanceof nt){if(this.methods[ut.name]!==ut)throw Error(ut+" is not a member of "+this);return delete this.methods[ut.name],ut.parent=null,at(this)}return tt.prototype.remove.call(this,ut)},ot.prototype.create=function(ut,ct,pt){for(var dt=new rt.Service(ut,ct,pt),ft=0,bt;ft<this.methodsArray.length;++ft){var ht=et.lcFirst((bt=this._methodsArray[ft]).resolve().name).replace(/[^$\w_]/g,"");dt[ht]=et.codegen(["r","c"],et.isReserved(ht)?ht+"_":ht)("return this.rpcCall(m,q,s,r,c)")({m:bt,q:bt.resolvedRequestType.ctor,s:bt.resolvedResponseType.ctor})}return dt},service}var message=Message,util$1=requireMinimal();function Message(tt){if(tt)for(var nt=Object.keys(tt),et=0;et<nt.length;++et)this[nt[et]]=tt[nt[et]]}Message.create=function tt(nt){return this.$type.create(nt)};Message.encode=function tt(nt,et){return this.$type.encode(nt,et)};Message.encodeDelimited=function tt(nt,et){return this.$type.encodeDelimited(nt,et)};Message.decode=function tt(nt){return this.$type.decode(nt)};Message.decodeDelimited=function tt(nt){return this.$type.decodeDelimited(nt)};Message.verify=function tt(nt){return this.$type.verify(nt)};Message.fromObject=function tt(nt){return this.$type.fromObject(nt)};Message.toObject=function tt(nt,et){return this.$type.toObject(nt,et)};Message.prototype.toJSON=function tt(){return this.$type.toObject(this,util$1.toJSONOptions)};var decoder_1,hasRequiredDecoder;function requireDecoder(){if(hasRequiredDecoder)return decoder_1;hasRequiredDecoder=1,decoder_1=ot;var tt=require_enum(),nt=requireTypes(),et=requireUtil();function rt(at){return"missing required '"+at.name+"'"}function ot(at){var st=et.codegen(["r","l"],at.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(at.fieldsArray.filter(function(bt){return bt.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");at.group&&st("if((t&7)===4)")("break"),st("switch(t>>>3){");for(var ut=0;ut<at.fieldsArray.length;++ut){var ct=at._fieldsArray[ut].resolve(),pt=ct.resolvedType instanceof tt?"int32":ct.type,dt="m"+et.safeProp(ct.name);st("case %i: {",ct.id),ct.map?(st("if(%s===util.emptyObject)",dt)("%s={}",dt)("var c2 = r.uint32()+r.pos"),nt.defaults[ct.keyType]!==void 0?st("k=%j",nt.defaults[ct.keyType]):st("k=null"),nt.defaults[pt]!==void 0?st("value=%j",nt.defaults[pt]):st("value=null"),st("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",ct.keyType)("case 2:"),nt.basic[pt]===void 0?st("value=types[%i].decode(r,r.uint32())",ut):st("value=r.%s()",pt),st("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),nt.long[ct.keyType]!==void 0?st('%s[typeof k==="object"?util.longToHash(k):k]=value',dt):st("%s[k]=value",dt)):ct.repeated?(st("if(!(%s&&%s.length))",dt,dt)("%s=[]",dt),nt.packed[pt]!==void 0&&st("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",dt,pt)("}else"),nt.basic[pt]===void 0?st(ct.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",dt,ut):st("%s.push(r.%s())",dt,pt)):nt.basic[pt]===void 0?st(ct.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",dt,ut):st("%s=r.%s()",dt,pt),st("break")("}")}for(st("default:")("r.skipType(t&7)")("break")("}")("}"),ut=0;ut<at._fieldsArray.length;++ut){var ft=at._fieldsArray[ut];ft.required&&st("if(!m.hasOwnProperty(%j))",ft.name)("throw util.ProtocolError(%j,{instance:m})",rt(ft))}return st("return m")}return decoder_1}var verifier_1,hasRequiredVerifier;function requireVerifier(){if(hasRequiredVerifier)return verifier_1;hasRequiredVerifier=1,verifier_1=at;var tt=require_enum(),nt=requireUtil();function et(st,ut){return st.name+": "+ut+(st.repeated&&ut!=="array"?"[]":st.map&&ut!=="object"?"{k:"+st.keyType+"}":"")+" expected"}function rt(st,ut,ct,pt){if(ut.resolvedType)if(ut.resolvedType instanceof tt){st("switch(%s){",pt)("default:")("return%j",et(ut,"enum value"));for(var dt=Object.keys(ut.resolvedType.values),ft=0;ft<dt.length;++ft)st("case %i:",ut.resolvedType.values[dt[ft]]);st("break")("}")}else st("{")("var e=types[%i].verify(%s);",ct,pt)("if(e)")("return%j+e",ut.name+".")("}");else switch(ut.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":st("if(!util.isInteger(%s))",pt)("return%j",et(ut,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":st("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",pt,pt,pt,pt)("return%j",et(ut,"integer|Long"));break;case"float":case"double":st('if(typeof %s!=="number")',pt)("return%j",et(ut,"number"));break;case"bool":st('if(typeof %s!=="boolean")',pt)("return%j",et(ut,"boolean"));break;case"string":st("if(!util.isString(%s))",pt)("return%j",et(ut,"string"));break;case"bytes":st('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',pt,pt,pt)("return%j",et(ut,"buffer"));break}return st}function ot(st,ut,ct){switch(ut.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":st("if(!util.key32Re.test(%s))",ct)("return%j",et(ut,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":st("if(!util.key64Re.test(%s))",ct)("return%j",et(ut,"integer|Long key"));break;case"bool":st("if(!util.key2Re.test(%s))",ct)("return%j",et(ut,"boolean key"));break}return st}function at(st){var ut=nt.codegen(["m"],st.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),ct=st.oneofsArray,pt={};ct.length&&ut("var p={}");for(var dt=0;dt<st.fieldsArray.length;++dt){var ft=st._fieldsArray[dt].resolve(),bt="m"+nt.safeProp(ft.name);if(ft.optional&&ut("if(%s!=null&&m.hasOwnProperty(%j)){",bt,ft.name),ft.map)ut("if(!util.isObject(%s))",bt)("return%j",et(ft,"object"))("var k=Object.keys(%s)",bt)("for(var i=0;i<k.length;++i){"),ot(ut,ft,"k[i]"),rt(ut,ft,dt,bt+"[k[i]]")("}");else if(ft.repeated)ut("if(!Array.isArray(%s))",bt)("return%j",et(ft,"array"))("for(var i=0;i<%s.length;++i){",bt),rt(ut,ft,dt,bt+"[i]")("}");else{if(ft.partOf){var ht=nt.safeProp(ft.partOf.name);pt[ft.partOf.name]===1&&ut("if(p%s===1)",ht)("return%j",ft.partOf.name+": multiple values"),pt[ft.partOf.name]=1,ut("p%s=1",ht)}rt(ut,ft,dt,bt)}ft.optional&&ut("}")}return ut("return null")}return verifier_1}var converter={},hasRequiredConverter;function requireConverter(){return hasRequiredConverter||(hasRequiredConverter=1,function(tt){var nt=tt,et=require_enum(),rt=requireUtil();function ot(st,ut,ct,pt){var dt=!1;if(ut.resolvedType)if(ut.resolvedType instanceof et){st("switch(d%s){",pt);for(var ft=ut.resolvedType.values,bt=Object.keys(ft),ht=0;ht<bt.length;++ht)ft[bt[ht]]===ut.typeDefault&&!dt&&(st("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',pt,pt,pt),ut.repeated||st("break"),dt=!0),st("case%j:",bt[ht])("case %i:",ft[bt[ht]])("m%s=%j",pt,ft[bt[ht]])("break");st("}")}else st('if(typeof d%s!=="object")',pt)("throw TypeError(%j)",ut.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",pt,ct,pt);else{var Mt=!1;switch(ut.type){case"double":case"float":st("m%s=Number(d%s)",pt,pt);break;case"uint32":case"fixed32":st("m%s=d%s>>>0",pt,pt);break;case"int32":case"sint32":case"sfixed32":st("m%s=d%s|0",pt,pt);break;case"uint64":Mt=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":st("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",pt,pt,Mt)('else if(typeof d%s==="string")',pt)("m%s=parseInt(d%s,10)",pt,pt)('else if(typeof d%s==="number")',pt)("m%s=d%s",pt,pt)('else if(typeof d%s==="object")',pt)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",pt,pt,pt,Mt?"true":"");break;case"bytes":st('if(typeof d%s==="string")',pt)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",pt,pt,pt)("else if(d%s.length >= 0)",pt)("m%s=d%s",pt,pt);break;case"string":st("m%s=String(d%s)",pt,pt);break;case"bool":st("m%s=Boolean(d%s)",pt,pt);break}}return st}nt.fromObject=function(ut){var ct=ut.fieldsArray,pt=rt.codegen(["d"],ut.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!ct.length)return pt("return new this.ctor");pt("var m=new this.ctor");for(var dt=0;dt<ct.length;++dt){var ft=ct[dt].resolve(),bt=rt.safeProp(ft.name);ft.map?(pt("if(d%s){",bt)('if(typeof d%s!=="object")',bt)("throw TypeError(%j)",ft.fullName+": object expected")("m%s={}",bt)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",bt),ot(pt,ft,dt,bt+"[ks[i]]")("}")("}")):ft.repeated?(pt("if(d%s){",bt)("if(!Array.isArray(d%s))",bt)("throw TypeError(%j)",ft.fullName+": array expected")("m%s=[]",bt)("for(var i=0;i<d%s.length;++i){",bt),ot(pt,ft,dt,bt+"[i]")("}")("}")):(ft.resolvedType instanceof et||pt("if(d%s!=null){",bt),ot(pt,ft,dt,bt),ft.resolvedType instanceof et||pt("}"))}return pt("return m")};function at(st,ut,ct,pt){if(ut.resolvedType)ut.resolvedType instanceof et?st("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",pt,ct,pt,pt,ct,pt,pt):st("d%s=types[%i].toObject(m%s,o)",pt,ct,pt);else{var dt=!1;switch(ut.type){case"double":case"float":st("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",pt,pt,pt,pt);break;case"uint64":dt=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":st('if(typeof m%s==="number")',pt)("d%s=o.longs===String?String(m%s):m%s",pt,pt,pt)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",pt,pt,pt,pt,dt?"true":"",pt);break;case"bytes":st("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",pt,pt,pt,pt,pt);break;default:st("d%s=m%s",pt,pt);break}}return st}nt.toObject=function(ut){var ct=ut.fieldsArray.slice().sort(rt.compareFieldsById);if(!ct.length)return rt.codegen()("return {}");for(var pt=rt.codegen(["m","o"],ut.name+"$toObject")("if(!o)")("o={}")("var d={}"),dt=[],ft=[],bt=[],ht=0;ht<ct.length;++ht)ct[ht].partOf||(ct[ht].resolve().repeated?dt:ct[ht].map?ft:bt).push(ct[ht]);if(dt.length){for(pt("if(o.arrays||o.defaults){"),ht=0;ht<dt.length;++ht)pt("d%s=[]",rt.safeProp(dt[ht].name));pt("}")}if(ft.length){for(pt("if(o.objects||o.defaults){"),ht=0;ht<ft.length;++ht)pt("d%s={}",rt.safeProp(ft[ht].name));pt("}")}if(bt.length){for(pt("if(o.defaults){"),ht=0;ht<bt.length;++ht){var Mt=bt[ht],mt=rt.safeProp(Mt.name);if(Mt.resolvedType instanceof et)pt("d%s=o.enums===String?%j:%j",mt,Mt.resolvedType.valuesById[Mt.typeDefault],Mt.typeDefault);else if(Mt.long)pt("if(util.Long){")("var n=new util.Long(%i,%i,%j)",Mt.typeDefault.low,Mt.typeDefault.high,Mt.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",mt)("}else")("d%s=o.longs===String?%j:%i",mt,Mt.typeDefault.toString(),Mt.typeDefault.toNumber());else if(Mt.bytes){var Ot="["+Array.prototype.slice.call(Mt.typeDefault).join(",")+"]";pt("if(o.bytes===String)d%s=%j",mt,String.fromCharCode.apply(String,Mt.typeDefault))("else{")("d%s=%s",mt,Ot)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",mt,mt)("}")}else pt("d%s=%j",mt,Mt.typeDefault)}pt("}")}var zt=!1;for(ht=0;ht<ct.length;++ht){var Mt=ct[ht],yt=ut._fieldsArray.indexOf(Mt),mt=rt.safeProp(Mt.name);Mt.map?(zt||(zt=!0,pt("var ks2")),pt("if(m%s&&(ks2=Object.keys(m%s)).length){",mt,mt)("d%s={}",mt)("for(var j=0;j<ks2.length;++j){"),at(pt,Mt,yt,mt+"[ks2[j]]")("}")):Mt.repeated?(pt("if(m%s&&m%s.length){",mt,mt)("d%s=[]",mt)("for(var j=0;j<m%s.length;++j){",mt),at(pt,Mt,yt,mt+"[j]")("}")):(pt("if(m%s!=null&&m.hasOwnProperty(%j)){",mt,Mt.name),at(pt,Mt,yt,mt),Mt.partOf&&pt("if(o.oneofs)")("d%s=%j",rt.safeProp(Mt.partOf.name),Mt.name)),pt("}")}return pt("return d")}}(converter)),converter}var wrappers={};(function(tt){var nt=tt,et=message;nt[".google.protobuf.Any"]={fromObject:function(rt){if(rt&&rt["@type"]){var ot=rt["@type"].substring(rt["@type"].lastIndexOf("/")+1),at=this.lookup(ot);if(at){var st=rt["@type"].charAt(0)==="."?rt["@type"].slice(1):rt["@type"];return st.indexOf("/")===-1&&(st="/"+st),this.create({type_url:st,value:at.encode(at.fromObject(rt)).finish()})}}return this.fromObject(rt)},toObject:function(rt,ot){var at="type.googleapis.com/",st="",ut="";if(ot&&ot.json&&rt.type_url&&rt.value){ut=rt.type_url.substring(rt.type_url.lastIndexOf("/")+1),st=rt.type_url.substring(0,rt.type_url.lastIndexOf("/")+1);var ct=this.lookup(ut);ct&&(rt=ct.decode(rt.value))}if(!(rt instanceof this.ctor)&&rt instanceof et){var pt=rt.$type.toObject(rt,ot),dt=rt.$type.fullName[0]==="."?rt.$type.fullName.slice(1):rt.$type.fullName;return st===""&&(st=at),ut=st+dt,pt["@type"]=ut,pt}return this.toObject(rt,ot)}}})(wrappers);var type,hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1,type=mt;var tt=requireNamespace();((mt.prototype=Object.create(tt.prototype)).constructor=mt).className="Type";var nt=require_enum(),et=requireOneof(),rt=requireField(),ot=requireMapfield(),at=requireService(),st=message,ut=reader,ct=writer,pt=requireUtil(),dt=requireEncoder(),ft=requireDecoder(),bt=requireVerifier(),ht=requireConverter(),Mt=wrappers;function mt(zt,yt){tt.call(this,zt,yt),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(mt.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var zt=Object.keys(this.fields),yt=0;yt<zt.length;++yt){var vt=this.fields[zt[yt]],At=vt.id;if(this._fieldsById[At])throw Error("duplicate id "+At+" in "+this);this._fieldsById[At]=vt}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=pt.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=pt.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=mt.generateConstructor(this)())},set:function(zt){var yt=zt.prototype;yt instanceof st||((zt.prototype=new st).constructor=zt,pt.merge(zt.prototype,yt)),zt.$type=zt.prototype.$type=this,pt.merge(zt,st,!0),this._ctor=zt;for(var vt=0;vt<this.fieldsArray.length;++vt)this._fieldsArray[vt].resolve();var At={};for(vt=0;vt<this.oneofsArray.length;++vt)At[this._oneofsArray[vt].resolve().name]={get:pt.oneOfGetter(this._oneofsArray[vt].oneof),set:pt.oneOfSetter(this._oneofsArray[vt].oneof)};vt&&Object.defineProperties(zt.prototype,At)}}}),mt.generateConstructor=function(yt){for(var vt=pt.codegen(["p"],yt.name),At=0,St;At<yt.fieldsArray.length;++At)(St=yt._fieldsArray[At]).map?vt("this%s={}",pt.safeProp(St.name)):St.repeated&&vt("this%s=[]",pt.safeProp(St.name));return vt("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function Ot(zt){return zt._fieldsById=zt._fieldsArray=zt._oneofsArray=null,delete zt.encode,delete zt.decode,delete zt.verify,zt}return mt.fromJSON=function(yt,vt){var At=new mt(yt,vt.options);At.extensions=vt.extensions,At.reserved=vt.reserved;for(var St=Object.keys(vt.fields),Et=0;Et<St.length;++Et)At.add((typeof vt.fields[St[Et]].keyType<"u"?ot.fromJSON:rt.fromJSON)(St[Et],vt.fields[St[Et]]));if(vt.oneofs)for(St=Object.keys(vt.oneofs),Et=0;Et<St.length;++Et)At.add(et.fromJSON(St[Et],vt.oneofs[St[Et]]));if(vt.nested)for(St=Object.keys(vt.nested),Et=0;Et<St.length;++Et){var Tt=vt.nested[St[Et]];At.add((Tt.id!==void 0?rt.fromJSON:Tt.fields!==void 0?mt.fromJSON:Tt.values!==void 0?nt.fromJSON:Tt.methods!==void 0?at.fromJSON:tt.fromJSON)(St[Et],Tt))}return vt.extensions&&vt.extensions.length&&(At.extensions=vt.extensions),vt.reserved&&vt.reserved.length&&(At.reserved=vt.reserved),vt.group&&(At.group=!0),vt.comment&&(At.comment=vt.comment),At},mt.prototype.toJSON=function(yt){var vt=tt.prototype.toJSON.call(this,yt),At=yt?!!yt.keepComments:!1;return pt.toObject(["options",vt&&vt.options||void 0,"oneofs",tt.arrayToJSON(this.oneofsArray,yt),"fields",tt.arrayToJSON(this.fieldsArray.filter(function(St){return!St.declaringField}),yt)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",vt&&vt.nested||void 0,"comment",At?this.comment:void 0])},mt.prototype.resolveAll=function(){for(var yt=this.fieldsArray,vt=0;vt<yt.length;)yt[vt++].resolve();var At=this.oneofsArray;for(vt=0;vt<At.length;)At[vt++].resolve();return tt.prototype.resolveAll.call(this)},mt.prototype.get=function(yt){return this.fields[yt]||this.oneofs&&this.oneofs[yt]||this.nested&&this.nested[yt]||null},mt.prototype.add=function(yt){if(this.get(yt.name))throw Error("duplicate name '"+yt.name+"' in "+this);if(yt instanceof rt&&yt.extend===void 0){if(this._fieldsById?this._fieldsById[yt.id]:this.fieldsById[yt.id])throw Error("duplicate id "+yt.id+" in "+this);if(this.isReservedId(yt.id))throw Error("id "+yt.id+" is reserved in "+this);if(this.isReservedName(yt.name))throw Error("name '"+yt.name+"' is reserved in "+this);return yt.parent&&yt.parent.remove(yt),this.fields[yt.name]=yt,yt.message=this,yt.onAdd(this),Ot(this)}return yt instanceof et?(this.oneofs||(this.oneofs={}),this.oneofs[yt.name]=yt,yt.onAdd(this),Ot(this)):tt.prototype.add.call(this,yt)},mt.prototype.remove=function(yt){if(yt instanceof rt&&yt.extend===void 0){if(!this.fields||this.fields[yt.name]!==yt)throw Error(yt+" is not a member of "+this);return delete this.fields[yt.name],yt.parent=null,yt.onRemove(this),Ot(this)}if(yt instanceof et){if(!this.oneofs||this.oneofs[yt.name]!==yt)throw Error(yt+" is not a member of "+this);return delete this.oneofs[yt.name],yt.parent=null,yt.onRemove(this),Ot(this)}return tt.prototype.remove.call(this,yt)},mt.prototype.isReservedId=function(yt){return tt.isReservedId(this.reserved,yt)},mt.prototype.isReservedName=function(yt){return tt.isReservedName(this.reserved,yt)},mt.prototype.create=function(yt){return new this.ctor(yt)},mt.prototype.setup=function(){for(var yt=this.fullName,vt=[],At=0;At<this.fieldsArray.length;++At)vt.push(this._fieldsArray[At].resolve().resolvedType);this.encode=dt(this)({Writer:ct,types:vt,util:pt}),this.decode=ft(this)({Reader:ut,types:vt,util:pt}),this.verify=bt(this)({types:vt,util:pt}),this.fromObject=ht.fromObject(this)({types:vt,util:pt}),this.toObject=ht.toObject(this)({types:vt,util:pt});var St=Mt[yt];if(St){var Et=Object.create(this);Et.fromObject=this.fromObject,this.fromObject=St.fromObject.bind(Et),Et.toObject=this.toObject,this.toObject=St.toObject.bind(Et)}return this},mt.prototype.encode=function(yt,vt){return this.setup().encode(yt,vt)},mt.prototype.encodeDelimited=function(yt,vt){return this.encode(yt,vt&&vt.len?vt.fork():vt).ldelim()},mt.prototype.decode=function(yt,vt){return this.setup().decode(yt,vt)},mt.prototype.decodeDelimited=function(yt){return yt instanceof ut||(yt=ut.create(yt)),this.decode(yt,yt.uint32())},mt.prototype.verify=function(yt){return this.setup().verify(yt)},mt.prototype.fromObject=function(yt){return this.setup().fromObject(yt)},mt.prototype.toObject=function(yt,vt){return this.setup().toObject(yt,vt)},mt.d=function(yt){return function(At){pt.decorateType(At,yt)}},type}var root,hasRequiredRoot;function requireRoot(){if(hasRequiredRoot)return root;hasRequiredRoot=1,root=ct;var tt=requireNamespace();((ct.prototype=Object.create(tt.prototype)).constructor=ct).className="Root";var nt=requireField(),et=require_enum(),rt=requireOneof(),ot=requireUtil(),at,st,ut;function ct(bt){tt.call(this,"",bt),this.deferred=[],this.files=[]}ct.fromJSON=function(ht,Mt){return Mt||(Mt=new ct),ht.options&&Mt.setOptions(ht.options),Mt.addJSON(ht.nested)},ct.prototype.resolvePath=ot.path.resolve,ct.prototype.fetch=ot.fetch;function pt(){}ct.prototype.load=function bt(ht,Mt,mt){typeof Mt=="function"&&(mt=Mt,Mt=void 0);var Ot=this;if(!mt)return ot.asPromise(bt,Ot,ht,Mt);var zt=mt===pt;function yt(Ct,wt){if(mt){if(zt)throw Ct;var Lt=mt;mt=null,Lt(Ct,wt)}}function vt(Ct){var wt=Ct.lastIndexOf("google/protobuf/");if(wt>-1){var Lt=Ct.substring(wt);if(Lt in ut)return Lt}return null}function At(Ct,wt){try{if(ot.isString(wt)&&wt.charAt(0)==="{"&&(wt=JSON.parse(wt)),!ot.isString(wt))Ot.setOptions(wt.options).addJSON(wt.nested);else{st.filename=Ct;var Lt=st(wt,Ot,Mt),Ht,jt=0;if(Lt.imports)for(;jt<Lt.imports.length;++jt)(Ht=vt(Lt.imports[jt])||Ot.resolvePath(Ct,Lt.imports[jt]))&&St(Ht);if(Lt.weakImports)for(jt=0;jt<Lt.weakImports.length;++jt)(Ht=vt(Lt.weakImports[jt])||Ot.resolvePath(Ct,Lt.weakImports[jt]))&&St(Ht,!0)}}catch(s0){yt(s0)}!zt&&!Et&&yt(null,Ot)}function St(Ct,wt){if(Ct=vt(Ct)||Ct,!(Ot.files.indexOf(Ct)>-1)){if(Ot.files.push(Ct),Ct in ut){zt?At(Ct,ut[Ct]):(++Et,setTimeout(function(){--Et,At(Ct,ut[Ct])}));return}if(zt){var Lt;try{Lt=ot.fs.readFileSync(Ct).toString("utf8")}catch(Ht){wt||yt(Ht);return}At(Ct,Lt)}else++Et,Ot.fetch(Ct,function(Ht,jt){if(--Et,!!mt){if(Ht){wt?Et||yt(null,Ot):yt(Ht);return}At(Ct,jt)}})}}var Et=0;ot.isString(ht)&&(ht=[ht]);for(var Tt=0,Rt;Tt<ht.length;++Tt)(Rt=Ot.resolvePath("",ht[Tt]))&&St(Rt);if(zt)return Ot;Et||yt(null,Ot)},ct.prototype.loadSync=function(ht,Mt){if(!ot.isNode)throw Error("not supported");return this.load(ht,Mt,pt)},ct.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(ht){return"'extend "+ht.extend+"' in "+ht.parent.fullName}).join(", "));return tt.prototype.resolveAll.call(this)};var dt=/^[A-Z]/;function ft(bt,ht){var Mt=ht.parent.lookup(ht.extend);if(Mt){var mt=new nt(ht.fullName,ht.id,ht.type,ht.rule,void 0,ht.options);return Mt.get(mt.name)||(mt.declaringField=ht,ht.extensionField=mt,Mt.add(mt)),!0}return!1}return ct.prototype._handleAdd=function(ht){if(ht instanceof nt)ht.extend!==void 0&&!ht.extensionField&&(ft(this,ht)||this.deferred.push(ht));else if(ht instanceof et)dt.test(ht.name)&&(ht.parent[ht.name]=ht.values);else if(!(ht instanceof rt)){if(ht instanceof at)for(var Mt=0;Mt<this.deferred.length;)ft(this,this.deferred[Mt])?this.deferred.splice(Mt,1):++Mt;for(var mt=0;mt<ht.nestedArray.length;++mt)this._handleAdd(ht._nestedArray[mt]);dt.test(ht.name)&&(ht.parent[ht.name]=ht)}},ct.prototype._handleRemove=function(ht){if(ht instanceof nt){if(ht.extend!==void 0)if(ht.extensionField)ht.extensionField.parent.remove(ht.extensionField),ht.extensionField=null;else{var Mt=this.deferred.indexOf(ht);Mt>-1&&this.deferred.splice(Mt,1)}}else if(ht instanceof et)dt.test(ht.name)&&delete ht.parent[ht.name];else if(ht instanceof tt){for(var mt=0;mt<ht.nestedArray.length;++mt)this._handleRemove(ht._nestedArray[mt]);dt.test(ht.name)&&delete ht.parent[ht.name]}},ct._configure=function(bt,ht,Mt){at=bt,st=ht,ut=Mt},root}var hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util$2.exports;hasRequiredUtil=1;var tt=util$2.exports=requireMinimal(),nt=roots,et,rt;tt.codegen=codegen_1,tt.fetch=fetch_1,tt.path=path,tt.fs=tt.inquire("fs"),tt.toArray=function(pt){if(pt){for(var dt=Object.keys(pt),ft=new Array(dt.length),bt=0;bt<dt.length;)ft[bt]=pt[dt[bt++]];return ft}return[]},tt.toObject=function(pt){for(var dt={},ft=0;ft<pt.length;){var bt=pt[ft++],ht=pt[ft++];ht!==void 0&&(dt[bt]=ht)}return dt};var ot=/\\/g,at=/"/g;tt.isReserved=function(pt){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(pt)},tt.safeProp=function(pt){return!/^[$\w_]+$/.test(pt)||tt.isReserved(pt)?'["'+pt.replace(ot,"\\\\").replace(at,'\\"')+'"]':"."+pt},tt.ucFirst=function(pt){return pt.charAt(0).toUpperCase()+pt.substring(1)};var st=/_([a-z])/g;tt.camelCase=function(pt){return pt.substring(0,1)+pt.substring(1).replace(st,function(dt,ft){return ft.toUpperCase()})},tt.compareFieldsById=function(pt,dt){return pt.id-dt.id},tt.decorateType=function(pt,dt){if(pt.$type)return dt&&pt.$type.name!==dt&&(tt.decorateRoot.remove(pt.$type),pt.$type.name=dt,tt.decorateRoot.add(pt.$type)),pt.$type;et||(et=requireType());var ft=new et(dt||pt.name);return tt.decorateRoot.add(ft),ft.ctor=pt,Object.defineProperty(pt,"$type",{value:ft,enumerable:!1}),Object.defineProperty(pt.prototype,"$type",{value:ft,enumerable:!1}),ft};var ut=0;return tt.decorateEnum=function(pt){if(pt.$type)return pt.$type;rt||(rt=require_enum());var dt=new rt("Enum"+ut++,pt);return tt.decorateRoot.add(dt),Object.defineProperty(pt,"$type",{value:dt,enumerable:!1}),dt},tt.setProperty=function(pt,dt,ft){function bt(ht,Mt,mt){var Ot=Mt.shift();if(Ot==="__proto__"||Ot==="prototype")return ht;if(Mt.length>0)ht[Ot]=bt(ht[Ot]||{},Mt,mt);else{var zt=ht[Ot];zt&&(mt=[].concat(zt).concat(mt)),ht[Ot]=mt}return ht}if(typeof pt!="object")throw TypeError("dst must be an object");if(!dt)throw TypeError("path must be specified");return dt=dt.split("."),bt(pt,dt,ft)},Object.defineProperty(tt,"decorateRoot",{get:function(){return nt.decorated||(nt.decorated=new(requireRoot()))}}),util$2.exports}var object,hasRequiredObject;function requireObject(){if(hasRequiredObject)return object;hasRequiredObject=1,object=et,et.className="ReflectionObject";var tt=requireUtil(),nt;function et(rt,ot){if(!tt.isString(rt))throw TypeError("name must be a string");if(ot&&!tt.isObject(ot))throw TypeError("options must be an object");this.options=ot,this.parsedOptions=null,this.name=rt,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(et.prototype,{root:{get:function(){for(var rt=this;rt.parent!==null;)rt=rt.parent;return rt}},fullName:{get:function(){for(var rt=[this.name],ot=this.parent;ot;)rt.unshift(ot.name),ot=ot.parent;return rt.join(".")}}}),et.prototype.toJSON=function(){throw Error()},et.prototype.onAdd=function(ot){this.parent&&this.parent!==ot&&this.parent.remove(this),this.parent=ot,this.resolved=!1;var at=ot.root;at instanceof nt&&at._handleAdd(this)},et.prototype.onRemove=function(ot){var at=ot.root;at instanceof nt&&at._handleRemove(this),this.parent=null,this.resolved=!1},et.prototype.resolve=function(){return this.resolved?this:(this.root instanceof nt&&(this.resolved=!0),this)},et.prototype.getOption=function(ot){if(this.options)return this.options[ot]},et.prototype.setOption=function(ot,at,st){return(!st||!this.options||this.options[ot]===void 0)&&((this.options||(this.options={}))[ot]=at),this},et.prototype.setParsedOption=function(ot,at,st){this.parsedOptions||(this.parsedOptions=[]);var ut=this.parsedOptions;if(st){var ct=ut.find(function(ft){return Object.prototype.hasOwnProperty.call(ft,ot)});if(ct){var pt=ct[ot];tt.setProperty(pt,st,at)}else ct={},ct[ot]=tt.setProperty({},st,at),ut.push(ct)}else{var dt={};dt[ot]=at,ut.push(dt)}return this},et.prototype.setOptions=function(ot,at){if(ot)for(var st=Object.keys(ot),ut=0;ut<st.length;++ut)this.setOption(st[ut],ot[st[ut]],at);return this},et.prototype.toString=function(){var ot=this.constructor.className,at=this.fullName;return at.length?ot+" "+at:ot},et._configure=function(rt){nt=rt},object}var _enum,hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1,_enum=rt;var tt=requireObject();((rt.prototype=Object.create(tt.prototype)).constructor=rt).className="Enum";var nt=requireNamespace(),et=requireUtil();function rt(ot,at,st,ut,ct,pt){if(tt.call(this,ot,st),at&&typeof at!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=ut,this.comments=ct||{},this.valuesOptions=pt,this.reserved=void 0,at)for(var dt=Object.keys(at),ft=0;ft<dt.length;++ft)typeof at[dt[ft]]=="number"&&(this.valuesById[this.values[dt[ft]]=at[dt[ft]]]=dt[ft])}return rt.fromJSON=function(at,st){var ut=new rt(at,st.values,st.options,st.comment,st.comments);return ut.reserved=st.reserved,ut},rt.prototype.toJSON=function(at){var st=at?!!at.keepComments:!1;return et.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",st?this.comment:void 0,"comments",st?this.comments:void 0])},rt.prototype.add=function(at,st,ut,ct){if(!et.isString(at))throw TypeError("name must be a string");if(!et.isInteger(st))throw TypeError("id must be an integer");if(this.values[at]!==void 0)throw Error("duplicate name '"+at+"' in "+this);if(this.isReservedId(st))throw Error("id "+st+" is reserved in "+this);if(this.isReservedName(at))throw Error("name '"+at+"' is reserved in "+this);if(this.valuesById[st]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+st+" in "+this);this.values[at]=st}else this.valuesById[this.values[at]=st]=at;return ct&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[at]=ct||null),this.comments[at]=ut||null,this},rt.prototype.remove=function(at){if(!et.isString(at))throw TypeError("name must be a string");var st=this.values[at];if(st==null)throw Error("name '"+at+"' does not exist in "+this);return delete this.valuesById[st],delete this.values[at],delete this.comments[at],this.valuesOptions&&delete this.valuesOptions[at],this},rt.prototype.isReservedId=function(at){return nt.isReservedId(this.reserved,at)},rt.prototype.isReservedName=function(at){return nt.isReservedName(this.reserved,at)},_enum}var encoder_1,hasRequiredEncoder;function requireEncoder(){if(hasRequiredEncoder)return encoder_1;hasRequiredEncoder=1,encoder_1=ot;var tt=require_enum(),nt=requireTypes(),et=requireUtil();function rt(at,st,ut,ct){return st.resolvedType.group?at("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",ut,ct,(st.id<<3|3)>>>0,(st.id<<3|4)>>>0):at("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",ut,ct,(st.id<<3|2)>>>0)}function ot(at){for(var st=et.codegen(["m","w"],at.name+"$encode")("if(!w)")("w=Writer.create()"),ut,ct,pt=at.fieldsArray.slice().sort(et.compareFieldsById),ut=0;ut<pt.length;++ut){var dt=pt[ut].resolve(),ft=at._fieldsArray.indexOf(dt),bt=dt.resolvedType instanceof tt?"int32":dt.type,ht=nt.basic[bt];ct="m"+et.safeProp(dt.name),dt.map?(st("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",ct,dt.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",ct)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(dt.id<<3|2)>>>0,8|nt.mapKey[dt.keyType],dt.keyType),ht===void 0?st("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",ft,ct):st(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|ht,bt,ct),st("}")("}")):dt.repeated?(st("if(%s!=null&&%s.length){",ct,ct),dt.packed&&nt.packed[bt]!==void 0?st("w.uint32(%i).fork()",(dt.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",ct)("w.%s(%s[i])",bt,ct)("w.ldelim()"):(st("for(var i=0;i<%s.length;++i)",ct),ht===void 0?rt(st,dt,ft,ct+"[i]"):st("w.uint32(%i).%s(%s[i])",(dt.id<<3|ht)>>>0,bt,ct)),st("}")):(dt.optional&&st("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",ct,dt.name),ht===void 0?rt(st,dt,ft,ct):st("w.uint32(%i).%s(%s)",(dt.id<<3|ht)>>>0,bt,ct))}return st("return w")}return encoder_1}var protobuf$1=indexLight.exports=indexMinimal;protobuf$1.build="light";function load(tt,nt,et){return typeof nt=="function"?(et=nt,nt=new protobuf$1.Root):nt||(nt=new protobuf$1.Root),nt.load(tt,et)}protobuf$1.load=load;function loadSync(tt,nt){return nt||(nt=new protobuf$1.Root),nt.loadSync(tt)}protobuf$1.loadSync=loadSync;protobuf$1.encoder=requireEncoder();protobuf$1.decoder=requireDecoder();protobuf$1.verifier=requireVerifier();protobuf$1.converter=requireConverter();protobuf$1.ReflectionObject=requireObject();protobuf$1.Namespace=requireNamespace();protobuf$1.Root=requireRoot();protobuf$1.Enum=require_enum();protobuf$1.Type=requireType();protobuf$1.Field=requireField();protobuf$1.OneOf=requireOneof();protobuf$1.MapField=requireMapfield();protobuf$1.Service=requireService();protobuf$1.Method=requireMethod();protobuf$1.Message=message;protobuf$1.wrappers=wrappers;protobuf$1.types=requireTypes();protobuf$1.util=requireUtil();protobuf$1.ReflectionObject._configure(protobuf$1.Root);protobuf$1.Namespace._configure(protobuf$1.Type,protobuf$1.Service,protobuf$1.Enum);protobuf$1.Root._configure(protobuf$1.Type);protobuf$1.Field._configure(protobuf$1.Type);var indexLightExports=indexLight.exports,tokenize_1=tokenize$1,delimRe=/[\s{}=;:[\],'"()<>]/g,stringDoubleRe=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,stringSingleRe=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,setCommentRe=/^ *[*/]+ */,setCommentAltRe=/^\s*\*?\/*/,setCommentSplitRe=/\n/g,whitespaceRe=/\s/,unescapeRe=/\\(.?)/g,unescapeMap={0:"\0",r:"\r",n:`
|
@@ -795,4 +795,4 @@ not been pushed to GitHub. Please add it to continue.
|
|
795
795
|
`):" "+renderReason(at[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+st,"ERR_NOT_SUPPORT")}return rt},adapters:knownAdapters};function throwIfCancellationRequested(tt){if(tt.cancelToken&&tt.cancelToken.throwIfRequested(),tt.signal&&tt.signal.aborted)throw new CanceledError(null,tt)}function dispatchRequest(tt){return throwIfCancellationRequested(tt),tt.headers=AxiosHeaders.from(tt.headers),tt.data=transformData.call(tt,tt.transformRequest),["post","put","patch"].indexOf(tt.method)!==-1&&tt.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(tt.adapter||defaults.adapter)(tt).then(function(rt){return throwIfCancellationRequested(tt),rt.data=transformData.call(tt,tt.transformResponse,rt),rt.headers=AxiosHeaders.from(rt.headers),rt},function(rt){return isCancel(rt)||(throwIfCancellationRequested(tt),rt&&rt.response&&(rt.response.data=transformData.call(tt,tt.transformResponse,rt.response),rt.response.headers=AxiosHeaders.from(rt.response.headers))),Promise.reject(rt)})}const VERSION="1.7.9",validators$1={};["object","boolean","number","function","string","symbol"].forEach((tt,nt)=>{validators$1[tt]=function(rt){return typeof rt===tt||"a"+(nt<1?"n ":" ")+tt}});const deprecatedWarnings={};validators$1.transitional=function tt(nt,et,rt){function ot(at,st){return"[Axios v"+VERSION+"] Transitional option '"+at+"'"+st+(rt?". "+rt:"")}return(at,st,ut)=>{if(nt===!1)throw new AxiosError(ot(st," has been removed"+(et?" in "+et:"")),AxiosError.ERR_DEPRECATED);return et&&!deprecatedWarnings[st]&&(deprecatedWarnings[st]=!0,console.warn(ot(st," has been deprecated since v"+et+" and will be removed in the near future"))),nt?nt(at,st,ut):!0}};validators$1.spelling=function tt(nt){return(et,rt)=>(console.warn(`${rt} is likely a misspelling of ${nt}`),!0)};function assertOptions(tt,nt,et){if(typeof tt!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const rt=Object.keys(tt);let ot=rt.length;for(;ot-- >0;){const at=rt[ot],st=nt[at];if(st){const ut=tt[at],ct=ut===void 0||st(ut,at,tt);if(ct!==!0)throw new AxiosError("option "+at+" must be "+ct,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(et!==!0)throw new AxiosError("Unknown option "+at,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(nt){this.defaults=nt,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(nt,et){try{return await this._request(nt,et)}catch(rt){if(rt instanceof Error){let ot={};Error.captureStackTrace?Error.captureStackTrace(ot):ot=new Error;const at=ot.stack?ot.stack.replace(/^.+\n/,""):"";try{rt.stack?at&&!String(rt.stack).endsWith(at.replace(/^.+\n.+\n/,""))&&(rt.stack+=`
|
796
796
|
`+at):rt.stack=at}catch{}}throw rt}}_request(nt,et){typeof nt=="string"?(et=et||{},et.url=nt):et=nt||{},et=mergeConfig(this.defaults,et);const{transitional:rt,paramsSerializer:ot,headers:at}=et;rt!==void 0&&validator.assertOptions(rt,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),ot!=null&&(utils$1.isFunction(ot)?et.paramsSerializer={serialize:ot}:validator.assertOptions(ot,{encode:validators.function,serialize:validators.function},!0)),validator.assertOptions(et,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),et.method=(et.method||this.defaults.method||"get").toLowerCase();let st=at&&utils$1.merge(at.common,at[et.method]);at&&utils$1.forEach(["delete","get","head","post","put","patch","common"],Mt=>{delete at[Mt]}),et.headers=AxiosHeaders.concat(st,at);const ut=[];let ct=!0;this.interceptors.request.forEach(function(mt){typeof mt.runWhen=="function"&&mt.runWhen(et)===!1||(ct=ct&&mt.synchronous,ut.unshift(mt.fulfilled,mt.rejected))});const pt=[];this.interceptors.response.forEach(function(mt){pt.push(mt.fulfilled,mt.rejected)});let dt,ft=0,bt;if(!ct){const Mt=[dispatchRequest.bind(this),void 0];for(Mt.unshift.apply(Mt,ut),Mt.push.apply(Mt,pt),bt=Mt.length,dt=Promise.resolve(et);ft<bt;)dt=dt.then(Mt[ft++],Mt[ft++]);return dt}bt=ut.length;let ht=et;for(ft=0;ft<bt;){const Mt=ut[ft++],mt=ut[ft++];try{ht=Mt(ht)}catch(Ot){mt.call(this,Ot);break}}try{dt=dispatchRequest.call(this,ht)}catch(Mt){return Promise.reject(Mt)}for(ft=0,bt=pt.length;ft<bt;)dt=dt.then(pt[ft++],pt[ft++]);return dt}getUri(nt){nt=mergeConfig(this.defaults,nt);const et=buildFullPath(nt.baseURL,nt.url);return buildURL(et,nt.params,nt.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function tt(nt){Axios.prototype[nt]=function(et,rt){return this.request(mergeConfig(rt||{},{method:nt,url:et,data:(rt||{}).data}))}});utils$1.forEach(["post","put","patch"],function tt(nt){function et(rt){return function(at,st,ut){return this.request(mergeConfig(ut||{},{method:nt,headers:rt?{"Content-Type":"multipart/form-data"}:{},url:at,data:st}))}}Axios.prototype[nt]=et(),Axios.prototype[nt+"Form"]=et(!0)});class CancelToken{constructor(nt){if(typeof nt!="function")throw new TypeError("executor must be a function.");let et;this.promise=new Promise(function(at){et=at});const rt=this;this.promise.then(ot=>{if(!rt._listeners)return;let at=rt._listeners.length;for(;at-- >0;)rt._listeners[at](ot);rt._listeners=null}),this.promise.then=ot=>{let at;const st=new Promise(ut=>{rt.subscribe(ut),at=ut}).then(ot);return st.cancel=function(){rt.unsubscribe(at)},st},nt(function(at,st,ut){rt.reason||(rt.reason=new CanceledError(at,st,ut),et(rt.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(nt){if(this.reason){nt(this.reason);return}this._listeners?this._listeners.push(nt):this._listeners=[nt]}unsubscribe(nt){if(!this._listeners)return;const et=this._listeners.indexOf(nt);et!==-1&&this._listeners.splice(et,1)}toAbortSignal(){const nt=new AbortController,et=rt=>{nt.abort(rt)};return this.subscribe(et),nt.signal.unsubscribe=()=>this.unsubscribe(et),nt.signal}static source(){let nt;return{token:new CancelToken(function(ot){nt=ot}),cancel:nt}}}function spread(tt){return function(et){return tt.apply(null,et)}}function isAxiosError(tt){return utils$1.isObject(tt)&&tt.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([tt,nt])=>{HttpStatusCode[nt]=tt});function createInstance(tt){const nt=new Axios(tt),et=bind(Axios.prototype.request,nt);return utils$1.extend(et,Axios.prototype,nt,{allOwnKeys:!0}),utils$1.extend(et,nt,null,{allOwnKeys:!0}),et.create=function(ot){return createInstance(mergeConfig(tt,ot))},et}const axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function tt(nt){return Promise.all(nt)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=tt=>formDataToJSON(utils$1.isHTMLForm(tt)?new FormData(tt):tt);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;const LOG="WebsocketConnection",SERVER_PING_PATH="_stcore/health",HOST_CONFIG_PATH="_stcore/host-config",WEBSOCKET_STREAM_PATH="_stcore/stream",PING_MINIMUM_RETRY_PERIOD_MS=500,PING_MAXIMUM_RETRY_PERIOD_MS=1e3*60,PING_TIMEOUT_MS=15*1e3,WEBSOCKET_TIMEOUT_MS=15*1e3,CORS_ERROR_MESSAGE_DOCUMENTATION_LINK="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS";class WebsocketConnection{constructor(nt){this.uriIndex=0,this.lastDispatchedMessageIndex=-1,this.nextMessageIndex=0,this.messageQueue={},this.state=ConnectionState.INITIAL,this.args=nt,this.cache=new ForwardMsgCache(nt.endpoints),this.stepFsm("INITIALIZED")}getBaseUriParts(){if(this.state===ConnectionState.CONNECTED)return this.args.baseUriPartsList[this.uriIndex]}disconnect(){this.setFsmState(ConnectionState.DISCONNECTED_FOREVER)}setFsmState(nt,et){switch(this.state=nt,this.state){case ConnectionState.PINGING_SERVER:this.pingServer();break}switch(this.args.onConnectionStateChange(nt,et),this.state){case ConnectionState.CONNECTING:this.connectToWebSocket();break;case ConnectionState.DISCONNECTED_FOREVER:this.closeConnection();break}}stepFsm(nt,et){if(logMessage(LOG,`State: ${this.state}; Event: ${nt}`),nt==="FATAL_ERROR"&&this.state!==ConnectionState.DISCONNECTED_FOREVER){this.setFsmState(ConnectionState.DISCONNECTED_FOREVER,et);return}switch(this.state){case ConnectionState.INITIAL:if(nt==="INITIALIZED"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.CONNECTING:if(nt==="CONNECTION_SUCCEEDED"){this.setFsmState(ConnectionState.CONNECTED);return}if(nt==="CONNECTION_TIMED_OUT"||nt==="CONNECTION_ERROR"||nt==="CONNECTION_CLOSED"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.CONNECTED:if(nt==="CONNECTION_CLOSED"||nt==="CONNECTION_ERROR"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.PINGING_SERVER:if(nt==="SERVER_PING_SUCCEEDED"){this.setFsmState(ConnectionState.CONNECTING);return}break;case ConnectionState.DISCONNECTED_FOREVER:logWarning(LOG,`Discarding ${nt} while in ${ConnectionState.DISCONNECTED_FOREVER}`);return}throw new Error(`Unsupported state transition.
|
797
797
|
State: ${this.state}
|
798
|
-
Event: ${nt}`)}async pingServer(){this.uriIndex=await doInitPings(this.args.baseUriPartsList,PING_MINIMUM_RETRY_PERIOD_MS,PING_MAXIMUM_RETRY_PERIOD_MS,this.args.onRetry,this.args.onHostConfigResp),this.stepFsm("SERVER_PING_SUCCEEDED")}async getSessionTokens(){var et,rt;const nt=await this.args.claimHostAuthToken();return this.args.resetHostAuthToken(),[nt??"PLACEHOLDER_AUTH_TOKEN",...(et=this.args.sessionInfo.last)!=null&&et.sessionId?[(rt=this.args.sessionInfo.last)==null?void 0:rt.sessionId]:[]]}async connectToWebSocket(){const nt=buildWsUri(this.args.baseUriPartsList[this.uriIndex],WEBSOCKET_STREAM_PATH);if(notNullOrUndefined(this.websocket))throw new Error("Websocket already exists");const et=await this.getSessionTokens();this.websocket=new WebSocket(nt,["streamlit",...et]),this.websocket.binaryType="arraybuffer",this.setConnectionTimeout(nt);const rt=this.websocket,ot=()=>rt===this.websocket;this.websocket.addEventListener("message",at=>{ot()&&this.handleMessage(at.data).catch(st=>{const ut=`Failed to process a Websocket message (${st})`;logError(LOG,ut),this.stepFsm("FATAL_ERROR",ut)})}),this.websocket.addEventListener("open",()=>{ot()&&this.stepFsm("CONNECTION_SUCCEEDED")}),this.websocket.addEventListener("close",()=>{ot()&&(this.closeConnection(),this.stepFsm("CONNECTION_CLOSED"))}),this.websocket.addEventListener("error",()=>{ot()&&(logError(LOG,"WebSocket onerror"),this.closeConnection(),this.stepFsm("CONNECTION_ERROR"))})}setConnectionTimeout(nt){if(notNullOrUndefined(this.wsConnectionTimeoutId))throw new Error("WS timeout is already set");const et=this.websocket;this.wsConnectionTimeoutId=window.setTimeout(()=>{if(et===this.websocket&&!isNullOrUndefined$1(this.wsConnectionTimeoutId)){if(isNullOrUndefined$1(this.websocket)){this.closeConnection(),this.stepFsm("FATAL_ERROR","Null Websocket in setConnectionTimeout");return}this.websocket.readyState===0&&(this.closeConnection(),this.stepFsm("CONNECTION_TIMED_OUT"))}},WEBSOCKET_TIMEOUT_MS),logMessage(LOG,`Set WS timeout ${this.wsConnectionTimeoutId}`)}closeConnection(){this.websocket&&(this.websocket.close(),this.websocket=void 0),notNullOrUndefined(this.wsConnectionTimeoutId)&&(logMessage(LOG,`Clearing WS timeout ${this.wsConnectionTimeoutId}`),window.clearTimeout(this.wsConnectionTimeoutId),this.wsConnectionTimeoutId=void 0)}sendMessage(nt){if(!this.websocket)return;const et=BackMsg.create(nt),rt=BackMsg.encode(et).finish();this.websocket.send(rt)}incrementMessageCacheRunCount(nt){this.cache.incrementRunCount(nt)}async handleMessage(nt){const et=this.nextMessageIndex;this.nextMessageIndex+=1,PerformanceEvents.record({name:"BeginHandleMessage",messageIndex:et});const rt=new Uint8Array(nt),ot=ForwardMsg.decode(rt);for(PerformanceEvents.record({name:"DecodedMessage",messageIndex:et,messageType:ot.type,len:nt.byteLength}),this.messageQueue[et]=await this.cache.processMessagePayload(ot,rt),PerformanceEvents.record({name:"GotCachedPayload",messageIndex:et});this.lastDispatchedMessageIndex+1 in this.messageQueue;){const at=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[at]),PerformanceEvents.record({name:"DispatchedMessage",messageIndex:at,messageType:this.messageQueue[at].type}),delete this.messageQueue[at],this.lastDispatchedMessageIndex=at}}}function doInitPings(tt,nt,et,rt,ot){const at=new Resolver;let st=0,ut=0,ct=()=>{};const pt=()=>{ut++,ut>=tt.length&&(ut=0),ct()},dt=ht=>{const Mt=Math.random()*.4-.2,mt=st===1?nt:nt*2**(st-1)*(1+Mt),Ot=Math.min(et,mt);rt(st,ht,Ot),window.setTimeout(pt,Ot)},ft=()=>{const ht=tt[ut];new URL(buildHttpUri(ht,"")).hostname==="localhost"?dt(jsx$1(StreamlitMarkdown$1,{source:"\nIs Streamlit still running? If you accidentally stopped Streamlit, just restart it in your terminal:\n\n```bash\nstreamlit run yourscript.py\n```\n ",allowHTML:!1})):dt("Connection failed with status 0.")},bt=()=>{dt(jsxs(reactExports.Fragment,{children:[jsx$1("p",{children:"Cannot connect to Streamlit (HTTP status: 403)."}),jsxs("p",{children:["If you are trying to access a Streamlit app running on another server, this could be due to the app's"," ",jsx$1("a",{href:CORS_ERROR_MESSAGE_DOCUMENTATION_LINK,children:"CORS"})," settings."]})]}))};return ct=()=>{const ht=tt[ut],Mt=buildHttpUri(ht,SERVER_PING_PATH),mt=buildHttpUri(ht,HOST_CONFIG_PATH);ut===0&&st++,Promise.all([axios.get(Mt,{timeout:PING_TIMEOUT_MS}),axios.get(mt,{timeout:PING_TIMEOUT_MS})]).then(([Ot,zt])=>{ot(zt.data),at.resolve(ut)}).catch(Ot=>{if(Ot.code==="ECONNABORTED")return dt("Connection timed out.");if(Ot.response){const{data:zt,status:yt}=Ot.response;return yt===0?ft():yt===403?bt():dt(`Connection failed with status ${yt}, and response "${zt}".`)}return Ot.request?ft():dt(Ot.message)})},ct(),at.promise}const RETRY_COUNT_FOR_WARNING=6;class ConnectionManager{constructor(nt){this.connectionState=ConnectionState.INITIAL,this.setConnectionState=(et,rt)=>{this.connectionState!==et&&(this.connectionState=et,this.props.connectionStateChanged(et)),rt&&this.props.onConnectionError(rt)},this.showRetryError=(et,rt,ot)=>{et===RETRY_COUNT_FOR_WARNING&&this.props.onConnectionError(rt)},this.props=nt,this.connect()}isConnected(){return this.connectionState===ConnectionState.CONNECTED}getBaseUriParts(){if(this.connection instanceof WebsocketConnection)return this.connection.getBaseUriParts()}sendMessage(nt){this.connection instanceof WebsocketConnection&&this.isConnected()?this.connection.sendMessage(nt):logError(`Cannot send message when server is disconnected: ${nt}`)}incrementMessageCacheRunCount(nt){this.connection instanceof WebsocketConnection&&this.connection.incrementMessageCacheRunCount(nt)}async connect(){try{this.connection=await this.connectToRunningServer()}catch(nt){const et=ensureError(nt);logError(et.message),this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER,et.message)}}disconnect(){var nt;(nt=this.connection)==null||nt.disconnect()}connectToRunningServer(){const nt=getPossibleBaseUris();return new WebsocketConnection({sessionInfo:this.props.sessionInfo,endpoints:this.props.endpoints,baseUriPartsList:nt,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,onHostConfigResp:this.props.onHostConfigResp})}}class SessionEventDispatcher{constructor(){this.onSessionEvent=new dist.Signal}handleSessionEventMsg(nt){this.onSessionEvent.emit(nt)}}const MEDIA_ENDPOINT="/media",UPLOAD_FILE_ENDPOINT="/_stcore/upload_file",COMPONENT_ENDPOINT_BASE="/component",FORWARD_MSG_CACHE_ENDPOINT="/_stcore/message";class DefaultStreamlitEndpoints{constructor(nt){this.getServerUri=nt.getServerUri,this.csrfEnabled=nt.csrfEnabled}buildComponentURL(nt,et){return buildHttpUri(this.requireServerUri(),`${COMPONENT_ENDPOINT_BASE}/${nt}/${et}`)}setFileUploadClientConfig({prefix:nt,headers:et}){this.fileUploadClientConfig={prefix:nt,headers:et}}buildMediaURL(nt){return nt.startsWith(MEDIA_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildFileUploadURL(nt){return this.fileUploadClientConfig?makePath(this.fileUploadClientConfig.prefix,nt):nt.startsWith(UPLOAD_FILE_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildAppPageURL(nt,et){const rt=et.urlPathname,ot=et.isDefault?"":rt;if(notNullOrUndefined(nt)&&nt.length>0)return`${nt}/${ot}`;const{port:at,protocol:st}=window.location,{basePath:ut,host:ct}=this.requireServerUri(),pt=at?`:${at}`:"",dt=ut?`${ut}/`:"";return`${st}//${ct}${pt}/${dt}${ot}`}async uploadFileUploaderFile(nt,et,rt,ot,at){const st=new FormData;st.append(et.name,et);const ut=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{cancelToken:at,method:"PUT",data:st,responseType:"text",headers:ut,onUploadProgress:ot}).then(()=>{})}getAdditionalHeaders(){let nt={};return this.fileUploadClientConfig&&(nt={...nt,...this.fileUploadClientConfig.headers}),nt}async deleteFileAtURL(nt,et){const rt=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{method:"DELETE",data:{sessionId:et},headers:rt}).then(()=>{})}async fetchCachedForwardMsg(nt){const et=this.requireServerUri(),rt=await axios.request({url:buildHttpUri(et,`${FORWARD_MSG_CACHE_ENDPOINT}?hash=${nt}`),method:"GET",responseType:"arraybuffer"});return new Uint8Array(rt.data)}requireServerUri(){const nt=this.getServerUri();if(notNullOrUndefined(nt))return this.cachedServerUri=nt,nt;if(notNullOrUndefined(this.cachedServerUri))return this.cachedServerUri;throw new Error("not connected to a server!")}csrfRequest(nt,et){if(et.url=nt,this.csrfEnabled){const rt=getCookie("_streamlit_xsrf");notNullOrUndefined(rt)&&(et.headers={"X-Xsrftoken":rt,...et.headers||{}},et.withCredentials=!0)}return axios.request(et)}}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject=isObject_1,toKey=_toKey;function baseSet$1(tt,nt,et,rt){if(!isObject(tt))return tt;nt=castPath$1(nt,tt);for(var ot=-1,at=nt.length,st=at-1,ut=tt;ut!=null&&++ot<at;){var ct=toKey(nt[ot]),pt=et;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return tt;if(ot!=st){var dt=ut[ct];pt=rt?rt(dt,ct,ut):void 0,pt===void 0&&(pt=isObject(dt)?dt:isIndex(nt[ot+1])?[]:{})}assignValue(ut,ct,pt),ut=ut[ct]}return tt}var _baseSet=baseSet$1,baseGet=_baseGet,baseSet=_baseSet,castPath=_castPath;function basePickBy$1(tt,nt,et){for(var rt=-1,ot=nt.length,at={};++rt<ot;){var st=nt[rt],ut=baseGet(tt,st);et(ut,st)&&baseSet(at,castPath(st,tt),ut)}return at}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(tt,nt){return basePickBy(tt,nt,function(et,rt){return hasIn(tt,rt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick=flatRest(function(tt,nt){return tt==null?{}:basePick(tt,nt)}),pick_1=pick;const pick$1=getDefaultExportFromCjs$1(pick_1),DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json";class MetricsManager{constructor(nt){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=et=>{this.appHash=et},this.setMetricsConfig=(et="")=>{this.metricsUrl=et},this.sessionInfo=nt}async initialize({gatherUsageStats:nt,sendMessageToHost:et}){this.sendMessageToHost=et,this.actuallySendMetrics=nt&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(logError("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),logAlways("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(nt,et={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([nt,et]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(nt,et))}setMetadata(nt){this.metadata=nt}async requestDefaultMetricsConfig(){const nt=localStorageAvailable();if(nt){const et=window.localStorage.getItem("stMetricsConfig");if(et){this.metricsUrl=et;return}}try{const et=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!et.ok)this.metricsUrl=void 0,logError("Failed to fetch metrics config: ",et.status);else{const rt=await et.json();this.metricsUrl=rt.url??void 0,nt&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(et){logError("Failed to fetch metrics config:",et)}}send(nt,et={}){const rt=this.buildEventProto(nt,et);this.metricsUrl==="postMessage"?this.postMessageEvent(nt,rt):this.track(rt)}sendPendingEvents(){this.pendingEvents.forEach(([nt,et])=>{this.send(nt,et)}),this.pendingEvents=[]}async track(nt){const et=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(nt.toJSON())});await fetch(et)}postMessageEvent(nt,et){this.sendMessageToHost({type:"METRICS_EVENT",eventName:nt,data:et})}buildEventProto(nt,et){const rt=new MetricsEvent({event:nt,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,...this.getContextData()});if(nt==="menuClick")rt.label=et.label;else if(nt==="pageProfile")return new MetricsEvent({...rt,...et});return rt}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3}}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 nt="ajs_anonymous_id",et=localStorageAvailable(),rt=getCookie(nt),ot=et?window.localStorage.getItem(nt):null,at=new Date;at.setFullYear(new Date().getFullYear()+1),rt?(this.anonymousId=rt,et&&window.localStorage.setItem(nt,rt)):ot?(this.anonymousId=JSON.parse(ot),setCookie(nt,this.anonymousId,at)):(this.anonymousId=v4(),setCookie(nt,this.anonymousId,at),et&&window.localStorage.setItem(nt,this.anonymousId))}}const StyledApp=newStyled("div",{target:"e10tffaf0"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{position:"absolute",background:tt.colors.bgColor,color:tt.colors.bodyText,top:tt.spacing.none,left:tt.spacing.none,right:tt.spacing.none,bottom:tt.spacing.none,colorScheme:nt?"light":"dark",overflow:"hidden","@media print":{float:"none",height:tt.sizes.full,position:"static",overflow:"visible"}}}),StyledRecordAudioLabel=newStyled("label",{target:"e1nhbas40"})({margin:0}),StyledInstruction=newStyled("p",{target:"e1nhbas41"})({margin:0});class ScreencastDialog extends reactExports.PureComponent{constructor(){super(...arguments),this.state={recordAudio:this.props.recordAudio},this.handleRecordAudioCheckbox=nt=>{const{checked:et}=nt.target,{recordAudio:rt}=this.state,{toggleRecordAudio:ot}=this.props;et!==rt&&this.setState({recordAudio:et},ot)},this.handleStartButton=()=>{const{startRecording:nt,onClose:et}=this.props;nt(),et()}}render(){const{recordAudio:nt}=this.state,{onClose:et}=this.props;return jsxs(Modal,{isOpen:!0,onClose:et,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",checked:nt,onChange:this.handleRecordAudioCheckbox})," ","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:this.handleStartButton,children:"Start recording!"})})]})}}const StyledVideo=newStyled("video",{target:"ec1y6ev0"})(({theme:tt})=>({width:tt.sizes.full,borderRadius:tt.radii.md})),StyledDialogContainer=newStyled("div",{target:"ec1y6ev1"})(({theme:tt})=>({display:"flex",flexDirection:"column",width:tt.sizes.full})),StyledRow=newStyled("div",{target:"ec1y6ev2"})(({theme:tt})=>({display:"flex",flexDirection:"row",paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md})),StyledFirstColumn=newStyled("div",{target:"ec1y6ev3"})(({theme:tt})=>({paddingRight:tt.spacing.lg,textAlign:"right",color:tt.colors.gray,fontWeight:tt.fontWeights.bold,width:"6em"})),StyledSecondColumn=newStyled("div",{target:"ec1y6ev4"})(({theme:tt})=>({flex:1,paddingRight:tt.spacing.lg,marginRight:"6em",[`@media (max-width: ${tt.breakpoints.sm})`]:{marginRight:tt.spacing.none}})),StyledVideoFormatInstructions=newStyled("p",{target:"ec1y6ev5"})(({theme:tt})=>({marginTop:tt.spacing.sm,marginBottom:tt.spacing.none,fontSize:tt.fontSizes.sm})),StyledDownloadButtonContainer=newStyled("div",{target:"ec1y6ev6"})(({theme:tt})=>({marginTop:tt.spacing.twoXS})),VideoRecordedDialog=({onClose:tt,videoBlob:nt,fileName:et})=>{const rt=URL.createObjectURL(nt),ot=()=>{const at=document.createElement("a");at.setAttribute("href",rt),at.setAttribute("download",`${et}.webm`),at.click(),tt()};return jsxs(Modal,{isOpen:!0,onClose:tt,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:rt,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:ot,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:"😀"})]})]})]})})]})},StyledScreenCastWarningDialog=newStyled("div",{target:"e1xu6skw0"})({display:"flex"}),StyledUnsupportedScreenCastIcon=newStyled("div",{target:"e1xu6skw1"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:tt.spacing.twoXL,marginLeft:tt.spacing.sm,fontSize:tt.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=newStyled("p",{target:"e1xu6skw2"})(({theme:tt})=>({margin:tt.spacing.none})),UnsupportedBrowserDialog=({onClose:tt})=>jsxs(Modal,{isOpen:!0,onClose:tt,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),screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=newStyled("div",{target:"e1442ngl0"})(({theme:tt})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:tt.sizes.full,height:tt.sizes.full,fontSize:"40vh",color:tt.colors.red,fontWeight:tt.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${tt.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:tt,endCallback:nt})=>{const[et,rt]=reactExports.useState(tt);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const at=et-1;at>=0&&rt(at),at===0&&nt()},children:jsx$1("span",{children:et})},`frame${et}`)};function withScreencast(tt){const et=class et extends reactExports.PureComponent{constructor(){super(...arguments),this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:ot}=this.state;this.setState({recordAudio:!ot})},this.showDialog=ot=>{const{currentState:at}=this.state;ScreenCastRecorder.isSupportedBrowser()?at==="OFF"?this.setState({fileName:ot,currentState:"SETUP"}):this.stopRecording().catch(st=>logWarning(`withScreencast.stopRecording threw an error: ${st}`)):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:ot}=this.state;this.recorder=new ScreenCastRecorder({recordAudio:ot,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch{this.setState({currentState:"UNSUPPORTED"});return}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let ot;const{currentState:at}=this.state;at==="OFF"||isNullOrUndefined$1(this.recorder)||(at==="COUNTDOWN"&&this.setState({currentState:"OFF"}),at==="RECORDING"&&(this.recorder.getState()==="inactive"?this.setState({currentState:"OFF"}):(ot=await this.recorder.stop(),this.setState({outputBlob:ot,currentState:"PREVIEW_FILE"}))))},this.onCountdownEnd=async()=>{if(isNullOrUndefined$1(this.recorder))throw new Error("Countdown finished but recorder is null");this.recorder.start()?this.setState({currentState:"RECORDING"}):this.stopRecording().catch(at=>logWarning(`withScreencast.stopRecording threw an error: ${at}`))},this.getScreenCastProps=()=>({currentState:this.state.currentState,toggleRecordAudio:this.toggleRecordAudio,startRecording:this.showDialog,stopRecording:this.stopRecording}),this.closeDialog=()=>{this.setState({currentState:"OFF"})},this.render=()=>{const{outputBlob:ot,fileName:at,recordAudio:st,currentState:ut}=this.state;return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(tt,{...this.props,screenCast:this.getScreenCastProps()}),ut==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:this.closeDialog}),ut==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:st,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),ut==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:this.onCountdownEnd}),ut==="PREVIEW_FILE"&&ot&&jsx$1(VideoRecordedDialog,{onClose:this.closeDialog,videoBlob:ot,fileName:at})]})}}};et.displayName=`withScreencast(${tt.displayName||tt.name})`;let nt=et;return hoistNonReactStatics$2(nt,tt)}const showDevelopmentOptions=(tt,nt)=>nt==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==nt||Config.ToolbarMode.MINIMAL==nt?!1:tt||isLocalhost();function getTitle(tt){return tt||"Streamlit"}class StrategyV1{constructor(nt){this.appNav=nt,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(nt){var st,ut;this.appPages=nt.appPages,this.currentPageScriptHash=nt.pageScriptHash,this.hideSidebarNav=((st=nt.config)==null?void 0:st.hideSidebarNav)??!1;const et=this.appPages[0],rt=et.urlPathname??"",ot=((ut=this.appPages.find(ct=>ct.pageScriptHash===this.currentPageScriptHash))==null?void 0:ut.urlPathname)??"",at=et.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(rt,ot,at),document.title=getTitle(ot??""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:at?"":ot,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(nt){const{appPages:et}=nt;return[{appPages:et},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:et})}]}handlePageNotFound(nt){var ot;const{pageName:et}=nt;this.appNav.onPageNotFound(et);const rt=((ot=this.appPages[0])==null?void 0:ot.pageScriptHash)??"";return this.currentPageScriptHash=rt,[{currentPageScriptHash:rt},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:rt})}]}handleNavigation(nt){}findPageByUrlPath(nt){return this.appPages.length===0?null:this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.appPages[0]}clearPageElements(nt,et,rt){return AppRoot.empty(et,!1,rt,nt.logo)}}class StrategyV2{constructor(nt){this.appNav=nt,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(nt){var et;return this.mainScriptHash=nt.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((et=nt.config)==null?void 0:et.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(nt){}handlePageNotFound(nt){const{pageName:et}=nt;return this.appNav.onPageNotFound(et),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(nt){const{sections:et,position:rt,appPages:ot}=nt;this.appPages=ot,this.hideSidebarNav=rt===Navigation.Position.HIDDEN;const at=nt.pageScriptHash,st=ot.find(pt=>pt.pageScriptHash===at),ut=ot.find(pt=>pt.isDefault);this.mainPage=ut;const ct=st.urlPathname;if(!this.appNav.isPageTitleSet){const pt=getTitle(st.pageName);document.title=pt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:st.pageName??""})}return!this.appNav.isPageIconSet&&st.icon&&this.appNav.onPageIconChange(st.icon),this.appNav.onUpdatePageUrl(ut.urlPathname??"",ct,st.isDefault??!1),[{appPages:ot,navSections:et,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:nt.expanded,currentPageScriptHash:at},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ot}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:st.isDefault?"":ct,currentPageScriptHash:at})}]}findPageByUrlPath(nt){return this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.mainPage}clearPageElements(nt,et,rt){return nt.filterMainScriptElements(et)}}class AppNavigation{constructor(nt,et,rt,ot){this.hostCommunicationMgr=nt,this.onUpdatePageUrl=et,this.onPageNotFound=rt,this.onPageIconChange=ot,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(nt){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(nt)}handleNavigation(nt){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(nt)}handlePagesChanged(nt){return this.strategy.handlePagesChanged(nt)}handlePageNotFound(nt){return this.strategy.handlePageNotFound(nt)}findPageByUrlPath(nt){return this.strategy.findPageByUrlPath(nt)}handlePageConfigChanged(nt){this.isPageIconSet=!!nt.favicon,this.isPageTitleSet=!!nt.title}clearPageElements(nt,et,rt){return this.strategy.clearPageElements(nt,et,rt)}}const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>";class App extends reactExports.PureComponent{constructor(nt){super(nt),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(rt,ot,at)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:rt,msg:ot,onContinue:at,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(rt,ot)=>{const[,at,st]=createPresetThemes(),ut=isPresetTheme(this.props.theme.activeTheme);rt===at.name&&ut?this.props.theme.setTheme(at):rt===st.name&&ut?this.props.theme.setTheme(st):ot&&this.props.theme.setImportedTheme(ot)},this.handleConnectionStateChanged=rt=>{if(logMessage(`Connection state changed from ${this.state.connectionState} to ${rt}`),rt===ConnectionState.CONNECTED){const ot=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||ot)&&(this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:rt!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:rt})},this.handleGitInfoChanged=rt=>{this.setState({gitInfo:rt})},this.handleCustomParentMessage=rt=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:rt.message}):logError("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=rt=>{const ot=(at,st,ut)=>{const ct=at[st];if(ct in ut)return ut[ct](at[ct]);throw new Error(`Cannot handle ${st} "${ct}".`)};try{ot(rt,"type",{newSession:at=>this.handleNewSession(at),sessionStatusChanged:at=>this.handleSessionStatusChanged(at),sessionEvent:at=>this.handleSessionEvent(at),delta:at=>this.handleDeltaMsg(at,rt.metadata),pageConfigChanged:at=>this.handlePageConfigChanged(at),pageInfoChanged:at=>this.handlePageInfoChanged(at),pagesChanged:at=>this.handlePagesChanged(at),pageNotFound:at=>this.handlePageNotFound(at),gitInfoChanged:at=>this.handleGitInfoChanged(at),scriptFinished:at=>this.handleScriptFinished(at),pageProfile:at=>this.handlePageProfileMsg(at),autoRerun:at=>this.handleAutoRerun(at),fileUrlsResponse:at=>this.uploadClient.onFileURLsResponse(at),parentMessage:at=>this.handleCustomParentMessage(at),logo:at=>this.handleLogo(at,rt.metadata),navigation:at=>this.handleNavigation(at)})}catch(at){const st=ensureError(at);logError(st),this.showError("Bad message format",st.message)}},this.handleLogo=(rt,ot)=>{const at={activeScriptHash:ot.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(rt,at)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=rt=>{const{title:ot,favicon:at,layout:st,initialSidebarState:ut,menuItems:ct}=rt;this.appNavigation.handlePageConfigChanged(rt),ot&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:ot}),document.title=ot),at&&this.onPageIconChanged(at),st!==this.state.layout&&this.setState(pt=>({layout:st,userSettings:{...pt.userSettings,wideMode:st===PageConfig.Layout.WIDE}})),ut!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:ut})),this.setState({menuItems:ct})},this.handlePageInfoChanged=rt=>{const{queryString:ot}=rt,at=document.location.pathname+(ot?`?${ot}`:"");window.history.pushState({},"",at),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:ot?`?${ot}`:""})},this.onPageNotFound=rt=>{const ot=rt?`You have requested page /${rt}, 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",`${ot}. Running the app's main page.`)},this.handlePageNotFound=rt=>{this.maybeSetState(this.appNavigation.handlePageNotFound(rt))},this.onPageIconChanged=rt=>{handleFavicon(rt,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=rt=>{this.maybeSetState(this.appNavigation.handlePagesChanged(rt))},this.handleNavigation=rt=>{this.maybeSetState(this.appNavigation.handleNavigation(rt))},this.handlePageProfileMsg=rt=>{var st,ut,ct;const ot=PageProfile.toObject(rt),at=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...ot,isFragmentRun:!!ot.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(st=this.state.appPages)==null?void 0:st.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(ct=(ut=this.props.theme)==null?void 0:ut.activeTheme)==null?void 0:ct.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:at})},this.handleAutoRerun=rt=>{const ot=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(rt.fragmentId,!0)},rt.interval*1e3);this.setState(at=>({autoReruns:[...at.autoReruns,ot]}))},this.handleSessionStatusChanged=rt=>{this.setState(ot=>{let{scriptRunState:at}=ot,{dialog:st}=ot;return rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.STOP_REQUESTED?(at=ScriptRunState.RUNNING,notNullOrUndefined(st)&&st.type===DialogType.SCRIPT_COMPILE_ERROR&&(st=void 0)):!rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&ot.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(at=ScriptRunState.NOT_RUNNING),{userSettings:{...ot.userSettings,runOnSave:!!rt.runOnSave},dialog:st,scriptRunState:at}})},this.handleSessionEvent=rt=>{if(this.sessionEventDispatcher.handleSessionEventMsg(rt),rt.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const ot={type:DialogType.SCRIPT_COMPILE_ERROR,exception:rt.scriptCompilationException,onClose:()=>{}};this.openDialog(ot)}},this.maybeUpdatePageUrl=(rt,ot,at)=>{const st=this.getBaseUriParts();if(st){const{basePath:ut}=st,ct=extractPageNameFromPathName(document.location.pathname,ut);if((ct===""?rt:ct)!==ot){const dt=at?"":ot,ft=preserveEmbedQueryParams(),bt=ft?`?${ft}`:"",Mt=`${ut?`/${ut}`:""}/${dt}${bt}`;window.history.pushState({},"",Mt)}}},this.handleNewSession=rt=>{const ot=rt.initialize;if(this.hasStreamlitVersionChanged(ot)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(rt);const{appHash:at,currentPageScriptHash:st}=this.state,{scriptRunId:ut,name:ct,mainScriptPath:pt,fragmentIdsThisRun:dt,pageScriptHash:ft,mainScriptHash:bt}=rt;if(dt.length)this.setState({fragmentIdsThisRun:dt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Mt=rt.config,mt=rt.customTheme;this.processThemeInput(mt),this.setState({allowRunOnSave:Mt.allowRunOnSave,hideTopBar:Mt.hideTopBar,toolbarMode:Mt.toolbarMode,latestRunTime:performance.now(),mainScriptHash:bt,fragmentIdsThisRun:dt}),this.maybeSetState(this.appNavigation.handleNewSession(rt)),this.onPageIconChanged("./favicon.png")}const ht=hashString(this.sessionInfo.current.installationId+pt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(ht),this.metricsMgr.enqueue("updateReport"),at===ht&&st===ft?this.setState({scriptRunId:ut}):this.clearAppState(ht,ut,ct,bt)},this.handleOneTimeInitialization=rt=>{const ot=rt.initialize,at=rt.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(rt)),this.metricsMgr.initialize({gatherUsageStats:at.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(ot.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:rt}=this.state,ot=this.appNavigation.findPageByUrlPath(document.location.pathname),at=document.location.toString().includes("#"),st=(ot==null?void 0:ot.pageScriptHash)===rt;isNullOrUndefined$1(ot)||at&&st||this.onPageChange(ot.pageScriptHash)},this.setAndSendTheme=rt=>{this.props.theme.setTheme(rt),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(rt.emotion)})},this.createThemeHash=rt=>{if(!rt)return"hash_for_undefined_custom_theme";const ot=Object.entries(rt);return ot.sort(),hashString(ot.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=rt=>{const{runOnSave:ot}=this.state.userSettings,{runOnSave:at}=rt;if(this.setState({userSettings:rt}),ot!==at&&this.isServerConnected()){const st=new BackMsg({setRunOnSave:at});st.type="setRunOnSave",this.sendBackMsg(st)}},this.handleDeltaMsg=(rt,ot)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,rt,ot),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const at=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,at&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugShutdownRuntime:!0});rt.type="debugShutdownRuntime",this.sendBackMsg(rt)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugDisconnectWebsocket:!0});rt.type="debugDisconnectWebsocket",this.sendBackMsg(rt)}},this.debugClearForwardMsgCache=()=>{var rt,ot;isLocalhost()&&((ot=(rt=this.connectionManager)==null?void 0:rt.connection)==null||ot.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(rt=>{clearInterval(rt)}),this.setState({autoReruns:[]})},this.rerunScript=(rt=!1)=>{if(this.closeDialog(),!this.isServerConnected()){logError("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}),rt===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){logError("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=rt=>{const{elements:ot,mainScriptHash:at}=this.state;this.cleanupAutoReruns();const st=this.appNavigation.clearPageElements(ot,at,void 0),ut=new Set(Array.from(st.getElements()).map(ct=>getElementId(ct)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(ut),void 0,rt)},this.isAppInReadyState=rt=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&rt.scriptRunState===ScriptRunState.RUNNING&&rt.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(rt,ot,at,st)=>{const ut=this.getBaseUriParts();if(!ut){logError("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:ct}=this.state,{basePath:pt}=ut;let dt=this.getQueryString(),ft="";at?at!=ct&&(dt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt})):ct?at=ct:(ft=extractPageNameFromPathName(document.location.pathname,pt),at=""),this.sendBackMsg(new BackMsg({rerunScript:{queryString:dt,widgetStates:rt,pageScriptHash:at,pageName:ft,fragmentId:ot,isAutoRerun:st}})),PerformanceEvents.record({name:"RequestedRerun",scriptRunState:this.state.scriptRunState})},this.stopScript=()=>{if(!this.isServerConnected()){logError("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const rt=new BackMsg({stopScript:!0});rt.type="stopScript",this.sendBackMsg(rt),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const rt={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(rt)}else logError("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var ot;const rt={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((ot=this.state.dialog)==null?void 0:ot.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const rt={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const rt=new BackMsg({clearCache:!0});rt.type="clearCache",this.sendBackMsg(rt)}else logError("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const rt=new BackMsg({appHeartbeat:!0});rt.type="appHeartbeat",this.sendBackMsg(rt)}else logError("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=rt=>{this.connectionManager?this.connectionManager.sendMessage(rt):logError(`Not connected. Cannot send back message: ${rt}`)},this.handleConnectionError=rt=>{this.showError("Connection error",rt)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(rt=!0)=>{const ot={type:DialogType.SETTINGS,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},developerMode:showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),openThemeCreator:this.openThemeCreatorDialog,animateModal:rt,metricsMgr:this.metricsMgr};this.openDialog(ot)},this.aboutCallback=()=>{const{menuItems:rt}=this.state,ot={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:rt==null?void 0:rt.aboutSectionMd};this.openDialog(ot)},this.printCallback=()=>{const{scriptRunState:rt}=this.state;if(rt!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let ot;try{const at=getIFrameEnclosingApp(this.embeddingId);at&&at.contentWindow?ot=at.contentWindow.window:ot=window}catch{ot=window}finally{ot||(ot=window),ot.print()}},this.screencastCallback=()=>{const{scriptName:rt}=this.state,{startRecording:ot}=this.props.screenCast,at=hooks().format("YYYY-MM-DD-HH-MM-SS");ot(`streamlit-${rt}-${at}`)},this.handleFullScreen=rt=>{this.setState({isFullScreen:rt})},this.setLibConfig=rt=>{this.setState({libConfig:rt})},this.setAppConfig=rt=>{this.setState({appConfig:rt})},this.addScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:ot.scriptFinishedHandlers.concat(rt)}))},this.removeScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:without$1(ot.scriptFinishedHandlers,rt)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:rt}=this.state,ot=rt&&rt.length>0?rt:document.location.search;return ot.startsWith("?")?ot.substring(1):ot},this.isInCloudEnvironment=()=>{const{hostMenuItems:rt}=this.state;return rt&&(rt==null?void 0:rt.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=(rt,ot)=>{if(this.isServerConnected()){const at=new BackMsg({fileUrlsRequest:{requestId:rt,fileNames:ot.map(st=>st.name),sessionId:this.sessionInfo.current.sessionId}});at.type="fileUrlsRequest",this.sendBackMsg(at)}},this.handleKeyDown=rt=>{switch(rt){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=rt=>{rt==="esc"&&this.props.screenCast.stopRecording()},J$1();let et=this.createThemeHash();isPresetTheme(nt.theme.activeTheme)||(et=this.createThemeHash(toThemeInput(nt.theme.activeTheme.emotion))),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},layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:et,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},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:rt=>this.setState({formsData:rt})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:nt.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:rt=>{this.setState({inputsDisabled:rt})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:rt=>this.setState({isOwner:rt}),fileUploadClientConfigChanged:rt=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(rt)},hostMenuItemsChanged:rt=>{this.setState({hostMenuItems:rt})},hostToolbarItemsChanged:rt=>{this.setState({hostToolbarItems:rt})},hostHideSidebarNavChanged:rt=>{this.setState({hostHideSidebarNav:rt})},sidebarChevronDownshiftChanged:rt=>{this.setState({sidebarChevronDownshift:rt})},pageLinkBaseUrlChanged:rt=>{this.setState({pageLinkBaseUrl:rt})},queryParamsChanged:rt=>{this.setState({queryParams:rt})},deployedAppMetadataChanged:rt=>{this.setState({deployedAppMetadata:rt})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var rt;(rt=this.connectionManager)==null||rt.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:rt=>this.widgetMgr.setFormsWithUploadsInProgress(rt),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.connectionManager=new ConnectionManager({sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:nt=>{const{allowedOrigins:et,useExternalAuthToken:rt,disableFullscreenMode:ot,enableCustomParentMessages:at,mapboxToken:st,enforceDownloadInNewTab:ut,metricsUrl:ct}=nt,pt={allowedOrigins:et,useExternalAuthToken:rt,enableCustomParentMessages:at},dt={mapboxToken:st,disableFullscreenMode:ot,enforceDownloadInNewTab:ut};this.metricsMgr.setMetricsConfig(ct),this.hostCommunicationMgr.setAllowedOrigins(pt),this.setAppConfig(pt),this.setLibConfig(dt)}})}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 nt=document.querySelectorAll("[data-iframe-height]"),et=Array.from(nt).map(rt=>Math.ceil(rt.getBoundingClientRect().bottom));return Math.max(0,...et)}},__vitePreload(()=>import("./iframeResizer.contentWindow.D80IJd7i.js").then(nt=>nt.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(nt,et){window.prerenderReady===!1&&this.isAppInReadyState(et)&&(window.prerenderReady=!0),this.state.scriptRunState!==et.scriptRunState&&(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}))}componentWillUnmount(){var nt;(nt=this.connectionManager)==null||nt.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(nt,et){logError(et);const rt={type:DialogType.WARNING,title:nt,msg:et,onClose:()=>{}};this.openDialog(rt)}hasStreamlitVersionChanged(nt){if(this.sessionInfo.isSet){const et=this.sessionInfo.current.streamlitVersion,{environmentInfo:rt}=nt;if(notNullOrUndefined(rt)&¬NullOrUndefined(rt.streamlitVersion))return et!=rt.streamlitVersion}return!1}maybeSetState(nt){if(nt){const[et,rt]=nt;this.setState(et,rt)}}processThemeInput(nt){const et=this.createThemeHash(nt);if(et===this.state.themeHash)return;this.setState({themeHash:et});const rt=!isPresetTheme(this.props.theme.activeTheme);if(nt){const ot=createTheme(CUSTOM_THEME_NAME,nt);this.props.theme.addThemes([ot]),(getCachedTheme()===null||rt)&&this.setAndSendTheme(ot)}else this.props.theme.addThemes([]),rt&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(nt){if(nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(et=>et())},0),nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:rt,fragmentIdsThisRun:ot})=>({elements:this.pendingElementsBuffer.clearStaleNodes(rt,ot)}),()=>{this.pendingElementsBuffer=this.state.elements});const et=new Set(Array.from(this.state.elements.getElements()).map(rt=>getElementId(rt)).filter(notUndefined));this.widgetMgr.removeInactive(et)}this.connectionManager!==null&&nt!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(nt,et,rt,ot){const{hideSidebarNav:at,elements:st}=this.state,ut=at&&st.sidebar||void 0;this.setState({scriptRunId:et,scriptName:rt,appHash:nt,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,ot,ut)},()=>{this.pendingElementsBuffer=this.state.elements;const ct=new Set(Array.from(this.state.elements.getElements()).map(pt=>getElementId(pt)).filter(notUndefined));this.widgetMgr.removeInactive(ct)})}openDialog(nt){this.setState({dialog:nt})}render(){const{allowRunOnSave:nt,connectionState:et,dialog:rt,elements:ot,initialSidebarState:at,menuItems:st,isFullScreen:ut,scriptRunId:ct,scriptRunState:pt,userSettings:dt,hideTopBar:ft,hideSidebarNav:bt,expandSidebarNav:ht,currentPageScriptHash:Mt,hostHideSidebarNav:mt,pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,hostMenuItems:yt,hostToolbarItems:vt,libConfig:At,appConfig:St,inputsDisabled:Et,appPages:Tt,navSections:Rt}=this.state,Ct=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),wt=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":dt.wideMode}),Lt=rt?StreamlitDialog({...rt,onClose:this.closeDialog}):null,Ht=Et||et!==ConnectionState.CONNECTED;return jsx$1(AppContext.Provider,{value:{initialSidebarState:at,wideMode:dt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,gitInfo:this.state.gitInfo,appConfig:St},children:jsx$1(LibContext.Provider,{value:{isFullScreen:ut,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:Mt,libConfig:At,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:wt,"data-testid":"stApp","data-test-script-state":ct==INITIAL_SCRIPT_RUN_ID?"initial":pt,"data-test-connection-state":et,children:[jsxs(Header,{children:[!ft&&jsxs(Fragment,{children:[jsx$1(StatusWidget,{connectionState:et,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:pt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:nt}),jsx$1(ToolbarActions,{hostToolbarItems:vt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsx$1(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),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:yt,developmentMode:Ct,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:st,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:ot,scriptRunId:ct,scriptRunState:pt,widgetMgr:this.widgetMgr,widgetsDisabled:Ht,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:ot.logo,appPages:Tt,navSections:Rt,onPageChange:this.onPageChange,currentPageScriptHash:Mt,hideSidebarNav:bt||mt,expandSidebarNav:ht}),Lt]})})})})}}const AppWithScreencast=withScreencast(App);function useThemeManager(){const tt=getDefaultTheme(),[nt,et]=reactExports.useState(tt),[rt,ot]=reactExports.useState([]),[at,st]=reactExports.useState([...createPresetThemes(),...isPresetTheme(tt)?[]:[tt]]),ut=ft=>{st([...createPresetThemes(),...ft])},ct=reactExports.useCallback(ft=>{ft!==nt&&(et(ft),ft.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(ft))},[et,nt]),pt=reactExports.useCallback(()=>{nt.name===AUTO_THEME_NAME&&ct(getHostSpecifiedTheme());const ft=at.filter(bt=>bt.name!==AUTO_THEME_NAME);st([createAutoTheme(),...ft])},[nt.name,at,ct]),dt=reactExports.useCallback(ft=>{ft.fontFaces&&ot(ft.fontFaces);const bt=new CustomThemeConfig(ft),ht=createTheme(CUSTOM_THEME_NAME,bt);ct(ht)},[ot,ct]);return reactExports.useEffect(()=>{const ft=window.matchMedia("(prefers-color-scheme: dark)");return ft.addEventListener("change",pt),window.addEventListener("afterprint",pt),()=>{window.removeEventListener("afterprint",pt),ft.removeEventListener("change",pt)}},[nt,at,pt]),[{setTheme:ct,activeTheme:nt,addThemes:ut,availableThemes:at,setImportedTheme:dt},rt]}const ThemedApp=({streamlitExecutionStartedAt:tt})=>{const[nt,et]=useThemeManager(),{activeTheme:rt}=nt,ot=rt.name===CUSTOM_THEME_NAME&&et.length>0;return jsx$1(RootStyleProvider,{theme:rt,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[ot&&jsx$1(FontFaceDeclaration,{fontFaces:et}),jsx$1(AppWithScreencast,{theme:nt,streamlitExecutionStartedAt:tt})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"});ReactDOM.render(jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})}),document.getElementById("root"));export{isEqual$1 as $,isNullOrUndefined$1 as A,merge$6 as B,numbro$1 as C,notNullOrUndefined as D,EmotionIconBase as E,Fragment as F,hooks as G,formatPeriodType as H,moment$1 as I,getTypeName as J,format as K,convertToSeconds as L,useTheme as M,Arrow$2 as N,logError as O,PortalContext as P,transparentize as Q,React$1 as R,convertRemToPx as S,logWarning as T,_defineProperty$u as U,_objectWithoutProperties$o as V,_typeof$g as W,jsx as X,css$2 as Y,_toConsumableArray$3 as Z,_extends$Q as _,range$1 as a,TooltipIcon as a$,StyledTooltipContentWrapper as a0,StreamlitMarkdown$1 as a1,PLACEMENT as a2,ACCESSIBILITY_TYPE as a3,hasLightBackgroundColor as a4,Popover$1 as a5,LibContext as a6,debounce$4 as a7,jsxs as a8,Resizable as a9,_unsupportedIterableToArray$l as aA,getAugmentedNamespace as aB,DEFAULT_IFRAME_FEATURE_POLICY as aC,DEFAULT_IFRAME_SANDBOX_POLICY as aD,darken as aE,BaseButtonSize as aF,BaseButtonKind as aG,BaseButtonTooltip as aH,DynamicButtonLabel as aI,IsSidebarContext as aJ,Placement as aK,getGray90 as aL,getIncreasingGreen as aM,getDecreasingRed as aN,PlotlyChart$1 as aO,keysToSnakeCase as aP,WindowDimensionsContext as aQ,Video$1 as aR,zip$1 as aS,FileUploaderState as aT,UploadedFileInfo as aU,StyledSpinner as aV,ENABLE_PERIPHERALS_DOCS_URL as aW,Icon$2 as aX,BaseButton as aY,blend as aZ,labelVisibilityProtoValueToEnum as a_,IndexTypeName as aa,_baseMerge as ab,_createAssigner as ac,getGray70 as ad,getGray30 as ae,getCategoricalColorsArray as af,getDivergingColorsArray as ag,getSequentialColorsArray as ah,getBlue80 as ai,Global as aj,ensureError as ak,withTheme as al,DynamicIcon as am,toaster as an,Kind as ao,AlertElement as ap,_assertThisInitialized$e as aq,StyledInlineCode as ar,ErrorElement as as,axios as at,Skeleton$1 as au,Skeleton as av,hoistNonReactStatics$2 as aw,lib$3 as ax,parseToRgba as ay,DeckGlJsonChart$1 as az,reactDomExports as b,ThemeProvider$1 as b$,WidgetLabel as b0,Tooltip as b1,styled as b2,getOverrides as b3,LocaleContext as b4,ButtonGroup$1 as b5,LabelVisibilityMessage as b6,StyledWidgetLabelHelpInline as b7,themeColors as b8,isMobile_1 as b9,classNames as bA,UISelectbox as bB,isValidFormId as bC,toPropertyKey as bD,_setPrototypeOf$e as bE,hexToRgb as bF,withWrapper as bG,StyledWidgetInstructions as bH,isFromMac as bI,CUSTOM_INPUT_TYPE as bJ,SIZE$1 as bK,DeleteAlt$1 as bL,ADJOINED as bM,filterOptions as bN,ENHANCER_POSITION as bO,pick$1 as bP,Slider$2 as bQ,isFromWindows as bR,__awaiter as bS,__generator as bT,__spread as bU,PropTypes as bV,ChevronLeft as bW,ChevronRight as bX,isInForm as bY,toString_1 as bZ,TextInput$1 as b_,CAMERA_PERMISSION_URL as ba,StyledWidgetLabelHelp as bb,isFocusVisible as bc,getOverride as bd,getOverrideProps as be,Checkbox$1 as bf,StyledContent as bg,StyledCheckbox$1 as bh,BaseColorPicker as bi,useStyletron as bj,mergeOverride as bk,toObjectOverride as bl,Icon$1 as bm,UIDConsumer as bn,StatefulMenu as bo,mergeOverrides as bp,ChevronDown$1 as bq,ThemeContext as br,forkFocus as bs,forkBlur as bt,Select as bu,without$1 as bv,fuzzyFilterSelectOptions as bw,TYPE as bx,VirtualDropdown as by,isPresetTheme as bz,_hasPath as c,createThemedStyled as c0,createThemedUseStyletron as c1,createThemedWithStyle as c2,expandBorderStyles as c3,withStyle as c4,reactIsExports$1 as c5,NumberInput$1 as c6,commonjsGlobal$1 as d,classnamesExports as e,_root as f,getDefaultExportFromCjs$1 as g,isObject_1 as h,isPropValid as i,jsx$1 as j,keyframes as k,_Set as l,_setToArray as m,newStyled as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,_cacheHas as u,groupBy$1 as v,__vitePreload as w,flatten$2 as x,require$$0 as y,toString$9 as z};
|
798
|
+
Event: ${nt}`)}async pingServer(){this.uriIndex=await doInitPings(this.args.baseUriPartsList,PING_MINIMUM_RETRY_PERIOD_MS,PING_MAXIMUM_RETRY_PERIOD_MS,this.args.onRetry,this.args.onHostConfigResp),this.stepFsm("SERVER_PING_SUCCEEDED")}async getSessionTokens(){var et,rt;const nt=await this.args.claimHostAuthToken();return this.args.resetHostAuthToken(),[nt??"PLACEHOLDER_AUTH_TOKEN",...(et=this.args.sessionInfo.last)!=null&&et.sessionId?[(rt=this.args.sessionInfo.last)==null?void 0:rt.sessionId]:[]]}async connectToWebSocket(){const nt=buildWsUri(this.args.baseUriPartsList[this.uriIndex],WEBSOCKET_STREAM_PATH);if(notNullOrUndefined(this.websocket))throw new Error("Websocket already exists");const et=await this.getSessionTokens();this.websocket=new WebSocket(nt,["streamlit",...et]),this.websocket.binaryType="arraybuffer",this.setConnectionTimeout(nt);const rt=this.websocket,ot=()=>rt===this.websocket;this.websocket.addEventListener("message",at=>{ot()&&this.handleMessage(at.data).catch(st=>{const ut=`Failed to process a Websocket message (${st})`;logError(LOG,ut),this.stepFsm("FATAL_ERROR",ut)})}),this.websocket.addEventListener("open",()=>{ot()&&this.stepFsm("CONNECTION_SUCCEEDED")}),this.websocket.addEventListener("close",()=>{ot()&&(this.closeConnection(),this.stepFsm("CONNECTION_CLOSED"))}),this.websocket.addEventListener("error",()=>{ot()&&(logError(LOG,"WebSocket onerror"),this.closeConnection(),this.stepFsm("CONNECTION_ERROR"))})}setConnectionTimeout(nt){if(notNullOrUndefined(this.wsConnectionTimeoutId))throw new Error("WS timeout is already set");const et=this.websocket;this.wsConnectionTimeoutId=window.setTimeout(()=>{if(et===this.websocket&&!isNullOrUndefined$1(this.wsConnectionTimeoutId)){if(isNullOrUndefined$1(this.websocket)){this.closeConnection(),this.stepFsm("FATAL_ERROR","Null Websocket in setConnectionTimeout");return}this.websocket.readyState===0&&(this.closeConnection(),this.stepFsm("CONNECTION_TIMED_OUT"))}},WEBSOCKET_TIMEOUT_MS),logMessage(LOG,`Set WS timeout ${this.wsConnectionTimeoutId}`)}closeConnection(){this.websocket&&(this.websocket.close(),this.websocket=void 0),notNullOrUndefined(this.wsConnectionTimeoutId)&&(logMessage(LOG,`Clearing WS timeout ${this.wsConnectionTimeoutId}`),window.clearTimeout(this.wsConnectionTimeoutId),this.wsConnectionTimeoutId=void 0)}sendMessage(nt){if(!this.websocket)return;const et=BackMsg.create(nt),rt=BackMsg.encode(et).finish();this.websocket.send(rt)}incrementMessageCacheRunCount(nt){this.cache.incrementRunCount(nt)}async handleMessage(nt){const et=this.nextMessageIndex;this.nextMessageIndex+=1,PerformanceEvents.record({name:"BeginHandleMessage",messageIndex:et});const rt=new Uint8Array(nt),ot=ForwardMsg.decode(rt);for(PerformanceEvents.record({name:"DecodedMessage",messageIndex:et,messageType:ot.type,len:nt.byteLength}),this.messageQueue[et]=await this.cache.processMessagePayload(ot,rt),PerformanceEvents.record({name:"GotCachedPayload",messageIndex:et});this.lastDispatchedMessageIndex+1 in this.messageQueue;){const at=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[at]),PerformanceEvents.record({name:"DispatchedMessage",messageIndex:at,messageType:this.messageQueue[at].type}),delete this.messageQueue[at],this.lastDispatchedMessageIndex=at}}}function doInitPings(tt,nt,et,rt,ot){const at=new Resolver;let st=0,ut=0,ct=()=>{};const pt=()=>{ut++,ut>=tt.length&&(ut=0),ct()},dt=ht=>{const Mt=Math.random()*.4-.2,mt=st===1?nt:nt*2**(st-1)*(1+Mt),Ot=Math.min(et,mt);rt(st,ht,Ot),window.setTimeout(pt,Ot)},ft=()=>{const ht=tt[ut];new URL(buildHttpUri(ht,"")).hostname==="localhost"?dt(jsx$1(StreamlitMarkdown$1,{source:"\nIs Streamlit still running? If you accidentally stopped Streamlit, just restart it in your terminal:\n\n```bash\nstreamlit run yourscript.py\n```\n ",allowHTML:!1})):dt("Connection failed with status 0.")},bt=()=>{dt(jsxs(reactExports.Fragment,{children:[jsx$1("p",{children:"Cannot connect to Streamlit (HTTP status: 403)."}),jsxs("p",{children:["If you are trying to access a Streamlit app running on another server, this could be due to the app's"," ",jsx$1("a",{href:CORS_ERROR_MESSAGE_DOCUMENTATION_LINK,children:"CORS"})," settings."]})]}))};return ct=()=>{const ht=tt[ut],Mt=buildHttpUri(ht,SERVER_PING_PATH),mt=buildHttpUri(ht,HOST_CONFIG_PATH);ut===0&&st++,Promise.all([axios.get(Mt,{timeout:PING_TIMEOUT_MS}),axios.get(mt,{timeout:PING_TIMEOUT_MS})]).then(([Ot,zt])=>{ot(zt.data),at.resolve(ut)}).catch(Ot=>{if(Ot.code==="ECONNABORTED")return dt("Connection timed out.");if(Ot.response){const{data:zt,status:yt}=Ot.response;return yt===0?ft():yt===403?bt():dt(`Connection failed with status ${yt}, and response "${zt}".`)}return Ot.request?ft():dt(Ot.message)})},ct(),at.promise}const RETRY_COUNT_FOR_WARNING=6;class ConnectionManager{constructor(nt){this.connectionState=ConnectionState.INITIAL,this.setConnectionState=(et,rt)=>{this.connectionState!==et&&(this.connectionState=et,this.props.connectionStateChanged(et)),rt&&this.props.onConnectionError(rt)},this.showRetryError=(et,rt,ot)=>{et===RETRY_COUNT_FOR_WARNING&&this.props.onConnectionError(rt)},this.props=nt,this.connect()}isConnected(){return this.connectionState===ConnectionState.CONNECTED}getBaseUriParts(){if(this.connection instanceof WebsocketConnection)return this.connection.getBaseUriParts()}sendMessage(nt){this.connection instanceof WebsocketConnection&&this.isConnected()?this.connection.sendMessage(nt):logError(`Cannot send message when server is disconnected: ${nt}`)}incrementMessageCacheRunCount(nt){this.connection instanceof WebsocketConnection&&this.connection.incrementMessageCacheRunCount(nt)}async connect(){try{this.connection=await this.connectToRunningServer()}catch(nt){const et=ensureError(nt);logError(et.message),this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER,et.message)}}disconnect(){var nt;(nt=this.connection)==null||nt.disconnect()}connectToRunningServer(){const nt=getPossibleBaseUris();return new WebsocketConnection({sessionInfo:this.props.sessionInfo,endpoints:this.props.endpoints,baseUriPartsList:nt,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,onHostConfigResp:this.props.onHostConfigResp})}}class SessionEventDispatcher{constructor(){this.onSessionEvent=new dist.Signal}handleSessionEventMsg(nt){this.onSessionEvent.emit(nt)}}const MEDIA_ENDPOINT="/media",UPLOAD_FILE_ENDPOINT="/_stcore/upload_file",COMPONENT_ENDPOINT_BASE="/component",FORWARD_MSG_CACHE_ENDPOINT="/_stcore/message";class DefaultStreamlitEndpoints{constructor(nt){this.getServerUri=nt.getServerUri,this.csrfEnabled=nt.csrfEnabled}buildComponentURL(nt,et){return buildHttpUri(this.requireServerUri(),`${COMPONENT_ENDPOINT_BASE}/${nt}/${et}`)}setFileUploadClientConfig({prefix:nt,headers:et}){this.fileUploadClientConfig={prefix:nt,headers:et}}buildMediaURL(nt){return nt.startsWith(MEDIA_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildFileUploadURL(nt){return this.fileUploadClientConfig?makePath(this.fileUploadClientConfig.prefix,nt):nt.startsWith(UPLOAD_FILE_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildAppPageURL(nt,et){const rt=et.urlPathname,ot=et.isDefault?"":rt;if(notNullOrUndefined(nt)&&nt.length>0)return`${nt}/${ot}`;const{port:at,protocol:st}=window.location,{basePath:ut,host:ct}=this.requireServerUri(),pt=at?`:${at}`:"",dt=ut?`${ut}/`:"";return`${st}//${ct}${pt}/${dt}${ot}`}async uploadFileUploaderFile(nt,et,rt,ot,at){const st=new FormData;st.append(et.name,et);const ut=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{cancelToken:at,method:"PUT",data:st,responseType:"text",headers:ut,onUploadProgress:ot}).then(()=>{})}getAdditionalHeaders(){let nt={};return this.fileUploadClientConfig&&(nt={...nt,...this.fileUploadClientConfig.headers}),nt}async deleteFileAtURL(nt,et){const rt=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{method:"DELETE",data:{sessionId:et},headers:rt}).then(()=>{})}async fetchCachedForwardMsg(nt){const et=this.requireServerUri(),rt=await axios.request({url:buildHttpUri(et,`${FORWARD_MSG_CACHE_ENDPOINT}?hash=${nt}`),method:"GET",responseType:"arraybuffer"});return new Uint8Array(rt.data)}requireServerUri(){const nt=this.getServerUri();if(notNullOrUndefined(nt))return this.cachedServerUri=nt,nt;if(notNullOrUndefined(this.cachedServerUri))return this.cachedServerUri;throw new Error("not connected to a server!")}csrfRequest(nt,et){if(et.url=nt,this.csrfEnabled){const rt=getCookie("_streamlit_xsrf");notNullOrUndefined(rt)&&(et.headers={"X-Xsrftoken":rt,...et.headers||{}},et.withCredentials=!0)}return axios.request(et)}}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject=isObject_1,toKey=_toKey;function baseSet$1(tt,nt,et,rt){if(!isObject(tt))return tt;nt=castPath$1(nt,tt);for(var ot=-1,at=nt.length,st=at-1,ut=tt;ut!=null&&++ot<at;){var ct=toKey(nt[ot]),pt=et;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return tt;if(ot!=st){var dt=ut[ct];pt=rt?rt(dt,ct,ut):void 0,pt===void 0&&(pt=isObject(dt)?dt:isIndex(nt[ot+1])?[]:{})}assignValue(ut,ct,pt),ut=ut[ct]}return tt}var _baseSet=baseSet$1,baseGet=_baseGet,baseSet=_baseSet,castPath=_castPath;function basePickBy$1(tt,nt,et){for(var rt=-1,ot=nt.length,at={};++rt<ot;){var st=nt[rt],ut=baseGet(tt,st);et(ut,st)&&baseSet(at,castPath(st,tt),ut)}return at}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(tt,nt){return basePickBy(tt,nt,function(et,rt){return hasIn(tt,rt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick=flatRest(function(tt,nt){return tt==null?{}:basePick(tt,nt)}),pick_1=pick;const pick$1=getDefaultExportFromCjs$1(pick_1),DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json";class MetricsManager{constructor(nt){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=et=>{this.appHash=et},this.setMetricsConfig=(et="")=>{this.metricsUrl=et},this.sessionInfo=nt}async initialize({gatherUsageStats:nt,sendMessageToHost:et}){this.sendMessageToHost=et,this.actuallySendMetrics=nt&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(logError("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),logAlways("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(nt,et={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([nt,et]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(nt,et))}setMetadata(nt){this.metadata=nt}async requestDefaultMetricsConfig(){const nt=localStorageAvailable();if(nt){const et=window.localStorage.getItem("stMetricsConfig");if(et){this.metricsUrl=et;return}}try{const et=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!et.ok)this.metricsUrl=void 0,logError("Failed to fetch metrics config: ",et.status);else{const rt=await et.json();this.metricsUrl=rt.url??void 0,nt&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(et){logError("Failed to fetch metrics config:",et)}}send(nt,et={}){const rt=this.buildEventProto(nt,et);this.metricsUrl==="postMessage"?this.postMessageEvent(nt,rt):this.track(rt)}sendPendingEvents(){this.pendingEvents.forEach(([nt,et])=>{this.send(nt,et)}),this.pendingEvents=[]}async track(nt){const et=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(nt.toJSON())});await fetch(et)}postMessageEvent(nt,et){this.sendMessageToHost({type:"METRICS_EVENT",eventName:nt,data:et})}buildEventProto(nt,et){const rt=new MetricsEvent({event:nt,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,...this.getContextData()});if(nt==="menuClick")rt.label=et.label;else if(nt==="pageProfile")return new MetricsEvent({...rt,...et});return rt}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3}}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 nt="ajs_anonymous_id",et=localStorageAvailable(),rt=getCookie(nt),ot=et?window.localStorage.getItem(nt):null,at=new Date;at.setFullYear(new Date().getFullYear()+1),rt?(this.anonymousId=rt,et&&window.localStorage.setItem(nt,rt)):ot?(this.anonymousId=JSON.parse(ot),setCookie(nt,this.anonymousId,at)):(this.anonymousId=v4(),setCookie(nt,this.anonymousId,at),et&&window.localStorage.setItem(nt,this.anonymousId))}}const StyledApp=newStyled("div",{target:"e10tffaf0"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{position:"absolute",background:tt.colors.bgColor,color:tt.colors.bodyText,top:tt.spacing.none,left:tt.spacing.none,right:tt.spacing.none,bottom:tt.spacing.none,colorScheme:nt?"light":"dark",overflow:"hidden","@media print":{float:"none",height:tt.sizes.full,position:"static",overflow:"visible"}}}),StyledRecordAudioLabel=newStyled("label",{target:"e1nhbas40"})({margin:0}),StyledInstruction=newStyled("p",{target:"e1nhbas41"})({margin:0}),ScreencastDialog=({onClose:tt,toggleRecordAudio:nt,recordAudio:et,startRecording:rt})=>{const[ot,at]=reactExports.useState(et),st=reactExports.useCallback(ct=>{const{checked:pt}=ct.target;pt!==ot&&(at(pt),nt())},[ot,nt]),ut=reactExports.useCallback(()=>{rt(),tt()},[rt,tt]);return jsxs(Modal,{isOpen:!0,onClose:tt,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",checked:ot,onChange:st})," ","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:ut,children:"Start recording!"})})]})},StyledVideo=newStyled("video",{target:"ec1y6ev0"})(({theme:tt})=>({width:tt.sizes.full,borderRadius:tt.radii.md})),StyledDialogContainer=newStyled("div",{target:"ec1y6ev1"})(({theme:tt})=>({display:"flex",flexDirection:"column",width:tt.sizes.full})),StyledRow=newStyled("div",{target:"ec1y6ev2"})(({theme:tt})=>({display:"flex",flexDirection:"row",paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md})),StyledFirstColumn=newStyled("div",{target:"ec1y6ev3"})(({theme:tt})=>({paddingRight:tt.spacing.lg,textAlign:"right",color:tt.colors.gray,fontWeight:tt.fontWeights.bold,width:"6em"})),StyledSecondColumn=newStyled("div",{target:"ec1y6ev4"})(({theme:tt})=>({flex:1,paddingRight:tt.spacing.lg,marginRight:"6em",[`@media (max-width: ${tt.breakpoints.sm})`]:{marginRight:tt.spacing.none}})),StyledVideoFormatInstructions=newStyled("p",{target:"ec1y6ev5"})(({theme:tt})=>({marginTop:tt.spacing.sm,marginBottom:tt.spacing.none,fontSize:tt.fontSizes.sm})),StyledDownloadButtonContainer=newStyled("div",{target:"ec1y6ev6"})(({theme:tt})=>({marginTop:tt.spacing.twoXS})),VideoRecordedDialog=({onClose:tt,videoBlob:nt,fileName:et})=>{const rt=URL.createObjectURL(nt),ot=()=>{const at=document.createElement("a");at.setAttribute("href",rt),at.setAttribute("download",`${et}.webm`),at.click(),tt()};return jsxs(Modal,{isOpen:!0,onClose:tt,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:rt,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:ot,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:"😀"})]})]})]})})]})},StyledScreenCastWarningDialog=newStyled("div",{target:"e1xu6skw0"})({display:"flex"}),StyledUnsupportedScreenCastIcon=newStyled("div",{target:"e1xu6skw1"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:tt.spacing.twoXL,marginLeft:tt.spacing.sm,fontSize:tt.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=newStyled("p",{target:"e1xu6skw2"})(({theme:tt})=>({margin:tt.spacing.none})),UnsupportedBrowserDialog=({onClose:tt})=>jsxs(Modal,{isOpen:!0,onClose:tt,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),screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=newStyled("div",{target:"e1442ngl0"})(({theme:tt})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:tt.sizes.full,height:tt.sizes.full,fontSize:"40vh",color:tt.colors.red,fontWeight:tt.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${tt.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:tt,endCallback:nt})=>{const[et,rt]=reactExports.useState(tt);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const at=et-1;at>=0&&rt(at),at===0&&nt()},children:jsx$1("span",{children:et})},`frame${et}`)};function withScreencast(tt){const et=class et extends reactExports.PureComponent{constructor(){super(...arguments),this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:ot}=this.state;this.setState({recordAudio:!ot})},this.showDialog=ot=>{const{currentState:at}=this.state;ScreenCastRecorder.isSupportedBrowser()?at==="OFF"?this.setState({fileName:ot,currentState:"SETUP"}):this.stopRecording().catch(st=>logWarning(`withScreencast.stopRecording threw an error: ${st}`)):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:ot}=this.state;this.recorder=new ScreenCastRecorder({recordAudio:ot,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch{this.setState({currentState:"UNSUPPORTED"});return}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let ot;const{currentState:at}=this.state;at==="OFF"||isNullOrUndefined$1(this.recorder)||(at==="COUNTDOWN"&&this.setState({currentState:"OFF"}),at==="RECORDING"&&(this.recorder.getState()==="inactive"?this.setState({currentState:"OFF"}):(ot=await this.recorder.stop(),this.setState({outputBlob:ot,currentState:"PREVIEW_FILE"}))))},this.onCountdownEnd=async()=>{if(isNullOrUndefined$1(this.recorder))throw new Error("Countdown finished but recorder is null");this.recorder.start()?this.setState({currentState:"RECORDING"}):this.stopRecording().catch(at=>logWarning(`withScreencast.stopRecording threw an error: ${at}`))},this.getScreenCastProps=()=>({currentState:this.state.currentState,toggleRecordAudio:this.toggleRecordAudio,startRecording:this.showDialog,stopRecording:this.stopRecording}),this.closeDialog=()=>{this.setState({currentState:"OFF"})},this.render=()=>{const{outputBlob:ot,fileName:at,recordAudio:st,currentState:ut}=this.state;return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(tt,{...this.props,screenCast:this.getScreenCastProps()}),ut==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:this.closeDialog}),ut==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:st,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),ut==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:this.onCountdownEnd}),ut==="PREVIEW_FILE"&&ot&&jsx$1(VideoRecordedDialog,{onClose:this.closeDialog,videoBlob:ot,fileName:at})]})}}};et.displayName=`withScreencast(${tt.displayName||tt.name})`;let nt=et;return hoistNonReactStatics$2(nt,tt)}const showDevelopmentOptions=(tt,nt)=>nt==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==nt||Config.ToolbarMode.MINIMAL==nt?!1:tt||isLocalhost();function getTitle(tt){return tt||"Streamlit"}class StrategyV1{constructor(nt){this.appNav=nt,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(nt){var st,ut;this.appPages=nt.appPages,this.currentPageScriptHash=nt.pageScriptHash,this.hideSidebarNav=((st=nt.config)==null?void 0:st.hideSidebarNav)??!1;const et=this.appPages[0],rt=et.urlPathname??"",ot=((ut=this.appPages.find(ct=>ct.pageScriptHash===this.currentPageScriptHash))==null?void 0:ut.urlPathname)??"",at=et.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(rt,ot,at),document.title=getTitle(ot??""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:at?"":ot,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(nt){const{appPages:et}=nt;return[{appPages:et},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:et})}]}handlePageNotFound(nt){var ot;const{pageName:et}=nt;this.appNav.onPageNotFound(et);const rt=((ot=this.appPages[0])==null?void 0:ot.pageScriptHash)??"";return this.currentPageScriptHash=rt,[{currentPageScriptHash:rt},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:rt})}]}handleNavigation(nt){}findPageByUrlPath(nt){return this.appPages.length===0?null:this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.appPages[0]}clearPageElements(nt,et,rt){return AppRoot.empty(et,!1,rt,nt.logo)}}class StrategyV2{constructor(nt){this.appNav=nt,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(nt){var et;return this.mainScriptHash=nt.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((et=nt.config)==null?void 0:et.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(nt){}handlePageNotFound(nt){const{pageName:et}=nt;return this.appNav.onPageNotFound(et),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(nt){const{sections:et,position:rt,appPages:ot}=nt;this.appPages=ot,this.hideSidebarNav=rt===Navigation.Position.HIDDEN;const at=nt.pageScriptHash,st=ot.find(pt=>pt.pageScriptHash===at),ut=ot.find(pt=>pt.isDefault);this.mainPage=ut;const ct=st.urlPathname;if(!this.appNav.isPageTitleSet){const pt=getTitle(st.pageName);document.title=pt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:st.pageName??""})}return!this.appNav.isPageIconSet&&st.icon&&this.appNav.onPageIconChange(st.icon),this.appNav.onUpdatePageUrl(ut.urlPathname??"",ct,st.isDefault??!1),[{appPages:ot,navSections:et,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:nt.expanded,currentPageScriptHash:at},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ot}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:st.isDefault?"":ct,currentPageScriptHash:at})}]}findPageByUrlPath(nt){return this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.mainPage}clearPageElements(nt,et,rt){return nt.filterMainScriptElements(et)}}class AppNavigation{constructor(nt,et,rt,ot){this.hostCommunicationMgr=nt,this.onUpdatePageUrl=et,this.onPageNotFound=rt,this.onPageIconChange=ot,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(nt){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(nt)}handleNavigation(nt){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(nt)}handlePagesChanged(nt){return this.strategy.handlePagesChanged(nt)}handlePageNotFound(nt){return this.strategy.handlePageNotFound(nt)}findPageByUrlPath(nt){return this.strategy.findPageByUrlPath(nt)}handlePageConfigChanged(nt){this.isPageIconSet=!!nt.favicon,this.isPageTitleSet=!!nt.title}clearPageElements(nt,et,rt){return this.strategy.clearPageElements(nt,et,rt)}}const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>";class App extends reactExports.PureComponent{constructor(nt){super(nt),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(rt,ot,at)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:rt,msg:ot,onContinue:at,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(rt,ot)=>{const[,at,st]=createPresetThemes(),ut=isPresetTheme(this.props.theme.activeTheme);rt===at.name&&ut?this.props.theme.setTheme(at):rt===st.name&&ut?this.props.theme.setTheme(st):ot&&this.props.theme.setImportedTheme(ot)},this.handleConnectionStateChanged=rt=>{if(logMessage(`Connection state changed from ${this.state.connectionState} to ${rt}`),rt===ConnectionState.CONNECTED){const ot=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||ot)&&(this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:rt!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:rt})},this.handleGitInfoChanged=rt=>{this.setState({gitInfo:rt})},this.handleCustomParentMessage=rt=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:rt.message}):logError("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=rt=>{const ot=(at,st,ut)=>{const ct=at[st];if(ct in ut)return ut[ct](at[ct]);throw new Error(`Cannot handle ${st} "${ct}".`)};try{ot(rt,"type",{newSession:at=>this.handleNewSession(at),sessionStatusChanged:at=>this.handleSessionStatusChanged(at),sessionEvent:at=>this.handleSessionEvent(at),delta:at=>this.handleDeltaMsg(at,rt.metadata),pageConfigChanged:at=>this.handlePageConfigChanged(at),pageInfoChanged:at=>this.handlePageInfoChanged(at),pagesChanged:at=>this.handlePagesChanged(at),pageNotFound:at=>this.handlePageNotFound(at),gitInfoChanged:at=>this.handleGitInfoChanged(at),scriptFinished:at=>this.handleScriptFinished(at),pageProfile:at=>this.handlePageProfileMsg(at),autoRerun:at=>this.handleAutoRerun(at),fileUrlsResponse:at=>this.uploadClient.onFileURLsResponse(at),parentMessage:at=>this.handleCustomParentMessage(at),logo:at=>this.handleLogo(at,rt.metadata),navigation:at=>this.handleNavigation(at)})}catch(at){const st=ensureError(at);logError(st),this.showError("Bad message format",st.message)}},this.handleLogo=(rt,ot)=>{const at={activeScriptHash:ot.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(rt,at)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=rt=>{const{title:ot,favicon:at,layout:st,initialSidebarState:ut,menuItems:ct}=rt;this.appNavigation.handlePageConfigChanged(rt),ot&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:ot}),document.title=ot),at&&this.onPageIconChanged(at),st!==this.state.layout&&this.setState(pt=>({layout:st,userSettings:{...pt.userSettings,wideMode:st===PageConfig.Layout.WIDE}})),ut!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:ut})),this.setState({menuItems:ct})},this.handlePageInfoChanged=rt=>{const{queryString:ot}=rt,at=document.location.pathname+(ot?`?${ot}`:"");window.history.pushState({},"",at),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:ot?`?${ot}`:""})},this.onPageNotFound=rt=>{const ot=rt?`You have requested page /${rt}, 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",`${ot}. Running the app's main page.`)},this.handlePageNotFound=rt=>{this.maybeSetState(this.appNavigation.handlePageNotFound(rt))},this.onPageIconChanged=rt=>{handleFavicon(rt,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=rt=>{this.maybeSetState(this.appNavigation.handlePagesChanged(rt))},this.handleNavigation=rt=>{this.maybeSetState(this.appNavigation.handleNavigation(rt))},this.handlePageProfileMsg=rt=>{var st,ut,ct;const ot=PageProfile.toObject(rt),at=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...ot,isFragmentRun:!!ot.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(st=this.state.appPages)==null?void 0:st.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(ct=(ut=this.props.theme)==null?void 0:ut.activeTheme)==null?void 0:ct.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:at})},this.handleAutoRerun=rt=>{const ot=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(rt.fragmentId,!0)},rt.interval*1e3);this.setState(at=>({autoReruns:[...at.autoReruns,ot]}))},this.handleSessionStatusChanged=rt=>{this.setState(ot=>{let{scriptRunState:at}=ot,{dialog:st}=ot;return rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.STOP_REQUESTED?(at=ScriptRunState.RUNNING,notNullOrUndefined(st)&&st.type===DialogType.SCRIPT_COMPILE_ERROR&&(st=void 0)):!rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&ot.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(at=ScriptRunState.NOT_RUNNING),{userSettings:{...ot.userSettings,runOnSave:!!rt.runOnSave},dialog:st,scriptRunState:at}})},this.handleSessionEvent=rt=>{if(this.sessionEventDispatcher.handleSessionEventMsg(rt),rt.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const ot={type:DialogType.SCRIPT_COMPILE_ERROR,exception:rt.scriptCompilationException,onClose:()=>{}};this.openDialog(ot)}},this.maybeUpdatePageUrl=(rt,ot,at)=>{const st=this.getBaseUriParts();if(st){const{basePath:ut}=st,ct=extractPageNameFromPathName(document.location.pathname,ut);if((ct===""?rt:ct)!==ot){const dt=at?"":ot,ft=preserveEmbedQueryParams(),bt=ft?`?${ft}`:"",Mt=`${ut?`/${ut}`:""}/${dt}${bt}`;window.history.pushState({},"",Mt)}}},this.handleNewSession=rt=>{const ot=rt.initialize;if(this.hasStreamlitVersionChanged(ot)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(rt);const{appHash:at,currentPageScriptHash:st}=this.state,{scriptRunId:ut,name:ct,mainScriptPath:pt,fragmentIdsThisRun:dt,pageScriptHash:ft,mainScriptHash:bt}=rt;if(dt.length)this.setState({fragmentIdsThisRun:dt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Mt=rt.config,mt=rt.customTheme;this.processThemeInput(mt),this.setState({allowRunOnSave:Mt.allowRunOnSave,hideTopBar:Mt.hideTopBar,toolbarMode:Mt.toolbarMode,latestRunTime:performance.now(),mainScriptHash:bt,fragmentIdsThisRun:dt}),this.maybeSetState(this.appNavigation.handleNewSession(rt)),this.onPageIconChanged("./favicon.png")}const ht=hashString(this.sessionInfo.current.installationId+pt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(ht),this.metricsMgr.enqueue("updateReport"),at===ht&&st===ft?this.setState({scriptRunId:ut}):this.clearAppState(ht,ut,ct,bt)},this.handleOneTimeInitialization=rt=>{const ot=rt.initialize,at=rt.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(rt)),this.metricsMgr.initialize({gatherUsageStats:at.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(ot.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:rt}=this.state,ot=this.appNavigation.findPageByUrlPath(document.location.pathname),at=document.location.toString().includes("#"),st=(ot==null?void 0:ot.pageScriptHash)===rt;isNullOrUndefined$1(ot)||at&&st||this.onPageChange(ot.pageScriptHash)},this.setAndSendTheme=rt=>{this.props.theme.setTheme(rt),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(rt.emotion)})},this.createThemeHash=rt=>{if(!rt)return"hash_for_undefined_custom_theme";const ot=Object.entries(rt);return ot.sort(),hashString(ot.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=rt=>{const{runOnSave:ot}=this.state.userSettings,{runOnSave:at}=rt;if(this.setState({userSettings:rt}),ot!==at&&this.isServerConnected()){const st=new BackMsg({setRunOnSave:at});st.type="setRunOnSave",this.sendBackMsg(st)}},this.handleDeltaMsg=(rt,ot)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,rt,ot),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const at=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,at&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugShutdownRuntime:!0});rt.type="debugShutdownRuntime",this.sendBackMsg(rt)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugDisconnectWebsocket:!0});rt.type="debugDisconnectWebsocket",this.sendBackMsg(rt)}},this.debugClearForwardMsgCache=()=>{var rt,ot;isLocalhost()&&((ot=(rt=this.connectionManager)==null?void 0:rt.connection)==null||ot.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(rt=>{clearInterval(rt)}),this.setState({autoReruns:[]})},this.rerunScript=(rt=!1)=>{if(this.closeDialog(),!this.isServerConnected()){logError("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}),rt===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){logError("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=rt=>{const{elements:ot,mainScriptHash:at}=this.state;this.cleanupAutoReruns();const st=this.appNavigation.clearPageElements(ot,at,void 0),ut=new Set(Array.from(st.getElements()).map(ct=>getElementId(ct)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(ut),void 0,rt)},this.isAppInReadyState=rt=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&rt.scriptRunState===ScriptRunState.RUNNING&&rt.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(rt,ot,at,st)=>{const ut=this.getBaseUriParts();if(!ut){logError("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:ct}=this.state,{basePath:pt}=ut;let dt=this.getQueryString(),ft="";at?at!=ct&&(dt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt})):ct?at=ct:(ft=extractPageNameFromPathName(document.location.pathname,pt),at=""),this.sendBackMsg(new BackMsg({rerunScript:{queryString:dt,widgetStates:rt,pageScriptHash:at,pageName:ft,fragmentId:ot,isAutoRerun:st}})),PerformanceEvents.record({name:"RequestedRerun",scriptRunState:this.state.scriptRunState})},this.stopScript=()=>{if(!this.isServerConnected()){logError("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const rt=new BackMsg({stopScript:!0});rt.type="stopScript",this.sendBackMsg(rt),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const rt={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(rt)}else logError("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var ot;const rt={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((ot=this.state.dialog)==null?void 0:ot.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const rt={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const rt=new BackMsg({clearCache:!0});rt.type="clearCache",this.sendBackMsg(rt)}else logError("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const rt=new BackMsg({appHeartbeat:!0});rt.type="appHeartbeat",this.sendBackMsg(rt)}else logError("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=rt=>{this.connectionManager?this.connectionManager.sendMessage(rt):logError(`Not connected. Cannot send back message: ${rt}`)},this.handleConnectionError=rt=>{this.showError("Connection error",rt)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(rt=!0)=>{const ot={type:DialogType.SETTINGS,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},developerMode:showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),openThemeCreator:this.openThemeCreatorDialog,animateModal:rt,metricsMgr:this.metricsMgr};this.openDialog(ot)},this.aboutCallback=()=>{const{menuItems:rt}=this.state,ot={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:rt==null?void 0:rt.aboutSectionMd};this.openDialog(ot)},this.printCallback=()=>{const{scriptRunState:rt}=this.state;if(rt!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let ot;try{const at=getIFrameEnclosingApp(this.embeddingId);at&&at.contentWindow?ot=at.contentWindow.window:ot=window}catch{ot=window}finally{ot||(ot=window),ot.print()}},this.screencastCallback=()=>{const{scriptName:rt}=this.state,{startRecording:ot}=this.props.screenCast,at=hooks().format("YYYY-MM-DD-HH-MM-SS");ot(`streamlit-${rt}-${at}`)},this.handleFullScreen=rt=>{this.setState({isFullScreen:rt})},this.setLibConfig=rt=>{this.setState({libConfig:rt})},this.setAppConfig=rt=>{this.setState({appConfig:rt})},this.addScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:ot.scriptFinishedHandlers.concat(rt)}))},this.removeScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:without$1(ot.scriptFinishedHandlers,rt)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:rt}=this.state,ot=rt&&rt.length>0?rt:document.location.search;return ot.startsWith("?")?ot.substring(1):ot},this.isInCloudEnvironment=()=>{const{hostMenuItems:rt}=this.state;return rt&&(rt==null?void 0:rt.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=(rt,ot)=>{if(this.isServerConnected()){const at=new BackMsg({fileUrlsRequest:{requestId:rt,fileNames:ot.map(st=>st.name),sessionId:this.sessionInfo.current.sessionId}});at.type="fileUrlsRequest",this.sendBackMsg(at)}},this.handleKeyDown=rt=>{switch(rt){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=rt=>{rt==="esc"&&this.props.screenCast.stopRecording()},J$1();let et=this.createThemeHash();isPresetTheme(nt.theme.activeTheme)||(et=this.createThemeHash(toThemeInput(nt.theme.activeTheme.emotion))),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},layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:et,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},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:rt=>this.setState({formsData:rt})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:nt.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:rt=>{this.setState({inputsDisabled:rt})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:rt=>this.setState({isOwner:rt}),fileUploadClientConfigChanged:rt=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(rt)},hostMenuItemsChanged:rt=>{this.setState({hostMenuItems:rt})},hostToolbarItemsChanged:rt=>{this.setState({hostToolbarItems:rt})},hostHideSidebarNavChanged:rt=>{this.setState({hostHideSidebarNav:rt})},sidebarChevronDownshiftChanged:rt=>{this.setState({sidebarChevronDownshift:rt})},pageLinkBaseUrlChanged:rt=>{this.setState({pageLinkBaseUrl:rt})},queryParamsChanged:rt=>{this.setState({queryParams:rt})},deployedAppMetadataChanged:rt=>{this.setState({deployedAppMetadata:rt})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var rt;(rt=this.connectionManager)==null||rt.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:rt=>this.widgetMgr.setFormsWithUploadsInProgress(rt),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.connectionManager=new ConnectionManager({sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:nt=>{const{allowedOrigins:et,useExternalAuthToken:rt,disableFullscreenMode:ot,enableCustomParentMessages:at,mapboxToken:st,enforceDownloadInNewTab:ut,metricsUrl:ct}=nt,pt={allowedOrigins:et,useExternalAuthToken:rt,enableCustomParentMessages:at},dt={mapboxToken:st,disableFullscreenMode:ot,enforceDownloadInNewTab:ut};this.metricsMgr.setMetricsConfig(ct),this.hostCommunicationMgr.setAllowedOrigins(pt),this.setAppConfig(pt),this.setLibConfig(dt)}})}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 nt=document.querySelectorAll("[data-iframe-height]"),et=Array.from(nt).map(rt=>Math.ceil(rt.getBoundingClientRect().bottom));return Math.max(0,...et)}},__vitePreload(()=>import("./iframeResizer.contentWindow.CDjnvFyQ.js").then(nt=>nt.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(nt,et){window.prerenderReady===!1&&this.isAppInReadyState(et)&&(window.prerenderReady=!0),this.state.scriptRunState!==et.scriptRunState&&(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}))}componentWillUnmount(){var nt;(nt=this.connectionManager)==null||nt.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(nt,et){logError(et);const rt={type:DialogType.WARNING,title:nt,msg:et,onClose:()=>{}};this.openDialog(rt)}hasStreamlitVersionChanged(nt){if(this.sessionInfo.isSet){const et=this.sessionInfo.current.streamlitVersion,{environmentInfo:rt}=nt;if(notNullOrUndefined(rt)&¬NullOrUndefined(rt.streamlitVersion))return et!=rt.streamlitVersion}return!1}maybeSetState(nt){if(nt){const[et,rt]=nt;this.setState(et,rt)}}processThemeInput(nt){const et=this.createThemeHash(nt);if(et===this.state.themeHash)return;this.setState({themeHash:et});const rt=!isPresetTheme(this.props.theme.activeTheme);if(nt){const ot=createTheme(CUSTOM_THEME_NAME,nt);this.props.theme.addThemes([ot]),(getCachedTheme()===null||rt)&&this.setAndSendTheme(ot)}else this.props.theme.addThemes([]),rt&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(nt){if(nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(et=>et())},0),nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:rt,fragmentIdsThisRun:ot})=>({elements:this.pendingElementsBuffer.clearStaleNodes(rt,ot)}),()=>{this.pendingElementsBuffer=this.state.elements});const et=new Set(Array.from(this.state.elements.getElements()).map(rt=>getElementId(rt)).filter(notUndefined));this.widgetMgr.removeInactive(et)}this.connectionManager!==null&&nt!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(nt,et,rt,ot){const{hideSidebarNav:at,elements:st}=this.state,ut=at&&st.sidebar||void 0;this.setState({scriptRunId:et,scriptName:rt,appHash:nt,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,ot,ut)},()=>{this.pendingElementsBuffer=this.state.elements;const ct=new Set(Array.from(this.state.elements.getElements()).map(pt=>getElementId(pt)).filter(notUndefined));this.widgetMgr.removeInactive(ct)})}openDialog(nt){this.setState({dialog:nt})}render(){const{allowRunOnSave:nt,connectionState:et,dialog:rt,elements:ot,initialSidebarState:at,menuItems:st,isFullScreen:ut,scriptRunId:ct,scriptRunState:pt,userSettings:dt,hideTopBar:ft,hideSidebarNav:bt,expandSidebarNav:ht,currentPageScriptHash:Mt,hostHideSidebarNav:mt,pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,hostMenuItems:yt,hostToolbarItems:vt,libConfig:At,appConfig:St,inputsDisabled:Et,appPages:Tt,navSections:Rt}=this.state,Ct=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),wt=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":dt.wideMode}),Lt=rt?StreamlitDialog({...rt,onClose:this.closeDialog}):null,Ht=Et||et!==ConnectionState.CONNECTED;return jsx$1(AppContext.Provider,{value:{initialSidebarState:at,wideMode:dt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,gitInfo:this.state.gitInfo,appConfig:St},children:jsx$1(LibContext.Provider,{value:{isFullScreen:ut,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:Mt,libConfig:At,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:wt,"data-testid":"stApp","data-test-script-state":ct==INITIAL_SCRIPT_RUN_ID?"initial":pt,"data-test-connection-state":et,children:[jsxs(Header,{children:[!ft&&jsxs(Fragment,{children:[jsx$1(StatusWidget,{connectionState:et,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:pt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:nt}),jsx$1(ToolbarActions,{hostToolbarItems:vt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsx$1(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),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:yt,developmentMode:Ct,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:st,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:ot,scriptRunId:ct,scriptRunState:pt,widgetMgr:this.widgetMgr,widgetsDisabled:Ht,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:ot.logo,appPages:Tt,navSections:Rt,onPageChange:this.onPageChange,currentPageScriptHash:Mt,hideSidebarNav:bt||mt,expandSidebarNav:ht}),Lt]})})})})}}const AppWithScreencast=withScreencast(App);function useThemeManager(){const tt=getDefaultTheme(),[nt,et]=reactExports.useState(tt),[rt,ot]=reactExports.useState([]),[at,st]=reactExports.useState([...createPresetThemes(),...isPresetTheme(tt)?[]:[tt]]),ut=ft=>{st([...createPresetThemes(),...ft])},ct=reactExports.useCallback(ft=>{ft!==nt&&(et(ft),ft.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(ft))},[et,nt]),pt=reactExports.useCallback(()=>{nt.name===AUTO_THEME_NAME&&ct(getHostSpecifiedTheme());const ft=at.filter(bt=>bt.name!==AUTO_THEME_NAME);st([createAutoTheme(),...ft])},[nt.name,at,ct]),dt=reactExports.useCallback(ft=>{ft.fontFaces&&ot(ft.fontFaces);const bt=new CustomThemeConfig(ft),ht=createTheme(CUSTOM_THEME_NAME,bt);ct(ht)},[ot,ct]);return reactExports.useEffect(()=>{const ft=window.matchMedia("(prefers-color-scheme: dark)");return ft.addEventListener("change",pt),window.addEventListener("afterprint",pt),()=>{window.removeEventListener("afterprint",pt),ft.removeEventListener("change",pt)}},[nt,at,pt]),[{setTheme:ct,activeTheme:nt,addThemes:ut,availableThemes:at,setImportedTheme:dt},rt]}const ThemedApp=({streamlitExecutionStartedAt:tt})=>{const[nt,et]=useThemeManager(),{activeTheme:rt}=nt,ot=rt.name===CUSTOM_THEME_NAME&&et.length>0;return jsx$1(RootStyleProvider,{theme:rt,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[ot&&jsx$1(FontFaceDeclaration,{fontFaces:et}),jsx$1(AppWithScreencast,{theme:nt,streamlitExecutionStartedAt:tt})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"});ReactDOM.render(jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})}),document.getElementById("root"));export{isEqual$1 as $,isNullOrUndefined$1 as A,merge$6 as B,numbro$1 as C,notNullOrUndefined as D,EmotionIconBase as E,Fragment as F,hooks as G,formatPeriodType as H,moment$1 as I,getTypeName as J,format as K,convertToSeconds as L,useTheme as M,Arrow$2 as N,logError as O,PortalContext as P,transparentize as Q,React$1 as R,convertRemToPx as S,logWarning as T,_defineProperty$u as U,_objectWithoutProperties$o as V,_typeof$g as W,jsx as X,css$2 as Y,_toConsumableArray$3 as Z,_extends$Q as _,range$1 as a,TooltipIcon as a$,StyledTooltipContentWrapper as a0,StreamlitMarkdown$1 as a1,PLACEMENT as a2,ACCESSIBILITY_TYPE as a3,hasLightBackgroundColor as a4,Popover$1 as a5,LibContext as a6,jsxs as a7,Resizable as a8,IndexTypeName as a9,_unsupportedIterableToArray$l as aA,getAugmentedNamespace as aB,DEFAULT_IFRAME_FEATURE_POLICY as aC,DEFAULT_IFRAME_SANDBOX_POLICY as aD,darken as aE,BaseButtonSize as aF,BaseButtonKind as aG,BaseButtonTooltip as aH,DynamicButtonLabel as aI,IsSidebarContext as aJ,Placement as aK,getGray90 as aL,getIncreasingGreen as aM,getDecreasingRed as aN,PlotlyChart$1 as aO,keysToSnakeCase as aP,WindowDimensionsContext as aQ,Video$1 as aR,zip$1 as aS,FileUploaderState as aT,UploadedFileInfo as aU,StyledSpinner as aV,ENABLE_PERIPHERALS_DOCS_URL as aW,Icon$2 as aX,BaseButton as aY,blend as aZ,labelVisibilityProtoValueToEnum as a_,_baseMerge as aa,_createAssigner as ab,getGray70 as ac,getGray30 as ad,getCategoricalColorsArray as ae,getDivergingColorsArray as af,getSequentialColorsArray as ag,getBlue80 as ah,debounce$4 as ai,Global as aj,ensureError as ak,withTheme as al,DynamicIcon as am,toaster as an,Kind as ao,AlertElement as ap,_assertThisInitialized$e as aq,StyledInlineCode as ar,ErrorElement as as,axios as at,Skeleton$1 as au,Skeleton as av,hoistNonReactStatics$2 as aw,lib$3 as ax,parseToRgba as ay,DeckGlJsonChart$1 as az,reactDomExports as b,ThemeProvider$1 as b$,WidgetLabel as b0,Tooltip as b1,styled as b2,getOverrides as b3,LocaleContext as b4,ButtonGroup$1 as b5,LabelVisibilityMessage as b6,StyledWidgetLabelHelpInline as b7,themeColors as b8,isMobile_1 as b9,classNames as bA,UISelectbox as bB,isValidFormId as bC,toPropertyKey as bD,_setPrototypeOf$e as bE,hexToRgb as bF,withWrapper as bG,StyledWidgetInstructions as bH,isFromMac as bI,CUSTOM_INPUT_TYPE as bJ,SIZE$1 as bK,DeleteAlt$1 as bL,ADJOINED as bM,filterOptions as bN,ENHANCER_POSITION as bO,pick$1 as bP,Slider$2 as bQ,isFromWindows as bR,__awaiter as bS,__generator as bT,__spread as bU,PropTypes as bV,ChevronLeft as bW,ChevronRight as bX,isInForm as bY,toString_1 as bZ,TextInput$1 as b_,CAMERA_PERMISSION_URL as ba,StyledWidgetLabelHelp as bb,isFocusVisible as bc,getOverride as bd,getOverrideProps as be,Checkbox$1 as bf,StyledContent as bg,StyledCheckbox$1 as bh,BaseColorPicker as bi,useStyletron as bj,mergeOverride as bk,toObjectOverride as bl,Icon$1 as bm,UIDConsumer as bn,StatefulMenu as bo,mergeOverrides as bp,ChevronDown$1 as bq,ThemeContext as br,forkFocus as bs,forkBlur as bt,Select as bu,without$1 as bv,fuzzyFilterSelectOptions as bw,TYPE as bx,VirtualDropdown as by,isPresetTheme as bz,_hasPath as c,createThemedStyled as c0,createThemedUseStyletron as c1,createThemedWithStyle as c2,expandBorderStyles as c3,withStyle as c4,reactIsExports$1 as c5,NumberInput$1 as c6,commonjsGlobal$1 as d,classnamesExports as e,_root as f,getDefaultExportFromCjs$1 as g,isObject_1 as h,isPropValid as i,jsx$1 as j,keyframes as k,_Set as l,_setToArray as m,newStyled as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,_cacheHas as u,groupBy$1 as v,__vitePreload as w,flatten$2 as x,require$$0 as y,toString$9 as z};
|