streamlit-nightly 1.41.2.dev20250118__py2.py3-none-any.whl → 1.41.2.dev20250120__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. streamlit/config.py +14 -0
  2. streamlit/runtime/runtime.py +8 -3
  3. streamlit/static/index.html +1 -1
  4. streamlit/static/static/js/{FileDownload.esm.BUw5ikQY.js → FileDownload.esm.DW9qPsuf.js} +1 -1
  5. streamlit/static/static/js/{FormClearHelper.Bvmaiutv.js → FormClearHelper.BP4f-wKq.js} +1 -1
  6. streamlit/static/static/js/{Hooks.DcERo8tB.js → Hooks.DNhdjC_E.js} +1 -1
  7. streamlit/static/static/js/{InputInstructions.BupGmSrJ.js → InputInstructions.6chqAOMM.js} +1 -1
  8. streamlit/static/static/js/{ProgressBar.CTBNJVpb.js → ProgressBar.D-DmAAiN.js} +1 -1
  9. streamlit/static/static/js/{RenderInPortalIfExists.BhbPC-G8.js → RenderInPortalIfExists.cTCR1GXI.js} +1 -1
  10. streamlit/static/static/js/{Toolbar.Dw79Vekz.js → Toolbar.IB7xmaQ3.js} +1 -1
  11. streamlit/static/static/js/{base-input.BBtHVXa2.js → base-input.DIQMGXMv.js} +1 -1
  12. streamlit/static/static/js/{createSuper.BBR-BbJr.js → createSuper.Do1oR0VE.js} +1 -1
  13. streamlit/static/static/js/{data-grid-overlay-editor.DuZabixr.js → data-grid-overlay-editor.0VbWmjRF.js} +1 -1
  14. streamlit/static/static/js/{downloader.4xvEoIbd.js → downloader.DFiVHqec.js} +1 -1
  15. streamlit/static/static/js/{es6.DmlLpYMO.js → es6.zKs-XsJ1.js} +2 -2
  16. streamlit/static/static/js/{getPrototypeOf.M3x98UQ7.js → getPrototypeOf.B4u2uvgs.js} +1 -1
  17. streamlit/static/static/js/{iframeResizer.contentWindow.CgYHddZ1.js → iframeResizer.contentWindow.Cfik70yz.js} +1 -1
  18. streamlit/static/static/js/{index.AoUAN-9W.js → index.3XcxQYzA.js} +1 -1
  19. streamlit/static/static/js/{index.CC_t9mT8.js → index.5idohwqh.js} +1 -1
  20. streamlit/static/static/js/{index.27TXU2hu.js → index.9Tcn_7uz.js} +1 -1
  21. streamlit/static/static/js/{index.DZdyNQo1.js → index.B-nmc5wO.js} +1 -1
  22. streamlit/static/static/js/{index.C8nPrwl-.js → index.B94PZPeI.js} +1 -1
  23. streamlit/static/static/js/{index.tjVAqGRi.js → index.BBGa9-EC.js} +1 -1
  24. streamlit/static/static/js/{index.DvfPGXer.js → index.BCrCxn8x.js} +1 -1
  25. streamlit/static/static/js/{index.61noqmIB.js → index.BMaqPVq6.js} +1 -1
  26. streamlit/static/static/js/{index.DysCLUsb.js → index.BST23kXB.js} +1 -1
  27. streamlit/static/static/js/{index.CsdGlifB.js → index.BTG890If.js} +1 -1
  28. streamlit/static/static/js/{index.PWzpo-hC.js → index.BVS_Npso.js} +1 -1
  29. streamlit/static/static/js/{index.CeKudMLQ.js → index.Bht8Ku38.js} +1 -1
  30. streamlit/static/static/js/{index.DH9CvsgQ.js → index.BsLun9mO.js} +1 -1
  31. streamlit/static/static/js/{index.BtxHQDnZ.js → index.BuQ40cTc.js} +1 -1
  32. streamlit/static/static/js/{index.DqjAk5qg.js → index.C2x7lWrn.js} +1 -1
  33. streamlit/static/static/js/{index.CkCtIbw0.js → index.CAOOu98T.js} +1 -1
  34. streamlit/static/static/js/{index.C4Hwzvpq.js → index.CBzV6LFM.js} +1 -1
  35. streamlit/static/static/js/{index.DKi-ElEv.js → index.CEyo-K3a.js} +1 -1
  36. streamlit/static/static/js/{index.B1KjaM9R.js → index.CLEzQJ1l.js} +1 -1
  37. streamlit/static/static/js/{index.Bq6R9vFh.js → index.CRt7DW67.js} +1 -1
  38. streamlit/static/static/js/{index.Bu8uxdTh.js → index.CTVIegXx.js} +1 -1
  39. streamlit/static/static/js/{index.CrcobIb0.js → index.Ca6320CT.js} +5 -5
  40. streamlit/static/static/js/{index.g24MGpB6.js → index.Cf3IO5h3.js} +1 -1
  41. streamlit/static/static/js/{index.Dva5NuFG.js → index.Ci9WPusu.js} +1 -1
  42. streamlit/static/static/js/{index.WSrEkxsE.js → index.CkJysN98.js} +1 -1
  43. streamlit/static/static/js/{index.BXejhz8S.js → index.CkgGJqBi.js} +5 -5
  44. streamlit/static/static/js/{index.DeeIZCGU.js → index.D1gCIQ1C.js} +1 -1
  45. streamlit/static/static/js/{index.STXqYP7Q.js → index.DOO7x26L.js} +1 -1
  46. streamlit/static/static/js/{index.DcY4XgAF.js → index.DZ31yuLl.js} +1 -1
  47. streamlit/static/static/js/{index.C21AcM0r.js → index.DfqbHOMy.js} +1 -1
  48. streamlit/static/static/js/{index.BYyuymTq.js → index.DkCDzK1i.js} +1 -1
  49. streamlit/static/static/js/{index.CAZxiea2.js → index.DqoGamDV.js} +1 -1
  50. streamlit/static/static/js/{index.BaskQ92_.js → index.DrXNN7P-.js} +1 -1
  51. streamlit/static/static/js/{index.CjxOLcYo.js → index.DuwDNwdn.js} +1 -1
  52. streamlit/static/static/js/{index.rOJcC1R3.js → index.DwhO3jNA.js} +1 -1
  53. streamlit/static/static/js/{index.CuzQoPgT.js → index.IHJq2nuU.js} +1 -1
  54. streamlit/static/static/js/{index.C-0rgxAG.js → index.VSTrmYr_.js} +1 -1
  55. streamlit/static/static/js/{input.BIth4Mda.js → input.hHglMwJu.js} +1 -1
  56. streamlit/static/static/js/{memory.C0ticMnk.js → memory.BotKhGox.js} +1 -1
  57. streamlit/static/static/js/{mergeWith.CnJI40Ol.js → mergeWith.dOmek2Nz.js} +1 -1
  58. streamlit/static/static/js/{number-overlay-editor.B4oKK-_Y.js → number-overlay-editor.DIhHlsX3.js} +1 -1
  59. streamlit/static/static/js/{sandbox.D1ghBIHY.js → sandbox.BlY_yl1S.js} +1 -1
  60. streamlit/static/static/js/{slicedToArray.C1s2cVDA.js → slicedToArray.xYln54_I.js} +1 -1
  61. streamlit/static/static/js/{textarea.C1RJDJe0.js → textarea.B9cq_go8.js} +1 -1
  62. streamlit/static/static/js/{timepicker.CmttWl-Y.js → timepicker.R8Q_Yl7H.js} +1 -1
  63. streamlit/static/static/js/{uniqueId.BT1SAZF-.js → uniqueId.CKxaEvFc.js} +1 -1
  64. streamlit/static/static/js/{useBasicWidgetState.BB9oQkjJ.js → useBasicWidgetState.DY0Kwuur.js} +1 -1
  65. streamlit/static/static/js/{useOnInputChange.DldtvoCQ.js → useOnInputChange.CAEw-Xl5.js} +1 -1
  66. streamlit/static/static/js/{withFullScreenWrapper.CWPfcXAP.js → withFullScreenWrapper.Def4ZoAl.js} +1 -1
  67. {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/METADATA +1 -1
  68. {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/RECORD +72 -72
  69. {streamlit_nightly-1.41.2.dev20250118.data → streamlit_nightly-1.41.2.dev20250120.data}/scripts/streamlit.cmd +0 -0
  70. {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/WHEEL +0 -0
  71. {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/entry_points.txt +0 -0
  72. {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{n as R,r as a,ae as U,co as I,aB as k,j as u,bq as z,bD as B,br as D,ba as H,bs as L,cq as j}from"./index.CrcobIb0.js";import{u as q}from"./uniqueId.BT1SAZF-.js";import{u as O,a as _,b as K}from"./useOnInputChange.DldtvoCQ.js";import{a as A}from"./useBasicWidgetState.BB9oQkjJ.js";import{I as G}from"./InputInstructions.BupGmSrJ.js";import{I as N}from"./input.BIth4Mda.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.Bvmaiutv.js";import"./base-input.BBtHVXa2.js";const $=R("div",{target:"e1sommdr0"})(({width:e})=>({position:"relative",width:e}));function rt({disabled:e,element:t,widgetMgr:s,width:n,fragmentId:m}){var g;const[r,l]=a.useState(S(s,t)??null),[i,d]=a.useState(!1),W=a.useCallback(()=>{l(t.default??null),d(!0)},[t.default]),[y,p]=A({getStateFromWidgetMgr:S,getDefaultStateFromProto:w,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:s,fragmentId:m,onFormCleared:W});O(y,r,l,i);const[T,h]=a.useState(!1),o=U(),[b]=a.useState(()=>q("text_input_")),{placeholder:x,formId:f}=t,c=a.useCallback(()=>{d(!1),p({value:r,fromUi:!0})},[r,p]),C=I({formId:f})?s.allowFormEnterToSubmit(f):i,V=T&&n>o.breakpoints.hideWidgetDetails,F=a.useCallback(()=>{i&&c(),h(!1)},[i,c]),v=a.useCallback(()=>{h(!0)},[]),E=_({formId:t.formId,maxChars:t.maxChars,setDirty:d,setUiValue:l,setValueWithSource:p}),P=K(t.formId,c,i,s,m);return k($,{className:"stTextInput","data-testid":"stTextInput",width:n,children:[u(L,{label:t.label,disabled:e,labelVisibility:z((g=t.labelVisibility)==null?void 0:g.value),htmlFor:b,children:t.help&&u(B,{children:u(D,{content:t.help,placement:H.TOP_RIGHT})})}),u(N,{value:r??"",placeholder:x,onBlur:F,onFocus:v,onChange:E,onKeyPress:P,"aria-label":t.label,disabled:e,id:b,type:X(t),autoComplete:t.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth}}}}),V&&u(G,{dirty:i,value:r??"",maxLength:t.maxChars,inForm:I({formId:t.formId}),allowEnterToSubmit:C})]})}function S(e,t){return e.getStringValue(t)??null}function w(e){return e.default??null}function J(e){return e.value??null}function Q(e,t,s,n){t.setStringValue(e,s.value,{fromUi:s.fromUi},n)}function X(e){return e.type===j.Type.PASSWORD?"password":"text"}export{rt as default};
1
+ import{n as R,r as a,ae as U,co as I,aB as k,j as u,bq as z,bD as B,br as D,ba as H,bs as L,cq as j}from"./index.Ca6320CT.js";import{u as q}from"./uniqueId.CKxaEvFc.js";import{u as O,a as _,b as K}from"./useOnInputChange.CAEw-Xl5.js";import{a as A}from"./useBasicWidgetState.DY0Kwuur.js";import{I as G}from"./InputInstructions.6chqAOMM.js";import{I as N}from"./input.hHglMwJu.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.BP4f-wKq.js";import"./base-input.DIQMGXMv.js";const $=R("div",{target:"e1sommdr0"})(({width:e})=>({position:"relative",width:e}));function rt({disabled:e,element:t,widgetMgr:s,width:n,fragmentId:m}){var g;const[r,l]=a.useState(S(s,t)??null),[i,d]=a.useState(!1),W=a.useCallback(()=>{l(t.default??null),d(!0)},[t.default]),[y,p]=A({getStateFromWidgetMgr:S,getDefaultStateFromProto:w,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:s,fragmentId:m,onFormCleared:W});O(y,r,l,i);const[T,h]=a.useState(!1),o=U(),[b]=a.useState(()=>q("text_input_")),{placeholder:x,formId:f}=t,c=a.useCallback(()=>{d(!1),p({value:r,fromUi:!0})},[r,p]),C=I({formId:f})?s.allowFormEnterToSubmit(f):i,V=T&&n>o.breakpoints.hideWidgetDetails,F=a.useCallback(()=>{i&&c(),h(!1)},[i,c]),v=a.useCallback(()=>{h(!0)},[]),E=_({formId:t.formId,maxChars:t.maxChars,setDirty:d,setUiValue:l,setValueWithSource:p}),P=K(t.formId,c,i,s,m);return k($,{className:"stTextInput","data-testid":"stTextInput",width:n,children:[u(L,{label:t.label,disabled:e,labelVisibility:z((g=t.labelVisibility)==null?void 0:g.value),htmlFor:b,children:t.help&&u(B,{children:u(D,{content:t.help,placement:H.TOP_RIGHT})})}),u(N,{value:r??"",placeholder:x,onBlur:F,onFocus:v,onChange:E,onKeyPress:P,"aria-label":t.label,disabled:e,id:b,type:X(t),autoComplete:t.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth}}}}),V&&u(G,{dirty:i,value:r??"",maxLength:t.maxChars,inForm:I({formId:t.formId}),allowEnterToSubmit:C})]})}function S(e,t){return e.getStringValue(t)??null}function w(e){return e.default??null}function J(e){return e.value??null}function Q(e,t,s,n){t.setStringValue(e,s.value,{fromUi:s.fromUi},n)}function X(e){return e.type===j.Type.PASSWORD?"password":"text"}export{rt as default};
@@ -1,4 +1,4 @@
1
- import{r as c,E as ie,_ as oe,ch as Tt,ci as T,cj as R,ck as Rt,R as st,cl as f,n as m,aB as S,j as p,bn as M,bo as Z,b6 as Q,b5 as Lt,cm as Bt,cn as Vt,aY as Ht,F as Nt,at as Wt,bi as $t,aV as Xe,A as _,bk as Kt,bj as Xt,bq as Yt,bD as Gt,br as qt,ba as Jt,bs as Zt}from"./index.CrcobIb0.js";import{F as Qt}from"./FormClearHelper.Bvmaiutv.js";import{S as er,P as tr}from"./ProgressBar.CTBNJVpb.js";import{u as rr}from"./Hooks.DcERo8tB.js";import{U as q}from"./UploadFileInfo.C-jY39rj.js";var ct=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});ct.displayName="Clear";var ut=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});ut.displayName="CloudUpload";var pt=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});pt.displayName="Error";var dt=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))});dt.displayName="InsertDriveFile";var P;(function(e){e.Gigabyte="gb",e.Megabyte="mb",e.Kilobyte="kb",e.Byte="b"})(P||(P={}));const Se=Tt()?1024:1e3,ee=["gb","mb","kb","b"],ae=(e,r,t=1)=>{if(r||(r="b"),t<0&&(t=0),e<0)throw new Error("Size must be greater than or equal to 0");const n=ee.indexOf(r),i=e/Se;return n&&e>Se/2?ae(i,ee[n-1],t):`${e.toFixed(t)}${r.toUpperCase()}`},nr=(e,r,t)=>{if(e<0)throw Error("Size must be 0 or greater");const n=ee.findIndex(s=>s===r),i=ee.findIndex(s=>s===t);if(n===-1||i===-1)throw Error("Unexpected byte unit provided");if(n===i)return e;const o=Math.abs(n-i),l=Se**o;return n>i?e/l:e*l};var ir=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function V(e,r){var t=or(e);if(typeof t.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(t,"path",{value:typeof r=="string"?r:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}function or(e){var r=e.name,t=r&&r.lastIndexOf(".")!==-1;if(t&&!e.type){var n=r.split(".").pop().toLowerCase(),i=ir.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var ar=[".DS_Store","Thumbs.db"];function lr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return te(e)&&sr(e)?[2,dr(e.dataTransfer,e.type)]:cr(e)?[2,ur(e)]:Array.isArray(e)&&e.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,pr(e)]:[2,[]]})})}function sr(e){return te(e.dataTransfer)}function cr(e){return te(e)&&te(e.target)}function te(e){return typeof e=="object"&&e!==null}function ur(e){return Ee(e.target.files).map(function(r){return V(r)})}function pr(e){return T(this,void 0,void 0,function(){var r;return R(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return r=t.sent(),[2,r.map(function(n){return V(n)})]}})})}function dr(e,r){return T(this,void 0,void 0,function(){var t,n;return R(this,function(i){switch(i.label){case 0:return e===null?[2,[]]:e.items?(t=Ee(e.items).filter(function(o){return o.kind==="file"}),r!=="drop"?[2,t]:[4,Promise.all(t.map(fr))]):[3,2];case 1:return n=i.sent(),[2,Ye(ft(n))];case 2:return[2,Ye(Ee(e.files).map(function(o){return V(o)}))]}})})}function Ye(e){return e.filter(function(r){return ar.indexOf(r.name)===-1})}function Ee(e){if(e===null)return[];for(var r=[],t=0;t<e.length;t++){var n=e[t];r.push(n)}return r}function fr(e){if(typeof e.webkitGetAsEntry!="function")return Ge(e);var r=e.webkitGetAsEntry();return r&&r.isDirectory?gt(r):Ge(e)}function ft(e){return e.reduce(function(r,t){return Rt(r,Array.isArray(t)?ft(t):[t])},[])}function Ge(e){var r=e.getAsFile();if(!r)return Promise.reject(e+" is not a File");var t=V(r);return Promise.resolve(t)}function gr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return[2,e.isDirectory?gt(e):mr(e)]})})}function gt(e){var r=e.createReader();return new Promise(function(t,n){var i=[];function o(){var l=this;r.readEntries(function(s){return T(l,void 0,void 0,function(){var d,w,v;return R(this,function(y){switch(y.label){case 0:if(s.length)return[3,5];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return d=y.sent(),t(d),[3,4];case 3:return w=y.sent(),n(w),[3,4];case 4:return[3,6];case 5:v=Promise.all(s.map(gr)),i.push(v),o(),y.label=6;case 6:return[2]}})})},function(s){n(s)})}o()})}function mr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return[2,new Promise(function(t,n){e.file(function(i){var o=V(i,e.fullPath);t(o)},function(i){n(i)})})]})})}var hr=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return t.some(function(l){var s=l.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function Je(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(t),!0).forEach(function(n){mt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ze(e,r){return Fr(e)||br(e,r)||yr(e,r)||vr()}function vr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as c,E as ie,_ as oe,ch as Tt,ci as T,cj as R,ck as Rt,R as st,cl as f,n as m,aB as S,j as p,bn as M,bo as Z,b6 as Q,b5 as Lt,cm as Bt,cn as Vt,aY as Ht,F as Nt,at as Wt,bi as $t,aV as Xe,A as _,bk as Kt,bj as Xt,bq as Yt,bD as Gt,br as qt,ba as Jt,bs as Zt}from"./index.Ca6320CT.js";import{F as Qt}from"./FormClearHelper.BP4f-wKq.js";import{S as er,P as tr}from"./ProgressBar.D-DmAAiN.js";import{u as rr}from"./Hooks.DNhdjC_E.js";import{U as q}from"./UploadFileInfo.C-jY39rj.js";var ct=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});ct.displayName="Clear";var ut=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});ut.displayName="CloudUpload";var pt=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});pt.displayName="Error";var dt=c.forwardRef(function(e,r){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(ie,oe({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))});dt.displayName="InsertDriveFile";var P;(function(e){e.Gigabyte="gb",e.Megabyte="mb",e.Kilobyte="kb",e.Byte="b"})(P||(P={}));const Se=Tt()?1024:1e3,ee=["gb","mb","kb","b"],ae=(e,r,t=1)=>{if(r||(r="b"),t<0&&(t=0),e<0)throw new Error("Size must be greater than or equal to 0");const n=ee.indexOf(r),i=e/Se;return n&&e>Se/2?ae(i,ee[n-1],t):`${e.toFixed(t)}${r.toUpperCase()}`},nr=(e,r,t)=>{if(e<0)throw Error("Size must be 0 or greater");const n=ee.findIndex(s=>s===r),i=ee.findIndex(s=>s===t);if(n===-1||i===-1)throw Error("Unexpected byte unit provided");if(n===i)return e;const o=Math.abs(n-i),l=Se**o;return n>i?e/l:e*l};var ir=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function V(e,r){var t=or(e);if(typeof t.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(t,"path",{value:typeof r=="string"?r:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}function or(e){var r=e.name,t=r&&r.lastIndexOf(".")!==-1;if(t&&!e.type){var n=r.split(".").pop().toLowerCase(),i=ir.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var ar=[".DS_Store","Thumbs.db"];function lr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return te(e)&&sr(e)?[2,dr(e.dataTransfer,e.type)]:cr(e)?[2,ur(e)]:Array.isArray(e)&&e.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,pr(e)]:[2,[]]})})}function sr(e){return te(e.dataTransfer)}function cr(e){return te(e)&&te(e.target)}function te(e){return typeof e=="object"&&e!==null}function ur(e){return Ee(e.target.files).map(function(r){return V(r)})}function pr(e){return T(this,void 0,void 0,function(){var r;return R(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return r=t.sent(),[2,r.map(function(n){return V(n)})]}})})}function dr(e,r){return T(this,void 0,void 0,function(){var t,n;return R(this,function(i){switch(i.label){case 0:return e===null?[2,[]]:e.items?(t=Ee(e.items).filter(function(o){return o.kind==="file"}),r!=="drop"?[2,t]:[4,Promise.all(t.map(fr))]):[3,2];case 1:return n=i.sent(),[2,Ye(ft(n))];case 2:return[2,Ye(Ee(e.files).map(function(o){return V(o)}))]}})})}function Ye(e){return e.filter(function(r){return ar.indexOf(r.name)===-1})}function Ee(e){if(e===null)return[];for(var r=[],t=0;t<e.length;t++){var n=e[t];r.push(n)}return r}function fr(e){if(typeof e.webkitGetAsEntry!="function")return Ge(e);var r=e.webkitGetAsEntry();return r&&r.isDirectory?gt(r):Ge(e)}function ft(e){return e.reduce(function(r,t){return Rt(r,Array.isArray(t)?ft(t):[t])},[])}function Ge(e){var r=e.getAsFile();if(!r)return Promise.reject(e+" is not a File");var t=V(r);return Promise.resolve(t)}function gr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return[2,e.isDirectory?gt(e):mr(e)]})})}function gt(e){var r=e.createReader();return new Promise(function(t,n){var i=[];function o(){var l=this;r.readEntries(function(s){return T(l,void 0,void 0,function(){var d,w,v;return R(this,function(y){switch(y.label){case 0:if(s.length)return[3,5];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return d=y.sent(),t(d),[3,4];case 3:return w=y.sent(),n(w),[3,4];case 4:return[3,6];case 5:v=Promise.all(s.map(gr)),i.push(v),o(),y.label=6;case 6:return[2]}})})},function(s){n(s)})}o()})}function mr(e){return T(this,void 0,void 0,function(){return R(this,function(r){return[2,new Promise(function(t,n){e.file(function(i){var o=V(i,e.fullPath);t(o)},function(i){n(i)})})]})})}var hr=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return t.some(function(l){var s=l.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function Je(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(t),!0).forEach(function(n){mt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ze(e,r){return Fr(e)||br(e,r)||yr(e,r)||vr()}function vr(){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 yr(e,r){if(e){if(typeof e=="string")return Qe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Qe(e,r)}}function Qe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function br(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],i=!0,o=!1,l,s;try{for(t=t.call(e);!(i=(l=t.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(d){o=!0,s=d}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}return n}}function Fr(e){if(Array.isArray(e))return e}var wr="file-invalid-type",Dr="file-too-large",xr="file-too-small",Sr="too-many-files",Er=function(r){r=Array.isArray(r)&&r.length===1?r[0]:r;var t=Array.isArray(r)?"one of ".concat(r.join(", ")):r;return{code:wr,message:"File type must be ".concat(t)}},et=function(r){return{code:Dr,message:"File is larger than ".concat(r," ").concat(r===1?"byte":"bytes")}},tt=function(r){return{code:xr,message:"File is smaller than ".concat(r," ").concat(r===1?"byte":"bytes")}},Ar={code:Sr,message:"Too many files"};function ht(e,r){var t=e.type==="application/x-moz-file"||hr(e,r);return[t,t?null:Er(r)]}function vt(e,r,t){if(B(e.size))if(B(r)&&B(t)){if(e.size>t)return[!1,et(t)];if(e.size<r)return[!1,tt(r)]}else{if(B(r)&&e.size<r)return[!1,tt(r)];if(B(t)&&e.size>t)return[!1,et(t)]}return[!0,null]}function B(e){return e!=null}function Or(e){var r=e.files,t=e.accept,n=e.minSize,i=e.maxSize,o=e.multiple,l=e.maxFiles;return!o&&r.length>1||o&&l>=1&&r.length>l?!1:r.every(function(s){var d=ht(s,t),w=Ze(d,1),v=w[0],y=vt(s,n,i),O=Ze(y,1),I=O[0];return v&&I})}function re(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function J(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(r){return r==="Files"||r==="application/x-moz-file"}):!!e.target&&!!e.target.files}function rt(e){e.preventDefault()}function Ir(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Cr(e){return e.indexOf("Edge/")!==-1}function Pr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ir(e)||Cr(e)}function A(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),l=1;l<i;l++)o[l-1]=arguments[l];return r.some(function(s){return!re(n)&&s&&s.apply(void 0,[n].concat(o)),re(n)})}}function zr(){return"showOpenFilePicker"in window}function kr(e){return e=typeof e=="string"?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter(function(r){return r==="audio/*"||r==="video/*"||r==="image/*"||r==="text/*"||/\w+\/[-+.\w]+/g.test(r)}).reduce(function(r,t){return Je(Je({},r),{},mt({},t,[]))},{}):{}}]}function Ur(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function jr(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}var _r=["children"],Mr=["open"],Tr=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Rr=["refKey","onChange","onClick"];function Lr(e){return Hr(e)||Vr(e)||yt(e)||Br()}function Br(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vr(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hr(e){if(Array.isArray(e))return Ae(e)}function xe(e,r){return $r(e)||Wr(e,r)||yt(e,r)||Nr()}function Nr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yt(e,r){if(e){if(typeof e=="string")return Ae(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ae(e,r)}}function Ae(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Wr(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],i=!0,o=!1,l,s;try{for(t=t.call(e);!(i=(l=t.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(d){o=!0,s=d}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}return n}}function $r(e){if(Array.isArray(e))return e}function nt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function g(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?nt(Object(t),!0).forEach(function(n){Oe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Oe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ne(e,r){if(e==null)return{};var t=Kr(e,r),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}function Kr(e,r){if(e==null)return{};var t={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(r.indexOf(i)>=0)&&(t[i]=e[i]);return t}var le=c.forwardRef(function(e,r){var t=e.children,n=ne(e,_r),i=Xr(n),o=i.open,l=ne(i,Mr);return c.useImperativeHandle(r,function(){return{open:o}},[o]),st.createElement(c.Fragment,null,t(g(g({},l),{},{open:o})))});le.displayName="Dropzone";var bt={disabled:!1,getFilesFromEvent:lr,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};le.defaultProps=bt;le.propTypes={children:f.func,accept:f.oneOfType([f.string,f.arrayOf(f.string)]),multiple:f.bool,preventDropOnDocument:f.bool,noClick:f.bool,noKeyboard:f.bool,noDrag:f.bool,noDragEventsBubbling:f.bool,minSize:f.number,maxSize:f.number,maxFiles:f.number,disabled:f.bool,getFilesFromEvent:f.func,onFileDialogCancel:f.func,onFileDialogOpen:f.func,useFsAccessApi:f.bool,onDragEnter:f.func,onDragLeave:f.func,onDragOver:f.func,onDrop:f.func,onDropAccepted:f.func,onDropRejected:f.func,validator:f.func};var Ie={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Xr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=g(g({},bt),e),t=r.accept,n=r.disabled,i=r.getFilesFromEvent,o=r.maxSize,l=r.minSize,s=r.multiple,d=r.maxFiles,w=r.onDragEnter,v=r.onDragLeave,y=r.onDragOver,O=r.onDrop,I=r.onDropAccepted,se=r.onDropRejected,ce=r.onFileDialogCancel,ue=r.onFileDialogOpen,Pe=r.useFsAccessApi,pe=r.preventDropOnDocument,ze=r.noClick,de=r.noKeyboard,ke=r.noDrag,C=r.noDragEventsBubbling,fe=r.validator,ge=c.useMemo(function(){return typeof ue=="function"?ue:it},[ue]),H=c.useMemo(function(){return typeof ce=="function"?ce:it},[ce]),D=c.useRef(null),x=c.useRef(null),Pt=c.useReducer(Yr,Ie),Ue=xe(Pt,2),N=Ue[0],F=Ue[1],zt=N.isFocused,je=N.isFileDialogActive,_e=N.draggedFiles,W=c.useRef(typeof window<"u"&&window.isSecureContext&&Pe&&zr()),Me=function(){!W.current&&je&&setTimeout(function(){if(x.current){var u=x.current.files;u.length||(F({type:"closeDialog"}),H())}},300)};c.useEffect(function(){return window.addEventListener("focus",Me,!1),function(){window.removeEventListener("focus",Me,!1)}},[x,je,H,W]);var z=c.useRef([]),Te=function(u){D.current&&D.current.contains(u.target)||(u.preventDefault(),z.current=[])};c.useEffect(function(){return pe&&(document.addEventListener("dragover",rt,!1),document.addEventListener("drop",Te,!1)),function(){pe&&(document.removeEventListener("dragover",rt),document.removeEventListener("drop",Te))}},[D,pe]);var Re=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),z.current=[].concat(Lr(z.current),[a.target]),J(a)&&Promise.resolve(i(a)).then(function(u){re(a)&&!C||(F({draggedFiles:u,isDragActive:!0,type:"setDraggedFiles"}),w&&w(a))})},[i,w,C]),Le=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a);var u=J(a);if(u&&a.dataTransfer)try{a.dataTransfer.dropEffect="copy"}catch{}return u&&y&&y(a),!1},[y,C]),Be=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a);var u=z.current.filter(function(b){return D.current&&D.current.contains(b)}),h=u.indexOf(a.target);h!==-1&&u.splice(h,1),z.current=u,!(u.length>0)&&(F({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),J(a)&&v&&v(a))},[D,v,C]),$=c.useCallback(function(a,u){var h=[],b=[];a.forEach(function(E){var L=ht(E,t),j=xe(L,2),he=j[0],ve=j[1],ye=vt(E,l,o),G=xe(ye,2),be=G[0],Fe=G[1],we=fe?fe(E):null;if(he&&be&&!we)h.push(E);else{var De=[ve,Fe];we&&(De=De.concat(we)),b.push({file:E,errors:De.filter(function(Mt){return Mt})})}}),(!s&&h.length>1||s&&d>=1&&h.length>d)&&(h.forEach(function(E){b.push({file:E,errors:[Ar]})}),h.splice(0)),F({acceptedFiles:h,fileRejections:b,type:"setFiles"}),O&&O(h,b,u),b.length>0&&se&&se(b,u),h.length>0&&I&&I(h,u)},[F,s,t,l,o,d,O,I,se,fe]),K=c.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),z.current=[],J(a)&&Promise.resolve(i(a)).then(function(u){re(a)&&!C||$(u,a)}),F({type:"reset"})},[i,$,C]),k=c.useCallback(function(){if(W.current){F({type:"openDialog"}),ge();var a={multiple:s,types:kr(t)};window.showOpenFilePicker(a).then(function(u){return i(u)}).then(function(u){$(u,null),F({type:"closeDialog"})}).catch(function(u){Ur(u)?(H(u),F({type:"closeDialog"})):jr(u)&&(W.current=!1,x.current&&(x.current.value=null,x.current.click()))});return}x.current&&(F({type:"openDialog"}),ge(),x.current.value=null,x.current.click())},[F,ge,H,Pe,$,t,s]),Ve=c.useCallback(function(a){!D.current||!D.current.isEqualNode(a.target)||(a.key===" "||a.key==="Enter"||a.keyCode===32||a.keyCode===13)&&(a.preventDefault(),k())},[D,k]),He=c.useCallback(function(){F({type:"focus"})},[]),Ne=c.useCallback(function(){F({type:"blur"})},[]),We=c.useCallback(function(){ze||(Pr()?setTimeout(k,0):k())},[ze,k]),U=function(u){return n?null:u},me=function(u){return de?null:U(u)},X=function(u){return ke?null:U(u)},Y=function(u){C&&u.stopPropagation()},kt=c.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.refKey,h=u===void 0?"ref":u,b=a.role,E=a.onKeyDown,L=a.onFocus,j=a.onBlur,he=a.onClick,ve=a.onDragEnter,ye=a.onDragOver,G=a.onDragLeave,be=a.onDrop,Fe=ne(a,Tr);return g(g(Oe({onKeyDown:me(A(E,Ve)),onFocus:me(A(L,He)),onBlur:me(A(j,Ne)),onClick:U(A(he,We)),onDragEnter:X(A(ve,Re)),onDragOver:X(A(ye,Le)),onDragLeave:X(A(G,Be)),onDrop:X(A(be,K)),role:typeof b=="string"&&b!==""?b:"button"},h,D),!n&&!de?{tabIndex:0}:{}),Fe)}},[D,Ve,He,Ne,We,Re,Le,Be,K,de,ke,n]),Ut=c.useCallback(function(a){a.stopPropagation()},[]),jt=c.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.refKey,h=u===void 0?"ref":u,b=a.onChange,E=a.onClick,L=ne(a,Rr),j=Oe({accept:t,multiple:s,type:"file",style:{display:"none"},onChange:U(A(b,K)),onClick:U(A(E,Ut)),tabIndex:-1},h,x);return g(g({},j),L)}},[x,t,s,K,n]),$e=_e.length,Ke=$e>0&&Or({files:_e,accept:t,minSize:l,maxSize:o,multiple:s,maxFiles:d}),_t=$e>0&&!Ke;return g(g({},N),{},{isDragAccept:Ke,isDragReject:_t,isFocused:zt&&!n,getRootProps:kt,getInputProps:jt,rootRef:D,inputRef:x,open:U(k)})}function Yr(e,r){switch(r.type){case"focus":return g(g({},e),{},{isFocused:!0});case"blur":return g(g({},e),{},{isFocused:!1});case"openDialog":return g(g({},Ie),{},{isFileDialogActive:!0});case"closeDialog":return g(g({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=r.isDragActive,n=r.draggedFiles;return g(g({},e),{},{draggedFiles:n,isDragActive:t});case"setFiles":return g(g({},e),{},{acceptedFiles:r.acceptedFiles,fileRejections:r.fileRejections});case"reset":return g({},Ie);default:return e}}function it(){}const Ft=m("section",{target:"e1orukol0"})(({isDisabled:e,theme:r})=>({display:"flex",alignItems:"center",padding:r.spacing.lg,backgroundColor:r.colors.secondaryBg,borderRadius:r.radii.default,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${r.colors.primary}`},color:e?r.colors.gray:r.colors.bodyText})),wt=m("div",{target:"e1orukol1"})({marginRight:"auto",alignItems:"center",display:"flex"}),Dt=m("span",{target:"e1orukol2"})(({theme:e})=>({color:e.colors.darkenedBgMix100,marginRight:e.spacing.lg})),Gr=m("span",{target:"e1orukol3"})(({theme:e})=>({marginBottom:e.spacing.twoXS})),qr=m("div",{target:"e1orukol4"})({display:"flex",flexDirection:"column"}),xt=m("div",{target:"e1orukol5"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),Jr=m("ul",{target:"e1orukol6"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),St=m("li",{target:"e1orukol7"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),Et=m("div",{target:"e1orukol8"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),At=m("div",{target:"e1orukol9"})(({theme:e})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Ot=m("div",{target:"e1orukol10"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),Zr=m("span",{target:"e1orukol11"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Qr=m("div",{target:"e1orukol12"})(({theme:e})=>({display:"flex",padding:e.spacing.twoXS,color:e.colors.darkenedBgMix100})),It=m("small",{target:"e1orukol13"})(({theme:e})=>({color:e.colors.danger,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),Ct=m("span",{target:"e1orukol14"})({}),ot=e=>({[Ft]:{display:"flex",flexDirection:"column",alignItems:"flex-start"},[wt]:{marginBottom:e.spacing.lg},[Dt]:{display:"none"},[xt]:{paddingRight:e.spacing.lg},[Ot]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[At]:{width:e.sizes.full},[Et]:{flexDirection:"column"},[It]:{height:"auto",whiteSpace:"initial"},[Ct]:{display:"none"},[St]:{margin:e.spacing.none,padding:e.spacing.none}}),en=m("div",{target:"e1orukol15"})(({theme:e})=>e.inSidebar?ot(e):{[`@media (max-width: ${e.breakpoints.sm})`]:ot(e)});var at;(function(e){e.DANGER="danger"})(at||(at={}));const Ce=m("small",{target:"ejh2rmr0"})(({kind:e,theme:r})=>{const{danger:t,fadedText60:n}=r.colors;return{color:e==="danger"?t:n,fontSize:r.fontSizes.sm,lineHeight:r.lineHeights.tight}}),tn=({multiple:e,acceptedExtensions:r,maxSizeBytes:t})=>S(wt,{"data-testid":"stFileUploaderDropzoneInstructions",children:[p(Dt,{children:p(M,{content:ut,size:"threeXL"})}),S(qr,{children:[S(Gr,{children:["Drag and drop file",e?"s":""," here"]}),S(Ce,{children:[`Limit ${ae(t,P.Byte,0)} per file`,r.length?` • ${r.map(n=>n.replace(/^\./,"").toUpperCase()).join(", ")}`:null]})]})]}),rn=({onDrop:e,multiple:r,acceptedExtensions:t,maxSizeBytes:n,disabled:i,label:o})=>p(le,{onDrop:e,multiple:r,accept:t.length?t:void 0,maxSize:n,disabled:i,useFsAccessApi:!1,children:({getRootProps:l,getInputProps:s})=>S(Ft,{...l(),"data-testid":"stFileUploaderDropzone",isDisabled:i,"aria-label":o,children:[p("input",{"data-testid":"stFileUploaderDropzoneInput",...s()}),p(tn,{multiple:r,acceptedExtensions:t,maxSizeBytes:n}),p(Z,{kind:Q.SECONDARY,disabled:i,size:Lt.SMALL,children:"Browse files"})]})}),nn=m("div",{target:"egc9vxm0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),on=m("div",{target:"egc9vxm1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),an=({currentPage:e,totalPages:r,onNext:t,onPrevious:n})=>S(nn,{"data-testid":"stFileUploaderPagination",children:[p(Ce,{children:`Showing page ${e} of ${r}`}),S(on,{children:[p(Z,{onClick:n,kind:Q.MINIMAL,children:p(M,{content:Bt,size:"xl"})}),p(Z,{onClick:t,kind:Q.MINIMAL,children:p(M,{content:Vt,size:"xl"})})]})]}),lt=(e,r)=>Math.ceil(e.length/r),ln=e=>Ht(({pageSize:t,items:n,resetOnAdd:i,...o})=>{const[l,s]=c.useState(0),[d,w]=c.useState(lt(n,t)),v=rr(n);c.useEffect(()=>{v&&v.length!==n.length&&w(lt(n,t)),v&&v.length<n.length?i&&s(0):l+1>=d&&s(d-1)},[n,l,t,v,i,d]);const y=()=>{s(Math.min(l+1,d-1))},O=()=>{s(Math.max(0,l-1))},I=n.slice(l*t,l*t+t);return S(Nt,{children:[p(e,{items:I,...o}),n.length>t?p(an,{pageSize:t,totalPages:d,currentPage:l+1,onNext:y,onPrevious:O}):null]})},e),sn=({fileInfo:e})=>e.status.type==="uploading"?p(tr,{value:e.status.progress,size:er.SMALL}):e.status.type==="error"?S(It,{children:[p(Zr,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),p(Ct,{children:p(M,{content:pt,size:"lg"})})]}):e.status.type==="uploaded"?p(Ce,{children:ae(e.size,P.Byte)}):null,cn=({fileInfo:e,onDelete:r})=>S(Ot,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[p(Qr,{children:p(M,{content:dt,size:"twoXL"})}),S(Et,{className:"stFileUploaderFileData",children:[p(At,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,children:e.name}),p(sn,{fileInfo:e})]}),p("div",{"data-testid":"stFileUploaderDeleteBtn",children:p(Z,{onClick:()=>r(e.id),kind:Q.MINIMAL,children:p(M,{content:ct,size:"lg"})})})]}),un=({items:e,onDelete:r})=>p(Jr,{children:e.map(t=>p(St,{children:p(cn,{fileInfo:t,onDelete:r})},t.id))}),pn=ln(un),dn=e=>p(xt,{children:p(pn,{...e})});class yn extends st.PureComponent{constructor(r){super(r),this.formClearHelper=new Qt,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:n,widgetMgr:i,fragmentId:o}=this.props,l=i.getFileUploaderStateValue(n);Wt(t,l)||i.setFileUploaderStateValue(n,t,{fromUi:!0},o)},this.reset=()=>{this.setState({files:[]})},this.dropHandler=(t,n)=>{const{element:i}=this.props,{multipleFiles:o}=i;if(!o&&t.length===0&&n.length>1){const l=n.findIndex(s=>s.errors.length===1&&s.errors[0].code==="too-many-files");l>=0&&(t.push(n[l].file),n.splice(l,1))}if(this.props.uploadClient.fetchFileURLs(t).then(l=>{if(!o&&t.length>0){const s=this.state.files.find(d=>d.status.type!=="error");s&&(this.forceUpdatingStatus=!0,this.deleteFile(s.id),this.forceUpdatingStatus=!1)}$t(l,t).forEach(([s,d])=>{this.uploadFile(s,d)})}).catch(l=>{this.addFiles(t.map(s=>new q(s.name,s.size,this.nextLocalFileId(),{type:"error",errorMessage:l})))}),n.length>0){const l=n.map(s=>{const{file:d}=s;return new q(d.name,d.size,this.nextLocalFileId(),{type:"error",errorMessage:this.getErrorMessage(s.errors[0].code,s.file)})});this.addFiles(l)}},this.uploadFile=(t,n)=>{const i=Xe.CancelToken.source(),o=new q(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:i,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,n,l=>this.onUploadProgress(l,o.id),i.token).then(()=>this.onUploadComplete(o.id,t)).catch(l=>{Xe.isCancel(l)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:l?l.toString():"Unknown error"}))})},this.onUploadComplete=(t,n)=>{const i=this.getFile(t);_(i)||i.status.type!=="uploading"||this.updateFile(i.id,i.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.getErrorMessage=(t,n)=>{switch(t){case"file-too-large":return`File must be ${ae(this.maxUploadSizeInBytes,P.Byte)} or smaller.`;case"file-invalid-type":return`${n.type} files are not allowed.`;case"file-too-small":return"File size is too small.";case"too-many-files":return"Only one file is allowed.";default:return"Unexpected error. Please try again."}},this.deleteFile=t=>{const n=this.getFile(t);_(n)||(n.status.type==="uploading"&&n.status.cancelToken.cancel(),n.status.type==="uploaded"&&n.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(n.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{this.setState(n=>({files:[...n.files,t]}))},this.addFiles=t=>{this.setState(n=>({files:[...n.files,...t]}))},this.removeFile=t=>{this.setState(n=>({files:n.files.filter(i=>i.id!==t)}))},this.getFile=t=>this.state.files.find(n=>n.id===t),this.updateFile=(t,n)=>{this.setState(i=>({files:i.files.map(o=>o.id===t?n:o)}))},this.onUploadProgress=(t,n)=>{const i=this.getFile(n);if(_(i)||i.status.type!=="uploading")return;const o=Math.round(t.loaded*100/t.total);i.status.progress!==o&&this.updateFile(n,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:o}))},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(_(t))return;const{widgetMgr:n,element:i,fragmentId:o}=this.props;n.setFileUploaderStateValue(i,t,{fromUi:!0},o)})},this.state=this.initialValue}get initialValue(){const r={files:[],newestServerFileId:0},{widgetMgr:t,element:n}=this.props,i=t.getFileUploaderStateValue(n);if(_(i))return r;const{uploadedFileInfo:o}=i;return _(o)||o.length===0?r:{files:o.map(l=>{const s=l.name,d=l.size,w=l.fileId,v=l.fileUrls;return new q(s,d,this.nextLocalFileId(),{type:"uploaded",fileId:w,fileUrls:v})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const r=this.props.element.maxUploadSizeMb;return nr(r,P.Megabyte,P.Byte)}get status(){const r=t=>t.status.type==="uploading";return this.state.files.some(r)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const r=this.createWidgetValue(),{element:t,widgetMgr:n,fragmentId:i}=this.props;n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,r,{fromUi:!1},i)}createWidgetValue(){const r=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:n,size:i,status:o}=t,{fileId:l,fileUrls:s}=o;return new Kt({fileId:l,fileUrls:s,name:n,size:i})});return new Xt({uploadedFileInfo:r})}render(){var s;const{files:r}=this.state,{element:t,disabled:n,widgetMgr:i}=this.props,o=t.type;this.formClearHelper.manageFormClearListener(i,t.formId,this.onFormCleared);const l=r.slice().reverse();return S(en,{className:"stFileUploader","data-testid":"stFileUploader",children:[p(Zt,{label:t.label,disabled:n,labelVisibility:Yt((s=t.labelVisibility)==null?void 0:s.value),children:t.help&&p(Gt,{children:p(qt,{content:t.help,placement:Jt.TOP_RIGHT})})}),p(rn,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:o,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:n}),l.length>0&&p(dn,{items:l,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0})]})}nextLocalFileId(){return this.localFileIdCounter++}}export{yn as default};
@@ -1,4 +1,4 @@
1
- import{bu as x,r as g,bE as ae,bF as T,bG as w,ae as le,ay as ce,j as S,bH as se,ao as ue,aB as de,bq as fe,av as ge,bz as he,br as be,ba as me,bI as ve,bJ as pe}from"./index.CrcobIb0.js";import{a as $e}from"./useBasicWidgetState.BB9oQkjJ.js";import"./FormClearHelper.Bvmaiutv.js";var F=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ye=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ke(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function we(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function xe(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=x("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=x("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,y=encodeURIComponent(`
1
+ import{bu as x,r as g,bE as ae,bF as T,bG as w,ae as le,ay as ce,j as S,bH as se,ao as ue,aB as de,bq as fe,av as ge,bz as he,br as be,ba as me,bI as ve,bJ as pe}from"./index.Ca6320CT.js";import{a as $e}from"./useBasicWidgetState.DY0Kwuur.js";import"./FormClearHelper.BP4f-wKq.js";var F=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ye=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ke(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function we(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function xe(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=x("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=x("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,y=encodeURIComponent(`
2
2
  <svg width="14" height="4" viewBox="0 0 14 4" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M14 0.5H0V3.5H14V0.5Z" fill="`.concat(s,`"/>
4
4
  </svg>
@@ -1 +1 @@
1
- import{b6 as a,j as e,b7 as c,bo as B,b5 as f,b8 as h}from"./index.CrcobIb0.js";function p(s){const{disabled:l,element:t,widgetMgr:o,width:n,fragmentId:r}=s,d={width:n};let i=a.SECONDARY;t.type==="primary"?i=a.PRIMARY:t.type==="tertiary"&&(i=a.TERTIARY);const u=t.help?n:!0;return e("div",{className:"stButton","data-testid":"stButton",style:d,children:e(c,{help:t.help,children:e(B,{kind:i,size:f.SMALL,disabled:l,fluidWidth:t.useContainerWidth?u:!1,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(h,{icon:t.icon,label:t.label})})})})}export{p as default};
1
+ import{b6 as a,j as e,b7 as c,bo as B,b5 as f,b8 as h}from"./index.Ca6320CT.js";function p(s){const{disabled:l,element:t,widgetMgr:o,width:n,fragmentId:r}=s,d={width:n};let i=a.SECONDARY;t.type==="primary"?i=a.PRIMARY:t.type==="tertiary"&&(i=a.TERTIARY);const u=t.help?n:!0;return e("div",{className:"stButton","data-testid":"stButton",style:d,children:e(c,{help:t.help,children:e(B,{kind:i,size:f.SMALL,disabled:l,fluidWidth:t.useContainerWidth?u:!1,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(h,{icon:t.icon,label:t.label})})})})}export{p as default};
@@ -1,4 +1,4 @@
1
- import{n as i,k as m,r as c,j as e}from"./index.CrcobIb0.js";import{P as l,R as p}from"./RenderInPortalIfExists.BhbPC-G8.js";const d=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,f=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,S=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,r=150,g=10,E=90,u=4e3,n=(t,a=0)=>Math.random()*(t-a)+a,w=()=>m(`from{transform:translateY(0)
1
+ import{n as i,k as m,r as c,j as e}from"./index.Ca6320CT.js";import{P as l,R as p}from"./RenderInPortalIfExists.cTCR1GXI.js";const d=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,f=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,S=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,r=150,g=10,E=90,u=4e3,n=(t,a=0)=>Math.random()*(t-a)+a,w=()=>m(`from{transform:translateY(0)
2
2
  rotateX(`,n(360),`deg)
3
3
  rotateY(`,n(360),`deg)
4
4
  rotateZ(`,n(360),"deg);}to{transform:translateY(calc(100vh + ",o,`px))
@@ -1,4 +1,4 @@
1
- import{r as u,E as H,_ as V,aZ as ut,bi as Vt,bj as $t,bk as jt,A as G,D as X,R as yt,aA as Gt,n as x,bl as Xt,aB as N,j as v,bm as qt,b6 as Yt,bn as Zt,bo as Kt,ag as Jt,ae as Qt,bp as Q,ap as te,at as ee,bq as ie,br as ne,ba as se,bs as re}from"./index.CrcobIb0.js";import{u as oe,F as ae}from"./FormClearHelper.Bvmaiutv.js";import{T as le,a as pt}from"./Toolbar.Dw79Vekz.js";import{u as ce}from"./Hooks.DcERo8tB.js";import{c as de}from"./createDownloadLinkElement.DZMwyjvU.js";import{F as he,D as ue}from"./FileDownload.esm.BUw5ikQY.js";var wt=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("g",{fill:"none"},u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24})),u.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),u.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});wt.displayName="Mic";var Ct=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("rect",{width:24,height:24,fill:"none"}),u.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});Ct.displayName="Pause";var St=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("rect",{width:24,height:24,fill:"none"}),u.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});St.displayName="PlayArrow";var Rt=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),u.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});Rt.displayName="Refresh";var Et=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("g",{fill:"none"},u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24})),u.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});Et.displayName="StopCircle";function E(n,t,e,i){return new(e||(e=Promise))(function(r,s){function a(c){try{d(i.next(c))}catch(l){s(l)}}function o(c){try{d(i.throw(c))}catch(l){s(l)}}function d(c){var l;c.done?r(c.value):(l=c.value,l instanceof e?l:new e(function(p){p(l)})).then(a,o)}d((i=i.apply(n,t||[])).next())})}let $=class{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),i==null?void 0:i.once){const r=()=>{this.un(t,r),this.un(t,e)};return this.on(t,r),r}return()=>this.un(t,e)}un(t,e){var i;(i=this.listeners[t])===null||i===void 0||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(i=>i(...e))}};const mt={decode:function(n,t){return E(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(n).finally(()=>e.close())})},createBuffer:function(n,t){return typeof n[0]=="number"&&(n=[n]),function(e){const i=e[0];if(i.some(r=>r>1||r<-1)){const r=i.length;let s=0;for(let a=0;a<r;a++){const o=Math.abs(i[a]);o>s&&(s=o)}for(const a of e)for(let o=0;o<r;o++)a[o]/=s}}(n),{duration:t,length:n[0].length,sampleRate:n[0].length/t,numberOfChannels:n.length,getChannelData:e=>n==null?void 0:n[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function xt(n,t){const e=t.xmlns?document.createElementNS(t.xmlns,n):document.createElement(n);for(const[i,r]of Object.entries(t))if(i==="children")for(const[s,a]of Object.entries(t))typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(xt(s,a));else i==="style"?Object.assign(e.style,r):i==="textContent"?e.textContent=r:e.setAttribute(i,r.toString());return e}function ft(n,t,e){const i=xt(n,t||{});return e==null||e.appendChild(i),i}var pe=Object.freeze({__proto__:null,createElement:ft,default:ft});const me={fetchBlob:function(n,t,e){return E(this,void 0,void 0,function*(){const i=yield fetch(n,e);if(i.status>=400)throw new Error(`Failed to fetch ${n}: ${i.status} (${i.statusText})`);return function(r,s){E(this,void 0,void 0,function*(){if(!r.body||!r.headers)return;const a=r.body.getReader(),o=Number(r.headers.get("Content-Length"))||0;let d=0;const c=p=>E(this,void 0,void 0,function*(){d+=(p==null?void 0:p.length)||0;const h=Math.round(d/o*100);s(h)}),l=()=>E(this,void 0,void 0,function*(){let p;try{p=yield a.read()}catch{return}p.done||(c(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class fe extends ${constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const r=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;try{this.media.src=r}catch{this.media.src=t}}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return E(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=t}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class U extends ${constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[r,s]=this.initHtml();i.appendChild(r),this.container=r,this.scrollContainer=s.querySelector(".scroll"),this.wrapper=s.querySelector(".wrapper"),this.canvasWrapper=s.querySelector(".canvases"),this.progressWrapper=s.querySelector(".progress"),this.cursor=s.querySelector(".cursor"),e&&s.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),r=e.clientX-i.left,s=e.clientY-i.top;return[r/i.width,s/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,r]=t(e);this.emit("click",i,r)}),this.wrapper.addEventListener("dblclick",e=>{const[i,r]=t(e);this.emit("dblclick",i,r)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:r}=this.scrollContainer,s=e/i,a=(e+r)/i;this.emit("scroll",s,a,e,e+r)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,r,s=3,a=0,o=100){if(!t)return()=>{};const d=matchMedia("(pointer: coarse)").matches;let c=()=>{};const l=p=>{if(p.button!==a)return;p.preventDefault(),p.stopPropagation();let h=p.clientX,m=p.clientY,f=!1;const b=Date.now(),g=C=>{if(C.preventDefault(),C.stopPropagation(),d&&Date.now()-b<o)return;const D=C.clientX,W=C.clientY,M=D-h,A=W-m;if(f||Math.abs(M)>s||Math.abs(A)>s){const I=t.getBoundingClientRect(),{left:F,top:L}=I;f||(i==null||i(h-F,m-L),f=!0),e(M,A,D-F,W-L),h=D,m=W}},w=C=>{if(f){const D=C.clientX,W=C.clientY,M=t.getBoundingClientRect(),{left:A,top:I}=M;r==null||r(D-A,W-I)}c()},y=C=>{C.relatedTarget&&C.relatedTarget!==document.documentElement||w(C)},P=C=>{f&&(C.stopPropagation(),C.preventDefault())},T=C=>{f&&C.preventDefault()};document.addEventListener("pointermove",g),document.addEventListener("pointerup",w),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("click",P,{capture:!0}),c=()=>{document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",w),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",T),setTimeout(()=>{document.removeEventListener("click",P,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{c(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const r=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const s=this.parent.clientHeight||128;return e!=null&&e.every(a=>!a.overlay)?s/r:s}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
1
+ import{r as u,E as H,_ as V,aZ as ut,bi as Vt,bj as $t,bk as jt,A as G,D as X,R as yt,aA as Gt,n as x,bl as Xt,aB as N,j as v,bm as qt,b6 as Yt,bn as Zt,bo as Kt,ag as Jt,ae as Qt,bp as Q,ap as te,at as ee,bq as ie,br as ne,ba as se,bs as re}from"./index.Ca6320CT.js";import{u as oe,F as ae}from"./FormClearHelper.BP4f-wKq.js";import{T as le,a as pt}from"./Toolbar.IB7xmaQ3.js";import{u as ce}from"./Hooks.DNhdjC_E.js";import{c as de}from"./createDownloadLinkElement.DZMwyjvU.js";import{F as he,D as ue}from"./FileDownload.esm.DW9qPsuf.js";var wt=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("g",{fill:"none"},u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24})),u.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),u.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});wt.displayName="Mic";var Ct=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("rect",{width:24,height:24,fill:"none"}),u.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});Ct.displayName="Pause";var St=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("rect",{width:24,height:24,fill:"none"}),u.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});St.displayName="PlayArrow";var Rt=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),u.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});Rt.displayName="Refresh";var Et=u.forwardRef(function(n,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(H,V({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),u.createElement("g",{fill:"none"},u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24})),u.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});Et.displayName="StopCircle";function E(n,t,e,i){return new(e||(e=Promise))(function(r,s){function a(c){try{d(i.next(c))}catch(l){s(l)}}function o(c){try{d(i.throw(c))}catch(l){s(l)}}function d(c){var l;c.done?r(c.value):(l=c.value,l instanceof e?l:new e(function(p){p(l)})).then(a,o)}d((i=i.apply(n,t||[])).next())})}let $=class{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),i==null?void 0:i.once){const r=()=>{this.un(t,r),this.un(t,e)};return this.on(t,r),r}return()=>this.un(t,e)}un(t,e){var i;(i=this.listeners[t])===null||i===void 0||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(i=>i(...e))}};const mt={decode:function(n,t){return E(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(n).finally(()=>e.close())})},createBuffer:function(n,t){return typeof n[0]=="number"&&(n=[n]),function(e){const i=e[0];if(i.some(r=>r>1||r<-1)){const r=i.length;let s=0;for(let a=0;a<r;a++){const o=Math.abs(i[a]);o>s&&(s=o)}for(const a of e)for(let o=0;o<r;o++)a[o]/=s}}(n),{duration:t,length:n[0].length,sampleRate:n[0].length/t,numberOfChannels:n.length,getChannelData:e=>n==null?void 0:n[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function xt(n,t){const e=t.xmlns?document.createElementNS(t.xmlns,n):document.createElement(n);for(const[i,r]of Object.entries(t))if(i==="children")for(const[s,a]of Object.entries(t))typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(xt(s,a));else i==="style"?Object.assign(e.style,r):i==="textContent"?e.textContent=r:e.setAttribute(i,r.toString());return e}function ft(n,t,e){const i=xt(n,t||{});return e==null||e.appendChild(i),i}var pe=Object.freeze({__proto__:null,createElement:ft,default:ft});const me={fetchBlob:function(n,t,e){return E(this,void 0,void 0,function*(){const i=yield fetch(n,e);if(i.status>=400)throw new Error(`Failed to fetch ${n}: ${i.status} (${i.statusText})`);return function(r,s){E(this,void 0,void 0,function*(){if(!r.body||!r.headers)return;const a=r.body.getReader(),o=Number(r.headers.get("Content-Length"))||0;let d=0;const c=p=>E(this,void 0,void 0,function*(){d+=(p==null?void 0:p.length)||0;const h=Math.round(d/o*100);s(h)}),l=()=>E(this,void 0,void 0,function*(){let p;try{p=yield a.read()}catch{return}p.done||(c(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class fe extends ${constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const r=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;try{this.media.src=r}catch{this.media.src=t}}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return E(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=t}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class U extends ${constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[r,s]=this.initHtml();i.appendChild(r),this.container=r,this.scrollContainer=s.querySelector(".scroll"),this.wrapper=s.querySelector(".wrapper"),this.canvasWrapper=s.querySelector(".canvases"),this.progressWrapper=s.querySelector(".progress"),this.cursor=s.querySelector(".cursor"),e&&s.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),r=e.clientX-i.left,s=e.clientY-i.top;return[r/i.width,s/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,r]=t(e);this.emit("click",i,r)}),this.wrapper.addEventListener("dblclick",e=>{const[i,r]=t(e);this.emit("dblclick",i,r)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:r}=this.scrollContainer,s=e/i,a=(e+r)/i;this.emit("scroll",s,a,e,e+r)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,r,s=3,a=0,o=100){if(!t)return()=>{};const d=matchMedia("(pointer: coarse)").matches;let c=()=>{};const l=p=>{if(p.button!==a)return;p.preventDefault(),p.stopPropagation();let h=p.clientX,m=p.clientY,f=!1;const b=Date.now(),g=C=>{if(C.preventDefault(),C.stopPropagation(),d&&Date.now()-b<o)return;const D=C.clientX,W=C.clientY,M=D-h,A=W-m;if(f||Math.abs(M)>s||Math.abs(A)>s){const I=t.getBoundingClientRect(),{left:F,top:L}=I;f||(i==null||i(h-F,m-L),f=!0),e(M,A,D-F,W-L),h=D,m=W}},w=C=>{if(f){const D=C.clientX,W=C.clientY,M=t.getBoundingClientRect(),{left:A,top:I}=M;r==null||r(D-A,W-I)}c()},y=C=>{C.relatedTarget&&C.relatedTarget!==document.documentElement||w(C)},P=C=>{f&&(C.stopPropagation(),C.preventDefault())},T=C=>{f&&C.preventDefault()};document.addEventListener("pointermove",g),document.addEventListener("pointerup",w),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("click",P,{capture:!0}),c=()=>{document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",w),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",T),setTimeout(()=>{document.removeEventListener("click",P,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{c(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const r=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const s=this.parent.clientHeight||128;return e!=null&&e.every(a=>!a.overlay)?s/r:s}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
2
2
  <style${i?` nonce="${i}"`:""}>
3
3
  :host {
4
4
  user-select: none;
@@ -1 +1 @@
1
- import{n as t,bb as e,aB as o,j as a,av as i}from"./index.CrcobIb0.js";import{P as l}from"./ProgressBar.CTBNJVpb.js";const d=t("div",{target:"e1eqiuxd0"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal",color:e(s)}));function c({element:s,width:r}){return o("div",{className:"stProgress","data-testid":"stProgress",children:[a(d,{children:a(i,{source:s.text,allowHTML:!1,isLabel:!0})}),a(l,{value:s.value,width:r})]})}export{c as default};
1
+ import{n as t,bb as e,aB as o,j as a,av as i}from"./index.Ca6320CT.js";import{P as l}from"./ProgressBar.D-DmAAiN.js";const d=t("div",{target:"e1eqiuxd0"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal",color:e(s)}));function c({element:s,width:r}){return o("div",{className:"stProgress","data-testid":"stProgress",children:[a(d,{children:a(i,{source:s.text,allowHTML:!1,isLabel:!0})}),a(l,{value:s.value,width:r})]})}export{c as default};
@@ -1 +1 @@
1
- import{r as s,ae as U,co as T,aB as k,j as l,bq as A,bD as B,br as D,ba as L,bs as P}from"./index.CrcobIb0.js";import{u as j}from"./uniqueId.BT1SAZF-.js";import{u as _,a as q,b as K}from"./useOnInputChange.DldtvoCQ.js";import{I as O}from"./InputInstructions.BupGmSrJ.js";import{a as $}from"./useBasicWidgetState.BB9oQkjJ.js";import{T as G}from"./textarea.C1RJDJe0.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.Bvmaiutv.js";import"./base-input.BBtHVXa2.js";const W=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,w=a=>a.value??null,J=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},Q=({disabled:a,element:t,widgetMgr:o,fragmentId:u,width:h})=>{var x;const b=s.useRef(j("text_area_")).current,[r,n]=s.useState(!1),[S,g]=s.useState(!1),[i,d]=s.useState(W(o,t)??null),y=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[I,c]=$({getStateFromWidgetMgr:W,getDefaultStateFromProto:N,getCurrStateFromProto:w,updateWidgetMgrState:J,element:t,widgetMgr:o,fragmentId:u,onFormCleared:y});_(I,i,d,r);const e=U(),p=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&p(),g(!1)},[r,p]),C=s.useCallback(()=>{g(!0)},[]),F=q({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),v=K(t.formId,p,r,o,u,!0),E={width:h},{height:f,placeholder:z,formId:m}=t,H=T({formId:m})?o.allowFormEnterToSubmit(m):r,R=S&&h>e.breakpoints.hideWidgetDetails;return k("div",{className:"stTextArea","data-testid":"stTextArea",style:E,children:[l(P,{label:t.label,disabled:a,labelVisibility:A((x=t.labelVisibility)==null?void 0:x.value),htmlFor:b,children:t.help&&l(B,{children:l(D,{content:t.help,placement:L.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:z,onBlur:V,onFocus:C,onChange:F,onKeyDown:v,"aria-label":t.label,disabled:a,id:b,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.lg,paddingLeft:e.spacing.lg,paddingBottom:e.spacing.lg,paddingTop:e.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),R&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:T({formId:m}),allowEnterToSubmit:H})]})},rt=s.memo(Q);export{rt as default};
1
+ import{r as s,ae as U,co as T,aB as k,j as l,bq as A,bD as B,br as D,ba as L,bs as P}from"./index.Ca6320CT.js";import{u as j}from"./uniqueId.CKxaEvFc.js";import{u as _,a as q,b as K}from"./useOnInputChange.CAEw-Xl5.js";import{I as O}from"./InputInstructions.6chqAOMM.js";import{a as $}from"./useBasicWidgetState.DY0Kwuur.js";import{T as G}from"./textarea.B9cq_go8.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.BP4f-wKq.js";import"./base-input.DIQMGXMv.js";const W=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,w=a=>a.value??null,J=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},Q=({disabled:a,element:t,widgetMgr:o,fragmentId:u,width:h})=>{var x;const b=s.useRef(j("text_area_")).current,[r,n]=s.useState(!1),[S,g]=s.useState(!1),[i,d]=s.useState(W(o,t)??null),y=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[I,c]=$({getStateFromWidgetMgr:W,getDefaultStateFromProto:N,getCurrStateFromProto:w,updateWidgetMgrState:J,element:t,widgetMgr:o,fragmentId:u,onFormCleared:y});_(I,i,d,r);const e=U(),p=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&p(),g(!1)},[r,p]),C=s.useCallback(()=>{g(!0)},[]),F=q({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),v=K(t.formId,p,r,o,u,!0),E={width:h},{height:f,placeholder:z,formId:m}=t,H=T({formId:m})?o.allowFormEnterToSubmit(m):r,R=S&&h>e.breakpoints.hideWidgetDetails;return k("div",{className:"stTextArea","data-testid":"stTextArea",style:E,children:[l(P,{label:t.label,disabled:a,labelVisibility:A((x=t.labelVisibility)==null?void 0:x.value),htmlFor:b,children:t.help&&l(B,{children:l(D,{content:t.help,placement:L.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:z,onBlur:V,onFocus:C,onChange:F,onKeyDown:v,"aria-label":t.label,disabled:a,id:b,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.lg,paddingLeft:e.spacing.lg,paddingBottom:e.spacing.lg,paddingTop:e.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),R&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:T({formId:m}),allowEnterToSubmit:H})]})},rt=s.memo(Q);export{rt as default};
@@ -1,2 +1,2 @@
1
- import{bv as v,r as l,ca as q,cc as p,ce as S}from"./index.CrcobIb0.js";import{R as C,c as w,d as J,B as M}from"./base-input.BBtHVXa2.js";function _(e){"@babel/helpers - typeof";return _=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},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bv as v,r as l,ca as q,cc as p,ce as S}from"./index.Ca6320CT.js";import{R as C,c as w,d as J,B as M}from"./base-input.DIQMGXMv.js";function _(e){"@babel/helpers - typeof";return _=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},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){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 K(e,t){if(e){if(typeof e=="string")return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}}function j(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,u;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(b){a=!0,u=b}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}return n}}function V(e){if(Array.isArray(e))return e}function I(e,t){if(e==null)return{};var r=X(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function te(e,t,r){return t&&ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function re(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&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},m(e,t)}function ne(e){var t=ae();return function(){var n=h(e),o;if(t){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return oe(this,o)}}function oe(e,t){if(t&&(_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(){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 h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},h(e)}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ie=function(e){re(r,e);var t=ne(r);function r(){var n;Y(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),d(y(n),"state",{isFocused:n.props.autoFocus||!1}),d(y(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),d(y(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return te(r,[{key:"render",value:function(){var o=this.props,a=o.startEnhancer,i=o.endEnhancer,u=o.overrides,b=u.Root,A=u.StartEnhancer,B=u.EndEnhancer,F=I(u,U),T=I(o,Z),x=v(b,C),g=O(x,2),$=g[0],N=g[1],D=v(A,w),E=O(D,2),W=E[0],z=E[1],H=v(B,w),P=O(H,2),L=P[0],k=P[1],s=J(this.props,this.state);return l.createElement($,f({"data-baseweb":"input"},s,N,{$adjoined:R(a,i),$hasIconTrailing:this.props.clearable||this.props.type=="password"}),c(a)&&l.createElement(W,f({},s,z,{$position:S.start}),typeof a=="function"?a(s):a),l.createElement(M,f({},T,{overrides:F,adjoined:R(a,i),onFocus:this.onFocus,onBlur:this.onBlur})),c(i)&&l.createElement(L,f({},s,k,{$position:S.end}),typeof i=="function"?i(s):i))}}]),r}(l.Component);d(ie,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:q.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});function R(e,t){return c(e)&&c(t)?p.both:c(e)?p.left:c(t)?p.right:p.none}function c(e){return!!(e||e===0)}export{ie as I};
@@ -1 +1 @@
1
- import{c as p,e as c}from"./es6.DmlLpYMO.js";import"./index.CrcobIb0.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
1
+ import{c as p,e as c}from"./es6.zKs-XsJ1.js";import"./index.Ca6320CT.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
@@ -1 +1 @@
1
- import{aL as t,aM as g,g as i}from"./index.CrcobIb0.js";var m=t,o=g,n=o(function(e,r,a,s){m(e,r,a,s)}),c=n;const h=i(c);export{h as m};
1
+ import{aL as t,aM as g,g as i}from"./index.Ca6320CT.js";var m=t,o=g,n=o(function(e,r,a,s){m(e,r,a,s)}),c=n;const h=i(c);export{h as m};
@@ -1,4 +1,4 @@
1
- import{R as X,r as T}from"./index.CrcobIb0.js";import{s as Te}from"./index.BXejhz8S.js";import"./FormClearHelper.Bvmaiutv.js";import"./withFullScreenWrapper.CWPfcXAP.js";import"./Toolbar.Dw79Vekz.js";import"./mergeWith.CnJI40Ol.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./slicedToArray.C1s2cVDA.js";import"./getPrototypeOf.M3x98UQ7.js";import"./createSuper.BBR-BbJr.js";import"./FileDownload.esm.BUw5ikQY.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
1
+ import{R as X,r as T}from"./index.Ca6320CT.js";import{s as Te}from"./index.CkgGJqBi.js";import"./FormClearHelper.BP4f-wKq.js";import"./withFullScreenWrapper.Def4ZoAl.js";import"./Toolbar.IB7xmaQ3.js";import"./mergeWith.dOmek2Nz.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./slicedToArray.xYln54_I.js";import"./getPrototypeOf.B4u2uvgs.js";import"./createSuper.Do1oR0VE.js";import"./FileDownload.esm.DW9qPsuf.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
2
2
  Decimal separator can't be same as thousand separator.
3
3
  thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
4
  decimalSeparator: `+n+` (default value for decimalSeparator is .)
@@ -1 +1 @@
1
- import{e as l}from"./es6.DmlLpYMO.js";import"./index.CrcobIb0.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
1
+ import{e as l}from"./es6.zKs-XsJ1.js";import"./index.Ca6320CT.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
@@ -1,2 +1,2 @@
1
- import{r as a,E as y,_ as d,b1 as m}from"./index.CrcobIb0.js";var b=a.forwardRef(function(e,t){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});b.displayName="Close";function p(e){if(Array.isArray(e))return e}function h(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,c,o,l=[],n=!0,u=!1;try{if(c=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;n=!1}else for(;!(n=(i=c.call(r)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(f){u=!0,s=f}finally{try{if(!n&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw s}}return l}}function v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,E as y,_ as d,b1 as m}from"./index.Ca6320CT.js";var b=a.forwardRef(function(e,t){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});b.displayName="Close";function p(e){if(Array.isArray(e))return e}function h(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,c,o,l=[],n=!0,u=!1;try{if(c=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;n=!1}else for(;!(n=(i=c.call(r)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(f){u=!0,s=f}finally{try{if(!n&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw s}}return l}}function v(){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 _(e,t){return p(e)||h(e,t)||m(e,t)||v()}export{b as C,_};
@@ -1,2 +1,2 @@
1
- import{bu as h,bv as T,bR as j,r as d,c9 as x,ca as R}from"./index.CrcobIb0.js";import{g as $,a as I,b as A,B as F}from"./base-input.BBtHVXa2.js";function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(n){E(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=h("div",function(e){return s(s({},$(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var m=h("div",function(e){return I(s({$positive:!1},e))});m.displayName="StyledTextareaContainer";m.displayName="StyledTextareaContainer";var g=h("textarea",function(e){return s(s({},A(e)),{},{resize:e.$resize||"none"})});g.displayName="StyledTextarea";g.displayName="StyledTextarea";function b(e){"@babel/helpers - typeof";return b=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},b(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}function B(e,t){return D(e)||C(e,t)||N(e,t)||z()}function z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bu as h,bv as T,bR as j,r as d,c9 as x,ca as R}from"./index.Ca6320CT.js";import{g as $,a as I,b as A,B as F}from"./base-input.DIQMGXMv.js";function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(n){E(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=h("div",function(e){return s(s({},$(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var m=h("div",function(e){return I(s({$positive:!1},e))});m.displayName="StyledTextareaContainer";m.displayName="StyledTextareaContainer";var g=h("textarea",function(e){return s(s({},A(e)),{},{resize:e.$resize||"none"})});g.displayName="StyledTextarea";g.displayName="StyledTextarea";function b(e){"@babel/helpers - typeof";return b=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},b(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}function B(e,t){return D(e)||C(e,t)||N(e,t)||z()}function z(){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(e,t){if(e){if(typeof e=="string")return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}}function P(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(y){i=!0,u=y}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function D(e){if(Array.isArray(e))return e}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function q(e,t,r){return t&&U(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(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&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},v(e,t)}function H(e){var t=W();return function(){var n=p(e),o;if(t){var i=p(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return L(this,o)}}function L(e,t){if(t&&(b(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(){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 p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},p(e)}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=function(e){M(r,e);var t=H(r);function r(){var n;K(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),c(f(n),"state",{isFocused:n.props.autoFocus||!1}),c(f(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),c(f(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return q(r,[{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,a=T(i.Root,O),u=B(a,2),y=u[0],S=u[1],w=j({Input:{component:g},InputContainer:{component:m}},i);return d.createElement(y,l({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},S),d.createElement(F,l({},this.props,{type:x.textarea,overrides:w,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}]),r}(d.Component);c(Y,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:R.default});export{Y as T};