streamlit-nightly 1.38.1.dev20240925__py2.py3-none-any.whl → 1.38.1.dev20240926__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: streamlit-nightly
3
- Version: 1.38.1.dev20240925
3
+ Version: 1.38.1.dev20240926
4
4
  Summary: A faster way to build and share data apps
5
5
  Home-page: https://streamlit.io
6
6
  Author: Snowflake Inc
@@ -61,7 +61,7 @@ streamlit/elements/arrow.py,sha256=0vhjTxjAOrpl-p1zmm0henT91jE8LM1gzxQh6DtoBj4,3
61
61
  streamlit/elements/balloons.py,sha256=QnORgG96Opga1SVg8tUBOm-l3nMpKWmjvy1crcS2XaU,1482
62
62
  streamlit/elements/bokeh_chart.py,sha256=OdeJgmyiWH08QninHYQerxSOCyS1TcEwAqfgTuR0xzo,4196
63
63
  streamlit/elements/code.py,sha256=ZthfR1NdVnBg-L7iWEqN3WxKLiiq9jqt_-E6CRsZo8g,2696
64
- streamlit/elements/deck_gl_json_chart.py,sha256=RPG6yZDLNEwrbr4cWP7QENpD-nRlEd9pQBiSV6XyBMY,16433
64
+ streamlit/elements/deck_gl_json_chart.py,sha256=ajkn60eb7s9w-LXYg-hzGz_Mp_EbpxD58y_LiYPfpxU,16574
65
65
  streamlit/elements/dialog_decorator.py,sha256=12lIbNyinnfk_VvSWB8xauAMCT8PPfdn157aIMtudbg,10052
66
66
  streamlit/elements/doc_string.py,sha256=IuCqpXX0GqKIjCMcaOOHr-fmOixFlCdvCT8d8EIYEAE,16024
67
67
  streamlit/elements/empty.py,sha256=SN94_NJJxW0nMZ-w0XDbpN5h0urdAZi8pQFTslgmSAA,3853
@@ -347,9 +347,9 @@ streamlit/runtime/state/safe_session_state.py,sha256=WLFFyMtP4F19TWWBarKtSP942Ie
347
347
  streamlit/runtime/state/session_state.py,sha256=SMBWsSZY29jAgL3QfX4xvJr9aLCNrHHUz9AmosX7FlQ,28850
348
348
  streamlit/runtime/state/session_state_proxy.py,sha256=IWF43f6UWL4KyxNWF3aTv1sbykNI2hI5UsPF2UIfpdE,5524
349
349
  streamlit/runtime/state/widgets.py,sha256=XmXbLVHC84AytAocfFCDgP8W7I-UwZ_WkK7Lj0p4fn0,6726
350
- streamlit/static/asset-manifest.json,sha256=60Zi2eCo4S1pivZE_Uk85XZti-JA8-3YAqt2puZyA88,14721
350
+ streamlit/static/asset-manifest.json,sha256=urHxAkoabNobfgzEhTADpwIXLkpZ8u97JYwuSkhQpGo,14721
351
351
  streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
352
- streamlit/static/index.html,sha256=BA0PcbXwJJo9fPb3JVl_sYMnjJnBFNPzcD3kh_rmeag,891
352
+ streamlit/static/index.html,sha256=ppDnE8GO-QnLZJz-RMBQH1A1kNWNMzWz8fItK7wu8ek,891
353
353
  streamlit/static/static/css/195.81b3d18f.chunk.css,sha256=7WxsSsC_REs_rrfQTODJt34QZfNePqEv_fc-KFLcOz4,33375
354
354
  streamlit/static/static/css/5711.c24b25fa.chunk.css,sha256=oOQFf_CH_DqXNsgcLiXOIk4uuluqNRMkobp8p6uc3y4,2666
355
355
  streamlit/static/static/css/9943.93909c7e.chunk.css,sha256=6dVarHz_P5ACNrmcAZkXoNnjV5Z6CfnAXpxLBx-i1aw,12093
@@ -369,7 +369,7 @@ streamlit/static/static/js/3389.71902a75.chunk.js,sha256=rmAaytiYyUUn62JwB0cWuq8
369
369
  streamlit/static/static/js/3391.663b9d47.chunk.js,sha256=wnik-Gm3vJGqiTZzA9-EuwH8duSYvtqYdIgqbBIQUF4,2169
370
370
  streamlit/static/static/js/3471.de4b25a2.chunk.js,sha256=v46A9eVjvhxYsBZ6SFG6wRg94XAccGQn6xA3q7sIluE,2698
