PageSourceSearch

https://saragadamkalyan-realtime-multimodal-frontend.hf.space/static/js/223.7f54d4fe.chunk.js

js saragadamkalyan-realtime-multimodal-frontend.hf.space collected 2026-10-03 17:21:10 UTC 13,498 bytes, 1 lines download raw bytes

vendor: 13,498 bytes, line 1
1"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[223],{40223:(e,t,o)=>{o.r(t),o.d(t,{default:()=>ke});var i=o(58878),r=o(86411),n=o(83614),l=o(34679),a=o(93594),s=o(78477),c=o(8151),d=o(68994),h=o(16795),u=o(29669);var g=o(70691),m=o(59323),p=o(4494),f=o(75760),b=o(53124),v=o.n(b),y=o(32782),x=o(67253),C=o(1780),w=o(84152),S=o(6240),j=o(1637),k=o(90782);const F=e=>{let{error:t,width:o,deltaType:i}=e;return t instanceof M?(0,k.jsx)(S.A,{width:o,name:"No Mapbox token provided",message:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("p",{children:["To use ",(0,k.jsxs)(j.m7,{children:["st.",i]})," or"," ",(0,k.jsx)(j.m7,{children:"st.map"})," you need to set up a Mapbox access token."]}),(0,k.jsxs)("p",{children:["To get a token, create an account at"," ",(0,k.jsx)("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),(0,k.jsxs)("p",{children:["Once you have a token, just set it using the Streamlit config option ",(0,k.jsx)(j.m7,{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,k.jsxs)("p",{children:["See"," ",(0,k.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 A?(0,k.jsx)(S.A,{width:o,name:"Error fetching Streamlit Mapbox token",message:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("p",{children:"This app requires an internet connection."}),(0,k.jsx)("p",{children:"Please check your connection and try again."}),(0,k.jsxs)("p",{children:["If you think this is a bug, please file bug report"," ",(0,k.jsx)("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):(0,k.jsx)(S.A,{width:o,name:"Error fetching Streamlit Mapbox token",message:t.message})};class M extends Error{}class A extends Error{}const T="https://data.streamlit.io/tokens.json",E="mapbox",N=e=>t=>{class o extends i.PureComponent{constructor(o){super(o),this.context=void 0,this.initMapboxToken=async()=>{try{const e=await y.A.get(T),{[E]:t}=e.data;if(!t)throw new Error(`Missing token ${E}`);this.setState({mapboxToken:t,isFetching:!1})}catch(e){const t=(0,x.$)(e);throw this.setState({mapboxTokenError:t,isFetching:!1}),new A(`${t.message} (${T})`)}},this.render=()=>{const{mapboxToken:o,mapboxTokenError:i,isFetching:r}=this.state,{width:n}=this.props;return i?(0,k.jsx)(F,{width:n,error:i,deltaType:e}):r?(0,k.jsx)(C.E,{element:u.EA.create({style:u.EA.SkeletonStyle.ELEMENT})}):(0,k.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,v()(o,t)};var I=o(89653);const O=(0,I.A)("div",{target:"e1az0zs51"})((e=>{let{width:t,height:o}=e;return{position:"relative",height:o,width:t}}),""),L=(0,I.A)("div",{target:"e1az0zs50"})((e=>{let{theme:t}=e;return{position:"absolute",right:"2.625rem",top:t.spacing.md,zIndex:t.zIndices.priority,".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:t.colors.darkenedBgMix25},"& span":{filter:(0,h.iq)(t)?"":"invert(100%)"}}}}),"");var W=o(21640),V=o(71034),$=o.n(V),_=o(32735);var D=o(3101),U=o(71279),z=o(95237),P=o(19507),J=o(89428),B=o(28246),X=o(54340),G=o(66643);const q={classes:{...B,...o(43539),...G,...o(41260),...U.bE},functions:{colorBins:z.A,colorCategories:P.A,colorContinuous:J.A}},Z=new X.A({configuration:q});var K=o(39017),R=o(86044),H=o(94514),Q=o(10623),Y=o(55296),ee=o(97091),te=o(25479),oe=o(16249),ie=o(46909),re=o(56605),ne=o(48754),le=o(16389),ae=o(57741),se=o(82111),ce=o(40973),de=o(34632),he=o(34895),ue=o(77277),ge=o(39481),me=o(47605);const pe={[le.A.layerName]:["getFillColor"],[ae.A.layerName]:["getFillColor"],[se.A.layerName]:["getFillColor"],[ce.A.layerName]:["getFillColor"],[de.A.layerName]:["getFillColor"],[he.A.layerName]:["getFillColor"],[ue.A.layerName]:["getColor"],[K.A.layerName]:["getTargetColor","getSourceColor"],[R.A.layerName]:["getFillColor"],[H.A.layerName]:["getFillColor"],[Q.A.layerName]:["getColor"],[Y.A.layerName]:["getColor"],[ee.A.layerName]:["getColor"],[te.A.layerName]:["getColor"],[oe.A.layerName]:["getFillColor"],[ie.A.layerName]:["getFillColor","getColor","getLineColor"],[re.A.layerName]:["getFillColor"],[ne.A.layerName]:["getColor"],[ge.A.layerName]:["getColor"],[me.A.layerName]:["getColor"]},fe=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=Z.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]},be={selection:{indices:{},objects:{}}},ve=(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 ye(e,t){if(!t.id)return be;const o=e.getElementState(t.id,"selection");return null!==o&&void 0!==o?o:be}function xe(e,t){if(!t.id)return be;const o=e.getStringValue(t),i=o?W.A.parse(o):null;return null!==i&&void 0!==i?i:be}function Ce(e,t,o,i){e.id&&t.setStringValue(e,JSON.stringify(o.value),{fromUi:o.fromUi},i)}const we=e=>{var t;const{height:o,width:r,expanded:n}=(0,m.i)(p.T),{element:l,fragmentId:a,isLightTheme:s,theme:c,widgetMgr:d}=e,{selectionMode:h,tooltip:u,useContainerWidth:g}=l,f=null!==n&&void 0!==n&&n,[b,v]=(0,D._)({element:l,getDefaultState:ye,getStateFromWidgetMgr:xe,updateWidgetMgrState:Ce,widgetMgr:d,fragmentId:a}),[y,x]=(0,i.useState)({bearing:0,pitch:0,zoom:11}),{height:C,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:l,isFullScreen:f,shouldUseContainerWidth:g,container:{height:o,width:r},heightFallback:(null===(t=y.initialViewState)||void 0===t?void 0:t.height)||500}),[S,j]=(0,i.useState)({}),k=h[0],F=void 0!==k,M=F&&Object.keys(b.selection.indices).length>0,A=(0,i.useMemo)((()=>Object.freeze(W.A.parse(l.json))),[f,s,l.json]),T=(0,i.useMemo)((()=>{const e={...A};if(e.mapStyle||(e.mapStyle=`mapbox://styles/mapbox/${s?"light":"dark"}-v9`),e.layers){const t=Object.values(b.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)||!F)return e;o||(e.pickable=!0);const n=`${e.id||null}`,l=(null===b||void 0===b||null===(i=b.selection)||void 0===i||null===(r=i.indices)||void 0===r?void 0:r[n])||[],a=pe[e["@@type"]];if(!a)return e;const s={...e};return a.forEach((o=>{var i;s.updateTriggers={[o]:[...(null===(i=s.updateTriggers)||void 0===i?void 0:i[o])||[],l,t]};const r=!t,n=e[o];if(r||!n)return s;const a=Math.floor(102),d=(0,_.Du)(c.colors.primary),h=[d[0],d[1],d[2],255],u=(0,_.Du)(c.colors.gray20),g=[u[0],u[1],u[2],a];s[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?fe({opacity:l,isSelected:!0,object:o,objectInfo:i,originalFillFunction:r})||n:fe({opacity:s,isSelected:!1,object:o,objectInfo:i,originalFillFunction:r})||a})({isSelected:l.includes(t.index),object:e,objectInfo:t,originalFillFunction:n,selectedColor:h,unselectedColor:g,selectedOpacity:255,unselectedOpacity:a})})),s}))}return null===e||void 0===e||delete e.views,Z.convert(e)}),[b.selection.indices,s,F,A,c.colors.gray20,c.colors.primary]);(0,i.useEffect)((()=>{if(!$()(T.initialViewState,S)){const e=Object.keys(T.initialViewState).reduce(((e,t)=>T.initialViewState[t]===S[t]?e:{...e,[t]:T.initialViewState[t]}),{});x({...y,...e}),j(T.initialViewState)}}),[T.initialViewState,S,y]);const E=(0,i.useCallback)((e=>{if(!e||!e.object||!u)return null;const t=W.A.parse(u);return t.html?t.html=ve(e,t.html):t.text=ve(e,t.text),t}),[u]),N=(0,i.useCallback)((e=>{let{viewState:t}=e;x(t)}),[x]);return{createTooltip:E,data:b,deck:T,hasActiveSelection:M,height:C,isSelectionModeActivated:F,onViewStateChange:N,selectionMode:k,setSelection:v,viewState:y,width:w}};o(93298);(0,s.mk)([l.y,a.B]);const Se=be.selection,je=[],ke=(0,f.A)(N("st.pydeck_chart")((e=>{const{disabled:t,disableFullscreenMode:o,element:l,fragmentId:a,mapboxToken:s,widgetMgr:f}=e,{mapboxToken:b}=l,v=(0,c.u)(),{expanded:y,expand:x,collapse:C}=(0,m.i)(p.T),{createTooltip:w,data:S,deck:j,hasActiveSelection:F,height:M,isSelectionModeActivated:A,onViewStateChange:T,selectionMode:E,setSelection:N,viewState:I,width:W}=we({element:l,fragmentId:a,isLightTheme:(0,h.iq)(v),theme:v,widgetMgr:f}),[V,$]=(0,i.useState)(!1);(0,i.useEffect)((()=>{$(!0)}),[]);const _=(0,i.useCallback)((e=>{var t;if(void 0===E)return;const{index:o,object:i}=e,r=`${(null===(t=e.layer)||void 0===t?void 0:t.id)||null}`,n=S,l=-1===o,a=(()=>{if(l)return Se;switch(E){case u.Xw.SelectionMode.SINGLE_OBJECT:var e;return(null===(e=n.selection.indices[r])||void 0===e?void 0:e[0])===o?Se:{indices:{[`${r}`]:[o]},objects:{[`${r}`]:[i]}};case u.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}`)})(E),new Error("Invalid selection mode")}var t,a})();JSON.stringify(a)!==JSON.stringify(n.selection)&&N({fromUi:!0,value:{selection:a}})}),[E,S,N]),D=(0,i.useCallback)((()=>{N({value:{selection:Se},fromUi:!0})}),[N]);return(0,k.jsxs)(O,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",width:W,height:M,children:[(0,k.jsx)(g.A,{isFullScreen:y,disableFullscreenMode:o,onExpand:x,onCollapse:C,target:O,locked:!(!F||t)||void 0,children:F&&!t&&(0,k.jsx)(g.K,{label:"Clear selection",onClick:D,icon:d.b})}),(0,k.jsxs)(r.A,{viewState:I,onViewStateChange:T,height:M,width:W,layers:V?j.layers:je,getTooltip:w,ContextProvider:n.wZ.Provider,controller:!0,onClick:A&&!t?_:void 0,children:[(0,k.jsx)(n.b,{height:M,width:W,mapStyle:j.mapStyle&&("string"===typeof j.mapStyle?j.mapStyle:j.mapStyle[0]),mapboxApiAccessToken:b||s}),(0,k.jsx)(L,{children:(0,k.jsx)(n.ov,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})})))},34752:(e,t,o)=>{o.d(t,{X:()=>l,o:()=>n});var i=o(58878),r=o(25571);class n{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,o){(0,r.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,r._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,o),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function l(e){let{element:t,widgetMgr:o,onFormCleared:n}=e;(0,i.useEffect)((()=>{if(!(0,r._L)(t.formId))return;const e=o.addFormClearedListener(t.formId,n);return()=>{e.disconnect()}}),[t,o,n])}},3101:(e,t,o)=>{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,onFormCleared:d}=e;const[h,u]=(0,i.useState)((()=>{var e;return null!==(e=t(s,a))&&void 0!==e?e:o(s,a)})),[g,m]=(0,i.useState)({value:h,fromUi:!1});(0,i.useEffect)((()=>{(0,n.hX)(g)||(m(null),u(g.value),l(a,s,g,c))}),[g,l,a,s,c]);const p=(0,i.useCallback)((()=>{m({value:o(s,a),fromUi:!0}),null===d||void 0===d||d()}),[m,a,o,s,d]);return(0,r.X)({widgetMgr:s,element:a,onFormCleared:p}),[h,m]}function a(e){let{getStateFromWidgetMgr:t,getDefaultStateFromProto:o,getCurrStateFromProto:r,updateWidgetMgrState:n,element:a,widgetMgr:s,fragmentId:c,onFormCleared:d}=e;const h=(0,i.useCallback)(((e,t)=>o(t)),[o]),[u,g]=l({getStateFromWidgetMgr:t,getDefaultState:h,updateWidgetMgrState:n,element:a,widgetMgr:s,fragmentId:c,onFormCleared:d});return(0,i.useEffect)((()=>{a.setValue&&(a.setValue=!1,g({value:r(a),fromUi:!1}))}),[a,r,g]),[u,g]}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.