@stlite/desktop 0.92.0 → 0.93.0

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 (72) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +27 -0
  3. package/bin/dump_artifacts.js +3 -3
  4. package/build/assets/{ErrorOutline.esm-Cq78Z69r-C4NqF_Dy.js → ErrorOutline.esm-7dB9RqDz-BlHant9M.js} +1 -1
  5. package/build/assets/{FileDownload.esm-CK4kq1fm-rUa3b6xk.js → FileDownload.esm-GWMXlTU--nCHLLVVG.js} +1 -1
  6. package/build/assets/{FileHelper-SZ_yiD2z-B6mYMaXP.js → FileHelper-Cma-1EXD-BHg6ViEo.js} +1 -1
  7. package/build/assets/{FormClearHelper-FCPJEFCb-8WTdS9Fc.js → FormClearHelper-7XVCWEDh-CHeSF048.js} +1 -1
  8. package/build/assets/{Hooks-BLb3umpI-2VYJiKlE.js → Hooks-BLb3umpI-DELjvxVH.js} +1 -1
  9. package/build/assets/{InputInstructions-C9-W08mI-ZHhoQkfd.js → InputInstructions-BVDJIGMt-C7cosSXk.js} +1 -1
  10. package/build/assets/{Particles-BOhWNEfk-Dwf6AovX.js → Particles-g7RgLbWv-DjAdgaht.js} +1 -1
  11. package/build/assets/{ProgressBar-BiR12xMF-C3tqN3I7.js → ProgressBar-Di9e5f4y-D4tmR6iS.js} +1 -1
  12. package/build/assets/{Toolbar-DmNTasId-CQXwCpBc.js → Toolbar-BPTl0_g8-DgJSJ3GD.js} +1 -1
  13. package/build/assets/{base-input-CrN3cmkk-CZot_VyG.js → base-input-ChvJQUff-BpwD4YlX.js} +1 -1
  14. package/build/assets/{checkbox-gyt_OEZr-DUZ4Njwr.js → checkbox-4WgCYqx1-Bgkcmn0F.js} +1 -1
  15. package/build/assets/{createSuper-XjH7KYVR-huv_3l0M.js → createSuper-dKmkwP0m-DxhpQ4SI.js} +1 -1
  16. package/build/assets/{data-grid-overlay-editor-DCBtdsKu-B2V4v_R4.js → data-grid-overlay-editor-IoEmbFO9-CBCubcQ1.js} +1 -1
  17. package/build/assets/{downloader-DcCTL3Wz-DFslBafZ.js → downloader-DcCTL3Wz-3ZFKL_NQ.js} +1 -1
  18. package/build/assets/{es6--XPcqeHG-DCoiAwz4.js → es6--XPcqeHG-r3GRWny2.js} +2 -2
  19. package/build/assets/{iframeResizer.contentWindow-DCqlq0RN-CJu19_xt.js → iframeResizer.contentWindow-fVUnxJjZ-DtdoD2Oh.js} +1 -1
  20. package/build/assets/{index-CNntS3OC-D1QLB5uC.js → index-8B5BiglZ-DvZZ_HIe.js} +5 -5
  21. package/build/assets/{index-tZy2wPj--B6SS_c-g.js → index-AJUjtcR2-Db1saaJD.js} +1 -1
  22. package/build/assets/{index-BMMzkW3e-BZqEtXz_.js → index-BLhXykcy-2Rx1rqrE.js} +1 -1
  23. package/build/assets/{index-Dvp-SyXX-qvRtm5BZ.js → index-BMwC0KGj-BtsmDkp_.js} +1 -1
  24. package/build/assets/{index-B8kWnRO8-DdaQzYiC.js → index-BkFrTmMq-A28f28cz.js} +1 -1
  25. package/build/assets/{index-CZIwCRD7-DBIOlrRp.js → index-Bm-Z6YEI-DCou195f.js} +1 -1
  26. package/build/assets/{index-B8qxfFCx-B29C_PY3.js → index-BqZLpS9v-B3Caq8Gw.js} +1 -1
  27. package/build/assets/{index-BitC4Xgz-B1kdgnmM.js → index-BqjVvYwm-D3YtGOj9.js} +1 -1
  28. package/build/assets/{index-BZG3RZnU-DmEQbf_P.js → index-BsXatFUH-Dt_dN6HK.js} +1 -1
  29. package/build/assets/{index-Q6g9NCof-Cpxw6WZY.js → index-C-iz7Ope-j2Jou3c7.js} +1 -1
  30. package/build/assets/{index-jhfsAAJw-CHbJB1wk.js → index-C4pwXyLd-CSMg93MD.js} +1 -1
  31. package/build/assets/{index-BHzjdNgW-BhgR3SHQ.js → index-CECyqIrl-D2yv4RoH.js} +1 -1
  32. package/build/assets/{index-Bs9zibyE.js → index-CI5Lukhr.js} +4 -4
  33. package/build/assets/{index-CbyG2v0j-Bk1EJlZY.js → index-CQIHksOR-Bnp4a981.js} +1 -1
  34. package/build/assets/{index-ChdNP8aj-ecf7J23U.js → index-C_KUQlWP-B51Pxs_l.js} +1 -1
  35. package/build/assets/{index-WybFjBpB-BX8U2u7x.js → index-CceKGChf-GDzkl9eM.js} +1 -1
  36. package/build/assets/{index-DedW9Ks6-M0WgASrb.js → index-CdsL7CI5-DlOa3Fof.js} +1 -1
  37. package/build/assets/{index-C9u8J5la-oadhV8vp.js → index-CmMya3Pz-CihX18ph.js} +1 -1
  38. package/build/assets/{index-IdwmhHqO-gZocvOjV.js → index-CuLrbTLp-C50eNwoW.js} +1 -1
  39. package/build/assets/{index-BDBGy17s-C8ZIrWop.js → index-Cw0ECNa7-BB6dE3b3.js} +1 -1
  40. package/build/assets/{index-Dj2NFIKD-B_r24aHL.js → index-DD51aFbc-gN5mz9FN.js} +1 -1
  41. package/build/assets/{index-CrabjEa7-DFujXtro.js → index-DEu3PxaD-CXRBV7Mf.js} +1 -1
  42. package/build/assets/{index-CGDCEBHp-ighEw3vp.js → index-DOE9zKwT-5mur2MVZ.js} +1 -1
  43. package/build/assets/{index-Dx_Ep62U-DaqDcI-n.js → index-DQpSdbfe-5SdJiHTD.js} +1 -1
  44. package/build/assets/{index-Dk05MMVQ-ZROGl5dG.js → index-DTykN4zG-Bxhd8idt.js} +1 -1
  45. package/build/assets/{index-D6yR1pA8-C0-kJ6Bz.js → index-DV29szBC-B2CEbIRH.js} +1 -1
  46. package/build/assets/{index-DE-Rg3QE-eG0zJJn8.js → index-DfRa51wX-Mc7dF5x1.js} +1 -1
  47. package/build/assets/{index-wXdUq_7J--4XuNFfI.js → index-DgYLMrUQ-tRG-LD_v.js} +1 -1
  48. package/build/assets/{index-B4dU8RRL-QuTU7dp3.js → index-Di5puO_--CqiV0ywo.js} +1 -1
  49. package/build/assets/{index-ClhODq1M-DUfGDbEi.js → index-Dj7MXPcv-nT5EfVwd.js} +1 -1
  50. package/build/assets/{index-86FKY3SR-GAsovcTH.js → index-DlV4h_p4-DqwBbw5_.js} +1 -1
  51. package/build/assets/{index-DmuMAiWB-BGkOpKfb.js → index-DnGo_A7H-BE-NsOfW.js} +1 -1
  52. package/build/assets/{index-CJcifvpp-CqixlSHI.js → index-HR_X9srR-BAYtFzZt.js} +1 -1
  53. package/build/assets/{index-C5hOYK-b-CDfEUvDR.js → index-TBJNdPHu-DT-qyCZS.js} +1 -1
  54. package/build/assets/{index-B1GzS8wP-BVHWU3EN.js → index-ZYgJQ_x8-1_8zzrU9.js} +1 -1
  55. package/build/assets/{index-BwEfMSwG-CvQYoItt.js → index-hTcF3gtQ-DxQnuRL_.js} +1 -1
  56. package/build/assets/{index-DtqQ0QT_-CymByJbd.js → index-vcKHNpuC-BSd57fPp.js} +1 -1
  57. package/build/assets/{inherits-CHhCwN_k-BN2PGj6j.js → inherits-Pmi26wgm-BX3RGE7G.js} +1 -1
  58. package/build/assets/{input-DjbrZONF-D-7fuXI2.js → input-BXGQ9mRm-CIPmPBGI.js} +1 -1
  59. package/build/assets/{memory-B3L1Fctl-DdOaGvHF.js → memory-B3L1Fctl-CHwR207P.js} +1 -1
  60. package/build/assets/{number-overlay-editor-jbR6fFWZ-C4ZPxc4R.js → number-overlay-editor-C_tZpFZY-CxWzCIFN.js} +1 -1
  61. package/build/assets/{sandbox-ChAzL-i--D-scXFSF.js → sandbox-ChAzL-i--wpcA3s4s.js} +1 -1
  62. package/build/assets/{slicedToArray-Bh3FRcm_-BQG060Uv.js → slicedToArray-BwzokRlj-E5mBrutT.js} +1 -1
  63. package/build/assets/{timepicker-Zb-gfcls-BvLvhDNx.js → timepicker-Buj3NwSV-DhVe9hFS.js} +1 -1
  64. package/build/assets/{uniqueId-zIZf20F6-D11mfTaK.js → uniqueId-Ct03yls4--ZtLtucJ.js} +1 -1
  65. package/build/assets/{useBasicWidgetState-BrKZEJpK-CxwkzeKG.js → useBasicWidgetState-KOlq_goV-CB6E7iWN.js} +1 -1
  66. package/build/assets/{useTextInputAutoExpand-NGyMMcIL-u7iGmO95.js → useTextInputAutoExpand-DWOWjQ4t-BoiRRHH6.js} +1 -1
  67. package/build/assets/{useUpdateUiValue-BHPP0ppl-jFtPQcBG.js → useUpdateUiValue-DoEkLcX2--ATHLwKP.js} +1 -1
  68. package/build/assets/{withFullScreenWrapper-66pmUMIV-CT4beZ0m.js → withFullScreenWrapper-B2V0S41O-DCzGUvSO.js} +1 -1
  69. package/build/electron/main.js +2 -2
  70. package/build/index.html +1 -1
  71. package/package.json +4 -4
  72. package/wheels/streamlit-1.50.0-cp313-none-any.whl +0 -0