371
371
  streamlit/static/static/js/3560.ce031236.chunk.js,sha256=3KxR6gNZHQGsFYwELNibNWqsC8ceE4_XE3yNxTPyJi4,24850
372
- streamlit/static/static/js/3710.d73e609f.chunk.js,sha256=swqhrYYBBmXTXZNamt229NSP59N94wGBVGdKuxlZCa8,12712
372
+ streamlit/static/static/js/3710.b80be2b0.chunk.js,sha256=3IGM_h_27P677MH2sN4B2VtzJ1tek6MODouqr-zt0cw,12854
373
373
  streamlit/static/static/js/3861.0dedcd19.chunk.js,sha256=ir-cpKX6o7asBfLF9ynaZMO3EB7Gv0gTQjamKieBVN8,3111
374
374
  streamlit/static/static/js/3966.e0686958.chunk.js,sha256=zf2wvStW2Hl8p1n7K6ZCZ28xFzRklujcMF1UCLaSbRA,14199
375
375
  streamlit/static/static/js/4103.d863052a.chunk.js,sha256=352urf7O8P7oIbl8XzMyqi2jTTkooTlApCKbFUkRqfs,13447
@@ -423,8 +423,8 @@ streamlit/static/static/js/9528.746f7a0e.chunk.js,sha256=KL6FfepG5LOH0P5pH4ieh5-
423
423
  streamlit/static/static/js/954.1da91b19.chunk.js,sha256=3X0Gwgv4Films8FLekUOEm_uEOrNxLCRiXrTXTFSnt4,8660
424
424
  streamlit/static/static/js/9923.7061d124.chunk.js,sha256=WeDEW7AM0VDnIJzQv9UykMvjG0nbYX6BTRyKV-zBlyE,5951
425
425
  streamlit/static/static/js/9943.6af344bb.chunk.js,sha256=BeyyiIkkq5BhkL5fJVqXvjCxQCviixuvtX925tnZp4U,45364
426
- streamlit/static/static/js/main.e9d8ce9e.js,sha256=iN7WxQNsy2vCYSQh5Q6XCbh9yCWCDWdNan3W_Q0c9IM,4546522
427
- streamlit/static/static/js/main.e9d8ce9e.js.LICENSE.txt,sha256=zBIKKHKi84ZOA6IoZ3tlc9xb3yukNP-rM98cZVvzteg,4398
426
+ streamlit/static/static/js/main.45415ac9.js,sha256=vyc8LnFQ1FTGEpQDSq7F9O4Cipd-SwYQ_FwWKJuhcSA,4546262
427
+ streamlit/static/static/js/main.45415ac9.js.LICENSE.txt,sha256=zBIKKHKi84ZOA6IoZ3tlc9xb3yukNP-rM98cZVvzteg,4398
428
428
  streamlit/static/static/media/KaTeX_AMS-Regular.73ea273a72f4aca30ca5.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
429
429
  streamlit/static/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
430
430
  streamlit/static/static/media/KaTeX_AMS-Regular.d562e886c52f12660a41.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
@@ -544,9 +544,9 @@ streamlit/web/server/server_util.py,sha256=ioIHkXNlA_ujj2Q3isziM8r5glKxgK2JZRoCD
544
544
  streamlit/web/server/stats_request_handler.py,sha256=e144zIhzLTB1PN4CwTCxElCoWMuo9IsBEPex2exHCQ0,3641
545
545
  streamlit/web/server/upload_file_request_handler.py,sha256=ftyKpARrUjOpRcFETIXuoTyOG_mo-ToOw5NI0y_W4lE,5003
546
546
  streamlit/web/server/websocket_headers.py,sha256=uUxypj04ondEC4ocBiYCndX_N06Zwe1Mt690Vupe08Y,2232
