streamlit-nightly 1.52.3.dev20260110__py3-none-any.whl → 1.52.3.dev20260112__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.
Files changed (101) hide show
  1. streamlit/auth_util.py +24 -1
  2. streamlit/static/index.html +1 -1
  3. streamlit/static/manifest.json +295 -295
  4. streamlit/static/static/js/{ErrorOutline.esm.BcqUpfNe.js → ErrorOutline.esm.BjVqd_6R.js} +1 -1
  5. streamlit/static/static/js/{FileDownload.esm.CtJWBuub.js → FileDownload.esm.DJCSsghl.js} +1 -1
  6. streamlit/static/static/js/{FileHelper.D0dQPhOs.js → FileHelper.C---TH7o.js} +5 -5
  7. streamlit/static/static/js/{FormClearHelper.Cm3GDSk6.js → FormClearHelper.C-6BC487.js} +1 -1
  8. streamlit/static/static/js/{InputInstructions.D7Hxdzwv.js → InputInstructions.sxc3InCI.js} +1 -1
  9. streamlit/static/static/js/{Particles.vAUDtAR8.js → Particles.S8yD7iW-.js} +1 -1
  10. streamlit/static/static/js/{ProgressBar.Dp2CGRba.js → ProgressBar.BiYsyZCC.js} +1 -1
  11. streamlit/static/static/js/{StreamlitSyntaxHighlighter.DC0000nJ.js → StreamlitSyntaxHighlighter.9jZF8jX1.js} +1 -1
  12. streamlit/static/static/js/{TableChart.esm.DDVoSKOT.js → TableChart.esm.BdA4Q1rZ.js} +1 -1
  13. streamlit/static/static/js/{Toolbar.CuMH-Gqe.js → Toolbar.B9DaaDfN.js} +1 -1
  14. streamlit/static/static/js/{WidgetLabelHelpIconInline.WAReecol.js → WidgetLabelHelpIconInline.DxODTLS2.js} +1 -1
  15. streamlit/static/static/js/{base-input.BX9Jll5o.js → base-input.Gf1cKuQR.js} +1 -1
  16. streamlit/static/static/js/{checkbox.BzMHUSz1.js → checkbox.CnoNruf3.js} +1 -1
  17. streamlit/static/static/js/{createDownloadLinkElement.CviG5BQx.js → createDownloadLinkElement.B48AepiL.js} +1 -1
  18. streamlit/static/static/js/{data-grid-overlay-editor.Dzo9A4l6.js → data-grid-overlay-editor.Cmdq9aqU.js} +1 -1
  19. streamlit/static/static/js/{downloader.DIDvj0d5.js → downloader.CQLoQdMX.js} +1 -1
  20. streamlit/static/static/js/{embed.C8qeQ38b.js → embed.oKwocwU8.js} +1 -1
  21. streamlit/static/static/js/{es6.Dpcc-U7U.js → es6.BRxlY_y5.js} +2 -2
  22. streamlit/static/static/js/{formatNumber.CPvuaBa8.js → formatNumber.DaagZyZe.js} +1 -1
  23. streamlit/static/static/js/{iconPosition.y0q-Rqem.js → iconPosition.Q3hNvmK4.js} +1 -1
  24. streamlit/static/static/js/{iframeResizer.contentWindow.DblExdXF.js → iframeResizer.contentWindow.B6EBvI9L.js} +1 -1
  25. streamlit/static/static/js/{index.aEeM0ekc.js → index.19_qtO6t.js} +1 -1
  26. streamlit/static/static/js/{index.Bxe7fKbw.js → index.43b777iP.js} +1 -1
  27. streamlit/static/static/js/{index.pgifwCIr.js → index.B03eQZoH.js} +1 -1
  28. streamlit/static/static/js/{index.DRFJgBf-.js → index.B9kZB0o1.js} +1 -1
  29. streamlit/static/static/js/{index.DZEQ0G7H.js → index.BAI9aHCq.js} +1 -1
  30. streamlit/static/static/js/{index.BTHi5W25.js → index.BF23fbfs.js} +1 -1
  31. streamlit/static/static/js/{index.BGufEmCz.js → index.BGBTkulf.js} +1 -1
  32. streamlit/static/static/js/{index.BZBWLU1C.js → index.BRfGUOQ-.js} +5 -5
  33. streamlit/static/static/js/{index.DvQ7-afx.js → index.BVT89mQw.js} +1 -1
  34. streamlit/static/static/js/{index.D42y-GeO.js → index.BXEC4cf3.js} +1 -1
  35. streamlit/static/static/js/{index.DppScppA.js → index.BbSFVZ3p.js} +1 -1
  36. streamlit/static/static/js/{index.BfZdZpv-.js → index.BkSwGJoh.js} +1 -1
  37. streamlit/static/static/js/{index.DB4MbQ40.js → index.BnfTPrHb.js} +1 -1
  38. streamlit/static/static/js/{index.C93QGPyk.js → index.BoX8d5rK.js} +1 -1
  39. streamlit/static/static/js/{index.DmQqT9OM.js → index.Boa0Egng.js} +1 -1
  40. streamlit/static/static/js/{index.B-g6lwYa.js → index.BzwlrgZO.js} +1 -1
  41. streamlit/static/static/js/{index.u2AvcQQT.js → index.C0fSEz-3.js} +1 -1
  42. streamlit/static/static/js/{index.BVN9cI-k.js → index.CCFwVy90.js} +1 -1
  43. streamlit/static/static/js/{index.CcMmNHAq.js → index.CCQ5p_WC.js} +1 -1
  44. streamlit/static/static/js/{index.C26ZOVFL.js → index.CFCBhOfx.js} +1 -1
  45. streamlit/static/static/js/{index.x4j6nnNb.js → index.CIbgt5wY.js} +1 -1
  46. streamlit/static/static/js/{index.BPMqWDef.js → index.CJ4oJe0V.js} +1 -1
  47. streamlit/static/static/js/{index.BXYgO5B8.js → index.CP-hoxJM.js} +1 -1
  48. streamlit/static/static/js/{index.BItU4jMo.js → index.CSfsEKCF.js} +1 -1
  49. streamlit/static/static/js/{index.BWOP7HFT.js → index.CVlg41MB.js} +1 -1
  50. streamlit/static/static/js/{index.CCDejIvL.js → index.CYE7b5Du.js} +1 -1
  51. streamlit/static/static/js/{index.eweE9HKU.js → index.Ca7MUNWJ.js} +1 -1
  52. streamlit/static/static/js/index.CrPjcPY1.js +1 -0
  53. streamlit/static/static/js/{index.B6vCS66f.js → index.CvB9JBqS.js} +5 -5
  54. streamlit/static/static/js/{index.kKkHk9Mc.js → index.CvIqsWy1.js} +1 -1
  55. streamlit/static/static/js/{index.MKI8t7l2.js → index.D1pK_Vw2.js} +1 -1
  56. streamlit/static/static/js/{index.gr6yGiCL.js → index.D6X2coHR.js} +1 -1
  57. streamlit/static/static/js/{index.DaU1ayM7.js → index.DGYHxruh.js} +1 -1
  58. streamlit/static/static/js/{index.Dla9XiNe.js → index.DJ7P09eb.js} +1 -1
  59. streamlit/static/static/js/{index.D69ULFWq.js → index.Dh5SAThV.js} +1 -1
  60. streamlit/static/static/js/{index.pMvzHC7z.js → index.Fu73QtkD.js} +1 -1
  61. streamlit/static/static/js/{index.C1ElSZEy.js → index.KN1VmyYN.js} +1 -1
  62. streamlit/static/static/js/{index.DTK-btqV.js → index.KtjGDGY5.js} +1 -1
  63. streamlit/static/static/js/{index.w2_VrtVw.js → index.OpATzEaW.js} +1 -1
  64. streamlit/static/static/js/{index.C7lwRBvF.js → index.QHnxuesF.js} +1 -1
  65. streamlit/static/static/js/{index.BDb0PRvK.js → index.QTaWooav.js} +1 -1
  66. streamlit/static/static/js/{index.VSsf6tsu.js → index.WXybx2Xq.js} +1 -1
  67. streamlit/static/static/js/{index.B9TG5Ah8.js → index.Xg-Qttib.js} +1 -1
  68. streamlit/static/static/js/{index.B10MmI2m.js → index.j4fnjyHo.js} +1 -1
  69. streamlit/static/static/js/{index.RRAKXgBZ.js → index.na9UBuse.js} +1 -1
  70. streamlit/static/static/js/{index.F-NmmwfK.js → index.pU9mQeVC.js} +1 -1
  71. streamlit/static/static/js/{index.Dr8b3Vn6.js → index.slgxPafU.js} +1 -1
  72. streamlit/static/static/js/{index.wv1DYVsn.js → index.whRT3Vm3.js} +1 -1
  73. streamlit/static/static/js/{input.BoJqOS7a.js → input.CPzINTl-.js} +1 -1
  74. streamlit/static/static/js/{main.B5XmUwmQ.js → main.DSPn8dUe.js} +1 -1
  75. streamlit/static/static/js/{memory.9izgq54V.js → memory.CfD8IGoU.js} +1 -1
  76. streamlit/static/static/js/{number-overlay-editor.PqOGQcLn.js → number-overlay-editor.4Ae0qegV.js} +1 -1
  77. streamlit/static/static/js/{pandasStylerUtils.DUtF2t3R.js → pandasStylerUtils.D2EjZ7k6.js} +1 -1
  78. streamlit/static/static/js/{sandbox.DgKTHPLO.js → sandbox.C6vcPIm0.js} +1 -1
  79. streamlit/static/static/js/{styled-components.D4x8jmOI.js → styled-components.BBmp8buj.js} +1 -1
  80. streamlit/static/static/js/{throttle.DxEHIIp7.js → throttle.BPcPpy-S.js} +1 -1
  81. streamlit/static/static/js/{timepicker.CDks5DWI.js → timepicker.ryzkTs2C.js} +1 -1
  82. streamlit/static/static/js/{toConsumableArray.CvTQRsV-.js → toConsumableArray.Dg1nDaB_.js} +1 -1
  83. streamlit/static/static/js/uniqueId.BFHzT5KQ.js +1 -0
  84. streamlit/static/static/js/{useBasicWidgetState.D6_b0IqA.js → useBasicWidgetState.A4U5lzAm.js} +1 -1
  85. streamlit/static/static/js/{useIntlLocale.Ctz17A7g.js → useIntlLocale.DWJgLlNz.js} +1 -1
  86. streamlit/static/static/js/{useTextInputAutoExpand.PAFB5o1T.js → useTextInputAutoExpand.BrBonw8t.js} +1 -1
  87. streamlit/static/static/js/{useUpdateUiValue.CcTvmGlb.js → useUpdateUiValue.BkOWyNVX.js} +1 -1
  88. streamlit/static/static/js/{useWaveformController.vLi36Ir4.js → useWaveformController.CBlvXlgZ.js} +1 -1
  89. streamlit/static/static/js/{withCalculatedWidth.BtA2jL5-.js → withCalculatedWidth.D4cpOyNe.js} +1 -1
  90. streamlit/static/static/js/{withFullScreenWrapper.CeeoYBpc.js → withFullScreenWrapper.BMim3w94.js} +1 -1
  91. streamlit/user_info.py +6 -4
  92. streamlit/web/server/browser_websocket_handler.py +2 -2
  93. streamlit/web/server/oauth_authlib_routes.py +97 -20
  94. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/METADATA +1 -1
  95. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/RECORD +99 -99
  96. streamlit/static/static/js/index.q83b8_8b.js +0 -1
  97. streamlit/static/static/js/uniqueId.RScLN3St.js +0 -1
  98. {streamlit_nightly-1.52.3.dev20260110.data → streamlit_nightly-1.52.3.dev20260112.data}/scripts/streamlit.cmd +0 -0
  99. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/WHEEL +0 -0
  100. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/entry_points.txt +0 -0
  101. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{r as a,E as B,_ as X,l as $,e as L,R as Q,Q as K,bf as j,bg as z,bh as Y,bi as Z,n as k,bj as M,W as P,X as q,k as ee,ba as te,bk as ne,j as A,o as re,b3 as se}from"./index.BZBWLU1C.js";import{w as oe,E as ae}from"./withFullScreenWrapper.CeeoYBpc.js";import{a as _,S as H,T as ce}from"./Toolbar.CuMH-Gqe.js";import{R as ie}from"./index.B6vCS66f.js";import{a as J,c as le,b as ue,e as fe,t as de,S as me,d as pe}from"./embed.C8qeQ38b.js";import{u as he}from"./FormClearHelper.Cm3GDSk6.js";import{T as ge}from"./TableChart.esm.DDVoSKOT.js";import"./moment.C7qA8nIE.js";import"./pandasStylerUtils.DUtF2t3R.js";import"./numbro.B9_PXfzp.js";import"./_baseIndexOf.BTknn6Gb.js";import"./index.8HslT92O.js";import"./main.B5XmUwmQ.js";import"./throttle.DxEHIIp7.js";import"./formatNumber.CPvuaBa8.js";import"./sprintf.DpPCfzXw.js";import"./formatMoment.C6Hwn6X5.js";import"./checkbox.BzMHUSz1.js";import"./createDownloadLinkElement.CviG5BQx.js";import"./toConsumableArray.CvTQRsV-.js";import"./FileDownload.esm.CtJWBuub.js";import"./_arrayIncludes.B19Iyn2B.js";import"./threshold.CUNQbqMA.js";import"./value.DaKxGC7O.js";import"./timer.BZio6gjG.js";var U=a.forwardRef(function(n,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,X({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:e}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}))});U.displayName="InsertChart";const Se=20;function ye(n){"params"in n&&"encoding"in n&&n.params.forEach(e=>{"select"in e&&(["interval","point"].includes(e.select)&&(e.select={type:e.select}),"type"in e.select&&e.select.type==="point"&&!("encodings"in e.select)&&L(e.select.encodings)&&(e.select.encodings=Object.keys(n.encoding)))})}const be=(n,e,s,r,u,l,f,p)=>{const t=JSON.parse(n);if(r==="streamlit"?t.config=J(t.config,l):t.usermeta?.embedOptions?.theme==="streamlit"?(t.config=J(t.config,l),t.usermeta.embedOptions.theme=void 0):t.config=le(t.config,l),t.title&&(typeof t.title=="string"&&(t.title={text:t.title}),t.title.limit=t.title.limit??Math.max(f-40,0)),s&&(t.height=p),e&&(t.width=f,"vconcat"in t&&t.vconcat.forEach(o=>{o===null||typeof o!="object"||"hconcat"in o||"vconcat"in o||"concat"in o||"layer"in o||(o.width=f)})),t.padding||(t.padding={}),L(t.padding.bottom)&&(t.padding.bottom=Se),t.datasets)throw new Error("Datasets should not be passed as part of the spec");return u.length>0&&ye(t),t},we=(n,e,s,r,u)=>{const l=$(),{id:f,formId:p,spec:t,data:o,datasets:c,vegaLiteTheme:d,selectionMode:i}=n,h=a.useMemo(()=>i,[JSON.stringify(i)]),S=a.useMemo(()=>be(t,r,u,d,h,l,e,s),[t,r,u,d,h,l,e,s]);return{id:f,formId:p,vegaLiteTheme:d,spec:S,selectionMode:h,data:o,datasets:c,useContainerWidth:r}},Ce={DATAFRAME_INDEX:"(index)"};function Ee(n){return!n||n.dimensions.numDataRows===0?null:F(n)}function Ne(n){const e=I(n);if(L(e))return null;const s={};for(const[r,u]of Object.entries(e))s[r]=F(u);return s}function I(n){if(n?.length===0)return null;const e={};return n.forEach(s=>{if(!s)return;const r=s.hasName?s.name:null;e[r]=s.data}),e}function F(n,e=0){if(n.dimensions.numDataRows===0)return[];const s=[],{numDataRows:r,numDataColumns:u,numIndexColumns:l}=n.dimensions,f=n.columnTypes[0]??void 0,p=f?.type===Q.INDEX&&(K(f)||j(f)||z(f));for(let t=e;t<r;t++){const o={};if(p){const{content:c}=n.getCell(t,0);o[Ce.DATAFRAME_INDEX]=typeof c=="bigint"?Number(c):c}for(let c=0;c<u;c++){const d=c+l,{content:i,contentType:h}=n.getCell(t,d);if((i instanceof Date||typeof i=="number"&&Number.isFinite(i))&&(j(h)||z(h))&&!Y(h)){const S=new Date(i).getTimezoneOffset()*60*1e3;o[n.columnNames[0][d]]=i.valueOf()+S}else o[n.columnNames[0][d]]=typeof i=="bigint"?Number(i):i}s.push(o)}return s}const De=150,Ve=P.getLogger("useVegaLiteSelections"),Oe=(n,e,s)=>{const{id:r,formId:u,selectionMode:l}=n,f=a.useCallback(t=>{l.forEach(c=>{t.addSignalListener(c,Z(De,(d,i)=>{const h=t.getState({data:(E,v)=>l.some(g=>`${g}_store`===E),recurse:!1});k(h)&&e.setElementState(r,"viewState",h);let S=i;"vlPoint"in i&&"or"in i.vlPoint&&(S=i.vlPoint.or);const V={id:r,formId:u},N=JSON.parse(e.getStringValue(V)||"{}"),D={selection:{...N?.selection||{},[d]:S||{}}};M(N,D)||e.setStringValue(V,JSON.stringify(D),{fromUi:!0},s)}))});const o=e.getElementState(r,"viewState");if(k(o))try{return t.setState(o)}catch(c){Ve.warn("Failed to restore view state",c)}return t},[r,l,e,u,s]),p=a.useCallback(()=>{const t={selection:{}};l.forEach(i=>{t.selection[i]={}});const o={id:r,formId:u},c=e.getStringValue(o),d=c?JSON.parse(c):t;M(d,t)||e.setStringValue(o,JSON.stringify(t),{fromUi:!0},s)},[r,u,s,l,e]);return{maybeConfigureSelections:f,onFormCleared:p}},W="source",Te=P.getLogger("useVegaEmbed");function ve(n,e,s){const r=a.useRef(null),u=a.useRef(null),l=a.useRef(W),f=a.useRef(null),p=a.useRef([]),t=a.useRef(null),o=a.useRef([]),[c,d]=a.useState(!1),{maybeConfigureSelections:i,onFormCleared:h}=Oe(n,e,s);he({widgetMgr:e,element:n,onFormCleared:h});const{data:S,datasets:V}=n;a.useEffect(()=>{t.current=S,o.current=V,r.current===null&&(f.current=S,p.current=V)},[S,V]);const N=a.useCallback(()=>{u.current&&u.current(),u.current=null,r.current=null},[]),D=a.useCallback(async(g,b)=>{if(g.current===null)throw new Error("Element missing.");d(!0);try{N();const w={ast:!0,expr:ue,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:y,view:R,finalize:T}=await fe(g.current,b,w);r.current=i(R),u.current=T;const m=Ne(o.current),C=m?Object.keys(m):[];if(C.length===1){const[x]=C;l.current=x}else C.length===0&&y.data&&(l.current=W);const O=Ee(t.current);if(O&&r.current.insert(l.current,O),m)for(const[x,G]of Object.entries(m))r.current.insert(x,G);return await r.current.runAsync(),await r.current.resize().runAsync(),f.current=t.current,p.current=o.current,r.current}finally{d(!1)}},[N,i]),E=a.useCallback((g,b,w,y)=>{if(!y||y.dimensions.numDataRows===0){try{g.remove(b,de)}catch{}return}if(!w||w.dimensions.numDataRows===0){g.insert(b,F(y));return}y.hash!==w.hash&&(g.data(b,F(y)),Te.info(`Had to clear the ${b} dataset before inserting data through Vega view.`))},[]),v=a.useCallback(async(g,b)=>{if(r.current===null||c)return null;const w=f.current,y=p.current;(w||g)&&E(r.current,l.current,w,g);const R=I(y)??{},T=I(b)??{};for(const[m,C]of Object.entries(T)){const O=m||l.current,x=R[O];E(r.current,O,x,C)}for(const m of Object.keys(R))!Object.hasOwn(T,m)&&m!==l.current&&E(r.current,m,null,null);return await r.current?.resize().runAsync(),f.current=g,p.current=b,r.current},[E,c]);return{createView:D,updateView:v,finalizeView:N}}function Re(n){try{const e=typeof n=="string"?JSON.parse(n):n;return!!(e.facet||e.encoding?.row||e.encoding?.column||e.encoding?.facet)}catch{return!1}}function Ae(n){try{const e=typeof n=="string"?JSON.parse(n):n;return!("vconcat"in e)||!Array.isArray(e.vconcat)?!1:e.vconcat.some(s=>s!==null&&typeof s=="object"&&("hconcat"in s||"vconcat"in s||"concat"in s||"layer"in s))}catch{return!1}}const xe=({disableFullscreenMode:n,element:e,fragmentId:s,widgetMgr:r,widthConfig:u,heightConfig:l})=>{const[f,p]=a.useState(!1),[t,o]=a.useState(!1),{expanded:c,height:d,width:i,expand:h,collapse:S}=q(ae),{width:V,height:N,elementRef:D}=ee([f],0),E=te(u)||e.useContainerWidth,v=ne(l),g=Re(e.spec),b=Ae(e.spec),w=we(e,g?i??0:V,(c?d:N)??0,c&&!b?!0:E,c?!0:v),{createView:y,updateView:R,finalizeView:T}=ve(w,r,s),{data:m,datasets:C,spec:O}=w;return a.useLayoutEffect(()=>(D.current!==null&&y(D,O),T),[y,T,O,i,d,f,D]),a.useEffect(()=>{R(m,C)},[m,C]),a.useEffect(()=>{m||C?.[0]?.data?o(!0):o(!1)},[m,C]),f?A(ie,{data:m??C[0]?.data,height:d??N??void 0,width:u??void 0,customToolbarActions:[A(_,{label:"Show chart",icon:U,onClick:()=>{p(!1)}},"show-chart")]}):re(H,{height:v?c?d:"100%":d,useContainerWidth:c?!0:E,children:[A(ce,{target:H,isFullScreen:c,onExpand:h,onCollapse:S,disableFullscreenMode:n,children:t&&A(_,{label:"Show data",icon:ge,onClick:()=>{p(!0)}})}),A(se,{styles:[me]}),A(pe,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:E,useContainerHeight:v,ref:D})]})},Fe=oe(xe),st=a.memo(Fe);export{me as StyledVegaLiteChartTooltips,J as applyStreamlitTheme,st as default};