@@ -1 +1 @@
1
- import{r as a,e as X,f as q,s as P,h as G,j as O,G as K,S as Q,i as Y,m as Z,n as ee,o as te,t as ne,l as J,E as B,_ as W,p as j,q as re,v as M,w as se,x as A,y as F,D as ae,z as ie,A as I,B as L,C as oe}from"./index-Bs9zibyE.js";import{v as ce,d as le}from"./withFullScreenWrapper-66pmUMIV-CT4beZ0m.js";import{X as k,R as H,y as ue}from"./Toolbar-DmNTasId-CQXwCpBc.js";import{T as fe}from"./index-CNntS3OC-D1QLB5uC.js";import{m as de}from"./FormClearHelper-FCPJEFCb-8WTdS9Fc.js";import"./sprintf-D5E86llw-6tzWM3a-.js";import"./checkbox-gyt_OEZr-DUZ4Njwr.js";import"./createDownloadLinkElement-CbRjLJ8e-NbV49OP9.js";import"./slicedToArray-Bh3FRcm_-BQG060Uv.js";import"./inherits-CHhCwN_k-BN2PGj6j.js";import"./createSuper-XjH7KYVR-huv_3l0M.js";import"./FileDownload.esm-CK4kq1fm-rUa3b6xk.js";var _=a.forwardRef(function(n,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,W({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),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"}))});_.displayName="InsertChart";var U=a.forwardRef(function(n,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,W({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"}))});U.displayName="TableChart";const me=20;function he(n){"params"in n&&"encoding"in n&&n.params.forEach(t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&t.select.type==="point"&&!("encodings"in t.select)&&M(t.select.encodings)&&(t.select.encodings=Object.keys(n.encoding)))})}const ge=(n,t,s,r,u,c,l,g)=>{const e=JSON.parse(n);if(r==="streamlit"?e.config=j(e.config,c):e.usermeta?.embedOptions?.theme==="streamlit"?(e.config=j(e.config,c),e.usermeta.embedOptions.theme=void 0):e.config=re(e.config,c),e.title&&(typeof e.title=="string"&&(e.title={text:e.title}),e.title.limit=e.title.limit??Math.max(l-40,0)),s&&(e.height=g),t&&(e.width=l,"vconcat"in e&&e.vconcat.forEach(d=>{d.width=l})),e.padding||(e.padding={}),M(e.padding.bottom)&&(e.padding.bottom=me),e.datasets)throw new Error("Datasets should not be passed as part of the spec");return u.length>0&&he(e),e},pe=(n,t,s,r,u)=>{const c=Z(),{id:l,formId:g,spec:e,data:d,datasets:i,vegaLiteTheme:f,selectionMode:o}=n,p=a.useMemo(()=>o,[JSON.stringify(o)]),v=a.useMemo(()=>ge(e,r,u,f,p,c,t,s),[e,r,u,f,p,c,t,s]);return{id:l,formId:g,vegaLiteTheme:f,spec:v,selectionMode:p,data:d,datasets:i,useContainerWidth:r}},we={DATAFRAME_INDEX:"(index)"};function ye(n){return!n||n.dimensions.numDataRows===0?null:z(n)}function ve(n){const t=D(n);if(M(t))return null;const s={};for(const[r,u]of Object.entries(t))s[r]=z(u);return s}function D(n){if(n?.length===0)return null;const t={};return n.forEach(s=>{if(!s)return;const r=s.hasName?s.name:null;t[r]=s.data}),t}function z(n,t=0){if(n.dimensions.numDataRows===0)return[];const s=[],{numDataRows:r,numDataColumns:u,numIndexColumns:c}=n.dimensions,l=n.columnTypes[0]??void 0,g=l&&l.type===ae.INDEX&&(ie(l)||I(l)||L(l));for(let e=t;e<r;e++){const d={};if(g){const{content:i}=n.getCell(e,0);d[we.DATAFRAME_INDEX]=typeof i=="bigint"?Number(i):i}for(let i=0;i<u;i++){const f=i+c,{content:o,contentType:p}=n.getCell(e,f);if((o instanceof Date||typeof o=="number"&&Number.isFinite(o))&&(I(p)||L(p))&&!oe(p)){const v=new Date(o).getTimezoneOffset()*60*1e3;d[n.columnNames[0][f]]=o.valueOf()+v}else d[n.columnNames[0][f]]=typeof o=="bigint"?Number(o):o}s.push(d)}return s}const be=150,Ce=J.getLogger("useVegaLiteSelections"),Ee=(n,t,s)=>{const{id:r,formId:u,selectionMode:c}=n,l=a.useCallback(e=>{c.forEach(i=>{e.addSignalListener(i,se(be,(f,o)=>{const p=e.getState({data:(w,y)=>c.some(E=>`${E}_store`===w),recurse:!1});A(p)&&t.setElementState(r,"viewState",p);let v=o;"vlPoint"in o&&"or"in o.vlPoint&&(v=o.vlPoint.or);const T={id:r,formId:u},h=JSON.parse(t.getStringValue(T)||"{}"),m={selection:{...h?.selection||{},[f]:v||{}}};F(h,m)||t.setStringValue(T,JSON.stringify(m),{fromUi:!0},s)}))});const d=t.getElementState(r,"viewState");if(A(d))try{return e.setState(d)}catch(i){Ce.warn("Failed to restore view state",i)}return e},[r,c,t,u,s]),g=a.useCallback(()=>{const e={selection:{}};c.forEach(o=>{e.selection[o]={}});const d={id:r,formId:u},i=t.getStringValue(d),f=i?JSON.parse(i):e;F(f,e)||t.setStringValue(d,JSON.stringify(e),{fromUi:!0},s)},[r,u,s,c,t]);return{maybeConfigureSelections:l,onFormCleared:g}},$="source",Se=J.getLogger("useVegaEmbed");function Ve(n,t,s){const r=a.useRef(null),u=a.useRef(null),c=a.useRef($),l=a.useRef(null),g=a.useRef([]),{maybeConfigureSelections:e,onFormCleared:d}=Ee(n,t,s);de({widgetMgr:t,element:n,onFormCleared:d});const{data:i,datasets:f}=n;a.useEffect(()=>{r.current===null&&(l.current=i,g.current=f)},[i,f]);const o=a.useCallback(()=>{u.current&&u.current(),u.current=null,r.current=null},[]),p=a.useCallback(async(h,m)=>{if(h.current===null)throw new Error("Element missing.");o();const w={ast:!0,expr:te,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:y,view:E,finalize:x}=await ee(h.current,m,w);r.current=e(E),u.current=x;const b=ve(g.current),S=b?Object.keys(b):[];if(S.length===1){const[C]=S;c.current=C}else S.length===0&&y.data&&(c.current=$);const V=ye(l.current);if(V&&r.current.insert(c.current,V),b)for(const[C,N]of Object.entries(b))r.current.insert(C,N);return await r.current.runAsync(),await r.current.resize().runAsync(),r.current},[o,e]),v=a.useCallback((h,m,w,y)=>{if(!y||y.dimensions.numDataRows===0){try{h.remove(m,ne)}finally{}return}if(!w||w.dimensions.numDataRows===0){h.insert(m,z(y));return}y.hash!==w.hash&&(h.data(m,z(y)),Se.info(`Had to clear the ${m} dataset before inserting data through Vega view.`))},[]),T=a.useCallback(async(h,m)=>{if(r.current===null)return null;const w=l.current,y=g.current;(w||h)&&v(r.current,c.current,w,h);const E=D(y)??{},x=D(m)??{};for(const[b,S]of Object.entries(x)){const V=b||c.current,C=E[V];v(r.current,V,C,S)}for(const b of Object.keys(E))!Object.hasOwn(x,b)&&b!==c.current&&v(r.current,b,null,null);return await r.current?.resize().runAsync(),l.current=h,g.current=m,r.current},[v]);return{createView:p,updateView:T,finalizeView:o}}function xe(n){try{const t=typeof n=="string"?JSON.parse(n):n;return!!(t.facet||t.encoding?.row||t.encoding?.column||t.encoding?.facet)}catch{return!1}}const Ne=({disableFullscreenMode:n,element:t,fragmentId:s,widgetMgr:r,widthConfig:u,heightConfig:c})=>{const[l,g]=a.useState(!1),[e,d]=a.useState(!1),{expanded:i,height:f,width:o,expand:p,collapse:v}=X(le),{width:T,height:h,elementRef:m}=q([l],0),w=P(u)||t.useContainerWidth,y=G(c),E=xe(t.spec),x=pe(t,E?o??0:T,(i?f:h)??0,i?!0:w,i?!0:y),{createView:b,updateView:S,finalizeView:V}=Ve(x,r,s),{data:C,datasets:N,spec:R}=x;return a.useLayoutEffect(()=>(m.current!==null&&b(m,R),V),[b,V,R,o,f,l,m]),a.useEffect(()=>{S(C,N)},[C,N,S]),a.useEffect(()=>{C||N?.[0]?.data?d(!0):d(!1)},[C,N]),l?O.jsx(fe,{data:C??N[0]?.data,height:f??h??void 0,customToolbarActions:[O.jsx(k,{label:"Show chart",icon:_,onClick:()=>{g(!1)}},"show-chart")]}):O.jsxs(H,{height:y?i?f:"100%":f,useContainerWidth:i?!0:w,children:[O.jsx(ue,{target:H,isFullScreen:i,onExpand:p,onCollapse:v,disableFullscreenMode:n,children:e&&O.jsx(k,{label:"Show data",icon:U,onClick:()=>{g(!0)}})}),O.jsx(K,{styles:Q}),O.jsx(Y,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:w,useContainerHeight:y,ref:m})]})},Oe=ce(Ne),$e=a.memo(Oe);export{Q as StyledVegaLiteChartTooltips,j as applyStreamlitTheme,$e as default};
1
+ import{r as a,e as X,f as q,s as P,h as G,j as O,G as K,S as Q,i as Y,m as Z,n as ee,o as te,t as ne,l as J,E as B,_ as W,p as j,q as re,v as M,w as se,x as A,y as F,D as ae,z as ie,A as I,B as L,C as oe}from"./index-CI5Lukhr.js";import{v as ce,d as le}from"./withFullScreenWrapper-B2V0S41O-DCzGUvSO.js";import{X as k,R as H,y as ue}from"./Toolbar-BPTl0_g8-DgJSJ3GD.js";import{T as fe}from"./index-8B5BiglZ-DvZZ_HIe.js";import{m as de}from"./FormClearHelper-7XVCWEDh-CHeSF048.js";import"./sprintf-D5E86llw-6tzWM3a-.js";import"./checkbox-4WgCYqx1-Bgkcmn0F.js";import"./createDownloadLinkElement-CbRjLJ8e-NbV49OP9.js";import"./slicedToArray-BwzokRlj-E5mBrutT.js";import"./inherits-Pmi26wgm-BX3RGE7G.js";import"./createSuper-dKmkwP0m-DxhpQ4SI.js";import"./FileDownload.esm-GWMXlTU--nCHLLVVG.js";var _=a.forwardRef(function(n,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,W({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),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"}))});_.displayName="InsertChart";var U=a.forwardRef(function(n,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,W({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"}))});U.displayName="TableChart";const me=20;function he(n){"params"in n&&"encoding"in n&&n.params.forEach(t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&t.select.type==="point"&&!("encodings"in t.select)&&M(t.select.encodings)&&(t.select.encodings=Object.keys(n.encoding)))})}const ge=(n,t,s,r,u,c,l,g)=>{const e=JSON.parse(n);if(r==="streamlit"?e.config=j(e.config,c):e.usermeta?.embedOptions?.theme==="streamlit"?(e.config=j(e.config,c),e.usermeta.embedOptions.theme=void 0):e.config=re(e.config,c),e.title&&(typeof e.title=="string"&&(e.title={text:e.title}),e.title.limit=e.title.limit??Math.max(l-40,0)),s&&(e.height=g),t&&(e.width=l,"vconcat"in e&&e.vconcat.forEach(d=>{d.width=l})),e.padding||(e.padding={}),M(e.padding.bottom)&&(e.padding.bottom=me),e.datasets)throw new Error("Datasets should not be passed as part of the spec");return u.length>0&&he(e),e},pe=(n,t,s,r,u)=>{const c=Z(),{id:l,formId:g,spec:e,data:d,datasets:i,vegaLiteTheme:f,selectionMode:o}=n,p=a.useMemo(()=>o,[JSON.stringify(o)]),v=a.useMemo(()=>ge(e,r,u,f,p,c,t,s),[e,r,u,f,p,c,t,s]);return{id:l,formId:g,vegaLiteTheme:f,spec:v,selectionMode:p,data:d,datasets:i,useContainerWidth:r}},we={DATAFRAME_INDEX:"(index)"};function ye(n){return!n||n.dimensions.numDataRows===0?null:z(n)}function ve(n){const t=D(n);if(M(t))return null;const s={};for(const[r,u]of Object.entries(t))s[r]=z(u);return s}function D(n){if(n?.length===0)return null;const t={};return n.forEach(s=>{if(!s)return;const r=s.hasName?s.name:null;t[r]=s.data}),t}function z(n,t=0){if(n.dimensions.numDataRows===0)return[];const s=[],{numDataRows:r,numDataColumns:u,numIndexColumns:c}=n.dimensions,l=n.columnTypes[0]??void 0,g=l&&l.type===ae.INDEX&&(ie(l)||I(l)||L(l));for(let e=t;e<r;e++){const d={};if(g){const{content:i}=n.getCell(e,0);d[we.DATAFRAME_INDEX]=typeof i=="bigint"?Number(i):i}for(let i=0;i<u;i++){const f=i+c,{content:o,contentType:p}=n.getCell(e,f);if((o instanceof Date||typeof o=="number"&&Number.isFinite(o))&&(I(p)||L(p))&&!oe(p)){const v=new Date(o).getTimezoneOffset()*60*1e3;d[n.columnNames[0][f]]=o.valueOf()+v}else d[n.columnNames[0][f]]=typeof o=="bigint"?Number(o):o}s.push(d)}return s}const be=150,Ce=J.getLogger("useVegaLiteSelections"),Ee=(n,t,s)=>{const{id:r,formId:u,selectionMode:c}=n,l=a.useCallback(e=>{c.forEach(i=>{e.addSignalListener(i,se(be,(f,o)=>{const p=e.getState({data:(w,y)=>c.some(E=>`${E}_store`===w),recurse:!1});A(p)&&t.setElementState(r,"viewState",p);let v=o;"vlPoint"in o&&"or"in o.vlPoint&&(v=o.vlPoint.or);const T={id:r,formId:u},h=JSON.parse(t.getStringValue(T)||"{}"),m={selection:{...h?.selection||{},[f]:v||{}}};F(h,m)||t.setStringValue(T,JSON.stringify(m),{fromUi:!0},s)}))});const d=t.getElementState(r,"viewState");if(A(d))try{return e.setState(d)}catch(i){Ce.warn("Failed to restore view state",i)}return e},[r,c,t,u,s]),g=a.useCallback(()=>{const e={selection:{}};c.forEach(o=>{e.selection[o]={}});const d={id:r,formId:u},i=t.getStringValue(d),f=i?JSON.parse(i):e;F(f,e)||t.setStringValue(d,JSON.stringify(e),{fromUi:!0},s)},[r,u,s,c,t]);return{maybeConfigureSelections:l,onFormCleared:g}},$="source",Se=J.getLogger("useVegaEmbed");function Ve(n,t,s){const r=a.useRef(null),u=a.useRef(null),c=a.useRef($),l=a.useRef(null),g=a.useRef([]),{maybeConfigureSelections:e,onFormCleared:d}=Ee(n,t,s);de({widgetMgr:t,element:n,onFormCleared:d});const{data:i,datasets:f}=n;a.useEffect(()=>{r.current===null&&(l.current=i,g.current=f)},[i,f]);const o=a.useCallback(()=>{u.current&&u.current(),u.current=null,r.current=null},[]),p=a.useCallback(async(h,m)=>{if(h.current===null)throw new Error("Element missing.");o();const w={ast:!0,expr:te,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:y,view:E,finalize:x}=await ee(h.current,m,w);r.current=e(E),u.current=x;const b=ve(g.current),S=b?Object.keys(b):[];if(S.length===1){const[C]=S;c.current=C}else S.length===0&&y.data&&(c.current=$);const V=ye(l.current);if(V&&r.current.insert(c.current,V),b)for(const[C,N]of Object.entries(b))r.current.insert(C,N);return await r.current.runAsync(),await r.current.resize().runAsync(),r.current},[o,e]),v=a.useCallback((h,m,w,y)=>{if(!y||y.dimensions.numDataRows===0){try{h.remove(m,ne)}finally{}return}if(!w||w.dimensions.numDataRows===0){h.insert(m,z(y));return}y.hash!==w.hash&&(h.data(m,z(y)),Se.info(`Had to clear the ${m} dataset before inserting data through Vega view.`))},[]),T=a.useCallback(async(h,m)=>{if(r.current===null)return null;const w=l.current,y=g.current;(w||h)&&v(r.current,c.current,w,h);const E=D(y)??{},x=D(m)??{};for(const[b,S]of Object.entries(x)){const V=b||c.current,C=E[V];v(r.current,V,C,S)}for(const b of Object.keys(E))!Object.hasOwn(x,b)&&b!==c.current&&v(r.current,b,null,null);return await r.current?.resize().runAsync(),l.current=h,g.current=m,r.current},[v]);return{createView:p,updateView:T,finalizeView:o}}function xe(n){try{const t=typeof n=="string"?JSON.parse(n):n;return!!(t.facet||t.encoding?.row||t.encoding?.column||t.encoding?.facet)}catch{return!1}}const Ne=({disableFullscreenMode:n,element:t,fragmentId:s,widgetMgr:r,widthConfig:u,heightConfig:c})=>{const[l,g]=a.useState(!1),[e,d]=a.useState(!1),{expanded:i,height:f,width:o,expand:p,collapse:v}=X(le),{width:T,height:h,elementRef:m}=q([l],0),w=P(u)||t.useContainerWidth,y=G(c),E=xe(t.spec),x=pe(t,E?o??0:T,(i?f:h)??0,i?!0:w,i?!0:y),{createView:b,updateView:S,finalizeView:V}=Ve(x,r,s),{data:C,datasets:N,spec:R}=x;return a.useLayoutEffect(()=>(m.current!==null&&b(m,R),V),[b,V,R,o,f,l,m]),a.useEffect(()=>{S(C,N)},[C,N,S]),a.useEffect(()=>{C||N?.[0]?.data?d(!0):d(!1)},[C,N]),l?O.jsx(fe,{data:C??N[0]?.data,height:f??h??void 0,customToolbarActions:[O.jsx(k,{label:"Show chart",icon:_,onClick:()=>{g(!1)}},"show-chart")]}):O.jsxs(H,{height:y?i?f:"100%":f,useContainerWidth:i?!0:w,children:[O.jsx(ue,{target:H,isFullScreen:i,onExpand:p,onCollapse:v,disableFullscreenMode:n,children:e&&O.jsx(k,{label:"Show data",icon:U,onClick:()=>{g(!0)}})}),O.jsx(K,{styles:Q}),O.jsx(Y,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:w,useContainerHeight:y,ref:m})]})},Oe=ce(Ne),$e=a.memo(Oe);export{Q as StyledVegaLiteChartTooltips,j as applyStreamlitTheme,$e as default};
@@ -1 +1 @@
1
- import{r as a,x as r,j as t,c as i,af as c,ag as d,v as l}from"./index-Bs9zibyE.js";const m=i("iframe",{target:"e1u6k47s0"})(({theme:e,disableScrolling:n})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:e.spacing.none,margin:e.spacing.none,overflow:n?"hidden":void 0}),"");function o(e){return l(e)||e===""?void 0:e}function g({element:e}){const n=o(e.src),s=r(n)?void 0:o(e.srcdoc);return t.jsx(m,{className:"stIFrame","data-testid":"stIFrame",allow:d,disableScrolling:!e.scrolling,src:n,srcDoc:s,scrolling:e.scrolling?"auto":"no",sandbox:c,title:"st.iframe",tabIndex:e.tabIndex??void 0})}const f=a.memo(g);export{f as default};
1
+ import{r as a,x as r,j as t,c as i,af as c,ag as d,v as l}from"./index-CI5Lukhr.js";const m=i("iframe",{target:"e1u6k47s0"})(({theme:e,disableScrolling:n})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:e.spacing.none,margin:e.spacing.none,overflow:n?"hidden":void 0}),"");function o(e){return l(e)||e===""?void 0:e}function g({element:e}){const n=o(e.src),s=r(n)?void 0:o(e.srcdoc);return t.jsx(m,{className:"stIFrame","data-testid":"stIFrame",allow:d,disableScrolling:!e.scrolling,src:n,srcDoc:s,scrolling:e.scrolling?"auto":"no",sandbox:c,title:"st.iframe",tabIndex:e.tabIndex??void 0})}const f=a.memo(g);export{f as default};
@@ -1 +1 @@
1
- import{r as i,j as m,bc as g,aJ as n}from"./index-Bs9zibyE.js";import{S as d}from"./useBasicWidgetState-BrKZEJpK-CxwkzeKG.js";import"./FormClearHelper-FCPJEFCb-8WTdS9Fc.js";const b=(e,t)=>e.getStringValue(t),f=e=>e.default??null,p=e=>e.value??null,S=(e,t,a,l)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},l)},c=({element:e,disabled:t,widgetMgr:a,fragmentId:l})=>{const[o,r]=d({getStateFromWidgetMgr:b,getDefaultStateFromProto:f,getCurrStateFromProto:p,updateWidgetMgrState:S,element:e,widgetMgr:a,fragmentId:l}),s=i.useCallback(u=>{r({value:u,fromUi:!0})},[r]);return m.jsx(g,{label:e.label,labelVisibility:n(e.labelVisibility?.value),help:e.help,onChange:s,disabled:t,value:o})},C=i.memo(c);export{C as default};
1
+ import{r as i,j as m,bc as g,aJ as n}from"./index-CI5Lukhr.js";import{S as d}from"./useBasicWidgetState-KOlq_goV-CB6E7iWN.js";import"./FormClearHelper-7XVCWEDh-CHeSF048.js";const b=(e,t)=>e.getStringValue(t),f=e=>e.default??null,p=e=>e.value??null,S=(e,t,a,l)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},l)},c=({element:e,disabled:t,widgetMgr:a,fragmentId:l})=>{const[o,r]=d({getStateFromWidgetMgr:b,getDefaultStateFromProto:f,getCurrStateFromProto:p,updateWidgetMgrState:S,element:e,widgetMgr:a,fragmentId:l}),s=i.useCallback(u=>{r({value:u,fromUi:!0})},[r]);return m.jsx(g,{label:e.label,labelVisibility:n(e.labelVisibility?.value),help:e.help,onChange:s,disabled:t,value:o})},C=i.memo(c);export{C as default};
@@ -1,2 +1,2 @@
1
- import{r as Tt,j as we,c as Xt}from"./index-Bs9zibyE.js";const{entries:yt,setPrototypeOf:ct,isFrozen:$t,getPrototypeOf:Kt,getOwnPropertyDescriptor:Vt}=Object;let{freeze:A,seal:b,create:xe}=Object,{apply:Ie,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(o){return o});b||(b=function(o){return o});Ie||(Ie=function(o,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),m=2;m<i;m++)a[m-2]=arguments[m];return o.apply(r,a)});Me||(Me=function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new o(...i)});const le=_(Array.prototype.forEach),Zt=_(Array.prototype.lastIndexOf),ut=_(Array.prototype.pop),X=_(Array.prototype.push),Qt=_(Array.prototype.splice),ce=_(String.prototype.toLowerCase),Ce=_(String.prototype.toString),De=_(String.prototype.match),$=_(String.prototype.replace),Jt=_(String.prototype.indexOf),en=_(String.prototype.trim),R=_(Object.prototype.hasOwnProperty),E=_(RegExp.prototype.test),K=tn(TypeError);function _(o){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),m=1;m<i;m++)a[m-1]=arguments[m];return Ie(o,r,a)}}function tn(o){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Me(o,i)}}function l(o,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ct&&ct(o,null);let a=r.length;for(;a--;){let m=r[a];if(typeof m=="string"){const w=i(m);w!==m&&($t(r)||(r[a]=w),m=w)}o[m]=!0}return o}function nn(o){for(let r=0;r<o.length;r++)R(o,r)||(o[r]=null);return o}function v(o){const r=xe(null);for(const[i,a]of yt(o))R(o,i)&&(Array.isArray(a)?r[i]=nn(a):a&&typeof a=="object"&&a.constructor===Object?r[i]=v(a):r[i]=a);return r}function V(o,r){for(;o!==null;){const a=Vt(o,r);if(a){if(a.get)return _(a.get);if(typeof a.value=="function")return _(a.value)}o=Kt(o)}function i(){return null}return i}const mt=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ke=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ve=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rn=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Le=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),on=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ft=A(["#text"]),pt=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Oe=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),dt=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),se=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),an=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=b(/<%[\w\W]*|[\w\W]*%>/gm),sn=b(/\$\{[\w\W]*/gm),cn=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=b(/^aria-[\-\w]+$/),Et=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=b(/^(?:\w+script|data):/i),fn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),At=b(/^html$/i),pn=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:fn,CUSTOM_ELEMENT:pn,DATA_ATTR:cn,DOCTYPE_NAME:At,ERB_EXPR:ln,IS_ALLOWED_URI:Et,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:an,TMPLIT_EXPR:sn});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},dn=function(){return typeof window>"u"?null:window},gn=function(o,r){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const m="dompurify"+(i?"#"+i:"");try{return o.createPolicy(m,{createHTML(w){return w},createScriptURL(w){return w}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _t(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dn();const r=e=>_t(e);if(r.version="3.3.0",r.removed=[],!o||!o.document||o.document.nodeType!==Z.document||!o.Element)return r.isSupported=!1,r;let{document:i}=o;const a=i,m=a.currentScript,{DocumentFragment:w,HTMLTemplateElement:bt,Node:ue,Element:He,NodeFilter:G,NamedNodeMap:St=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Nt,DOMParser:Rt,trustedTypes:Q}=o,W=He.prototype,wt=V(W,"cloneNode"),Ct=V(W,"remove"),Dt=V(W,"nextSibling"),kt=V(W,"childNodes"),J=V(W,"parentNode");if(typeof bt=="function"){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let T,B="";const{implementation:me,createNodeIterator:vt,createDocumentFragment:Lt,getElementsByTagName:Ot}=i,{importNode:xt}=a;let y=ht();r.isSupported=typeof yt=="function"&&typeof J=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:fe,ERB_EXPR:pe,TMPLIT_EXPR:de,DATA_ATTR:It,ARIA_ATTR:Mt,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:ze,CUSTOM_ELEMENT:Pt}=gt;let{IS_ALLOWED_URI:Fe}=gt,f=null;const Ge=l({},[...mt,...ke,...ve,...Le,...ft]);let d=null;const We=l({},[...pt,...Oe,...dt,...se]);let u=Object.seal(xe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,ge=null;const I=Object.seal(xe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,he=!0,Ye=!1,je=!0,M=!1,ee=!0,L=!1,Te=!1,ye=!1,U=!1,te=!1,ne=!1,qe=!0,Xe=!1;const Ht="user-content-";let Ee=!0,j=!1,P={},H=null;const $e=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Ve=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ze=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let z=C,_e=!1,be=null;const zt=l({},[re,oe,C],Ce);let ae=l({},["mi","mo","mn","ms","mtext"]),ie=l({},["annotation-xml"]);const Ft=l({},["title","style","font","a","script"]);let q=null;const Gt=["application/xhtml+xml","text/html"],Wt="text/html";let p=null,F=null;const Bt=i.createElement("form"),Qe=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(F&&F===e)){if((!e||typeof e!="object")&&(e={}),e=v(e),q=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,p=q==="application/xhtml+xml"?Ce:ce,f=R(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,p):Ge,d=R(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,p):We,be=R(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ce):zt,Ae=R(e,"ADD_URI_SAFE_ATTR")?l(v(Ze),e.ADD_URI_SAFE_ATTR,p):Ze,Ke=R(e,"ADD_DATA_URI_TAGS")?l(v(Ve),e.ADD_DATA_URI_TAGS,p):Ve,H=R(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,p):$e,Y=R(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,p):v({}),ge=R(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,p):v({}),P=R(e,"USE_PROFILES")?e.USE_PROFILES:!1,Be=e.ALLOW_ARIA_ATTR!==!1,he=e.ALLOW_DATA_ATTR!==!1,Ye=e.ALLOW_UNKNOWN_PROTOCOLS||!1,je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,M=e.SAFE_FOR_TEMPLATES||!1,ee=e.SAFE_FOR_XML!==!1,L=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,qe=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,Ee=e.KEEP_CONTENT!==!1,j=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||Et,z=e.NAMESPACE||C,ae=e.MATHML_TEXT_INTEGRATION_POINTS||ae,ie=e.HTML_INTEGRATION_POINTS||ie,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M&&(he=!1),te&&(U=!0),P&&(f=l({},ft),d=[],P.html===!0&&(l(f,mt),l(d,pt)),P.svg===!0&&(l(f,ke),l(d,Oe),l(d,se)),P.svgFilters===!0&&(l(f,ve),l(d,Oe),l(d,se)),P.mathMl===!0&&(l(f,Le),l(d,dt),l(d,se))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?I.tagCheck=e.ADD_TAGS:(f===Ge&&(f=v(f)),l(f,e.ADD_TAGS,p))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?I.attributeCheck=e.ADD_ATTR:(d===We&&(d=v(d)),l(d,e.ADD_ATTR,p))),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(H===$e&&(H=v(H)),l(H,e.FORBID_CONTENTS,p)),Ee&&(f["#text"]=!0),L&&l(f,["html","head","body"]),f.table&&(l(f,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=e.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=gn(Q,m)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));A&&A(e),F=e}},Je=l({},[...ke,...ve,...rn]),et=l({},[...Le,...on]),Yt=function(e){let n=J(e);(!n||!n.tagName)&&(n={namespaceURI:z,tagName:"template"});const t=ce(e.tagName),s=ce(n.tagName);return be[e.namespaceURI]?e.namespaceURI===oe?n.namespaceURI===C?t==="svg":n.namespaceURI===re?t==="svg"&&(s==="annotation-xml"||ae[s]):!!Je[t]:e.namespaceURI===re?n.namespaceURI===C?t==="math":n.namespaceURI===oe?t==="math"&&ie[s]:!!et[t]:e.namespaceURI===C?n.namespaceURI===oe&&!ie[s]||n.namespaceURI===re&&!ae[s]?!1:!et[t]&&(Ft[t]||!Je[t]):!!(q==="application/xhtml+xml"&&be[e.namespaceURI]):!1},O=function(e){X(r.removed,{element:e});try{J(e).removeChild(e)}catch{Ct(e)}},x=function(e,n){try{X(r.removed,{attribute:n.getAttributeNode(e),from:n})}catch{X(r.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is")if(U||te)try{O(n)}catch{}else try{n.setAttribute(e,"")}catch{}},tt=function(e){let n=null,t=null;if(ye)e="<remove></remove>"+e;else{const c=De(e,/^[\r\n\t ]+/);t=c&&c[0]}q==="application/xhtml+xml"&&z===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const s=T?T.createHTML(e):e;if(z===C)try{n=new Rt().parseFromString(s,q)}catch{}if(!n||!n.documentElement){n=me.createDocument(z,"template",null);try{n.documentElement.innerHTML=_e?B:s}catch{}}const g=n.body||n.documentElement;return e&&t&&g.insertBefore(i.createTextNode(t),g.childNodes[0]||null),z===C?Ot.call(n,L?"html":"body")[0]:L?n.documentElement:g},nt=function(e){return vt.call(e.ownerDocument||e,e,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Ne=function(e){return e instanceof Nt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof St)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},rt=function(e){return typeof ue=="function"&&e instanceof ue};function D(e,n,t){le(e,s=>{s.call(r,n,t,F)})}const ot=function(e){let n=null;if(D(y.beforeSanitizeElements,e,null),Ne(e))return O(e),!0;const t=p(e.nodeName);if(D(y.uponSanitizeElement,e,{tagName:t,allowedTags:f}),ee&&e.hasChildNodes()&&!rt(e.firstElementChild)&&E(/<[/\w!]/g,e.innerHTML)&&E(/<[/\w!]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ee&&e.nodeType===Z.comment&&E(/<[/\w]/g,e.data))return O(e),!0;if(!(I.tagCheck instanceof Function&&I.tagCheck(t))&&(!f[t]||Y[t])){if(!Y[t]&&it(t)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t)))return!1;if(Ee&&!H[t]){const s=J(e)||e.parentNode,g=kt(e)||e.childNodes;if(g&&s){const c=g.length;for(let k=c-1;k>=0;--k){const S=wt(g[k],!0);S.__removalCount=(e.__removalCount||0)+1,s.insertBefore(S,Dt(e))}}}return O(e),!0}return e instanceof He&&!Yt(e)||(t==="noscript"||t==="noembed"||t==="noframes")&&E(/<\/no(script|embed|frames)/i,e.innerHTML)?(O(e),!0):(M&&e.nodeType===Z.text&&(n=e.textContent,le([fe,pe,de],s=>{n=$(n,s," ")}),e.textContent!==n&&(X(r.removed,{element:e.cloneNode()}),e.textContent=n)),D(y.afterSanitizeElements,e,null),!1)},at=function(e,n,t){if(qe&&(n==="id"||n==="name")&&(t in i||t in Bt))return!1;if(!(he&&!ge[n]&&E(It,n))&&!(Be&&E(Mt,n))&&!(I.attributeCheck instanceof Function&&I.attributeCheck(n,e))){if(!d[n]||ge[n]){if(!(it(e)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&E(u.attributeNameCheck,n)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(n,e))||n==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t))))return!1}else if(!Ae[n]&&!E(Fe,$(t,ze,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&Jt(t,"data:")===0&&Ke[e])&&!(Ye&&!E(Ut,$(t,ze,"")))&&t)return!1}return!0},it=function(e){return e!=="annotation-xml"&&De(e,Pt)},lt=function(e){D(y.beforeSanitizeAttributes,e,null);const{attributes:n}=e;if(!n||Ne(e))return;const t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let s=n.length;for(;s--;){const g=n[s],{name:c,namespaceURI:k,value:S}=g,N=p(c),Re=S;let h=c==="value"?Re:en(Re);if(t.attrName=N,t.attrValue=h,t.keepAttr=!0,t.forceKeepAttr=void 0,D(y.uponSanitizeAttribute,e,t),h=t.attrValue,Xe&&(N==="id"||N==="name")&&(x(c,e),h=Ht+h),ee&&E(/((--!?|])>)|<\/(style|title|textarea)/i,h)){x(c,e);continue}if(N==="attributename"&&De(h,"href")){x(c,e);continue}if(t.forceKeepAttr)continue;if(!t.keepAttr){x(c,e);continue}if(!je&&E(/\/>/i,h)){x(c,e);continue}M&&le([fe,pe,de],qt=>{h=$(h,qt," ")});const st=p(e.nodeName);if(!at(st,N,h)){x(c,e);continue}if(T&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!k)switch(Q.getAttributeType(st,N)){case"TrustedHTML":{h=T.createHTML(h);break}case"TrustedScriptURL":{h=T.createScriptURL(h);break}}if(h!==Re)try{k?e.setAttributeNS(k,c,h):e.setAttribute(c,h),Ne(e)?O(e):ut(r.removed)}catch{x(c,e)}}D(y.afterSanitizeAttributes,e,null)},jt=function e(n){let t=null;const s=nt(n);for(D(y.beforeSanitizeShadowDOM,n,null);t=s.nextNode();)D(y.uponSanitizeShadowNode,t,null),ot(t),lt(t),t.content instanceof w&&e(t.content);D(y.afterSanitizeShadowDOM,n,null)};return r.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,s=null,g=null,c=null;if(_e=!e,_e&&(e="<!-->"),typeof e!="string"&&!rt(e))if(typeof e.toString=="function"){if(e=e.toString(),typeof e!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!r.isSupported)return e;if(Te||Se(n),r.removed=[],typeof e=="string"&&(j=!1),j){if(e.nodeName){const N=p(e.nodeName);if(!f[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof ue)t=tt("<!---->"),s=t.ownerDocument.importNode(e,!0),s.nodeType===Z.element&&s.nodeName==="BODY"||s.nodeName==="HTML"?t=s:t.appendChild(s);else{if(!U&&!M&&!L&&e.indexOf("<")===-1)return T&&ne?T.createHTML(e):e;if(t=tt(e),!t)return U?null:ne?B:""}t&&ye&&O(t.firstChild);const k=nt(j?e:t);for(;g=k.nextNode();)ot(g),lt(g),g.content instanceof w&&jt(g.content);if(j)return e;if(U){if(te)for(c=Lt.call(t.ownerDocument);t.firstChild;)c.appendChild(t.firstChild);else c=t;return(d.shadowroot||d.shadowrootmode)&&(c=xt.call(a,c,!0)),c}let S=L?t.outerHTML:t.innerHTML;return L&&f["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(At,t.ownerDocument.doctype.name)&&(S="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
1
+ import{r as Tt,j as we,c as Xt}from"./index-CI5Lukhr.js";const{entries:yt,setPrototypeOf:ct,isFrozen:$t,getPrototypeOf:Kt,getOwnPropertyDescriptor:Vt}=Object;let{freeze:A,seal:b,create:xe}=Object,{apply:Ie,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(o){return o});b||(b=function(o){return o});Ie||(Ie=function(o,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),m=2;m<i;m++)a[m-2]=arguments[m];return o.apply(r,a)});Me||(Me=function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new o(...i)});const le=_(Array.prototype.forEach),Zt=_(Array.prototype.lastIndexOf),ut=_(Array.prototype.pop),X=_(Array.prototype.push),Qt=_(Array.prototype.splice),ce=_(String.prototype.toLowerCase),Ce=_(String.prototype.toString),De=_(String.prototype.match),$=_(String.prototype.replace),Jt=_(String.prototype.indexOf),en=_(String.prototype.trim),R=_(Object.prototype.hasOwnProperty),E=_(RegExp.prototype.test),K=tn(TypeError);function _(o){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),m=1;m<i;m++)a[m-1]=arguments[m];return Ie(o,r,a)}}function tn(o){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Me(o,i)}}function l(o,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ct&&ct(o,null);let a=r.length;for(;a--;){let m=r[a];if(typeof m=="string"){const w=i(m);w!==m&&($t(r)||(r[a]=w),m=w)}o[m]=!0}return o}function nn(o){for(let r=0;r<o.length;r++)R(o,r)||(o[r]=null);return o}function v(o){const r=xe(null);for(const[i,a]of yt(o))R(o,i)&&(Array.isArray(a)?r[i]=nn(a):a&&typeof a=="object"&&a.constructor===Object?r[i]=v(a):r[i]=a);return r}function V(o,r){for(;o!==null;){const a=Vt(o,r);if(a){if(a.get)return _(a.get);if(typeof a.value=="function")return _(a.value)}o=Kt(o)}function i(){return null}return i}const mt=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ke=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ve=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rn=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Le=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),on=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ft=A(["#text"]),pt=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Oe=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),dt=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),se=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),an=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=b(/<%[\w\W]*|[\w\W]*%>/gm),sn=b(/\$\{[\w\W]*/gm),cn=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=b(/^aria-[\-\w]+$/),Et=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=b(/^(?:\w+script|data):/i),fn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),At=b(/^html$/i),pn=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:fn,CUSTOM_ELEMENT:pn,DATA_ATTR:cn,DOCTYPE_NAME:At,ERB_EXPR:ln,IS_ALLOWED_URI:Et,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:an,TMPLIT_EXPR:sn});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},dn=function(){return typeof window>"u"?null:window},gn=function(o,r){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const m="dompurify"+(i?"#"+i:"");try{return o.createPolicy(m,{createHTML(w){return w},createScriptURL(w){return w}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _t(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dn();const r=e=>_t(e);if(r.version="3.3.0",r.removed=[],!o||!o.document||o.document.nodeType!==Z.document||!o.Element)return r.isSupported=!1,r;let{document:i}=o;const a=i,m=a.currentScript,{DocumentFragment:w,HTMLTemplateElement:bt,Node:ue,Element:He,NodeFilter:G,NamedNodeMap:St=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Nt,DOMParser:Rt,trustedTypes:Q}=o,W=He.prototype,wt=V(W,"cloneNode"),Ct=V(W,"remove"),Dt=V(W,"nextSibling"),kt=V(W,"childNodes"),J=V(W,"parentNode");if(typeof bt=="function"){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let T,B="";const{implementation:me,createNodeIterator:vt,createDocumentFragment:Lt,getElementsByTagName:Ot}=i,{importNode:xt}=a;let y=ht();r.isSupported=typeof yt=="function"&&typeof J=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:fe,ERB_EXPR:pe,TMPLIT_EXPR:de,DATA_ATTR:It,ARIA_ATTR:Mt,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:ze,CUSTOM_ELEMENT:Pt}=gt;let{IS_ALLOWED_URI:Fe}=gt,f=null;const Ge=l({},[...mt,...ke,...ve,...Le,...ft]);let d=null;const We=l({},[...pt,...Oe,...dt,...se]);let u=Object.seal(xe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,ge=null;const I=Object.seal(xe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,he=!0,Ye=!1,je=!0,M=!1,ee=!0,L=!1,Te=!1,ye=!1,U=!1,te=!1,ne=!1,qe=!0,Xe=!1;const Ht="user-content-";let Ee=!0,j=!1,P={},H=null;const $e=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Ve=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ze=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let z=C,_e=!1,be=null;const zt=l({},[re,oe,C],Ce);let ae=l({},["mi","mo","mn","ms","mtext"]),ie=l({},["annotation-xml"]);const Ft=l({},["title","style","font","a","script"]);let q=null;const Gt=["application/xhtml+xml","text/html"],Wt="text/html";let p=null,F=null;const Bt=i.createElement("form"),Qe=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(F&&F===e)){if((!e||typeof e!="object")&&(e={}),e=v(e),q=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,p=q==="application/xhtml+xml"?Ce:ce,f=R(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,p):Ge,d=R(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,p):We,be=R(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ce):zt,Ae=R(e,"ADD_URI_SAFE_ATTR")?l(v(Ze),e.ADD_URI_SAFE_ATTR,p):Ze,Ke=R(e,"ADD_DATA_URI_TAGS")?l(v(Ve),e.ADD_DATA_URI_TAGS,p):Ve,H=R(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,p):$e,Y=R(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,p):v({}),ge=R(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,p):v({}),P=R(e,"USE_PROFILES")?e.USE_PROFILES:!1,Be=e.ALLOW_ARIA_ATTR!==!1,he=e.ALLOW_DATA_ATTR!==!1,Ye=e.ALLOW_UNKNOWN_PROTOCOLS||!1,je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,M=e.SAFE_FOR_TEMPLATES||!1,ee=e.SAFE_FOR_XML!==!1,L=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,qe=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,Ee=e.KEEP_CONTENT!==!1,j=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||Et,z=e.NAMESPACE||C,ae=e.MATHML_TEXT_INTEGRATION_POINTS||ae,ie=e.HTML_INTEGRATION_POINTS||ie,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M&&(he=!1),te&&(U=!0),P&&(f=l({},ft),d=[],P.html===!0&&(l(f,mt),l(d,pt)),P.svg===!0&&(l(f,ke),l(d,Oe),l(d,se)),P.svgFilters===!0&&(l(f,ve),l(d,Oe),l(d,se)),P.mathMl===!0&&(l(f,Le),l(d,dt),l(d,se))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?I.tagCheck=e.ADD_TAGS:(f===Ge&&(f=v(f)),l(f,e.ADD_TAGS,p))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?I.attributeCheck=e.ADD_ATTR:(d===We&&(d=v(d)),l(d,e.ADD_ATTR,p))),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(H===$e&&(H=v(H)),l(H,e.FORBID_CONTENTS,p)),Ee&&(f["#text"]=!0),L&&l(f,["html","head","body"]),f.table&&(l(f,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=e.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=gn(Q,m)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));A&&A(e),F=e}},Je=l({},[...ke,...ve,...rn]),et=l({},[...Le,...on]),Yt=function(e){let n=J(e);(!n||!n.tagName)&&(n={namespaceURI:z,tagName:"template"});const t=ce(e.tagName),s=ce(n.tagName);return be[e.namespaceURI]?e.namespaceURI===oe?n.namespaceURI===C?t==="svg":n.namespaceURI===re?t==="svg"&&(s==="annotation-xml"||ae[s]):!!Je[t]:e.namespaceURI===re?n.namespaceURI===C?t==="math":n.namespaceURI===oe?t==="math"&&ie[s]:!!et[t]:e.namespaceURI===C?n.namespaceURI===oe&&!ie[s]||n.namespaceURI===re&&!ae[s]?!1:!et[t]&&(Ft[t]||!Je[t]):!!(q==="application/xhtml+xml"&&be[e.namespaceURI]):!1},O=function(e){X(r.removed,{element:e});try{J(e).removeChild(e)}catch{Ct(e)}},x=function(e,n){try{X(r.removed,{attribute:n.getAttributeNode(e),from:n})}catch{X(r.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is")if(U||te)try{O(n)}catch{}else try{n.setAttribute(e,"")}catch{}},tt=function(e){let n=null,t=null;if(ye)e="<remove></remove>"+e;else{const c=De(e,/^[\r\n\t ]+/);t=c&&c[0]}q==="application/xhtml+xml"&&z===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const s=T?T.createHTML(e):e;if(z===C)try{n=new Rt().parseFromString(s,q)}catch{}if(!n||!n.documentElement){n=me.createDocument(z,"template",null);try{n.documentElement.innerHTML=_e?B:s}catch{}}const g=n.body||n.documentElement;return e&&t&&g.insertBefore(i.createTextNode(t),g.childNodes[0]||null),z===C?Ot.call(n,L?"html":"body")[0]:L?n.documentElement:g},nt=function(e){return vt.call(e.ownerDocument||e,e,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Ne=function(e){return e instanceof Nt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof St)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},rt=function(e){return typeof ue=="function"&&e instanceof ue};function D(e,n,t){le(e,s=>{s.call(r,n,t,F)})}const ot=function(e){let n=null;if(D(y.beforeSanitizeElements,e,null),Ne(e))return O(e),!0;const t=p(e.nodeName);if(D(y.uponSanitizeElement,e,{tagName:t,allowedTags:f}),ee&&e.hasChildNodes()&&!rt(e.firstElementChild)&&E(/<[/\w!]/g,e.innerHTML)&&E(/<[/\w!]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ee&&e.nodeType===Z.comment&&E(/<[/\w]/g,e.data))return O(e),!0;if(!(I.tagCheck instanceof Function&&I.tagCheck(t))&&(!f[t]||Y[t])){if(!Y[t]&&it(t)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t)))return!1;if(Ee&&!H[t]){const s=J(e)||e.parentNode,g=kt(e)||e.childNodes;if(g&&s){const c=g.length;for(let k=c-1;k>=0;--k){const S=wt(g[k],!0);S.__removalCount=(e.__removalCount||0)+1,s.insertBefore(S,Dt(e))}}}return O(e),!0}return e instanceof He&&!Yt(e)||(t==="noscript"||t==="noembed"||t==="noframes")&&E(/<\/no(script|embed|frames)/i,e.innerHTML)?(O(e),!0):(M&&e.nodeType===Z.text&&(n=e.textContent,le([fe,pe,de],s=>{n=$(n,s," ")}),e.textContent!==n&&(X(r.removed,{element:e.cloneNode()}),e.textContent=n)),D(y.afterSanitizeElements,e,null),!1)},at=function(e,n,t){if(qe&&(n==="id"||n==="name")&&(t in i||t in Bt))return!1;if(!(he&&!ge[n]&&E(It,n))&&!(Be&&E(Mt,n))&&!(I.attributeCheck instanceof Function&&I.attributeCheck(n,e))){if(!d[n]||ge[n]){if(!(it(e)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&E(u.attributeNameCheck,n)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(n,e))||n==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t))))return!1}else if(!Ae[n]&&!E(Fe,$(t,ze,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&Jt(t,"data:")===0&&Ke[e])&&!(Ye&&!E(Ut,$(t,ze,"")))&&t)return!1}return!0},it=function(e){return e!=="annotation-xml"&&De(e,Pt)},lt=function(e){D(y.beforeSanitizeAttributes,e,null);const{attributes:n}=e;if(!n||Ne(e))return;const t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let s=n.length;for(;s--;){const g=n[s],{name:c,namespaceURI:k,value:S}=g,N=p(c),Re=S;let h=c==="value"?Re:en(Re);if(t.attrName=N,t.attrValue=h,t.keepAttr=!0,t.forceKeepAttr=void 0,D(y.uponSanitizeAttribute,e,t),h=t.attrValue,Xe&&(N==="id"||N==="name")&&(x(c,e),h=Ht+h),ee&&E(/((--!?|])>)|<\/(style|title|textarea)/i,h)){x(c,e);continue}if(N==="attributename"&&De(h,"href")){x(c,e);continue}if(t.forceKeepAttr)continue;if(!t.keepAttr){x(c,e);continue}if(!je&&E(/\/>/i,h)){x(c,e);continue}M&&le([fe,pe,de],qt=>{h=$(h,qt," ")});const st=p(e.nodeName);if(!at(st,N,h)){x(c,e);continue}if(T&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!k)switch(Q.getAttributeType(st,N)){case"TrustedHTML":{h=T.createHTML(h);break}case"TrustedScriptURL":{h=T.createScriptURL(h);break}}if(h!==Re)try{k?e.setAttributeNS(k,c,h):e.setAttribute(c,h),Ne(e)?O(e):ut(r.removed)}catch{x(c,e)}}D(y.afterSanitizeAttributes,e,null)},jt=function e(n){let t=null;const s=nt(n);for(D(y.beforeSanitizeShadowDOM,n,null);t=s.nextNode();)D(y.uponSanitizeShadowNode,t,null),ot(t),lt(t),t.content instanceof w&&e(t.content);D(y.afterSanitizeShadowDOM,n,null)};return r.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,s=null,g=null,c=null;if(_e=!e,_e&&(e="<!-->"),typeof e!="string"&&!rt(e))if(typeof e.toString=="function"){if(e=e.toString(),typeof e!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!r.isSupported)return e;if(Te||Se(n),r.removed=[],typeof e=="string"&&(j=!1),j){if(e.nodeName){const N=p(e.nodeName);if(!f[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof ue)t=tt("<!---->"),s=t.ownerDocument.importNode(e,!0),s.nodeType===Z.element&&s.nodeName==="BODY"||s.nodeName==="HTML"?t=s:t.appendChild(s);else{if(!U&&!M&&!L&&e.indexOf("<")===-1)return T&&ne?T.createHTML(e):e;if(t=tt(e),!t)return U?null:ne?B:""}t&&ye&&O(t.firstChild);const k=nt(j?e:t);for(;g=k.nextNode();)ot(g),lt(g),g.content instanceof w&&jt(g.content);if(j)return e;if(U){if(te)for(c=Lt.call(t.ownerDocument);t.firstChild;)c.appendChild(t.firstChild);else c=t;return(d.shadowroot||d.shadowrootmode)&&(c=xt.call(a,c,!0)),c}let S=L?t.outerHTML:t.innerHTML;return L&&f["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(At,t.ownerDocument.doctype.name)&&(S="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
2
  `+S),M&&le([fe,pe,de],N=>{S=$(S,N," ")}),T&&ne?T.createHTML(S):S},r.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Se(e),Te=!0},r.clearConfig=function(){F=null,Te=!1},r.isValidAttribute=function(e,n,t){F||Se({});const s=p(e),g=p(n);return at(s,g,t)},r.addHook=function(e,n){typeof n=="function"&&X(y[e],n)},r.removeHook=function(e,n){if(n!==void 0){const t=Zt(y[e],n);return t===-1?void 0:Qt(y[e],t,1)[0]}return ut(y[e])},r.removeHooks=function(e){y[e]=[]},r.removeAllHooks=function(){y=ht()},r}var Pe=_t();const hn=Xt("div",{target:"e18540fl0"})({name:"1d3w5wq",styles:"width:100%"}),Ue="data-temp-href-target";Pe.addHook("beforeSanitizeAttributes",function(o){o instanceof HTMLElement&&o.hasAttribute("target")&&o.getAttribute("target")==="_blank"&&o.setAttribute(Ue,"_blank")});Pe.addHook("afterSanitizeAttributes",function(o){o instanceof HTMLElement&&o.hasAttribute(Ue)&&(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"),o.removeAttribute(Ue))});const Tn=o=>{const r={USE_PROFILES:{html:!0},FORCE_BODY:!0};return Pe.sanitize(o,r)};function yn({element:o}){const{body:r}=o,i=Tt.useMemo(()=>Tn(r),[r]);return we.jsx(we.Fragment,{children:i&&we.jsx(hn,{className:"stHtml","data-testid":"stHtml",dangerouslySetInnerHTML:{__html:i}})})}const An=Tt.memo(yn);export{An as default};