547
- streamlit_nightly-1.38.1.dev20240925.data/scripts/streamlit.cmd,sha256=ZEYM3vBJSp-k7vwSJ3ba5NzEk9-qHdSeLvGYAAe1mMw,676
548
- streamlit_nightly-1.38.1.dev20240925.dist-info/METADATA,sha256=nADax_bV7Z1FZ4O7Le4Yu9ZCvAKIsuPPv53h-uWPsic,8512
549
- streamlit_nightly-1.38.1.dev20240925.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
550
- streamlit_nightly-1.38.1.dev20240925.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
551
- streamlit_nightly-1.38.1.dev20240925.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
552
- streamlit_nightly-1.38.1.dev20240925.dist-info/RECORD,,
547
+ streamlit_nightly-1.38.1.dev20240926.data/scripts/streamlit.cmd,sha256=ZEYM3vBJSp-k7vwSJ3ba5NzEk9-qHdSeLvGYAAe1mMw,676
548
+ streamlit_nightly-1.38.1.dev20240926.dist-info/METADATA,sha256=3tHDqqoJoheZDsgyvGzk5XmDRdCJ_WGrxZvOHY_lBJ4,8512
549
+ streamlit_nightly-1.38.1.dev20240926.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
550
+ streamlit_nightly-1.38.1.dev20240926.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
551
+ streamlit_nightly-1.38.1.dev20240926.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
552
+ streamlit_nightly-1.38.1.dev20240926.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- (self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[3710],{40223:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>xe});var i=o(58878),r=o(6334),n=o(72192),l=o(59353),a=o(78025),s=o(43338),c=o(8151),d=o(68994),h=o(58144),u=o(85850),g=o(22044),m=o(29669);var p=o(53124),b=o.n(p),f=o(32782),v=o(67253),y=o(1780),w=o(84152),S=o(6240),x=o(90782);const j=e=>{let{error:t,width:o,deltaType:i}=e;return t instanceof C?(0,x.jsx)(S.A,{width:o,name:"No Mapbox token provided",message:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("p",{children:["To use ",(0,x.jsxs)("code",{children:["st.",i]})," or ",(0,x.jsx)("code",{children:"st.map"})," you need to set up a Mapbox access token."]}),(0,x.jsxs)("p",{children:["To get a token, create an account at"," ",(0,x.jsx)("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),(0,x.jsxs)("p",{children:["Once you have a token, just set it using the Streamlit config option ",(0,x.jsx)("code",{children:"mapbox.token"})," and don't forget to restart your Streamlit server at this point if it's still running, then reload this tab."]}),(0,x.jsxs)("p",{children:["See"," ",(0,x.jsx)("a",{href:"https://docs.streamlit.io/develop/api-reference/configuration/config.toml",children:"our documentation"})," ","for more info on how to set config options."]})]})}):t instanceof k?(0,x.jsx)(S.A,{width:o,name:"Error fetching Streamlit Mapbox token",message:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("p",{children:"This app requires an internet connection."}),(0,x.jsx)("p",{children:"Please check your connection and try again."}),(0,x.jsxs)("p",{children:["If you think this is a bug, please file bug report"," ",(0,x.jsx)("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):(0,x.jsx)(S.A,{width:o,name:"Error fetching Streamlit Mapbox token",message:t.message})};class C extends Error{}class k extends Error{}const A="https://data.streamlit.io/tokens.json",F="mapbox",M=e=>t=>{class o extends i.PureComponent{constructor(o){super(o),this.context=void 0,this.initMapboxToken=async()=>{try{const e=await f.A.get(A),{[F]:t}=e.data;if(!t)throw new Error(`Missing token ${F}`);this.setState({mapboxToken:t,isFetching:!1})}catch(e){const t=(0,v.$)(e);throw this.setState({mapboxTokenError:t,isFetching:!1}),new k(`${t.message} (${A})`)}},this.render=()=>{const{mapboxToken:o,mapboxTokenError:i,isFetching:r}=this.state,{width:n}=this.props;return i?(0,x.jsx)(j,{width:n,error:i,deltaType:e}):r?(0,x.jsx)(y.E,{element:m.EA.create({style:m.EA.SkeletonStyle.ELEMENT})}):(0,x.jsx)(t,{...this.props,mapboxToken:o,width:n})},this.state={isFetching:!0,mapboxToken:void 0,mapboxTokenError:void 0}}componentDidMount(){const e=this.props.element.mapboxToken||this.context.libConfig.mapboxToken;e?this.setState({mapboxToken:e,isFetching:!1}):this.initMapboxToken()}}return o.displayName=`withMapboxToken(${t.displayName||t.name})`,o.contextType=w.n,b()(o,t)};var T=o(89653);const N=(0,T.A)("div",{target:"e1az0zs51"})((e=>{let{width:t,height:o}=e;return{position:"relative",height:o,width:t}}),""),E=(0,T.A)("div",{target:"e1az0zs50"})((e=>{let{theme:t}=e;return{position:"absolute",right:"2.625rem",top:t.spacing.md,zIndex:1,".mapboxgl-ctrl.mapboxgl-ctrl-group":{overflow:"hidden",background:t.colors.bgColor},"button:not(:disabled)":{background:t.colors.bgColor,"& + button":{borderTopColor:t.colors.secondaryBg},"&.mapboxgl-ctrl-icon:hover":{backgroundColor:(0,h.iq)(t)?"":t.colors.darkenedBgMix25},"& span":{filter:(0,h.iq)(t)?"":"invert(100%)"}}}}),"");var I=o(21640),O=o(71034),V=o.n(O),$=o(32735);var W=o(3101),D=o(14251),U=o(86202),P=o(26592),_=o(64639),z=o(73417),J=o(27126),B=o(38287);const L={classes:{...z,...o(19720),...B,...o(14249),CartoLayer:D.A},functions:{colorBins:U.A,colorCategories:P.A,colorContinuous:_.A}},q=new J.A({configuration:L});var G=o(44605),X=o(24983),Z=o(68212),K=o(20302),R=o(52265),H=o(60152),Q=o(70023),Y=o(6934),ee=o(34676),te=o(36217),oe=o(79579),ie=o(5830),re=o(74839),ne=o(16554),le=o(10762),ae=o(71749),se=o(45310),ce=o(26642),de=o(38610),he=o(41881);const ue={[ie.A.layerName]:["getFillColor"],[re.A.layerName]:["getFillColor"],[ne.Ay.layerName]:["getFillColor"],[le.A.layerName]:["getFillColor"],[ae.A.layerName]:["getFillColor"],[se.A.layerName]:["getFillColor"],[ce.A.layerName]:["getColor"],[G.A.layerName]:["getTargetColor","getSourceColor"],[X.A.layerName]:["getFillColor"],[Z.A.layerName]:["getFillColor"],[K.A.layerName]:["getColor"],[R.A.layerName]:["getColor"],[H.A.layerName]:["getColor"],[Q.A.layerName]:["getColor"],[Y.A.layerName]:["getFillColor"],[ee.A.layerName]:["getFillColor"],[te.A.layerName]:["getFillColor"],[oe.A.layerName]:["getColor"],[de.A.layerName]:["getColor"],[he.A.layerName]:["getColor"]},ge=e=>{let{isSelected:t,object:o,objectInfo:i,opacity:r,originalFillFunction:n}=e;const l=(e=>{let{object:t,objectInfo:o,originalFillFunction:i}=e;const r="function"===typeof i?i(t,o):i;if(Array.isArray(r))return[r[0]||0,r[1]||0,r[2]||0,r[3]||255];if("string"===typeof r&&r.startsWith("@@=")){const e=q.convert({originalColor:r}).originalColor(t);return[e[0]||0,e[1]||0,e[2]||0,e[3]||255]}return null})({object:o,objectInfo:i,originalFillFunction:n});if(!l)return null;let a=0;return a=t?Math.max("number"===typeof l[3]?l[3]:r,r):Math.min("number"===typeof l[3]?l[3]:r,r),[l[0]||0,l[1]||0,l[2]||0,a]},me={selection:{indices:{},objects:{}}},pe=(e,t)=>{const o=t.match(/{(.*?)}/g);return o&&o.forEach((o=>{const i=o.substring(1,o.length-1);e.object.hasOwnProperty(i)?t=t.replace(o,e.object[i]):e.object.hasOwnProperty("properties")&&e.object.properties.hasOwnProperty(i)&&(t=t.replace(o,e.object.properties[i]))})),t};function be(e,t){if(!t.id)return me;const o=e.getElementState(t.id,"selection");return null!==o&&void 0!==o?o:me}function fe(e,t){if(!t.id)return me;const o=e.getStringValue(t),i=o?I.A.parse(o):null;return null!==i&&void 0!==i?i:me}function ve(e,t,o,i){e.id&&t.setStringValue(e,JSON.stringify(o.value),{fromUi:o.fromUi},i)}const ye=e=>{var t;const{element:o,fragmentId:r,height:n,isFullScreen:l,isLightTheme:a,theme:s,widgetMgr:c,width:d}=e,{selectionMode:h,tooltip:u,useContainerWidth:g}=o,m=null!==l&&void 0!==l&&l,[p,b]=(0,W._)({element:o,getDefaultState:be,getStateFromWidgetMgr:fe,updateWidgetMgrState:ve,widgetMgr:c,fragmentId:r}),[f,v]=(0,i.useState)({bearing:0,pitch:0,zoom:11}),{height:y,width:w}=(e=>{let{container:t,element:o,heightFallback:r="auto",isFullScreen:n,shouldUseContainerWidth:l,widthFallback:a="auto"}=e;return{width:(0,i.useMemo)((()=>l||n?"100%":o.width||t.width||a),[t.width,o.width,n,l,a]),height:(0,i.useMemo)((()=>n&&t.height?t.height:o.height||t.height||r),[n,o.height,t.height,r])}})({element:o,isFullScreen:m,shouldUseContainerWidth:g,container:{height:n,width:d},heightFallback:(null===(t=f.initialViewState)||void 0===t?void 0:t.height)||500}),[S,x]=(0,i.useState)({}),j=h[0],C=void 0!==j,k=C&&Object.keys(p.selection.indices).length>0,A=(0,i.useMemo)((()=>Object.freeze(I.A.parse(o.json))),[m,a,o.json]),F=(0,i.useMemo)((()=>{const e={...A};if(e.mapStyle||(e.mapStyle=`mapbox://styles/mapbox/${a?"light":"dark"}-v9`),m?Object.assign(e.initialViewState,{width:w,height:y}):(e.initialViewState.height||(e.initialViewState.height=500),g&&(e.initialViewState.width=w)),e.layers){const t=Object.values(p.selection.indices).some((e=>null===e||void 0===e?void 0:e.length)),o=e.layers.some((e=>Object.hasOwn(e,"pickable")));e.layers=e.layers.map((e=>{var i,r;if(!e||Array.isArray(e)||!C)return e;o||(e.pickable=!0);const n=`${e.id||null}`,l=(null===p||void 0===p||null===(i=p.selection)||void 0===i||null===(r=i.indices)||void 0===r?void 0:r[n])||[],a=ue[e["@@type"]];if(!a)return e;const c={...e};return a.forEach((o=>{var i;c.updateTriggers={[o]:[...(null===(i=c.updateTriggers)||void 0===i?void 0:i[o])||[],l,t]};if(!t)return c;const r=e[o],n=(0,$.Du)(s.colors.primary),a=(0,$.Du)(s.colors.gray20);c[o]=(e,t)=>(e=>{let{isSelected:t,object:o,objectInfo:i,originalFillFunction:r,selectedColor:n,selectedOpacity:l=255,unselectedColor:a,unselectedOpacity:s=Math.floor(102)}=e;return t?ge({opacity:l,isSelected:!0,object:o,objectInfo:i,originalFillFunction:r})||n:ge({opacity:s,isSelected:!1,object:o,objectInfo:i,originalFillFunction:r})||a})({isSelected:l.includes(t.index),object:e,objectInfo:t,originalFillFunction:r,selectedColor:n,unselectedColor:a})})),c}))}return null===e||void 0===e||delete e.views,q.convert(e)}),[p.selection.indices,y,m,a,C,A,g,s.colors.gray20,s.colors.primary,w]);(0,i.useEffect)((()=>{if(!V()(F.initialViewState,S)){const e=Object.keys(F.initialViewState).reduce(((e,t)=>F.initialViewState[t]===S[t]?e:{...e,[t]:F.initialViewState[t]}),{});v({...f,...e}),x(F.initialViewState)}}),[F.initialViewState,S,f]);const M=(0,i.useCallback)((e=>{if(!e||!e.object||!u)return null;const t=I.A.parse(u);return t.html?t.html=pe(e,t.html):t.text=pe(e,t.text),t}),[u]),T=(0,i.useCallback)((e=>{let{viewState:t}=e;v(t)}),[v]);return{createTooltip:M,data:p,deck:F,hasActiveSelection:k,height:y,isSelectionModeActivated:C,onViewStateChange:T,selectionMode:j,setSelection:b,viewState:f,width:w}};o(93298);(0,s.mk)([l.y,a.B]);const we=me.selection,Se=[],xe=M("st.pydeck_chart")((0,g.A)((e=>{const{collapse:t,disabled:o,disableFullscreenMode:l,element:a,expand:s,fragmentId:g,height:p,isFullScreen:b,mapboxToken:f,widgetMgr:v,width:y}=e,{mapboxToken:w}=a,S=(0,c.u)(),{createTooltip:j,data:C,deck:k,hasActiveSelection:A,height:F,isSelectionModeActivated:M,onViewStateChange:T,selectionMode:I,setSelection:O,viewState:V,width:$}=ye({element:a,fragmentId:g,height:p,isFullScreen:b,isLightTheme:(0,h.iq)(S),theme:S,widgetMgr:v,width:y}),[W,D]=(0,i.useState)(!1);(0,i.useEffect)((()=>{D(!0)}),[]);const U=(0,i.useCallback)((e=>{var t;if(void 0===I)return;const{index:o,object:i}=e,r=`${(null===(t=e.layer)||void 0===t?void 0:t.id)||null}`,n=C,l=-1===o,a=(()=>{if(l)return we;switch(I){case m.Xw.SelectionMode.SINGLE_OBJECT:var e;return(null===(e=n.selection.indices[r])||void 0===e?void 0:e[0])===o?we:{indices:{[`${r}`]:[o]},objects:{[`${r}`]:[i]}};case m.Xw.SelectionMode.MULTI_OBJECT:{const e=new Map(((null===n||void 0===n||null===(t=n.selection)||void 0===t||null===(a=t.indices)||void 0===a?void 0:a[r])||[]).map(((e,t)=>{var o,i,l;return[e,null===(o=n.selection)||void 0===o||null===(i=o.objects)||void 0===i||null===(l=i[r])||void 0===l?void 0:l[t]]})));if(e.has(o)?e.delete(o):e.set(o,i),0===e.size){const{[r]:e,...t}=n.selection.indices,{[r]:o,...i}=n.selection.objects;return{indices:t,objects:i}}return{indices:{...n.selection.indices,[`${r}`]:Array.from(e.keys())},objects:{...n.selection.objects,[`${r}`]:Array.from(e.values())}}}default:throw(e=>{throw new Error(`Reached a branch with non-exhaustive item: ${e}`)})(I),new Error("Invalid selection mode")}var t,a})();JSON.stringify(a)!==JSON.stringify(n.selection)&&O({fromUi:!0,value:{selection:a}})}),[I,C,O]),P=(0,i.useCallback)((()=>{O({value:{selection:we},fromUi:!0})}),[O]);return(0,x.jsxs)(N,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",width:$,height:F,children:[(0,x.jsx)(u.A,{isFullScreen:b,disableFullscreenMode:l,onExpand:s,onCollapse:t,target:N,locked:!(!A||o)||void 0,children:A&&!o&&(0,x.jsx)(u.K,{label:"Clear selection",onClick:P,icon:d.b})}),(0,x.jsxs)(r.A,{viewState:V,onViewStateChange:T,height:F,width:$,layers:W?k.layers:Se,getTooltip:j,ContextProvider:n.wZ.Provider,controller:!0,onClick:M&&!o?U:void 0,children:[(0,x.jsx)(n.b,{height:F,width:$,mapStyle:k.mapStyle&&("string"===typeof k.mapStyle?k.mapStyle:k.mapStyle[0]),mapboxApiAccessToken:w||f}),(0,x.jsx)(E,{children:(0,x.jsx)(n.ov,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})}),!0))},3101:(e,t,o)=>{"use strict";o.d(t,{_:()=>l,t:()=>a});var i=o(58878),r=o(34752),n=o(25571);function l(e){let{getStateFromWidgetMgr:t,getDefaultState:o,updateWidgetMgrState:l,element:a,widgetMgr:s,fragmentId:c}=e;const[d,h]=(0,i.useState)((()=>{var e;return null!==(e=t(s,a))&&void 0!==e?e:o(s,a)})),[u,g]=(0,i.useState)({value:d,fromUi:!1});(0,i.useEffect)((()=>{(0,n.hX)(u)||(g(null),h(u.value),l(a,s,u,c))}),[u,l,a,s,c]);const m=(0,i.useCallback)((()=>{g({value:o(s,a),fromUi:!0})}),[g,a,o,s]);return(0,r.X)({widgetMgr:s,element:a,onFormCleared:m}),[d,g]}function a(e){let{getStateFromWidgetMgr:t,getDefaultStateFromProto:o,getCurrStateFromProto:r,updateWidgetMgrState:n,element:a,widgetMgr:s,fragmentId:c}=e;const d=(0,i.useCallback)(((e,t)=>o(t)),[o]),[h,u]=l({getStateFromWidgetMgr:t,getDefaultState:d,updateWidgetMgrState:n,element:a,widgetMgr:s,fragmentId:c});return(0,i.useEffect)((()=>{a.setValue&&(a.setValue=!1,u({value:r(a),fromUi:!1}))}),[a,r,u]),[h,u]}},63872:()=>{},35111:()=>{}}]);