1
+ import{r as a,E as B,_ as X,l as $,e as L,R as Q,Q as K,bf as j,bg as z,bh as Y,bi as Z,n as k,bj as M,W as P,X as q,k as ee,ba as te,bk as ne,j as A,o as re,b3 as se}from"./index.BRfGUOQ-.js";import{w as oe,E as ae}from"./withFullScreenWrapper.BMim3w94.js";import{a as _,S as H,T as ce}from"./Toolbar.B9DaaDfN.js";import{R as ie}from"./index.CvB9JBqS.js";import{a as J,c as le,b as ue,e as fe,t as de,S as me,d as pe}from"./embed.oKwocwU8.js";import{u as he}from"./FormClearHelper.C-6BC487.js";import{T as ge}from"./TableChart.esm.BdA4Q1rZ.js";import"./moment.C7qA8nIE.js";import"./pandasStylerUtils.D2EjZ7k6.js";import"./numbro.B9_PXfzp.js";import"./_baseIndexOf.BTknn6Gb.js";import"./index.8HslT92O.js";import"./main.DSPn8dUe.js";import"./throttle.BPcPpy-S.js";import"./formatNumber.DaagZyZe.js";import"./sprintf.DpPCfzXw.js";import"./formatMoment.C6Hwn6X5.js";import"./checkbox.CnoNruf3.js";import"./createDownloadLinkElement.B48AepiL.js";import"./toConsumableArray.Dg1nDaB_.js";import"./FileDownload.esm.DJCSsghl.js";import"./_arrayIncludes.B19Iyn2B.js";import"./threshold.CUNQbqMA.js";import"./value.DaKxGC7O.js";import"./timer.BZio6gjG.js";var U=a.forwardRef(function(n,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,X({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:e}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}))});U.displayName="InsertChart";const Se=20;function ye(n){"params"in n&&"encoding"in n&&n.params.forEach(e=>{"select"in e&&(["interval","point"].includes(e.select)&&(e.select={type:e.select}),"type"in e.select&&e.select.type==="point"&&!("encodings"in e.select)&&L(e.select.encodings)&&(e.select.encodings=Object.keys(n.encoding)))})}const be=(n,e,s,r,u,l,f,p)=>{const t=JSON.parse(n);if(r==="streamlit"?t.config=J(t.config,l):t.usermeta?.embedOptions?.theme==="streamlit"?(t.config=J(t.config,l),t.usermeta.embedOptions.theme=void 0):t.config=le(t.config,l),t.title&&(typeof t.title=="string"&&(t.title={text:t.title}),t.title.limit=t.title.limit??Math.max(f-40,0)),s&&(t.height=p),e&&(t.width=f,"vconcat"in t&&t.vconcat.forEach(o=>{o===null||typeof o!="object"||"hconcat"in o||"vconcat"in o||"concat"in o||"layer"in o||(o.width=f)})),t.padding||(t.padding={}),L(t.padding.bottom)&&(t.padding.bottom=Se),t.datasets)throw new Error("Datasets should not be passed as part of the spec");return u.length>0&&ye(t),t},we=(n,e,s,r,u)=>{const l=$(),{id:f,formId:p,spec:t,data:o,datasets:c,vegaLiteTheme:d,selectionMode:i}=n,h=a.useMemo(()=>i,[JSON.stringify(i)]),S=a.useMemo(()=>be(t,r,u,d,h,l,e,s),[t,r,u,d,h,l,e,s]);return{id:f,formId:p,vegaLiteTheme:d,spec:S,selectionMode:h,data:o,datasets:c,useContainerWidth:r}},Ce={DATAFRAME_INDEX:"(index)"};function Ee(n){return!n||n.dimensions.numDataRows===0?null:F(n)}function Ne(n){const e=I(n);if(L(e))return null;const s={};for(const[r,u]of Object.entries(e))s[r]=F(u);return s}function I(n){if(n?.length===0)return null;const e={};return n.forEach(s=>{if(!s)return;const r=s.hasName?s.name:null;e[r]=s.data}),e}function F(n,e=0){if(n.dimensions.numDataRows===0)return[];const s=[],{numDataRows:r,numDataColumns:u,numIndexColumns:l}=n.dimensions,f=n.columnTypes[0]??void 0,p=f?.type===Q.INDEX&&(K(f)||j(f)||z(f));for(let t=e;t<r;t++){const o={};if(p){const{content:c}=n.getCell(t,0);o[Ce.DATAFRAME_INDEX]=typeof c=="bigint"?Number(c):c}for(let c=0;c<u;c++){const d=c+l,{content:i,contentType:h}=n.getCell(t,d);if((i instanceof Date||typeof i=="number"&&Number.isFinite(i))&&(j(h)||z(h))&&!Y(h)){const S=new Date(i).getTimezoneOffset()*60*1e3;o[n.columnNames[0][d]]=i.valueOf()+S}else o[n.columnNames[0][d]]=typeof i=="bigint"?Number(i):i}s.push(o)}return s}const De=150,Ve=P.getLogger("useVegaLiteSelections"),Oe=(n,e,s)=>{const{id:r,formId:u,selectionMode:l}=n,f=a.useCallback(t=>{l.forEach(c=>{t.addSignalListener(c,Z(De,(d,i)=>{const h=t.getState({data:(E,v)=>l.some(g=>`${g}_store`===E),recurse:!1});k(h)&&e.setElementState(r,"viewState",h);let S=i;"vlPoint"in i&&"or"in i.vlPoint&&(S=i.vlPoint.or);const V={id:r,formId:u},N=JSON.parse(e.getStringValue(V)||"{}"),D={selection:{...N?.selection||{},[d]:S||{}}};M(N,D)||e.setStringValue(V,JSON.stringify(D),{fromUi:!0},s)}))});const o=e.getElementState(r,"viewState");if(k(o))try{return t.setState(o)}catch(c){Ve.warn("Failed to restore view state",c)}return t},[r,l,e,u,s]),p=a.useCallback(()=>{const t={selection:{}};l.forEach(i=>{t.selection[i]={}});const o={id:r,formId:u},c=e.getStringValue(o),d=c?JSON.parse(c):t;M(d,t)||e.setStringValue(o,JSON.stringify(t),{fromUi:!0},s)},[r,u,s,l,e]);return{maybeConfigureSelections:f,onFormCleared:p}},W="source",Te=P.getLogger("useVegaEmbed");function ve(n,e,s){const r=a.useRef(null),u=a.useRef(null),l=a.useRef(W),f=a.useRef(null),p=a.useRef([]),t=a.useRef(null),o=a.useRef([]),[c,d]=a.useState(!1),{maybeConfigureSelections:i,onFormCleared:h}=Oe(n,e,s);he({widgetMgr:e,element:n,onFormCleared:h});const{data:S,datasets:V}=n;a.useEffect(()=>{t.current=S,o.current=V,r.current===null&&(f.current=S,p.current=V)},[S,V]);const N=a.useCallback(()=>{u.current&&u.current(),u.current=null,r.current=null},[]),D=a.useCallback(async(g,b)=>{if(g.current===null)throw new Error("Element missing.");d(!0);try{N();const w={ast:!0,expr:ue,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:y,view:R,finalize:T}=await fe(g.current,b,w);r.current=i(R),u.current=T;const m=Ne(o.current),C=m?Object.keys(m):[];if(C.length===1){const[x]=C;l.current=x}else C.length===0&&y.data&&(l.current=W);const O=Ee(t.current);if(O&&r.current.insert(l.current,O),m)for(const[x,G]of Object.entries(m))r.current.insert(x,G);return await r.current.runAsync(),await r.current.resize().runAsync(),f.current=t.current,p.current=o.current,r.current}finally{d(!1)}},[N,i]),E=a.useCallback((g,b,w,y)=>{if(!y||y.dimensions.numDataRows===0){try{g.remove(b,de)}catch{}return}if(!w||w.dimensions.numDataRows===0){g.insert(b,F(y));return}y.hash!==w.hash&&(g.data(b,F(y)),Te.info(`Had to clear the ${b} dataset before inserting data through Vega view.`))},[]),v=a.useCallback(async(g,b)=>{if(r.current===null||c)return null;const w=f.current,y=p.current;(w||g)&&E(r.current,l.current,w,g);const R=I(y)??{},T=I(b)??{};for(const[m,C]of Object.entries(T)){const O=m||l.current,x=R[O];E(r.current,O,x,C)}for(const m of Object.keys(R))!Object.hasOwn(T,m)&&m!==l.current&&E(r.current,m,null,null);return await r.current?.resize().runAsync(),f.current=g,p.current=b,r.current},[E,c]);return{createView:D,updateView:v,finalizeView:N}}function Re(n){try{const e=typeof n=="string"?JSON.parse(n):n;return!!(e.facet||e.encoding?.row||e.encoding?.column||e.encoding?.facet)}catch{return!1}}function Ae(n){try{const e=typeof n=="string"?JSON.parse(n):n;return!("vconcat"in e)||!Array.isArray(e.vconcat)?!1:e.vconcat.some(s=>s!==null&&typeof s=="object"&&("hconcat"in s||"vconcat"in s||"concat"in s||"layer"in s))}catch{return!1}}const xe=({disableFullscreenMode:n,element:e,fragmentId:s,widgetMgr:r,widthConfig:u,heightConfig:l})=>{const[f,p]=a.useState(!1),[t,o]=a.useState(!1),{expanded:c,height:d,width:i,expand:h,collapse:S}=q(ae),{width:V,height:N,elementRef:D}=ee([f],0),E=te(u)||e.useContainerWidth,v=ne(l),g=Re(e.spec),b=Ae(e.spec),w=we(e,g?i??0:V,(c?d:N)??0,c&&!b?!0:E,c?!0:v),{createView:y,updateView:R,finalizeView:T}=ve(w,r,s),{data:m,datasets:C,spec:O}=w;return a.useLayoutEffect(()=>(D.current!==null&&y(D,O),T),[y,T,O,i,d,f,D]),a.useEffect(()=>{R(m,C)},[m,C]),a.useEffect(()=>{m||C?.[0]?.data?o(!0):o(!1)},[m,C]),f?A(ie,{data:m??C[0]?.data,height:d??N??void 0,width:u??void 0,customToolbarActions:[A(_,{label:"Show chart",icon:U,onClick:()=>{p(!1)}},"show-chart")]}):re(H,{height:v?c?d:"100%":d,useContainerWidth:c?!0:E,children:[A(ce,{target:H,isFullScreen:c,onExpand:h,onCollapse:S,disableFullscreenMode:n,children:t&&A(_,{label:"Show data",icon:ge,onClick:()=>{p(!0)}})}),A(se,{styles:[me]}),A(pe,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:E,useContainerHeight:v,ref:D})]})},Fe=oe(xe),st=a.memo(Fe);export{me as StyledVegaLiteChartTooltips,J as applyStreamlitTheme,st as default};
@@ -1 +1 @@
1
- import{F as s,r as p,Y as x,l as b,j as i,a as k,P as v,o as y,Z as g,q as L}from"./index.BZBWLU1C.js";import{m as C}from"./iconPosition.y0q-Rqem.js";const S=s("div",{target:"e175gajv0"})({display:"flex",flexDirection:"column",width:"100%"}),P=s("a",{target:"e175gajv1"})(({disabled:e,isCurrentPage:r,theme:o})=>({textDecoration:"none",width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.default,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:r?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:r?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...e?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}})),T=s("span",{target:"e175gajv2"})(({disabled:e,theme:r})=>({color:r.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...e?{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}:{}}));function h(e){let r=e.page;if(e.queryString)if(e.external)try{const o=new URL(e.page);new URLSearchParams(e.queryString).forEach((t,a)=>o.searchParams.append(a,t)),r=o.toString()}catch{const[o,n]=r.split("#");r=o+(o.includes("?")?"&":"?")+e.queryString+(n?"#"+n:"")}else r+=(r.includes("?")?"&":"?")+e.queryString;return r}function w(e){const{onPageChange:r,currentPageScriptHash:o}=p.useContext(x),{colors:n}=b(),{disabled:t,element:a}=e,l=o===a.pageScriptHash,u=d=>{a.external?t&&d.preventDefault():(d.preventDefault(),t||r(a.pageScriptHash,a.queryString))},c=C(a.iconPosition),f=h(a);return i("div",{className:"stPageLink","data-testid":"stPageLink",children:i(k,{help:a.help,placement:v.TOP_RIGHT,containerWidth:!0,children:i(S,{children:y(P,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:l,href:f,target:a.external?"_blank":"",rel:"noreferrer",onClick:u,children:[a.icon&&c==="left"&&i(g,{size:"lg",color:t?n.fadedText40:n.bodyText,iconValue:a.icon}),i(T,{disabled:t,children:i(L,{source:a.label,allowHTML:!1,isLabel:!0,boldLabel:l,largerLabel:!0,disableLinks:!0})}),a.icon&&c==="right"&&i(g,{size:"lg",color:t?n.fadedText40:n.bodyText,iconValue:a.icon})]})})})})}const j=p.memo(w);export{j as default};
1
+ import{F as s,r as p,Y as x,l as b,j as i,a as k,P as v,o as y,Z as g,q as L}from"./index.BRfGUOQ-.js";import{m as C}from"./iconPosition.Q3hNvmK4.js";const S=s("div",{target:"e175gajv0"})({display:"flex",flexDirection:"column",width:"100%"}),P=s("a",{target:"e175gajv1"})(({disabled:e,isCurrentPage:r,theme:o})=>({textDecoration:"none",width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.default,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:r?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:r?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...e?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}})),T=s("span",{target:"e175gajv2"})(({disabled:e,theme:r})=>({color:r.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...e?{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}:{}}));function h(e){let r=e.page;if(e.queryString)if(e.external)try{const o=new URL(e.page);new URLSearchParams(e.queryString).forEach((t,a)=>o.searchParams.append(a,t)),r=o.toString()}catch{const[o,n]=r.split("#");r=o+(o.includes("?")?"&":"?")+e.queryString+(n?"#"+n:"")}else r+=(r.includes("?")?"&":"?")+e.queryString;return r}function w(e){const{onPageChange:r,currentPageScriptHash:o}=p.useContext(x),{colors:n}=b(),{disabled:t,element:a}=e,l=o===a.pageScriptHash,u=d=>{a.external?t&&d.preventDefault():(d.preventDefault(),t||r(a.pageScriptHash,a.queryString))},c=C(a.iconPosition),f=h(a);return i("div",{className:"stPageLink","data-testid":"stPageLink",children:i(k,{help:a.help,placement:v.TOP_RIGHT,containerWidth:!0,children:i(S,{children:y(P,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:l,href:f,target:a.external?"_blank":"",rel:"noreferrer",onClick:u,children:[a.icon&&c==="left"&&i(g,{size:"lg",color:t?n.fadedText40:n.bodyText,iconValue:a.icon}),i(T,{disabled:t,children:i(L,{source:a.label,allowHTML:!1,isLabel:!0,boldLabel:l,largerLabel:!0,disableLinks:!0})}),a.icon&&c==="right"&&i(g,{size:"lg",color:t?n.fadedText40:n.bodyText,iconValue:a.icon})]})})})})}const j=p.memo(w);export{j as default};
@@ -1 +1 @@
1
- import{F as u,r as L,X as C,o as x,j as i,V as E,q as b,W as v}from"./index.BZBWLU1C.js";import{w as y,E as W}from"./withFullScreenWrapper.CeeoYBpc.js";import{S as p,T}from"./Toolbar.CuMH-Gqe.js";const F=u("div",{target:"e1xt4yf90"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:t?"100%":"fit-content"})),j=u("div",{target:"e1xt4yf91"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:t?"100%":"auto",flexGrow:t?1:0,">img":{borderRadius:e.radii.default}})),H=u("div",{target:"e1xt4yf92"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),M=v.getLogger("ImageList");function R(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const G=({itemKey:e,image:t,imgStyle:r,buildMediaURL:l,handleImageError:s,shouldStretch:d})=>{const o=E(t.url);return x(j,{"data-testid":"stImageContainer",shouldStretch:d,children:[i("img",{style:r,src:l(t.url),alt:e,onError:s,crossOrigin:o}),t.caption&&i(H,{"data-testid":"stImageCaption",style:r,children:i(b,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function O({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:l}){const{expanded:s,width:d,height:o,expand:f,collapse:h}=C(W),g=d||0,I=R(r,e.width,g),m=r?.useStretch||e.width===-5,a={};o&&s?(a.maxHeight=o,a.objectFit="contain",a.width="100%"):(a.width=I??"100%",a.maxWidth="100%");const w=c=>{const n=c.currentTarget.src;M.error(`Client Error: Image source error - ${n}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",n)};return x(p,{width:g,height:o,useContainerWidth:s,topCentered:!0,children:[i(T,{target:p,isFullScreen:s,onExpand:f,onCollapse:h,disableFullscreenMode:l}),i(F,{className:"stImage","data-testid":"stImage",shouldStretch:m,children:e.imgs.map((c,n)=>i(G,{itemKey:n.toString(),image:c,imgStyle:a,buildMediaURL:S=>t.buildMediaURL(S),handleImageError:w,shouldStretch:m},n))})]})}const U=y(O),D=L.memo(U);export{D as default};
1
+ import{F as u,r as L,X as C,o as x,j as i,V as E,q as b,W as v}from"./index.BRfGUOQ-.js";import{w as y,E as W}from"./withFullScreenWrapper.BMim3w94.js";import{S as p,T}from"./Toolbar.B9DaaDfN.js";const F=u("div",{target:"e1xt4yf90"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:t?"100%":"fit-content"})),j=u("div",{target:"e1xt4yf91"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:t?"100%":"auto",flexGrow:t?1:0,">img":{borderRadius:e.radii.default}})),H=u("div",{target:"e1xt4yf92"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),M=v.getLogger("ImageList");function R(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const G=({itemKey:e,image:t,imgStyle:r,buildMediaURL:l,handleImageError:s,shouldStretch:d})=>{const o=E(t.url);return x(j,{"data-testid":"stImageContainer",shouldStretch:d,children:[i("img",{style:r,src:l(t.url),alt:e,onError:s,crossOrigin:o}),t.caption&&i(H,{"data-testid":"stImageCaption",style:r,children:i(b,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function O({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:l}){const{expanded:s,width:d,height:o,expand:f,collapse:h}=C(W),g=d||0,I=R(r,e.width,g),m=r?.useStretch||e.width===-5,a={};o&&s?(a.maxHeight=o,a.objectFit="contain",a.width="100%"):(a.width=I??"100%",a.maxWidth="100%");const w=c=>{const n=c.currentTarget.src;M.error(`Client Error: Image source error - ${n}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",n)};return x(p,{width:g,height:o,useContainerWidth:s,topCentered:!0,children:[i(T,{target:p,isFullScreen:s,onExpand:f,onCollapse:h,disableFullscreenMode:l}),i(F,{className:"stImage","data-testid":"stImage",shouldStretch:m,children:e.imgs.map((c,n)=>i(G,{itemKey:n.toString(),image:c,imgStyle:a,buildMediaURL:S=>t.buildMediaURL(S),handleImageError:w,shouldStretch:m},n))})]})}const U=y(O),D=L.memo(U);export{D as default};
@@ -1 +1 @@
1
- import{F as e,r as a,o as t,j as r,q as o}from"./index.BZBWLU1C.js";import{P as i}from"./ProgressBar.Dp2CGRba.js";const l=e("div",{target:"e1jwj65h0"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function n({element:s}){return t("div",{className:"stProgress","data-testid":"stProgress",children:[r(l,{children:r(o,{source:s.text,allowHTML:!1,isLabel:!0})}),r(i,{value:s.value})]})}const m=a.memo(n);export{m as default};
1
+ import{F as e,r as a,o as t,j as r,q as o}from"./index.BRfGUOQ-.js";import{P as i}from"./ProgressBar.BiYsyZCC.js";const l=e("div",{target:"e1jwj65h0"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function n({element:s}){return t("div",{className:"stProgress","data-testid":"stProgress",children:[r(l,{children:r(o,{source:s.text,allowHTML:!1,isLabel:!0})}),r(i,{value:s.value})]})}const m=a.memo(n);export{m as default};
@@ -1 +1 @@
1
- import{p as W,aC as O,F as _,r as i,k as $,l as q,aa as S,ab as G,o as M,j as c,ac as N,ad as J,af as Q}from"./index.BZBWLU1C.js";import{I as X}from"./InputInstructions.D7Hxdzwv.js";import{u as Y}from"./useBasicWidgetState.D6_b0IqA.js";import{u as Z,a as tt,b as et}from"./useUpdateUiValue.CcTvmGlb.js";import{u as ot,T as at}from"./useTextInputAutoExpand.PAFB5o1T.js";import{u as it}from"./uniqueId.RScLN3St.js";import"./FormClearHelper.Cm3GDSk6.js";import"./inputUtils.CptNuJwn.js";import"./base-input.BX9Jll5o.js";const st=(e,t)=>{let a="auto";if(e.heightConfig?.useStretch)a="100%";else if(e.heightConfig?.pixelHeight&&e.heightConfig.pixelHeight>0){const s=W(t.labelVisibility?.value)===O.Collapsed?2:30,l=e.heightConfig.pixelHeight-s;a=`${Math.max(0,l)}px`}return a},rt=_("div",{target:"e1tmb1p40"})({height:"100%",display:"flex",flexDirection:"column"}),T=(e,t)=>e.getStringValue(t)??t.default??null,lt=e=>e.default??null,nt=e=>e.value??null,dt=(e,t,a,s)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},s)},ut=({disabled:e,element:t,widgetMgr:a,fragmentId:s,outerElement:l})=>{const h=i.useRef(it("text_area_")).current,{width:y,elementRef:V}=$(),[r,g]=i.useState(!1),[I,x]=i.useState(!1),n=l.heightConfig?.useContent??!1,v=l.heightConfig?.useStretch??!1,F=st(l,t),C=i.useRef(null),[d,p]=i.useState(()=>T(a,t)??null),A=i.useCallback(()=>{p(t.default??null),g(!0)},[t]),[R,f]=Y({getStateFromWidgetMgr:T,getDefaultStateFromProto:lt,getCurrStateFromProto:nt,updateWidgetMgrState:dt,element:t,widgetMgr:a,fragmentId:s,onFormCleared:A});Z(R,d,p,r);const o=q(),{height:k,maxHeight:L,updateScrollHeight:H}=ot({textareaRef:C,dependencies:[t.placeholder]}),m=i.useCallback(()=>{g(!1),f({value:d,fromUi:!0})},[d,f]),z=i.useCallback(()=>{r&&m(),x(!1)},[r,m]),B=i.useCallback(()=>{x(!0)},[]),D=i.useCallback(()=>{n&&H()},[n,H]),E=tt({formId:t.formId,maxChars:t.maxChars,setDirty:g,setUiValue:p,setValueWithSource:f,additionalAction:D}),U=et(t.formId,m,r,a,s,!0),{placeholder:P,formId:b}=t,j=S({formId:b})?a.allowFormEnterToSubmit(b):r,w=I&&y>G(o.breakpoints.hideWidgetDetails);return M(rt,{className:"stTextArea","data-testid":"stTextArea",ref:V,children:[c(J,{label:t.label,disabled:e,labelVisibility:W(t.labelVisibility?.value),htmlFor:h,children:t.help&&c(N,{content:t.help,label:t.label})}),c(at,{inputRef:n?C:void 0,value:d??"",placeholder:P,onBlur:z,onFocus:B,onChange:E,onKeyDown:U,"aria-label":t.label,disabled:e,id:h,overrides:{Input:{style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,height:n?k:F,maxHeight:n?L:"",minHeight:o.sizes.largestElementHeight,resize:v?"none":"vertical",paddingRight:o.spacing.md,paddingLeft:o.spacing.md,paddingBottom:o.spacing.md,paddingTop:o.spacing.md,"::placeholder":{color:o.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:({$isFocused:K})=>{const u=Q(o.colors,K);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:u,borderRightColor:u,borderBottomColor:u,borderLeftColor:u,flexGrow:1}}}}}),w&&c(X,{dirty:r,value:d??"",maxLength:t.maxChars,type:"multiline",inForm:S({formId:b}),allowEnterToSubmit:j})]})},Ht=i.memo(ut);export{Ht as default};
1
+ import{p as W,aC as O,F as _,r as i,k as $,l as q,aa as S,ab as G,o as M,j as c,ac as N,ad as J,af as Q}from"./index.BRfGUOQ-.js";import{I as X}from"./InputInstructions.sxc3InCI.js";import{u as Y}from"./useBasicWidgetState.A4U5lzAm.js";import{u as Z,a as tt,b as et}from"./useUpdateUiValue.BkOWyNVX.js";import{u as ot,T as at}from"./useTextInputAutoExpand.BrBonw8t.js";import{u as it}from"./uniqueId.BFHzT5KQ.js";import"./FormClearHelper.C-6BC487.js";import"./inputUtils.CptNuJwn.js";import"./base-input.Gf1cKuQR.js";const st=(e,t)=>{let a="auto";if(e.heightConfig?.useStretch)a="100%";else if(e.heightConfig?.pixelHeight&&e.heightConfig.pixelHeight>0){const s=W(t.labelVisibility?.value)===O.Collapsed?2:30,l=e.heightConfig.pixelHeight-s;a=`${Math.max(0,l)}px`}return a},rt=_("div",{target:"e1tmb1p40"})({height:"100%",display:"flex",flexDirection:"column"}),T=(e,t)=>e.getStringValue(t)??t.default??null,lt=e=>e.default??null,nt=e=>e.value??null,dt=(e,t,a,s)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},s)},ut=({disabled:e,element:t,widgetMgr:a,fragmentId:s,outerElement:l})=>{const h=i.useRef(it("text_area_")).current,{width:y,elementRef:V}=$(),[r,g]=i.useState(!1),[I,x]=i.useState(!1),n=l.heightConfig?.useContent??!1,v=l.heightConfig?.useStretch??!1,F=st(l,t),C=i.useRef(null),[d,p]=i.useState(()=>T(a,t)??null),A=i.useCallback(()=>{p(t.default??null),g(!0)},[t]),[R,f]=Y({getStateFromWidgetMgr:T,getDefaultStateFromProto:lt,getCurrStateFromProto:nt,updateWidgetMgrState:dt,element:t,widgetMgr:a,fragmentId:s,onFormCleared:A});Z(R,d,p,r);const o=q(),{height:k,maxHeight:L,updateScrollHeight:H}=ot({textareaRef:C,dependencies:[t.placeholder]}),m=i.useCallback(()=>{g(!1),f({value:d,fromUi:!0})},[d,f]),z=i.useCallback(()=>{r&&m(),x(!1)},[r,m]),B=i.useCallback(()=>{x(!0)},[]),D=i.useCallback(()=>{n&&H()},[n,H]),E=tt({formId:t.formId,maxChars:t.maxChars,setDirty:g,setUiValue:p,setValueWithSource:f,additionalAction:D}),U=et(t.formId,m,r,a,s,!0),{placeholder:P,formId:b}=t,j=S({formId:b})?a.allowFormEnterToSubmit(b):r,w=I&&y>G(o.breakpoints.hideWidgetDetails);return M(rt,{className:"stTextArea","data-testid":"stTextArea",ref:V,children:[c(J,{label:t.label,disabled:e,labelVisibility:W(t.labelVisibility?.value),htmlFor:h,children:t.help&&c(N,{content:t.help,label:t.label})}),c(at,{inputRef:n?C:void 0,value:d??"",placeholder:P,onBlur:z,onFocus:B,onChange:E,onKeyDown:U,"aria-label":t.label,disabled:e,id:h,overrides:{Input:{style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,height:n?k:F,maxHeight:n?L:"",minHeight:o.sizes.largestElementHeight,resize:v?"none":"vertical",paddingRight:o.spacing.md,paddingLeft:o.spacing.md,paddingBottom:o.spacing.md,paddingTop:o.spacing.md,"::placeholder":{color:o.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:({$isFocused:K})=>{const u=Q(o.colors,K);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:u,borderRightColor:u,borderBottomColor:u,borderLeftColor:u,flexGrow:1}}}}}),w&&c(X,{dirty:r,value:d??"",maxLength:t.maxChars,type:"multiline",inForm:S({formId:b}),allowEnterToSubmit:j})]})},Ht=i.memo(ut);export{Ht as default};
@@ -1,4 +1,4 @@
1
- import{F as c,a4 as l,r as i,j as a,b4 as p}from"./index.BZBWLU1C.js";import{P as d,R as f}from"./Particles.vAUDtAR8.js";const g=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,u=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,E=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,s=150,S=10,w=90,x=4e3,e=(t,n=0)=>Math.random()*(t-n)+n,_=()=>l(`from{transform:translateY(0)
1
+ import{F as c,a4 as l,r as i,j as a,b4 as p}from"./index.BRfGUOQ-.js";import{P as d,R as f}from"./Particles.S8yD7iW-.js";const g=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,u=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,E=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,s=150,S=10,w=90,x=4e3,e=(t,n=0)=>Math.random()*(t-n)+n,_=()=>l(`from{transform:translateY(0)
2
2
  rotateX(`,e(360),`deg)
3
3
  rotateY(`,e(360),`deg)
4
4
  rotateZ(`,e(360),"deg);}to{transform:translateY(calc(100vh + ",o,`px))