streamlit-nightly 1.45.2.dev20250519__py3-none-any.whl → 1.45.2.dev20250521__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/commands/execution_control.py +4 -3
- streamlit/components/v1/component_registry.py +7 -3
- streamlit/config.py +27 -24
- streamlit/config_option.py +10 -6
- streamlit/elements/arrow.py +4 -3
- streamlit/elements/lib/dialog.py +5 -2
- streamlit/elements/lib/image_utils.py +9 -7
- streamlit/elements/lib/mutable_status_container.py +4 -2
- streamlit/elements/map.py +5 -7
- streamlit/external/langchain/streamlit_callback_handler.py +4 -3
- streamlit/runtime/app_session.py +22 -15
- streamlit/runtime/fragment.py +2 -1
- streamlit/runtime/runtime.py +5 -3
- streamlit/runtime/scriptrunner/script_runner.py +20 -5
- streamlit/runtime/scriptrunner_utils/script_requests.py +4 -1
- streamlit/runtime/session_manager.py +2 -1
- streamlit/runtime/state/session_state.py +8 -2
- streamlit/runtime/websocket_session_manager.py +10 -6
- streamlit/source_util.py +5 -2
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.B2DOu8EH.js → ErrorOutline.esm.CYnuXr-f.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DstlwNHu.js → FileDownload.esm.CjkhjFuL.js} +1 -1
- streamlit/static/static/js/{FileHelper.BWWQqMOU.js → FileHelper.CvjfDg2R.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.BGe2ueaE.js → FormClearHelper.DieF97Af.js} +1 -1
- streamlit/static/static/js/{Hooks.tQYB--C2.js → Hooks.B1Hx6FYs.js} +1 -1
- streamlit/static/static/js/{InputInstructions.Clv91g7p.js → InputInstructions.B8AIK0e4.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BmywC1Dh.js → ProgressBar.BVxh16au.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CRlfBS_A.js → RenderInPortalIfExists.DRyuwMyI.js} +1 -1
- streamlit/static/static/js/{Toolbar.CxDjZGYY.js → Toolbar.3K8i84rX.js} +1 -1
- streamlit/static/static/js/{base-input.TLM9rFnB.js → base-input.C1EhHiwL.js} +1 -1
- streamlit/static/static/js/{checkbox.BvTs7ir2.js → checkbox.DQdrfkU_.js} +1 -1
- streamlit/static/static/js/{createSuper.CryPxxcx.js → createSuper.DTmFPsVr.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BYX_RT_W.js → data-grid-overlay-editor.CPiIqh8K.js} +1 -1
- streamlit/static/static/js/{downloader.C2cF4iLz.js → downloader.C4KaNzxK.js} +1 -1
- streamlit/static/static/js/{es6.BPpXtadL.js → es6.2nWKWyMO.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CAGxfaad.js → iframeResizer.contentWindow.DOVaChyF.js} +1 -1
- streamlit/static/static/js/{index.BJIk3rkJ.js → index.23pPuDjr.js} +1 -1
- streamlit/static/static/js/{index.D2rbVI1R.js → index.B-40SN8a.js} +1 -1
- streamlit/static/static/js/{index.D8v5LzMW.js → index.B0p5dBNu.js} +1 -1
- streamlit/static/static/js/{index.C8O0fRRc.js → index.BNYIeVmg.js} +1 -1
- streamlit/static/static/js/{index.DmD0Hg8e.js → index.BPnbqXpq.js} +1 -1
- streamlit/static/static/js/{index.tHSVhX7i.js → index.BT_313OI.js} +1 -1
- streamlit/static/static/js/{index.PsMi6f1B.js → index.BUb9IRAO.js} +1 -1
- streamlit/static/static/js/{index.BqP6-bem.js → index.BZrvTwVD.js} +1 -1
- streamlit/static/static/js/{index.CP9EMY2-.js → index.Bcm9abjs.js} +1 -1
- streamlit/static/static/js/{index.CfsV_XcR.js → index.Bh-zaqn6.js} +1 -1
- streamlit/static/static/js/{index.CnTzmxFX.js → index.Bu_wWseL.js} +1 -1
- streamlit/static/static/js/{index.VZh85EDG.js → index.BzBFnPX6.js} +1 -1
- streamlit/static/static/js/{index.PICOQqdk.js → index.C5QL_Xc_.js} +3 -3
- streamlit/static/static/js/{index.Cr1bZQOj.js → index.C6IpjREC.js} +10 -10
- streamlit/static/static/js/{index.D2U4aasb.js → index.C9oHDNvg.js} +1 -1
- streamlit/static/static/js/{index.CVDkaxGw.js → index.C9p4my_G.js} +1 -1
- streamlit/static/static/js/{index.1-29DVqv.js → index.CO8q3_vh.js} +1 -1
- streamlit/static/static/js/{index.B0YdZDVI.js → index.CR5G6E_h.js} +1 -1
- streamlit/static/static/js/{index.B5yAxnmX.js → index.CoUTSHXm.js} +1 -1
- streamlit/static/static/js/{index.BmU9sqeT.js → index.Csqhk1Jf.js} +1 -1
- streamlit/static/static/js/{index.CTXQmjSk.js → index.CxAOY3A6.js} +1 -1
- streamlit/static/static/js/{index.D5URUwlK.js → index.Cz7YuCRg.js} +1 -1
- streamlit/static/static/js/{index.CCWf3Q8a.js → index.Cz8OuaJg.js} +1 -1
- streamlit/static/static/js/{index.CJ1Mm4_5.js → index.D-7j7tdp.js} +1 -1
- streamlit/static/static/js/{index.CUpMOfPT.js → index.DBp4KGpt.js} +1 -1
- streamlit/static/static/js/{index.Q8LT3Yc8.js → index.DSTk15fA.js} +1 -1
- streamlit/static/static/js/{index.DprxqaP6.js → index.DSqmiAEF.js} +1 -1
- streamlit/static/static/js/{index.Cru7LoUn.js → index.DZ1uB38i.js} +1 -1
- streamlit/static/static/js/{index.BaIyE8V2.js → index.DerK8bdM.js} +1 -1
- streamlit/static/static/js/{index.ByFQchx0.js → index.Dh4ndZnq.js} +1 -1
- streamlit/static/static/js/{index.DQzP17_a.js → index.DucZyI7j.js} +1 -1
- streamlit/static/static/js/{index.Dh4NdvDT.js → index.DxkI2mS0.js} +1 -1
- streamlit/static/static/js/{index.TjQrtUrg.js → index.InQfrcIt.js} +1 -1
- streamlit/static/static/js/{index.BSmqXjy0.js → index.VSUuNjWj.js} +1 -1
- streamlit/static/static/js/{index.DFRfj6Kd.js → index.jOftLS0z.js} +1 -1
- streamlit/static/static/js/{index.BXj3r4Gs.js → index.mFs4Hj36.js} +1 -1
- streamlit/static/static/js/{index.DhlrCCaI.js → index.tW6ORFdt.js} +1 -1
- streamlit/static/static/js/{input.9JARw5iy.js → input.ut_XFtNH.js} +1 -1
- streamlit/static/static/js/{memory.k3bLbeHC.js → memory.DSoAMmQE.js} +1 -1
- streamlit/static/static/js/{mergeWith.DcuUmnJ3.js → mergeWith.BY-TWxsL.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DEI0ot7m.js → number-overlay-editor.D5sSj_3j.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.BkddCCrr.js → possibleConstructorReturn.BNBjNW5N.js} +1 -1
- streamlit/static/static/js/{sandbox.ZLSXrkQF.js → sandbox.BXmhoUqL.js} +1 -1
- streamlit/static/static/js/{textarea.DEIgwup5.js → textarea.qz8i3H9z.js} +1 -1
- streamlit/static/static/js/{timepicker.2xpM3pZh.js → timepicker.CZROecqL.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.D9L2gAvg.js → toConsumableArray.BoolbIbO.js} +1 -1
- streamlit/static/static/js/{uniqueId.C0bkQJ2c.js → uniqueId.DFKK3fms.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BWUuKz-P.js → useBasicWidgetState.QKx5EFIj.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.B_sYOzmC.js → useOnInputChange.CpgAX3wz.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.1A2DRT-e.js → withFullScreenWrapper.DrAgwq5e.js} +1 -1
- streamlit/testing/v1/element_tree.py +4 -0
- streamlit/testing/v1/local_script_runner.py +4 -4
- streamlit/web/cli.py +7 -5
- streamlit/web/server/oidc_mixin.py +0 -2
- {streamlit_nightly-1.45.2.dev20250519.dist-info → streamlit_nightly-1.45.2.dev20250521.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.2.dev20250519.dist-info → streamlit_nightly-1.45.2.dev20250521.dist-info}/RECORD +96 -96
- {streamlit_nightly-1.45.2.dev20250519.dist-info → streamlit_nightly-1.45.2.dev20250521.dist-info}/WHEEL +1 -1
- {streamlit_nightly-1.45.2.dev20250519.data → streamlit_nightly-1.45.2.dev20250521.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.2.dev20250519.dist-info → streamlit_nightly-1.45.2.dev20250521.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.2.dev20250519.dist-info → streamlit_nightly-1.45.2.dev20250521.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{r as i,E as J,_ as Q,n as g,B as ht,z as W,j as n,b5 as Z,br as ft,C as F,bm as tt,b0 as et,bl as T,aW as mt,bD as yt,bg as Ct,bE as v,bp as It,F as ot,bd as bt,bF as vt,M,bi as xt,bh as wt}from"./index.PICOQqdk.js";import{g as St,F as N,C as Ft,I as Et,E as Ut,a as zt,s as Tt,u as Ht,b as Bt}from"./FileHelper.BWWQqMOU.js";import{I as Dt}from"./InputInstructions.Clv91g7p.js";import{i as Rt}from"./inputUtils.CQWz5UKz.js";import{E as Lt}from"./ErrorOutline.esm.B2DOu8EH.js";import{a as q,U as nt}from"./UploadFileInfo.0DCkpDDf.js";import{T as Mt}from"./textarea.DEIgwup5.js";import"./base-input.TLM9rFnB.js";var at=i.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(J,Q({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});at.displayName="AttachFile";var rt=i.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(J,Q({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});rt.displayName="Send";const $t=g("div",{target:"e1togvvn0"})("border:none;position:relative;display:flex;"),kt=g("div",{target:"e1togvvn1"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}})),Vt=g("button",{target:"e1togvvn2"})(({theme:t,disabled:e,extended:s})=>{const p=ht(t),[f,u]=p?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:s?"0":t.radii.chatInput,borderTopLeftRadius:s?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?f:u,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:p?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray,cursor:"not-allowed"}}}),Nt=g("div",{target:"e1togvvn3"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"})),Wt=g("div",{target:"e1togvvn4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),At=g("div",{target:"e15560op0"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority})),Pt=g("div",{target:"e15560op1"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold})),Kt=g("div",{target:"e15560op2"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"})),Ot=g("div",{target:"e15560op3"})(({disabled:t})=>({pointerEvents:t?"none":"auto"})),_t=g("div",{target:"e15560op4"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),Xt=g("div",{target:"e15560op5"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),Gt=g("div",{target:"e15560op6"})({display:"flex"}),jt=g("div",{target:"e15560op7"})({flex:"0 0 auto"}),Yt=g("div",{target:"e15560op8"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),qt=g("div",{target:"e15560op9"})(({theme:t})=>({color:t.colors.fadedText60})),Jt=g("div",{target:"e15560op10"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Qt=g("div",{target:"e15560op11"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),Zt=g("small",{target:"e15560op12"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function te({children:t,content:e}){const s=W();return n(ft,{content:e,placement:Z.TOP,overrides:{Body:{style:{top:`-${s.sizes.minElementHeight}`}}},children:t})}const ee=({fileInfo:t})=>{const e=W(),{type:s}=t.status;switch(s){case"uploading":return n(yt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return n(te,{content:t.status.errorMessage,children:n(T,{color:e.colors.red,content:Lt,size:"lg"})});case"uploaded":return n(T,{content:Et,size:"lg"});default:return mt(s),null}},oe=({fileInfo:t,onDelete:e})=>F(Yt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[n(qt,{children:n(ee,{fileInfo:t})}),n(Jt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),n(Qt,{children:St(t.size,N.Byte)}),n(Zt,{"data-testid":"stChatInputDeleteBtn",children:n(tt,{onClick:()=>e(t.id),kind:et.MINIMAL,children:n(T,{content:Ft,size:"lg"})})})]}),ne=i.memo(oe),ae=({items:t,onDelete:e})=>n(Xt,{"data-testid":"stChatUploadedFiles",children:n(Gt,{children:t.map(s=>n(jt,{children:n(ne,{fileInfo:s,onDelete:e})},s.id))})}),re=i.memo(ae),ie=({getNextLocalFileId:t,addFiles:e,updateFile:s,uploadClient:p,element:f,onUploadProgress:u,onUploadComplete:I})=>(y,d)=>{const m=q.CancelToken.source(),c=new nt(d.name,d.size,t(),{type:"uploading",cancelToken:m,progress:1});e([c]),p.uploadFile({formId:"",...f},y.uploadUrl,d,h=>u(h,c.id),m.token).then(()=>I(c.id,y)).catch(h=>{q.isCancel(h)||s(c.id,c.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},se=({acceptMultipleFiles:t,maxFileSize:e,uploadClient:s,uploadFile:p,addFiles:f,getNextLocalFileId:u,deleteExistingFiles:I,onUploadComplete:y})=>(d,m)=>{if(!t&&d.length===0&&m.length>1){const c=m.findIndex(h=>{var x;return((x=h.errors)==null?void 0:x[0].code)===Ut.TooManyFiles});c>=0&&(d.push(m[c].file),m.splice(c,1))}if(!t&&d.length>0&&I(),s.fetchFileURLs(d).then(c=>{Ct(c,d).forEach(([h,x])=>{p(h,x)})}).catch(c=>{f(d.map(h=>new nt(h.name,h.size,u(),{type:"error",errorMessage:c})))}),m.length>0){const c=m.map(h=>zt(h,u(),e));f(c)}y()},le=({getRootProps:t,getInputProps:e,acceptFile:s,disabled:p,theme:f})=>F(Kt,{disabled:p,children:[F(Ot,{"data-testid":"stChatInputFileUploadButton",disabled:p,...t(),children:[n("input",{...e()}),n(It,{content:`Upload or drag and drop ${s===v.Multiple?"files":"a file"}`,placement:Z.TOP,onMouseEnterDelay:500,children:n(tt,{kind:et.MINIMAL,disabled:p,children:n(T,{content:at,size:"lg",color:p?f.colors.fadedText40:f.colors.fadedText60})})})]}),n(_t,{})]}),de=i.memo(le),ce=({getRootProps:t,getInputProps:e,acceptFile:s,inputHeight:p})=>F(ot,{children:[n(At,{height:p,...t(),children:n("input",{...e()})}),n(Pt,{height:p,children:`Drag and drop ${s===v.Multiple?"files":"a file"} here`})]}),pe=i.memo(ce),ue=6.5,$=1,k=(t,e,s)=>s.map(p=>p.id===t?e:p),V=(t,e)=>e.find(s=>s.id===t);function ge({disabled:t,element:e,widgetMgr:s,fragmentId:p,uploadClient:f}){const u=W(),{placeholder:I,maxChars:y}=e,d=i.useRef(null),m=i.useRef(0),c=i.useRef({minHeight:0,maxHeight:0}),[h,x]=bt(),[E,B]=i.useState(e.default),[U,D]=i.useState(0),[H,it]=i.useState(!1),[w,S]=i.useState([]),[z,R]=i.useState(!1),L=i.useMemo(()=>w.some(o=>o.status.type==="uploading")?!1:E!==""||w.length>0,[w,E]),b=vt(e.acceptFile),A=Tt(e.maxUploadSizeMb,N.Megabyte,N.Byte),P=i.useCallback(o=>S(a=>[...a,...o]),[]),K=i.useCallback(o=>{S(a=>{const l=V(o,a);return M(l)?a:(l.status.type==="uploading"&&l.status.cancelToken.cancel(),l.status.type==="uploaded"&&l.status.fileUrls.deleteUrl&&f.deleteFile(l.status.fileUrls.deleteUrl),a.filter(r=>r.id!==o))})},[f]),st=()=>{const o=w.filter(a=>a.status.type==="uploaded").map(a=>{const{name:l,size:r,status:C}=a,{fileId:ut,fileUrls:gt}=C;return new xt({fileId:ut,fileUrls:gt,name:l,size:r})});return new wt({uploadedFileInfo:o})},O=()=>m.current++,lt=se({acceptMultipleFiles:b===v.Multiple,maxFileSize:A,uploadClient:f,uploadFile:ie({getNextLocalFileId:O,addFiles:P,updateFile:(o,a)=>{S(l=>k(o,a,l))},uploadClient:f,element:e,onUploadProgress:(o,a)=>{S(l=>{const r=V(a,l);if(M(r)||r.status.type!=="uploading")return l;const C=Math.round(o.loaded*100/o.total);return r.status.progress===C?l:k(a,r.setStatus({type:"uploading",cancelToken:r.status.cancelToken,progress:C}),l)})},onUploadComplete:(o,a)=>{S(l=>{const r=V(o,l);return M(r)||r.status.type!=="uploading"?l:k(r.id,r.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}),l)})}}),addFiles:P,getNextLocalFileId:O,deleteExistingFiles:()=>w.forEach(o=>K(o.id)),onUploadComplete:()=>{d.current&&d.current.focus()}}),{getRootProps:_,getInputProps:X}=Ht({onDrop:lt,multiple:b===v.Multiple,accept:Bt(e.fileType),maxSize:A}),G=()=>{let o=0;const{current:a}=d;return a&&(a.style.height="auto",o=a.scrollHeight,a.style.height=""),o},j=()=>{if(d.current&&d.current.focus(),!L||t)return;const o={data:E,fileUploaderState:st()};s.setChatInputValue(e,o,{fromUi:!0},p),S([]),B(""),D(0)},dt=o=>{const{metaKey:a,ctrlKey:l,shiftKey:r}=o;Rt(o)&&!r&&!l&&!a&&(o.preventDefault(),j())},ct=o=>{const{value:a}=o.target;y!==0&&a.length>y||(B(a),D(G()))};i.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";B(o)}},[e]),i.useLayoutEffect(()=>{if(d.current){const{offsetHeight:o}=d.current;c.current.minHeight=o,c.current.maxHeight=o*ue}},[d]),i.useEffect(()=>{const o=r=>{var C;r.preventDefault(),r.stopPropagation(),!z&&((C=r.dataTransfer)!=null&&C.types.includes("Files"))&&R(!0)},a=r=>{r.preventDefault(),r.stopPropagation(),z&&(r.clientX<=0&&r.clientY<=0||r.clientX>=window.innerWidth&&r.clientY>=window.innerHeight)&&R(!1)},l=r=>{r.preventDefault(),r.stopPropagation(),z&&R(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",l),window.addEventListener("dragleave",a),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",l),window.removeEventListener("dragleave",a)}},[z]),i.useLayoutEffect(()=>{const{minHeight:o}=c.current;it(U>0&&d.current?Math.abs(U-o)>$:!1)},[U]),i.useLayoutEffect(()=>{D(G())},[I]);const{maxHeight:Y}=c.current,pt=b!==v.None&&z;return F(ot,{children:[b===v.None?null:n(re,{items:[...w],onDelete:K}),n($t,{className:"stChatInput","data-testid":"stChatInput",ref:x,children:pt?n(pe,{getRootProps:_,getInputProps:X,acceptFile:b,inputHeight:H?`${U+$}px`:u.sizes.minElementHeight}):F(kt,{extended:H,children:[b===v.None?null:n(de,{getRootProps:_,getInputProps:X,acceptFile:b,disabled:t,theme:u}),n(Mt,{inputRef:d,value:E,placeholder:I,onChange:ct,onKeyDown:dt,"aria-label":I,disabled:t,rows:1,overrides:{Root:{style:{minHeight:u.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:u.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:H?`${U+$}px`:"auto",maxHeight:Y?`${Y}px`:"none",paddingLeft:u.spacing.none,paddingBottom:u.spacing.sm,paddingTop:u.spacing.sm,paddingRight:`calc(${u.iconSizes.xl} + 2 * ${u.spacing.sm} + ${u.spacing.sm})`}}}}),h>u.breakpoints.hideWidgetDetails&&n(Wt,{children:n(Dt,{dirty:L,value:E,maxLength:y,type:"chat",inForm:!1})}),n(Nt,{children:n(Vt,{onClick:j,disabled:!L||t,extended:H,"data-testid":"stChatInputSubmitButton",children:n(T,{content:rt,size:"xl",color:"inherit"})})})]})})]})}const xe=i.memo(ge);export{xe as default};
|
1
|
+
import{r as i,E as J,_ as Q,n as g,B as ht,z as W,j as n,b5 as Z,br as ft,C as F,bm as tt,b0 as et,bl as T,aW as mt,bD as yt,bg as Ct,bE as v,bp as It,F as ot,bd as bt,bF as vt,M,bi as xt,bh as wt}from"./index.C5QL_Xc_.js";import{g as St,F as N,C as Ft,I as Et,E as Ut,a as zt,s as Tt,u as Ht,b as Bt}from"./FileHelper.CvjfDg2R.js";import{I as Dt}from"./InputInstructions.B8AIK0e4.js";import{i as Rt}from"./inputUtils.CQWz5UKz.js";import{E as Lt}from"./ErrorOutline.esm.CYnuXr-f.js";import{a as q,U as nt}from"./UploadFileInfo.0DCkpDDf.js";import{T as Mt}from"./textarea.qz8i3H9z.js";import"./base-input.C1EhHiwL.js";var at=i.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(J,Q({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});at.displayName="AttachFile";var rt=i.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(J,Q({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});rt.displayName="Send";const $t=g("div",{target:"e1togvvn0"})("border:none;position:relative;display:flex;"),kt=g("div",{target:"e1togvvn1"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}})),Vt=g("button",{target:"e1togvvn2"})(({theme:t,disabled:e,extended:s})=>{const p=ht(t),[f,u]=p?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:s?"0":t.radii.chatInput,borderTopLeftRadius:s?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?f:u,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:p?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray,cursor:"not-allowed"}}}),Nt=g("div",{target:"e1togvvn3"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"})),Wt=g("div",{target:"e1togvvn4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),At=g("div",{target:"e15560op0"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority})),Pt=g("div",{target:"e15560op1"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold})),Kt=g("div",{target:"e15560op2"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"})),Ot=g("div",{target:"e15560op3"})(({disabled:t})=>({pointerEvents:t?"none":"auto"})),_t=g("div",{target:"e15560op4"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),Xt=g("div",{target:"e15560op5"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),Gt=g("div",{target:"e15560op6"})({display:"flex"}),jt=g("div",{target:"e15560op7"})({flex:"0 0 auto"}),Yt=g("div",{target:"e15560op8"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),qt=g("div",{target:"e15560op9"})(({theme:t})=>({color:t.colors.fadedText60})),Jt=g("div",{target:"e15560op10"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Qt=g("div",{target:"e15560op11"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),Zt=g("small",{target:"e15560op12"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function te({children:t,content:e}){const s=W();return n(ft,{content:e,placement:Z.TOP,overrides:{Body:{style:{top:`-${s.sizes.minElementHeight}`}}},children:t})}const ee=({fileInfo:t})=>{const e=W(),{type:s}=t.status;switch(s){case"uploading":return n(yt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return n(te,{content:t.status.errorMessage,children:n(T,{color:e.colors.red,content:Lt,size:"lg"})});case"uploaded":return n(T,{content:Et,size:"lg"});default:return mt(s),null}},oe=({fileInfo:t,onDelete:e})=>F(Yt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[n(qt,{children:n(ee,{fileInfo:t})}),n(Jt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),n(Qt,{children:St(t.size,N.Byte)}),n(Zt,{"data-testid":"stChatInputDeleteBtn",children:n(tt,{onClick:()=>e(t.id),kind:et.MINIMAL,children:n(T,{content:Ft,size:"lg"})})})]}),ne=i.memo(oe),ae=({items:t,onDelete:e})=>n(Xt,{"data-testid":"stChatUploadedFiles",children:n(Gt,{children:t.map(s=>n(jt,{children:n(ne,{fileInfo:s,onDelete:e})},s.id))})}),re=i.memo(ae),ie=({getNextLocalFileId:t,addFiles:e,updateFile:s,uploadClient:p,element:f,onUploadProgress:u,onUploadComplete:I})=>(y,d)=>{const m=q.CancelToken.source(),c=new nt(d.name,d.size,t(),{type:"uploading",cancelToken:m,progress:1});e([c]),p.uploadFile({formId:"",...f},y.uploadUrl,d,h=>u(h,c.id),m.token).then(()=>I(c.id,y)).catch(h=>{q.isCancel(h)||s(c.id,c.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},se=({acceptMultipleFiles:t,maxFileSize:e,uploadClient:s,uploadFile:p,addFiles:f,getNextLocalFileId:u,deleteExistingFiles:I,onUploadComplete:y})=>(d,m)=>{if(!t&&d.length===0&&m.length>1){const c=m.findIndex(h=>{var x;return((x=h.errors)==null?void 0:x[0].code)===Ut.TooManyFiles});c>=0&&(d.push(m[c].file),m.splice(c,1))}if(!t&&d.length>0&&I(),s.fetchFileURLs(d).then(c=>{Ct(c,d).forEach(([h,x])=>{p(h,x)})}).catch(c=>{f(d.map(h=>new nt(h.name,h.size,u(),{type:"error",errorMessage:c})))}),m.length>0){const c=m.map(h=>zt(h,u(),e));f(c)}y()},le=({getRootProps:t,getInputProps:e,acceptFile:s,disabled:p,theme:f})=>F(Kt,{disabled:p,children:[F(Ot,{"data-testid":"stChatInputFileUploadButton",disabled:p,...t(),children:[n("input",{...e()}),n(It,{content:`Upload or drag and drop ${s===v.Multiple?"files":"a file"}`,placement:Z.TOP,onMouseEnterDelay:500,children:n(tt,{kind:et.MINIMAL,disabled:p,children:n(T,{content:at,size:"lg",color:p?f.colors.fadedText40:f.colors.fadedText60})})})]}),n(_t,{})]}),de=i.memo(le),ce=({getRootProps:t,getInputProps:e,acceptFile:s,inputHeight:p})=>F(ot,{children:[n(At,{height:p,...t(),children:n("input",{...e()})}),n(Pt,{height:p,children:`Drag and drop ${s===v.Multiple?"files":"a file"} here`})]}),pe=i.memo(ce),ue=6.5,$=1,k=(t,e,s)=>s.map(p=>p.id===t?e:p),V=(t,e)=>e.find(s=>s.id===t);function ge({disabled:t,element:e,widgetMgr:s,fragmentId:p,uploadClient:f}){const u=W(),{placeholder:I,maxChars:y}=e,d=i.useRef(null),m=i.useRef(0),c=i.useRef({minHeight:0,maxHeight:0}),[h,x]=bt(),[E,B]=i.useState(e.default),[U,D]=i.useState(0),[H,it]=i.useState(!1),[w,S]=i.useState([]),[z,R]=i.useState(!1),L=i.useMemo(()=>w.some(o=>o.status.type==="uploading")?!1:E!==""||w.length>0,[w,E]),b=vt(e.acceptFile),A=Tt(e.maxUploadSizeMb,N.Megabyte,N.Byte),P=i.useCallback(o=>S(a=>[...a,...o]),[]),K=i.useCallback(o=>{S(a=>{const l=V(o,a);return M(l)?a:(l.status.type==="uploading"&&l.status.cancelToken.cancel(),l.status.type==="uploaded"&&l.status.fileUrls.deleteUrl&&f.deleteFile(l.status.fileUrls.deleteUrl),a.filter(r=>r.id!==o))})},[f]),st=()=>{const o=w.filter(a=>a.status.type==="uploaded").map(a=>{const{name:l,size:r,status:C}=a,{fileId:ut,fileUrls:gt}=C;return new xt({fileId:ut,fileUrls:gt,name:l,size:r})});return new wt({uploadedFileInfo:o})},O=()=>m.current++,lt=se({acceptMultipleFiles:b===v.Multiple,maxFileSize:A,uploadClient:f,uploadFile:ie({getNextLocalFileId:O,addFiles:P,updateFile:(o,a)=>{S(l=>k(o,a,l))},uploadClient:f,element:e,onUploadProgress:(o,a)=>{S(l=>{const r=V(a,l);if(M(r)||r.status.type!=="uploading")return l;const C=Math.round(o.loaded*100/o.total);return r.status.progress===C?l:k(a,r.setStatus({type:"uploading",cancelToken:r.status.cancelToken,progress:C}),l)})},onUploadComplete:(o,a)=>{S(l=>{const r=V(o,l);return M(r)||r.status.type!=="uploading"?l:k(r.id,r.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}),l)})}}),addFiles:P,getNextLocalFileId:O,deleteExistingFiles:()=>w.forEach(o=>K(o.id)),onUploadComplete:()=>{d.current&&d.current.focus()}}),{getRootProps:_,getInputProps:X}=Ht({onDrop:lt,multiple:b===v.Multiple,accept:Bt(e.fileType),maxSize:A}),G=()=>{let o=0;const{current:a}=d;return a&&(a.style.height="auto",o=a.scrollHeight,a.style.height=""),o},j=()=>{if(d.current&&d.current.focus(),!L||t)return;const o={data:E,fileUploaderState:st()};s.setChatInputValue(e,o,{fromUi:!0},p),S([]),B(""),D(0)},dt=o=>{const{metaKey:a,ctrlKey:l,shiftKey:r}=o;Rt(o)&&!r&&!l&&!a&&(o.preventDefault(),j())},ct=o=>{const{value:a}=o.target;y!==0&&a.length>y||(B(a),D(G()))};i.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";B(o)}},[e]),i.useLayoutEffect(()=>{if(d.current){const{offsetHeight:o}=d.current;c.current.minHeight=o,c.current.maxHeight=o*ue}},[d]),i.useEffect(()=>{const o=r=>{var C;r.preventDefault(),r.stopPropagation(),!z&&((C=r.dataTransfer)!=null&&C.types.includes("Files"))&&R(!0)},a=r=>{r.preventDefault(),r.stopPropagation(),z&&(r.clientX<=0&&r.clientY<=0||r.clientX>=window.innerWidth&&r.clientY>=window.innerHeight)&&R(!1)},l=r=>{r.preventDefault(),r.stopPropagation(),z&&R(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",l),window.addEventListener("dragleave",a),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",l),window.removeEventListener("dragleave",a)}},[z]),i.useLayoutEffect(()=>{const{minHeight:o}=c.current;it(U>0&&d.current?Math.abs(U-o)>$:!1)},[U]),i.useLayoutEffect(()=>{D(G())},[I]);const{maxHeight:Y}=c.current,pt=b!==v.None&&z;return F(ot,{children:[b===v.None?null:n(re,{items:[...w],onDelete:K}),n($t,{className:"stChatInput","data-testid":"stChatInput",ref:x,children:pt?n(pe,{getRootProps:_,getInputProps:X,acceptFile:b,inputHeight:H?`${U+$}px`:u.sizes.minElementHeight}):F(kt,{extended:H,children:[b===v.None?null:n(de,{getRootProps:_,getInputProps:X,acceptFile:b,disabled:t,theme:u}),n(Mt,{inputRef:d,value:E,placeholder:I,onChange:ct,onKeyDown:dt,"aria-label":I,disabled:t,rows:1,overrides:{Root:{style:{minHeight:u.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:u.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:H?`${U+$}px`:"auto",maxHeight:Y?`${Y}px`:"none",paddingLeft:u.spacing.none,paddingBottom:u.spacing.sm,paddingTop:u.spacing.sm,paddingRight:`calc(${u.iconSizes.xl} + 2 * ${u.spacing.sm} + ${u.spacing.sm})`}}}}),h>u.breakpoints.hideWidgetDetails&&n(Wt,{children:n(Dt,{dirty:L,value:E,maxLength:y,type:"chat",inForm:!1})}),n(Nt,{children:n(Vt,{onClick:j,disabled:!L||t,extended:H,"data-testid":"stChatInputSubmitButton",children:n(T,{content:rt,size:"xl",color:"inherit"})})})]})})]})}const xe=i.memo(ge);export{xe as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as e,r as a,C as t,j as r,aC as o}from"./index.
|
1
|
+
import{n as e,r as a,C as t,j as r,aC as o}from"./index.C5QL_Xc_.js";import{P as i}from"./ProgressBar.BVxh16au.js";const l=e("div",{target:"e1675qd10"})(({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,4 +1,4 @@
|
|
1
|
-
var jU=Object.defineProperty;var $U=(r,e,t)=>e in r?jU(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var V=(r,e,t)=>$U(r,typeof e!="symbol"?e+"":e,t);import{r as Bt,at as yr,aT as dt,g as ih,aU as Tu,_ as NO,n as kO,B as UO,aD as zO,U as Q1,aV as lB,aA as WU,j as Df,F as JU,aE as XU,z as KU,C as uB,aW as YU,aX as fB}from"./index.
|
1
|
+
var jU=Object.defineProperty;var $U=(r,e,t)=>e in r?jU(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var V=(r,e,t)=>$U(r,typeof e!="symbol"?e+"":e,t);import{r as Bt,at as yr,aT as dt,g as ih,aU as Tu,_ as NO,n as kO,B as UO,aD as zO,U as Q1,aV as lB,aA as WU,j as Df,F as JU,aE as XU,z as KU,C as uB,aW as YU,aX as fB}from"./index.C5QL_Xc_.js";import{_ as ls,a as qU,C as ZU}from"./toConsumableArray.BoolbIbO.js";import{a as Wu,b as Ju,_ as qx,c as dA,d as Zx}from"./possibleConstructorReturn.BNBjNW5N.js";import{a as QU,T as e5}from"./Toolbar.3K8i84rX.js";import{E as GO,w as t5}from"./withFullScreenWrapper.DrAgwq5e.js";import{u as r5}from"./useBasicWidgetState.QKx5EFIj.js";import{u as n5,s as i5}from"./threshold.DjX0wlsa.js";import"./FormClearHelper.DieF97Af.js";import"./value.CgPGBV_l.js";function s5(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function Hm(r,e){if(!r)throw new Error(e||"loader assertion failed.")}const Qx=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hB&&parseFloat(hB[1]);const Pu=globalThis,Ea=globalThis.process||{},o5=globalThis.navigator||{};function VO(r){var n,i;if(typeof window<"u"&&((n=window.process)==null?void 0:n.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function rl(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||VO()}function a5(r){return rl()?VO()?"Electron":(o5.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const iy="4.1.0";function c5(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}let l5=class{constructor(e,t,n="sessionStorage"){this.storage=c5(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function u5(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function f5(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var jm;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(jm||(jm={}));const h5=10;function dB(r){return typeof r!="string"?r:(r=r.toUpperCase(),jm[r]||jm.WHITE)}function d5(r,e,t){return!rl&&typeof r=="string"&&(e&&(r=`\x1B[${dB(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${dB(t)+h5}m${r}\x1B[49m`)),r}function A5(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const o of n){const s=i[o];typeof s=="function"&&(e.find(c=>o===c)||(i[o]=s.bind(r)))}}function ew(r,e){if(!r)throw new Error("Assertion failed")}function id(){var e,t,n;let r;if(rl()&&Pu.performance)r=(t=(e=Pu==null?void 0:Pu.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in Ea){const i=(n=Ea==null?void 0:Ea.hrtime)==null?void 0:n.call(Ea);r=i[0]*1e3+i[1]/1e6}else r=Date.now();return r}const sd={debug:rl()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},p5={enabled:!0,level:0};function od(){}const AB={},pB={once:!0};let HO=class{constructor({id:e}={id:""}){this.VERSION=iy,this._startTs=id(),this._deltaTs=id(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new l5(`__probe-${this.id}__`,p5),this.timeStamp(`${this.id} started`),A5(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((id()-this._startTs).toPrecision(10))}getDelta(){return Number((id()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,sd.warn,arguments,pB)}error(e){return this._getLogFunction(0,e,sd.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,sd.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,sd.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,sd.debug||sd.info,arguments,pB)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||od,n&&[n],{tag:m5(t)}):od}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||od)}group(e,t,n={collapsed:!1}){const i=gB({logLevel:e,message:t,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||od)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=jO(e)}_getLogFunction(e,t,n,i,o){if(this._shouldLog(e)){o=gB({logLevel:e,message:t,args:i,opts:o}),n=n||o.method,ew(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=id();const s=o.tag||o.message;if(o.once&&s)if(!AB[s])AB[s]=id();else return od;return t=g5(this.id,o.message,o),n.bind(console,t,...o.args)}return od}};HO.VERSION=iy;function jO(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return ew(Number.isFinite(e)&&e>=0),e}function gB(r){const{logLevel:e,message:t}=r;r.logLevel=jO(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return ew(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function g5(r,e,t){if(typeof e=="string"){const n=t.time?f5(u5(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=d5(e,t.color,t.background)}return e}function m5(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}function _5(r,e){return $O(r||{},e)}function $O(r,e,t=0){if(t>3)return e;const n={...r};for(const[i,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?n[i]=$O(n[i]||{},e[i],t+1):n[i]=e[i];return n}const y5="latest";function v5(){var r;return(r=globalThis._loadersgl_)!=null&&r.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const b5=v5();function ku(r,e){if(!r)throw new Error(e||"loaders.gl assertion failed.")}const $f=typeof process!="object"||String(process)!=="[object process]"||process.browser,x5=typeof window<"u"&&typeof window.orientation<"u",mB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);mB&&parseFloat(mB[1]);let w5=class{constructor(e,t){V(this,"name");V(this,"workerThread");V(this,"isRunning",!0);V(this,"result");V(this,"_resolve",()=>{});V(this,"_reject",()=>{});this.name=e,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){ku(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){ku(this.isRunning),this.isRunning=!1,this._reject(e)}},Lv=class{terminate(){}};const Nv=new Map;function C5(r){ku(r.source&&!r.url||!r.source&&r.url);let e=Nv.get(r.source||r.url);return e||(r.url&&(e=E5(r.url),Nv.set(r.url,e)),r.source&&(e=WO(r.source),Nv.set(r.source,e))),ku(e),e}function E5(r){if(!r.startsWith("http"))return r;const e=T5(r);return WO(e)}function WO(r){const e=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(e)}function T5(r){return`try {
|
2
2
|
importScripts('${r}');
|
3
3
|
} catch (error) {
|
4
4
|
console.error(error);
|
@@ -1 +1 @@
|
|
1
|
-
import{r as f,z as T,B as C,j as n,C as y,bo as S,aC as L,bw as W,bp as B,b5 as w,bG as R,J as $,bH as E,bI as P}from"./index.
|
1
|
+
import{r as f,z as T,B as C,j as n,C as y,bo as S,aC as L,bw as W,bp as B,b5 as w,bG as R,J as $,bH as E,bI as P}from"./index.C5QL_Xc_.js";import{a as v}from"./useBasicWidgetState.QKx5EFIj.js";import{a as H,L as X,S as p}from"./checkbox.DQdrfkU_.js";import"./FormClearHelper.DieF97Af.js";function M({element:e,disabled:a,widgetMgr:s,fragmentId:d}){var m;const[x,g]=v({getStateFromWidgetMgr:V,getDefaultStateFromProto:I,getCurrStateFromProto:G,updateWidgetMgrState:j,element:e,widgetMgr:s,fragmentId:d}),k=f.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=T(),{colors:o,spacing:h,sizes:r}=t,b=C(t),u=a?o.fadedText40:o.bodyText;return n(P,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:n(H,{checked:x,disabled:a,onChange:k,"aria-label":e.label,checkmarkType:e.type===E.StyleType.TOGGLE?p.toggle:p.default,labelPlacement:X.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let c=b?o.bgColor:o.bodyText;return a&&(c=b?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${t.spacing.twoXS})`,height:`calc(${r.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:c,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:c})=>{let l=o.fadedText40;return c&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:c})=>{const l=c&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&c?`0 0 0 0.2rem ${$(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:u}}},children:y(R,{visibility:S((m=e.labelVisibility)==null?void 0:m.value),"data-testid":"stWidgetLabel",children:[n(L,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&n(W,{color:u,children:n(B,{content:e.help,placement:w.TOP_RIGHT})})]})})})}function V(e,a){return e.getBoolValue(a)}function I(e){return e.default??null}function G(e){return e.value??null}function j(e,a,s,d){a.setBoolValue(e,s.value,{fromUi:s.fromUi},d)}const A=f.memo(M);export{A as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{J as m8,n as y8,H as at,aG as b8,aH as WA,aI as x8,aJ as v8,aK as Va,aL as Ch,N as E8,z as w8,aD as Dk,r as St,M as Sx,ae as A8,ap as S8,al as GA,am as HA,X as C8,aM as $8,O as VA,aA as YA,l as Tk,C as _8,j as ym,aN as F8}from"./index.PICOQqdk.js";import{S as XA,T as k8}from"./Toolbar.CxDjZGYY.js";import{E as Mk,w as D8}from"./withFullScreenWrapper.1A2DRT-e.js";import{m as T8}from"./mergeWith.DcuUmnJ3.js";import{a as Pc,n as M8,b as O8,c as eg,t as ra,p as R8,d as N8,e as L8,i as us,f as tg,g as KA,l as rl,h as Cx,j as ng,k as JA,m as No,o as Cu,q as P8,r as ls,s as I8,u as z8,v as B8,w as U8}from"./threshold.DjX0wlsa.js";import{f as j8,a as fy,b as Ok,c as q8,R as ig,r as Rk,d as $x,e as _x,C as Fx,g as QA,h as ZA,i as rg,j as dy,n as en,k as mf,l as W8,m as G8,o as H8,p as V8,q as Y8,s as X8,t as K8,u as J8,v as Q8,w as Z8,x as e9,y as $h}from"./value.CgPGBV_l.js";import{P as t9,i as n9,a as i9,b as r9,p as kx,T as o9,n as s9,t as a9,d as u9}from"./timer.CAwTRJ_g.js";import{u as l9}from"./FormClearHelper.BGe2ueaE.js";const c9=e=>({"#vg-tooltip-element":{visibility:"hidden",position:"fixed",fontFamily:e.genericFonts.bodyFont,color:e.colors.bodyText,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,backgroundColor:m8(e.colors.bgColor,.05),fontSize:e.fontSizes.twoSm,boxShadow:"rgb(0 0 0 / 16%) 0px 1px 4px",maxWidth:e.sizes.maxChartTooltipWidth,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.default,zIndex:e.zIndices.popup,"&.visible":{visibility:"visible"},h2:{marginTop:e.spacing.none,marginBottom:e.spacing.sm,fontSize:e.fontSizes.sm},td:{border:"none"},table:{borderSpacing:0,tr:{border:"none",td:{overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.threeXS,paddingBottom:e.spacing.threeXS},"td.key":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.4)`,textAlign:"right",color:e.colors.fadedText60,whiteSpace:"nowrap",paddingRight:e.spacing.twoXS},"td.value":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.6)`,textAlign:"left",display:"-webkit-box",WebkitLineClamp:"5",WebkitBoxOrient:"vertical",lineClamp:"5",wordWrap:"break-word"}}}}}),f9=y8("div",{target:"e1d0pwhz0"})(({theme:e,useContainerWidth:t,isFullScreen:n})=>({width:t||n?"100%":"auto",height:n?"100%":"auto","&.vega-embed":{position:"relative",display:"inline-block",boxSizing:"border-box","details:not([open]) > :not(summary)":{display:"none !important"},"details[open] summary":{opacity:.7},"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&:hover summary, &:focus-within summary":{opacity:"1 !important",transition:"opacity 0.2s ease"},"&.has-actions":{paddingRight:0},".vega-actions":{position:"absolute",display:"flex",flexDirection:"column",paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,zIndex:e.zIndices.popup,top:`calc(${e.iconSizes.md} + 2 * ${e.spacing.xs} + ${e.spacing.xs})`,right:0,backgroundColor:e.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`${e.sizes.borderWidth} solid ${e.colors.fadedText10}`,animationDuration:"0.15s",animationName:"scale-in",animationTimingFunction:"cubic-bezier(0.2, 0, 0.13, 1.5)",textAlign:"left",borderRadius:e.radii.default,a:{fontFamily:e.genericFonts.bodyFont,fontWeight:e.fontWeights.normal,fontSize:e.fontSizes.md,margin:0,padding:`${e.spacing.twoXS} ${e.spacing.twoXL}`,color:e.colors.bodyText,whiteSpace:"nowrap",textDecoration:"none"},"a:hover, a:focus":{backgroundColor:e.colors.darkenedBgMix15,color:e.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},"@keyframes scale-in":{from:{opacity:0,transform:"scale(0.6)"},to:{opacity:1,transform:"scale(1)"}},".chart-wrapper":{"&.fit-x":{width:"100%"},"&.fit-y":{height:"100%"}},summary:{position:"absolute",top:0,right:0,opacity:0,listStyle:"none",cursor:"pointer",display:"list-item",padding:e.spacing.xs,height:"auto",zIndex:e.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:e.radii.default,color:e.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms",lineHeight:0,"&::-webkit-details-marker":{display:"none"},"&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:e.colors.bodyText,opacity:"1 !important",background:e.colors.darkenedBgMix15},svg:{width:e.iconSizes.md,height:e.iconSizes.md}}}}));function eS(e,t){const n={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:at(t.fontSizes.md),orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:at(t.fontSizes.md),titleColor:Va(t),titleFontStyle:"normal",labelFontSize:at(t.fontSizes.twoSm),labelFontWeight:t.fontWeights.normal,labelColor:Va(t),labelFontStyle:"normal"},axis:{labelFontSize:at(t.fontSizes.twoSm),labelFontWeight:t.fontWeights.normal,labelColor:Va(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:at(t.fontSizes.sm),titleColor:Va(t),titleFontStyle:"normal",ticks:!1,gridColor:Ch(t),domain:!1,domainWidth:1,domainColor:Ch(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:at(t.spacing.lg),labelPadding:at(t.spacing.lg),labelSeparation:at(t.spacing.twoXS),labelOverlap:!0},legend:{labelFontSize:at(t.fontSizes.sm),labelFontWeight:t.fontWeights.normal,labelColor:Va(t),titleFontSize:at(t.fontSizes.sm),titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:Va(t),titlePadding:5,labelPadding:at(t.spacing.lg),columnPadding:at(t.spacing.sm),rowPadding:at(t.spacing.twoXS),padding:7,symbolStrokeWidth:at(t.spacing.twoXS)},range:{category:v8(t),diverging:x8(t),ramp:WA(t),heatmap:WA(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:at(t.sizes.defaultChartHeight),continuousWidth:at(t.sizes.defaultChartWidth)},concat:{columns:1},facet:{columns:1},mark:{tooltip:{content:"encoding"},color:b8(t)},bar:{binSpacing:at(t.spacing.twoXS),discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?T8({},n,e,(i,r)=>Array.isArray(r)?r:void 0):n}function d9(e,t){const{colors:n,fontSizes:i,genericFonts:r}=t,o={labelFont:r.bodyFont,titleFont:r.bodyFont,labelFontSize:at(i.twoSm),titleFontSize:at(i.twoSm)},s={background:n.bgColor,axis:{labelColor:n.bodyText,titleColor:n.bodyText,gridColor:Ch(t),...o},legend:{labelColor:n.bodyText,titleColor:n.bodyText,...o},title:{color:n.bodyText,subtitleColor:n.bodyText,...o},header:{labelColor:n.bodyText,titleColor:n.bodyText,...o},view:{stroke:Ch(t),continuousHeight:at(t.sizes.defaultChartHeight),continuousWidth:at(t.sizes.defaultChartWidth)},mark:{tooltip:!0}};return e?E8({},s,e):s}const h9=20;function p9(e){"params"in e&&"encoding"in e&&e.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)&&Sx(t.select.encodings)&&(t.select.encodings=Object.keys(e.encoding)))})}const g9=(e,t,n,i,r,o,s,a)=>{var l,c;const u=JSON.parse(e);if(n==="streamlit"?u.config=eS(u.config,r):((c=(l=u.usermeta)==null?void 0:l.embedOptions)==null?void 0:c.theme)==="streamlit"?(u.config=eS(u.config,r),u.usermeta.embedOptions.theme=void 0):u.config=d9(u.config,r),o?(u.width=s,u.height=a,"vconcat"in u&&u.vconcat.forEach(f=>{f.width=s})):t&&(u.width=s,"vconcat"in u&&u.vconcat.forEach(f=>{f.width=s})),u.padding||(u.padding={}),Sx(u.padding.bottom)&&(u.padding.bottom=h9),u.datasets)throw new Error("Datasets should not be passed as part of the spec");return i.length>0&&p9(u),u},m9=e=>{const t=w8(),{expanded:n,width:i,height:r}=Dk(Mk),{id:o,formId:s,spec:a,data:u,datasets:l,useContainerWidth:c,vegaLiteTheme:f,selectionMode:d}=e,h=St.useMemo(()=>d,[JSON.stringify(d)]),p=St.useMemo(()=>g9(a,c,f,h,t,n,i||0,r),[a,c,f,h,t,n,i,r]);return{id:o,formId:s,vegaLiteTheme:f,spec:p,selectionMode:h,data:u,datasets:l,useContainerWidth:c}};function yo(e,t,n){return e.fields=t||[],e.fname=n,e}function y9(e){return e==null?null:e.fname}function Nk(e){return e==null?null:e.fields}function Lk(e){return e.length===1?b9(e[0]):x9(e)}const b9=e=>function(t){return t[e]},x9=e=>{const t=e.length;return function(n){for(let i=0;i<t;++i)n=n[e[i]];return n}};function Qd(e){throw Error(e)}function Dx(e){const t=[],n=e.length;let i=null,r=0,o="",s,a,u;e=e+"";function l(){t.push(o+e.substring(s,a)),o="",s=a+1}for(s=a=0;a<n;++a)if(u=e[a],u==="\\")o+=e.substring(s,a++),s=a;else if(u===i)l(),i=null,r=-1;else{if(i)continue;s===r&&u==='"'||s===r&&u==="'"?(s=a+1,i=u):u==="."&&!r?a>s?l():s=a+1:u==="["?(a>s&&l(),r=s=a+1):u==="]"&&(r||Qd("Access path missing open bracket: "+e),r>0&&l(),r=0,s=a+1)}return r&&Qd("Access path missing closing bracket: "+e),i&&Qd("Access path missing closing quote: "+e),a>s&&(a++,l()),t}function Tx(e,t,n){const i=Dx(e);return e=i.length===1?i[0]:e,yo((n&&n.get||Lk)(i),[e],t||e)}const v9=Tx("id"),Mx=yo(e=>e,[],"identity"),E9=yo(()=>0,[],"zero"),w9=yo(()=>1,[],"one"),Pk=yo(()=>!0,[],"true"),A9=yo(()=>!1,[],"false");function S9(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const Ik=0,zk=1,Bk=2,Uk=3,jk=4;function C9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S9,i=e||Ik;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=zk&&n(t||"error","ERROR",arguments),this},warn(){return i>=Bk&&n(t||"warn","WARN",arguments),this},info(){return i>=Uk&&n(t||"log","INFO",arguments),this},debug(){return i>=jk&&n(t||"log","DEBUG",arguments),this}}}var og=Array.isArray;function oa(e){return e===Object(e)}const tS=e=>e!=="__proto__";function Ox(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((i,r)=>{for(const o in r)if(o==="signals")i.signals=$9(i.signals,r.signals);else{const s=o==="legend"?{layout:1}:o==="style"?!0:null;sg(i,o,r[o],s)}return i},{})}function sg(e,t,n,i){if(!tS(t))return;let r,o;if(oa(n)&&!og(n)){o=oa(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?sg(o,r,n[r]):tS(r)&&(o[r]=n[r])}else e[t]=n}function $9(e,t){if(e==null)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function ol(e){return e[e.length-1]}function Rx(e){return e==null||e===""?null:+e}const qk=e=>t=>e*Math.exp(t),Wk=e=>t=>Math.log(e*t),Gk=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),Hk=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,_h=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function ag(e,t,n,i){const r=n(e[0]),o=n(ol(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function _9(e,t){return ag(e,t,Rx,Mx)}function F9(e,t){var n=Math.sign(e[0]);return ag(e,t,Wk(n),qk(n))}function k9(e,t,n){return ag(e,t,_h(n),_h(1/n))}function D9(e,t,n){return ag(e,t,Gk(n),Hk(n))}function ug(e,t,n,i,r){const o=i(e[0]),s=i(ol(e)),a=t!=null?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function T9(e,t,n){return ug(e,t,n,Rx,Mx)}function M9(e,t,n){const i=Math.sign(e[0]);return ug(e,t,n,Wk(i),qk(i))}function O9(e,t,n,i){return ug(e,t,n,_h(i),_h(1/i))}function R9(e,t,n,i){return ug(e,t,n,Gk(i),Hk(i))}function N9(e){return 1+~~(new Date(e).getMonth()/3)}function L9(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Ic(e){return e!=null?og(e)?e:[e]:[]}function P9(e,t,n){let i=e[0],r=e[1],o;return r<i&&(o=r,r=i,i=o),o=r-i,o>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function lg(e){return typeof e=="function"}const I9="descending";function z9(e,t,n){n=n||{},t=Ic(t)||[];const i=[],r=[],o={},s=n.comparator||B9;return Ic(e).forEach((a,u)=>{a!=null&&(i.push(t[u]===I9?-1:1),r.push(a=lg(a)?a:Tx(a,null,n)),(Nk(a)||[]).forEach(l=>o[l]=1))}),r.length===0?null:yo(s(r,i),Object.keys(o))}const Nx=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),B9=(e,t)=>e.length===1?U9(e[0],t[0]):j9(e,t,e.length),U9=(e,t)=>function(n,i){return Nx(e(n),e(i))*t},j9=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;s===0&&++a<n;)o=e[a],s=Nx(o(i),o(r));return s*t[a]});function q9(e){return lg(e)?e:()=>e}function W9(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function Lx(e){for(let t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e}function G9(e,t){let n=0,i,r,o,s;if(e&&(i=e.length))if(t==null){for(r=e[n];n<i&&(r==null||r!==r);r=e[++n]);for(o=s=r;n<i;++n)r=e[n],r!=null&&(r<o&&(o=r),r>s&&(s=r))}else{for(r=t(e[n]);n<i&&(r==null||r!==r);r=t(e[++n]));for(o=s=r;n<i;++n)r=t(e[n]),r!=null&&(r<o&&(o=r),r>s&&(s=r))}return[o,s]}function H9(e,t){const n=e.length;let i=-1,r,o,s,a,u;if(t==null){for(;++i<n;)if(o=e[i],o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=e[i],o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}else{for(;++i<n;)if(o=t(e[i],i,e),o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=t(e[i],i,e),o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}return[a,u]}const V9=Object.prototype.hasOwnProperty;function Hr(e,t){return V9.call(e,t)}const dd={};function Y9(e){let t={},n;function i(o){return Hr(t,o)&&t[o]!==dd}const r={size:0,empty:0,object:t,has:i,get(o){return i(o)?t[o]:void 0},set(o,s){return i(o)||(++r.size,t[o]===dd&&--r.empty),t[o]=s,this},delete(o){return i(o)&&(--r.size,++r.empty,t[o]=dd),this},clear(){r.size=r.empty=0,r.object=t={}},test(o){return arguments.length?(n=o,r):n},clean(){const o={};let s=0;for(const a in t){const u=t[a];u!==dd&&(!n||!n(u))&&(o[a]=u,++s)}r.size=s,r.empty=0,r.object=t=o}};return e&&Object.keys(e).forEach(o=>{r.set(o,e[o])}),r}function X9(e,t,n,i,r,o){if(!n&&n!==0)return o;const s=+n;let a=e[0],u=ol(e),l;u<a&&(l=a,a=u,u=l),l=Math.abs(t-a);const c=Math.abs(u-t);return l<c&&l<=s?i:c<=s?r:o}function K9(e,t,n){const i=e.prototype=Object.create(t.prototype);return Object.defineProperty(i,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),Lx(i,n)}function J9(e,t,n,i){let r=t[0],o=t[t.length-1],s;return r>o&&(s=r,r=o,o=s),n=n===void 0||n,i=i===void 0||i,(n?r<=e:r<e)&&(i?e<=o:e<o)}function Vk(e){return typeof e=="boolean"}function Yk(e){return Object.prototype.toString.call(e)==="[object Date]"}function Q9(e){return e&&lg(e[Symbol.iterator])}function Xk(e){return typeof e=="number"}function Z9(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function to(e){return typeof e=="string"}function eP(e,t,n){e&&(e=t?Ic(e).map(a=>a.replace(/\\(.)/g,"$1")):Ic(e));const i=e&&e.length,r=n&&n.get||Lk,o=a=>r(t?[a]:Dx(a));let s;if(!i)s=function(){return""};else if(i===1){const a=o(e[0]);s=function(u){return""+a(u)}}else{const a=e.map(o);s=function(u){let l=""+a[0](u),c=0;for(;++c<i;)l+="|"+a[c](u);return l}}return yo(s,e,"key")}function tP(e,t){const n=e[0],i=ol(e),r=+t;return r?r===1?i:n+r*(i-n):n}const nP=1e4;function iP(e){e=+e||nP;let t,n,i;const r=()=>{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>Hr(t,s)||Hr(n,s),get:s=>Hr(t,s)?t[s]:Hr(n,s)?o(s,n[s]):void 0,set:(s,a)=>Hr(t,s)?t[s]=a:o(s,a)}}function rP(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,u=0,l=0;for(;a<r&&u<o;++l)s[l]=e(t[a],n[u])>0?n[u++]:t[a++];for(;a<r;++a,++l)s[l]=t[a];for(;u<o;++u,++l)s[l]=n[u];return s}function Zl(e,t){let n="";for(;--t>=0;)n+=e;return n}function oP(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:i==="left"?Zl(r,s)+o:i==="center"?Zl(r,~~(s/2))+o+Zl(r,Math.ceil(s/2)):o+Zl(r,s)}function sP(e){return e&&ol(e)-e[0]||0}function gu(e){return og(e)?"["+e.map(gu)+"]":oa(e)||to(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function aP(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const uP=e=>Xk(e)||Yk(e)?e:Date.parse(e);function lP(e,t){return t=t||uP,e==null||e===""?null:t(e)}function cP(e){return e==null||e===""?null:e+""}function fP(e){const t={},n=e.length;for(let i=0;i<n;++i)t[e[i]]=!0;return t}function dP(e,t,n,i){const r=i??"…",o=e+"",s=o.length,a=Math.max(0,t-r.length);return s<=t?o:n==="left"?r+o.slice(s-a):n==="center"?o.slice(0,Math.ceil(a/2))+r+o.slice(s-~~(a/2)):o.slice(0,a)+r}function hP(e,t,n){if(e)if(t){const i=e.length;for(let r=0;r<i;++r){const o=t(e[r]);o&&n(o,r,e)}}else e.forEach(n)}function ri(e,t,n){return e.fields=t||[],e.fname=n,e}function lt(e){return e==null?null:e.fname}function xn(e){return e==null?null:e.fields}function Kk(e){return e.length===1?pP(e[0]):gP(e)}const pP=e=>function(t){return t[e]},gP=e=>{const t=e.length;return function(n){for(let i=0;i<t;++i)n=n[e[i]];return n}};function L(e){throw Error(e)}function Px(e){const t=[],n=e.length;let i=null,r=0,o="",s,a,u;e=e+"";function l(){t.push(o+e.substring(s,a)),o="",s=a+1}for(s=a=0;a<n;++a)if(u=e[a],u==="\\")o+=e.substring(s,a++),s=a;else if(u===i)l(),i=null,r=-1;else{if(i)continue;s===r&&u==='"'||s===r&&u==="'"?(s=a+1,i=u):u==="."&&!r?a>s?l():s=a+1:u==="["?(a>s&&l(),r=s=a+1):u==="]"&&(r||L("Access path missing open bracket: "+e),r>0&&l(),r=0,s=a+1)}return r&&L("Access path missing closing bracket: "+e),i&&L("Access path missing closing quote: "+e),a>s&&(a++,l()),t}function Li(e,t,n){const i=Px(e);return e=i.length===1?i[0]:e,ri((n&&n.get||Kk)(i),[e],t||e)}const cg=Li("id"),Ln=ri(e=>e,[],"identity"),zs=ri(()=>0,[],"zero"),yf=ri(()=>1,[],"one"),Pi=ri(()=>!0,[],"true"),As=ri(()=>!1,[],"false");function mP(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const yP=0,Jk=1,bP=2,xP=3,vP=4;function EP(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mP,i=e||yP;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=Jk&&n("error","ERROR",arguments),this},warn(){return i>=bP&&n("warn","WARN",arguments),this},info(){return i>=xP&&n("log","INFO",arguments),this},debug(){return i>=vP&&n("log","DEBUG",arguments),this}}}var Z=Array.isArray;function me(e){return e===Object(e)}const nS=e=>e!=="__proto__";function wP(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((i,r)=>{for(const o in r)if(o==="signals")i.signals=AP(i.signals,r.signals);else{const s=o==="legend"?{layout:1}:o==="style"?!0:null;Qk(i,o,r[o],s)}return i},{})}function Qk(e,t,n,i){if(!nS(t))return;let r,o;if(me(n)&&!Z(n)){o=me(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?Qk(o,r,n[r]):nS(r)&&(o[r]=n[r])}else e[t]=n}function AP(e,t){if(e==null)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function $e(e){return e[e.length-1]}function mn(e){return e==null||e===""?null:+e}const Zk=e=>t=>e*Math.exp(t),eD=e=>t=>Math.log(e*t),tD=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),nD=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Fh=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function fg(e,t,n,i){const r=n(e[0]),o=n($e(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function SP(e,t){return fg(e,t,mn,Ln)}function CP(e,t){var n=Math.sign(e[0]);return fg(e,t,eD(n),Zk(n))}function $P(e,t,n){return fg(e,t,Fh(n),Fh(1/n))}function _P(e,t,n){return fg(e,t,tD(n),nD(n))}function dg(e,t,n,i,r){const o=i(e[0]),s=i($e(e)),a=t!=null?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function iD(e,t,n){return dg(e,t,n,mn,Ln)}function rD(e,t,n){const i=Math.sign(e[0]);return dg(e,t,n,eD(i),Zk(i))}function hy(e,t,n,i){return dg(e,t,n,Fh(i),Fh(1/i))}function oD(e,t,n,i){return dg(e,t,n,tD(i),nD(i))}function FP(e){return 1+~~(new Date(e).getMonth()/3)}function kP(e){return 1+~~(new Date(e).getUTCMonth()/3)}function oe(e){return e!=null?Z(e)?e:[e]:[]}function DP(e,t,n){let i=e[0],r=e[1],o;return r<i&&(o=r,r=i,i=o),o=r-i,o>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function be(e){return typeof e=="function"}const TP="descending";function sD(e,t,n){n=n||{},t=oe(t)||[];const i=[],r=[],o={},s=n.comparator||MP;return oe(e).forEach((a,u)=>{a!=null&&(i.push(t[u]===TP?-1:1),r.push(a=be(a)?a:Li(a,null,n)),(xn(a)||[]).forEach(l=>o[l]=1))}),r.length===0?null:ri(s(r,i),Object.keys(o))}const bf=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),MP=(e,t)=>e.length===1?OP(e[0],t[0]):RP(e,t,e.length),OP=(e,t)=>function(n,i){return bf(e(n),e(i))*t},RP=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;s===0&&++a<n;)o=e[a],s=bf(o(i),o(r));return s*t[a]});function wn(e){return be(e)?e:()=>e}function aD(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function ye(e){for(let t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e}function lo(e,t){let n=0,i,r,o,s;if(e&&(i=e.length))if(t==null){for(r=e[n];n<i&&(r==null||r!==r);r=e[++n]);for(o=s=r;n<i;++n)r=e[n],r!=null&&(r<o&&(o=r),r>s&&(s=r))}else{for(r=t(e[n]);n<i&&(r==null||r!==r);r=t(e[++n]));for(o=s=r;n<i;++n)r=t(e[n]),r!=null&&(r<o&&(o=r),r>s&&(s=r))}return[o,s]}function NP(e,t){const n=e.length;let i=-1,r,o,s,a,u;if(t==null){for(;++i<n;)if(o=e[i],o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=e[i],o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}else{for(;++i<n;)if(o=t(e[i],i,e),o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=t(e[i],i,e),o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}return[a,u]}function le(e,t){return Object.hasOwn(e,t)}const hd={};function xf(e){let t={},n;function i(o){return le(t,o)&&t[o]!==hd}const r={size:0,empty:0,object:t,has:i,get(o){return i(o)?t[o]:void 0},set(o,s){return i(o)||(++r.size,t[o]===hd&&--r.empty),t[o]=s,this},delete(o){return i(o)&&(--r.size,++r.empty,t[o]=hd),this},clear(){r.size=r.empty=0,r.object=t={}},test(o){return arguments.length?(n=o,r):n},clean(){const o={};let s=0;for(const a in t){const u=t[a];u!==hd&&(!n||!n(u))&&(o[a]=u,++s)}r.size=s,r.empty=0,r.object=t=o}};return e&&Object.keys(e).forEach(o=>{r.set(o,e[o])}),r}function LP(e,t,n,i,r,o){if(!n&&n!==0)return o;const s=+n;let a=e[0],u=$e(e),l;u<a&&(l=a,a=u,u=l),l=Math.abs(t-a);const c=Math.abs(u-t);return l<c&&l<=s?i:c<=s?r:o}function G(e,t,n){const i=e.prototype=Object.create(t.prototype);return Object.defineProperty(i,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),ye(i,n)}function ec(e,t,n,i){let r=t[0],o=t[t.length-1],s;return r>o&&(s=r,r=o,o=s),n=n===void 0||n,i=i===void 0||i,(n?r<=e:r<e)&&(i?e<=o:e<o)}function PP(e){return typeof e=="boolean"}function Ys(e){return Object.prototype.toString.call(e)==="[object Date]"}function IP(e){return e&&be(e[Symbol.iterator])}function sa(e){return typeof e=="number"}function uD(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Ke(e){return typeof e=="string"}function lD(e,t,n){e&&(e=t?oe(e).map(a=>a.replace(/\\(.)/g,"$1")):oe(e));const i=e&&e.length,r=n&&n.get||Kk,o=a=>r(t?[a]:Px(a));let s;if(!i)s=function(){return""};else if(i===1){const a=o(e[0]);s=function(u){return""+a(u)}}else{const a=e.map(o);s=function(u){let l=""+a[0](u),c=0;for(;++c<i;)l+="|"+a[c](u);return l}}return ri(s,e,"key")}function zP(e,t){const n=e[0],i=$e(e),r=+t;return r?r===1?i:n+r*(i-n):n}const BP=1e4;function UP(e){e=+e||BP;let t,n,i;const r=()=>{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>le(t,s)||le(n,s),get:s=>le(t,s)?t[s]:le(n,s)?o(s,n[s]):void 0,set:(s,a)=>le(t,s)?t[s]=a:o(s,a)}}function jP(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,u=0,l=0;for(;a<r&&u<o;++l)s[l]=e(t[a],n[u])>0?n[u++]:t[a++];for(;a<r;++a,++l)s[l]=t[a];for(;u<o;++u,++l)s[l]=n[u];return s}function pd(e,t){let n="";for(;--t>=0;)n+=e;return n}function qP(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:i==="left"?pd(r,s)+o:i==="center"?pd(r,~~(s/2))+o+pd(r,Math.ceil(s/2)):o+pd(r,s)}function hg(e){return e&&$e(e)-e[0]||0}function re(e){return Z(e)?"["+e.map(re)+"]":me(e)||Ke(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function cD(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const WP=e=>sa(e)||Ys(e)?e:Date.parse(e);function fD(e,t){return t=t||WP,e==null||e===""?null:t(e)}function dD(e){return e==null||e===""?null:e+""}function yr(e){const t={},n=e.length;for(let i=0;i<n;++i)t[e[i]]=!0;return t}function GP(e,t,n,i){const r=i??"…",o=e+"",s=o.length,a=Math.max(0,t-r.length);return s<=t?o:n==="left"?r+o.slice(s-a):n==="center"?o.slice(0,Math.ceil(a/2))+r+o.slice(s-~~(a/2)):o.slice(0,a)+r}function Ls(e,t,n){if(e)if(t){const i=e.length;for(let r=0;r<i;++r){const o=t(e[r]);o&&n(o,r,e)}}else e.forEach(n)}var iS={},bm={},xm=34,Fl=10,vm=13;function hD(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function HP(e,t){var n=hD(e);return function(i,r){return t(n(i),r,e)}}function rS(e){var t=Object.create(null),n=[];return e.forEach(function(i){for(var r in i)r in t||n.push(t[r]=r)}),n}function Fn(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function VP(e){return e<0?"-"+Fn(-e,6):e>9999?"+"+Fn(e,6):Fn(e,4)}function YP(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),i=e.getUTCSeconds(),r=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":VP(e.getUTCFullYear())+"-"+Fn(e.getUTCMonth()+1,2)+"-"+Fn(e.getUTCDate(),2)+(r?"T"+Fn(t,2)+":"+Fn(n,2)+":"+Fn(i,2)+"."+Fn(r,3)+"Z":i?"T"+Fn(t,2)+":"+Fn(n,2)+":"+Fn(i,2)+"Z":n||t?"T"+Fn(t,2)+":"+Fn(n,2)+"Z":"")}function XP(e){var t=new RegExp('["'+e+`
|
1
|
+
import{J as m8,n as y8,H as at,aG as b8,aH as WA,aI as x8,aJ as v8,aK as Va,aL as Ch,N as E8,z as w8,aD as Dk,r as St,M as Sx,ae as A8,ap as S8,al as GA,am as HA,X as C8,aM as $8,O as VA,aA as YA,l as Tk,C as _8,j as ym,aN as F8}from"./index.C5QL_Xc_.js";import{S as XA,T as k8}from"./Toolbar.3K8i84rX.js";import{E as Mk,w as D8}from"./withFullScreenWrapper.DrAgwq5e.js";import{m as T8}from"./mergeWith.BY-TWxsL.js";import{a as Pc,n as M8,b as O8,c as eg,t as ra,p as R8,d as N8,e as L8,i as us,f as tg,g as KA,l as rl,h as Cx,j as ng,k as JA,m as No,o as Cu,q as P8,r as ls,s as I8,u as z8,v as B8,w as U8}from"./threshold.DjX0wlsa.js";import{f as j8,a as fy,b as Ok,c as q8,R as ig,r as Rk,d as $x,e as _x,C as Fx,g as QA,h as ZA,i as rg,j as dy,n as en,k as mf,l as W8,m as G8,o as H8,p as V8,q as Y8,s as X8,t as K8,u as J8,v as Q8,w as Z8,x as e9,y as $h}from"./value.CgPGBV_l.js";import{P as t9,i as n9,a as i9,b as r9,p as kx,T as o9,n as s9,t as a9,d as u9}from"./timer.CAwTRJ_g.js";import{u as l9}from"./FormClearHelper.DieF97Af.js";const c9=e=>({"#vg-tooltip-element":{visibility:"hidden",position:"fixed",fontFamily:e.genericFonts.bodyFont,color:e.colors.bodyText,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,backgroundColor:m8(e.colors.bgColor,.05),fontSize:e.fontSizes.twoSm,boxShadow:"rgb(0 0 0 / 16%) 0px 1px 4px",maxWidth:e.sizes.maxChartTooltipWidth,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.default,zIndex:e.zIndices.popup,"&.visible":{visibility:"visible"},h2:{marginTop:e.spacing.none,marginBottom:e.spacing.sm,fontSize:e.fontSizes.sm},td:{border:"none"},table:{borderSpacing:0,tr:{border:"none",td:{overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.threeXS,paddingBottom:e.spacing.threeXS},"td.key":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.4)`,textAlign:"right",color:e.colors.fadedText60,whiteSpace:"nowrap",paddingRight:e.spacing.twoXS},"td.value":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.6)`,textAlign:"left",display:"-webkit-box",WebkitLineClamp:"5",WebkitBoxOrient:"vertical",lineClamp:"5",wordWrap:"break-word"}}}}}),f9=y8("div",{target:"e1d0pwhz0"})(({theme:e,useContainerWidth:t,isFullScreen:n})=>({width:t||n?"100%":"auto",height:n?"100%":"auto","&.vega-embed":{position:"relative",display:"inline-block",boxSizing:"border-box","details:not([open]) > :not(summary)":{display:"none !important"},"details[open] summary":{opacity:.7},"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&:hover summary, &:focus-within summary":{opacity:"1 !important",transition:"opacity 0.2s ease"},"&.has-actions":{paddingRight:0},".vega-actions":{position:"absolute",display:"flex",flexDirection:"column",paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,zIndex:e.zIndices.popup,top:`calc(${e.iconSizes.md} + 2 * ${e.spacing.xs} + ${e.spacing.xs})`,right:0,backgroundColor:e.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`${e.sizes.borderWidth} solid ${e.colors.fadedText10}`,animationDuration:"0.15s",animationName:"scale-in",animationTimingFunction:"cubic-bezier(0.2, 0, 0.13, 1.5)",textAlign:"left",borderRadius:e.radii.default,a:{fontFamily:e.genericFonts.bodyFont,fontWeight:e.fontWeights.normal,fontSize:e.fontSizes.md,margin:0,padding:`${e.spacing.twoXS} ${e.spacing.twoXL}`,color:e.colors.bodyText,whiteSpace:"nowrap",textDecoration:"none"},"a:hover, a:focus":{backgroundColor:e.colors.darkenedBgMix15,color:e.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},"@keyframes scale-in":{from:{opacity:0,transform:"scale(0.6)"},to:{opacity:1,transform:"scale(1)"}},".chart-wrapper":{"&.fit-x":{width:"100%"},"&.fit-y":{height:"100%"}},summary:{position:"absolute",top:0,right:0,opacity:0,listStyle:"none",cursor:"pointer",display:"list-item",padding:e.spacing.xs,height:"auto",zIndex:e.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:e.radii.default,color:e.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms",lineHeight:0,"&::-webkit-details-marker":{display:"none"},"&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:e.colors.bodyText,opacity:"1 !important",background:e.colors.darkenedBgMix15},svg:{width:e.iconSizes.md,height:e.iconSizes.md}}}}));function eS(e,t){const n={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:at(t.fontSizes.md),orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:at(t.fontSizes.md),titleColor:Va(t),titleFontStyle:"normal",labelFontSize:at(t.fontSizes.twoSm),labelFontWeight:t.fontWeights.normal,labelColor:Va(t),labelFontStyle:"normal"},axis:{labelFontSize:at(t.fontSizes.twoSm),labelFontWeight:t.fontWeights.normal,labelColor:Va(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:at(t.fontSizes.sm),titleColor:Va(t),titleFontStyle:"normal",ticks:!1,gridColor:Ch(t),domain:!1,domainWidth:1,domainColor:Ch(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:at(t.spacing.lg),labelPadding:at(t.spacing.lg),labelSeparation:at(t.spacing.twoXS),labelOverlap:!0},legend:{labelFontSize:at(t.fontSizes.sm),labelFontWeight:t.fontWeights.normal,labelColor:Va(t),titleFontSize:at(t.fontSizes.sm),titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:Va(t),titlePadding:5,labelPadding:at(t.spacing.lg),columnPadding:at(t.spacing.sm),rowPadding:at(t.spacing.twoXS),padding:7,symbolStrokeWidth:at(t.spacing.twoXS)},range:{category:v8(t),diverging:x8(t),ramp:WA(t),heatmap:WA(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:at(t.sizes.defaultChartHeight),continuousWidth:at(t.sizes.defaultChartWidth)},concat:{columns:1},facet:{columns:1},mark:{tooltip:{content:"encoding"},color:b8(t)},bar:{binSpacing:at(t.spacing.twoXS),discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?T8({},n,e,(i,r)=>Array.isArray(r)?r:void 0):n}function d9(e,t){const{colors:n,fontSizes:i,genericFonts:r}=t,o={labelFont:r.bodyFont,titleFont:r.bodyFont,labelFontSize:at(i.twoSm),titleFontSize:at(i.twoSm)},s={background:n.bgColor,axis:{labelColor:n.bodyText,titleColor:n.bodyText,gridColor:Ch(t),...o},legend:{labelColor:n.bodyText,titleColor:n.bodyText,...o},title:{color:n.bodyText,subtitleColor:n.bodyText,...o},header:{labelColor:n.bodyText,titleColor:n.bodyText,...o},view:{stroke:Ch(t),continuousHeight:at(t.sizes.defaultChartHeight),continuousWidth:at(t.sizes.defaultChartWidth)},mark:{tooltip:!0}};return e?E8({},s,e):s}const h9=20;function p9(e){"params"in e&&"encoding"in e&&e.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)&&Sx(t.select.encodings)&&(t.select.encodings=Object.keys(e.encoding)))})}const g9=(e,t,n,i,r,o,s,a)=>{var l,c;const u=JSON.parse(e);if(n==="streamlit"?u.config=eS(u.config,r):((c=(l=u.usermeta)==null?void 0:l.embedOptions)==null?void 0:c.theme)==="streamlit"?(u.config=eS(u.config,r),u.usermeta.embedOptions.theme=void 0):u.config=d9(u.config,r),o?(u.width=s,u.height=a,"vconcat"in u&&u.vconcat.forEach(f=>{f.width=s})):t&&(u.width=s,"vconcat"in u&&u.vconcat.forEach(f=>{f.width=s})),u.padding||(u.padding={}),Sx(u.padding.bottom)&&(u.padding.bottom=h9),u.datasets)throw new Error("Datasets should not be passed as part of the spec");return i.length>0&&p9(u),u},m9=e=>{const t=w8(),{expanded:n,width:i,height:r}=Dk(Mk),{id:o,formId:s,spec:a,data:u,datasets:l,useContainerWidth:c,vegaLiteTheme:f,selectionMode:d}=e,h=St.useMemo(()=>d,[JSON.stringify(d)]),p=St.useMemo(()=>g9(a,c,f,h,t,n,i||0,r),[a,c,f,h,t,n,i,r]);return{id:o,formId:s,vegaLiteTheme:f,spec:p,selectionMode:h,data:u,datasets:l,useContainerWidth:c}};function yo(e,t,n){return e.fields=t||[],e.fname=n,e}function y9(e){return e==null?null:e.fname}function Nk(e){return e==null?null:e.fields}function Lk(e){return e.length===1?b9(e[0]):x9(e)}const b9=e=>function(t){return t[e]},x9=e=>{const t=e.length;return function(n){for(let i=0;i<t;++i)n=n[e[i]];return n}};function Qd(e){throw Error(e)}function Dx(e){const t=[],n=e.length;let i=null,r=0,o="",s,a,u;e=e+"";function l(){t.push(o+e.substring(s,a)),o="",s=a+1}for(s=a=0;a<n;++a)if(u=e[a],u==="\\")o+=e.substring(s,a++),s=a;else if(u===i)l(),i=null,r=-1;else{if(i)continue;s===r&&u==='"'||s===r&&u==="'"?(s=a+1,i=u):u==="."&&!r?a>s?l():s=a+1:u==="["?(a>s&&l(),r=s=a+1):u==="]"&&(r||Qd("Access path missing open bracket: "+e),r>0&&l(),r=0,s=a+1)}return r&&Qd("Access path missing closing bracket: "+e),i&&Qd("Access path missing closing quote: "+e),a>s&&(a++,l()),t}function Tx(e,t,n){const i=Dx(e);return e=i.length===1?i[0]:e,yo((n&&n.get||Lk)(i),[e],t||e)}const v9=Tx("id"),Mx=yo(e=>e,[],"identity"),E9=yo(()=>0,[],"zero"),w9=yo(()=>1,[],"one"),Pk=yo(()=>!0,[],"true"),A9=yo(()=>!1,[],"false");function S9(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const Ik=0,zk=1,Bk=2,Uk=3,jk=4;function C9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S9,i=e||Ik;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=zk&&n(t||"error","ERROR",arguments),this},warn(){return i>=Bk&&n(t||"warn","WARN",arguments),this},info(){return i>=Uk&&n(t||"log","INFO",arguments),this},debug(){return i>=jk&&n(t||"log","DEBUG",arguments),this}}}var og=Array.isArray;function oa(e){return e===Object(e)}const tS=e=>e!=="__proto__";function Ox(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((i,r)=>{for(const o in r)if(o==="signals")i.signals=$9(i.signals,r.signals);else{const s=o==="legend"?{layout:1}:o==="style"?!0:null;sg(i,o,r[o],s)}return i},{})}function sg(e,t,n,i){if(!tS(t))return;let r,o;if(oa(n)&&!og(n)){o=oa(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?sg(o,r,n[r]):tS(r)&&(o[r]=n[r])}else e[t]=n}function $9(e,t){if(e==null)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function ol(e){return e[e.length-1]}function Rx(e){return e==null||e===""?null:+e}const qk=e=>t=>e*Math.exp(t),Wk=e=>t=>Math.log(e*t),Gk=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),Hk=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,_h=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function ag(e,t,n,i){const r=n(e[0]),o=n(ol(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function _9(e,t){return ag(e,t,Rx,Mx)}function F9(e,t){var n=Math.sign(e[0]);return ag(e,t,Wk(n),qk(n))}function k9(e,t,n){return ag(e,t,_h(n),_h(1/n))}function D9(e,t,n){return ag(e,t,Gk(n),Hk(n))}function ug(e,t,n,i,r){const o=i(e[0]),s=i(ol(e)),a=t!=null?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function T9(e,t,n){return ug(e,t,n,Rx,Mx)}function M9(e,t,n){const i=Math.sign(e[0]);return ug(e,t,n,Wk(i),qk(i))}function O9(e,t,n,i){return ug(e,t,n,_h(i),_h(1/i))}function R9(e,t,n,i){return ug(e,t,n,Gk(i),Hk(i))}function N9(e){return 1+~~(new Date(e).getMonth()/3)}function L9(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Ic(e){return e!=null?og(e)?e:[e]:[]}function P9(e,t,n){let i=e[0],r=e[1],o;return r<i&&(o=r,r=i,i=o),o=r-i,o>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function lg(e){return typeof e=="function"}const I9="descending";function z9(e,t,n){n=n||{},t=Ic(t)||[];const i=[],r=[],o={},s=n.comparator||B9;return Ic(e).forEach((a,u)=>{a!=null&&(i.push(t[u]===I9?-1:1),r.push(a=lg(a)?a:Tx(a,null,n)),(Nk(a)||[]).forEach(l=>o[l]=1))}),r.length===0?null:yo(s(r,i),Object.keys(o))}const Nx=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),B9=(e,t)=>e.length===1?U9(e[0],t[0]):j9(e,t,e.length),U9=(e,t)=>function(n,i){return Nx(e(n),e(i))*t},j9=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;s===0&&++a<n;)o=e[a],s=Nx(o(i),o(r));return s*t[a]});function q9(e){return lg(e)?e:()=>e}function W9(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function Lx(e){for(let t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e}function G9(e,t){let n=0,i,r,o,s;if(e&&(i=e.length))if(t==null){for(r=e[n];n<i&&(r==null||r!==r);r=e[++n]);for(o=s=r;n<i;++n)r=e[n],r!=null&&(r<o&&(o=r),r>s&&(s=r))}else{for(r=t(e[n]);n<i&&(r==null||r!==r);r=t(e[++n]));for(o=s=r;n<i;++n)r=t(e[n]),r!=null&&(r<o&&(o=r),r>s&&(s=r))}return[o,s]}function H9(e,t){const n=e.length;let i=-1,r,o,s,a,u;if(t==null){for(;++i<n;)if(o=e[i],o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=e[i],o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}else{for(;++i<n;)if(o=t(e[i],i,e),o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=t(e[i],i,e),o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}return[a,u]}const V9=Object.prototype.hasOwnProperty;function Hr(e,t){return V9.call(e,t)}const dd={};function Y9(e){let t={},n;function i(o){return Hr(t,o)&&t[o]!==dd}const r={size:0,empty:0,object:t,has:i,get(o){return i(o)?t[o]:void 0},set(o,s){return i(o)||(++r.size,t[o]===dd&&--r.empty),t[o]=s,this},delete(o){return i(o)&&(--r.size,++r.empty,t[o]=dd),this},clear(){r.size=r.empty=0,r.object=t={}},test(o){return arguments.length?(n=o,r):n},clean(){const o={};let s=0;for(const a in t){const u=t[a];u!==dd&&(!n||!n(u))&&(o[a]=u,++s)}r.size=s,r.empty=0,r.object=t=o}};return e&&Object.keys(e).forEach(o=>{r.set(o,e[o])}),r}function X9(e,t,n,i,r,o){if(!n&&n!==0)return o;const s=+n;let a=e[0],u=ol(e),l;u<a&&(l=a,a=u,u=l),l=Math.abs(t-a);const c=Math.abs(u-t);return l<c&&l<=s?i:c<=s?r:o}function K9(e,t,n){const i=e.prototype=Object.create(t.prototype);return Object.defineProperty(i,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),Lx(i,n)}function J9(e,t,n,i){let r=t[0],o=t[t.length-1],s;return r>o&&(s=r,r=o,o=s),n=n===void 0||n,i=i===void 0||i,(n?r<=e:r<e)&&(i?e<=o:e<o)}function Vk(e){return typeof e=="boolean"}function Yk(e){return Object.prototype.toString.call(e)==="[object Date]"}function Q9(e){return e&&lg(e[Symbol.iterator])}function Xk(e){return typeof e=="number"}function Z9(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function to(e){return typeof e=="string"}function eP(e,t,n){e&&(e=t?Ic(e).map(a=>a.replace(/\\(.)/g,"$1")):Ic(e));const i=e&&e.length,r=n&&n.get||Lk,o=a=>r(t?[a]:Dx(a));let s;if(!i)s=function(){return""};else if(i===1){const a=o(e[0]);s=function(u){return""+a(u)}}else{const a=e.map(o);s=function(u){let l=""+a[0](u),c=0;for(;++c<i;)l+="|"+a[c](u);return l}}return yo(s,e,"key")}function tP(e,t){const n=e[0],i=ol(e),r=+t;return r?r===1?i:n+r*(i-n):n}const nP=1e4;function iP(e){e=+e||nP;let t,n,i;const r=()=>{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>Hr(t,s)||Hr(n,s),get:s=>Hr(t,s)?t[s]:Hr(n,s)?o(s,n[s]):void 0,set:(s,a)=>Hr(t,s)?t[s]=a:o(s,a)}}function rP(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,u=0,l=0;for(;a<r&&u<o;++l)s[l]=e(t[a],n[u])>0?n[u++]:t[a++];for(;a<r;++a,++l)s[l]=t[a];for(;u<o;++u,++l)s[l]=n[u];return s}function Zl(e,t){let n="";for(;--t>=0;)n+=e;return n}function oP(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:i==="left"?Zl(r,s)+o:i==="center"?Zl(r,~~(s/2))+o+Zl(r,Math.ceil(s/2)):o+Zl(r,s)}function sP(e){return e&&ol(e)-e[0]||0}function gu(e){return og(e)?"["+e.map(gu)+"]":oa(e)||to(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function aP(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const uP=e=>Xk(e)||Yk(e)?e:Date.parse(e);function lP(e,t){return t=t||uP,e==null||e===""?null:t(e)}function cP(e){return e==null||e===""?null:e+""}function fP(e){const t={},n=e.length;for(let i=0;i<n;++i)t[e[i]]=!0;return t}function dP(e,t,n,i){const r=i??"…",o=e+"",s=o.length,a=Math.max(0,t-r.length);return s<=t?o:n==="left"?r+o.slice(s-a):n==="center"?o.slice(0,Math.ceil(a/2))+r+o.slice(s-~~(a/2)):o.slice(0,a)+r}function hP(e,t,n){if(e)if(t){const i=e.length;for(let r=0;r<i;++r){const o=t(e[r]);o&&n(o,r,e)}}else e.forEach(n)}function ri(e,t,n){return e.fields=t||[],e.fname=n,e}function lt(e){return e==null?null:e.fname}function xn(e){return e==null?null:e.fields}function Kk(e){return e.length===1?pP(e[0]):gP(e)}const pP=e=>function(t){return t[e]},gP=e=>{const t=e.length;return function(n){for(let i=0;i<t;++i)n=n[e[i]];return n}};function L(e){throw Error(e)}function Px(e){const t=[],n=e.length;let i=null,r=0,o="",s,a,u;e=e+"";function l(){t.push(o+e.substring(s,a)),o="",s=a+1}for(s=a=0;a<n;++a)if(u=e[a],u==="\\")o+=e.substring(s,a++),s=a;else if(u===i)l(),i=null,r=-1;else{if(i)continue;s===r&&u==='"'||s===r&&u==="'"?(s=a+1,i=u):u==="."&&!r?a>s?l():s=a+1:u==="["?(a>s&&l(),r=s=a+1):u==="]"&&(r||L("Access path missing open bracket: "+e),r>0&&l(),r=0,s=a+1)}return r&&L("Access path missing closing bracket: "+e),i&&L("Access path missing closing quote: "+e),a>s&&(a++,l()),t}function Li(e,t,n){const i=Px(e);return e=i.length===1?i[0]:e,ri((n&&n.get||Kk)(i),[e],t||e)}const cg=Li("id"),Ln=ri(e=>e,[],"identity"),zs=ri(()=>0,[],"zero"),yf=ri(()=>1,[],"one"),Pi=ri(()=>!0,[],"true"),As=ri(()=>!1,[],"false");function mP(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const yP=0,Jk=1,bP=2,xP=3,vP=4;function EP(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mP,i=e||yP;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=Jk&&n("error","ERROR",arguments),this},warn(){return i>=bP&&n("warn","WARN",arguments),this},info(){return i>=xP&&n("log","INFO",arguments),this},debug(){return i>=vP&&n("log","DEBUG",arguments),this}}}var Z=Array.isArray;function me(e){return e===Object(e)}const nS=e=>e!=="__proto__";function wP(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((i,r)=>{for(const o in r)if(o==="signals")i.signals=AP(i.signals,r.signals);else{const s=o==="legend"?{layout:1}:o==="style"?!0:null;Qk(i,o,r[o],s)}return i},{})}function Qk(e,t,n,i){if(!nS(t))return;let r,o;if(me(n)&&!Z(n)){o=me(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?Qk(o,r,n[r]):nS(r)&&(o[r]=n[r])}else e[t]=n}function AP(e,t){if(e==null)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function $e(e){return e[e.length-1]}function mn(e){return e==null||e===""?null:+e}const Zk=e=>t=>e*Math.exp(t),eD=e=>t=>Math.log(e*t),tD=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),nD=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Fh=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function fg(e,t,n,i){const r=n(e[0]),o=n($e(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function SP(e,t){return fg(e,t,mn,Ln)}function CP(e,t){var n=Math.sign(e[0]);return fg(e,t,eD(n),Zk(n))}function $P(e,t,n){return fg(e,t,Fh(n),Fh(1/n))}function _P(e,t,n){return fg(e,t,tD(n),nD(n))}function dg(e,t,n,i,r){const o=i(e[0]),s=i($e(e)),a=t!=null?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function iD(e,t,n){return dg(e,t,n,mn,Ln)}function rD(e,t,n){const i=Math.sign(e[0]);return dg(e,t,n,eD(i),Zk(i))}function hy(e,t,n,i){return dg(e,t,n,Fh(i),Fh(1/i))}function oD(e,t,n,i){return dg(e,t,n,tD(i),nD(i))}function FP(e){return 1+~~(new Date(e).getMonth()/3)}function kP(e){return 1+~~(new Date(e).getUTCMonth()/3)}function oe(e){return e!=null?Z(e)?e:[e]:[]}function DP(e,t,n){let i=e[0],r=e[1],o;return r<i&&(o=r,r=i,i=o),o=r-i,o>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function be(e){return typeof e=="function"}const TP="descending";function sD(e,t,n){n=n||{},t=oe(t)||[];const i=[],r=[],o={},s=n.comparator||MP;return oe(e).forEach((a,u)=>{a!=null&&(i.push(t[u]===TP?-1:1),r.push(a=be(a)?a:Li(a,null,n)),(xn(a)||[]).forEach(l=>o[l]=1))}),r.length===0?null:ri(s(r,i),Object.keys(o))}const bf=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),MP=(e,t)=>e.length===1?OP(e[0],t[0]):RP(e,t,e.length),OP=(e,t)=>function(n,i){return bf(e(n),e(i))*t},RP=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;s===0&&++a<n;)o=e[a],s=bf(o(i),o(r));return s*t[a]});function wn(e){return be(e)?e:()=>e}function aD(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function ye(e){for(let t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e}function lo(e,t){let n=0,i,r,o,s;if(e&&(i=e.length))if(t==null){for(r=e[n];n<i&&(r==null||r!==r);r=e[++n]);for(o=s=r;n<i;++n)r=e[n],r!=null&&(r<o&&(o=r),r>s&&(s=r))}else{for(r=t(e[n]);n<i&&(r==null||r!==r);r=t(e[++n]));for(o=s=r;n<i;++n)r=t(e[n]),r!=null&&(r<o&&(o=r),r>s&&(s=r))}return[o,s]}function NP(e,t){const n=e.length;let i=-1,r,o,s,a,u;if(t==null){for(;++i<n;)if(o=e[i],o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=e[i],o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}else{for(;++i<n;)if(o=t(e[i],i,e),o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=t(e[i],i,e),o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}return[a,u]}function le(e,t){return Object.hasOwn(e,t)}const hd={};function xf(e){let t={},n;function i(o){return le(t,o)&&t[o]!==hd}const r={size:0,empty:0,object:t,has:i,get(o){return i(o)?t[o]:void 0},set(o,s){return i(o)||(++r.size,t[o]===hd&&--r.empty),t[o]=s,this},delete(o){return i(o)&&(--r.size,++r.empty,t[o]=hd),this},clear(){r.size=r.empty=0,r.object=t={}},test(o){return arguments.length?(n=o,r):n},clean(){const o={};let s=0;for(const a in t){const u=t[a];u!==hd&&(!n||!n(u))&&(o[a]=u,++s)}r.size=s,r.empty=0,r.object=t=o}};return e&&Object.keys(e).forEach(o=>{r.set(o,e[o])}),r}function LP(e,t,n,i,r,o){if(!n&&n!==0)return o;const s=+n;let a=e[0],u=$e(e),l;u<a&&(l=a,a=u,u=l),l=Math.abs(t-a);const c=Math.abs(u-t);return l<c&&l<=s?i:c<=s?r:o}function G(e,t,n){const i=e.prototype=Object.create(t.prototype);return Object.defineProperty(i,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),ye(i,n)}function ec(e,t,n,i){let r=t[0],o=t[t.length-1],s;return r>o&&(s=r,r=o,o=s),n=n===void 0||n,i=i===void 0||i,(n?r<=e:r<e)&&(i?e<=o:e<o)}function PP(e){return typeof e=="boolean"}function Ys(e){return Object.prototype.toString.call(e)==="[object Date]"}function IP(e){return e&&be(e[Symbol.iterator])}function sa(e){return typeof e=="number"}function uD(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Ke(e){return typeof e=="string"}function lD(e,t,n){e&&(e=t?oe(e).map(a=>a.replace(/\\(.)/g,"$1")):oe(e));const i=e&&e.length,r=n&&n.get||Kk,o=a=>r(t?[a]:Px(a));let s;if(!i)s=function(){return""};else if(i===1){const a=o(e[0]);s=function(u){return""+a(u)}}else{const a=e.map(o);s=function(u){let l=""+a[0](u),c=0;for(;++c<i;)l+="|"+a[c](u);return l}}return ri(s,e,"key")}function zP(e,t){const n=e[0],i=$e(e),r=+t;return r?r===1?i:n+r*(i-n):n}const BP=1e4;function UP(e){e=+e||BP;let t,n,i;const r=()=>{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>le(t,s)||le(n,s),get:s=>le(t,s)?t[s]:le(n,s)?o(s,n[s]):void 0,set:(s,a)=>le(t,s)?t[s]=a:o(s,a)}}function jP(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,u=0,l=0;for(;a<r&&u<o;++l)s[l]=e(t[a],n[u])>0?n[u++]:t[a++];for(;a<r;++a,++l)s[l]=t[a];for(;u<o;++u,++l)s[l]=n[u];return s}function pd(e,t){let n="";for(;--t>=0;)n+=e;return n}function qP(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:i==="left"?pd(r,s)+o:i==="center"?pd(r,~~(s/2))+o+pd(r,Math.ceil(s/2)):o+pd(r,s)}function hg(e){return e&&$e(e)-e[0]||0}function re(e){return Z(e)?"["+e.map(re)+"]":me(e)||Ke(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function cD(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const WP=e=>sa(e)||Ys(e)?e:Date.parse(e);function fD(e,t){return t=t||WP,e==null||e===""?null:t(e)}function dD(e){return e==null||e===""?null:e+""}function yr(e){const t={},n=e.length;for(let i=0;i<n;++i)t[e[i]]=!0;return t}function GP(e,t,n,i){const r=i??"…",o=e+"",s=o.length,a=Math.max(0,t-r.length);return s<=t?o:n==="left"?r+o.slice(s-a):n==="center"?o.slice(0,Math.ceil(a/2))+r+o.slice(s-~~(a/2)):o.slice(0,a)+r}function Ls(e,t,n){if(e)if(t){const i=e.length;for(let r=0;r<i;++r){const o=t(e[r]);o&&n(o,r,e)}}else e.forEach(n)}var iS={},bm={},xm=34,Fl=10,vm=13;function hD(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function HP(e,t){var n=hD(e);return function(i,r){return t(n(i),r,e)}}function rS(e){var t=Object.create(null),n=[];return e.forEach(function(i){for(var r in i)r in t||n.push(t[r]=r)}),n}function Fn(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function VP(e){return e<0?"-"+Fn(-e,6):e>9999?"+"+Fn(e,6):Fn(e,4)}function YP(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),i=e.getUTCSeconds(),r=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":VP(e.getUTCFullYear())+"-"+Fn(e.getUTCMonth()+1,2)+"-"+Fn(e.getUTCDate(),2)+(r?"T"+Fn(t,2)+":"+Fn(n,2)+":"+Fn(i,2)+"."+Fn(r,3)+"Z":i?"T"+Fn(t,2)+":"+Fn(n,2)+":"+Fn(i,2)+"Z":n||t?"T"+Fn(t,2)+":"+Fn(n,2)+"Z":"")}function XP(e){var t=new RegExp('["'+e+`
|
2
2
|
\r]`),n=e.charCodeAt(0);function i(f,d){var h,p,g=r(f,function(m,y){if(h)return h(m,y-1);p=m,h=d?HP(m,d):hD(m)});return g.columns=p||[],g}function r(f,d){var h=[],p=f.length,g=0,m=0,y,b=p<=0,x=!1;f.charCodeAt(p-1)===Fl&&--p,f.charCodeAt(p-1)===vm&&--p;function v(){if(b)return bm;if(x)return x=!1,iS;var A,E=g,S;if(f.charCodeAt(E)===xm){for(;g++<p&&f.charCodeAt(g)!==xm||f.charCodeAt(++g)===xm;);return(A=g)>=p?b=!0:(S=f.charCodeAt(g++))===Fl?x=!0:S===vm&&(x=!0,f.charCodeAt(g)===Fl&&++g),f.slice(E+1,A-1).replace(/""/g,'"')}for(;g<p;){if((S=f.charCodeAt(A=g++))===Fl)x=!0;else if(S===vm)x=!0,f.charCodeAt(g)===Fl&&++g;else if(S!==n)continue;return f.slice(E,A)}return b=!0,f.slice(E,p)}for(;(y=v())!==bm;){for(var w=[];y!==iS&&y!==bm;)w.push(y),y=v();d&&(w=d(w,m++))==null||h.push(w)}return h}function o(f,d){return f.map(function(h){return d.map(function(p){return c(h[p])}).join(e)})}function s(f,d){return d==null&&(d=rS(f)),[d.map(c).join(e)].concat(o(f,d)).join(`
|
3
3
|
`)}function a(f,d){return d==null&&(d=rS(f)),o(f,d).join(`
|
4
4
|
`)}function u(f){return f.map(l).join(`
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{n as s,k as i,r as m,j as e}from"./index.
|
1
|
+
import{n as s,k as i,r as m,j as e}from"./index.C5QL_Xc_.js";import{P as c,R as l}from"./RenderInPortalIfExists.DRyuwMyI.js";const p=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,d=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,f=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,S=150,g=10,E=90,u=4e3,n=(t,a=0)=>Math.random()*(t-a)+a,w=()=>i(`from{transform:translateY(0)
|
2
2
|
rotateX(`,n(360),`deg)
|
3
3
|
rotateY(`,n(360),`deg)
|
4
4
|
rotateZ(`,n(360),"deg);}to{transform:translateY(calc(100vh + ",o,`px))
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as c,bo as g,bM as b}from"./index.
|
1
|
+
import{r as i,j as c,bo as g,bM as b}from"./index.C5QL_Xc_.js";import{a as m}from"./useBasicWidgetState.QKx5EFIj.js";import"./FormClearHelper.DieF97Af.js";const f=(t,e)=>t.getStringValue(e),p=t=>t.default??null,C=t=>t.value??null,d=(t,e,o,r)=>{e.setStringValue(t,o.value,{fromUi:o.fromUi},r)},S=({element:t,disabled:e,widgetMgr:o,fragmentId:r})=>{var l;const[s,a]=m({getStateFromWidgetMgr:f,getDefaultStateFromProto:p,getCurrStateFromProto:C,updateWidgetMgrState:d,element:t,widgetMgr:o,fragmentId:r}),u=i.useCallback(n=>{a({value:n,fromUi:!0})},[a]);return c(b,{label:t.label,labelVisibility:g((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:u,disabled:e,value:s})},k=i.memo(S);export{k as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r,E as Q,_ as Y,cz as y,M as m,O as Z,l as mt,n as D,z as gt,bd as ht,cp as It,H as q,C as F,j as c,bo as yt,bC as Ct,bp as Tt,b5 as wt,bq as St,D as vt,bl as K}from"./index.
|
1
|
+
import{r,E as Q,_ as Y,cz as y,M as m,O as Z,l as mt,n as D,z as gt,bd as ht,cp as It,H as q,C as F,j as c,bo as yt,bC as Ct,bp as Tt,b5 as wt,bq as St,D as vt,bl as K}from"./index.C5QL_Xc_.js";import{u as Vt}from"./uniqueId.DFKK3fms.js";import{u as kt}from"./FormClearHelper.DieF97Af.js";import{I as Rt}from"./InputInstructions.B8AIK0e4.js";import{s as xt}from"./sprintf.D7DtBTRn.js";import{I as Dt}from"./input.ut_XFtNH.js";import"./base-input.C1EhHiwL.js";var tt=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(Q,Y({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});tt.displayName="Minus";var et=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(Q,Y({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});et.displayName="Plus";const Et=mt.getLogger("NumberInput");function Nt(t){return m(t)||t===""?void 0:t}const W=({value:t,format:e,step:a,dataType:b})=>{if(m(t))return null;let o=Nt(e);if(m(o)&&Z(a)){const d=a.toString();b===y.DataType.FLOAT&&a!==0&&d.includes(".")&&(o=`%0.${d.split(".")[1].length}f`)}if(m(o))return t.toString();try{return xt.sprintf(o,t)}catch(d){return Et.warn(`Error in sprintf(${o}, ${t}): ${d}`),String(t)}},zt=(t,e,a)=>m(t)?!1:t-e>=a,Ft=(t,e,a)=>m(t)?!1:t+e<=a,Wt=t=>(t.element.dataType===y.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,M=({step:t,dataType:e})=>t||(e===y.DataType.INT?1:.01),Bt=D("div",{target:"e4u2kar0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),Lt=D("div",{target:"e4u2kar1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),J=D("button",{target:"e4u2kar2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Ht=D("div",{target:"e4u2kar3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Pt=({disabled:t,element:e,widgetMgr:a,fragmentId:b})=>{var X;const o=gt(),{dataType:d,id:S,formId:p,default:B,format:L,icon:C,min:g,max:h}=e,[H,ot]=ht(),[s,rt]=r.useState(()=>M(e)),P=Wt({element:e,widgetMgr:a}),[I,T]=r.useState(!1),[l,w]=r.useState(P),[U,v]=r.useState(()=>W({value:P,...e,step:s})),[A,$]=r.useState(!1),V=r.useRef(null),O=r.useRef(Vt("number_input_")),k=zt(l,s,g),R=Ft(l,s,h),j=It({formId:p}),nt=j?a.allowFormEnterToSubmit(p):I,at=A&&H>o.breakpoints.hideWidgetDetails;r.useEffect(()=>{rt(M({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const u=r.useCallback(({value:n,source:i})=>{var f;if(Z(n)&&(g>n||n>h))(f=V.current)==null||f.reportValidity();else{const x=n??B??null;switch(d){case y.DataType.INT:a.setIntValue({id:S,formId:p},x,i,b);break;case y.DataType.FLOAT:a.setDoubleValue({id:S,formId:p},x,i,b);break;default:throw new Error("Invalid data type")}T(!1),w(x),v(W({value:x,dataType:d,format:L,step:s}))}},[g,h,V,a,b,s,d,S,p,B,L]),st=r.useCallback(()=>{I&&u({value:l,source:{fromUi:!0}}),$(!1)},[I,l,u]),it=r.useCallback(()=>{$(!0)},[]),_=r.useCallback(()=>{const{value:n}=e;e.setValue=!1,w(n??null),v(W({value:n??null,...e,step:s})),u({value:n??null,source:{fromUi:!1}})},[e,s,u]);r.useEffect(()=>{e.setValue?_():u({value:l,source:{fromUi:!1}});const n=V.current;if(n){const i=f=>{f.preventDefault()};return n.addEventListener("wheel",i),()=>{n.removeEventListener("wheel",i)}}},[]),e.setValue&&_();const E=m(e.default)&&!t,lt=r.useCallback(()=>{const n=e.default??null;w(n),u({value:n,source:{fromUi:!0}})},[e]);kt({element:e,widgetMgr:a,onFormCleared:lt});const ct=n=>{const{value:i}=n.target;if(i==="")T(!0),w(null),v(null);else{let f;e.dataType===y.DataType.INT?f=parseInt(i,10):f=parseFloat(i),T(!0),w(f),v(i)}},N=r.useCallback(()=>{R&&(T(!0),u({value:(l??g)+s,source:{fromUi:!0}}))},[l,g,s,R]),z=r.useCallback(()=>{k&&(T(!0),u({value:(l??h)-s,source:{fromUi:!0}}))},[l,h,s,k]),ut=r.useCallback(n=>{const{key:i}=n;switch(i){case"ArrowUp":n.preventDefault(),N();break;case"ArrowDown":n.preventDefault(),z();break}},[N,z]),dt=r.useCallback(n=>{n.key==="Enter"&&(I&&u({value:l,source:{fromUi:!0}}),a.allowFormEnterToSubmit(p)&&a.submitForm(p,b))},[I,l,u,a,p,b]),G=C==null?void 0:C.startsWith(":material"),pt=G?"lg":"base",ft=q(o.iconSizes.lg)+2*q(o.spacing.twoXS),bt=C?o.breakpoints.hideNumberInputControls+ft:o.breakpoints.hideNumberInputControls;return F("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:ot,children:[c(St,{label:e.label,disabled:t,labelVisibility:yt((X=e.labelVisibility)==null?void 0:X.value),htmlFor:O.current,children:e.help&&c(Ct,{children:c(Tt,{content:e.help,placement:wt.TOP_RIGHT})})}),F(Bt,{className:A?"focused":"","data-testid":"stNumberInputContainer",children:[c(Dt,{type:"number",inputRef:V,value:U??"",placeholder:e.placeholder,onBlur:st,onFocus:it,onChange:ct,onKeyPress:dt,onKeyDown:ut,clearable:E,clearOnEscape:E,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&c(vt,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:pt}),id:O.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.darkGray,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:g,max:h,type:"number",inputMode:""},style:{lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:C?o.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:o.iconSizes.lg,color:G?o.colors.fadedText60:"inherit"}}}}),H>bt&&F(Lt,{children:[c(J,{"data-testid":"stNumberInputStepDown",onClick:z,disabled:!k||t,tabIndex:-1,children:c(K,{content:tt,size:"xs",color:k?"inherit":o.colors.disabled})}),c(J,{"data-testid":"stNumberInputStepUp",onClick:N,disabled:!R||t,tabIndex:-1,children:c(K,{content:et,size:"xs",color:R?"inherit":o.colors.disabled})})]})]}),at&&c(Ht,{clearable:E,children:c(Rt,{dirty:I,value:U??"",inForm:j,allowEnterToSubmit:nt})})]})},Xt=r.memo(Pt);export{Xt as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as l,a_ as v,J as u,a$ as n,r as b,b0 as s,j as i,b1 as B,b2 as k,b3 as S}from"./index.
|
1
|
+
import{n as l,a_ as v,J as u,a$ as n,r as b,b0 as s,j as i,b1 as B,b2 as k,b3 as S}from"./index.C5QL_Xc_.js";function x(o,r){switch(o){case n.XSMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.sm}`,fontSize:r.fontSizes.sm};case n.SMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.md}`};case n.LARGE:return{padding:`${r.spacing.md} ${r.spacing.md}`};default:return{padding:`${r.spacing.xs} ${r.spacing.md}`}}}const e=l("a",{target:"e2m15hl0"})(({containerWidth:o,size:r,theme:a})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:a.fontWeights.normal,padding:`${a.spacing.xs} ${a.spacing.md}`,borderRadius:a.radii.default,minHeight:a.sizes.minElementHeight,margin:0,lineHeight:a.lineHeights.base,color:a.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:a.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${u(a.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...x(r,a)})),$=l(e,{target:"e2m15hl1"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),L=l(e,{target:"e2m15hl2"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),w=l(e,{target:"e2m15hl3"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${u(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function T({kind:o,size:r,disabled:a,containerWidth:t,children:c,autoFocus:p,href:g,rel:y,target:f,onClick:C}){let d=$;return o===s.SECONDARY?d=L:o===s.TERTIARY&&(d=w),i(d,{kind:o,size:r||n.MEDIUM,containerWidth:t||!1,disabled:a||!1,autoFocus:p||!1,href:g,target:f,rel:y,onClick:C,tabIndex:a?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:c})}const z=b.memo(T);function R(o){const{element:r}=o;let a=s.SECONDARY;r.type==="primary"?a=s.PRIMARY:r.type==="tertiary"&&(a=s.TERTIARY);const t=c=>{r.disabled&&c.preventDefault()};return i(S,{className:"stLinkButton","data-testid":"stLinkButton",children:i(B,{help:r.help,containerWidth:r.useContainerWidth,children:i(z,{kind:a,size:n.SMALL,disabled:r.disabled,onClick:t,containerWidth:r.useContainerWidth,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":r.disabled,children:i(k,{icon:r.icon,label:r.label})})})})}const W=b.memo(R);export{W as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as g,r as S,aD as E,C as p,j as i,aC as y,l as L}from"./index.
|
1
|
+
import{n as g,r as S,aD as E,C as p,j as i,aC as y,l as L}from"./index.C5QL_Xc_.js";import{w as W,E as b}from"./withFullScreenWrapper.DrAgwq5e.js";import{S as u,T as M}from"./Toolbar.3K8i84rX.js";const O=g("div",{target:"evl31sl0"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:"fit-content"})),T=g("div",{target:"evl31sl1"})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:e.radii.default}})),F=g("div",{target:"evl31sl2"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),j=L.getLogger("ImageList");var x;(function(e){e[e.OriginalWidth=-1]="OriginalWidth",e[e.ColumnWidth=-2]="ColumnWidth",e[e.AutoWidth=-3]="AutoWidth",e[e.MinImageOrContainer=-4]="MinImageOrContainer",e[e.MaxImageOrContainer=-5]="MaxImageOrContainer"})(x||(x={}));function A({element:e,endpoints:c,disableFullscreenMode:C}){const{expanded:o,width:f,height:s,expand:w,collapse:I}=E(b),m=f||0;let n;const r=e.width;if([-1,-3,-4].includes(r))n=void 0;else if([-2,-5].includes(r))n=m;else if(r>0)n=r;else throw Error(`Invalid image width: ${r}`);const t={};s&&o?(t.maxHeight=s,t.objectFit="contain",t.width="100%"):(t.width=n??"100%",t.maxWidth="100%");const h=l=>{const a=l.currentTarget.src;j.error(`Client Error: Image source error - ${a}`),c.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",a)};return p(u,{width:m,height:s,useContainerWidth:o,topCentered:!0,children:[i(M,{target:u,isFullScreen:o,onExpand:w,onCollapse:I,disableFullscreenMode:C}),i(O,{className:"stImage","data-testid":"stImage",children:e.imgs.map((l,a)=>{const d=l;return p(T,{"data-testid":"stImageContainer",children:[i("img",{style:t,src:c.buildMediaURL(d.url),alt:a.toString(),onError:h}),d.caption&&i(F,{"data-testid":"stImageCaption",style:t,children:i(y,{source:d.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]},a)})})]})}const D=W(A),$=S.memo(D);export{$ as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n,r as t,O as i,j as c,aY as d,aZ as e,M as g}from"./index.
|
1
|
+
import{n,r as t,O as i,j as c,aY as d,aZ as e,M as g}from"./index.C5QL_Xc_.js";const l=n("iframe",{target:"e3tg43n0"})(({theme:o,disableScrolling:a})=>({width:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:a?"hidden":void 0}));function r(o){return g(o)||o===""?void 0:o}function m({element:o}){const a=r(o.src),s=i(a)?void 0:r(o.srcdoc);return c(l,{className:"stIFrame","data-testid":"stIFrame",allow:e,disableScrolling:!o.scrolling,src:a,srcDoc:s,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:d,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const F=t.memo(m);export{F as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{r as h,E as $,_ as H,b6 as mt,bg as $t,bh as Ht,bi as Vt,M as X,O as q,aE as jt,n as P,bj as Gt,C as N,j as v,bk as Xt,b0 as qt,bl as Yt,bm as Kt,l as Jt,z as Qt,bn as tt,H as Zt,aA as te,bo as ee,bp as ie,b5 as se,bq as ne}from"./index.PICOQqdk.js";import{u as re,F as oe}from"./FormClearHelper.BGe2ueaE.js";import{T as ae,a as ft}from"./Toolbar.CxDjZGYY.js";import{u as le}from"./Hooks.tQYB--C2.js";import{c as ce}from"./createDownloadLinkElement.DZMwyjvU.js";import{F as de,D as he}from"./FileDownload.esm.DstlwNHu.js";var yt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),h.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});yt.displayName="Mic";var wt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});wt.displayName="Pause";var St=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});St.displayName="PlayArrow";var Ct=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),h.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});Ct.displayName="Refresh";var Et=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});Et.displayName="StopCircle";function R(s,t,e,i){return new(e||(e=Promise))(function(n,r){function a(c){try{d(i.next(c))}catch(l){r(l)}}function o(c){try{d(i.throw(c))}catch(l){r(l)}}function d(c){var l;c.done?n(c.value):(l=c.value,l instanceof e?l:new e(function(p){p(l)})).then(a,o)}d((i=i.apply(s,t||[])).next())})}let V=class{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),i==null?void 0:i.once){const n=()=>{this.un(t,n),this.un(t,e)};return this.on(t,n),n}return()=>this.un(t,e)}un(t,e){var i;(i=this.listeners[t])===null||i===void 0||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(i=>i(...e))}};const j={decode:function(s,t){return R(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(s).finally(()=>e.close())})},createBuffer:function(s,t){return typeof s[0]=="number"&&(s=[s]),function(e){const i=e[0];if(i.some(n=>n>1||n<-1)){const n=i.length;let r=0;for(let a=0;a<n;a++){const o=Math.abs(i[a]);o>r&&(r=o)}for(const a of e)for(let o=0;o<n;o++)a[o]/=r}}(s),{duration:t,length:s[0].length,sampleRate:s[0].length/t,numberOfChannels:s.length,getChannelData:e=>s==null?void 0:s[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Rt(s,t){const e=t.xmlns?document.createElementNS(t.xmlns,s):document.createElement(s);for(const[i,n]of Object.entries(t))if(i==="children")for(const[r,a]of Object.entries(t))typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(Rt(r,a));else i==="style"?Object.assign(e.style,n):i==="textContent"?e.textContent=n:e.setAttribute(i,n.toString());return e}function gt(s,t,e){const i=Rt(s,t||{});return e==null||e.appendChild(i),i}var ue=Object.freeze({__proto__:null,createElement:gt,default:gt});const pe={fetchBlob:function(s,t,e){return R(this,void 0,void 0,function*(){const i=yield fetch(s,e);if(i.status>=400)throw new Error(`Failed to fetch ${s}: ${i.status} (${i.statusText})`);return function(n,r){R(this,void 0,void 0,function*(){if(!n.body||!n.headers)return;const a=n.body.getReader(),o=Number(n.headers.get("Content-Length"))||0;let d=0;const c=p=>R(this,void 0,void 0,function*(){d+=(p==null?void 0:p.length)||0;const u=Math.round(d/o*100);r(u)}),l=()=>R(this,void 0,void 0,function*(){let p;try{p=yield a.read()}catch{return}p.done||(c(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class me extends V{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const n=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;i&&(this.media.src="");try{this.media.src=n}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return R(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class U extends V{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[n,r]=this.initHtml();i.appendChild(n),this.container=n,this.scrollContainer=r.querySelector(".scroll"),this.wrapper=r.querySelector(".wrapper"),this.canvasWrapper=r.querySelector(".canvases"),this.progressWrapper=r.querySelector(".progress"),this.cursor=r.querySelector(".cursor"),e&&r.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),n=e.clientX-i.left,r=e.clientY-i.top;return[n/i.width,r/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,n]=t(e);this.emit("click",i,n)}),this.wrapper.addEventListener("dblclick",e=>{const[i,n]=t(e);this.emit("dblclick",i,n)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:n}=this.scrollContainer,r=e/i,a=(e+n)/i;this.emit("scroll",r,a,e,e+n)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,n,r=3,a=0,o=100){if(!t)return()=>{};const d=matchMedia("(pointer: coarse)").matches;let c=()=>{};const l=p=>{if(p.button!==a)return;p.preventDefault(),p.stopPropagation();let u=p.clientX,m=p.clientY,f=!1;const b=Date.now(),g=w=>{if(w.preventDefault(),w.stopPropagation(),d&&Date.now()-b<o)return;const D=w.clientX,T=w.clientY,k=D-u,W=T-m;if(f||Math.abs(k)>r||Math.abs(W)>r){const O=t.getBoundingClientRect(),{left:F,top:L}=O;f||(i==null||i(u-F,m-L),f=!0),e(k,W,D-F,T-L),u=D,m=T}},S=w=>{if(f){const D=w.clientX,T=w.clientY,k=t.getBoundingClientRect(),{left:W,top:O}=k;n==null||n(D-W,T-O)}c()},y=w=>{w.relatedTarget&&w.relatedTarget!==document.documentElement||S(w)},x=w=>{f&&(w.stopPropagation(),w.preventDefault())},A=w=>{f&&w.preventDefault()};document.addEventListener("pointermove",g),document.addEventListener("pointerup",S),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("click",x,{capture:!0}),c=()=>{document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",S),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",A),setTimeout(()=>{document.removeEventListener("click",x,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{c(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const n=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const r=this.parent.clientHeight||128;return e!=null&&e.every(a=>!a.overlay)?r/n:r}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
|
1
|
+
import{r as h,E as $,_ as H,b6 as mt,bg as $t,bh as Ht,bi as Vt,M as X,O as q,aE as jt,n as P,bj as Gt,C as N,j as v,bk as Xt,b0 as qt,bl as Yt,bm as Kt,l as Jt,z as Qt,bn as tt,H as Zt,aA as te,bo as ee,bp as ie,b5 as se,bq as ne}from"./index.C5QL_Xc_.js";import{u as re,F as oe}from"./FormClearHelper.DieF97Af.js";import{T as ae,a as ft}from"./Toolbar.3K8i84rX.js";import{u as le}from"./Hooks.B1Hx6FYs.js";import{c as ce}from"./createDownloadLinkElement.DZMwyjvU.js";import{F as de,D as he}from"./FileDownload.esm.CjkhjFuL.js";var yt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),h.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});yt.displayName="Mic";var wt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});wt.displayName="Pause";var St=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});St.displayName="PlayArrow";var Ct=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),h.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});Ct.displayName="Refresh";var Et=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});Et.displayName="StopCircle";function R(s,t,e,i){return new(e||(e=Promise))(function(n,r){function a(c){try{d(i.next(c))}catch(l){r(l)}}function o(c){try{d(i.throw(c))}catch(l){r(l)}}function d(c){var l;c.done?n(c.value):(l=c.value,l instanceof e?l:new e(function(p){p(l)})).then(a,o)}d((i=i.apply(s,t||[])).next())})}let V=class{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),i==null?void 0:i.once){const n=()=>{this.un(t,n),this.un(t,e)};return this.on(t,n),n}return()=>this.un(t,e)}un(t,e){var i;(i=this.listeners[t])===null||i===void 0||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(i=>i(...e))}};const j={decode:function(s,t){return R(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(s).finally(()=>e.close())})},createBuffer:function(s,t){return typeof s[0]=="number"&&(s=[s]),function(e){const i=e[0];if(i.some(n=>n>1||n<-1)){const n=i.length;let r=0;for(let a=0;a<n;a++){const o=Math.abs(i[a]);o>r&&(r=o)}for(const a of e)for(let o=0;o<n;o++)a[o]/=r}}(s),{duration:t,length:s[0].length,sampleRate:s[0].length/t,numberOfChannels:s.length,getChannelData:e=>s==null?void 0:s[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Rt(s,t){const e=t.xmlns?document.createElementNS(t.xmlns,s):document.createElement(s);for(const[i,n]of Object.entries(t))if(i==="children")for(const[r,a]of Object.entries(t))typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(Rt(r,a));else i==="style"?Object.assign(e.style,n):i==="textContent"?e.textContent=n:e.setAttribute(i,n.toString());return e}function gt(s,t,e){const i=Rt(s,t||{});return e==null||e.appendChild(i),i}var ue=Object.freeze({__proto__:null,createElement:gt,default:gt});const pe={fetchBlob:function(s,t,e){return R(this,void 0,void 0,function*(){const i=yield fetch(s,e);if(i.status>=400)throw new Error(`Failed to fetch ${s}: ${i.status} (${i.statusText})`);return function(n,r){R(this,void 0,void 0,function*(){if(!n.body||!n.headers)return;const a=n.body.getReader(),o=Number(n.headers.get("Content-Length"))||0;let d=0;const c=p=>R(this,void 0,void 0,function*(){d+=(p==null?void 0:p.length)||0;const u=Math.round(d/o*100);r(u)}),l=()=>R(this,void 0,void 0,function*(){let p;try{p=yield a.read()}catch{return}p.done||(c(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class me extends V{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const n=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;i&&(this.media.src="");try{this.media.src=n}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return R(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class U extends V{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[n,r]=this.initHtml();i.appendChild(n),this.container=n,this.scrollContainer=r.querySelector(".scroll"),this.wrapper=r.querySelector(".wrapper"),this.canvasWrapper=r.querySelector(".canvases"),this.progressWrapper=r.querySelector(".progress"),this.cursor=r.querySelector(".cursor"),e&&r.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),n=e.clientX-i.left,r=e.clientY-i.top;return[n/i.width,r/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,n]=t(e);this.emit("click",i,n)}),this.wrapper.addEventListener("dblclick",e=>{const[i,n]=t(e);this.emit("dblclick",i,n)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:n}=this.scrollContainer,r=e/i,a=(e+n)/i;this.emit("scroll",r,a,e,e+n)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,n,r=3,a=0,o=100){if(!t)return()=>{};const d=matchMedia("(pointer: coarse)").matches;let c=()=>{};const l=p=>{if(p.button!==a)return;p.preventDefault(),p.stopPropagation();let u=p.clientX,m=p.clientY,f=!1;const b=Date.now(),g=w=>{if(w.preventDefault(),w.stopPropagation(),d&&Date.now()-b<o)return;const D=w.clientX,T=w.clientY,k=D-u,W=T-m;if(f||Math.abs(k)>r||Math.abs(W)>r){const O=t.getBoundingClientRect(),{left:F,top:L}=O;f||(i==null||i(u-F,m-L),f=!0),e(k,W,D-F,T-L),u=D,m=T}},S=w=>{if(f){const D=w.clientX,T=w.clientY,k=t.getBoundingClientRect(),{left:W,top:O}=k;n==null||n(D-W,T-O)}c()},y=w=>{w.relatedTarget&&w.relatedTarget!==document.documentElement||S(w)},x=w=>{f&&(w.stopPropagation(),w.preventDefault())},A=w=>{f&&w.preventDefault()};document.addEventListener("pointermove",g),document.addEventListener("pointerup",S),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("click",x,{capture:!0}),c=()=>{document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",S),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",A),setTimeout(()=>{document.removeEventListener("click",x,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{c(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const n=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const r=this.parent.clientHeight||128;return e!=null&&e.every(a=>!a.overlay)?r/n:r}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
|
2
2
|
<style${i?` nonce="${i}"`:""}>
|
3
3
|
:host {
|
4
4
|
user-select: none;
|
@@ -1 +1 @@
|
|
1
|
-
import{r,aE as f,b0 as l,j as t,b1 as m,bm as B,a$ as b,b2 as p}from"./index.
|
1
|
+
import{r,aE as f,b0 as l,j as t,b1 as m,bm as B,a$ as b,b2 as p}from"./index.C5QL_Xc_.js";import{c as h}from"./createDownloadLinkElement.DZMwyjvU.js";function w(n,o,e){return h({enforceDownloadInNewTab:e,url:n.buildMediaURL(o),filename:""})}function D(n){const{disabled:o,element:e,widgetMgr:s,endpoints:a,fragmentId:d}=n,{libConfig:{enforceDownloadInNewTab:c=!1}}=r.useContext(f);let i=l.SECONDARY;e.type==="primary"?i=l.PRIMARY:e.type==="tertiary"&&(i=l.TERTIARY),r.useEffect(()=>{a.checkSourceUrlResponse(e.url,"Download Button")},[e.url,a]);const u=()=>{e.ignoreRerun||s.setTriggerValue(e,{fromUi:!0},d),w(a,e.url,c).click()};return t("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:t(m,{help:e.help,containerWidth:e.useContainerWidth,children:t(B,{kind:i,size:b.SMALL,disabled:o,onClick:u,containerWidth:e.useContainerWidth,children:t(p,{icon:e.icon,label:e.label})})})})}const g=r.memo(D);export{g as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as c,r as s,aE as f,b4 as x,z as b,j as a,b1 as k,b5 as C,C as L,D as v,aC as T}from"./index.
|
1
|
+
import{n as c,r as s,aE as f,b4 as x,z as b,j as a,b1 as k,b5 as C,C as L,D as v,aC as T}from"./index.C5QL_Xc_.js";const h=c("div",{target:"e12r95n60"})(({containerWidth:r})=>({display:"flex",flexDirection:"column",width:r?"100%":"fit-content"})),w=c("a",{target:"e12r95n61"})(({disabled:r,isCurrentPage:o,containerWidth:l,theme:e})=>({textDecoration:"none",width:l?"100%":"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.default,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:o?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:o?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...r?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}})),S=c("span",{target:"e12r95n62"})(({disabled:r,theme:o})=>({color:o.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...r?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}:{}}));function y(r,o){return r===null&&o?!0:r===null&&!o?!1:r===!0}function P(r){const{onPageChange:o,currentPageScriptHash:l}=s.useContext(f),e=s.useContext(x),{colors:d}=b(),{disabled:t,element:n}=r,i=y(n.useContainerWidth,e),g=l===n.pageScriptHash,p=u=>{n.external?t&&u.preventDefault():(u.preventDefault(),t||o(n.pageScriptHash))};return a("div",{className:"stPageLink","data-testid":"stPageLink",children:a(k,{help:n.help,placement:C.TOP_RIGHT,containerWidth:i,children:a(h,{containerWidth:i,children:L(w,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:g,containerWidth:i,href:n.page,target:n.external?"_blank":"",rel:"noreferrer",onClick:p,children:[n.icon&&a(v,{size:"lg",color:t?d.fadedText40:d.bodyText,iconValue:n.icon}),a(S,{disabled:t,children:a(T,{source:n.label,allowHTML:!1,isLabel:!0,boldLabel:g,largerLabel:!0,disableLinks:!0})})]})})})})}const B=s.memo(P);export{B as default};
|