(this["webpackJsonpstreamlit-browser"]=this["webpackJsonpstreamlit-browser"]||[]).push([[25],{1184:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(7),a=n.n(r),i=a()("label",{target:"effi0qh0"})((function(e){var t=e.theme;return{fontSize:t.fontSizes.smDefault,color:t.colors.bodyText,marginBottom:t.fontSizes.halfSmDefault}}),""),o=a()("div",{target:"effi0qh1"})((function(e){var t=e.theme;return{fontSize:t.fontSizes.smDefault,color:t.colors.gray,margin:t.spacing.none,textAlign:"right",position:"absolute",bottom:0,right:t.fontSizes.halfSmDefault}}),"")},1508:function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(6),a=n(1),i=n(147),o=n(0),l=n.n(o),s=n(101),u=n(1725),c=n(7),p=n.n(c),d=n(244),f=n.n(d),h=n(1383);var v=p()("span",{target:"e1sjeeqh0"})({name:"1d0tddh",styles:"overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"}),b=p()(h.e,{shouldForwardProp:f.a,target:"e1sjeeqh1"})((function(e){var t=e.theme;return{display:"flex",alignItems:"center",paddingTop:t.spacing.none,paddingBottom:t.spacing.none}}),"");function g(e){var t=e.data,n=e.index,o=e.style,l=t[n].props,s=l.item,u=(l.overrides,Object(i.a)(l,["item","overrides"]));return Object(a.jsx)(b,Object(r.a)(Object(r.a)({style:o},u),{},{children:Object(a.jsx)(v,{children:s.label})}),s.value)}var m=l.a.forwardRef((function(e,t){var n=l.a.Children.toArray(e.children);if(!n[0]||!n[0].props.item){var i=n[0]?n[0].props:{};return Object(a.jsx)(s.b,{$style:{height:"".concat(90,"px")},ref:t,children:Object(a.jsx)(s.a,Object(r.a)({},i))})}var o=Math.min(300,40*n.length);return Object(a.jsx)(s.b,{ref:t,children:Object(a.jsx)(u.FixedSizeList,{width:"100%",height:o,itemCount:n.length,itemData:n,itemKey:function(e,t){return t[e].props.item.value},itemSize:40,children:g})})}));m.displayName="VirtualDropdown";var j=m},3824:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return v}));var r=n(1),a=n(45),i=n(10),o=n(13),l=n(21),s=n(22),u=n(0),c=n.n(u),p=n(3800),d=n(11),f=n(1508),h=n(1184),v=function(e){Object(l.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];return(e=t.call.apply(t,[this].concat(l))).state={value:e.initialValue},e.setWidgetValue=function(t){var n=e.props.element.id;e.props.widgetMgr.setIntValue(n,e.state.value,t)},e.onChange=function(t){if(0!==t.value.length){var n=Object(a.a)(t.value,1)[0];e.setState({value:parseInt(n.value,10)},(function(){return e.setWidgetValue({fromUi:!0})}))}else Object(d.d)("No value selected!")},e.filterOptions=function(e,t){return e.filter((function(e){return e.label.toLowerCase().includes(t.toString().toLowerCase())}))},e.render=function(){var t={width:e.props.width},n=e.props.element.options,a=e.props.disabled,i=[{label:n.length>0?n[e.state.value]:"No options to select.",value:e.state.value.toString()}];0===n.length&&(n=["No options to select."],a=!0);var o=[];return n.forEach((function(e,t){return o.push({label:e,value:t.toString()})})),Object(r.jsxs)("div",{className:"row-widget stSelectbox",style:t,children:[Object(r.jsx)(h.b,{children:e.props.element.label}),Object(r.jsx)(p.a,{clearable:!1,disabled:a,labelKey:"label",onChange:e.onChange,options:o,filterOptions:e.filterOptions,value:i,valueKey:"value",overrides:{Dropdown:{component:f.a}}})]})},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.setWidgetValue({fromUi:!1})}},{key:"initialValue",get:function(){var e=this.props.element.id,t=this.props.widgetMgr.getIntValue(e);return void 0!==t?t:this.props.element.default}}]),n}(c.a.PureComponent)}}]);
//# sourceMappingURL=25.664156ff.chunk.js.map