streamlit-nightly 1.46.2.dev20250715__py3-none-any.whl → 1.47.1.dev20250717__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. streamlit/connections/snowflake_connection.py +2 -2
  2. streamlit/elements/graphviz_chart.py +7 -0
  3. streamlit/elements/lib/file_uploader_utils.py +21 -2
  4. streamlit/elements/plotly_chart.py +6 -2
  5. streamlit/elements/pyplot.py +5 -1
  6. streamlit/elements/widgets/chat.py +6 -0
  7. streamlit/elements/widgets/file_uploader.py +6 -0
  8. streamlit/static/index.html +1 -1
  9. streamlit/static/manifest.json +218 -218
  10. streamlit/static/static/js/{ErrorOutline.esm.CaUhmcG6.js → ErrorOutline.esm.77fHhxmf.js} +1 -1
  11. streamlit/static/static/js/{FileDownload.esm.ZEl-HfEg.js → FileDownload.esm.qBSGbtBF.js} +1 -1
  12. streamlit/static/static/js/{FileHelper.BKIVKQnB.js → FileHelper.BYzZxqTl.js} +1 -1
  13. streamlit/static/static/js/{FormClearHelper.C4W8xjEX.js → FormClearHelper.BapTKtHM.js} +1 -1
  14. streamlit/static/static/js/{Hooks.Bcs7Dqad.js → Hooks.DQUBTvpJ.js} +1 -1
  15. streamlit/static/static/js/{InputInstructions.CAp9mFM6.js → InputInstructions.DfmDQyfZ.js} +1 -1
  16. streamlit/static/static/js/{ProgressBar.DBmbQ5U6.js → ProgressBar.DH8nVA3A.js} +1 -1
  17. streamlit/static/static/js/{RenderInPortalIfExists.BGENGpwt.js → RenderInPortalIfExists.Dc3T7qg7.js} +1 -1
  18. streamlit/static/static/js/{Toolbar.CA92Moni.js → Toolbar.DoQICZLn.js} +1 -1
  19. streamlit/static/static/js/{base-input.C-H36mFE.js → base-input.DJLL2PiI.js} +1 -1
  20. streamlit/static/static/js/{checkbox.B6I7DbdE.js → checkbox.BEZCVkdu.js} +1 -1
  21. streamlit/static/static/js/{createSuper.DEaMobJa.js → createSuper.Cd0gz3ZP.js} +1 -1
  22. streamlit/static/static/js/{data-grid-overlay-editor.CxvB719M.js → data-grid-overlay-editor.DBCkAuJT.js} +1 -1
  23. streamlit/static/static/js/{downloader.CDDSxxak.js → downloader.CNEzyeJy.js} +1 -1
  24. streamlit/static/static/js/{es6.BMYexa9t.js → es6.Dj_qfQ-J.js} +2 -2
  25. streamlit/static/static/js/{iframeResizer.contentWindow.D-l9cCws.js → iframeResizer.contentWindow.DWZGbVE9.js} +1 -1
  26. streamlit/static/static/js/{index.CqALE_Sz.js → index.3629iKJ_.js} +1 -1
  27. streamlit/static/static/js/{index.1ZtAvXND.js → index.9H0CGffC.js} +1 -1
  28. streamlit/static/static/js/{index.Bb5Sxtkx.js → index.B5PCerES.js} +1 -1
  29. streamlit/static/static/js/{index.BQQ5JTaz.js → index.BCYov0Z6.js} +1 -1
  30. streamlit/static/static/js/{index.CfoE7jon.js → index.BQkb06fM.js} +1 -1
  31. streamlit/static/static/js/{index.DzH3Qe6P.js → index.BlsArqdU.js} +1 -1
  32. streamlit/static/static/js/{index.CEUhSvrW.js → index.Bnbuv9NG.js} +1 -1
  33. streamlit/static/static/js/{index.Ct2v9YN2.js → index.BqR_ah2P.js} +1 -1
  34. streamlit/static/static/js/{index.aLRZj3JI.js → index.Bwe6rc_e.js} +1 -1
  35. streamlit/static/static/js/{index.phUFaJLn.js → index.BwewuyvV.js} +1 -1
  36. streamlit/static/static/js/{index.BoTBd6Jn.js → index.CA4nGH2a.js} +1 -1
  37. streamlit/static/static/js/{index.Ch30W6NP.js → index.CHmeRQB0.js} +1 -1
  38. streamlit/static/static/js/{index.Ce906Q5W.js → index.CSEGzY5i.js} +1 -1
  39. streamlit/static/static/js/{index.CS9yBABI.js → index.CoYP8GwB.js} +1 -1
  40. streamlit/static/static/js/{index.Ou3kxN43.js → index.Co_D1bGa.js} +1 -1
  41. streamlit/static/static/js/{index.Dm8vdcs9.js → index.CtsW3eJF.js} +1 -1
  42. streamlit/static/static/js/{index.BdazK8za.js → index.D4efqxNs.js} +1 -1
  43. streamlit/static/static/js/{index.CphcnmQO.js → index.DF-6qVO2.js} +1 -1
  44. streamlit/static/static/js/{index.DNoDZbuV.js → index.DIxNMQxZ.js} +1 -1
  45. streamlit/static/static/js/{index.D9XZpDDt.js → index.DYQbjkZY.js} +1 -1
  46. streamlit/static/static/js/{index.Buz-cCdK.js → index.DaegFwX9.js} +1 -1
  47. streamlit/static/static/js/{index.DHv7KxuP.js → index.DcXKaleC.js} +1 -1
  48. streamlit/static/static/js/{index.vRRu8CJW.js → index.Dh4PSyeU.js} +1 -1
  49. streamlit/static/static/js/{index.CZbA_QY0.js → index.Dj_sBWoU.js} +1 -1
  50. streamlit/static/static/js/{index.C_f3O5DO.js → index.DkYSvvUe.js} +1 -1
  51. streamlit/static/static/js/{index.DMzpbFDn.js → index.Dxi0xeeC.js} +1 -1
  52. streamlit/static/static/js/{index.Br2RYgMU.js → index.Dy9mt1lb.js} +1 -1
  53. streamlit/static/static/js/{index.B-g_Erog.js → index.DyKNikeb.js} +72 -72
  54. streamlit/static/static/js/{index.C9PLrvrw.js → index.HTy-ykxC.js} +1 -1
  55. streamlit/static/static/js/{index.DBVPN8iJ.js → index.HcR5RThE.js} +1 -1
  56. streamlit/static/static/js/{index.EAQB8Tuq.js → index.SCzIN5SB.js} +3 -3
  57. streamlit/static/static/js/{index.DygxY7Lg.js → index.Uzv6ooYp.js} +2 -2
  58. streamlit/static/static/js/{index.DYvo87DK.js → index.gupvSUiZ.js} +1 -1
  59. streamlit/static/static/js/{index.kIS8fJE1.js → index.hExo-vs3.js} +1 -1
  60. streamlit/static/static/js/{index.DFjvmFUl.js → index.jtH7YSzj.js} +1 -1
  61. streamlit/static/static/js/{index.DJ6SMXzt.js → index.nKiB2Lb1.js} +1 -1
  62. streamlit/static/static/js/{index.BjJqANY4.js → index.r5SsG0UH.js} +1 -1
  63. streamlit/static/static/js/{input.DjnwsrgF.js → input.C4PKmVyq.js} +1 -1
  64. streamlit/static/static/js/{memory.C-fF2BpE.js → memory.BlWtC9mT.js} +1 -1
  65. streamlit/static/static/js/{mergeWith.Cjweouij.js → mergeWith.BpStvP-d.js} +1 -1
  66. streamlit/static/static/js/{number-overlay-editor.BFTlQD7x.js → number-overlay-editor.h2wH-G_L.js} +1 -1
  67. streamlit/static/static/js/{possibleConstructorReturn.Cy1PJuxU.js → possibleConstructorReturn.CU3h0WWI.js} +1 -1
  68. streamlit/static/static/js/{sandbox.DvSXZ4R-.js → sandbox.BW2Eycz9.js} +1 -1
  69. streamlit/static/static/js/{timepicker.bPCY7gSF.js → timepicker.ASDBDZeB.js} +1 -1
  70. streamlit/static/static/js/{toConsumableArray.DaNXH4b3.js → toConsumableArray.Dn5dJvBy.js} +1 -1
  71. streamlit/static/static/js/{uniqueId.CDZNs_pn.js → uniqueId.8z-ePOzb.js} +1 -1
  72. streamlit/static/static/js/{useBasicWidgetState.YAhDGDM8.js → useBasicWidgetState.Bg3DrOCg.js} +1 -1
  73. streamlit/static/static/js/{useOnInputChange.HiDk3WIa.js → useOnInputChange.SNHZF6F7.js} +1 -1
  74. streamlit/static/static/js/{useTextInputAutoExpand.CwuIWHHK.js → useTextInputAutoExpand.Dm8V44AL.js} +1 -1
  75. streamlit/static/static/js/{withFullScreenWrapper.C4lh8vGd.js → withFullScreenWrapper.Drneg2_8.js} +1 -1
  76. streamlit/user_info.py +5 -1
  77. {streamlit_nightly-1.46.2.dev20250715.dist-info → streamlit_nightly-1.47.1.dev20250717.dist-info}/METADATA +13 -1
  78. {streamlit_nightly-1.46.2.dev20250715.dist-info → streamlit_nightly-1.47.1.dev20250717.dist-info}/RECORD +82 -82
  79. {streamlit_nightly-1.46.2.dev20250715.data → streamlit_nightly-1.47.1.dev20250717.data}/scripts/streamlit.cmd +0 -0
  80. {streamlit_nightly-1.46.2.dev20250715.dist-info → streamlit_nightly-1.47.1.dev20250717.dist-info}/WHEEL +0 -0
  81. {streamlit_nightly-1.46.2.dev20250715.dist-info → streamlit_nightly-1.47.1.dev20250717.dist-info}/entry_points.txt +0 -0
  82. {streamlit_nightly-1.46.2.dev20250715.dist-info → streamlit_nightly-1.47.1.dev20250717.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{r,b as z}from"./index.EAQB8Tuq.js";import{s as J,i as D,a as Q,b as U,T as Z,C as ee,m as te}from"./index.B-g_Erog.js";import"./FormClearHelper.C4W8xjEX.js";import"./withFullScreenWrapper.C4lh8vGd.js";import"./Toolbar.CA92Moni.js";import"./checkbox.B6I7DbdE.js";import"./mergeWith.Cjweouij.js";import"./sprintf.D7DtBTRn.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./toConsumableArray.DaNXH4b3.js";import"./possibleConstructorReturn.Cy1PJuxU.js";import"./createSuper.DEaMobJa.js";import"./FileDownload.esm.ZEl-HfEg.js";const re=()=>t=>t.targetX,ie=()=>t=>t.targetY,ne=()=>t=>t.targetWidth,se=()=>t=>t.targetHeight,ae=()=>t=>t.targetY+10,oe=()=>t=>Math.max(0,(t.targetHeight-28)/2),le=J("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[ie(),"px"],"d19meir1-1":[re(),"px"],"d19meir1-2":[ne(),"px"],"d19meir1-3":[se(),"px"],"d19meir1-4":[ae(),"px"],"d19meir1-5":[oe(),"px"]}});function de(){const[t,s]=r.useState();return[t??void 0,s]}function ue(){const[t,s]=de(),[n,h]=r.useState(0),[f,v]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&v(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(f||t===void 0)return;let a;const o=()=>{const{right:x}=t.getBoundingClientRect();h(m=>Math.min(m+window.innerWidth-x-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,f]);const C=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:C}}const Se=t=>{const{target:s,content:n,onFinishEditing:h,forceEditMode:f,initialValue:v,imageEditorOverride:C,markdownDivCreateNode:a,highlight:o,className:x,theme:m,id:H,cell:p,bloom:I,portalElementRef:w,validateCell:g,getCellRenderer:F,provideEditor:P,isOutsideClick:W,customEventTarget:X}=t,[l,A]=r.useState(f?n:void 0),O=r.useRef(l??n);O.current=l??n;const[y,S]=r.useState(()=>g===void 0?!0:!(D(n)&&g?.(p,n,O.current)===!1)),u=r.useCallback((e,i)=>{h(y?e:void 0,i)},[y,h]),K=r.useCallback(e=>{if(g!==void 0&&e!==void 0&&D(e)){const i=g(p,e,O.current);i===!1?S(!1):(typeof i=="object"&&(e=i),S(!0))}A(e)},[p,g]),E=r.useRef(!1),c=r.useRef(void 0),Y=r.useCallback(()=>{u(l,[0,0]),E.current=!0},[l,u]),j=r.useCallback((e,i)=>{u(e,i??c.current??[0,0]),E.current=!0},[u]),L=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),c.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),c.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),c.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!E.current&&c.current!==void 0&&(u(i?l:void 0,c.current),E.current=!0)},0)},[u,l]),k=l??n,[d,q]=r.useMemo(()=>{if(Q(n))return[];const e={...n,location:p},i=P?.(e);return i!==void 0?[i,!1]:[F(n)?.provideEditor?.(e),!1]},[p,n,F,P]),{ref:B,style:$}=ue();let T=!0,M,_=!0,b;if(d!==void 0){T=d.disablePadding!==!0,_=d.disableStyling!==!0;const e=U(d);e&&(b=d.styleOverride);const i=e?d.editor:d;M=r.createElement(i,{portalElementRef:w,isHighlighted:o,onChange:K,value:k,initialValue:v,onFinishedEditing:j,validatedSelection:D(k)?k.selectionRange:void 0,forceEditMode:f,target:s,imageEditorOverride:C,markdownDivCreateNode:a,isValid:y,theme:m})}b={...b,...$};const N=w?.current??document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please, either provide a portalElementRef or add `<div id="portal" />` as the last child of your `<body>`.'),null;let R=_?"gdg-style":"gdg-unstyle";y||(R+=" gdg-invalid"),T&&(R+=" gdg-pad");const V=I?.[0]??1,G=I?.[1]??1;return z.createPortal(r.createElement(Z.Provider,{value:m},r.createElement(ee,{style:te(m),className:x,onClickOutside:Y,isOutsideClick:W,customEventTarget:X},r.createElement(le,{ref:B,id:H,className:R,style:b,as:q===!0?"label":void 0,targetX:s.x-V,targetY:s.y-G,targetWidth:s.width+V*2,targetHeight:s.height+G*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:L},M)))),N)};export{Se as default};
1
+ import{r,b as z}from"./index.SCzIN5SB.js";import{s as J,i as D,a as Q,b as U,T as Z,C as ee,m as te}from"./index.DyKNikeb.js";import"./FormClearHelper.BapTKtHM.js";import"./withFullScreenWrapper.Drneg2_8.js";import"./Toolbar.DoQICZLn.js";import"./checkbox.BEZCVkdu.js";import"./mergeWith.BpStvP-d.js";import"./sprintf.D7DtBTRn.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./toConsumableArray.Dn5dJvBy.js";import"./possibleConstructorReturn.CU3h0WWI.js";import"./createSuper.Cd0gz3ZP.js";import"./FileDownload.esm.qBSGbtBF.js";const re=()=>t=>t.targetX,ie=()=>t=>t.targetY,ne=()=>t=>t.targetWidth,se=()=>t=>t.targetHeight,ae=()=>t=>t.targetY+10,oe=()=>t=>Math.max(0,(t.targetHeight-28)/2),le=J("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[ie(),"px"],"d19meir1-1":[re(),"px"],"d19meir1-2":[ne(),"px"],"d19meir1-3":[se(),"px"],"d19meir1-4":[ae(),"px"],"d19meir1-5":[oe(),"px"]}});function de(){const[t,s]=r.useState();return[t??void 0,s]}function ue(){const[t,s]=de(),[n,h]=r.useState(0),[f,v]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&v(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(f||t===void 0)return;let a;const o=()=>{const{right:x}=t.getBoundingClientRect();h(m=>Math.min(m+window.innerWidth-x-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,f]);const C=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:C}}const Se=t=>{const{target:s,content:n,onFinishEditing:h,forceEditMode:f,initialValue:v,imageEditorOverride:C,markdownDivCreateNode:a,highlight:o,className:x,theme:m,id:H,cell:p,bloom:I,portalElementRef:w,validateCell:g,getCellRenderer:F,provideEditor:P,isOutsideClick:W,customEventTarget:X}=t,[l,A]=r.useState(f?n:void 0),O=r.useRef(l??n);O.current=l??n;const[y,S]=r.useState(()=>g===void 0?!0:!(D(n)&&g?.(p,n,O.current)===!1)),u=r.useCallback((e,i)=>{h(y?e:void 0,i)},[y,h]),K=r.useCallback(e=>{if(g!==void 0&&e!==void 0&&D(e)){const i=g(p,e,O.current);i===!1?S(!1):(typeof i=="object"&&(e=i),S(!0))}A(e)},[p,g]),E=r.useRef(!1),c=r.useRef(void 0),Y=r.useCallback(()=>{u(l,[0,0]),E.current=!0},[l,u]),j=r.useCallback((e,i)=>{u(e,i??c.current??[0,0]),E.current=!0},[u]),L=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),c.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),c.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),c.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!E.current&&c.current!==void 0&&(u(i?l:void 0,c.current),E.current=!0)},0)},[u,l]),k=l??n,[d,q]=r.useMemo(()=>{if(Q(n))return[];const e={...n,location:p},i=P?.(e);return i!==void 0?[i,!1]:[F(n)?.provideEditor?.(e),!1]},[p,n,F,P]),{ref:B,style:$}=ue();let T=!0,M,_=!0,b;if(d!==void 0){T=d.disablePadding!==!0,_=d.disableStyling!==!0;const e=U(d);e&&(b=d.styleOverride);const i=e?d.editor:d;M=r.createElement(i,{portalElementRef:w,isHighlighted:o,onChange:K,value:k,initialValue:v,onFinishedEditing:j,validatedSelection:D(k)?k.selectionRange:void 0,forceEditMode:f,target:s,imageEditorOverride:C,markdownDivCreateNode:a,isValid:y,theme:m})}b={...b,...$};const N=w?.current??document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please, either provide a portalElementRef or add `<div id="portal" />` as the last child of your `<body>`.'),null;let R=_?"gdg-style":"gdg-unstyle";y||(R+=" gdg-invalid"),T&&(R+=" gdg-pad");const V=I?.[0]??1,G=I?.[1]??1;return z.createPortal(r.createElement(Z.Provider,{value:m},r.createElement(ee,{style:te(m),className:x,onClickOutside:Y,isOutsideClick:W,customEventTarget:X},r.createElement(le,{ref:B,id:H,className:R,style:b,as:q===!0?"label":void 0,targetX:s.x-V,targetY:s.y-G,targetWidth:s.width+V*2,targetHeight:s.height+G*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:L},M)))),N)};export{Se as default};
@@ -1 +1 @@
1
- import{c as w,e as b}from"./es6.BMYexa9t.js";import"./index.EAQB8Tuq.js";const{WritableStream:m,TransformStream:y,DOMException:P,Blob:_}=w,{GONE:v}=b,E=/constructor/i.test(window.HTMLElement);class C{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new P(...v)}async isSameEntry(e){return this===e}async createWritable(e={}){const t=await navigator.serviceWorker?.getRegistration(),o=document.createElement("a"),n=new y,u=n.writable;if(o.download=this.name,E||!t){let r=[];n.readable.pipeTo(new m({write(s){r.push(new _([s]))},close(){const s=new _(r,{type:"application/octet-stream; charset=utf-8"});r=[],o.href=URL.createObjectURL(s),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:r,readablePort:s}=new S(m),a=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),R={"content-disposition":"attachment; filename*=UTF-8''"+a,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},f=setTimeout(()=>t.active.postMessage(0),1e4);n.readable.pipeThrough(new y({transform(c,d){if(c instanceof Uint8Array)return d.enqueue(c);const g=new Response(c).body.getReader(),h=j=>g.read().then(p=>p.done?0:h(d.enqueue(p.value)));return h()}})).pipeTo(r).finally(()=>{clearInterval(f)}),t.active.postMessage({url:t.scope+a,headers:R,readablePort:s},[s]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+a,document.body.appendChild(i)}return u.getWriter()}}const M=0,T=0,L=1,O=1,U=2;class k{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:M,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:U}),this._port.close()}abort(e){this._port.postMessage({type:O,reason:e}),this._port.close()}_onMessage(e){e.type===T&&this._resolveReady(),e.type===L&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class S{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new k(t.port2))}}export{C as FileHandle};
1
+ import{c as w,e as b}from"./es6.Dj_qfQ-J.js";import"./index.SCzIN5SB.js";const{WritableStream:m,TransformStream:y,DOMException:P,Blob:_}=w,{GONE:v}=b,E=/constructor/i.test(window.HTMLElement);class C{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new P(...v)}async isSameEntry(e){return this===e}async createWritable(e={}){const t=await navigator.serviceWorker?.getRegistration(),o=document.createElement("a"),n=new y,u=n.writable;if(o.download=this.name,E||!t){let r=[];n.readable.pipeTo(new m({write(s){r.push(new _([s]))},close(){const s=new _(r,{type:"application/octet-stream; charset=utf-8"});r=[],o.href=URL.createObjectURL(s),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:r,readablePort:s}=new S(m),a=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),R={"content-disposition":"attachment; filename*=UTF-8''"+a,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},f=setTimeout(()=>t.active.postMessage(0),1e4);n.readable.pipeThrough(new y({transform(c,d){if(c instanceof Uint8Array)return d.enqueue(c);const g=new Response(c).body.getReader(),h=j=>g.read().then(p=>p.done?0:h(d.enqueue(p.value)));return h()}})).pipeTo(r).finally(()=>{clearInterval(f)}),t.active.postMessage({url:t.scope+a,headers:R,readablePort:s},[s]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+a,document.body.appendChild(i)}return u.getWriter()}}const M=0,T=0,L=1,O=1,U=2;class k{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:M,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:U}),this._port.close()}abort(e){this._port.postMessage({type:O,reason:e}),this._port.close()}_onMessage(e){e.type===T&&this._resolveReady(),e.type===L&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class S{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new k(t.port2))}}export{C as FileHandle};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./downloader.CDDSxxak.js","./index.EAQB8Tuq.js","../css/index.CJVRHjQZ.css","./sandbox.DvSXZ4R-.js","./memory.C-fF2BpE.js"])))=>i.map(i=>d[i]);
2
- import{y as d}from"./index.EAQB8Tuq.js";const I=globalThis.showDirectoryPicker;async function j(i={}){if(I&&!i._preferPolyfill)return I(i);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const t=d(()=>Promise.resolve().then(()=>R),void 0,import.meta.url);return await new Promise(a=>{e.addEventListener("change",a),e.click()}),t.then(a=>a.getDirHandlesFromInput(e))}const M={accepts:[]},x=globalThis.showOpenFilePicker;async function N(i={}){const e={...M,...i};if(x&&!i._preferPolyfill)return x(e);const t=document.createElement("input");t.type="file",t.multiple=e.multiple,t.accept=(e.accepts||[]).map(o=>[...(o.extensions||[]).map(n=>"."+n),...o.mimeTypes||[]]).flat().join(","),Object.assign(t.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(t);const a=d(()=>Promise.resolve().then(()=>R),void 0,import.meta.url);return await new Promise(o=>{t.addEventListener("change",o,{once:!0}),t.click()}),t.remove(),a.then(o=>o.getFileHandlesFromInput(t))}const L=globalThis.showSaveFilePicker;async function V(i={}){if(L&&!i._preferPolyfill)return L(i);i._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),i.suggestedName=i._name);const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:a}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:a}},void 0,import.meta.url),{FileHandle:t}=await d(async()=>{const{FileHandle:a}=await import("./downloader.CDDSxxak.js");return{FileHandle:a}},__vite__mapDeps([0,1,2]),import.meta.url);return new e(new t(i.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const i=this.webkitGetAsEntry(),[{FileHandle:e,FolderHandle:t},{FileSystemDirectoryHandle:a},{FileSystemFileHandle:o}]=await Promise.all([d(()=>import("./sandbox.DvSXZ4R-.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>H),void 0,import.meta.url),d(()=>Promise.resolve().then(()=>g),void 0,import.meta.url)]);return i.isFile?new o(new e(i,!1)):new a(new t(i,!1))});async function W(i,e={}){if(!i)return globalThis.navigator?.storage?.getDirectory()||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:t}=await d(async()=>{const{FileSystemDirectoryHandle:n}=await Promise.resolve().then(()=>H);return{FileSystemDirectoryHandle:n}},void 0,import.meta.url),a=await i,o=await(a.default?a.default(e):a(e));return new t(o)}const q={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:$}=q;class p extends ${#e;constructor(e){super(e),this.#e=e,Object.setPrototypeOf(this,p.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),a=t.write(e);return t.releaseLock(),a}}Object.defineProperty(p.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(p.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=p);const m=Symbol("adapter");class T{[m];name;kind;constructor(e){this.kind=e.kind,this.name=e.name,this[m]=e}async queryPermission(e={}){const{mode:t="read"}=e,a=this[m];if(a.queryPermission)return a.queryPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return a.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[m];if(t.requestPermission)return t.requestPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async remove(e={}){await this[m].remove(e)}async isSameEntry(e){return this===e?!0:!e||typeof e!="object"||this.kind!==e.kind||!e[m]?!1:this[m].isSameEntry(e[m])}}Object.defineProperty(T.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});globalThis.FileSystemHandle&&(globalThis.FileSystemHandle.prototype.queryPermission??=function(i){return"granted"});const A={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:i=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${i}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},z={writable:globalThis.WritableStream};async function U(i){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[e,t,a]=await Promise.all([d(()=>import("./memory.C-fF2BpE.js"),__vite__mapDeps([4,1,2]),import.meta.url),d(()=>import("./sandbox.DvSXZ4R-.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>H),void 0,import.meta.url)]),o=new e.FolderHandle("",!1);return o._entries=i.map(n=>n.isFile?new t.FileHandle(n,!1):new t.FolderHandle(n,!1)),new a.FileSystemDirectoryHandle(o)}async function k(i){const{FolderHandle:e,FileHandle:t}=await d(async()=>{const{FolderHandle:y,FileHandle:s}=await import("./memory.C-fF2BpE.js");return{FolderHandle:y,FileHandle:s}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemDirectoryHandle:a}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>H);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),o=Array.from(i.files),n=o[0].webkitRelativePath.split("/",1)[0],l=new e(n,!1);return o.forEach(y=>{const s=y.webkitRelativePath.split("/");s.shift();const c=s.pop(),f=s.reduce((w,b)=>(w._entries[b]||(w._entries[b]=new e(b,!1)),w._entries[b]),l);f._entries[c]=new t(y.name,y,!1)}),new a(l)}async function C(i){const{FileHandle:e}=await d(async()=>{const{FileHandle:a}=await import("./memory.C-fF2BpE.js");return{FileHandle:a}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemFileHandle:t}=await d(async()=>{const{FileSystemFileHandle:a}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:a}},void 0,import.meta.url);return Array.from(i.files).map(a=>new t(new e(a.name,a,!1)))}const R=Object.freeze(Object.defineProperty({__proto__:null,config:z,errors:A,fromDataTransfer:U,getDirHandlesFromInput:k,getFileHandlesFromInput:C},Symbol.toStringTag,{value:"Module"})),{GONE:B,MOD_ERR:G}=A,u=Symbol("adapter");let h=class v extends T{[u];constructor(e){super(e),this[u]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const a=await this[u].getDirectoryHandle(e,t);return new v(a)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:t}},void 0,import.meta.url);for await(const[t,a]of this[u].entries())yield[a.name,a.kind==="file"?new e(a):new v(a)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:t}},void 0,import.meta.url);console.warn("deprecated, use .entries() instead");for await(let t of this[u].entries())yield t.kind==="file"?new e(t):new v(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:a}=await d(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:n}},void 0,import.meta.url);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const o=await this[u].getFileHandle(e,t);return new a(o)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[u].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:a,path:o}=t.pop();for await(const n of a.values()){if(await n.isSameEntry(e))return[...o,n.name];n.kind==="directory"&&t.push({handle:n,path:[...o,n.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[Symbol.asyncIterator](){return this.entries()}};Object.defineProperty(h.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(h.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});if(globalThis.FileSystemDirectoryHandle){const i=globalThis.FileSystemDirectoryHandle.prototype;i.resolve=async function(n){if(await n.isSameEntry(this))return[];const l=[{handle:this,path:[]}];for(;l.length;){let{handle:y,path:s}=l.pop();for await(const c of y.values()){if(await c.isSameEntry(n))return[...s,c.name];c.kind==="directory"&&l.push({handle:c,path:[...s,c.name]})}}return null};async function e(o){if(await(await navigator.storage.getDirectory()).resolve(o)===null)throw new DOMException(...B)}const t=i.entries;i.entries=async function*(){await e(this),yield*t.call(this)},i[Symbol.asyncIterator]=async function*(){yield*this.entries()};const a=i.removeEntry;i.removeEntry=async function(o,n={}){return a.call(this,o,n).catch(async l=>{throw l instanceof DOMException&&l.name==="UnknownError"&&!n.recursive&&!(await t.call(this).next()).done?new DOMException(...G):l})}}const H=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:h,default:h},Symbol.toStringTag,{value:"Module"})),{INVALID:Y,SYNTAX:O,GONE:X}=A,E=Symbol("adapter");class F extends T{[E];constructor(e){super(e),this[E]=e}async createWritable(e={}){return new p(await this[E].createWritable(e))}async getFile(){return this[E].getFile()}}Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(F.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});if(globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const i=new WeakMap;let e;const t=()=>{let o,n;onmessage=async l=>{const y=l.ports[0],s=l.data;switch(s.type){case"open":const c=s.name;let f=await navigator.storage.getDirectory();for(const w of s.path)f=await f.getDirectoryHandle(w);o=await f.getFileHandle(c),n=await o.createSyncAccessHandle();break;case"write":n.write(s.data,{at:s.position}),n.flush();break;case"truncate":n.truncate(s.size);break;case"abort":case"close":n.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(o){if(!e){const r=`(${t.toString()})()`,S=new Blob([r],{type:"text/javascript"});e=URL.createObjectURL(S)}const n=new Worker(e,{type:"module"});let l=0;const y=new TextEncoder;let s=await this.getFile().then(r=>r.size);const c=r=>new Promise((S,P)=>{const _=new MessageChannel;_.port1.onmessage=D=>{D.data instanceof Error?P(D.data):S(D.data),_.port1.close(),_.port2.close(),_.port1.onmessage=null},n.postMessage(r,[_.port2])}),f=await navigator.storage.getDirectory(),w=await i.get(this),b=await f.resolve(w);if(b===null)throw new DOMException(...X);return await c({type:"open",path:b,name:this.name}),o?.keepExistingData===!1&&(await c({type:"truncate",size:0}),s=0),new p({start:r=>{},async write(r){if(r?.constructor===Object?r={...r}:r={type:"write",data:r,position:l},r.type==="write"){if(!("data"in r))throw await c({type:"close"}),new DOMException(...O("write requires a data argument"));if(r.position??=l,typeof r.data=="string")r.data=y.encode(r.data);else if(r.data instanceof ArrayBuffer)r.data=new Uint8Array(r.data);else if(!(r.data instanceof Uint8Array)&&ArrayBuffer.isView(r.data))r.data=new Uint8Array(r.data.buffer,r.data.byteOffset,r.data.byteLength);else if(!(r.data instanceof Uint8Array)){const P=await new Response(r.data).arrayBuffer();r.data=new Uint8Array(P)}Number.isInteger(r.position)&&r.position>=0&&(l=r.position),l+=r.data.byteLength,s+=r.data.byteLength}else if(r.type==="seek")if(Number.isInteger(r.position)&&r.position>=0){if(s<r.position)throw new DOMException(...Y);console.log("seeking",r),l=r.position;return}else throw await c({type:"close"}),new DOMException(...O("seek requires a position argument"));else if(r.type==="truncate")if(Number.isInteger(r.size)&&r.size>=0)s=r.size,l>s&&(l=s);else throw await c({type:"close"}),new DOMException(...O("truncate requires a size argument"));await c(r)},async close(){await c({type:"close"}),n.terminate()},async abort(r){await c({type:"abort",reason:r}),n.terminate()}})};const a=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...o){const n=await a.call(this,...o);return i.set(n,this),n}}const g=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:F,default:F},Symbol.toStringTag,{value:"Module"})),Q=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:h,FileSystemFileHandle:F,FileSystemHandle:T,FileSystemWritableFileStream:p,getOriginPrivateDirectory:W,showDirectoryPicker:j,showOpenFilePicker:N,showSaveFilePicker:V},Symbol.toStringTag,{value:"Module"}));export{Q as a,q as c,A as e};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./downloader.CNEzyeJy.js","./index.SCzIN5SB.js","../css/index.CJVRHjQZ.css","./sandbox.BW2Eycz9.js","./memory.BlWtC9mT.js"])))=>i.map(i=>d[i]);
2
+ import{y as d}from"./index.SCzIN5SB.js";const I=globalThis.showDirectoryPicker;async function j(i={}){if(I&&!i._preferPolyfill)return I(i);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const t=d(()=>Promise.resolve().then(()=>R),void 0,import.meta.url);return await new Promise(a=>{e.addEventListener("change",a),e.click()}),t.then(a=>a.getDirHandlesFromInput(e))}const M={accepts:[]},x=globalThis.showOpenFilePicker;async function N(i={}){const e={...M,...i};if(x&&!i._preferPolyfill)return x(e);const t=document.createElement("input");t.type="file",t.multiple=e.multiple,t.accept=(e.accepts||[]).map(o=>[...(o.extensions||[]).map(n=>"."+n),...o.mimeTypes||[]]).flat().join(","),Object.assign(t.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(t);const a=d(()=>Promise.resolve().then(()=>R),void 0,import.meta.url);return await new Promise(o=>{t.addEventListener("change",o,{once:!0}),t.click()}),t.remove(),a.then(o=>o.getFileHandlesFromInput(t))}const L=globalThis.showSaveFilePicker;async function V(i={}){if(L&&!i._preferPolyfill)return L(i);i._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),i.suggestedName=i._name);const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:a}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:a}},void 0,import.meta.url),{FileHandle:t}=await d(async()=>{const{FileHandle:a}=await import("./downloader.CNEzyeJy.js");return{FileHandle:a}},__vite__mapDeps([0,1,2]),import.meta.url);return new e(new t(i.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const i=this.webkitGetAsEntry(),[{FileHandle:e,FolderHandle:t},{FileSystemDirectoryHandle:a},{FileSystemFileHandle:o}]=await Promise.all([d(()=>import("./sandbox.BW2Eycz9.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>H),void 0,import.meta.url),d(()=>Promise.resolve().then(()=>g),void 0,import.meta.url)]);return i.isFile?new o(new e(i,!1)):new a(new t(i,!1))});async function W(i,e={}){if(!i)return globalThis.navigator?.storage?.getDirectory()||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:t}=await d(async()=>{const{FileSystemDirectoryHandle:n}=await Promise.resolve().then(()=>H);return{FileSystemDirectoryHandle:n}},void 0,import.meta.url),a=await i,o=await(a.default?a.default(e):a(e));return new t(o)}const q={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:$}=q;class p extends ${#e;constructor(e){super(e),this.#e=e,Object.setPrototypeOf(this,p.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),a=t.write(e);return t.releaseLock(),a}}Object.defineProperty(p.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(p.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=p);const m=Symbol("adapter");class T{[m];name;kind;constructor(e){this.kind=e.kind,this.name=e.name,this[m]=e}async queryPermission(e={}){const{mode:t="read"}=e,a=this[m];if(a.queryPermission)return a.queryPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return a.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[m];if(t.requestPermission)return t.requestPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async remove(e={}){await this[m].remove(e)}async isSameEntry(e){return this===e?!0:!e||typeof e!="object"||this.kind!==e.kind||!e[m]?!1:this[m].isSameEntry(e[m])}}Object.defineProperty(T.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});globalThis.FileSystemHandle&&(globalThis.FileSystemHandle.prototype.queryPermission??=function(i){return"granted"});const A={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:i=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${i}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},z={writable:globalThis.WritableStream};async function U(i){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[e,t,a]=await Promise.all([d(()=>import("./memory.BlWtC9mT.js"),__vite__mapDeps([4,1,2]),import.meta.url),d(()=>import("./sandbox.BW2Eycz9.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>H),void 0,import.meta.url)]),o=new e.FolderHandle("",!1);return o._entries=i.map(n=>n.isFile?new t.FileHandle(n,!1):new t.FolderHandle(n,!1)),new a.FileSystemDirectoryHandle(o)}async function k(i){const{FolderHandle:e,FileHandle:t}=await d(async()=>{const{FolderHandle:y,FileHandle:s}=await import("./memory.BlWtC9mT.js");return{FolderHandle:y,FileHandle:s}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemDirectoryHandle:a}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>H);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),o=Array.from(i.files),n=o[0].webkitRelativePath.split("/",1)[0],l=new e(n,!1);return o.forEach(y=>{const s=y.webkitRelativePath.split("/");s.shift();const c=s.pop(),f=s.reduce((w,b)=>(w._entries[b]||(w._entries[b]=new e(b,!1)),w._entries[b]),l);f._entries[c]=new t(y.name,y,!1)}),new a(l)}async function C(i){const{FileHandle:e}=await d(async()=>{const{FileHandle:a}=await import("./memory.BlWtC9mT.js");return{FileHandle:a}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemFileHandle:t}=await d(async()=>{const{FileSystemFileHandle:a}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:a}},void 0,import.meta.url);return Array.from(i.files).map(a=>new t(new e(a.name,a,!1)))}const R=Object.freeze(Object.defineProperty({__proto__:null,config:z,errors:A,fromDataTransfer:U,getDirHandlesFromInput:k,getFileHandlesFromInput:C},Symbol.toStringTag,{value:"Module"})),{GONE:B,MOD_ERR:G}=A,u=Symbol("adapter");let h=class v extends T{[u];constructor(e){super(e),this[u]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const a=await this[u].getDirectoryHandle(e,t);return new v(a)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:t}},void 0,import.meta.url);for await(const[t,a]of this[u].entries())yield[a.name,a.kind==="file"?new e(a):new v(a)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:t}},void 0,import.meta.url);console.warn("deprecated, use .entries() instead");for await(let t of this[u].entries())yield t.kind==="file"?new e(t):new v(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:a}=await d(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>g);return{FileSystemFileHandle:n}},void 0,import.meta.url);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const o=await this[u].getFileHandle(e,t);return new a(o)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[u].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:a,path:o}=t.pop();for await(const n of a.values()){if(await n.isSameEntry(e))return[...o,n.name];n.kind==="directory"&&t.push({handle:n,path:[...o,n.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[Symbol.asyncIterator](){return this.entries()}};Object.defineProperty(h.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(h.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});if(globalThis.FileSystemDirectoryHandle){const i=globalThis.FileSystemDirectoryHandle.prototype;i.resolve=async function(n){if(await n.isSameEntry(this))return[];const l=[{handle:this,path:[]}];for(;l.length;){let{handle:y,path:s}=l.pop();for await(const c of y.values()){if(await c.isSameEntry(n))return[...s,c.name];c.kind==="directory"&&l.push({handle:c,path:[...s,c.name]})}}return null};async function e(o){if(await(await navigator.storage.getDirectory()).resolve(o)===null)throw new DOMException(...B)}const t=i.entries;i.entries=async function*(){await e(this),yield*t.call(this)},i[Symbol.asyncIterator]=async function*(){yield*this.entries()};const a=i.removeEntry;i.removeEntry=async function(o,n={}){return a.call(this,o,n).catch(async l=>{throw l instanceof DOMException&&l.name==="UnknownError"&&!n.recursive&&!(await t.call(this).next()).done?new DOMException(...G):l})}}const H=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:h,default:h},Symbol.toStringTag,{value:"Module"})),{INVALID:Y,SYNTAX:O,GONE:X}=A,E=Symbol("adapter");class F extends T{[E];constructor(e){super(e),this[E]=e}async createWritable(e={}){return new p(await this[E].createWritable(e))}async getFile(){return this[E].getFile()}}Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(F.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});if(globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const i=new WeakMap;let e;const t=()=>{let o,n;onmessage=async l=>{const y=l.ports[0],s=l.data;switch(s.type){case"open":const c=s.name;let f=await navigator.storage.getDirectory();for(const w of s.path)f=await f.getDirectoryHandle(w);o=await f.getFileHandle(c),n=await o.createSyncAccessHandle();break;case"write":n.write(s.data,{at:s.position}),n.flush();break;case"truncate":n.truncate(s.size);break;case"abort":case"close":n.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(o){if(!e){const r=`(${t.toString()})()`,S=new Blob([r],{type:"text/javascript"});e=URL.createObjectURL(S)}const n=new Worker(e,{type:"module"});let l=0;const y=new TextEncoder;let s=await this.getFile().then(r=>r.size);const c=r=>new Promise((S,P)=>{const _=new MessageChannel;_.port1.onmessage=D=>{D.data instanceof Error?P(D.data):S(D.data),_.port1.close(),_.port2.close(),_.port1.onmessage=null},n.postMessage(r,[_.port2])}),f=await navigator.storage.getDirectory(),w=await i.get(this),b=await f.resolve(w);if(b===null)throw new DOMException(...X);return await c({type:"open",path:b,name:this.name}),o?.keepExistingData===!1&&(await c({type:"truncate",size:0}),s=0),new p({start:r=>{},async write(r){if(r?.constructor===Object?r={...r}:r={type:"write",data:r,position:l},r.type==="write"){if(!("data"in r))throw await c({type:"close"}),new DOMException(...O("write requires a data argument"));if(r.position??=l,typeof r.data=="string")r.data=y.encode(r.data);else if(r.data instanceof ArrayBuffer)r.data=new Uint8Array(r.data);else if(!(r.data instanceof Uint8Array)&&ArrayBuffer.isView(r.data))r.data=new Uint8Array(r.data.buffer,r.data.byteOffset,r.data.byteLength);else if(!(r.data instanceof Uint8Array)){const P=await new Response(r.data).arrayBuffer();r.data=new Uint8Array(P)}Number.isInteger(r.position)&&r.position>=0&&(l=r.position),l+=r.data.byteLength,s+=r.data.byteLength}else if(r.type==="seek")if(Number.isInteger(r.position)&&r.position>=0){if(s<r.position)throw new DOMException(...Y);console.log("seeking",r),l=r.position;return}else throw await c({type:"close"}),new DOMException(...O("seek requires a position argument"));else if(r.type==="truncate")if(Number.isInteger(r.size)&&r.size>=0)s=r.size,l>s&&(l=s);else throw await c({type:"close"}),new DOMException(...O("truncate requires a size argument"));await c(r)},async close(){await c({type:"close"}),n.terminate()},async abort(r){await c({type:"abort",reason:r}),n.terminate()}})};const a=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...o){const n=await a.call(this,...o);return i.set(n,this),n}}const g=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:F,default:F},Symbol.toStringTag,{value:"Module"})),Q=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:h,FileSystemFileHandle:F,FileSystemHandle:T,FileSystemWritableFileStream:p,getOriginPrivateDirectory:W,showDirectoryPicker:j,showOpenFilePicker:N,showSaveFilePicker:V},Symbol.toStringTag,{value:"Module"}));export{Q as a,q as c,A as e};
@@ -1 +1 @@
1
- import{g as ot}from"./index.EAQB8Tuq.js";function rt(k,u){for(var p=0;p<u.length;p++){const I=u[p];if(typeof I!="string"&&!Array.isArray(I)){for(const E in I)if(E!=="default"&&!(E in k)){const O=Object.getOwnPropertyDescriptor(I,E);O&&Object.defineProperty(k,E,O.get?O:{enumerable:!0,get:()=>I[E]})}}}return Object.freeze(Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}))}var oe={exports:{}},xe;function at(){return xe||(xe=1,function(k){(function(u){if(typeof window>"u")return;var p=!0,I=10,E="",O=0,D="",_=null,re="",W=!1,Ne={resize:1,click:1},V=128,ae=!0,P=1,U="bodyOffset",h=U,se=!0,ce="",R={},S=32,ue=null,J=!1,X=!1,H="[iFrameSizer]",le=H.length,B="",fe={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",de=window.parent,x="*",K=0,j=!1,me=null,A=16,N=1,ge="scroll",v=ge,De=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},he=!1;function pe(){}try{var ve=Object.create({},{passive:{get:function(){he=!0}}});window.addEventListener("test",pe,ve),window.removeEventListener("test",pe,ve)}catch{}function z(e,t,n,i){e.addEventListener(t,n,he?i||{}:!1)}function We(e,t,n){e.removeEventListener(t,n,!1)}function ye(e){return e.charAt(0).toUpperCase()+e.slice(1)}function He(e){var t,n,i,a=null,f=0,m=function(){f=Date.now(),a=null,i=e.apply(t,n),a||(t=n=null)};return function(){var d=Date.now();f||(f=d);var s=A-(d-f);return t=this,n=arguments,s<=0||s>A?(a&&(clearTimeout(a),a=null),f=d,i=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,s)),i}}function we(e){return H+"["+B+"] "+e}function o(e){J&&typeof window.console=="object"&&console.log(we(e))}function T(e){typeof window.console=="object"&&console.warn(we(e))}function Be(){je(),o("Initialising iFrame ("+window.location.href+")"),_e(),Ue(),te("background",E),te("padding",re),Ke(),Me(),Ee(),Je(),Ze(),Ge(),Ie(),R=Qe(),L("init","Init message from host page"),G()}function je(){function e(n){return n==="true"}var t=ce.slice(le).split(":");B=t[0],O=u===t[1]?O:Number(t[1]),W=u===t[2]?W:e(t[2]),J=u===t[3]?J:e(t[3]),S=u===t[4]?S:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],E=t[9],re=t[10],K=u===t[11]?K:Number(t[11]),R.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function qe(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function _e(){function e(){var n=window.iFrameResizer;o("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(qe,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,x="targetOrigin"in n?n.targetOrigin:x,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,i){return typeof n=="function"&&(o("Setup custom "+i+"CalcMethod"),$[i]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),o("TargetOrigin for parent set to: "+x)}function Ve(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,o("Body "+e+' set to "'+t+'"'))}function Ue(){u===D&&(D=O+"px"),te("margin",Ve("margin",D))}function Je(){document.documentElement.style.height="",document.body.style.height="",o('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function i(){L(e.eventName,e.eventType)}ee[n]=i,z(window,n,i,{passive:!0})},remove:function(n){var i=ee[n];delete ee[n],We(window,n,i)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),o(ye(e.method)+" event listener: "+e.eventType)}function be(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function Te(e,t,n,i){return t!==e&&(e in n||(T(e+" is not a valid option for "+i+"CalculationMethod."),e=t),o(i+' calculation method set to "'+e+'"')),e}function Me(){h=Te(h,U,M,"height")}function Ee(){v=Te(v,ge,F,"width")}function Ie(){p===!0?(be("add"),et()):o("Auto Resize disabled")}function Xe(){_!==null&&_.disconnect()}function Ye(){be("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(s){var l=s.getBoundingClientRect(),c=e();return{x:parseInt(l.left,10)+parseInt(c.x,10),y:parseInt(l.top,10)+parseInt(c.y,10)}}function n(s){function l(b){var C=t(b);o("Moving to in page link (#"+c+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var c=s.split("#")[1]||s,r=decodeURIComponent(c),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(o("In page link (#"+c+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+c)):l(w)}function i(){var s=window.location.hash,l=window.location.href;s!==""&&s!=="#"&&n(l)}function a(){function s(l){function c(r){r.preventDefault(),n(this.getAttribute("href"))}l.getAttribute("href")!=="#"&&z(l,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),s)}function f(){z(window,"hashchange",i)}function m(){setTimeout(i,V)}function d(){Array.prototype.forEach&&document.querySelectorAll?(o("Setting up location.hash handlers"),a(),f(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return R.enable?d():o("In page linking not enabled"),{findTarget:n}}function Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,i){o("Add event listener: "+i),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){o("Enable public methods"),De.parentIFrame={autoResize:function(t){return t===!0&&p===!1?(p=!0,Ie()):t===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return B},getPageInfo:function(t){typeof t=="function"?(Z=t,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(t){R.findTarget(t)},reset:function(){ke("parentIFrame.reset")},scrollTo:function(t,n){y(n,t,"scrollTo")},scrollToOffset:function(t,n){y(n,t,"scrollToOffset")},sendMessage:function(t,n){y(0,0,"message",JSON.stringify(t),n)},setHeightCalculationMethod:function(t){h=t,Me()},setWidthCalculationMethod:function(t){v=t,Ee()},setTargetOrigin:function(t){o("Set targetOrigin: "+t),x=t},size:function(t,n){var i=""+(t||"")+(n?","+n:"");L("size","parentIFrame.size("+i+")",t,n)}}}function Oe(){S!==0&&(o("setInterval: "+S+"ms"),ue=setInterval(function(){L("interval","setInterval: "+S)},Math.abs(S)))}function $e(){function e(r){function w(b){b.complete===!1&&(o("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",f,!1),s.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){s.splice(s.indexOf(r),1)}function n(r){o("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",f,!1),t(r)}function i(r,w,b){n(r.target),L(w,b+": "+r.target.src)}function a(r){i(r,"imageLoad","Image loaded")}function f(r){i(r,"imageLoadFailed","Image load failed")}function m(r){L("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function d(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return c=new l(m),o("Create body MutationObserver"),c.observe(r,w),c}var s=[],l=window.MutationObserver||window.WebKitMutationObserver,c=d();return{disconnect:function(){"disconnect"in c&&(o("Disconnect body MutationObserver"),c.disconnect(),s.forEach(n))}}}function et(){var e=0>S;window.MutationObserver||window.WebKitMutationObserver?e?Oe():_=$e():(o("MutationObserver not supported in this browser!"),Oe())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,I)}function tt(e){e>A/2&&(A=2*e,o("Event throttle increased to "+A+"ms"))}function ie(e,t){for(var n=t.length,i=0,a=0,f=ye(e),m=Date.now(),d=0;d<n;d++)i=t[d].getBoundingClientRect()[e]+ne("margin"+f,t[d]),i>a&&(a=i);return m=Date.now()-m,o("Parsed "+n+" HTML elements"),o("Element position calculated in "+m+"ms"),tt(m),a}function q(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Se(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var i=document.querySelectorAll("["+t+"]");return i.length===0&&n(),ie(e,i)}function Fe(){return document.querySelectorAll("body *")}var M={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return M.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,q(M))},min:function(){return Math.min.apply(null,q(M))},grow:function(){return M.max()},lowestElement:function(){return Math.max(M.bodyOffset()||M.documentElementOffset(),ie("bottom",Fe()))},taggedElement:function(){return Se("bottom","data-iframe-height")}},F={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(F.bodyScroll(),F.documentElementScroll())},max:function(){return Math.max.apply(null,q(F))},min:function(){return Math.min.apply(null,q(F))},rightMostElement:function(){return ie("right",Fe())},taggedElement:function(){return Se("right","data-iframe-width")}};function Le(e,t,n,i){function a(){P=c,N=r,y(P,N,e)}function f(){function w(b,C){var it=Math.abs(b-C)<=K;return!it}return c=u===n?M[h]():n,r=u===i?F[v]():i,w(P,c)||W&&w(N,r)}function m(){return!(e in{init:1,interval:1,size:1})}function d(){return h in fe||W&&v in fe}function s(){o("No change in size detected")}function l(){m()&&d()?ke(t):e in{interval:1}||s()}var c,r;f()||e==="init"?(ze(),a()):l()}var nt=He(Le);function L(e,t,n,i){function a(){e in{reset:1,resetPage:1,init:1}||o("Trigger event: "+t)}function f(){return j&&e in Ne}f()?o("Trigger event cancelled: "+e):(a(),e==="init"?Le(e,t,n,i):nt(e,t,n,i))}function ze(){j||(j=!0,o("Trigger event lock on")),clearTimeout(me),me=setTimeout(function(){j=!1,o("Trigger event lock off"),o("--")},V)}function Ce(e){P=M[h](),N=F[v](),y(P,N,e)}function ke(e){var t=h;h=U,o("Reset trigger event: "+e),ze(),Ce("reset"),h=t}function y(e,t,n,i,a){function f(){u===a?a=x:o("Message targetOrigin: "+a)}function m(){var d=e+":"+t,s=B+":"+d+":"+n+(u===i?"":":"+i);o("Sending message to host page ("+s+")"),de.postMessage(H+s,a)}f(),m()}function Pe(e){var t={init:function(){ce=e.data,de=e.source,Be(),ae=!1,setTimeout(function(){se=!1},V)},reset:function(){se?o("Page reset ignored by init"):(o("Page size reset by host page"),Ce("resetPage"))},resize:function(){L("resizeParent","Parent window requested size check")},moveToAnchor:function(){R.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var c=a();o("PageInfoFromParent called from parent: "+c),Z(JSON.parse(c)),o(" --")},message:function(){var c=a();o("onMessage called from parent: "+c),Q(JSON.parse(c)),o(" --")}};function n(){return H===(""+e.data).slice(0,le)}function i(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function f(){return!k.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function d(){var l=i();l in t?t[l]():!f()&&!m()&&T("Unexpected message ("+e.data+")")}function s(){ae===!1?d():m()?t.init():o('Ignored message of type "'+i()+'". Received before initialization.')}n()&&s()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){Pe({data:e})},z(window,"message",Pe),z(window,"readystatechange",Re),Re())})()}(oe)),oe.exports}var Ae=at();const st=ot(Ae),ut=rt({__proto__:null,default:st},[Ae]);export{ut as i};
1
+ import{g as ot}from"./index.SCzIN5SB.js";function rt(k,u){for(var p=0;p<u.length;p++){const I=u[p];if(typeof I!="string"&&!Array.isArray(I)){for(const E in I)if(E!=="default"&&!(E in k)){const O=Object.getOwnPropertyDescriptor(I,E);O&&Object.defineProperty(k,E,O.get?O:{enumerable:!0,get:()=>I[E]})}}}return Object.freeze(Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}))}var oe={exports:{}},xe;function at(){return xe||(xe=1,function(k){(function(u){if(typeof window>"u")return;var p=!0,I=10,E="",O=0,D="",_=null,re="",W=!1,Ne={resize:1,click:1},V=128,ae=!0,P=1,U="bodyOffset",h=U,se=!0,ce="",R={},S=32,ue=null,J=!1,X=!1,H="[iFrameSizer]",le=H.length,B="",fe={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",de=window.parent,x="*",K=0,j=!1,me=null,A=16,N=1,ge="scroll",v=ge,De=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},he=!1;function pe(){}try{var ve=Object.create({},{passive:{get:function(){he=!0}}});window.addEventListener("test",pe,ve),window.removeEventListener("test",pe,ve)}catch{}function z(e,t,n,i){e.addEventListener(t,n,he?i||{}:!1)}function We(e,t,n){e.removeEventListener(t,n,!1)}function ye(e){return e.charAt(0).toUpperCase()+e.slice(1)}function He(e){var t,n,i,a=null,f=0,m=function(){f=Date.now(),a=null,i=e.apply(t,n),a||(t=n=null)};return function(){var d=Date.now();f||(f=d);var s=A-(d-f);return t=this,n=arguments,s<=0||s>A?(a&&(clearTimeout(a),a=null),f=d,i=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,s)),i}}function we(e){return H+"["+B+"] "+e}function o(e){J&&typeof window.console=="object"&&console.log(we(e))}function T(e){typeof window.console=="object"&&console.warn(we(e))}function Be(){je(),o("Initialising iFrame ("+window.location.href+")"),_e(),Ue(),te("background",E),te("padding",re),Ke(),Me(),Ee(),Je(),Ze(),Ge(),Ie(),R=Qe(),L("init","Init message from host page"),G()}function je(){function e(n){return n==="true"}var t=ce.slice(le).split(":");B=t[0],O=u===t[1]?O:Number(t[1]),W=u===t[2]?W:e(t[2]),J=u===t[3]?J:e(t[3]),S=u===t[4]?S:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],E=t[9],re=t[10],K=u===t[11]?K:Number(t[11]),R.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function qe(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function _e(){function e(){var n=window.iFrameResizer;o("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(qe,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,x="targetOrigin"in n?n.targetOrigin:x,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,i){return typeof n=="function"&&(o("Setup custom "+i+"CalcMethod"),$[i]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),o("TargetOrigin for parent set to: "+x)}function Ve(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,o("Body "+e+' set to "'+t+'"'))}function Ue(){u===D&&(D=O+"px"),te("margin",Ve("margin",D))}function Je(){document.documentElement.style.height="",document.body.style.height="",o('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function i(){L(e.eventName,e.eventType)}ee[n]=i,z(window,n,i,{passive:!0})},remove:function(n){var i=ee[n];delete ee[n],We(window,n,i)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),o(ye(e.method)+" event listener: "+e.eventType)}function be(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function Te(e,t,n,i){return t!==e&&(e in n||(T(e+" is not a valid option for "+i+"CalculationMethod."),e=t),o(i+' calculation method set to "'+e+'"')),e}function Me(){h=Te(h,U,M,"height")}function Ee(){v=Te(v,ge,F,"width")}function Ie(){p===!0?(be("add"),et()):o("Auto Resize disabled")}function Xe(){_!==null&&_.disconnect()}function Ye(){be("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(s){var l=s.getBoundingClientRect(),c=e();return{x:parseInt(l.left,10)+parseInt(c.x,10),y:parseInt(l.top,10)+parseInt(c.y,10)}}function n(s){function l(b){var C=t(b);o("Moving to in page link (#"+c+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var c=s.split("#")[1]||s,r=decodeURIComponent(c),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(o("In page link (#"+c+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+c)):l(w)}function i(){var s=window.location.hash,l=window.location.href;s!==""&&s!=="#"&&n(l)}function a(){function s(l){function c(r){r.preventDefault(),n(this.getAttribute("href"))}l.getAttribute("href")!=="#"&&z(l,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),s)}function f(){z(window,"hashchange",i)}function m(){setTimeout(i,V)}function d(){Array.prototype.forEach&&document.querySelectorAll?(o("Setting up location.hash handlers"),a(),f(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return R.enable?d():o("In page linking not enabled"),{findTarget:n}}function Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,i){o("Add event listener: "+i),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){o("Enable public methods"),De.parentIFrame={autoResize:function(t){return t===!0&&p===!1?(p=!0,Ie()):t===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return B},getPageInfo:function(t){typeof t=="function"?(Z=t,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(t){R.findTarget(t)},reset:function(){ke("parentIFrame.reset")},scrollTo:function(t,n){y(n,t,"scrollTo")},scrollToOffset:function(t,n){y(n,t,"scrollToOffset")},sendMessage:function(t,n){y(0,0,"message",JSON.stringify(t),n)},setHeightCalculationMethod:function(t){h=t,Me()},setWidthCalculationMethod:function(t){v=t,Ee()},setTargetOrigin:function(t){o("Set targetOrigin: "+t),x=t},size:function(t,n){var i=""+(t||"")+(n?","+n:"");L("size","parentIFrame.size("+i+")",t,n)}}}function Oe(){S!==0&&(o("setInterval: "+S+"ms"),ue=setInterval(function(){L("interval","setInterval: "+S)},Math.abs(S)))}function $e(){function e(r){function w(b){b.complete===!1&&(o("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",f,!1),s.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){s.splice(s.indexOf(r),1)}function n(r){o("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",f,!1),t(r)}function i(r,w,b){n(r.target),L(w,b+": "+r.target.src)}function a(r){i(r,"imageLoad","Image loaded")}function f(r){i(r,"imageLoadFailed","Image load failed")}function m(r){L("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function d(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return c=new l(m),o("Create body MutationObserver"),c.observe(r,w),c}var s=[],l=window.MutationObserver||window.WebKitMutationObserver,c=d();return{disconnect:function(){"disconnect"in c&&(o("Disconnect body MutationObserver"),c.disconnect(),s.forEach(n))}}}function et(){var e=0>S;window.MutationObserver||window.WebKitMutationObserver?e?Oe():_=$e():(o("MutationObserver not supported in this browser!"),Oe())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,I)}function tt(e){e>A/2&&(A=2*e,o("Event throttle increased to "+A+"ms"))}function ie(e,t){for(var n=t.length,i=0,a=0,f=ye(e),m=Date.now(),d=0;d<n;d++)i=t[d].getBoundingClientRect()[e]+ne("margin"+f,t[d]),i>a&&(a=i);return m=Date.now()-m,o("Parsed "+n+" HTML elements"),o("Element position calculated in "+m+"ms"),tt(m),a}function q(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Se(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var i=document.querySelectorAll("["+t+"]");return i.length===0&&n(),ie(e,i)}function Fe(){return document.querySelectorAll("body *")}var M={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return M.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,q(M))},min:function(){return Math.min.apply(null,q(M))},grow:function(){return M.max()},lowestElement:function(){return Math.max(M.bodyOffset()||M.documentElementOffset(),ie("bottom",Fe()))},taggedElement:function(){return Se("bottom","data-iframe-height")}},F={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(F.bodyScroll(),F.documentElementScroll())},max:function(){return Math.max.apply(null,q(F))},min:function(){return Math.min.apply(null,q(F))},rightMostElement:function(){return ie("right",Fe())},taggedElement:function(){return Se("right","data-iframe-width")}};function Le(e,t,n,i){function a(){P=c,N=r,y(P,N,e)}function f(){function w(b,C){var it=Math.abs(b-C)<=K;return!it}return c=u===n?M[h]():n,r=u===i?F[v]():i,w(P,c)||W&&w(N,r)}function m(){return!(e in{init:1,interval:1,size:1})}function d(){return h in fe||W&&v in fe}function s(){o("No change in size detected")}function l(){m()&&d()?ke(t):e in{interval:1}||s()}var c,r;f()||e==="init"?(ze(),a()):l()}var nt=He(Le);function L(e,t,n,i){function a(){e in{reset:1,resetPage:1,init:1}||o("Trigger event: "+t)}function f(){return j&&e in Ne}f()?o("Trigger event cancelled: "+e):(a(),e==="init"?Le(e,t,n,i):nt(e,t,n,i))}function ze(){j||(j=!0,o("Trigger event lock on")),clearTimeout(me),me=setTimeout(function(){j=!1,o("Trigger event lock off"),o("--")},V)}function Ce(e){P=M[h](),N=F[v](),y(P,N,e)}function ke(e){var t=h;h=U,o("Reset trigger event: "+e),ze(),Ce("reset"),h=t}function y(e,t,n,i,a){function f(){u===a?a=x:o("Message targetOrigin: "+a)}function m(){var d=e+":"+t,s=B+":"+d+":"+n+(u===i?"":":"+i);o("Sending message to host page ("+s+")"),de.postMessage(H+s,a)}f(),m()}function Pe(e){var t={init:function(){ce=e.data,de=e.source,Be(),ae=!1,setTimeout(function(){se=!1},V)},reset:function(){se?o("Page reset ignored by init"):(o("Page size reset by host page"),Ce("resetPage"))},resize:function(){L("resizeParent","Parent window requested size check")},moveToAnchor:function(){R.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var c=a();o("PageInfoFromParent called from parent: "+c),Z(JSON.parse(c)),o(" --")},message:function(){var c=a();o("onMessage called from parent: "+c),Q(JSON.parse(c)),o(" --")}};function n(){return H===(""+e.data).slice(0,le)}function i(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function f(){return!k.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function d(){var l=i();l in t?t[l]():!f()&&!m()&&T("Unexpected message ("+e.data+")")}function s(){ae===!1?d():m()?t.init():o('Ignored message of type "'+i()+'". Received before initialization.')}n()&&s()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){Pe({data:e})},z(window,"message",Pe),z(window,"readystatechange",Re),Re())})()}(oe)),oe.exports}var Ae=at();const st=ot(Ae),ut=rt({__proto__:null,default:st},[Ae]);export{ut as i};
@@ -1 +1 @@
1
- import{s as H,r as a,aP as U,z as k,cu as S,C as B,j as n,br as j,bH as O,bs as _,b9 as K,bt as $,D as q,cv as w}from"./index.EAQB8Tuq.js";import{u as A}from"./uniqueId.CDZNs_pn.js";import{u as G,a as N,b as J}from"./useOnInputChange.HiDk3WIa.js";import{a as M}from"./useBasicWidgetState.YAhDGDM8.js";import{I as Q}from"./InputInstructions.CAp9mFM6.js";import{I as X}from"./input.DjnwsrgF.js";import"./inputUtils.CptNuJwn.js";import"./FormClearHelper.C4W8xjEX.js";import"./base-input.C-H36mFE.js";const Y=H("div",{target:"e1o1zy6o0"})("position:relative;");function Z({disabled:o,element:t,widgetMgr:s,fragmentId:u}){const[r,c]=a.useState(()=>W(s,t)??null),[T,y]=U(),[i,p]=a.useState(!1),x=a.useCallback(()=>{c(t.default??null),p(!0)},[t.default]),[V,m]=M({getStateFromWidgetMgr:W,getDefaultStateFromProto:tt,getCurrStateFromProto:et,updateWidgetMgrState:ot,element:t,widgetMgr:s,fragmentId:u,onFormCleared:x});G(V,r,c,i);const[C,g]=a.useState(!1),e=k(),[f]=a.useState(()=>A("text_input_")),{placeholder:F,formId:l,icon:d,maxChars:b}=t,h=a.useCallback(()=>{p(!1),m({value:r,fromUi:!0})},[r,m]),v=S({formId:l})?s.allowFormEnterToSubmit(l):i,z=C&&T>e.breakpoints.hideWidgetDetails,E=a.useCallback(()=>{i&&h(),g(!1)},[i,h]),P=a.useCallback(()=>{g(!0)},[]),R=N({formId:l,maxChars:b,setDirty:p,setUiValue:c,setValueWithSource:m}),L=J(l,h,i,s,u),I=d?.startsWith(":material"),D=I?"lg":"base";return B(Y,{className:"stTextInput","data-testid":"stTextInput",ref:y,children:[n($,{label:t.label,disabled:o,labelVisibility:j(t.labelVisibility?.value),htmlFor:f,children:t.help&&n(O,{children:n(_,{content:t.help,placement:K.TOP_RIGHT})})}),n(X,{value:r??"",placeholder:F,onBlur:E,onFocus:P,onChange:R,onKeyPress:L,"aria-label":t.label,disabled:o,id:f,type:at(t),autoComplete:t.autocomplete,startEnhancer:d&&n(q,{"data-testid":"stTextInputIcon",iconValue:d,size:D}),overrides:{Input:{style:{fontWeight:e.fontWeights.normal,minWidth:0,lineHeight:e.lineHeights.inputWidget,paddingRight:e.spacing.sm,paddingLeft:e.spacing.md,paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,"::placeholder":{color:e.colors.fadedText60}}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,paddingLeft:d?e.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:e.iconSizes.lg,color:I?e.colors.fadedText60:"inherit"}}}}),z&&n(Q,{dirty:i,value:r??"",maxLength:b,inForm:S({formId:l}),allowEnterToSubmit:v})]})}function W(o,t){return o.getStringValue(t)??null}function tt(o){return o.default??null}function et(o){return o.value??null}function ot(o,t,s,u){t.setStringValue(o,s.value,{fromUi:s.fromUi},u)}function at(o){return o.type===w.Type.PASSWORD?"password":"text"}const mt=a.memo(Z);export{mt as default};
1
+ import{s as H,r as a,aP as U,z as k,cu as S,C as B,j as n,br as j,bH as O,bs as _,b9 as K,bt as $,D as q,cv as w}from"./index.SCzIN5SB.js";import{u as A}from"./uniqueId.8z-ePOzb.js";import{u as G,a as N,b as J}from"./useOnInputChange.SNHZF6F7.js";import{a as M}from"./useBasicWidgetState.Bg3DrOCg.js";import{I as Q}from"./InputInstructions.DfmDQyfZ.js";import{I as X}from"./input.C4PKmVyq.js";import"./inputUtils.CptNuJwn.js";import"./FormClearHelper.BapTKtHM.js";import"./base-input.DJLL2PiI.js";const Y=H("div",{target:"e1o1zy6o0"})("position:relative;");function Z({disabled:o,element:t,widgetMgr:s,fragmentId:u}){const[r,c]=a.useState(()=>W(s,t)??null),[T,y]=U(),[i,p]=a.useState(!1),x=a.useCallback(()=>{c(t.default??null),p(!0)},[t.default]),[V,m]=M({getStateFromWidgetMgr:W,getDefaultStateFromProto:tt,getCurrStateFromProto:et,updateWidgetMgrState:ot,element:t,widgetMgr:s,fragmentId:u,onFormCleared:x});G(V,r,c,i);const[C,g]=a.useState(!1),e=k(),[f]=a.useState(()=>A("text_input_")),{placeholder:F,formId:l,icon:d,maxChars:b}=t,h=a.useCallback(()=>{p(!1),m({value:r,fromUi:!0})},[r,m]),v=S({formId:l})?s.allowFormEnterToSubmit(l):i,z=C&&T>e.breakpoints.hideWidgetDetails,E=a.useCallback(()=>{i&&h(),g(!1)},[i,h]),P=a.useCallback(()=>{g(!0)},[]),R=N({formId:l,maxChars:b,setDirty:p,setUiValue:c,setValueWithSource:m}),L=J(l,h,i,s,u),I=d?.startsWith(":material"),D=I?"lg":"base";return B(Y,{className:"stTextInput","data-testid":"stTextInput",ref:y,children:[n($,{label:t.label,disabled:o,labelVisibility:j(t.labelVisibility?.value),htmlFor:f,children:t.help&&n(O,{children:n(_,{content:t.help,placement:K.TOP_RIGHT})})}),n(X,{value:r??"",placeholder:F,onBlur:E,onFocus:P,onChange:R,onKeyPress:L,"aria-label":t.label,disabled:o,id:f,type:at(t),autoComplete:t.autocomplete,startEnhancer:d&&n(q,{"data-testid":"stTextInputIcon",iconValue:d,size:D}),overrides:{Input:{style:{fontWeight:e.fontWeights.normal,minWidth:0,lineHeight:e.lineHeights.inputWidget,paddingRight:e.spacing.sm,paddingLeft:e.spacing.md,paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,"::placeholder":{color:e.colors.fadedText60}}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,paddingLeft:d?e.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:e.iconSizes.lg,color:I?e.colors.fadedText60:"inherit"}}}}),z&&n(Q,{dirty:i,value:r??"",maxLength:b,inForm:S({formId:l}),allowEnterToSubmit:v})]})}function W(o,t){return o.getStringValue(t)??null}function tt(o){return o.default??null}function et(o){return o.value??null}function ot(o,t,s,u){t.setStringValue(o,s.value,{fromUi:s.fromUi},u)}function at(o){return o.type===w.Type.PASSWORD?"password":"text"}const mt=a.memo(Z);export{mt as default};
@@ -1 +1 @@
1
- import{s as w,br as T,ct as O,r as s,aP as _,z as q,cu as H,C as G,j as u,bH as K,bs as $,b9 as N,bt as J}from"./index.EAQB8Tuq.js";import{u as M}from"./uniqueId.CDZNs_pn.js";import{u as Q,a as X,b as Y}from"./useOnInputChange.HiDk3WIa.js";import{I as Z}from"./InputInstructions.CAp9mFM6.js";import{a as tt}from"./useBasicWidgetState.YAhDGDM8.js";import{u as et,T as it}from"./useTextInputAutoExpand.CwuIWHHK.js";import"./inputUtils.CptNuJwn.js";import"./FormClearHelper.C4W8xjEX.js";import"./base-input.C-H36mFE.js";const at=w("div",{target:"e1r0q00f0"})({height:"100%",display:"flex",flexDirection:"column"}),st=(e,t)=>{let a="auto";if(e.heightConfig?.useStretch)a="100%";else if(e.heightConfig?.pixelHeight&&e.heightConfig.pixelHeight>0){const o=T(t.labelVisibility?.value)===O.Collapsed?2:30;a=`${e.heightConfig.pixelHeight-o}px`}return a},S=(e,t)=>e.getStringValue(t)??t.default??null,ot=e=>e.default??null,rt=e=>e.value??null,lt=(e,t,a,o)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},o)},nt=({disabled:e,element:t,widgetMgr:a,fragmentId:o,outerElement:d})=>{const m=s.useRef(M("text_area_")).current,[W,y]=_(),[r,c]=s.useState(!1),[I,b]=s.useState(!1),l=d.heightConfig?.useContent??!1,V=d.heightConfig?.useStretch??!1,v=st(d,t),x=s.useRef(null),[n,h]=s.useState(()=>S(a,t)??null),A=s.useCallback(()=>{h(t.default??null),c(!0)},[t]),[F,g]=tt({getStateFromWidgetMgr:S,getDefaultStateFromProto:ot,getCurrStateFromProto:rt,updateWidgetMgrState:lt,element:t,widgetMgr:a,fragmentId:o,onFormCleared:A});Q(F,n,h,r);const i=q(),{height:R,maxHeight:z,updateScrollHeight:C}=et({textareaRef:x,dependencies:[t.placeholder]}),p=s.useCallback(()=>{c(!1),g({value:n,fromUi:!0})},[n,g]),P=s.useCallback(()=>{r&&p(),b(!1)},[r,p]),k=s.useCallback(()=>{b(!0)},[]),E=s.useCallback(()=>{l&&C()},[l,C]),L=X({formId:t.formId,maxChars:t.maxChars,setDirty:c,setUiValue:h,setValueWithSource:g,additionalAction:E}),U=Y(t.formId,p,r,a,o,!0),{placeholder:D,formId:f}=t,B=H({formId:f})?a.allowFormEnterToSubmit(f):r,j=I&&W>i.breakpoints.hideWidgetDetails;return G(at,{className:"stTextArea","data-testid":"stTextArea",ref:y,children:[u(J,{label:t.label,disabled:e,labelVisibility:T(t.labelVisibility?.value),htmlFor:m,children:t.help&&u(K,{children:u($,{content:t.help,placement:N.TOP_RIGHT})})}),u(it,{inputRef:l?x:void 0,value:n??"",placeholder:D,onBlur:P,onFocus:k,onChange:L,onKeyDown:U,"aria-label":t.label,disabled:e,id:m,overrides:{Input:{style:{fontWeight:i.fontWeights.normal,lineHeight:i.lineHeights.inputWidget,height:l?R:v,maxHeight:l?z:"",minHeight:i.sizes.largestElementHeight,resize:V?"none":"vertical",paddingRight:i.spacing.md,paddingLeft:i.spacing.md,paddingBottom:i.spacing.md,paddingTop:i.spacing.md,"::placeholder":{color:i.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:i.sizes.borderWidth,borderRightWidth:i.sizes.borderWidth,borderTopWidth:i.sizes.borderWidth,borderBottomWidth:i.sizes.borderWidth,flexGrow:1}}}}),j&&u(Z,{dirty:r,value:n??"",maxLength:t.maxChars,type:"multiline",inForm:H({formId:f}),allowEnterToSubmit:B})]})},xt=s.memo(nt);export{xt as default};
1
+ import{s as w,br as T,ct as O,r as s,aP as _,z as q,cu as H,C as G,j as u,bH as K,bs as $,b9 as N,bt as J}from"./index.SCzIN5SB.js";import{u as M}from"./uniqueId.8z-ePOzb.js";import{u as Q,a as X,b as Y}from"./useOnInputChange.SNHZF6F7.js";import{I as Z}from"./InputInstructions.DfmDQyfZ.js";import{a as tt}from"./useBasicWidgetState.Bg3DrOCg.js";import{u as et,T as it}from"./useTextInputAutoExpand.Dm8V44AL.js";import"./inputUtils.CptNuJwn.js";import"./FormClearHelper.BapTKtHM.js";import"./base-input.DJLL2PiI.js";const at=w("div",{target:"e1r0q00f0"})({height:"100%",display:"flex",flexDirection:"column"}),st=(e,t)=>{let a="auto";if(e.heightConfig?.useStretch)a="100%";else if(e.heightConfig?.pixelHeight&&e.heightConfig.pixelHeight>0){const o=T(t.labelVisibility?.value)===O.Collapsed?2:30;a=`${e.heightConfig.pixelHeight-o}px`}return a},S=(e,t)=>e.getStringValue(t)??t.default??null,ot=e=>e.default??null,rt=e=>e.value??null,lt=(e,t,a,o)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},o)},nt=({disabled:e,element:t,widgetMgr:a,fragmentId:o,outerElement:d})=>{const m=s.useRef(M("text_area_")).current,[W,y]=_(),[r,c]=s.useState(!1),[I,b]=s.useState(!1),l=d.heightConfig?.useContent??!1,V=d.heightConfig?.useStretch??!1,v=st(d,t),x=s.useRef(null),[n,h]=s.useState(()=>S(a,t)??null),A=s.useCallback(()=>{h(t.default??null),c(!0)},[t]),[F,g]=tt({getStateFromWidgetMgr:S,getDefaultStateFromProto:ot,getCurrStateFromProto:rt,updateWidgetMgrState:lt,element:t,widgetMgr:a,fragmentId:o,onFormCleared:A});Q(F,n,h,r);const i=q(),{height:R,maxHeight:z,updateScrollHeight:C}=et({textareaRef:x,dependencies:[t.placeholder]}),p=s.useCallback(()=>{c(!1),g({value:n,fromUi:!0})},[n,g]),P=s.useCallback(()=>{r&&p(),b(!1)},[r,p]),k=s.useCallback(()=>{b(!0)},[]),E=s.useCallback(()=>{l&&C()},[l,C]),L=X({formId:t.formId,maxChars:t.maxChars,setDirty:c,setUiValue:h,setValueWithSource:g,additionalAction:E}),U=Y(t.formId,p,r,a,o,!0),{placeholder:D,formId:f}=t,B=H({formId:f})?a.allowFormEnterToSubmit(f):r,j=I&&W>i.breakpoints.hideWidgetDetails;return G(at,{className:"stTextArea","data-testid":"stTextArea",ref:y,children:[u(J,{label:t.label,disabled:e,labelVisibility:T(t.labelVisibility?.value),htmlFor:m,children:t.help&&u(K,{children:u($,{content:t.help,placement:N.TOP_RIGHT})})}),u(it,{inputRef:l?x:void 0,value:n??"",placeholder:D,onBlur:P,onFocus:k,onChange:L,onKeyDown:U,"aria-label":t.label,disabled:e,id:m,overrides:{Input:{style:{fontWeight:i.fontWeights.normal,lineHeight:i.lineHeights.inputWidget,height:l?R:v,maxHeight:l?z:"",minHeight:i.sizes.largestElementHeight,resize:V?"none":"vertical",paddingRight:i.spacing.md,paddingLeft:i.spacing.md,paddingBottom:i.spacing.md,paddingTop:i.spacing.md,"::placeholder":{color:i.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:i.sizes.borderWidth,borderRightWidth:i.sizes.borderWidth,borderTopWidth:i.sizes.borderWidth,borderBottomWidth:i.sizes.borderWidth,flexGrow:1}}}}),j&&u(Z,{dirty:r,value:n??"",maxLength:t.maxChars,type:"multiline",inForm:H({formId:f}),allowEnterToSubmit:B})]})},xt=s.memo(nt);export{xt as default};
@@ -1 +1 @@
1
- import{r as p,z as k,B as T,j as n,C,br as y,aG as L,bz as S,bs as W,b9 as B,bL as w,J as R,bM as E,bN as $}from"./index.EAQB8Tuq.js";import{a as P}from"./useBasicWidgetState.YAhDGDM8.js";import{a as v,L as M,S as m}from"./checkbox.B6I7DbdE.js";import"./FormClearHelper.C4W8xjEX.js";function X({element:e,disabled:a,widgetMgr:s,fragmentId:d}){const[f,g]=P({getStateFromWidgetMgr:H,getDefaultStateFromProto:V,getCurrStateFromProto:z,updateWidgetMgrState:G,element:e,widgetMgr:s,fragmentId:d}),x=p.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=k(),{colors:o,spacing:h,sizes:r}=t,b=T(t),u=a?o.fadedText40:o.bodyText;return n($,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:n(v,{checked:f,disabled:a,onChange:x,"aria-label":e.label,checkmarkType:e.type===E.StyleType.TOGGLE?m.toggle:m.default,labelPlacement:M.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 ${R(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:C(w,{visibility:y(e.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[n(L,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&n(S,{color:u,children:n(W,{content:e.help,placement:B.TOP_RIGHT})})]})})})}function H(e,a){return e.getBoolValue(a)}function V(e){return e.default??null}function z(e){return e.value??null}function G(e,a,s,d){a.setBoolValue(e,s.value,{fromUi:s.fromUi},d)}const U=p.memo(X);export{U as default};
1
+ import{r as p,z as k,B as T,j as n,C,br as y,aG as L,bz as S,bs as W,b9 as B,bL as w,J as R,bM as E,bN as $}from"./index.SCzIN5SB.js";import{a as P}from"./useBasicWidgetState.Bg3DrOCg.js";import{a as v,L as M,S as m}from"./checkbox.BEZCVkdu.js";import"./FormClearHelper.BapTKtHM.js";function X({element:e,disabled:a,widgetMgr:s,fragmentId:d}){const[f,g]=P({getStateFromWidgetMgr:H,getDefaultStateFromProto:V,getCurrStateFromProto:z,updateWidgetMgrState:G,element:e,widgetMgr:s,fragmentId:d}),x=p.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=k(),{colors:o,spacing:h,sizes:r}=t,b=T(t),u=a?o.fadedText40:o.bodyText;return n($,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:n(v,{checked:f,disabled:a,onChange:x,"aria-label":e.label,checkmarkType:e.type===E.StyleType.TOGGLE?m.toggle:m.default,labelPlacement:M.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 ${R(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:C(w,{visibility:y(e.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[n(L,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&n(S,{color:u,children:n(W,{content:e.help,placement:B.TOP_RIGHT})})]})})})}function H(e,a){return e.getBoolValue(a)}function V(e){return e.default??null}function z(e){return e.value??null}function G(e,a,s,d){a.setBoolValue(e,s.value,{fromUi:s.fromUi},d)}const U=p.memo(X);export{U as default};
@@ -1,3 +1,3 @@
1
- import{b$ as de,cw as ce,cx as pe,cy as fe,cz as ge,cA as ye,ce as me,bv as ve,bS as be,cB as he,cf as Se,cC as Oe,d as K,cD as Ce,s as Ie,r as V,b8 as Pe,M as J,z as $e,C as _e,j as z,br as Te,bH as Ee,bs as Re,b9 as we,bt as De,b_ as xe}from"./index.EAQB8Tuq.js";import{a as Ae}from"./useBasicWidgetState.YAhDGDM8.js";import{T as We}from"./timepicker.bPCY7gSF.js";import"./FormClearHelper.C4W8xjEX.js";import"./possibleConstructorReturn.Cy1PJuxU.js";import"./createSuper.DEaMobJa.js";var Be=de.Consumer;const Ne=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:Be,ThemeProvider:ce,createThemedStyled:pe,createThemedUseStyletron:fe,createThemedWithStyle:ge,expandBorderStyles:ye,hexToRgb:me,styled:ve,useStyletron:be,withStyle:he,withWrapper:Se},Symbol.toStringTag,{value:"Module"}));var C={};const Y=Oe(Ne);var w={},X;function Me(){if(X)return w;X=1,Object.defineProperty(w,"__esModule",{value:!0}),w.STATE_CHANGE_TYPE=w.SIZE=w.ENHANCER_POSITION=w.CUSTOM_INPUT_TYPE=w.ADJOINED=void 0;var g={change:"change"};w.STATE_CHANGE_TYPE=g;var c={textarea:"textarea"};w.CUSTOM_INPUT_TYPE=c;var h={none:"none",left:"left",right:"right",both:"both"};w.ADJOINED=h;var m={mini:"mini",default:"default",compact:"compact",large:"large"};w.SIZE=m;var b={start:"start",end:"end"};return w.ENHANCER_POSITION=b,w}var q={},A={},H={},Q;function Le(){if(Q)return H;Q=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=c;function g(m){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},g(m)}function c(m){m=m||{};for(var b=arguments.length<=1?0:arguments.length-1,v,y,S=0;S<b;S++){v=(S+1<1||arguments.length<=S+1?void 0:arguments[S+1])||{};for(var f in v)g(v[f])!==void 0&&(y=v[f],h(y)?m[f]=c(m[f]||Array.isArray(y)&&[]||{},y):m[f]=y)}return m}function h(m){return Array.isArray(m)||{}.toString.call(m)=="[object Object]"}return H}var ee;function ae(){if(ee)return A;ee=1,Object.defineProperty(A,"__esModule",{value:!0}),A.getOverride=E,A.getOverrideProps=_,A.getOverrides=L,A.mergeConfigurationOverrides=M,A.mergeOverride=x,A.mergeOverrides=N,A.toObjectOverride=D,A.useOverrides=F;var g=v(K()),c=Ce(),h=m(Le());function m(i){return i&&i.__esModule?i:{default:i}}function b(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,u=new WeakMap;return(b=function(r){return r?u:t})(i)}function v(i,t){if(i&&i.__esModule)return i;if(i===null||P(i)!=="object"&&typeof i!="function")return{default:i};var u=b(t);if(u&&u.has(i))return u.get(i);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=r?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(s,a,l):s[a]=i[a]}return s.default=i,u&&u.set(i,s),s}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(i[s]=u[s])}return i},y.apply(this,arguments)}function S(i,t){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),u.push.apply(u,s)}return u}function f(i){for(var t=1;t<arguments.length;t++){var u=arguments[t]!=null?arguments[t]:{};t%2?S(Object(u),!0).forEach(function(s){$(i,s,u[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):S(Object(u)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(u,s))})}return i}function $(i,t,u){return t in i?Object.defineProperty(i,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[t]=u,i}function P(i){"@babel/helpers - typeof";return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(i)}function E(i){return(0,c.isValidElementType)(i)?i:i&&P(i)==="object"?i.component:i}function _(i){return i&&P(i)==="object"?P(i.props)==="object"?f(f({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function D(i){return(0,c.isValidElementType)(i)?{component:i}:i||{}}function L(i,t){var u=E(i)||t;if(i&&P(i)==="object"&&typeof i.props=="function"){var s=g.forwardRef(function(a,l){var n=i.props(a),e=_(f(f({},i),{},{props:n}));return g.createElement(u,y({ref:l},e))});return s.displayName=u.displayName,[s,{}]}var r=_(i);return[u,r]}function N(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,t),s=Object.keys(u);return s.reduce(function(r,a){return r[a]=x(D(i[a]),D(t[a])),r},{})}function x(i,t){var u=f(f({},i),t);return i.props&&t.props&&(u.props=M(i.props,t.props)),i.style&&t.style&&(u.style=M(i.style,t.style)),u}function M(i,t){return P(i)==="object"&&P(t)==="object"?(0,h.default)({},i,t):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof t=="function"?t.apply(void 0,arguments):t)}}function F(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return g.useMemo(function(){return Object.keys(i).reduce(function(u,s){return u[s]=L(t[s],i[s]),u},{})},[t])}return A}var j={},Z={},te;function Fe(){if(te)return Z;te=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.Svg=void 0,Z.getSvgStyles=c;var g=Y;function c(m){var b=m.$theme,v=m.$size,y=m.$color,S=b.sizing.scale600;v&&(b.sizing[v]?S=b.sizing[v]:typeof v=="number"?S="".concat(v,"px"):S=v);var f="currentColor";return y&&(b.colors[y]?f=b.colors[y]:f=y),{display:"inline-block",fill:f,color:f,height:S,width:S}}var h=(0,g.styled)("svg",c);return Z.Svg=h,h.displayName="Svg",h.displayName="Svg",Z}var k={},re;function ze(){if(re)return k;re=1,Object.defineProperty(k,"__esModule",{value:!0}),k.default=g;function g(c){var h={};for(var m in c)m[0]!=="$"&&(h[m]=c[m]);return h}return k}var ne;function Ze(){if(ne)return j;ne=1;function g(r){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g(r)}Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var c=f(K()),h=ae(),m=Fe(),b=y(ze()),v=["children","title","size","color","overrides"];function y(r){return r&&r.__esModule?r:{default:r}}function S(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(S=function(e){return e?l:a})(r)}function f(r,a){if(r&&r.__esModule)return r;if(r===null||g(r)!=="object"&&typeof r!="function")return{default:r};var l=S(a);if(l&&l.has(r))return l.get(r);var n={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)){var p=e?Object.getOwnPropertyDescriptor(r,o):null;p&&(p.get||p.set)?Object.defineProperty(n,o,p):n[o]=r[o]}return n.default=r,l&&l.set(r,n),n}function $(){return $=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(r[n]=l[n])}return r},$.apply(this,arguments)}function P(r,a){var l=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);a&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),l.push.apply(l,n)}return l}function E(r){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?P(Object(l),!0).forEach(function(n){_(r,n,l[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(l)):P(Object(l)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(l,n))})}return r}function _(r,a,l){return a in r?Object.defineProperty(r,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[a]=l,r}function D(r,a){return F(r)||M(r,a)||N(r,a)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{b$ as de,cw as ce,cx as pe,cy as fe,cz as ge,cA as ye,ce as me,bv as ve,bS as be,cB as he,cf as Se,cC as Oe,d as K,cD as Ce,s as Ie,r as V,b8 as Pe,M as J,z as $e,C as _e,j as z,br as Te,bH as Ee,bs as Re,b9 as we,bt as De,b_ as xe}from"./index.SCzIN5SB.js";import{a as Ae}from"./useBasicWidgetState.Bg3DrOCg.js";import{T as We}from"./timepicker.ASDBDZeB.js";import"./FormClearHelper.BapTKtHM.js";import"./possibleConstructorReturn.CU3h0WWI.js";import"./createSuper.Cd0gz3ZP.js";var Be=de.Consumer;const Ne=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:Be,ThemeProvider:ce,createThemedStyled:pe,createThemedUseStyletron:fe,createThemedWithStyle:ge,expandBorderStyles:ye,hexToRgb:me,styled:ve,useStyletron:be,withStyle:he,withWrapper:Se},Symbol.toStringTag,{value:"Module"}));var C={};const Y=Oe(Ne);var w={},X;function Me(){if(X)return w;X=1,Object.defineProperty(w,"__esModule",{value:!0}),w.STATE_CHANGE_TYPE=w.SIZE=w.ENHANCER_POSITION=w.CUSTOM_INPUT_TYPE=w.ADJOINED=void 0;var g={change:"change"};w.STATE_CHANGE_TYPE=g;var c={textarea:"textarea"};w.CUSTOM_INPUT_TYPE=c;var h={none:"none",left:"left",right:"right",both:"both"};w.ADJOINED=h;var m={mini:"mini",default:"default",compact:"compact",large:"large"};w.SIZE=m;var b={start:"start",end:"end"};return w.ENHANCER_POSITION=b,w}var q={},A={},H={},Q;function Le(){if(Q)return H;Q=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=c;function g(m){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},g(m)}function c(m){m=m||{};for(var b=arguments.length<=1?0:arguments.length-1,v,y,S=0;S<b;S++){v=(S+1<1||arguments.length<=S+1?void 0:arguments[S+1])||{};for(var f in v)g(v[f])!==void 0&&(y=v[f],h(y)?m[f]=c(m[f]||Array.isArray(y)&&[]||{},y):m[f]=y)}return m}function h(m){return Array.isArray(m)||{}.toString.call(m)=="[object Object]"}return H}var ee;function ae(){if(ee)return A;ee=1,Object.defineProperty(A,"__esModule",{value:!0}),A.getOverride=E,A.getOverrideProps=_,A.getOverrides=L,A.mergeConfigurationOverrides=M,A.mergeOverride=x,A.mergeOverrides=N,A.toObjectOverride=D,A.useOverrides=F;var g=v(K()),c=Ce(),h=m(Le());function m(i){return i&&i.__esModule?i:{default:i}}function b(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,u=new WeakMap;return(b=function(r){return r?u:t})(i)}function v(i,t){if(i&&i.__esModule)return i;if(i===null||P(i)!=="object"&&typeof i!="function")return{default:i};var u=b(t);if(u&&u.has(i))return u.get(i);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=r?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(s,a,l):s[a]=i[a]}return s.default=i,u&&u.set(i,s),s}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(i[s]=u[s])}return i},y.apply(this,arguments)}function S(i,t){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),u.push.apply(u,s)}return u}function f(i){for(var t=1;t<arguments.length;t++){var u=arguments[t]!=null?arguments[t]:{};t%2?S(Object(u),!0).forEach(function(s){$(i,s,u[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):S(Object(u)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(u,s))})}return i}function $(i,t,u){return t in i?Object.defineProperty(i,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[t]=u,i}function P(i){"@babel/helpers - typeof";return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(i)}function E(i){return(0,c.isValidElementType)(i)?i:i&&P(i)==="object"?i.component:i}function _(i){return i&&P(i)==="object"?P(i.props)==="object"?f(f({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function D(i){return(0,c.isValidElementType)(i)?{component:i}:i||{}}function L(i,t){var u=E(i)||t;if(i&&P(i)==="object"&&typeof i.props=="function"){var s=g.forwardRef(function(a,l){var n=i.props(a),e=_(f(f({},i),{},{props:n}));return g.createElement(u,y({ref:l},e))});return s.displayName=u.displayName,[s,{}]}var r=_(i);return[u,r]}function N(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,t),s=Object.keys(u);return s.reduce(function(r,a){return r[a]=x(D(i[a]),D(t[a])),r},{})}function x(i,t){var u=f(f({},i),t);return i.props&&t.props&&(u.props=M(i.props,t.props)),i.style&&t.style&&(u.style=M(i.style,t.style)),u}function M(i,t){return P(i)==="object"&&P(t)==="object"?(0,h.default)({},i,t):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof t=="function"?t.apply(void 0,arguments):t)}}function F(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return g.useMemo(function(){return Object.keys(i).reduce(function(u,s){return u[s]=L(t[s],i[s]),u},{})},[t])}return A}var j={},Z={},te;function Fe(){if(te)return Z;te=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.Svg=void 0,Z.getSvgStyles=c;var g=Y;function c(m){var b=m.$theme,v=m.$size,y=m.$color,S=b.sizing.scale600;v&&(b.sizing[v]?S=b.sizing[v]:typeof v=="number"?S="".concat(v,"px"):S=v);var f="currentColor";return y&&(b.colors[y]?f=b.colors[y]:f=y),{display:"inline-block",fill:f,color:f,height:S,width:S}}var h=(0,g.styled)("svg",c);return Z.Svg=h,h.displayName="Svg",h.displayName="Svg",Z}var k={},re;function ze(){if(re)return k;re=1,Object.defineProperty(k,"__esModule",{value:!0}),k.default=g;function g(c){var h={};for(var m in c)m[0]!=="$"&&(h[m]=c[m]);return h}return k}var ne;function Ze(){if(ne)return j;ne=1;function g(r){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g(r)}Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var c=f(K()),h=ae(),m=Fe(),b=y(ze()),v=["children","title","size","color","overrides"];function y(r){return r&&r.__esModule?r:{default:r}}function S(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(S=function(e){return e?l:a})(r)}function f(r,a){if(r&&r.__esModule)return r;if(r===null||g(r)!=="object"&&typeof r!="function")return{default:r};var l=S(a);if(l&&l.has(r))return l.get(r);var n={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in r)if(o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)){var p=e?Object.getOwnPropertyDescriptor(r,o):null;p&&(p.get||p.set)?Object.defineProperty(n,o,p):n[o]=r[o]}return n.default=r,l&&l.set(r,n),n}function $(){return $=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(r[n]=l[n])}return r},$.apply(this,arguments)}function P(r,a){var l=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);a&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),l.push.apply(l,n)}return l}function E(r){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?P(Object(l),!0).forEach(function(n){_(r,n,l[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(l)):P(Object(l)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(l,n))})}return r}function _(r,a,l){return a in r?Object.defineProperty(r,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[a]=l,r}function D(r,a){return F(r)||M(r,a)||N(r,a)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(r,a){if(r){if(typeof r=="string")return x(r,a);var l=Object.prototype.toString.call(r).slice(8,-1);if(l==="Object"&&r.constructor&&(l=r.constructor.name),l==="Map"||l==="Set")return Array.from(r);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return x(r,a)}}function x(r,a){(a==null||a>r.length)&&(a=r.length);for(var l=0,n=new Array(a);l<a;l++)n[l]=r[l];return n}function M(r,a){var l=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(l!=null){var n=[],e=!0,o=!1,p,d;try{for(l=l.call(r);!(e=(p=l.next()).done)&&(n.push(p.value),!(a&&n.length===a));e=!0);}catch(O){o=!0,d=O}finally{try{!e&&l.return!=null&&l.return()}finally{if(o)throw d}}return n}}function F(r){if(Array.isArray(r))return r}function i(r,a){if(r==null)return{};var l=t(r,a),n,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(e=0;e<o.length;e++)n=o[e],!(a.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(l[n]=r[n])}return l}function t(r,a){if(r==null)return{};var l={},n=Object.keys(r),e,o;for(o=0;o<n.length;o++)e=n[o],!(a.indexOf(e)>=0)&&(l[e]=r[e]);return l}var u=function(a,l){var n=a.children,e=a.title,o=a.size,p=a.color,d=a.overrides,O=d===void 0?{}:d,I=i(a,v),R=(0,h.getOverrides)(O.Svg,m.Svg),W=D(R,2),T=W[0],B=W[1],U=T.__STYLETRON__?E(E({title:e,$color:p,$size:o},I),B):E(E({title:e,color:p,size:o},(0,b.default)(I)),(0,b.default)(B));return c.createElement(T,$({"data-baseweb":"icon",ref:l},U),e?c.createElement("title",null,e):null,n)},s=c.forwardRef(u);return j.default=s,j}var oe;function qe(){if(oe)return q;oe=1;function g(t){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},g(t)}Object.defineProperty(q,"__esModule",{value:!0}),q.default=void 0;var c=f(K()),h=Y,m=ae(),b=y(Ze()),v=["title","size","color","overrides"];function y(t){return t&&t.__esModule?t:{default:t}}function S(t){if(typeof WeakMap!="function")return null;var u=new WeakMap,s=new WeakMap;return(S=function(a){return a?s:u})(t)}function f(t,u){if(t&&t.__esModule)return t;if(t===null||g(t)!=="object"&&typeof t!="function")return{default:t};var s=S(u);if(s&&s.has(t))return s.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if(l!=="default"&&Object.prototype.hasOwnProperty.call(t,l)){var n=a?Object.getOwnPropertyDescriptor(t,l):null;n&&(n.get||n.set)?Object.defineProperty(r,l,n):r[l]=t[l]}return r.default=t,s&&s.set(t,r),r}function $(){return $=Object.assign?Object.assign.bind():function(t){for(var u=1;u<arguments.length;u++){var s=arguments[u];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])}return t},$.apply(this,arguments)}function P(t,u){if(t==null)return{};var s=E(t,u),r,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++)r=l[a],!(u.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function E(t,u){if(t==null)return{};var s={},r=Object.keys(t),a,l;for(l=0;l<r.length;l++)a=r[l],!(u.indexOf(a)>=0)&&(s[a]=t[a]);return s}function _(t,u){return M(t)||x(t,u)||L(t,u)||D()}function D(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L(t,u){if(t){if(typeof t=="string")return N(t,u);var s=Object.prototype.toString.call(t).slice(8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return Array.from(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return N(t,u)}}function N(t,u){(u==null||u>t.length)&&(u=t.length);for(var s=0,r=new Array(u);s<u;s++)r[s]=t[s];return r}function x(t,u){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var r=[],a=!0,l=!1,n,e;try{for(s=s.call(t);!(a=(n=s.next()).done)&&(r.push(n.value),!(u&&r.length===u));a=!0);}catch(o){l=!0,e=o}finally{try{!a&&s.return!=null&&s.return()}finally{if(l)throw e}}return r}}function M(t){if(Array.isArray(t))return t}function F(t,u){var s=(0,h.useStyletron)(),r=_(s,2),a=r[1],l=t.title,n=l===void 0?"Delete Alt":l,e=t.size,o=t.color,p=t.overrides,d=p===void 0?{}:p,O=P(t,v),I=(0,m.mergeOverride)({component:a.icons&&a.icons.DeleteAlt?a.icons.DeleteAlt:null},d&&d.Svg?(0,m.toObjectOverride)(d.Svg):{});return c.createElement(b.default,$({viewBox:"0 0 24 24",ref:u,title:n,size:e,color:o,overrides:{Svg:I}},O),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var i=c.forwardRef(F);return q.default=i,q}var ie;function je(){if(ie)return C;ie=1,Object.defineProperty(C,"__esModule",{value:!0}),C.getRootStyles=C.getInputStyles=C.getInputContainerStyles=C.StyledMaskToggleButton=C.StyledClearIconContainer=C.StyledClearIcon=C.Root=C.InputEnhancer=C.InputContainer=C.Input=void 0;var g=Y,c=Me(),h=m(qe());function m(n){return n&&n.__esModule?n:{default:n}}function b(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(n);e&&(p=p.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),o.push.apply(o,p)}return o}function v(n){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?b(Object(o),!0).forEach(function(p){y(n,p,o[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach(function(p){Object.defineProperty(n,p,Object.getOwnPropertyDescriptor(o,p))})}return n}function y(n,e,o){return e in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n}var S=(0,g.styled)("button",function(n){var e,o=n.$theme,p=n.$size,d=n.$isFocusVisible,O=(e={},y(e,c.SIZE.mini,o.sizing.scale400),y(e,c.SIZE.compact,o.sizing.scale400),y(e,c.SIZE.default,o.sizing.scale300),y(e,c.SIZE.large,o.sizing.scale200),e)[p];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:O,paddingRight:O,outline:d?"solid 3px ".concat(o.colors.accent):"none",color:o.colors.contentPrimary}});C.StyledMaskToggleButton=S,S.displayName="StyledMaskToggleButton",S.displayName="StyledMaskToggleButton";var f=(0,g.styled)("div",function(n){var e,o=n.$alignTop,p=o===void 0?!1:o,d=n.$size,O=n.$theme,I=(e={},y(e,c.SIZE.mini,O.sizing.scale200),y(e,c.SIZE.compact,O.sizing.scale200),y(e,c.SIZE.default,O.sizing.scale100),y(e,c.SIZE.large,O.sizing.scale0),e)[d];return{display:"flex",alignItems:p?"flex-start":"center",paddingLeft:I,paddingRight:I,paddingTop:p?O.sizing.scale500:"0px",color:O.colors.contentPrimary}});C.StyledClearIconContainer=f,f.displayName="StyledClearIconContainer",f.displayName="StyledClearIconContainer";var $=(0,g.styled)(h.default,function(n){var e=n.$theme,o=n.$isFocusVisible;return{cursor:"pointer",outline:o?"solid 3px ".concat(e.colors.accent):"none"}});C.StyledClearIcon=$,$.displayName="StyledClearIcon",$.displayName="StyledClearIcon";function P(n,e){var o;return(o={},y(o,c.SIZE.mini,{paddingTop:e.scale100,paddingBottom:e.scale100,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.compact,{paddingTop:e.scale200,paddingBottom:e.scale200,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.default,{paddingTop:e.scale400,paddingBottom:e.scale400,paddingLeft:e.scale550,paddingRight:e.scale550}),y(o,c.SIZE.large,{paddingTop:e.scale550,paddingBottom:e.scale550,paddingLeft:e.scale550,paddingRight:e.scale550}),o)[n]}function E(n,e,o,p,d){var O=n===c.ADJOINED.both||n===c.ADJOINED.left&&p!=="rtl"||n===c.ADJOINED.right&&p==="rtl"||d&&p==="rtl",I=n===c.ADJOINED.both||n===c.ADJOINED.right&&p!=="rtl"||n===c.ADJOINED.left&&p==="rtl"||d&&p!=="rtl";return{paddingLeft:O?o.scale550:"0px",paddingRight:I?o.scale550:"0px"}}function _(n,e){var o;return(o={},y(o,c.SIZE.mini,e.font100),y(o,c.SIZE.compact,e.font200),y(o,c.SIZE.default,e.font300),y(o,c.SIZE.large,e.font400),o)[n]}function D(n,e,o){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4?arguments[4]:void 0;return n?{borderLeftColor:d.inputFillDisabled,borderRightColor:d.inputFillDisabled,borderTopColor:d.inputFillDisabled,borderBottomColor:d.inputFillDisabled,backgroundColor:d.inputFillDisabled}:e?{borderLeftColor:d.borderSelected,borderRightColor:d.borderSelected,borderTopColor:d.borderSelected,borderBottomColor:d.borderSelected,backgroundColor:d.inputFillActive}:o?{borderLeftColor:d.inputBorderError,borderRightColor:d.inputBorderError,borderTopColor:d.inputBorderError,borderBottomColor:d.inputBorderError,backgroundColor:d.inputFillError}:p?{borderLeftColor:d.inputBorderPositive,borderRightColor:d.inputBorderPositive,borderTopColor:d.inputBorderPositive,borderBottomColor:d.inputBorderPositive,backgroundColor:d.inputFillPositive}:{borderLeftColor:d.inputBorder,borderRightColor:d.inputBorder,borderTopColor:d.inputBorder,borderBottomColor:d.inputBorder,backgroundColor:d.inputFill}}function L(n,e){var o=e.inputBorderRadius;return n===c.SIZE.mini&&(o=e.inputBorderRadiusMini),{borderTopLeftRadius:o,borderBottomLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o}}var N=function(e){var o=e.$isFocused,p=e.$adjoined,d=e.$error,O=e.$disabled,I=e.$positive,R=e.$size,W=e.$theme,T=e.$theme,B=T.borders,U=T.colors,le=T.sizing,ue=T.typography,G=T.animation,se=e.$hasIconTrailing;return v(v(v(v({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:G.timing200,transitionTimingFunction:G.easeOutCurve},L(R,B)),_(R,ue)),D(O,o,d,I,U)),E(p,R,le,W.direction,se))};C.getRootStyles=N;var x=(0,g.styled)("div",N);C.Root=x,x.displayName="Root",x.displayName="Root";function M(n,e){var o;return(o={},y(o,c.SIZE.mini,{paddingRight:e.scale400,paddingLeft:e.scale400}),y(o,c.SIZE.compact,{paddingRight:e.scale400,paddingLeft:e.scale400}),y(o,c.SIZE.default,{paddingRight:e.scale300,paddingLeft:e.scale300}),y(o,c.SIZE.large,{paddingRight:e.scale200,paddingLeft:e.scale200}),o)[n]}function F(n,e,o,p,d){return n?{color:d.inputEnhancerTextDisabled,backgroundColor:d.inputFillDisabled}:e?{color:d.contentPrimary,backgroundColor:d.inputFillActive}:o?{color:d.contentPrimary,backgroundColor:d.inputFillError}:p?{color:d.contentPrimary,backgroundColor:d.inputFillPositive}:{color:d.contentPrimary,backgroundColor:d.inputFill}}var i=(0,g.styled)("div",function(n){var e=n.$size,o=n.$disabled,p=n.$isFocused,d=n.$error,O=n.$positive,I=n.$theme,R=I.colors,W=I.sizing,T=I.typography,B=I.animation;return v(v(v({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:B.timing200,transitionTimingFunction:B.easeOutCurve},_(e,T)),M(e,W)),F(o,p,d,O,R))});C.InputEnhancer=i,i.displayName="InputEnhancer",i.displayName="InputEnhancer";function t(n,e,o,p,d){return n?{color:d.inputTextDisabled,backgroundColor:d.inputFillDisabled}:e?{color:d.contentPrimary,backgroundColor:d.inputFillActive}:o?{color:d.contentPrimary,backgroundColor:d.inputFillError}:p?{color:d.contentPrimary,backgroundColor:d.inputFillPositive}:{color:d.contentPrimary,backgroundColor:d.inputFill}}var u=function(e){var o=e.$isFocused,p=e.$error,d=e.$disabled,O=e.$positive,I=e.$size,R=e.$theme,W=R.colors,T=R.typography,B=R.animation;return v(v({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:B.timing200,transitionTimingFunction:B.easeOutCurve},_(I,T)),t(d,o,p,O,W))};C.getInputContainerStyles=u;var s=(0,g.styled)("div",u);C.InputContainer=s,s.displayName="InputContainer",s.displayName="InputContainer";function r(n,e,o,p){return n?{color:p.inputTextDisabled,"-webkit-text-fill-color":p.inputTextDisabled,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholderDisabled}}:{color:p.contentPrimary,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholder}}}var a=function(e){var o=e.$disabled,p=e.$isFocused,d=e.$error,O=e.$size,I=e.$theme,R=I.colors,W=I.sizing,T=I.typography;return v(v(v({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:o?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},_(O,T)),P(O,W)),r(o,p,d,R))};C.getInputStyles=a;var l=(0,g.styled)("input",a);return C.Input=l,l.displayName="Input",l.displayName="Input",C}var He=je();const ke=Ie("div",{target:"e1ybf61d0"})({position:"absolute",top:"50%",right:"2.05em"});function Ve({disabled:g,element:c,widgetMgr:h,fragmentId:m}){const[b,v]=Ae({getStateFromWidgetMgr:Ue,getDefaultStateFromProto:Je,getCurrStateFromProto:Ke,updateWidgetMgrState:Ye,element:c,widgetMgr:h,fragmentId:m}),y=V.useContext(Pe),S=J(c.default)&&!g,f=$e(),$={Select:{props:{disabled:g,overrides:{ControlContainer:{style:{height:f.sizes.minElementHeight,borderLeftWidth:f.sizes.borderWidth,borderRightWidth:f.sizes.borderWidth,borderTopWidth:f.sizes.borderWidth,borderBottomWidth:f.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:f.spacing.sm})},ValueContainer:{style:()=>({lineHeight:f.lineHeights.inputWidget,paddingRight:f.spacing.sm,paddingLeft:f.spacing.md,paddingBottom:f.spacing.sm,paddingTop:f.spacing.sm})},SingleValue:{style:{fontWeight:f.fontWeights.normal},props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:f.spacing.none,paddingBottom:f.spacing.none,boxShadow:"none",maxHeight:f.sizes.maxDropdownHeight})},DropdownListItem:{style:()=>({paddingRight:f.spacing.lg,paddingLeft:f.spacing.lg,paddingTop:f.spacing.sm,paddingBottom:f.spacing.sm})},Popover:{props:{ignoreBoundary:y,overrides:{Body:{style:()=>({marginTop:f.spacing.px})}}}},Placeholder:{style:()=>({color:f.colors.fadedText60})},SelectArrow:{component:xe,props:{overrides:{Svg:{style:()=>({width:f.iconSizes.xl,height:f.iconSizes.xl})}}}}}}}},P=V.useCallback(_=>{const D=_===null?null:Ge(_);v({value:D,fromUi:!0})},[v]),E=V.useCallback(()=>{P(null)},[P]);return _e("div",{className:"stTimeInput","data-testid":"stTimeInput",children:[z(De,{label:c.label,disabled:g,labelVisibility:Te(c.labelVisibility?.value),children:c.help&&z(Ee,{children:z(Re,{content:c.help,placement:we.TOP_RIGHT})})}),z(We,{format:"24",step:c.step?Number(c.step):900,value:J(b)?void 0:Xe(b),onChange:P,overrides:$,nullable:S,creatable:!0,"aria-label":c.label}),S&&!J(b)&&z(ke,{onClick:E,"data-testid":"stTimeInputClearButton",children:z(He.StyledClearIcon,{overrides:{Svg:{style:{color:f.colors.darkGray,padding:f.spacing.threeXS,height:f.sizes.clearIconSize,width:f.sizes.clearIconSize,":hover":{fill:f.colors.bodyText}}}},$isFocusVisible:!1})})]})}function Ue(g,c){return g.getStringValue(c)??null}function Je(g){return g.default??null}function Ke(g){return g.value??null}function Ye(g,c,h,m){c.setStringValue(g,h.value,{fromUi:h.fromUi},m)}function Ge(g){const c=g.getHours().toString().padStart(2,"0"),h=g.getMinutes().toString().padStart(2,"0");return`${c}:${h}`}function Xe(g){if(g===null)return null;const[c,h]=g.split(":").map(Number),m=new Date;return m.setHours(c),m.setMinutes(h),m}const it=V.memo(Ve);export{it as default};
@@ -1 +1 @@
1
- import{r,E as q,_ as J,cE as y,M as m,O as Q,l as ft,s as k,z as bt,aP as mt,cu as ht,H as G,C as z,j as c,br as gt,bH as It,bs as yt,b9 as Tt,bt as Ct,D as wt,bo as X}from"./index.EAQB8Tuq.js";import{u as St}from"./uniqueId.CDZNs_pn.js";import{u as vt}from"./FormClearHelper.C4W8xjEX.js";import{I as Vt}from"./InputInstructions.CAp9mFM6.js";import{s as xt}from"./sprintf.D7DtBTRn.js";import{I as kt}from"./input.DjnwsrgF.js";import"./base-input.C-H36mFE.js";var Y=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(q,J({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});Y.displayName="Minus";var Z=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(q,J({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Z.displayName="Plus";const Dt=ft.getLogger("NumberInput");function Et(t){return m(t)||t===""?void 0:t}const F=({value:t,format:e,step:a,dataType:b})=>{if(m(t))return null;let o=Et(e);if(m(o)&&Q(a)){const p=a.toString();b===y.DataType.FLOAT&&a!==0&&p.includes(".")&&(o=`%0.${p.split(".")[1].length}f`)}if(m(o))return t.toString();try{return xt.sprintf(o,t)}catch(p){return Dt.warn(`Error in sprintf(${o}, ${t}): ${p}`),String(t)}},Rt=(t,e,a)=>m(t)?!1:t-e>=a,Nt=(t,e,a)=>m(t)?!1:t+e<=a,zt=t=>(t.element.dataType===y.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,K=({step:t,dataType:e})=>t||(e===y.DataType.INT?1:.01),Ft=k("div",{target:"eaba2yi0"})(({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}}})),Wt=k("div",{target:"eaba2yi1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),M=k("button",{target:"eaba2yi2"})(({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"},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Lt=k("div",{target:"eaba2yi3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Bt=({disabled:t,element:e,widgetMgr:a,fragmentId:b})=>{const o=bt(),{dataType:p,id:w,formId:f,default:W,format:L,icon:D,min:h,max:g}=e,[B,tt]=mt(),[s,et]=r.useState(()=>K(e)),H=zt({element:e,widgetMgr:a}),[I,T]=r.useState(!1),[l,C]=r.useState(H),[P,S]=r.useState(()=>F({value:H,...e,step:s})),[U,A]=r.useState(!1),v=r.useRef(null),O=r.useRef(St("number_input_")),V=Rt(l,s,h),x=Nt(l,s,g),$=ht({formId:f}),ot=$?a.allowFormEnterToSubmit(f):I,rt=U&&B>o.breakpoints.hideWidgetDetails;r.useEffect(()=>{et(K({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const u=r.useCallback(({value:n,source:i})=>{if(Q(n)&&(h>n||n>g))v.current?.reportValidity();else{const d=n??W??null;switch(p){case y.DataType.INT:a.setIntValue({id:w,formId:f},d,i,b);break;case y.DataType.FLOAT:a.setDoubleValue({id:w,formId:f},d,i,b);break;default:throw new Error("Invalid data type")}T(!1),C(d),S(F({value:d,dataType:p,format:L,step:s}))}},[h,g,v,a,b,s,p,w,f,W,L]),nt=r.useCallback(()=>{I&&u({value:l,source:{fromUi:!0}}),A(!1)},[I,l,u]),at=r.useCallback(()=>{A(!0)},[]),j=r.useCallback(()=>{const{value:n}=e;e.setValue=!1,C(n??null),S(F({value:n??null,...e,step:s})),u({value:n??null,source:{fromUi:!1}})},[e,s,u]);r.useEffect(()=>{e.setValue?j():u({value:l,source:{fromUi:!1}});const n=v.current;if(n){const i=d=>{d.preventDefault()};return n.addEventListener("wheel",i),()=>{n.removeEventListener("wheel",i)}}},[]),e.setValue&&j();const E=m(e.default)&&!t,st=r.useCallback(()=>{const n=e.default??null;C(n),u({value:n,source:{fromUi:!0}})},[e]);vt({element:e,widgetMgr:a,onFormCleared:st});const it=n=>{const{value:i}=n.target;if(i==="")T(!0),C(null),S(null);else{let d;e.dataType===y.DataType.INT?d=parseInt(i,10):d=parseFloat(i),T(!0),C(d),S(i)}},R=r.useCallback(()=>{x&&(T(!0),u({value:(l??h)+s,source:{fromUi:!0}}))},[l,h,s,x]),N=r.useCallback(()=>{V&&(T(!0),u({value:(l??g)-s,source:{fromUi:!0}}))},[l,g,s,V]),lt=r.useCallback(n=>{const{key:i}=n;switch(i){case"ArrowUp":n.preventDefault(),R();break;case"ArrowDown":n.preventDefault(),N();break}},[R,N]),ct=r.useCallback(n=>{n.key==="Enter"&&(I&&u({value:l,source:{fromUi:!0}}),a.allowFormEnterToSubmit(f)&&a.submitForm(f,b))},[I,l,u,a,f,b]),_=D?.startsWith(":material"),ut=_?"lg":"base",dt=G(o.iconSizes.lg)+2*G(o.spacing.twoXS),pt=D?o.breakpoints.hideNumberInputControls+dt:o.breakpoints.hideNumberInputControls;return z("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:tt,children:[c(Ct,{label:e.label,disabled:t,labelVisibility:gt(e.labelVisibility?.value),htmlFor:O.current,children:e.help&&c(It,{children:c(yt,{content:e.help,placement:Tt.TOP_RIGHT})})}),z(Ft,{className:U?"focused":"","data-testid":"stNumberInputContainer",children:[c(kt,{type:"number",inputRef:v,value:P??"",placeholder:e.placeholder,onBlur:nt,onFocus:at,onChange:it,onKeyPress:ct,onKeyDown:lt,clearable:E,clearOnEscape:E,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&c(wt,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:ut}),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:h,max:g,type:"number",inputMode:""},style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,"::placeholder":{color:o.colors.fadedText60}}},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:D?o.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:o.iconSizes.lg,color:_?o.colors.fadedText60:"inherit"}}}}),B>pt&&z(Wt,{children:[c(M,{"data-testid":"stNumberInputStepDown",onClick:N,disabled:!V||t,tabIndex:-1,children:c(X,{content:Y,size:"xs",color:V?"inherit":o.colors.disabled})}),c(M,{"data-testid":"stNumberInputStepUp",onClick:R,disabled:!x||t,tabIndex:-1,children:c(X,{content:Z,size:"xs",color:x?"inherit":o.colors.disabled})})]})]}),rt&&c(Lt,{clearable:E,children:c(Vt,{dirty:I,value:P??"",inForm:$,allowEnterToSubmit:ot})})]})},_t=r.memo(Bt);export{_t as default};
1
+ import{r,E as q,_ as J,cE as y,M as m,O as Q,l as ft,s as k,z as bt,aP as mt,cu as ht,H as G,C as z,j as c,br as gt,bH as It,bs as yt,b9 as Tt,bt as Ct,D as wt,bo as X}from"./index.SCzIN5SB.js";import{u as St}from"./uniqueId.8z-ePOzb.js";import{u as vt}from"./FormClearHelper.BapTKtHM.js";import{I as Vt}from"./InputInstructions.DfmDQyfZ.js";import{s as xt}from"./sprintf.D7DtBTRn.js";import{I as kt}from"./input.C4PKmVyq.js";import"./base-input.DJLL2PiI.js";var Y=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(q,J({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});Y.displayName="Minus";var Z=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(q,J({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Z.displayName="Plus";const Dt=ft.getLogger("NumberInput");function Et(t){return m(t)||t===""?void 0:t}const F=({value:t,format:e,step:a,dataType:b})=>{if(m(t))return null;let o=Et(e);if(m(o)&&Q(a)){const p=a.toString();b===y.DataType.FLOAT&&a!==0&&p.includes(".")&&(o=`%0.${p.split(".")[1].length}f`)}if(m(o))return t.toString();try{return xt.sprintf(o,t)}catch(p){return Dt.warn(`Error in sprintf(${o}, ${t}): ${p}`),String(t)}},Rt=(t,e,a)=>m(t)?!1:t-e>=a,Nt=(t,e,a)=>m(t)?!1:t+e<=a,zt=t=>(t.element.dataType===y.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,K=({step:t,dataType:e})=>t||(e===y.DataType.INT?1:.01),Ft=k("div",{target:"eaba2yi0"})(({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}}})),Wt=k("div",{target:"eaba2yi1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),M=k("button",{target:"eaba2yi2"})(({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"},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Lt=k("div",{target:"eaba2yi3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Bt=({disabled:t,element:e,widgetMgr:a,fragmentId:b})=>{const o=bt(),{dataType:p,id:w,formId:f,default:W,format:L,icon:D,min:h,max:g}=e,[B,tt]=mt(),[s,et]=r.useState(()=>K(e)),H=zt({element:e,widgetMgr:a}),[I,T]=r.useState(!1),[l,C]=r.useState(H),[P,S]=r.useState(()=>F({value:H,...e,step:s})),[U,A]=r.useState(!1),v=r.useRef(null),O=r.useRef(St("number_input_")),V=Rt(l,s,h),x=Nt(l,s,g),$=ht({formId:f}),ot=$?a.allowFormEnterToSubmit(f):I,rt=U&&B>o.breakpoints.hideWidgetDetails;r.useEffect(()=>{et(K({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const u=r.useCallback(({value:n,source:i})=>{if(Q(n)&&(h>n||n>g))v.current?.reportValidity();else{const d=n??W??null;switch(p){case y.DataType.INT:a.setIntValue({id:w,formId:f},d,i,b);break;case y.DataType.FLOAT:a.setDoubleValue({id:w,formId:f},d,i,b);break;default:throw new Error("Invalid data type")}T(!1),C(d),S(F({value:d,dataType:p,format:L,step:s}))}},[h,g,v,a,b,s,p,w,f,W,L]),nt=r.useCallback(()=>{I&&u({value:l,source:{fromUi:!0}}),A(!1)},[I,l,u]),at=r.useCallback(()=>{A(!0)},[]),j=r.useCallback(()=>{const{value:n}=e;e.setValue=!1,C(n??null),S(F({value:n??null,...e,step:s})),u({value:n??null,source:{fromUi:!1}})},[e,s,u]);r.useEffect(()=>{e.setValue?j():u({value:l,source:{fromUi:!1}});const n=v.current;if(n){const i=d=>{d.preventDefault()};return n.addEventListener("wheel",i),()=>{n.removeEventListener("wheel",i)}}},[]),e.setValue&&j();const E=m(e.default)&&!t,st=r.useCallback(()=>{const n=e.default??null;C(n),u({value:n,source:{fromUi:!0}})},[e]);vt({element:e,widgetMgr:a,onFormCleared:st});const it=n=>{const{value:i}=n.target;if(i==="")T(!0),C(null),S(null);else{let d;e.dataType===y.DataType.INT?d=parseInt(i,10):d=parseFloat(i),T(!0),C(d),S(i)}},R=r.useCallback(()=>{x&&(T(!0),u({value:(l??h)+s,source:{fromUi:!0}}))},[l,h,s,x]),N=r.useCallback(()=>{V&&(T(!0),u({value:(l??g)-s,source:{fromUi:!0}}))},[l,g,s,V]),lt=r.useCallback(n=>{const{key:i}=n;switch(i){case"ArrowUp":n.preventDefault(),R();break;case"ArrowDown":n.preventDefault(),N();break}},[R,N]),ct=r.useCallback(n=>{n.key==="Enter"&&(I&&u({value:l,source:{fromUi:!0}}),a.allowFormEnterToSubmit(f)&&a.submitForm(f,b))},[I,l,u,a,f,b]),_=D?.startsWith(":material"),ut=_?"lg":"base",dt=G(o.iconSizes.lg)+2*G(o.spacing.twoXS),pt=D?o.breakpoints.hideNumberInputControls+dt:o.breakpoints.hideNumberInputControls;return z("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:tt,children:[c(Ct,{label:e.label,disabled:t,labelVisibility:gt(e.labelVisibility?.value),htmlFor:O.current,children:e.help&&c(It,{children:c(yt,{content:e.help,placement:Tt.TOP_RIGHT})})}),z(Ft,{className:U?"focused":"","data-testid":"stNumberInputContainer",children:[c(kt,{type:"number",inputRef:v,value:P??"",placeholder:e.placeholder,onBlur:nt,onFocus:at,onChange:it,onKeyPress:ct,onKeyDown:lt,clearable:E,clearOnEscape:E,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&c(wt,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:ut}),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:h,max:g,type:"number",inputMode:""},style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,"::placeholder":{color:o.colors.fadedText60}}},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:D?o.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:o.iconSizes.lg,color:_?o.colors.fadedText60:"inherit"}}}}),B>pt&&z(Wt,{children:[c(M,{"data-testid":"stNumberInputStepDown",onClick:N,disabled:!V||t,tabIndex:-1,children:c(X,{content:Y,size:"xs",color:V?"inherit":o.colors.disabled})}),c(M,{"data-testid":"stNumberInputStepUp",onClick:R,disabled:!x||t,tabIndex:-1,children:c(X,{content:Z,size:"xs",color:x?"inherit":o.colors.disabled})})]})]}),rt&&c(Lt,{clearable:E,children:c(Vt,{dirty:I,value:P??"",inForm:$,allowEnterToSubmit:ot})})]})},_t=r.memo(Bt);export{_t as default};
@@ -1 +1 @@
1
- import{r as l,j as n,br as c,bR as g}from"./index.EAQB8Tuq.js";import{a as b}from"./useBasicWidgetState.YAhDGDM8.js";import"./FormClearHelper.C4W8xjEX.js";const m=(t,e)=>t.getStringValue(e),f=t=>t.default??null,p=t=>t.value??null,C=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},d=({element:t,disabled:e,widgetMgr:r,fragmentId:o})=>{const[i,a]=b({getStateFromWidgetMgr:m,getDefaultStateFromProto:f,getCurrStateFromProto:p,updateWidgetMgrState:C,element:t,widgetMgr:r,fragmentId:o}),s=l.useCallback(u=>{a({value:u,fromUi:!0})},[a]);return n(g,{label:t.label,labelVisibility:c(t.labelVisibility?.value),help:t.help,onChange:s,disabled:e,value:i})},h=l.memo(d);export{h as default};
1
+ import{r as l,j as n,br as c,bR as g}from"./index.SCzIN5SB.js";import{a as b}from"./useBasicWidgetState.Bg3DrOCg.js";import"./FormClearHelper.BapTKtHM.js";const m=(t,e)=>t.getStringValue(e),f=t=>t.default??null,p=t=>t.value??null,C=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},d=({element:t,disabled:e,widgetMgr:r,fragmentId:o})=>{const[i,a]=b({getStateFromWidgetMgr:m,getDefaultStateFromProto:f,getCurrStateFromProto:p,updateWidgetMgrState:C,element:t,widgetMgr:r,fragmentId:o}),s=l.useCallback(u=>{a({value:u,fromUi:!0})},[a]);return n(g,{label:t.label,labelVisibility:c(t.labelVisibility?.value),help:t.help,onChange:s,disabled:e,value:i})},h=l.memo(d);export{h as default};
@@ -1 +1 @@
1
- import{r as l,M as s,j as m,br as V,ca as x}from"./index.EAQB8Tuq.js";import{a as U}from"./useBasicWidgetState.YAhDGDM8.js";import"./FormClearHelper.C4W8xjEX.js";const h=(t,e)=>t.getStringValue(e),v=t=>t.options.length===0||s(t.default)?null:t.options[t.default],w=t=>t.rawValue??null,y=(t,e,o,a)=>{e.setStringValue(t,o.value,{fromUi:o.fromUi},a)},C=({disabled:t,element:e,widgetMgr:o,fragmentId:a})=>{const{options:i,help:u,label:n,labelVisibility:c,placeholder:p,acceptNewOptions:f}=e,[g,r]=U({getStateFromWidgetMgr:h,getDefaultStateFromProto:v,getCurrStateFromProto:w,updateWidgetMgrState:y,element:e,widgetMgr:o,fragmentId:a}),b=l.useCallback(d=>{r({value:d,fromUi:!0})},[r]),S=s(e.default)&&!t;return m(x,{label:n,labelVisibility:V(c?.value),options:i,disabled:t,onChange:b,value:g,help:u,placeholder:p,clearable:S,acceptNewOptions:f??!1})},O=l.memo(C);export{O as default};
1
+ import{r as l,M as s,j as m,br as V,ca as x}from"./index.SCzIN5SB.js";import{a as U}from"./useBasicWidgetState.Bg3DrOCg.js";import"./FormClearHelper.BapTKtHM.js";const h=(t,e)=>t.getStringValue(e),v=t=>t.options.length===0||s(t.default)?null:t.options[t.default],w=t=>t.rawValue??null,y=(t,e,o,a)=>{e.setStringValue(t,o.value,{fromUi:o.fromUi},a)},C=({disabled:t,element:e,widgetMgr:o,fragmentId:a})=>{const{options:i,help:u,label:n,labelVisibility:c,placeholder:p,acceptNewOptions:f}=e,[g,r]=U({getStateFromWidgetMgr:h,getDefaultStateFromProto:v,getCurrStateFromProto:w,updateWidgetMgrState:y,element:e,widgetMgr:o,fragmentId:a}),b=l.useCallback(d=>{r({value:d,fromUi:!0})},[r]),S=s(e.default)&&!t;return m(x,{label:n,labelVisibility:V(c?.value),options:i,disabled:t,onChange:b,value:g,help:u,placeholder:p,clearable:S,acceptNewOptions:f??!1})},O=l.memo(C);export{O as default};
@@ -1 +1 @@
1
- import{s as l,r as o,j as f,l as v}from"./index.EAQB8Tuq.js";const A=l("div",{target:"ea9qfvi0"})(()=>({lineHeight:0})),g=l("audio",{target:"ea9qfvi1"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0})),T=v.getLogger("Audio");function y({element:r,endpoints:s,elementMgr:u}){const i=o.useRef(null),{startTime:d,endTime:n,loop:a,autoplay:p}=r,E=o.useMemo(()=>{if(!r.id)return!0;const e=u.getElementState(r.id,"preventAutoplay");return e||u.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,u]);o.useEffect(()=>{i.current&&(i.current.currentTime=d)},[d]),o.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),o.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const c=()=>{n>0&&e.currentTime>=n&&(a?(e.currentTime=d||0,e.play()):t||(t=!0,e.pause()))};return n>0&&e.addEventListener("timeupdate",c),()=>{e&&n>0&&e.removeEventListener("timeupdate",c)}},[n,a,d]),o.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{a&&(e.currentTime=d||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[a,d]);const m=s.buildMediaURL(r.url);return f(A,{children:f(g,{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!E,src:m,onError:e=>{const t=e.currentTarget.src;T.error(`Client Error: Audio source error - ${t}`),s.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)}})})}const S=o.memo(y);export{S as default};
1
+ import{s as l,r as o,j as f,l as v}from"./index.SCzIN5SB.js";const A=l("div",{target:"ea9qfvi0"})(()=>({lineHeight:0})),g=l("audio",{target:"ea9qfvi1"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0})),T=v.getLogger("Audio");function y({element:r,endpoints:s,elementMgr:u}){const i=o.useRef(null),{startTime:d,endTime:n,loop:a,autoplay:p}=r,E=o.useMemo(()=>{if(!r.id)return!0;const e=u.getElementState(r.id,"preventAutoplay");return e||u.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,u]);o.useEffect(()=>{i.current&&(i.current.currentTime=d)},[d]),o.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),o.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const c=()=>{n>0&&e.currentTime>=n&&(a?(e.currentTime=d||0,e.play()):t||(t=!0,e.pause()))};return n>0&&e.addEventListener("timeupdate",c),()=>{e&&n>0&&e.removeEventListener("timeupdate",c)}},[n,a,d]),o.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{a&&(e.currentTime=d||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[a,d]);const m=s.buildMediaURL(r.url);return f(A,{children:f(g,{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!E,src:m,onError:e=>{const t=e.currentTarget.src;T.error(`Client Error: Audio source error - ${t}`),s.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)}})})}const S=o.memo(y);export{S as default};
@@ -1 +1 @@
1
- import{s as c,r as s,aI as f,b8 as b,z as x,j as a,b5 as k,b9 as C,C as L,D as v,aG as h}from"./index.EAQB8Tuq.js";const T=c("div",{target:"e1ghu24d0"})(({containerWidth:r})=>({display:"flex",flexDirection:"column",width:r?"100%":"fit-content"})),w=c("a",{target:"e1ghu24d1"})(({disabled:r,isCurrentPage:e,containerWidth:i,theme:o})=>({textDecoration:"none",width:i?"100%":"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.button,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:e?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:e?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...r?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}})),y=c("span",{target:"e1ghu24d2"})(({disabled:r,theme:e})=>({color:e.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...r?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed"}:{}}));function S(r,e){return r===null&&e?!0:r===null&&!e?!1:r===!0}function P(r){const{onPageChange:e,currentPageScriptHash:i}=s.useContext(f),o=s.useContext(b),{colors:d}=x(),{disabled:t,element:n}=r,l=S(n.useContainerWidth,o),g=i===n.pageScriptHash,p=u=>{n.external?t&&u.preventDefault():(u.preventDefault(),t||e(n.pageScriptHash))};return a("div",{className:"stPageLink","data-testid":"stPageLink",children:a(k,{help:n.help,placement:C.TOP_RIGHT,containerWidth:l,children:a(T,{containerWidth:l,children:L(w,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:g,containerWidth:l,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(y,{disabled:t,children:a(h,{source:n.label,allowHTML:!1,isLabel:!0,boldLabel:g,largerLabel:!0,disableLinks:!0})})]})})})})}const B=s.memo(P);export{B as default};
1
+ import{s as c,r as s,aI as f,b8 as b,z as x,j as a,b5 as k,b9 as C,C as L,D as v,aG as h}from"./index.SCzIN5SB.js";const T=c("div",{target:"e1ghu24d0"})(({containerWidth:r})=>({display:"flex",flexDirection:"column",width:r?"100%":"fit-content"})),w=c("a",{target:"e1ghu24d1"})(({disabled:r,isCurrentPage:e,containerWidth:i,theme:o})=>({textDecoration:"none",width:i?"100%":"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.button,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:e?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:e?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...r?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}})),y=c("span",{target:"e1ghu24d2"})(({disabled:r,theme:e})=>({color:e.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...r?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed"}:{}}));function S(r,e){return r===null&&e?!0:r===null&&!e?!1:r===!0}function P(r){const{onPageChange:e,currentPageScriptHash:i}=s.useContext(f),o=s.useContext(b),{colors:d}=x(),{disabled:t,element:n}=r,l=S(n.useContainerWidth,o),g=i===n.pageScriptHash,p=u=>{n.external?t&&u.preventDefault():(u.preventDefault(),t||e(n.pageScriptHash))};return a("div",{className:"stPageLink","data-testid":"stPageLink",children:a(k,{help:n.help,placement:C.TOP_RIGHT,containerWidth:l,children:a(T,{containerWidth:l,children:L(w,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:g,containerWidth:l,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(y,{disabled:t,children:a(h,{source:n.label,allowHTML:!1,isLabel:!0,boldLabel:g,largerLabel:!0,disableLinks:!0})})]})})})})}const B=s.memo(P);export{B as default};
@@ -1,3 +1,3 @@
1
- import{bv as _,bO as ye,bw as $,r as u,z as $e,C as ne,j as R,bz as Re,bs as Oe,b9 as _e,bt as Se,aG as oe,H as ie,c9 as ae,br as Pe}from"./index.EAQB8Tuq.js";import{a as we}from"./useBasicWidgetState.YAhDGDM8.js";import"./FormClearHelper.C4W8xjEX.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function D(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(D(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(D(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(D(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(D(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",p=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},O(t,"margin".concat(p),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return z(z({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return z(z({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bv as _,bO as ye,bw as $,r as u,z as $e,C as ne,j as R,bz as Re,bs as Oe,b9 as _e,bt as Se,aG as oe,H as ie,c9 as ae,br as Pe}from"./index.SCzIN5SB.js";import{a as we}from"./useBasicWidgetState.Bg3DrOCg.js";import"./FormClearHelper.BapTKtHM.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function D(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(D(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(D(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(D(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(D(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",p=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},O(t,"margin".concat(p),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return z(z({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return z(z({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function De(e,t,n){return t&&ze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return De(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=$(s.RadioGroupRoot,q),c=Ee(a,2),p=c[0],b=c[1];return u.createElement(p,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},b),u.Children.map(this.props.children,function(f,l){if(!u.isValidElement(f))return null;var d=o.props.value===f.props.value;return u.cloneElement(f,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||f.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,l)},onFocus:function(g){return o.handleFocus(g,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function M(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=$(i.Root,X),a=M(s,2),c=a[0],p=a[1],b=$(i.Label,Q),f=M(b,2),l=f[0],d=f[1],S=$(i.Input,Y),g=M(S,2),P=g[0],H=g[1],x=$(i.Description,Z),I=M(x,2),v=I[0],h=I[1],m=$(i.RadioMarkInner,K),ee=M(m,2),de=ee[0],he=ee[1],be=$(i.RadioMarkOuter,J),te=M(be,2),ge=te[0],ve=te[1],w={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,y({},w,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,y({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},w,p),et(this.props.labelPlacement)&&re,u.createElement(ge,y({},w,ve),u.createElement(de,y({},w,he))),u.createElement(P,y({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},w,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,y({},w,h),this.props.description))}}]),n}(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[p,b]=u.useState(n??null);u.useEffect(()=>{n!==p&&b(n??null)},[n]);const f=u.useCallback(v=>{const h=parseInt(v.target.value,10);b(h),r(h)},[r]),l=$e(),d=i.length>0,S=o.length>0,g=S?o:["No options to select."],P=e||!S,H=v=>v==""&&t&&d?"&nbsp;":v,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[R(Se,{label:s,disabled:P,labelVisibility:a,children:c&&R(Re,{children:R(Oe,{content:c,placement:_e.TOP_RIGHT})})}),R(pe,{onChange:f,value:p!==null?p.toString():void 0,disabled:P,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((v,h)=>ne(fe,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:m?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:m&&!P?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?x:I,width:m?x:I})},Label:{style:{color:P?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[R(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&R(oe,{source:H(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),s=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:a,options:c,captions:p,label:b,labelVisibility:f,help:l}=t;return R(it,{label:b,onChange:s,options:c,captions:p,disabled:e,horizontal:a,labelVisibility:Pe(f?.value),value:o??null,help:l})}function st(e,t){return e.getIntValue(t)}function lt(e){return e.default??null}function ut(e){return e.value??null}function ct(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt as default};
@@ -1 +1 @@
1
- import{s as p,r as s,z as S,C as y,j as i,D as v,aG as w,aT as r,F as h,B as m,aU as L,aV as R}from"./index.EAQB8Tuq.js";const B=p("button",{target:"ee3yv4c0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),C=p("div",{target:"ee3yv4c1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),k=p("div",{target:"ee3yv4c2"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function z(o){const a=m(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:a?o.colors.gray10:o.colors.gray90,color:o.colors.bodyText,boxShadow:a?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function E(o){if(o.length>104){let t=o.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return o}function D({body:o,icon:a}){const t=S(),n=E(o),d=o!==n,[e,x]=s.useState(!d),[u,b]=s.useState(0),f=s.useCallback(()=>{x(!e)},[e]),c=s.useMemo(()=>z(t),[t]),l=s.useMemo(()=>y(C,{expanded:e,children:[a&&i(v,{iconValue:a,size:"xl",testid:"stToastDynamicIcon"}),y(k,{children:[i(w,{source:e?o:n,allowHTML:!1,isToast:!0}),d&&i(B,{"data-testid":"stToastViewButton",onClick:f,children:e?"view less":"view more"})]})]}),[d,e,o,a,n,f]);s.useEffect(()=>{if(t.inSidebar)return;const g=r.info(l,{overrides:{...c}});return b(g),()=>{r.update(g,{overrides:{Body:{style:{display:"none"}}}}),r.clear(g)}},[]),s.useEffect(()=>{r.update(u,{children:l,overrides:{...c}})},[u,l,c]);const T=i(R,{kind:L.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information."});return i(h,{children:t.inSidebar&&T})}const I=s.memo(D);export{I as default};
1
+ import{s as p,r as s,z as S,C as y,j as i,D as v,aG as w,aT as r,F as h,B as m,aU as L,aV as R}from"./index.SCzIN5SB.js";const B=p("button",{target:"ee3yv4c0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),C=p("div",{target:"ee3yv4c1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),k=p("div",{target:"ee3yv4c2"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function z(o){const a=m(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:a?o.colors.gray10:o.colors.gray90,color:o.colors.bodyText,boxShadow:a?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function E(o){if(o.length>104){let t=o.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return o}function D({body:o,icon:a}){const t=S(),n=E(o),d=o!==n,[e,x]=s.useState(!d),[u,b]=s.useState(0),f=s.useCallback(()=>{x(!e)},[e]),c=s.useMemo(()=>z(t),[t]),l=s.useMemo(()=>y(C,{expanded:e,children:[a&&i(v,{iconValue:a,size:"xl",testid:"stToastDynamicIcon"}),y(k,{children:[i(w,{source:e?o:n,allowHTML:!1,isToast:!0}),d&&i(B,{"data-testid":"stToastViewButton",onClick:f,children:e?"view less":"view more"})]})]}),[d,e,o,a,n,f]);s.useEffect(()=>{if(t.inSidebar)return;const g=r.info(l,{overrides:{...c}});return b(g),()=>{r.update(g,{overrides:{Body:{style:{display:"none"}}}}),r.clear(g)}},[]),s.useEffect(()=>{r.update(u,{children:l,overrides:{...c}})},[u,l,c]);const T=i(R,{kind:L.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information."});return i(h,{children:t.inSidebar&&T})}const I=s.memo(D);export{I as default};
@@ -1 +1 @@
1
- import{s as a,r as e,C as t,j as r,aG as o}from"./index.EAQB8Tuq.js";import{P as i}from"./ProgressBar.DBmbQ5U6.js";const l=a("div",{target:"e1675qd10"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function d({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=e.memo(d);export{m as default};
1
+ import{s as a,r as e,C as t,j as r,aG as o}from"./index.SCzIN5SB.js";import{P as i}from"./ProgressBar.DH8nVA3A.js";const l=a("div",{target:"e1675qd10"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function d({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=e.memo(d);export{m as default};