streamlit-nightly 1.37.2.dev20240814__py2.py3-none-any.whl → 1.37.2.dev20240815__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/commands/execution_control.py +1 -4
- streamlit/commands/experimental_query_params.py +1 -1
- streamlit/commands/logo.py +1 -1
- streamlit/commands/navigation.py +1 -1
- streamlit/commands/page_config.py +1 -1
- streamlit/components/v1/component_registry.py +1 -1
- streamlit/components/v1/custom_component.py +1 -1
- streamlit/cursor.py +1 -1
- streamlit/dataframe_util.py +91 -0
- streamlit/elements/arrow.py +1 -1
- streamlit/elements/json.py +1 -2
- streamlit/elements/lib/dialog.py +1 -1
- streamlit/elements/lib/mutable_status_container.py +1 -1
- streamlit/elements/lib/policies.py +1 -1
- streamlit/elements/media.py +3 -5
- streamlit/elements/plotly_chart.py +1 -1
- streamlit/elements/vega_charts.py +1 -1
- streamlit/elements/widgets/button.py +7 -4
- streamlit/elements/widgets/button_group.py +1 -1
- streamlit/elements/widgets/chat.py +1 -1
- streamlit/elements/widgets/data_editor.py +1 -1
- streamlit/error_util.py +10 -8
- streamlit/navigation/page.py +1 -1
- streamlit/platform.py +1 -1
- streamlit/runtime/caching/cache_data_api.py +1 -1
- streamlit/runtime/caching/cache_resource_api.py +1 -1
- streamlit/runtime/caching/cached_message_replay.py +1 -1
- streamlit/runtime/context.py +6 -5
- streamlit/runtime/forward_msg_queue.py +18 -1
- streamlit/runtime/fragment.py +7 -5
- streamlit/runtime/media_file_manager.py +3 -1
- streamlit/runtime/metrics_util.py +2 -7
- streamlit/runtime/scriptrunner/__init__.py +7 -4
- streamlit/runtime/scriptrunner/exec_code.py +6 -3
- streamlit/runtime/scriptrunner/script_runner.py +10 -9
- streamlit/runtime/scriptrunner_utils/__init__.py +19 -0
- streamlit/runtime/{scriptrunner → scriptrunner_utils}/exceptions.py +1 -1
- streamlit/runtime/{scriptrunner → scriptrunner_utils}/script_requests.py +61 -6
- streamlit/runtime/{scriptrunner → scriptrunner_utils}/script_run_context.py +1 -1
- streamlit/runtime/state/__init__.py +0 -2
- streamlit/runtime/state/common.py +1 -1
- streamlit/runtime/state/query_params.py +1 -6
- streamlit/runtime/state/session_state.py +1 -5
- streamlit/runtime/state/session_state_proxy.py +3 -1
- streamlit/runtime/state/widgets.py +0 -59
- streamlit/static/asset-manifest.json +17 -17
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{1168.2a7e18da.chunk.js → 1168.2a9806f0.chunk.js} +1 -1
- streamlit/static/static/js/{1451.3d44ca81.chunk.js → 1451.d93e956f.chunk.js} +1 -1
- streamlit/static/static/js/{178.7bea8c5d.chunk.js → 178.ddebe26b.chunk.js} +1 -1
- streamlit/static/static/js/2469.6217c5c3.chunk.js +1 -0
- streamlit/static/static/js/{2634.1249dc7a.chunk.js → 2634.4e2535ee.chunk.js} +1 -1
- streamlit/static/static/js/{2736.dcbc9141.chunk.js → 2736.3d50ec7f.chunk.js} +1 -1
- streamlit/static/static/js/{3301.45709e64.chunk.js → 3301.7379a9fd.chunk.js} +5 -5
- streamlit/static/static/js/4113.786b0142.chunk.js +1 -0
- streamlit/static/static/js/4500.d884c792.chunk.js +1 -0
- streamlit/static/static/js/6853.a1c4fa00.chunk.js +1 -0
- streamlit/static/static/js/{7602.2331daf7.chunk.js → 7602.33571c14.chunk.js} +1 -1
- streamlit/static/static/js/7805.ba32ae70.chunk.js +1 -0
- streamlit/static/static/js/8148.b905db99.chunk.js +1 -0
- streamlit/static/static/js/8427.b1a68937.chunk.js +1 -0
- streamlit/static/static/js/{9330.2b4c99e0.chunk.js → 9330.32e8a53a.chunk.js} +1 -1
- streamlit/static/static/js/main.90c4efd0.js +28 -0
- streamlit/testing/v1/local_script_runner.py +1 -1
- streamlit/user_info.py +4 -2
- streamlit/web/server/stats_request_handler.py +1 -3
- streamlit/web/server/websocket_headers.py +1 -1
- {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240815.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240815.dist-info}/RECORD +74 -73
- streamlit/static/static/js/2469.4bb197dd.chunk.js +0 -1
- streamlit/static/static/js/4113.ca4d2d7b.chunk.js +0 -1
- streamlit/static/static/js/4500.c007e274.chunk.js +0 -1
- streamlit/static/static/js/6853.5d19f25b.chunk.js +0 -1
- streamlit/static/static/js/7805.f7c8d475.chunk.js +0 -1
- streamlit/static/static/js/8148.7805e73f.chunk.js +0 -1
- streamlit/static/static/js/8427.69ce2c45.chunk.js +0 -1
- streamlit/static/static/js/main.b519dd78.js +0 -28
- /streamlit/static/static/js/{main.b519dd78.js.LICENSE.txt → main.90c4efd0.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.37.2.dev20240814.data → streamlit_nightly-1.37.2.dev20240815.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240815.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240815.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240815.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8148],{23593:(e,t,n)=>{n.d(t,{Z:()=>b});var i=n(66845),o=n(13005),r=n.n(o),l=n(25621),a=n(82218),s=n(97781),d=n(46927),c=n(66694),u=n(1515);const m=(0,u.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const i=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...i,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),h=(0,u.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[m]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var p=n(40864);class g extends i.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels("2.875rem");return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:i,width:o,height:r,disableFullscreenMode:l}=this.props;let c=a.d,u=this.zoomIn,g="View fullscreen";return e&&(c=s.m,u=this.zoomOut,g="Exit fullscreen"),(0,p.jsxs)(h,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!l&&(0,p.jsx)(m,{"data-testid":"StyledFullScreenButton",onClick:u,title:g,isExpanded:e,children:(0,p.jsx)(d.Z,{content:c})}),i(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:o,height:r,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=c.E;const f=(0,l.b)(g);const b=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends i.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:i,disableFullscreenMode:o}=this.props;return(0,p.jsx)(f,{width:n,height:i,disableFullscreenMode:t||o,children:t=>{let{width:n,height:i,expanded:o,expand:r,collapse:l}=t;return(0,p.jsx)(e,{...this.props,width:n,height:i,isFullScreen:o,expand:r,collapse:l})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,r()(n,e)}},75064:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Vt});var i=n(66845),o=n(67930),r=n(78170),l=n(17330),a=n(20545),s=n(57463),d=n(97943),c=n(41342),u=n(17875),m=n(87814),h=n(23593),p=n(16295),g=n(50641),f=n(25621),b=n(34367),v=n(31011),y=n(12596),w=n(68411),x=n(9003),C=n(81354),E=n(46927),S=n(1515),M=n(27466);const k="-2.4rem",T=(0,S.Z)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:n,target:i}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:n?k:"-1rem",right:t.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:k},...i&&{[`${i}:hover &, ${i}:active &, ${i}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:k}}}}}),""),R=(0,S.Z)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,M.Iy)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var I=n(40864);function N(e){let{label:t,show_label:n,icon:i,onClick:o}=e;const r=(0,f.u)(),l=n?t:"";return(0,I.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,I.jsx)(w.Z,{content:(0,I.jsx)(y.ZP,{source:t,allowHTML:!1,style:{fontSize:r.fontSizes.sm}}),placement:w.u.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,I.jsxs)(x.ZP,{onClick:e=>{o&&o(),e.stopPropagation()},kind:C.nW.ELEMENT_TOOLBAR,children:[i&&(0,I.jsx)(E.Z,{content:i,size:"md",testid:"stElementToolbarButtonIcon"}),l&&(0,I.jsx)("span",{children:l})]})})})}const _=e=>{let{onExpand:t,onCollapse:n,isFullScreen:i,locked:o,children:r,target:l,disableFullscreenMode:a}=e;return(0,I.jsx)(T,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:o||i,target:l,children:(0,I.jsxs)(R,{children:[r,t&&!a&&!i&&(0,I.jsx)(N,{label:"Fullscreen",icon:b.i,onClick:()=>t()}),n&&!a&&i&&(0,I.jsx)(N,{label:"Close fullscreen",icon:v.m,onClick:()=>n()})]})})};var O=n(66694),D=n(38145),A=n.n(D),F=n(96825),z=n.n(F),$=n(29724),V=n.n($),L=n(52347),H=n(25267),W=n.n(H),j=(n(87717),n(35848)),B=n.n(j),P=n(91191);const Z=["true","t","yes","y","on","1"],Y=["false","f","no","n","off","0"];function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=`\u26a0\ufe0f ${e}`,{kind:o.p6.Text,readonly:!0,allowOverlay:!0,data:e+(t?`\n\n${t}\n`:""),displayData:e,isError:!0}}function q(e){return e.hasOwnProperty("isError")&&e.isError}function J(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function K(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?{kind:o.p6.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:o.p6.Loading,allowOverlay:!1}}function G(e,t){const n=t?"faded":"normal";return{kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function X(e){return{id:e.id,title:e.title,hasMenu:!1,themeOverride:e.themeOverride,icon:e.icon,...e.isStretched&&{grow:e.isIndex?1:3},...e.width&&{width:e.width}}}function Q(e,t){return(0,g.le)(e)?t||{}:(0,g.le)(t)?e||{}:z()(e,t)}function ee(e){if((0,g.le)(e))return[];if("number"===typeof e||"boolean"===typeof e)return[e];if("string"===typeof e){if(""===e)return[];if(!e.trim().startsWith("[")||!e.trim().endsWith("]"))return e.split(",");try{return JSON.parse(e)}catch(t){return[e]}}try{const t=JSON.parse(JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t)));return Array.isArray(t)?t.map((e=>["string","number","boolean","null"].includes(typeof e)?e:te(e))):[te(t)]}catch(t){return[te(e)]}}function te(e){try{try{return A()(e)}catch(t){return JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t))}}catch(t){return`[${typeof e}]`}}function ne(e){if((0,g.le)(e))return null;if("boolean"===typeof e)return e;const t=te(e).toLowerCase().trim();return""===t?null:!!Z.includes(t)||!Y.includes(t)&&void 0}function ie(e){if((0,g.le)(e))return null;if(Array.isArray(e))return NaN;if("string"===typeof e){if(0===e.trim().length)return null;try{const t=V().unformat(e.trim());if((0,g.bb)(t))return t}catch(t){}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function oe(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":(0,g.le)(t)||""===t?(0===n&&(e=Math.round(e)),V()(e).format((0,g.bb)(n)?`0,0.${"0".repeat(n)}`:"0,0.[0000]")):"percent"===t?new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e):["compact","scientific","engineering"].includes(t)?new Intl.NumberFormat(void 0,{notation:t}).format(e):"duration[ns]"===t?W().duration(e/1e6,"milliseconds").humanize():t.startsWith("period[")?P.fu.formatPeriodType(BigInt(e),t):(0,L.sprintf)(t,e)}function re(e,t){return"locale"===t?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"medium"}).format(e.toDate()):"distance"===t?e.fromNow():"relative"===t?e.calendar():e.format(t)}function le(e){if((0,g.le)(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if("string"===typeof e&&0===e.trim().length)return null;try{const t=Number(e);if(!isNaN(t)){let e=t;t>=10**18?e=t/1e3**3:t>=10**15?e=t/1e6:t>=10**12&&(e=t/1e3);const n=W().unix(e).utc();if(n.isValid())return n.toDate()}if("string"===typeof e){const t=W().utc(e);if(t.isValid())return t.toDate();const n=W().utc(e,[W().HTML5_FMT.TIME_MS,W().HTML5_FMT.TIME_SECONDS,W().HTML5_FMT.TIME]);if(n.isValid())return n.toDate()}}catch(t){return}}function ae(e){if(e%1===0)return 0;let t=e.toString();return-1!==t.indexOf("e")&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),-1===t.indexOf(".")?0:t.split(".")[1].length}const se=new RegExp(/(\r\n|\n|\r)/gm);function de(e){return-1!==e.indexOf("\n")?e.replace(se," "):e}var ce=n(23849);function ue(e){const t={kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!0,style:e.isIndex?"faded":"normal"};return{...e,kind:"object",sortMode:"default",isEditable:!1,getCell(e){try{const n=(0,g.bb)(e)?te(e):null,i=(0,g.bb)(n)?de(n):"";return{...t,data:n,displayData:i,isMissingValue:(0,g.le)(e)}}catch(n){return U(te(e),`The value cannot be interpreted as a string. Error: ${n}`)}},getCellValue:e=>void 0===e.data?null:e.data}}ue.isEditableType=!1;const me=ue;function he(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(l){n=`Invalid validate regex: ${t.validate}.\nError: ${l}`}const i={kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"},r=i=>{if((0,g.le)(i))return!e.isRequired;let o=te(i),r=!1;return t.max_chars&&o.length>t.max_chars&&(o=o.slice(0,t.max_chars),r=!0),!(n instanceof RegExp&&!1===n.test(o))&&(!r||o)};return{...e,kind:"text",sortMode:"default",validateInput:r,getCell(e,t){if("string"===typeof n)return U(te(e),n);if(t){const t=r(e);if(!1===t)return U(te(e),"Invalid input.");"string"===typeof t&&(e=t)}try{const t=(0,g.bb)(e)?te(e):null,n=(0,g.bb)(t)?de(t):"";return{...i,isMissingValue:(0,g.le)(t),data:t,displayData:n}}catch(l){return U("Incompatible value",`The value cannot be interpreted as string. Error: ${l}`)}},getCellValue:e=>void 0===e.data?null:e.data}}he.isEditableType=!0;const pe=he;function ge(e,t){return e=t.startsWith("+")||t.startsWith("-")?e.utcOffset(t,!1):e.tz(t)}function fe(e,t,n,i,r,l,a){var s;const d=Q({format:n,step:i,timezone:a},t.columnTypeOptions);let c,u,m;if((0,g.bb)(d.timezone))try{var h;c=(null===(h=ge(B()(),d.timezone))||void 0===h?void 0:h.utcOffset())||void 0}catch(b){}(0,g.bb)(d.min_value)&&(u=le(d.min_value)||void 0),(0,g.bb)(d.max_value)&&(m=le(d.max_value)||void 0);const p={kind:o.p6.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isIndex?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:(null===(s=d.step)||void 0===s?void 0:s.toString())||"1",format:r,min:u,max:m}},f=e=>{const n=le(e);return null===n?!t.isRequired:void 0!==n&&(!((0,g.bb)(u)&&l(n)<l(u))&&!((0,g.bb)(m)&&l(n)>l(m)))};return{...t,kind:e,sortMode:"default",validateInput:f,getCell(e,t){if(!0===t){const t=f(e);if(!1===t)return U(te(e),"Invalid input.");t instanceof Date&&(e=t)}const i=le(e);let o="",r="",l=c;if(void 0===i)return U(te(e),"The value cannot be interpreted as a datetime object.");if(null!==i){let e=B().utc(i);if(!e.isValid())return U(te(i),`This should never happen. Please report this bug. \nError: ${e.toString()}`);if(d.timezone){try{e=ge(e,d.timezone)}catch(b){return U(e.toISOString(),`Failed to adjust to the provided timezone: ${d.timezone}. \nError: ${b}`)}l=e.utcOffset()}try{r=re(e,d.format||n)}catch(b){return U(e.toISOString(),`Failed to format the date for rendering with: ${d.format}. \nError: ${b}`)}o=re(e,n)}return{...p,copyData:o,isMissingValue:(0,g.le)(i),data:{...p.data,date:i,displayDate:r,timezoneOffset:l}}},getCellValue(e){var t;return(0,g.le)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.date)?null:l(e.data.date)}}}function be(e){var t,n,i,o,r;let l="YYYY-MM-DD HH:mm:ss";(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?l="YYYY-MM-DD HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(l="YYYY-MM-DD HH:mm:ss.SSS");const a=null===(i=e.arrowType)||void 0===i||null===(o=i.meta)||void 0===o?void 0:o.timezone,s=(0,g.bb)(a)||(0,g.bb)(null===e||void 0===e||null===(r=e.columnTypeOptions)||void 0===r?void 0:r.timezone);return fe("datetime",e,s?l+"Z":l,1,"datetime-local",(e=>s?e.toISOString():e.toISOString().replace("Z","")),a)}function ve(e){var t,n;let i="HH:mm:ss";return(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?i="HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(i="HH:mm:ss.SSS"),fe("time",e,i,1,"time",(e=>e.toISOString().split("T")[1].replace("Z","")))}function ye(e){return fe("date",e,"YYYY-MM-DD",1,"date",(e=>e.toISOString().split("T")[0]))}function we(e){const t={kind:o.p6.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(e){let n=null;return n=ne(e),void 0===n?U(te(e),"The value cannot be interpreted as boolean."):{...t,data:n,isMissingValue:(0,g.le)(n)}},getCellValue:e=>void 0===e.data?null:e.data}}be.isEditableType=!0,ve.isEditableType=!0,ye.isEditableType=!0,we.isEditableType=!0;const xe=we;function Ce(e){return e.startsWith("int")&&!e.startsWith("interval")||"range"===e||e.startsWith("uint")}function Ee(e){const t=P.fu.getTypeName(e.arrowType);let n;"timedelta64[ns]"===t?n="duration[ns]":t.startsWith("period[")&&(n=t);const i=Q({step:Ce(t)?1:void 0,min_value:t.startsWith("uint")?0:void 0,format:n},e.columnTypeOptions),r=(0,g.le)(i.min_value)||i.min_value<0,l=(0,g.bb)(i.step)&&!Number.isNaN(i.step)?ae(i.step):void 0,a={kind:o.p6.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||"right",style:e.isIndex?"faded":"normal",allowNegative:r,fixedDecimals:l,thousandSeparator:""},s=t=>{let n=ie(t);if((0,g.le)(n))return!e.isRequired;if(Number.isNaN(n))return!1;let o=!1;return(0,g.bb)(i.max_value)&&n>i.max_value&&(n=i.max_value,o=!0),!((0,g.bb)(i.min_value)&&n<i.min_value)&&(!o||n)};return{...e,kind:"number",sortMode:"smart",validateInput:s,getCell(e,t){if(!0===t){const t=s(e);if(!1===t)return U(te(e),"Invalid input.");"number"===typeof t&&(e=t)}let n=ie(e),o="";if((0,g.bb)(n)){if(Number.isNaN(n))return U(te(e),"The value cannot be interpreted as a number.");if((0,g.bb)(l)&&(r=n,n=0===(d=l)?Math.trunc(r):Math.trunc(r*10**d)/10**d),Number.isInteger(n)&&!Number.isSafeInteger(n))return U(te(e),"The value is larger than the maximum supported integer values in number columns (2^53).");try{o=oe(n,i.format,l)}catch(c){return U(te(n),(0,g.bb)(i.format)?`Failed to format the number based on the provided format configuration: (${i.format}). Error: ${c}`:`Failed to format the number. Error: ${c}`)}}var r,d;return{...a,data:n,displayData:o,isMissingValue:(0,g.le)(n),copyData:(0,g.le)(n)?"":te(n)}},getCellValue:e=>void 0===e.data?null:e.data}}Ee.isEditableType=!0;const Se=Ee;function Me(e){let t="string";const n=Q({options:"bool"===P.fu.getTypeName(e.arrowType)?[!0,!1]:[]},e.columnTypeOptions),i=new Set(n.options.map((e=>typeof e)));1===i.size&&(i.has("number")||i.has("bigint")?t="number":i.has("boolean")&&(t="boolean"));const r={kind:o.p6.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal",data:{kind:"dropdown-cell",allowedValues:[...!0!==e.isRequired?[null]:[],...n.options.filter((e=>null!==e&&""!==e)).map((e=>te(e)))],value:""}};return{...e,kind:"selectbox",sortMode:"default",getCell(e,t){let n=null;return(0,g.bb)(e)&&""!==e&&(n=te(e)),t&&!r.data.allowedValues.includes(n)?U(te(n),"The value is not part of the allowed options."):{...r,isMissingValue:null===n,copyData:n||"",data:{...r.data,value:n}}},getCellValue(e){var n,i,o,r,l,a,s;return(0,g.le)(null===(n=e.data)||void 0===n?void 0:n.value)||""===(null===(i=e.data)||void 0===i?void 0:i.value)?null:"number"===t?null!==(r=ie(null===(l=e.data)||void 0===l?void 0:l.value))&&void 0!==r?r:null:"boolean"===t?null!==(a=ne(null===(s=e.data)||void 0===s?void 0:s.value))&&void 0!==a?a:null:null===(o=e.data)||void 0===o?void 0:o.value}}}Me.isEditableType=!0;const ke=Me;function Te(e){const t={kind:o.p6.Bubble,data:[],allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal"};return{...e,kind:"list",sortMode:"default",isEditable:!1,getCell(e){const n=(0,g.le)(e)?[]:ee(e);return{...t,data:n,isMissingValue:(0,g.le)(e),copyData:(0,g.le)(e)?"":te(n.map((e=>"string"===typeof e&&e.includes(",")?e.replace(/,/g," "):e)))}},getCellValue:e=>(0,g.le)(e.data)||J(e)?null:e.data}}Te.isEditableType=!1;const Re=Te;function Ie(e,t,n){const i=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");n=n.replace(/{/g," {");const o=i.exec(n);if(o)return o[1].trim()}function Ne(e,t){const n=e.types.index[t],i=e.indexNames[t];let o=!0;return"range"===P.fu.getTypeName(n)&&(o=!1),{id:`index-${t}`,name:i,title:i,isEditable:o,arrowType:n,isIndex:!0,isHidden:!1}}function _e(e,t){const n=e.columns[0][t];let i,o=e.types.data[t];if((0,g.le)(o)&&(o={meta:null,numpy_type:"object",pandas_type:"object"}),"categorical"===P.fu.getTypeName(o)){const n=e.getCategoricalOptions(t);(0,g.bb)(n)&&(i={options:n})}return{id:`column-${n}-${t}`,name:n,title:n,isEditable:!0,arrowType:o,columnTypeOptions:i,isIndex:!1,isHidden:!1}}function Oe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const i=e.arrowType?P.fu.getTypeName(e.arrowType):null;let r;if("object"===e.kind)r=e.getCell((0,g.bb)(t.content)?de(P.fu.format(t.content,t.contentType,t.field)):null);else if(["time","date","datetime"].includes(e.kind)&&(0,g.bb)(t.content)&&("number"===typeof t.content||"bigint"===typeof t.content)){var l,a;let n;var s,d,c;if("time"===i&&(0,g.bb)(null===(l=t.field)||void 0===l||null===(a=l.type)||void 0===a?void 0:a.unit))n=W().unix(P.fu.convertToSeconds(t.content,null!==(s=null===(d=t.field)||void 0===d||null===(c=d.type)||void 0===c?void 0:c.unit)&&void 0!==s?s:0)).utc().toDate();else n=W().utc(Number(t.content)).toDate();r=e.getCell(n)}else if("decimal"===i){const n=(0,g.le)(t.content)?null:P.fu.format(t.content,t.contentType,t.field);r=e.getCell(n)}else r=e.getCell(t.content);if(q(r))return r;if(!e.isEditable){if((0,g.bb)(t.displayContent)){var u;const e=de(t.displayContent);r.kind===o.p6.Text||r.kind===o.p6.Number||r.kind===o.p6.Uri?r={...r,displayData:e}:r.kind===o.p6.Custom&&"date-picker-cell"===(null===(u=r.data)||void 0===u?void 0:u.kind)&&(r={...r,data:{...r.data,displayDate:e}})}n&&t.cssId&&(r=function(e,t,n){const i={},o=Ie(t,"color",n);o&&(i.textDark=o);const r=Ie(t,"background-color",n);return r&&(i.bgCell=r),"yellow"===r&&void 0===o&&(i.textDark="#31333F"),i?{...e,themeOverride:i}:e}(r,t.cssId,n))}return r}function De(e){const t=e.columnTypeOptions||{};let n,i;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(a){n=`Invalid validate regex: ${t.validate}.\nError: ${a}`}if(!(0,g.le)(t.display_text)&&t.display_text.includes("(")&&t.display_text.includes(")"))try{i=new RegExp(t.display_text,"us")}catch(a){i=void 0}const r={kind:o.p6.Uri,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal",hoverEffect:!0,data:"",displayData:"",copyData:""},l=i=>{if((0,g.le)(i))return!e.isRequired;const o=te(i);return!(t.max_chars&&o.length>t.max_chars)&&!(n instanceof RegExp&&!1===n.test(o))};return{...e,kind:"link",sortMode:"default",validateInput:l,getCell(e,o){if((0,g.le)(e))return{...r,data:null,isMissingValue:!0,onClickUri:()=>{}};const s=e;if("string"===typeof n)return U(te(s),n);if(o){if(!1===l(s))return U(te(s),"Invalid input.")}let d="";return s&&(d=void 0!==i?function(e,t){if((0,g.le)(t))return"";try{const n=t.match(e);return n&&void 0!==n[1]?decodeURI(n[1]):t}catch(a){return t}}(i,s):t.display_text||s),{...r,data:s,displayData:d,isMissingValue:(0,g.le)(s),onClickUri:e=>{window.open(s.startsWith("www.")?`https://${s}`:s,"_blank","noopener,noreferrer"),e.preventDefault()},copyData:s}},getCellValue:e=>(0,g.le)(e.data)?null:e.data}}De.isEditableType=!0;const Ae=De;function Fe(e){const t={kind:o.p6.Image,data:[],displayData:[],readonly:!0,allowOverlay:!0,contentAlign:e.contentAlignment||"center",style:e.isIndex?"faded":"normal"};return{...e,kind:"image",sortMode:"default",isEditable:!1,getCell(e){const n=(0,g.bb)(e)?[te(e)]:[];return{...t,data:n,isMissingValue:!(0,g.bb)(e),displayData:n}},getCellValue:e=>void 0===e.data||0===e.data.length?null:e.data[0]}}Fe.isEditableType=!1;const ze=Fe;function $e(e){const t=Ce(P.fu.getTypeName(e.arrowType)),n=Q({min_value:0,max_value:t?100:1,step:t?1:.01,format:t?"%3d%%":"percent"},e.columnTypeOptions);let i;try{i=oe(n.max_value,n.format)}catch(a){i=te(n.max_value)}const r=(0,g.le)(n.step)||Number.isNaN(n.step)?void 0:ae(n.step),l={kind:o.p6.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,data:{kind:"range-cell",min:n.min_value,max:n.max_value,step:n.step,value:n.min_value,label:String(n.min_value),measureLabel:i,readonly:!0}};return{...e,kind:"progress",sortMode:"smart",isEditable:!1,getCell(e){if((0,g.le)(e))return K();if((0,g.le)(n.min_value)||(0,g.le)(n.max_value)||Number.isNaN(n.min_value)||Number.isNaN(n.max_value)||n.min_value>=n.max_value)return U("Invalid min/max parameters",`The min_value (${n.min_value}) and max_value (${n.max_value}) parameters must be valid numbers.`);if((0,g.le)(n.step)||Number.isNaN(n.step))return U("Invalid step parameter",`The step parameter (${n.step}) must be a valid number.`);const t=ie(e);if(Number.isNaN(t)||(0,g.le)(t))return U(te(e),"The value cannot be interpreted as a number.");if(Number.isInteger(t)&&!Number.isSafeInteger(t))return U(te(e),"The value is larger than the maximum supported integer values in number columns (2^53).");let i="";try{i=oe(t,n.format,r)}catch(a){return U(te(t),(0,g.bb)(n.format)?`Failed to format the number based on the provided format configuration: (${n.format}). Error: ${a}`:`Failed to format the number. Error: ${a}`)}const o=Math.min(n.max_value,Math.max(n.min_value,t));return{...l,isMissingValue:(0,g.le)(e),copyData:String(t),data:{...l.data,value:o,label:i}}},getCellValue(e){var t,n;return e.kind===o.p6.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.value)?null:null===(n=e.data)||void 0===n?void 0:n.value}}}$e.isEditableType=!1;const Ve=$e;function Le(e,t,n){const i=Q({y_min:0,y_max:1},t.columnTypeOptions),r={kind:o.p6.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[i.y_min,i.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(e){if((0,g.le)(i.y_min)||(0,g.le)(i.y_max)||Number.isNaN(i.y_min)||Number.isNaN(i.y_max)||i.y_min>=i.y_max)return U("Invalid min/max y-axis configuration",`The y_min (${i.y_min}) and y_max (${i.y_max}) configuration options must be valid numbers.`);if((0,g.le)(e))return K();const t=ee(e),n=[];let o=[];if(0===t.length)return K();let l=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER;for(let i=0;i<t.length;i++){const e=ie(t[i]);if(Number.isNaN(e)||(0,g.le)(e))return U(te(t),`The value cannot be interpreted as a numeric array. ${te(e)} is not a number.`);e>l&&(l=e),e<a&&(a=e),n.push(e)}return o=n.length>0&&(l>i.y_max||a<i.y_min)?n.map((e=>l-a===0?l>(i.y_max||1)?i.y_max||1:i.y_min||0:((i.y_max||1)-(i.y_min||0))*((e-a)/(l-a))+(i.y_min||0))):n,{...r,copyData:n.join(","),data:{...r.data,values:o,displayValues:n.map((e=>oe(e)))},isMissingValue:(0,g.le)(e)}},getCellValue(e){var t,n;return e.kind===o.p6.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.values)?null:null===(n=e.data)||void 0===n?void 0:n.values}}}function He(e){return Le("line_chart",e,"line")}function We(e){return Le("bar_chart",e,"bar")}function je(e){return Le("area_chart",e,"area")}He.isEditableType=!1,We.isEditableType=!1,je.isEditableType=!1;const Be=new Map(Object.entries({object:me,text:pe,checkbox:xe,selectbox:ke,list:Re,number:Se,link:Ae,datetime:be,date:ye,time:ve,line_chart:He,bar_chart:We,area_chart:je,image:ze,progress:Ve})),Pe=[],Ze="_index",Ye="_pos:",Ue={small:75,medium:200,large:400};function qe(e){if(!(0,g.le)(e))return"number"===typeof e?e:e in Ue?Ue[e]:void 0}function Je(e,t){if(!t)return e;let n;return t.has(e.name)&&e.name!==Ze?n=t.get(e.name):t.has(`${Ye}${e.indexNumber}`)?n=t.get(`${Ye}${e.indexNumber}`):e.isIndex&&t.has(Ze)&&(n=t.get(Ze)),n?z()({...e},{title:n.label,width:qe(n.width),isEditable:(0,g.bb)(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help}):e}function Ke(e){var t;const n=null===(t=e.columnTypeOptions)||void 0===t?void 0:t.type;let i;return(0,g.bb)(n)&&(Be.has(n)?i=Be.get(n):(0,ce.KE)(`Unknown column type configured in column configuration: ${n}`)),(0,g.le)(i)&&(i=function(e){let t=e?P.fu.getTypeName(e):null;return t?(t=t.toLowerCase().trim(),["unicode","empty","large_string[pyarrow]"].includes(t)?pe:["datetime","datetimetz"].includes(t)?be:"time"===t?ve:"date"===t?ye:["object","bytes"].includes(t)?me:["bool"].includes(t)?xe:["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float16","float32","float64","float96","float128","range","decimal"].includes(t)?Se:"categorical"===t?ke:t.startsWith("list")?Re:me):me}(e.arrowType)),i}const Ge=function(e,t,n){const o=(0,f.u)(),r=i.useMemo((()=>function(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return(0,ce.H)(t),new Map}}(e.columns)),[e.columns]),l=e.useContainerWidth||(0,g.bb)(e.width)&&e.width>0;return{columns:i.useMemo((()=>{let i=function(e){const t=[],{dimensions:n}=e,i=n.headerColumns,o=n.dataColumns;if(0===i&&0===o)return t.push({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0}),t;for(let r=0;r<i;r++){const n={...Ne(e,r),indexNumber:r};t.push(n)}for(let r=0;r<o;r++){const n={..._e(e,r),indexNumber:r+i};t.push(n)}return t}(t).map((t=>{let i={...t,...Je(t,r),isStretched:l};const a=Ke(i);return(e.editingMode===p.Eh.EditingMode.READ_ONLY||n||!1===a.isEditableType)&&(i={...i,isEditable:!1}),e.editingMode!==p.Eh.EditingMode.READ_ONLY&&1==i.isEditable&&(i={...i,icon:"editable"},i.isRequired&&e.editingMode===p.Eh.EditingMode.DYNAMIC&&(i={...i,isHidden:!1})),a(i,o)})).filter((e=>!e.isHidden));if(e.columnOrder&&e.columnOrder.length>0){const t=[];i.forEach((e=>{e.isIndex&&t.push(e)})),e.columnOrder.forEach((e=>{const n=i.find((t=>t.name===e));n&&!n.isIndex&&t.push(n)})),i=t}return i.length>0?i:[me({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0})]}),[t,r,l,n,e.editingMode,e.columnOrder,o])}};function Xe(e){return e.isIndex?Ze:(0,g.le)(e.name)?"":e.name}const Qe=class{constructor(e){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=e}toJson(e){const t=new Map;e.forEach((e=>{t.set(e.indexNumber,e)}));const n={edited_rows:{},added_rows:[],deleted_rows:[]};this.editedCells.forEach(((e,i,o)=>{const r={};e.forEach(((e,n,i)=>{const o=t.get(n);o&&(r[Xe(o)]=o.getCellValue(e))})),n.edited_rows[i]=r})),this.addedRows.forEach((e=>{const i={};let o=!1;e.forEach(((e,n,r)=>{const l=t.get(n);if(l){const t=l.getCellValue(e);l.isRequired&&l.isEditable&&J(e)&&(o=!0),(0,g.bb)(t)&&(i[Xe(l)]=t)}})),o||n.added_rows.push(i)})),n.deleted_rows=this.deletedRows;return JSON.stringify(n,((e,t)=>void 0===t?null:t))}fromJson(e,t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const n=JSON.parse(e),i=new Map;t.forEach((e=>{i.set(e.indexNumber,e)}));const o=new Map;t.forEach((e=>{o.set(Xe(e),e)})),Object.keys(n.edited_rows).forEach((e=>{const t=Number(e),i=n.edited_rows[e];Object.keys(i).forEach((e=>{const n=i[e],r=o.get(e);if(r){const e=r.getCell(n);var l;if(e)this.editedCells.has(t)||this.editedCells.set(t,new Map),null===(l=this.editedCells.get(t))||void 0===l||l.set(r.indexNumber,e)}}))})),n.added_rows.forEach((e=>{const n=new Map;t.forEach((e=>{n.set(e.indexNumber,e.getCell(null))})),Object.keys(e).forEach((t=>{const i=e[t],r=o.get(t);if(r){const e=r.getCell(i);e&&n.set(r.indexNumber,e)}})),this.addedRows.push(n)})),this.deletedRows=n.deleted_rows}isAddedRow(e){return e>=this.numRows}getCell(e,t){if(this.isAddedRow(t))return this.addedRows[t-this.numRows].get(e);const n=this.editedCells.get(t);return void 0!==n?n.get(e):void 0}setCell(e,t,n){if(this.isAddedRow(t)){if(t-this.numRows>=this.addedRows.length)return;this.addedRows[t-this.numRows].set(e,n)}else{void 0===this.editedCells.get(t)&&this.editedCells.set(t,new Map);this.editedCells.get(t).set(e,n)}}addRow(e){this.addedRows.push(e)}deleteRows(e){e.sort(((e,t)=>t-e)).forEach((e=>{this.deleteRow(e)}))}deleteRow(e){(0,g.le)(e)||e<0||(this.isAddedRow(e)?this.addedRows.splice(e-this.numRows,1):(this.deletedRows.includes(e)||(this.deletedRows.push(e),this.deletedRows=this.deletedRows.sort(((e,t)=>e-t))),this.editedCells.delete(e)))}getOriginalRowIndex(e){let t=e;for(let n=0;n<this.deletedRows.length&&!(this.deletedRows[n]>t);n++)t+=1;return t}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}};var et=n(35704);const tt=function(){const e=(0,f.u)(),t=i.useMemo((()=>({editable:e=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${e.bgColor}"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>`})),[]);return{theme:i.useMemo((()=>({accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:(0,et.DZ)(e.colors.primary,.9),borderColor:e.colors.borderColorLight,horizontalBorderColor:e.colors.borderColorLight,fontFamily:e.genericFonts.bodyFont,bgSearchResult:(0,et.DZ)(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.secondaryBg,bgHeaderHovered:e.colors.secondaryBg,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:`${e.fontSizes.sm}`,baseFontStyle:e.fontSizes.sm,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:(0,et.DZ)(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:8,cellVerticalPadding:3,bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.linkText,drilldownBorder:e.colors.darkenedBgMix25})),[e]),tableBorderRadius:e.radii.default,headerIcons:t}};const nt=function(e,t,n,o){return{getCellContent:i.useCallback((i=>{let[r,l]=i;if(r>t.length-1)return U("Column index out of bounds.","This should never happen. Please report this bug.");if(l>n-1)return U("Row index out of bounds.","This should never happen. Please report this bug.");const a=t[r],s=a.indexNumber,d=o.current.getOriginalRowIndex(l),c=o.current.isAddedRow(d);if(a.isEditable||c){const e=o.current.getCell(s,d);if((0,g.bb)(e))return e;if(c)return U("Error during cell creation.",`This should never happen. Please report this bug. No cell found for an added row: col=${s}; row=${d}`)}try{return Oe(a,e.getCell(d+1,s),e.cssStyles)}catch(u){return U("Error during cell creation.",`This should never happen. Please report this bug. \nError: ${u}`)}}),[t,n,e,o])}};var it=n(32700);const ot=function(e,t,n){const[o,r]=i.useState(),{getCellContent:l,getOriginalIndex:a}=(0,it.fF)({columns:t.map((e=>X(e))),getCellContent:n,rows:e,sort:o}),s=i.useMemo((()=>function(e,t){return void 0===t?e:e.map((e=>e.id===t.column.id?{...e,title:"asc"===t.direction?`\u2191 ${e.title}`:`\u2193 ${e.title}`}:e))}(t,o)),[t,o]),d=i.useCallback((e=>{let t="asc";const n=s[e];if(o&&o.column.id===n.id){if("asc"!==o.direction)return void r(void 0);t="desc"}r({column:X(n),direction:t,mode:n.sortMode})}),[o,s]);return{columns:s,sortColumn:d,getOriginalIndex:a,getCellContent:l}};var rt=n(62813),lt=n.n(rt);const at=function(e,t,n,r,l){const[a,s]=i.useState({columns:o.EV.empty(),rows:o.EV.empty(),current:void 0}),d=!t&&!n&&(e.selectionMode.includes(p.Eh.SelectionMode.MULTI_ROW)||e.selectionMode.includes(p.Eh.SelectionMode.SINGLE_ROW)),c=d&&e.selectionMode.includes(p.Eh.SelectionMode.MULTI_ROW),u=!t&&!n&&(e.selectionMode.includes(p.Eh.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(p.Eh.SelectionMode.MULTI_COLUMN)),m=u&&e.selectionMode.includes(p.Eh.SelectionMode.MULTI_COLUMN),h=a.rows.length>0,g=a.columns.length>0,f=void 0!==a.current,b=i.useCallback((e=>{const t=!lt()(e.rows.toArray(),a.rows.toArray()),n=!lt()(e.columns.toArray(),a.columns.toArray()),i=!lt()(e.current,a.current);let o=d&&t||u&&n,c=e;if((d||u)&&void 0!==e.current&&i&&(c={...e,rows:a.rows,columns:a.columns},o=!1),t&&e.rows.length>0&&n&&0===e.columns.length&&(c={...c,columns:a.columns},o=!0),n&&e.columns.length>0&&t&&0===e.rows.length&&(c={...c,rows:a.rows},o=!0),n&&c.columns.length>=0){let e=c.columns;r.forEach(((t,n)=>{t.isIndex&&(e=e.remove(n))})),e.length<c.columns.length&&(c={...c,columns:e})}s(c),o&&l(c)}),[a,d,u,l,r]),v=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={columns:t?a.columns:o.EV.empty(),rows:e?a.rows:o.EV.empty(),current:void 0};s(n),(!e&&d||!t&&u)&&l(n)}),[a,d,u,l]);return{gridSelection:a,isRowSelectionActivated:d,isMultiRowSelectionActivated:c,isColumnSelectionActivated:u,isMultiColumnSelectionActivated:m,isRowSelected:h,isColumnSelected:g,isCellSelected:f,clearSelection:v,processSelectionChange:b}},st=",",dt='"',ct='"',ut="\n",mt="\ufeff",ht=new RegExp(`[${[st,dt,ut].join("")}]`);function pt(e){return e.map((e=>function(e){if((0,g.le)(e))return"";const t=te(e);if(ht.test(t))return`${dt}${t.replace(new RegExp(dt,"g"),ct+dt)}${dt}`;return t}(e))).join(st)+ut}async function gt(e,t,n,i){const o=new TextEncoder;await e.write(o.encode(mt));const r=n.map((e=>e.name));await e.write(o.encode(pt(r)));for(let l=0;l<i;l++){const i=[];n.forEach(((e,n,o)=>{i.push(e.getCellValue(t([n,l])))})),await e.write(o.encode(pt(i)))}await e.close()}const ft=function(e,t,o,r){return{exportToCsv:i.useCallback((async()=>{const i=`${(new Date).toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const r=await n.e(5345).then(n.bind(n,95345)),l=await r.showSaveFilePicker({suggestedName:i,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1}),a=await l.createWritable();await gt(a,e,t,o)}catch(l){if(l instanceof Error&&"AbortError"===l.name)return;try{(0,ce.KE)("Failed to export data as CSV with FileSystem API, trying fallback method",l);let n="";const a=new WritableStream({write:async e=>{n+=new TextDecoder("utf-8").decode(e)},close:async()=>{}});await gt(a.getWriter(),e,t,o);const s=new Blob([n],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(s),c=document.createElement("a");r?c.setAttribute("target","_blank"):c.setAttribute("target","_self"),c.style.display="none",c.href=d,c.download=i,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(d)}catch(l){(0,ce.H)("Failed to export data as CSV",l)}}}),[t,o,e,r])}};const bt=function(e,t,n,o,r,l,a,s,d){const c=i.useCallback(((t,i)=>{let[l,a]=t;const d=e[l];if(!d.isEditable)return;const c=d.indexNumber,u=n.current.getOriginalRowIndex(r(a)),m=o([l,a]),h=d.getCellValue(m),p=d.getCellValue(i);if(!q(m)&&p===h)return;const g=d.getCell(p,!0);q(g)?(0,ce.KE)(`Not applying the cell edit since it causes this error:\n ${g.data}`):(n.current.setCell(c,u,{...g,lastUpdated:performance.now()}),s())}),[e,n,r,o,s]),u=i.useCallback((()=>{if(t)return;const i=new Map;e.forEach((e=>{i.set(e.indexNumber,e.getCell(e.defaultValue))})),n.current.addRow(i),a()}),[e,n,t,a]),m=i.useCallback((()=>{t||(u(),s())}),[u,s,t]),h=i.useCallback((i=>{var o;if(i.rows.length>0){if(t)return!0;const e=i.rows.toArray().map((e=>n.current.getOriginalRowIndex(r(e))));return n.current.deleteRows(e),a(),d(),s(),!1}if(null!==(o=i.current)&&void 0!==o&&o.range){const t=[],n=i.current.range;for(let i=n.y;i<n.y+n.height;i++)for(let o=n.x;o<n.x+n.width;o++){const n=e[o];n.isEditable&&!n.isRequired&&(t.push({cell:[o,i]}),c([o,i],n.getCell(null)))}return t.length>0&&(s(),l(t)),!1}return!0}),[e,n,t,l,r,s,c,d,a]),p=i.useCallback(((i,a)=>{const[d,c]=i,m=[];for(let h=0;h<a.length;h++){const i=a[h];if(h+c>=n.current.getNumRows()){if(t)break;u()}for(let t=0;t<i.length;t++){const l=i[t],a=h+c,s=t+d;if(s>=e.length)break;const u=e[s];if(u.isEditable){const e=u.getCell(l,!0);if((0,g.bb)(e)&&!q(e)){const t=u.indexNumber,i=n.current.getOriginalRowIndex(r(a)),l=u.getCellValue(o([s,a]));u.getCellValue(e)!==l&&(n.current.setCell(t,i,{...e,lastUpdated:performance.now()}),m.push({cell:[s,a]}))}}}m.length>0&&(s(),l(m))}return!1}),[e,n,t,r,o,u,s,l]),f=i.useCallback(((t,n)=>{const i=t[0];if(i>=e.length)return!0;const o=e[i];if(o.validateInput){const e=o.validateInput(o.getCellValue(n));return!0===e||!1===e?e:o.getCell(e)}return!0}),[e]);return{onCellEdited:c,onPaste:p,onRowAppended:m,onDelete:h,validateCell:f}};const vt=function(e,t){const[n,o]=i.useState(),r=i.useRef(null),l=i.useCallback((n=>{if(clearTimeout(r.current),r.current=0,o(void 0),("header"===n.kind||"cell"===n.kind)&&n.location){const i=n.location[0],l=n.location[1];let a;if(i<0||i>=e.length)return;const s=e[i];if("header"===n.kind&&(0,g.bb)(s))a=s.help;else if("cell"===n.kind){const e=t([i,l]);s.isRequired&&s.isEditable&&J(e)?a="\u26a0\ufe0f Please fill out this cell.":function(e){return e.hasOwnProperty("tooltip")&&""!==e.tooltip}(e)&&(a=e.tooltip)}a&&(r.current=setTimeout((()=>{a&&o({content:a,left:n.bounds.x+n.bounds.width/2,top:n.bounds.y})}),600))}}),[e,t,o,r]);return{tooltip:n,clearTooltip:i.useCallback((()=>{o(void 0)}),[o]),onItemHovered:l}};var yt=n(39806),wt=n(97613),xt=n(48238),Ct=n(85e3),Et=n(37538);const St=function(e){return{drawCell:i.useCallback(((t,n)=>{const{cell:i,theme:o,ctx:r,rect:l}=t,a=t.col;if(J(i)&&a<e.length){const i=e[a];return["checkbox","line_chart","bar_chart","progress"].includes(i.kind)?n():(e=>{const{cell:t,theme:n,ctx:i}=e;(0,yt.L6)({...e,theme:{...n,textDark:n.textLight,headerFontFull:`${n.headerFontStyle} ${n.fontFamily}`,baseFontFull:`${n.baseFontStyle} ${n.fontFamily}`,markerFontFull:`${n.markerFontStyle} ${n.fontFamily}`},spriteManager:{},hyperWrapping:!1},"None",t.contentAlign),i.fillStyle=n.textDark})(t),void(i.isRequired&&i.isEditable&&function(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-8,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+8),e.fillStyle=n.accentColor,e.fill(),e.restore()}(r,l,o))}n()}),[e]),customRenderers:i.useMemo((()=>[wt.Z,xt.Z,Ct.Z,Et.ZP,...Pe]),[])}};const Mt=function(e){const[t,n]=(0,i.useState)((()=>new Map)),o=i.useCallback(((e,i,o,r)=>{e.id&&n(new Map(t).set(e.id,r))}),[t]);return{columns:i.useMemo((()=>e.map((e=>e.id&&t.has(e.id)&&void 0!==t.get(e.id)?{...e,width:t.get(e.id),grow:0}:e))),[e,t]),onColumnResize:o}},kt=2,Tt=35,Rt=50+kt,It=2*Tt+kt;const Nt=function(e,t,n,o,r){let l,a=function(e){return Math.max(e*Tt+kt,It)}(t+1+(e.editingMode===p.Eh.EditingMode.DYNAMIC?1:0)),s=Math.min(a,400);e.height&&(s=Math.max(e.height,It),a=Math.max(e.height,a)),o&&(s=Math.min(s,o),a=Math.min(a,o),e.height||(s=a));let d=n;e.useContainerWidth?l=n:e.width&&(l=Math.min(Math.max(e.width,Rt),n),d=Math.min(Math.max(e.width,d),n));const[c,u]=i.useState({width:l||"100%",height:s});return i.useLayoutEffect((()=>{e.useContainerWidth&&"100%"===c.width&&u({width:n,height:c.height})}),[n]),i.useLayoutEffect((()=>{u({width:c.width,height:s})}),[t]),i.useLayoutEffect((()=>{u({width:l||"100%",height:c.height})}),[l]),i.useLayoutEffect((()=>{u({width:c.width,height:s})}),[s]),i.useLayoutEffect((()=>{if(r){const t=e.useContainerWidth||(0,g.bb)(e.width)&&e.width>0;u({width:t?d:"100%",height:a})}else u({width:l||"100%",height:s})}),[r]),{minHeight:It,maxHeight:a,minWidth:Rt,maxWidth:d,resizableSize:c,setResizableSize:u}},_t=(0,S.Z)("img",{target:"e24uaba0"})((()=>({maxWidth:"100%",maxHeight:"600px",objectFit:"scale-down"})),""),Ot=e=>{let{urls:t}=e;const n=t&&t.length>0?t[0]:"";return n.startsWith("http")?(0,I.jsx)("a",{href:n,target:"_blank",rel:"noreferrer noopener",children:(0,I.jsx)(_t,{src:n})}):(0,I.jsx)(_t,{src:n})};var Dt=n(31572),At=n(13553),Ft=n(80152);const zt=function(e){let{top:t,left:n,content:o,clearTooltip:r}=e;const[l,a]=i.useState(!0),s=(0,f.u)(),{colors:d,fontSizes:c,radii:u}=s,m=i.useCallback((()=>{a(!1),r()}),[r,a]);return(0,I.jsx)(Dt.Z,{content:(0,I.jsx)(Ft.Uo,{className:"stTooltipContent",children:(0,I.jsx)(y.ZP,{style:{fontSize:c.sm},source:o,allowHTML:!1})}),placement:At.r4.top,accessibilityType:At.SI.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:m,onEsc:m,overrides:{Body:{style:{borderTopLeftRadius:u.md,borderTopRightRadius:u.md,borderBottomLeftRadius:u.md,borderBottomRightRadius:u.md,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:(0,M.Iy)(s)?d.bgColor:d.secondaryBg,color:d.bodyText,fontSize:c.sm,fontWeight:"normal",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:l,children:(0,I.jsx)("div",{className:"stTooltipTarget","data-testid":"stTooltipTarget",style:{position:"fixed",top:t,left:n}})})},$t=(0,S.Z)("div",{target:"e1w7nams0"})((e=>{let{hasCustomizedScrollbars:t,theme:n}=e;return{position:"relative",display:"inline-block","& .glideDataEditor":{height:"100%",minWidth:"100%",borderRadius:n.radii.default},"& .dvn-scroller":{...!t&&{scrollbarWidth:"thin"},overflowX:"auto !important",overflowY:"auto !important"}}}),"");n(2739),n(24665);const Vt=(0,h.Z)((function(e){let{element:t,data:n,width:h,height:f,disabled:b,widgetMgr:v,isFullScreen:y,disableFullscreenMode:w,expand:x,collapse:C,fragmentId:E}=e;const S=i.useRef(null),M=i.useRef(null),k=i.useRef(null),{theme:T,headerIcons:R,tableBorderRadius:D}=tt(),{libConfig:{enforceDownloadInNewTab:A=!1}}=i.useContext(O.E),[F,z]=i.useState(!0),[$,V]=i.useState(!1),[L,H]=i.useState(!1),[W,j]=i.useState(!1),B=i.useMemo((()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches),[]),P=i.useMemo((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")||window.navigator.userAgent.includes("Chrome")),[]);(0,g.le)(t.editingMode)&&(t.editingMode=p.Eh.EditingMode.READ_ONLY);const{READ_ONLY:Z,DYNAMIC:Y}=p.Eh.EditingMode,U=n.dimensions,q=Math.max(0,U.rows-1),J=0===q&&!(t.editingMode===Y&&U.dataColumns>0),K=q>15e4,Q=i.useRef(new Qe(q)),[ee,te]=i.useState(Q.current.getNumRows());i.useEffect((()=>{Q.current=new Qe(q),te(Q.current.getNumRows())}),[q]);const ne=i.useCallback((()=>{Q.current=new Qe(q),te(Q.current.getNumRows())}),[q]),{columns:ie}=Ge(t,n,b);i.useEffect((()=>{if(t.editingMode===Z)return;const e=v.getStringValue({id:t.id,formId:t.formId});e&&(Q.current.fromJson(e,ie),te(Q.current.getNumRows()))}),[]);const{getCellContent:oe}=nt(n,ie,ee,Q),{columns:re,sortColumn:le,getOriginalIndex:ae,getCellContent:se}=ot(q,ie,oe),de=i.useCallback((0,g.Ds)(150,(e=>{const n={selection:{rows:[],columns:[]}};n.selection.rows=e.rows.toArray().map((e=>ae(e))),n.selection.columns=e.columns.toArray().map((e=>Xe(re[e])));const i=JSON.stringify(n),o=v.getStringValue({id:t.id,formId:t.formId});void 0!==o&&o===i||v.setStringValue({id:t.id,formId:t.formId},i,{fromUi:!0},E)})),[t.id,t.formId,v,E,ae,Xe]),{gridSelection:ce,isRowSelectionActivated:ue,isMultiRowSelectionActivated:me,isColumnSelectionActivated:he,isMultiColumnSelectionActivated:pe,isRowSelected:ge,isColumnSelected:fe,isCellSelected:be,clearSelection:ve,processSelectionChange:ye}=at(t,J,b,re,de);i.useEffect((()=>{ve(!0,!0)}),[y]);const we=i.useCallback((e=>{var t;null===(t=M.current)||void 0===t||t.updateCells(e)}),[]);i.useEffect((()=>{if(!ue&&!he)return;const e=v.getStringValue({id:t.id,formId:t.formId});if(e){var n,i,r,l;const t=re.map((e=>Xe(e))),a=JSON.parse(e);let s=o.EV.empty(),d=o.EV.empty();if(null===(n=a.selection)||void 0===n||null===(i=n.rows)||void 0===i||i.forEach((e=>{s=s.add(e)})),null===(r=a.selection)||void 0===r||null===(l=r.columns)||void 0===l||l.forEach((e=>{d=d.add(t.indexOf(e))})),s.length>0||d.length>0){ye({rows:s,columns:d,current:void 0})}}}),[]);const xe=i.useCallback((()=>{ee!==Q.current.getNumRows()&&te(Q.current.getNumRows())}),[ee]),Ce=i.useCallback((0,g.Ds)(150,(()=>{const e=Q.current.toJson(re);let n=v.getStringValue({id:t.id,formId:t.formId});void 0===n&&(n=new Qe(0).toJson([])),e!==n&&v.setStringValue({id:t.id,formId:t.formId},e,{fromUi:!0},E)})),[t.id,t.formId,v,E,re,Q.current]),{exportToCsv:Ee}=ft(se,re,ee,A),{onCellEdited:Se,onPaste:Me,onRowAppended:ke,onDelete:Te,validateCell:Re}=bt(re,t.editingMode!==Y,Q,se,ae,we,xe,Ce,ve),{tooltip:Ie,clearTooltip:Ne,onItemHovered:_e}=vt(re,se),{drawCell:Oe,customRenderers:De}=St(re),Ae=i.useMemo((()=>re.map((e=>X(e)))),[re]),{columns:Fe,onColumnResize:ze}=Mt(Ae),{minHeight:$e,maxHeight:Ve,minWidth:Le,maxWidth:He,resizableSize:We,setResizableSize:je}=Nt(t,ee,h,f,y),Be=i.useCallback((e=>{let[t,n]=e;return{...G(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:T.textLight},span:[0,Math.max(re.length-1,0)]}}),[re,T.textLight]);i.useEffect((()=>{if(!t.formId)return;const e=new m.K;return e.manageFormClearListener(v,t.formId,(()=>{ne(),ve()})),()=>{e.disconnect()}}),[t.formId,ne,ve,v]);const Pe=!J&&t.editingMode===Y&&!b,Ze=J?0:re.filter((e=>e.isIndex)).length;return i.useEffect((()=>{setTimeout((()=>{if(k.current&&M.current){var e,t;const n=null===(e=k.current)||void 0===e||null===(t=e.querySelector(".dvn-stack"))||void 0===t?void 0:t.getBoundingClientRect();n&&(H(n.height>k.current.clientHeight),j(n.width>k.current.clientWidth))}}),1)}),[We,ee,Fe]),(0,I.jsxs)($t,{"data-testid":"stDataFrame",className:"stDataFrame",hasCustomizedScrollbars:P,ref:k,onMouseDown:e=>{if(k.current&&P){const t=k.current.getBoundingClientRect();W&&t.height-7<e.clientY-t.top&&e.stopPropagation(),L&&t.width-7<e.clientX-t.left&&e.stopPropagation()}},onBlur:e=>{F||B||e.currentTarget.contains(e.relatedTarget)||ve(!0,!0)},children:[(0,I.jsxs)(_,{isFullScreen:y,disableFullscreenMode:w,locked:ge&&!ue||be||B&&F,onExpand:x,onCollapse:C,target:$t,children:[(ue&&ge||he&&fe)&&(0,I.jsx)(N,{label:"Clear selection",icon:a.x,onClick:()=>{ve(),Ne()}}),Pe&&ge&&(0,I.jsx)(N,{label:"Delete row(s)",icon:s.H,onClick:()=>{Te&&(Te(ce),Ne())}}),Pe&&!ge&&(0,I.jsx)(N,{label:"Add row",icon:d.m,onClick:()=>{ke&&(z(!0),ke(),Ne())}}),!K&&!J&&(0,I.jsx)(N,{label:"Download as CSV",icon:c.k,onClick:()=>Ee()}),!J&&(0,I.jsx)(N,{label:"Search",icon:u.o,onClick:()=>{$?V(!1):(z(!0),V(!0)),Ne()}})]}),(0,I.jsx)(l.e,{"data-testid":"stDataFrameResizable",ref:S,defaultSize:We,style:{border:`1px solid ${T.borderColor}`,borderRadius:`${D}`},minHeight:$e,maxHeight:Ve,minWidth:Le,maxWidth:He,size:We,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,Tt],snapGap:Tt/3,onResizeStop:(e,t,n,i)=>{S.current&&je({width:S.current.size.width,height:Ve-S.current.size.height===kt?S.current.size.height+kt:S.current.size.height})},children:(0,I.jsx)(r.F,{className:"glideDataEditor",ref:M,columns:Fe,rows:J?1:ee,minColumnWidth:50,maxColumnWidth:1e3,maxColumnAutoWidth:500,rowHeight:Tt,headerHeight:Tt,getCellContent:J?Be:se,onColumnResize:B?void 0:ze,resizeIndicator:"header",freezeColumns:Ze,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:B?"cell":"rect",columnSelect:"none",rowSelect:"none",onItemHovered:_e,keybindings:{downFill:!0},onKeyDown:e=>{(e.ctrlKey||e.metaKey)&&"f"===e.key&&(V((e=>!e)),e.stopPropagation(),e.preventDefault())},showSearch:$,onSearchClose:()=>{V(!1),Ne()},onHeaderClicked:(e,t)=>{J||K||he||(ue&&ge&&ve(),le(e))},gridSelection:ce,onGridSelectionChange:e=>{(F||B)&&(ye(e),void 0!==Ie&&Ne())},theme:T,onMouseMove:e=>{"out-of-bounds"===e.kind&&F?z(!1):"out-of-bounds"===e.kind||F||z(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,...P&&{paddingBottom:W?-6:void 0,paddingRight:L?-6:void 0}},drawCell:Oe,customRenderers:De,imageEditorOverride:Ot,headerIcons:R,validateCell:Re,onPaste:!1,...ue&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:T.bgHeader,bgCellMedium:T.bgHeader}},rowSelectionMode:me?"multi":"auto",rowSelect:b?"none":me?"multi":"single",rowSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...he&&{columnSelect:b?"none":pe?"multi":"single",columnSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...!J&&t.editingMode!==Z&&!b&&{fillHandle:!B,onCellEdited:Se,onPaste:Me,onDelete:Te},...!J&&t.editingMode===Y&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:T.bgHeader,bgCellMedium:T.bgHeader}},rowSelectionMode:"multi",rowSelect:b?"none":"multi",onRowAppended:b?void 0:ke,onHeaderClicked:void 0}})}),Ie&&Ie.content&&(0,I.jsx)(zt,{top:Ie.top,left:Ie.left,content:Ie.content,clearTooltip:Ne})]})}),!0)},87814:(e,t,n)=>{n.d(t,{K:()=>o});var i=n(50641);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,n){(0,i.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,n),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}}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8427],{18427:(e,t,o)=>{o.r(t),o.d(t,{default:()=>b});var i=o(66845),s=o(25621),r=o(69021),a=o(27466),n=o(12596),l=o(59033),d=o(36989),c=o(22704),p=o(1515);const g=(0,p.Z)("button",{target:"elibz2u3"})((e=>{let{theme:t}=e;return{fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.base,color:t.colors.fadedText60,backgroundColor:t.colors.transparent,border:"none",boxShadow:"none",padding:"0px","&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:t.colors.primary}}}),""),u=(0,p.Z)("div",{target:"elibz2u2"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",gap:t.spacing.lg,"> span":{marginTop:t.spacing.twoXS}}}),""),h=(0,p.Z)("div",{target:"elibz2u0"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",gap:t.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.base}}),"");var f=o(40864);const b=(0,s.b)((function(e){let{theme:t,body:o,icon:s,width:p}=e;const b=function(e){if(e.length>104){let t=e.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return e}(o),m=o!==b,[x,w]=(0,i.useState)(!m),[y,S]=(0,i.useState)(0),v=(0,i.useCallback)((()=>{w(!x)}),[x]),T=(0,i.useMemo)((()=>function(e){const t=(0,a.Iy)(e);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:e.spacing.md,width:e.sizes.toastWidth,marginTop:e.spacing.sm,borderTopLeftRadius:e.radii.default,borderTopRightRadius:e.radii.default,borderBottomLeftRadius:e.radii.default,borderBottomRightRadius:e.radii.default,paddingTop:e.spacing.lg,paddingBottom:e.spacing.lg,paddingLeft:e.spacing.twoXL,paddingRight:e.spacing.twoXL,backgroundColor:t?e.colors.gray10:e.colors.gray90,color:e.colors.bodyText,boxShadow:t?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:e.colors.fadedText40,width:e.fontSizes.lg,height:e.fontSizes.lg,marginRight:`calc(-1 * ${e.spacing.lg} / 2)`,":hover":{color:e.colors.bodyText}}}}}(t)),[t]),z=(0,i.useMemo)((()=>(0,f.jsxs)(u,{expanded:x,children:[s&&(0,f.jsx)(c.p,{iconValue:s,size:"xl",testid:"stToastDynamicIcon"}),(0,f.jsxs)(h,{children:[(0,f.jsx)(n.ZP,{source:x?o:b,allowHTML:!1,isToast:!0}),m&&(0,f.jsx)(g,{"data-testid":"stToastViewButton",onClick:v,children:x?"view less":"view more"})]})]})),[m,x,o,s,b,v]);(0,i.useEffect)((()=>{if(t.inSidebar)return;const e=r.Z.info(z,{overrides:{...T}});return S(e),()=>{r.Z.update(e,{overrides:{Body:{style:{transitionDuration:0}}}}),r.Z.clear(e)}}),[]),(0,i.useEffect)((()=>{r.Z.update(y,{children:z,overrides:{...T}})}),[y,z,T]);const R=(0,f.jsx)(d.Z,{kind:l.h.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information.",width:p});return(0,f.jsx)(f.Fragment,{children:t.inSidebar&&R})}))}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[9330],{69330:(e,t,r)=>{r.r(t),r.d(t,{default:()=>
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[9330],{69330:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var n=r(66845),u=r(40864);function s(e){let{element:t,width:r,endpoints:s,elementMgr:a}=e;const i=(0,n.useRef)(null),{startTime:d,endTime:c,loop:l,autoplay:o}=t,m=(0,n.useMemo)((()=>{if(!t.id)return!0;const e=a.getElementState(t.id,"preventAutoplay");return e||a.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,a]);(0,n.useEffect)((()=>{i.current&&(i.current.currentTime=d)}),[d]),(0,n.useEffect)((()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,n.useEffect)((()=>{const e=i.current;if(!e)return;let t=!1;const r=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=d||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",r),()=>{e&&c>0&&e.removeEventListener("timeupdate",r)}}),[c,l,d]),(0,n.useEffect)((()=>{const e=i.current;if(!e)return;const t=()=>{l&&(e.currentTime=d||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[l,d]);const p=s.buildMediaURL(t.url);return(0,u.jsx)("audio",{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:o&&!m,src:p,style:{width:r}})}}}]);
|