streamlit-nightly 1.41.2.dev20250126__py2.py3-none-any.whl → 1.41.2.dev20250130__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 (74) hide show
  1. streamlit/static/index.html +1 -1
  2. streamlit/static/static/js/{FileDownload.esm.C1QvS8Zm.js → FileDownload.esm.BW2GD_iE.js} +1 -1
  3. streamlit/static/static/js/{FormClearHelper.mT4-5rFn.js → FormClearHelper.DZ1scmYc.js} +1 -1
  4. streamlit/static/static/js/{Hooks.CVNEuaGG.js → Hooks.DPFxqsrt.js} +1 -1
  5. streamlit/static/static/js/{InputInstructions.BCvAGBeC.js → InputInstructions.kmEglyPj.js} +1 -1
  6. streamlit/static/static/js/{ProgressBar.CcQcYD9u.js → ProgressBar.DlpiRykl.js} +1 -1
  7. streamlit/static/static/js/{RenderInPortalIfExists.DHDG9PHn.js → RenderInPortalIfExists.Io9TPjT5.js} +1 -1
  8. streamlit/static/static/js/{Toolbar.yTE_O6B7.js → Toolbar.CsJK79V5.js} +1 -1
  9. streamlit/static/static/js/{base-input.CQPY9_oN.js → base-input.BUELT8YC.js} +3 -3
  10. streamlit/static/static/js/{createSuper.DE47Tkz4.js → createSuper.CborHI-x.js} +1 -1
  11. streamlit/static/static/js/{data-grid-overlay-editor.5JEQwfzp.js → data-grid-overlay-editor.BpRK_Fjy.js} +1 -1
  12. streamlit/static/static/js/{downloader.CX7_KkfB.js → downloader.BL7woS2R.js} +1 -1
  13. streamlit/static/static/js/{es6.Be2vwxoI.js → es6.BLJirovP.js} +2 -2
  14. streamlit/static/static/js/{iframeResizer.contentWindow.CFHofqC-.js → iframeResizer.contentWindow.CsDiWEwe.js} +1 -1
  15. streamlit/static/static/js/{index.Cbi_d9ak.js → index.51fCwYSO.js} +60 -60
  16. streamlit/static/static/js/{index.CvqaNor_.js → index.7ACWibTY.js} +64 -62
  17. streamlit/static/static/js/{index.mtSGfsND.js → index.8xuJfNGL.js} +1 -1
  18. streamlit/static/static/js/index.BB4dPXdd.js +5 -0
  19. streamlit/static/static/js/{index.a6pesEXT.js → index.BL_l30n0.js} +1 -1
  20. streamlit/static/static/js/{index.C0ZNaKGF.js → index.BShMn81Q.js} +1 -1
  21. streamlit/static/static/js/{index.D1AD4NsW.js → index.BcDqsbhj.js} +1 -1
  22. streamlit/static/static/js/{index.0OeiPvr3.js → index.Bkuwp1nX.js} +1 -1
  23. streamlit/static/static/js/{index.er3Zfn3e.js → index.BmCbxpl1.js} +2 -2
  24. streamlit/static/static/js/{index.CjsaBedq.js → index.BnfnxD0E.js} +1 -1
  25. streamlit/static/static/js/{index.Ci3iebpl.js → index.BrgcQXer.js} +1 -1
  26. streamlit/static/static/js/{index.Dkr_c_9x.js → index.CFagjgA1.js} +1 -1
  27. streamlit/static/static/js/{index.D0lxtOCO.js → index.CJNFcs5M.js} +2 -2
  28. streamlit/static/static/js/{index.5F9_LJ-9.js → index.CQHr3YZb.js} +1 -1
  29. streamlit/static/static/js/{index.BpeIAypN.js → index.CUHtehzq.js} +1 -1
  30. streamlit/static/static/js/{index.SLleoa9s.js → index.CZ_IlLc4.js} +1 -1
  31. streamlit/static/static/js/{index.BGICDmL0.js → index.C_NO_6ev.js} +15 -15
  32. streamlit/static/static/js/{index.BOeLQ18h.js → index.ChEJ9NpI.js} +2 -2
  33. streamlit/static/static/js/{index.C3eR9AQ5.js → index.CmIDjHns.js} +1 -1
  34. streamlit/static/static/js/{index.8tVXPrLX.js → index.CoZfJLg6.js} +1 -1
  35. streamlit/static/static/js/{index.B0pfFJGU.js → index.CozJANOl.js} +1 -1
  36. streamlit/static/static/js/{index.CCmrDm8Z.js → index.CsBE1tR7.js} +2 -2
  37. streamlit/static/static/js/{index.AXOgS1NM.js → index.CuHtZ9Dm.js} +1 -1
  38. streamlit/static/static/js/{index.Cg7T4wJt.js → index.D1dEn4mm.js} +2 -2
  39. streamlit/static/static/js/{index.CHuo89tL.js → index.DBlRI9-8.js} +1 -1
  40. streamlit/static/static/js/{index.1GBg_Cdb.js → index.DLNHCVdY.js} +1 -1
  41. streamlit/static/static/js/{index.Hhv6gSq2.js → index.DRX-oomt.js} +1 -1
  42. streamlit/static/static/js/{index.OM83ZHKg.js → index.DRw2m5d2.js} +1 -1
  43. streamlit/static/static/js/{index.BBjf7kH1.js → index.DUQzVbMl.js} +1 -1
  44. streamlit/static/static/js/{index.DLjk_wlB.js → index.DkKHo5zC.js} +1 -1
  45. streamlit/static/static/js/{index.AExANgn1.js → index.DqAa92Lj.js} +1 -1
  46. streamlit/static/static/js/{index.B-xzXPZE.js → index.DtJw0w2z.js} +2 -2
  47. streamlit/static/static/js/{index.BUgJRfqp.js → index.GPnu42nG.js} +3 -3
  48. streamlit/static/static/js/{index.DNDhYAPI.js → index.HWM8Jo0D.js} +2 -2
  49. streamlit/static/static/js/{index.XCwDes79.js → index.YT8U9SBb.js} +1 -1
  50. streamlit/static/static/js/index.Yz4zfxAi.js +1 -0
  51. streamlit/static/static/js/{index.6v5ZgUAy.js → index.k2qCiWKR.js} +1 -1
  52. streamlit/static/static/js/{input.B07wSbwn.js → input.Cc_gque8.js} +2 -2
  53. streamlit/static/static/js/{memory.CC_p93jh.js → memory.dOywlvNB.js} +1 -1
  54. streamlit/static/static/js/{mergeWith.ivc75cD1.js → mergeWith.B3UEYpBK.js} +1 -1
  55. streamlit/static/static/js/{number-overlay-editor.Db2Be6nq.js → number-overlay-editor.vtZ5cHrO.js} +1 -1
  56. streamlit/static/static/js/{possibleConstructorReturn.BNprLGNF.js → possibleConstructorReturn.C28aC5bE.js} +1 -1
  57. streamlit/static/static/js/{sandbox.BlG3HhHL.js → sandbox.Bu9R-BjJ.js} +1 -1
  58. streamlit/static/static/js/{textarea.Bz6Z-kmO.js → textarea.BuehYUL9.js} +2 -2
  59. streamlit/static/static/js/{timepicker.BMSb5NlP.js → timepicker.BoUQqla6.js} +1 -1
  60. streamlit/static/static/js/{toConsumableArray.uYLXBIlD.js → toConsumableArray.1TsnLTQZ.js} +1 -1
  61. streamlit/static/static/js/uniqueId.DWzkKvg-.js +1 -0
  62. streamlit/static/static/js/{useBasicWidgetState.BJFGEQDL.js → useBasicWidgetState.S-yUfhr7.js} +1 -1
  63. streamlit/static/static/js/{useOnInputChange.BmSN_ACz.js → useOnInputChange.z9TKe1o4.js} +1 -1
  64. streamlit/static/static/js/{withFullScreenWrapper.CbOOMX5j.js → withFullScreenWrapper.DNSRZFsQ.js} +1 -1
  65. streamlit/web/server/browser_websocket_handler.py +3 -21
  66. {streamlit_nightly-1.41.2.dev20250126.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/METADATA +1 -1
  67. {streamlit_nightly-1.41.2.dev20250126.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/RECORD +71 -71
  68. streamlit/static/static/js/index.4nNgvhbk.js +0 -4
  69. streamlit/static/static/js/index.DY6666R7.js +0 -1
  70. streamlit/static/static/js/uniqueId.BdisvZXg.js +0 -1
  71. {streamlit_nightly-1.41.2.dev20250126.data → streamlit_nightly-1.41.2.dev20250130.data}/scripts/streamlit.cmd +0 -0
  72. {streamlit_nightly-1.41.2.dev20250126.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/WHEEL +0 -0
  73. {streamlit_nightly-1.41.2.dev20250126.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/entry_points.txt +0 -0
  74. {streamlit_nightly-1.41.2.dev20250126.dist-info → streamlit_nightly-1.41.2.dev20250130.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{r as a,j as E}from"./index.CvqaNor_.js";function T({element:t,width:f,endpoints:c,elementMgr:o}){const i=a.useRef(null),{startTime:u,endTime:n,loop:d,autoplay:p}=t,l=a.useMemo(()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,o]);a.useEffect(()=>{i.current&&(i.current.currentTime=u)},[u]),a.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),a.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const s=()=>{n>0&&e.currentTime>=n&&(d?(e.currentTime=u||0,e.play()):r||(r=!0,e.pause()))};return n>0&&e.addEventListener("timeupdate",s),()=>{e&&n>0&&e.removeEventListener("timeupdate",s)}},[n,d,u]),a.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{d&&(e.currentTime=u||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[d,u]);const m=c.buildMediaURL(t.url);return E("audio",{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!l,src:m,style:{width:f}})}export{T as default};
1
+ import{r as a,j as E}from"./index.7ACWibTY.js";function T({element:t,width:f,endpoints:c,elementMgr:o}){const i=a.useRef(null),{startTime:u,endTime:n,loop:d,autoplay:p}=t,l=a.useMemo(()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,o]);a.useEffect(()=>{i.current&&(i.current.currentTime=u)},[u]),a.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),a.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const s=()=>{n>0&&e.currentTime>=n&&(d?(e.currentTime=u||0,e.play()):r||(r=!0,e.pause()))};return n>0&&e.addEventListener("timeupdate",s),()=>{e&&n>0&&e.removeEventListener("timeupdate",s)}},[n,d,u]),a.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{d&&(e.currentTime=u||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[d,u]);const m=c.buildMediaURL(t.url);return E("audio",{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!l,src:m,style:{width:f}})}export{T as default};
@@ -0,0 +1,5 @@
1
+ import{r as s,E as ca,_ as ra,cj as Hi,ck as P,R as mi,cl as u,n as x,z as j,j as d,bp as q,bq as ta,b8 as ea,b7 as $i,cm as Wi,cn as Ni,a$ as Ki,F as Xi,aC as Yi,bk as Gi,aY as Ja,J as R,bm as Ji,bl as Zi,bs as Qi,bF as at,bt as it,bc as tt,bu as et}from"./index.7ACWibTY.js";import{F as nt}from"./FormClearHelper.DZ1scmYc.js";import{S as ot,P as pt}from"./ProgressBar.DlpiRykl.js";import{u as lt}from"./Hooks.DPFxqsrt.js";import{U as aa}from"./UploadFileInfo.C-jY39rj.js";var ui=s.forwardRef(function(a,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(ca,ra({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},a,{ref:i}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.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"}))});ui.displayName="Clear";var fi=s.forwardRef(function(a,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(ca,ra({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},a,{ref:i}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.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"}))});fi.displayName="CloudUpload";var vi=s.forwardRef(function(a,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(ca,ra({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},a,{ref:i}),s.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"}))});vi.displayName="Error";var xi=s.forwardRef(function(a,i){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(ca,ra({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},a,{ref:i}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.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"}))});xi.displayName="InsertDriveFile";var O;(function(a){a.Gigabyte="gb",a.Megabyte="mb",a.Kilobyte="kb",a.Byte="b"})(O||(O={}));const Sa=Hi()?1024:1e3,na=["gb","mb","kb","b"],sa=(a,i,t=1)=>{if(i||(i="b"),t<0&&(t=0),a<0)throw new Error("Size must be greater than or equal to 0");const e=na.indexOf(i),n=a/Sa;return e&&a>Sa/2?sa(n,na[e-1],t):`${a.toFixed(t)}${i.toUpperCase()}`},ct=(a,i,t)=>{if(a<0)throw Error("Size must be 0 or greater");const e=na.findIndex(c=>c===i),n=na.findIndex(c=>c===t);if(e===-1||n===-1)throw Error("Unexpected byte unit provided");if(e===n)return a;const o=Math.abs(e-n),p=Sa**o;return e>n?a/p:a*p},rt=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function L(a,i,t){const e=st(a),{webkitRelativePath:n}=a,o=typeof i=="string"?i:typeof n=="string"&&n.length>0?n:`./${a.name}`;return typeof e.path!="string"&&Za(e,"path",o),Za(e,"relativePath",o),e}function st(a){const{name:i}=a;if(i&&i.lastIndexOf(".")!==-1&&!a.type){const e=i.split(".").pop().toLowerCase(),n=rt.get(e);n&&Object.defineProperty(a,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return a}function Za(a,i,t){Object.defineProperty(a,i,{value:t,writable:!1,configurable:!1,enumerable:!0})}const dt=[".DS_Store","Thumbs.db"];function mt(a){return P(this,void 0,void 0,function*(){return oa(a)&&ut(a.dataTransfer)?gt(a.dataTransfer,a.type):ft(a)?vt(a):Array.isArray(a)&&a.every(i=>"getFile"in i&&typeof i.getFile=="function")?xt(a):[]})}function ut(a){return oa(a)}function ft(a){return oa(a)&&oa(a.target)}function oa(a){return typeof a=="object"&&a!==null}function vt(a){return Aa(a.target.files).map(i=>L(i))}function xt(a){return P(this,void 0,void 0,function*(){return(yield Promise.all(a.map(t=>t.getFile()))).map(t=>L(t))})}function gt(a,i){return P(this,void 0,void 0,function*(){if(a.items){const t=Aa(a.items).filter(n=>n.kind==="file");if(i!=="drop")return t;const e=yield Promise.all(t.map(ht));return Qa(gi(e))}return Qa(Aa(a.files).map(t=>L(t)))})}function Qa(a){return a.filter(i=>dt.indexOf(i.name)===-1)}function Aa(a){if(a===null)return[];const i=[];for(let t=0;t<a.length;t++){const e=a[t];i.push(e)}return i}function ht(a){if(typeof a.webkitGetAsEntry!="function")return ai(a);const i=a.webkitGetAsEntry();return i&&i.isDirectory?hi(i):ai(a,i)}function gi(a){return a.reduce((i,t)=>[...i,...Array.isArray(t)?gi(t):[t]],[])}function ai(a,i){return P(this,void 0,void 0,function*(){var t;if(globalThis.isSecureContext&&typeof a.getAsFileSystemHandle=="function"){const o=yield a.getAsFileSystemHandle();if(o===null)throw new Error(`${a} is not a File`);if(o!==void 0){const p=yield o.getFile();return p.handle=o,L(p)}}const e=a.getAsFile();if(!e)throw new Error(`${a} is not a File`);return L(e,(t=i==null?void 0:i.fullPath)!==null&&t!==void 0?t:void 0)})}function bt(a){return P(this,void 0,void 0,function*(){return a.isDirectory?hi(a):yt(a)})}function hi(a){const i=a.createReader();return new Promise((t,e)=>{const n=[];function o(){i.readEntries(p=>P(this,void 0,void 0,function*(){if(p.length){const c=Promise.all(p.map(bt));n.push(c),o()}else try{const c=yield Promise.all(n);t(c)}catch(c){e(c)}}),p=>{e(p)})}o()})}function yt(a){return P(this,void 0,void 0,function*(){return new Promise((i,t)=>{a.file(e=>{const n=L(e,a.fullPath);i(n)},e=>{t(e)})})})}var Da=function(a,i){if(a&&i){var t=Array.isArray(i)?i:i.split(",");if(t.length===0)return!0;var e=a.name||"",n=(a.type||"").toLowerCase(),o=n.replace(/\/.*$/,"");return t.some(function(p){var c=p.trim().toLowerCase();return c.charAt(0)==="."?e.toLowerCase().endsWith(c):c.endsWith("/*")?o===c.replace(/\/.*$/,""):n===c})}return!0};function ii(a){return jt(a)||kt(a)||yi(a)||wt()}function wt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kt(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function jt(a){if(Array.isArray(a))return Ia(a)}function ti(a,i){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(a);i&&(e=e.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,e)}return t}function ei(a){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?ti(Object(t),!0).forEach(function(e){bi(a,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ti(Object(t)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(t,e))})}return a}function bi(a,i,t){return i in a?Object.defineProperty(a,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[i]=t,a}function N(a,i){return Dt(a)||zt(a,i)||yi(a,i)||Ft()}function Ft(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yi(a,i){if(a){if(typeof a=="string")return Ia(a,i);var t=Object.prototype.toString.call(a).slice(8,-1);if(t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set")return Array.from(a);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ia(a,i)}}function Ia(a,i){(i==null||i>a.length)&&(i=a.length);for(var t=0,e=new Array(i);t<i;t++)e[t]=a[t];return e}function zt(a,i){var t=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(t!=null){var e=[],n=!0,o=!1,p,c;try{for(t=t.call(a);!(n=(p=t.next()).done)&&(e.push(p.value),!(i&&e.length===i));n=!0);}catch(m){o=!0,c=m}finally{try{!n&&t.return!=null&&t.return()}finally{if(o)throw c}}return e}}function Dt(a){if(Array.isArray(a))return a}var Et=typeof Da=="function"?Da:Da.default,St="file-invalid-type",At="file-too-large",It="file-too-small",Ct="too-many-files",Ot=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=i.split(","),e=t.length>1?"one of ".concat(t.join(", ")):t[0];return{code:St,message:"File type must be ".concat(e)}},ni=function(i){return{code:At,message:"File is larger than ".concat(i," ").concat(i===1?"byte":"bytes")}},oi=function(i){return{code:It,message:"File is smaller than ".concat(i," ").concat(i===1?"byte":"bytes")}},Pt={code:Ct,message:"Too many files"};function wi(a,i){var t=a.type==="application/x-moz-file"||Et(a,i);return[t,t?null:Ot(i)]}function ki(a,i,t){if(C(a.size))if(C(i)&&C(t)){if(a.size>t)return[!1,ni(t)];if(a.size<i)return[!1,oi(i)]}else{if(C(i)&&a.size<i)return[!1,oi(i)];if(C(t)&&a.size>t)return[!1,ni(t)]}return[!0,null]}function C(a){return a!=null}function _t(a){var i=a.files,t=a.accept,e=a.minSize,n=a.maxSize,o=a.multiple,p=a.maxFiles,c=a.validator;return!o&&i.length>1||o&&p>=1&&i.length>p?!1:i.every(function(m){var z=wi(m,t),b=N(z,1),D=b[0],E=ki(m,e,n),S=N(E,1),B=S[0],V=c?c(m):null;return D&&B&&!V})}function pa(a){return typeof a.isPropagationStopped=="function"?a.isPropagationStopped():typeof a.cancelBubble<"u"?a.cancelBubble:!1}function ia(a){return a.dataTransfer?Array.prototype.some.call(a.dataTransfer.types,function(i){return i==="Files"||i==="application/x-moz-file"}):!!a.target&&!!a.target.files}function pi(a){a.preventDefault()}function Mt(a){return a.indexOf("MSIE")!==-1||a.indexOf("Trident/")!==-1}function Tt(a){return a.indexOf("Edge/")!==-1}function Ut(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Mt(a)||Tt(a)}function F(){for(var a=arguments.length,i=new Array(a),t=0;t<a;t++)i[t]=arguments[t];return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),p=1;p<n;p++)o[p-1]=arguments[p];return i.some(function(c){return!pa(e)&&c&&c.apply(void 0,[e].concat(o)),pa(e)})}}function Rt(){return"showOpenFilePicker"in window}function qt(a){if(C(a)){var i=Object.entries(a).filter(function(t){var e=N(t,2),n=e[0],o=e[1],p=!0;return ji(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),p=!1),(!Array.isArray(o)||!o.every(Fi))&&(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),p=!1),p}).reduce(function(t,e){var n=N(e,2),o=n[0],p=n[1];return ei(ei({},t),{},bi({},o,p))},{});return[{description:"Files",accept:i}]}return a}function Lt(a){if(C(a))return Object.entries(a).reduce(function(i,t){var e=N(t,2),n=e[0],o=e[1];return[].concat(ii(i),[n],ii(o))},[]).filter(function(i){return ji(i)||Fi(i)}).join(",")}function Bt(a){return a instanceof DOMException&&(a.name==="AbortError"||a.code===a.ABORT_ERR)}function Vt(a){return a instanceof DOMException&&(a.name==="SecurityError"||a.code===a.SECURITY_ERR)}function ji(a){return a==="audio/*"||a==="video/*"||a==="image/*"||a==="text/*"||a==="application/*"||/\w+\/[-+.\w]+/g.test(a)}function Fi(a){return/^.*\.[\w]+$/.test(a)}var Ht=["children"],$t=["open"],Wt=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Nt=["refKey","onChange","onClick"];function Kt(a){return Gt(a)||Yt(a)||zi(a)||Xt()}function Xt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yt(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Gt(a){if(Array.isArray(a))return Ca(a)}function Ea(a,i){return Qt(a)||Zt(a,i)||zi(a,i)||Jt()}function Jt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zi(a,i){if(a){if(typeof a=="string")return Ca(a,i);var t=Object.prototype.toString.call(a).slice(8,-1);if(t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set")return Array.from(a);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ca(a,i)}}function Ca(a,i){(i==null||i>a.length)&&(i=a.length);for(var t=0,e=new Array(i);t<i;t++)e[t]=a[t];return e}function Zt(a,i){var t=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(t!=null){var e=[],n=!0,o=!1,p,c;try{for(t=t.call(a);!(n=(p=t.next()).done)&&(e.push(p.value),!(i&&e.length===i));n=!0);}catch(m){o=!0,c=m}finally{try{!n&&t.return!=null&&t.return()}finally{if(o)throw c}}return e}}function Qt(a){if(Array.isArray(a))return a}function li(a,i){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(a);i&&(e=e.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,e)}return t}function f(a){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?li(Object(t),!0).forEach(function(e){Oa(a,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):li(Object(t)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(t,e))})}return a}function Oa(a,i,t){return i in a?Object.defineProperty(a,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[i]=t,a}function la(a,i){if(a==null)return{};var t=ae(a,i),e,n;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);for(n=0;n<o.length;n++)e=o[n],!(i.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(a,e)&&(t[e]=a[e])}return t}function ae(a,i){if(a==null)return{};var t={},e=Object.keys(a),n,o;for(o=0;o<e.length;o++)n=e[o],!(i.indexOf(n)>=0)&&(t[n]=a[n]);return t}var da=s.forwardRef(function(a,i){var t=a.children,e=la(a,Ht),n=ie(e),o=n.open,p=la(n,$t);return s.useImperativeHandle(i,function(){return{open:o}},[o]),mi.createElement(s.Fragment,null,t(f(f({},p),{},{open:o})))});da.displayName="Dropzone";var Di={disabled:!1,getFilesFromEvent:mt,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};da.defaultProps=Di;da.propTypes={children:u.func,accept:u.objectOf(u.arrayOf(u.string)),multiple:u.bool,preventDropOnDocument:u.bool,noClick:u.bool,noKeyboard:u.bool,noDrag:u.bool,noDragEventsBubbling:u.bool,minSize:u.number,maxSize:u.number,maxFiles:u.number,disabled:u.bool,getFilesFromEvent:u.func,onFileDialogCancel:u.func,onFileDialogOpen:u.func,useFsAccessApi:u.bool,autoFocus:u.bool,onDragEnter:u.func,onDragLeave:u.func,onDragOver:u.func,onDrop:u.func,onDropAccepted:u.func,onDropRejected:u.func,onError:u.func,validator:u.func};var Pa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ie(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=f(f({},Di),a),t=i.accept,e=i.disabled,n=i.getFilesFromEvent,o=i.maxSize,p=i.minSize,c=i.multiple,m=i.maxFiles,z=i.onDragEnter,b=i.onDragLeave,D=i.onDragOver,E=i.onDrop,S=i.onDropAccepted,B=i.onDropRejected,V=i.onFileDialogCancel,ma=i.onFileDialogOpen,Ma=i.useFsAccessApi,Ta=i.autoFocus,ua=i.preventDropOnDocument,Ua=i.noClick,fa=i.noKeyboard,Ra=i.noDrag,A=i.noDragEventsBubbling,va=i.onError,H=i.validator,$=s.useMemo(function(){return Lt(t)},[t]),qa=s.useMemo(function(){return qt(t)},[t]),xa=s.useMemo(function(){return typeof ma=="function"?ma:ci},[ma]),K=s.useMemo(function(){return typeof V=="function"?V:ci},[V]),h=s.useRef(null),k=s.useRef(null),Ui=s.useReducer(te,Pa),La=Ea(Ui,2),ga=La[0],y=La[1],Ri=ga.isFocused,Ba=ga.isFileDialogActive,X=s.useRef(typeof window<"u"&&window.isSecureContext&&Ma&&Rt()),Va=function(){!X.current&&Ba&&setTimeout(function(){if(k.current){var r=k.current.files;r.length||(y({type:"closeDialog"}),K())}},300)};s.useEffect(function(){return window.addEventListener("focus",Va,!1),function(){window.removeEventListener("focus",Va,!1)}},[k,Ba,K,X]);var _=s.useRef([]),Ha=function(r){h.current&&h.current.contains(r.target)||(r.preventDefault(),_.current=[])};s.useEffect(function(){return ua&&(document.addEventListener("dragover",pi,!1),document.addEventListener("drop",Ha,!1)),function(){ua&&(document.removeEventListener("dragover",pi),document.removeEventListener("drop",Ha))}},[h,ua]),s.useEffect(function(){return!e&&Ta&&h.current&&h.current.focus(),function(){}},[h,Ta,e]);var I=s.useCallback(function(l){va?va(l):console.error(l)},[va]),$a=s.useCallback(function(l){l.preventDefault(),l.persist(),Z(l),_.current=[].concat(Kt(_.current),[l.target]),ia(l)&&Promise.resolve(n(l)).then(function(r){if(!(pa(l)&&!A)){var v=r.length,g=v>0&&_t({files:r,accept:$,minSize:p,maxSize:o,multiple:c,maxFiles:m,validator:H}),w=v>0&&!g;y({isDragAccept:g,isDragReject:w,isDragActive:!0,type:"setDraggedFiles"}),z&&z(l)}}).catch(function(r){return I(r)})},[n,z,I,A,$,p,o,c,m,H]),Wa=s.useCallback(function(l){l.preventDefault(),l.persist(),Z(l);var r=ia(l);if(r&&l.dataTransfer)try{l.dataTransfer.dropEffect="copy"}catch{}return r&&D&&D(l),!1},[D,A]),Na=s.useCallback(function(l){l.preventDefault(),l.persist(),Z(l);var r=_.current.filter(function(g){return h.current&&h.current.contains(g)}),v=r.indexOf(l.target);v!==-1&&r.splice(v,1),_.current=r,!(r.length>0)&&(y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ia(l)&&b&&b(l))},[h,b,A]),Y=s.useCallback(function(l,r){var v=[],g=[];l.forEach(function(w){var W=wi(w,$),U=Ea(W,2),ba=U[0],ya=U[1],wa=ki(w,p,o),Q=Ea(wa,2),ka=Q[0],ja=Q[1],Fa=H?H(w):null;if(ba&&ka&&!Fa)v.push(w);else{var za=[ya,ja];Fa&&(za=za.concat(Fa)),g.push({file:w,errors:za.filter(function(Vi){return Vi})})}}),(!c&&v.length>1||c&&m>=1&&v.length>m)&&(v.forEach(function(w){g.push({file:w,errors:[Pt]})}),v.splice(0)),y({acceptedFiles:v,fileRejections:g,isDragReject:g.length>0,type:"setFiles"}),E&&E(v,g,r),g.length>0&&B&&B(g,r),v.length>0&&S&&S(v,r)},[y,c,$,p,o,m,E,S,B,H]),G=s.useCallback(function(l){l.preventDefault(),l.persist(),Z(l),_.current=[],ia(l)&&Promise.resolve(n(l)).then(function(r){pa(l)&&!A||Y(r,l)}).catch(function(r){return I(r)}),y({type:"reset"})},[n,Y,I,A]),M=s.useCallback(function(){if(X.current){y({type:"openDialog"}),xa();var l={multiple:c,types:qa};window.showOpenFilePicker(l).then(function(r){return n(r)}).then(function(r){Y(r,null),y({type:"closeDialog"})}).catch(function(r){Bt(r)?(K(r),y({type:"closeDialog"})):Vt(r)?(X.current=!1,k.current?(k.current.value=null,k.current.click()):I(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):I(r)});return}k.current&&(y({type:"openDialog"}),xa(),k.current.value=null,k.current.click())},[y,xa,K,Ma,Y,I,qa,c]),Ka=s.useCallback(function(l){!h.current||!h.current.isEqualNode(l.target)||(l.key===" "||l.key==="Enter"||l.keyCode===32||l.keyCode===13)&&(l.preventDefault(),M())},[h,M]),Xa=s.useCallback(function(){y({type:"focus"})},[]),Ya=s.useCallback(function(){y({type:"blur"})},[]),Ga=s.useCallback(function(){Ua||(Ut()?setTimeout(M,0):M())},[Ua,M]),T=function(r){return e?null:r},ha=function(r){return fa?null:T(r)},J=function(r){return Ra?null:T(r)},Z=function(r){A&&r.stopPropagation()},qi=s.useMemo(function(){return function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=l.refKey,v=r===void 0?"ref":r,g=l.role,w=l.onKeyDown,W=l.onFocus,U=l.onBlur,ba=l.onClick,ya=l.onDragEnter,wa=l.onDragOver,Q=l.onDragLeave,ka=l.onDrop,ja=la(l,Wt);return f(f(Oa({onKeyDown:ha(F(w,Ka)),onFocus:ha(F(W,Xa)),onBlur:ha(F(U,Ya)),onClick:T(F(ba,Ga)),onDragEnter:J(F(ya,$a)),onDragOver:J(F(wa,Wa)),onDragLeave:J(F(Q,Na)),onDrop:J(F(ka,G)),role:typeof g=="string"&&g!==""?g:"presentation"},v,h),!e&&!fa?{tabIndex:0}:{}),ja)}},[h,Ka,Xa,Ya,Ga,$a,Wa,Na,G,fa,Ra,e]),Li=s.useCallback(function(l){l.stopPropagation()},[]),Bi=s.useMemo(function(){return function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=l.refKey,v=r===void 0?"ref":r,g=l.onChange,w=l.onClick,W=la(l,Nt),U=Oa({accept:$,multiple:c,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:T(F(g,G)),onClick:T(F(w,Li)),tabIndex:-1},v,k);return f(f({},U),W)}},[k,t,c,G,e]);return f(f({},ga),{},{isFocused:Ri&&!e,getRootProps:qi,getInputProps:Bi,rootRef:h,inputRef:k,open:T(M)})}function te(a,i){switch(i.type){case"focus":return f(f({},a),{},{isFocused:!0});case"blur":return f(f({},a),{},{isFocused:!1});case"openDialog":return f(f({},Pa),{},{isFileDialogActive:!0});case"closeDialog":return f(f({},a),{},{isFileDialogActive:!1});case"setDraggedFiles":return f(f({},a),{},{isDragActive:i.isDragActive,isDragAccept:i.isDragAccept,isDragReject:i.isDragReject});case"setFiles":return f(f({},a),{},{acceptedFiles:i.acceptedFiles,fileRejections:i.fileRejections,isDragReject:i.isDragReject});case"reset":return f({},Pa);default:return a}}function ci(){}const Ei=x("section",{target:"e1blfcsg0"})(({isDisabled:a,theme:i})=>({display:"flex",alignItems:"center",padding:i.spacing.lg,backgroundColor:i.colors.secondaryBg,borderRadius:i.radii.default,border:i.colors.widgetBorderColor?`${i.sizes.borderWidth} solid ${i.colors.widgetBorderColor}`:void 0,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${i.colors.primary}`},color:a?i.colors.gray:i.colors.bodyText})),Si=x("div",{target:"e1blfcsg1"})({marginRight:"auto",alignItems:"center",display:"flex"}),Ai=x("span",{target:"e1blfcsg2"})(({theme:a})=>({color:a.colors.darkenedBgMix100,marginRight:a.spacing.lg})),ee=x("span",{target:"e1blfcsg3"})(({theme:a})=>({marginBottom:a.spacing.twoXS})),ne=x("div",{target:"e1blfcsg4"})({display:"flex",flexDirection:"column"}),Ii=x("div",{target:"e1blfcsg5"})(({theme:a})=>({left:0,right:0,lineHeight:a.lineHeights.tight,paddingTop:a.spacing.md,paddingLeft:a.spacing.lg,paddingRight:a.spacing.lg})),oe=x("ul",{target:"e1blfcsg6"})(({theme:a})=>({listStyleType:"none",margin:a.spacing.none,padding:a.spacing.none})),Ci=x("li",{target:"e1blfcsg7"})(({theme:a})=>({margin:a.spacing.none,padding:a.spacing.none})),Oi=x("div",{target:"e1blfcsg8"})(({theme:a})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:a.spacing.lg,overflow:"hidden"})),Pi=x("div",{target:"e1blfcsg9"})(({theme:a})=>({marginRight:a.spacing.sm,marginBottom:a.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),_i=x("div",{target:"e1blfcsg10"})(({theme:a})=>({display:"flex",alignItems:"center",marginBottom:a.spacing.twoXS})),pe=x("span",{target:"e1blfcsg11"})(({theme:a})=>({marginRight:a.spacing.twoXS})),le=x("div",{target:"e1blfcsg12"})(({theme:a})=>({display:"flex",padding:a.spacing.twoXS,color:a.colors.darkenedBgMix100})),Mi=x("small",{target:"e1blfcsg13"})(({theme:a})=>({color:a.colors.danger,fontSize:a.fontSizes.sm,height:a.fontSizes.sm,lineHeight:a.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),Ti=x("span",{target:"e1blfcsg14"})({}),ri=a=>({[Ei]:{display:"flex",flexDirection:"column",alignItems:"flex-start"},[Si]:{marginBottom:a.spacing.lg},[Ai]:{display:"none"},[Ii]:{paddingRight:a.spacing.lg},[_i]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:a.spacing.sm},[Pi]:{width:a.sizes.full},[Oi]:{flexDirection:"column"},[Mi]:{height:"auto",whiteSpace:"initial"},[Ti]:{display:"none"},[Ci]:{margin:a.spacing.none,padding:a.spacing.none}}),ce=x("div",{target:"e1blfcsg15"})(({theme:a})=>a.inSidebar?ri(a):{[`@media (max-width: ${a.breakpoints.sm})`]:ri(a)});var si;(function(a){a.DANGER="danger"})(si||(si={}));const _a=x("small",{target:"ejh2rmr0"})(({kind:a,theme:i})=>{const{danger:t,fadedText60:e}=i.colors;return{color:a==="danger"?t:e,fontSize:i.fontSizes.sm,lineHeight:i.lineHeights.tight}}),re=({multiple:a,acceptedExtensions:i,maxSizeBytes:t})=>j(Si,{"data-testid":"stFileUploaderDropzoneInstructions",children:[d(Ai,{children:d(q,{content:fi,size:"threeXL"})}),j(ne,{children:[j(ee,{children:["Drag and drop file",a?"s":""," here"]}),j(_a,{children:[`Limit ${sa(t,O.Byte,0)} per file`,i.length?` • ${i.map(e=>e.replace(/^\./,"").toUpperCase()).join(", ")}`:null]})]})]});function se(a){return a.length?{STREAMLIT_MIME_TYPE:a}:void 0}const de=({onDrop:a,multiple:i,acceptedExtensions:t,maxSizeBytes:e,disabled:n,label:o})=>d(da,{onDrop:a,multiple:i,accept:se(t),maxSize:e,disabled:n,useFsAccessApi:!1,children:({getRootProps:p,getInputProps:c})=>j(Ei,{...p(),"data-testid":"stFileUploaderDropzone",isDisabled:n,"aria-label":o,children:[d("input",{"data-testid":"stFileUploaderDropzoneInput",...c()}),d(re,{multiple:i,acceptedExtensions:t,maxSizeBytes:e}),d(ta,{kind:ea.SECONDARY,disabled:n,size:$i.SMALL,children:"Browse files"})]})}),me=x("div",{target:"egc9vxm0"})(({theme:a})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:a.spacing.twoXS,marginBottom:a.spacing.twoXS})),ue=x("div",{target:"egc9vxm1"})(({theme:a})=>({display:"flex",alignItems:"center",justifyContent:"center",color:a.colors.fadedText40})),fe=({currentPage:a,totalPages:i,onNext:t,onPrevious:e})=>j(me,{"data-testid":"stFileUploaderPagination",children:[d(_a,{children:`Showing page ${a} of ${i}`}),j(ue,{children:[d(ta,{onClick:e,kind:ea.MINIMAL,children:d(q,{content:Wi,size:"xl"})}),d(ta,{onClick:t,kind:ea.MINIMAL,children:d(q,{content:Ni,size:"xl"})})]})]}),di=(a,i)=>Math.ceil(a.length/i),ve=a=>Ki(({pageSize:t,items:e,resetOnAdd:n,...o})=>{const[p,c]=s.useState(0),[m,z]=s.useState(di(e,t)),b=lt(e);s.useEffect(()=>{b&&b.length!==e.length&&z(di(e,t)),b&&b.length<e.length?n&&c(0):p+1>=m&&c(m-1)},[e,p,t,b,n,m]);const D=()=>{c(Math.min(p+1,m-1))},E=()=>{c(Math.max(0,p-1))},S=e.slice(p*t,p*t+t);return j(Xi,{children:[d(a,{items:S,...o}),e.length>t?d(fe,{pageSize:t,totalPages:m,currentPage:p+1,onNext:D,onPrevious:E}):null]})},a),xe=({fileInfo:a})=>a.status.type==="uploading"?d(pt,{value:a.status.progress,size:ot.SMALL}):a.status.type==="error"?j(Mi,{children:[d(pe,{"data-testid":"stFileUploaderFileErrorMessage",children:a.status.errorMessage}),d(Ti,{children:d(q,{content:vi,size:"lg"})})]}):a.status.type==="uploaded"?d(_a,{children:sa(a.size,O.Byte)}):null,ge=({fileInfo:a,onDelete:i})=>j(_i,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[d(le,{children:d(q,{content:xi,size:"twoXL"})}),j(Oi,{className:"stFileUploaderFileData",children:[d(Pi,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:a.name,children:a.name}),d(xe,{fileInfo:a})]}),d("div",{"data-testid":"stFileUploaderDeleteBtn",children:d(ta,{onClick:()=>i(a.id),kind:ea.MINIMAL,children:d(q,{content:ui,size:"lg"})})})]}),he=({items:a,onDelete:i})=>d(oe,{children:a.map(t=>d(Ci,{children:d(ge,{fileInfo:t,onDelete:i})},t.id))}),be=ve(he),ye=a=>d(Ii,{children:d(be,{...a})});class De extends mi.PureComponent{constructor(i){super(i),this.formClearHelper=new nt,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:e,widgetMgr:n,fragmentId:o}=this.props,p=n.getFileUploaderStateValue(e);Yi(t,p)||n.setFileUploaderStateValue(e,t,{fromUi:!0},o)},this.reset=()=>{this.setState({files:[]})},this.dropHandler=(t,e)=>{const{element:n}=this.props,{multipleFiles:o}=n;if(!o&&t.length===0&&e.length>1){const p=e.findIndex(c=>c.errors.length===1&&c.errors[0].code==="too-many-files");p>=0&&(t.push(e[p].file),e.splice(p,1))}if(this.props.uploadClient.fetchFileURLs(t).then(p=>{if(!o&&t.length>0){const c=this.state.files.find(m=>m.status.type!=="error");c&&(this.forceUpdatingStatus=!0,this.deleteFile(c.id),this.forceUpdatingStatus=!1)}Gi(p,t).forEach(([c,m])=>{this.uploadFile(c,m)})}).catch(p=>{this.addFiles(t.map(c=>new aa(c.name,c.size,this.nextLocalFileId(),{type:"error",errorMessage:p})))}),e.length>0){const p=e.map(c=>{const{file:m}=c;return new aa(m.name,m.size,this.nextLocalFileId(),{type:"error",errorMessage:this.getErrorMessage(c.errors[0].code,c.file)})});this.addFiles(p)}},this.uploadFile=(t,e)=>{const n=Ja.CancelToken.source(),o=new aa(e.name,e.size,this.nextLocalFileId(),{type:"uploading",cancelToken:n,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,e,p=>this.onUploadProgress(p,o.id),n.token).then(()=>this.onUploadComplete(o.id,t)).catch(p=>{Ja.isCancel(p)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:p?p.toString():"Unknown error"}))})},this.onUploadComplete=(t,e)=>{const n=this.getFile(t);R(n)||n.status.type!=="uploading"||this.updateFile(n.id,n.setStatus({type:"uploaded",fileId:e.fileId,fileUrls:e}))},this.getErrorMessage=(t,e)=>{switch(t){case"file-too-large":return`File must be ${sa(this.maxUploadSizeInBytes,O.Byte)} or smaller.`;case"file-invalid-type":return`${e.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 e=this.getFile(t);R(e)||(e.status.type==="uploading"&&e.status.cancelToken.cancel(),e.status.type==="uploaded"&&e.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(e.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{this.setState(e=>({files:[...e.files,t]}))},this.addFiles=t=>{this.setState(e=>({files:[...e.files,...t]}))},this.removeFile=t=>{this.setState(e=>({files:e.files.filter(n=>n.id!==t)}))},this.getFile=t=>this.state.files.find(e=>e.id===t),this.updateFile=(t,e)=>{this.setState(n=>({files:n.files.map(o=>o.id===t?e:o)}))},this.onUploadProgress=(t,e)=>{const n=this.getFile(e);if(R(n)||n.status.type!=="uploading")return;const o=Math.round(t.loaded*100/t.total);n.status.progress!==o&&this.updateFile(e,n.setStatus({type:"uploading",cancelToken:n.status.cancelToken,progress:o}))},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(R(t))return;const{widgetMgr:e,element:n,fragmentId:o}=this.props;e.setFileUploaderStateValue(n,t,{fromUi:!0},o)})},this.state=this.initialValue}get initialValue(){const i={files:[],newestServerFileId:0},{widgetMgr:t,element:e}=this.props,n=t.getFileUploaderStateValue(e);if(R(n))return i;const{uploadedFileInfo:o}=n;return R(o)||o.length===0?i:{files:o.map(p=>{const c=p.name,m=p.size,z=p.fileId,b=p.fileUrls;return new aa(c,m,this.nextLocalFileId(),{type:"uploaded",fileId:z,fileUrls:b})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const i=this.props.element.maxUploadSizeMb;return ct(i,O.Megabyte,O.Byte)}get status(){const i=t=>t.status.type==="uploading";return this.state.files.some(i)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const i=this.createWidgetValue(),{element:t,widgetMgr:e,fragmentId:n}=this.props;e.getFileUploaderStateValue(t)===void 0&&e.setFileUploaderStateValue(t,i,{fromUi:!1},n)}createWidgetValue(){const i=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:e,size:n,status:o}=t,{fileId:p,fileUrls:c}=o;return new Ji({fileId:p,fileUrls:c,name:e,size:n})});return new Zi({uploadedFileInfo:i})}render(){var c;const{files:i}=this.state,{element:t,disabled:e,widgetMgr:n}=this.props,o=t.type;this.formClearHelper.manageFormClearListener(n,t.formId,this.onFormCleared);const p=i.slice().reverse();return j(ce,{className:"stFileUploader","data-testid":"stFileUploader",children:[d(et,{label:t.label,disabled:e,labelVisibility:Qi((c=t.labelVisibility)==null?void 0:c.value),children:t.help&&d(at,{children:d(it,{content:t.help,placement:tt.TOP_RIGHT})})}),d(de,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:o,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:e}),p.length>0&&d(ye,{items:p,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0})]})}nextLocalFileId(){return this.localFileIdCounter++}}export{De as default};
@@ -1 +1 @@
1
- import{r as s,J as d,j as S,bt as x,c4 as U}from"./index.CvqaNor_.js";import{a as V}from"./useBasicWidgetState.BJFGEQDL.js";import"./FormClearHelper.mT4-5rFn.js";const v=(t,e)=>t.getIntValue(e),h=t=>t.default??null,C=t=>t.value??null,F=(t,e,o,a)=>{e.setIntValue(t,o.value,{fromUi:o.fromUi},a)},I=({disabled:t,element:e,widgetMgr:o,width:a,fragmentId:u})=>{const{options:n,help:c,label:i,labelVisibility:r,placeholder:m}=e,[f,l]=V({getStateFromWidgetMgr:v,getDefaultStateFromProto:h,getCurrStateFromProto:C,updateWidgetMgrState:F,element:e,widgetMgr:o,fragmentId:u}),g=s.useCallback(b=>{l({value:b,fromUi:!0})},[l]),p=d(e.default)&&!t;return S(U,{label:i,labelVisibility:x(r==null?void 0:r.value),options:n,disabled:t,width:a,onChange:g,value:f,help:c,placeholder:m,clearable:p})},E=s.memo(I);export{E as default};
1
+ import{r as s,J as d,j as S,bs as x,c3 as U}from"./index.7ACWibTY.js";import{a as V}from"./useBasicWidgetState.S-yUfhr7.js";import"./FormClearHelper.DZ1scmYc.js";const v=(t,e)=>t.getIntValue(e),h=t=>t.default??null,C=t=>t.value??null,F=(t,e,o,a)=>{e.setIntValue(t,o.value,{fromUi:o.fromUi},a)},I=({disabled:t,element:e,widgetMgr:o,width:a,fragmentId:u})=>{const{options:n,help:c,label:i,labelVisibility:r,placeholder:m}=e,[f,l]=V({getStateFromWidgetMgr:v,getDefaultStateFromProto:h,getCurrStateFromProto:C,updateWidgetMgrState:F,element:e,widgetMgr:o,fragmentId:u}),g=s.useCallback(b=>{l({value:b,fromUi:!0})},[l]),p=d(e.default)&&!t;return S(U,{label:i,labelVisibility:x(r==null?void 0:r.value),options:n,disabled:t,width:a,onChange:g,value:f,help:c,placeholder:m,clearable:p})},E=s.memo(I);export{E as default};
@@ -1 +1 @@
1
- import{r as i,j as g,bt as b,bN as m}from"./index.CvqaNor_.js";import{a as f}from"./useBasicWidgetState.BJFGEQDL.js";import"./FormClearHelper.mT4-5rFn.js";const p=(t,e)=>t.getStringValue(e),C=t=>t.default??null,d=t=>t.value??null,S=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},V=({element:t,disabled:e,widgetMgr:r,width:o,fragmentId:s})=>{var l;const[u,a]=f({getStateFromWidgetMgr:p,getDefaultStateFromProto:C,getCurrStateFromProto:d,updateWidgetMgrState:S,element:t,widgetMgr:r,fragmentId:s}),n=i.useCallback(c=>{a({value:c,fromUi:!0})},[a]);return g(m,{label:t.label,labelVisibility:b((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:n,disabled:e,width:o,value:u})},v=i.memo(V);export{v as default};
1
+ import{r as i,j as g,bs as b,bM as m}from"./index.7ACWibTY.js";import{a as f}from"./useBasicWidgetState.S-yUfhr7.js";import"./FormClearHelper.DZ1scmYc.js";const p=(t,e)=>t.getStringValue(e),C=t=>t.default??null,d=t=>t.value??null,S=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},V=({element:t,disabled:e,widgetMgr:r,width:o,fragmentId:s})=>{var l;const[u,a]=f({getStateFromWidgetMgr:p,getDefaultStateFromProto:C,getCurrStateFromProto:d,updateWidgetMgrState:S,element:t,widgetMgr:r,fragmentId:s}),n=i.useCallback(c=>{a({value:c,fromUi:!0})},[a]);return g(m,{label:t.label,labelVisibility:b((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:n,disabled:e,width:o,value:u})},v=i.memo(V);export{v as default};
@@ -1 +1 @@
1
- import{n as c,b7 as v,ay as y,b8 as l,b9 as t,j as s,ba as C,bb as S}from"./index.CvqaNor_.js";function k(o,i){switch(o){case l.XSMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.sm}`,fontSize:i.fontSizes.sm};case l.SMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.md}`};case l.LARGE:return{padding:`${i.spacing.md} ${i.spacing.md}`};default:return{padding:`${i.spacing.xs} ${i.spacing.md}`}}}const g=c("a",{target:"efj1jhq0"})(({fluidWidth:o,size:i,theme:r})=>{const a=typeof o=="number"?`${o}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?a:"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${y(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...k(i,r)}}),B=c(g,{target:"efj1jhq1"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),x=c(g,{target:"efj1jhq2"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),$=c(g,{target:"efj1jhq3"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${y(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function L({kind:o,size:i,disabled:r,fluidWidth:a,children:d,autoFocus:n,href:e,rel:b,target:u,onClick:f}){let p=B;return o===t.SECONDARY?p=x:o===t.TERTIARY&&(p=$),s(p,{kind:o,size:i||l.MEDIUM,fluidWidth:a||!1,disabled:r||!1,autoFocus:n||!1,href:e,target:u,rel:b,onClick:f,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}function T(o){const{disabled:i,element:r,width:a}=o,d={width:a};let n=t.SECONDARY;r.type==="primary"?n=t.PRIMARY:r.type==="tertiary"&&(n=t.TERTIARY);const e=r.help?a:!0,b=u=>{o.disabled&&u.preventDefault()};return s("div",{className:"stLinkButton","data-testid":"stLinkButton",style:d,children:s(C,{help:r.help,children:s(L,{kind:n,size:l.SMALL,disabled:i,onClick:b,fluidWidth:r.useContainerWidth?e:!1,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":i,children:s(S,{icon:r.icon,label:r.label})})})})}export{T as default};
1
+ import{n as c,b6 as v,ay as y,b7 as l,b8 as t,j as s,b9 as C,ba as S}from"./index.7ACWibTY.js";function k(o,i){switch(o){case l.XSMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.sm}`,fontSize:i.fontSizes.sm};case l.SMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.md}`};case l.LARGE:return{padding:`${i.spacing.md} ${i.spacing.md}`};default:return{padding:`${i.spacing.xs} ${i.spacing.md}`}}}const g=c("a",{target:"efj1jhq0"})(({fluidWidth:o,size:i,theme:r})=>{const a=typeof o=="number"?`${o}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?a:"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${y(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...k(i,r)}}),B=c(g,{target:"efj1jhq1"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),x=c(g,{target:"efj1jhq2"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),$=c(g,{target:"efj1jhq3"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${y(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function L({kind:o,size:i,disabled:r,fluidWidth:a,children:d,autoFocus:n,href:e,rel:u,target:b,onClick:f}){let p=B;return o===t.SECONDARY?p=x:o===t.TERTIARY&&(p=$),s(p,{kind:o,size:i||l.MEDIUM,fluidWidth:a||!1,disabled:r||!1,autoFocus:n||!1,href:e,target:b,rel:u,onClick:f,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}function T(o){const{disabled:i,element:r,width:a}=o,d={width:a};let n=t.SECONDARY;r.type==="primary"?n=t.PRIMARY:r.type==="tertiary"&&(n=t.TERTIARY);const e=r.help?a:!0,u=b=>{o.disabled&&b.preventDefault()};return s("div",{className:"stLinkButton","data-testid":"stLinkButton",style:d,children:s(C,{help:r.help,children:s(L,{kind:n,size:l.SMALL,disabled:i,onClick:u,fluidWidth:r.useContainerWidth?e:!1,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":i,children:s(S,{icon:r.icon,label:r.label})})})})}export{T as default};
@@ -1 +1 @@
1
- import{n as s,R as g,aG as b,bc as k,y as C,j as n,ba as v,bd as L,z as y,D as w,aF as S}from"./index.CvqaNor_.js";const T=s("div",{target:"e1xmaixs0"})({display:"flex",flexDirection:"column"}),h=s("a",{target:"e1xmaixs1"})(({disabled:a,isCurrentPage:o,fluidWidth:t,theme:e})=>({textDecoration:"none",width:typeof t=="number"?`${t}px`:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.default,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:o?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:o?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...a?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}})),D=s("span",{target:"e1xmaixs2"})(({disabled:a,theme:o})=>({color:o.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...a?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}:{}}));function P(a,o){return a===null&&o?!0:a===null&&!o?!1:a===!0}function H(a){const{onPageChange:o,currentPageScriptHash:t}=g.useContext(b),e=g.useContext(k),{colors:u}=C(),{disabled:l,element:r,width:i}=a,p={width:i},f=P(r.useContainerWidth,e),c=t===r.pageScriptHash,x=d=>{r.external?l&&d.preventDefault():(d.preventDefault(),l||o(r.pageScriptHash))};return n("div",{className:"stPageLink","data-testid":"stPageLink",style:p,children:n(v,{help:r.help,placement:L.TOP_RIGHT,children:n(T,{children:y(h,{"data-testid":"stPageLink-NavLink",disabled:l,isCurrentPage:c,fluidWidth:f?i:!1,href:r.page,target:r.external?"_blank":"",rel:"noreferrer",onClick:x,children:[r.icon&&n(w,{size:"lg",color:u.bodyText,iconValue:r.icon}),n(D,{disabled:l,children:n(S,{source:r.label,allowHTML:!1,isLabel:!0,boldLabel:c,largerLabel:!0,disableLinks:!0})})]})})})})}export{H as default};
1
+ import{n as s,R as g,aF as b,bb as k,y as C,j as n,b9 as v,bc as L,z as y,D as w,aE as S}from"./index.7ACWibTY.js";const T=s("div",{target:"e1xmaixs0"})({display:"flex",flexDirection:"column"}),h=s("a",{target:"e1xmaixs1"})(({disabled:a,isCurrentPage:o,fluidWidth:t,theme:e})=>({textDecoration:"none",width:typeof t=="number"?`${t}px`:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.default,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:o?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:o?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...a?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}})),D=s("span",{target:"e1xmaixs2"})(({disabled:a,theme:o})=>({color:o.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...a?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}:{}}));function P(a,o){return a===null&&o?!0:a===null&&!o?!1:a===!0}function H(a){const{onPageChange:o,currentPageScriptHash:t}=g.useContext(b),e=g.useContext(k),{colors:u}=C(),{disabled:l,element:r,width:i}=a,p={width:i},f=P(r.useContainerWidth,e),c=t===r.pageScriptHash,x=d=>{r.external?l&&d.preventDefault():(d.preventDefault(),l||o(r.pageScriptHash))};return n("div",{className:"stPageLink","data-testid":"stPageLink",style:p,children:n(v,{help:r.help,placement:L.TOP_RIGHT,children:n(T,{children:y(h,{"data-testid":"stPageLink-NavLink",disabled:l,isCurrentPage:c,fluidWidth:f?i:!1,href:r.page,target:r.external?"_blank":"",rel:"noreferrer",onClick:x,children:[r.icon&&n(w,{size:"lg",color:u.bodyText,iconValue:r.icon}),n(D,{disabled:l,children:n(S,{source:r.label,allowHTML:!1,isLabel:!0,boldLabel:c,largerLabel:!0,disableLinks:!0})})]})})})})}export{H as default};
@@ -1,4 +1,4 @@
1
- import{bx as w,r as g,bH as ae,bI as T,bJ as x,y as le,C as ce,j as S,bK as se,ay as ue,z as de,bt as fe,aF as ge,bC as he,bu as be,bd as me,bL as ve,bM as pe}from"./index.CvqaNor_.js";import{a as ye}from"./useBasicWidgetState.BJFGEQDL.js";import"./FormClearHelper.mT4-5rFn.js";var C=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),$e=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 xe(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 we(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=w("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 _=w("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,$=encodeURIComponent(`
1
+ import{bw as x,r as g,bG as ae,bH as T,bI as w,y as le,C as ce,j as S,bJ as se,ay as ue,z as de,bs as fe,aE as ge,bB as he,bt as be,bc as me,bK as ve,bL as pe}from"./index.7ACWibTY.js";import{a as ye}from"./useBasicWidgetState.S-yUfhr7.js";import"./FormClearHelper.DZ1scmYc.js";var L=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),$e=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,$=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>
@@ -6,4 +6,4 @@ import{bx as w,r as g,bH as ae,bI as T,bJ as x,y as le,C as ce,j as S,bK as se,a
6
6
  <svg width="17" height="13" viewBox="0 0 17 13" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <path d="M6.50002 12.6L0.400024 6.60002L2.60002 4.40002L6.50002 8.40002L13.9 0.900024L16.1 3.10002L6.50002 12.6Z" fill="`.concat(s,`"/>
8
8
  </svg>
9
- `)),h=l.borders.checkboxBorderRadius,b=ke(e);return{flex:"0 0 auto",transitionDuration:a.timing200,transitionTimingFunction:a.easeOutCurve,transitionProperty:"background-image, border-color, background-color",width:c.scale700,height:c.scale700,left:"4px",top:"4px",boxSizing:"border-box",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:"3px",borderRightWidth:"3px",borderTopWidth:"3px",borderBottomWidth:"3px",borderLeftColor:b,borderRightColor:b,borderTopColor:b,borderBottomColor:b,borderTopLeftRadius:h,borderTopRightRadius:h,borderBottomRightRadius:h,borderBottomLeftRadius:h,outline:n&&t?"3px solid ".concat(l.colors.accent):"none",display:"inline-block",verticalAlign:"middle",backgroundImage:i?"url('data:image/svg+xml,".concat($,"');"):t?"url('data:image/svg+xml,".concat(u,"');"):null,backgroundColor:xe(e),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",marginTop:l.sizing.scale0,marginBottom:l.sizing.scale0,marginLeft:l.sizing.scale0,marginRight:l.sizing.scale0}});_.displayName="Checkmark";_.displayName="Checkmark";var I=w("div",function(e){var t=e.$theme,o=t.typography;return P(P(P({verticalAlign:"middle"},Te(e)),{},{color:we(e)},o.LabelMedium),{},{lineHeight:"24px"})});I.displayName="Label";I.displayName="Label";var H=w("input",{opacity:0,width:0,height:0,overflow:"hidden",margin:0,padding:0,position:"absolute"});H.displayName="Input";H.displayName="Input";var z=w("div",function(e){var t=e.$theme.colors.toggleFill;return e.$disabled?t=e.$theme.colors.toggleFillDisabled:e.$checked&&e.$error?t=e.$theme.colors.tickFillErrorSelected:e.$checked&&(t=e.$theme.colors.toggleFillChecked),{backgroundColor:t,borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(e.$theme.colors.accent):e.$isHovered&&!e.$disabled?e.$theme.lighting.shadow500:e.$theme.lighting.shadow400,outline:"none",height:e.$theme.sizing.scale700,width:e.$theme.sizing.scale700,transform:e.$checked?"translateX(".concat(e.$theme.direction==="rtl"?"-100%":"100%",")"):null,transition:"transform ".concat(e.$theme.animation.timing200)}});z.displayName="Toggle";z.displayName="Toggle";var D=w("div",function(e){var t=e.$theme.colors.toggleTrackFill;return e.$disabled?t=e.$theme.colors.toggleTrackFillDisabled:e.$error&&e.$checked&&(t=e.$theme.colors.tickFillError),{alignItems:"center",backgroundColor:t,borderTopLeftRadius:"7px",borderTopRightRadius:"7px",borderBottomRightRadius:"7px",borderBottomLeftRadius:"7px",display:"flex",height:e.$theme.sizing.scale550,marginTop:e.$theme.sizing.scale200,marginBottom:e.$theme.sizing.scale100,marginLeft:e.$theme.sizing.scale200,marginRight:e.$theme.sizing.scale100,width:e.$theme.sizing.scale1000}});D.displayName="ToggleTrack";D.displayName="ToggleTrack";function E(e){"@babel/helpers - typeof";return E=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(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},y.apply(this,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e,t,o){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fe(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&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B(e,t)}function Le(e){var t=Pe();return function(){var r=F(e),i;if(t){var l=F(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(){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 F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},F(e)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Ee=function(t){return t.stopPropagation()},K=function(e){Fe(o,e);var t=Le(o);function o(){var r;Re(this,o);for(var i=arguments.length,l=new Array(i),n=0;n<i;n++)l[n]=arguments[n];return r=t.call.apply(t,[this].concat(l)),p(v(r),"state",{isFocused:r.props.autoFocus||!1,isFocusVisible:!1,isHovered:!1,isActive:!1}),p(v(r),"onMouseEnter",function(c){r.setState({isHovered:!0}),r.props.onMouseEnter(c)}),p(v(r),"onMouseLeave",function(c){r.setState({isHovered:!1,isActive:!1}),r.props.onMouseLeave(c)}),p(v(r),"onMouseDown",function(c){r.setState({isActive:!0}),r.props.onMouseDown(c)}),p(v(r),"onMouseUp",function(c){r.setState({isActive:!1}),r.props.onMouseUp(c)}),p(v(r),"onFocus",function(c){r.setState({isFocused:!0}),r.props.onFocus(c),ae(c)&&r.setState({isFocusVisible:!0})}),p(v(r),"onBlur",function(c){r.setState({isFocused:!1}),r.props.onBlur(c),r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1})}),r}return Ce(o,[{key:"componentDidMount",value:function(){var i=this.props,l=i.autoFocus,n=i.inputRef;l&&n.current&&n.current.focus()}},{key:"render",value:function(){var i=this.props,l=i.overrides,n=l===void 0?{}:l,c=i.onChange,a=i.labelPlacement,s=a===void 0?this.props.checkmarkType===C.toggle?"left":"right":a,$=i.inputRef,u=i.isIndeterminate,h=i.error,b=i.disabled,R=i.value,f=i.name,m=i.type,d=i.checked,L=i.children,O=i.required,Y=i.title,j=n.Root,V=n.Checkmark,W=n.Label,A=n.Input,N=n.Toggle,U=n.ToggleTrack,Z=T(j)||M,J=T(V)||_,Q=T(W)||I,ee=T(A)||H,te=T(N)||z,re=T(U)||D,oe={onChange:c,onFocus:this.onFocus,onBlur:this.onBlur},ie={onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},k={$isFocused:this.state.isFocused,$isFocusVisible:this.state.isFocusVisible,$isHovered:this.state.isHovered,$isActive:this.state.isActive,$error:h,$checked:d,$isIndeterminate:u,$required:O,$disabled:b,$value:R},X=L&&g.createElement(Q,y({$labelPlacement:s},k,x(W)),this.props.containsInteractiveElement?g.createElement("div",{onClick:function(ne){return ne.preventDefault()}},L):L);return g.createElement(Z,y({"data-baseweb":"checkbox",title:Y||null,$labelPlacement:s},k,ie,x(j)),(s==="top"||s==="left")&&X,this.props.checkmarkType===C.toggle?g.createElement(re,y({},k,x(U)),g.createElement(te,y({},k,x(N)))):g.createElement(J,y({},k,x(V))),g.createElement(ee,y({value:R,name:f,checked:d,required:O,"aria-label":this.props["aria-label"]||this.props.ariaLabel,"aria-checked":u?"mixed":d,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":h||null,"aria-required":O||null,disabled:b,type:m,ref:$,onClick:Ee},k,oe,x(A))),(s==="bottom"||s==="right")&&X)}}]),o}(g.Component);p(K,"defaultProps",{overrides:{},checked:!1,containsInteractiveElement:!1,disabled:!1,autoFocus:!1,isIndeterminate:!1,inputRef:g.createRef(),error:!1,type:"checkbox",checkmarkType:C.default,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Be({width:e,element:t,disabled:o,widgetMgr:r,fragmentId:i}){var R;const[l,n]=ye({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ie,updateWidgetMgrState:He,element:t,widgetMgr:r,fragmentId:i}),c=g.useCallback(f=>{n({value:f.target.checked,fromUi:!0})},[n]),a=le(),{colors:s,spacing:$,sizes:u}=a,h=ce(a),b=o?s.fadedText40:s.bodyText;return S(pe,{className:"row-widget stCheckbox","data-testid":"stCheckbox",width:e,children:S(K,{checked:l,disabled:o,onChange:c,"aria-label":t.label,checkmarkType:t.type===se.StyleType.TOGGLE?C.toggle:C.default,labelPlacement:$e.right,overrides:{Root:{style:({$isFocusVisible:f})=>({marginBottom:$.none,marginTop:$.none,backgroundColor:f?s.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:f})=>{let m=h?s.bgColor:s.bodyText;return o&&(m=h?s.gray70:s.gray90),{width:`calc(${u.checkbox} - ${a.spacing.twoXS})`,height:`calc(${u.checkbox} - ${a.spacing.twoXS})`,transform:f?`translateX(${u.checkbox})`:"",backgroundColor:m,boxShadow:""}}},ToggleTrack:{style:({$checked:f,$isHovered:m})=>{let d=s.fadedText40;return m&&!o&&(d=s.fadedText20),f&&!o&&(d=s.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:a.spacing.twoXS,paddingLeft:a.spacing.threeXS,paddingRight:a.spacing.threeXS,width:`calc(2 * ${u.checkbox})`,minWidth:`calc(2 * ${u.checkbox})`,height:u.checkbox,minHeight:u.checkbox,borderBottomLeftRadius:a.radii.full,borderTopLeftRadius:a.radii.full,borderBottomRightRadius:a.radii.full,borderTopRightRadius:a.radii.full,backgroundColor:d}}},Checkmark:{style:({$isFocusVisible:f,$checked:m})=>{const d=m&&!o?s.primary:s.fadedText40;return{outline:0,width:u.checkbox,height:u.checkbox,marginTop:a.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:f&&m?`0 0 0 0.2rem ${ue(s.primary,.5)}`:"",borderLeftWidth:u.borderWidth,borderRightWidth:u.borderWidth,borderTopWidth:u.borderWidth,borderBottomWidth:u.borderWidth,borderLeftColor:d,borderRightColor:d,borderTopColor:d,borderBottomColor:d}}},Label:{style:{lineHeight:a.lineHeights.small,paddingLeft:a.spacing.sm,position:"relative",color:b}}},children:de(ve,{visibility:fe((R=t.labelVisibility)==null?void 0:R.value),"data-testid":"stWidgetLabel",children:[S(ge,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&S(he,{color:b,children:S(be,{content:t.help,placement:me.TOP_RIGHT})})]})})})}function Me(e,t){return e.getBoolValue(t)}function _e(e){return e.default??null}function Ie(e){return e.value??null}function He(e,t,o,r){t.setBoolValue(e,o.value,{fromUi:o.fromUi},r)}const We=g.memo(Be);export{We as default};
9
+ `)),h=l.borders.checkboxBorderRadius,b=ke(e);return{flex:"0 0 auto",transitionDuration:a.timing200,transitionTimingFunction:a.easeOutCurve,transitionProperty:"background-image, border-color, background-color",width:c.scale700,height:c.scale700,left:"4px",top:"4px",boxSizing:"border-box",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:"3px",borderRightWidth:"3px",borderTopWidth:"3px",borderBottomWidth:"3px",borderLeftColor:b,borderRightColor:b,borderTopColor:b,borderBottomColor:b,borderTopLeftRadius:h,borderTopRightRadius:h,borderBottomRightRadius:h,borderBottomLeftRadius:h,outline:n&&t?"3px solid ".concat(l.colors.accent):"none",display:"inline-block",verticalAlign:"middle",backgroundImage:i?"url('data:image/svg+xml,".concat($,"');"):t?"url('data:image/svg+xml,".concat(u,"');"):null,backgroundColor:we(e),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",marginTop:l.sizing.scale0,marginBottom:l.sizing.scale0,marginLeft:l.sizing.scale0,marginRight:l.sizing.scale0}});_.displayName="Checkmark";_.displayName="Checkmark";var I=x("div",function(e){var t=e.$theme,o=t.typography;return P(P(P({verticalAlign:"middle"},Te(e)),{},{color:xe(e)},o.LabelMedium),{},{lineHeight:"24px"})});I.displayName="Label";I.displayName="Label";var H=x("input",{opacity:0,width:0,height:0,overflow:"hidden",margin:0,padding:0,position:"absolute"});H.displayName="Input";H.displayName="Input";var z=x("div",function(e){var t=e.$theme.colors.toggleFill;return e.$disabled?t=e.$theme.colors.toggleFillDisabled:e.$checked&&e.$error?t=e.$theme.colors.tickFillErrorSelected:e.$checked&&(t=e.$theme.colors.toggleFillChecked),{backgroundColor:t,borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(e.$theme.colors.accent):e.$isHovered&&!e.$disabled?e.$theme.lighting.shadow500:e.$theme.lighting.shadow400,outline:"none",height:e.$theme.sizing.scale700,width:e.$theme.sizing.scale700,transform:e.$checked?"translateX(".concat(e.$theme.direction==="rtl"?"-100%":"100%",")"):null,transition:"transform ".concat(e.$theme.animation.timing200)}});z.displayName="Toggle";z.displayName="Toggle";var D=x("div",function(e){var t=e.$theme.colors.toggleTrackFill;return e.$disabled?t=e.$theme.colors.toggleTrackFillDisabled:e.$error&&e.$checked&&(t=e.$theme.colors.tickFillError),{alignItems:"center",backgroundColor:t,borderTopLeftRadius:"7px",borderTopRightRadius:"7px",borderBottomRightRadius:"7px",borderBottomLeftRadius:"7px",display:"flex",height:e.$theme.sizing.scale550,marginTop:e.$theme.sizing.scale200,marginBottom:e.$theme.sizing.scale100,marginLeft:e.$theme.sizing.scale200,marginRight:e.$theme.sizing.scale100,width:e.$theme.sizing.scale1000}});D.displayName="ToggleTrack";D.displayName="ToggleTrack";function E(e){"@babel/helpers - typeof";return E=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(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},y.apply(this,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Le(e,t,o){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ce(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&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B(e,t)}function Fe(e){var t=Pe();return function(){var r=C(e),i;if(t){var l=C(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},C(e)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Ee=function(t){return t.stopPropagation()},K=function(e){Ce(o,e);var t=Fe(o);function o(){var r;Re(this,o);for(var i=arguments.length,l=new Array(i),n=0;n<i;n++)l[n]=arguments[n];return r=t.call.apply(t,[this].concat(l)),p(v(r),"state",{isFocused:r.props.autoFocus||!1,isFocusVisible:!1,isHovered:!1,isActive:!1}),p(v(r),"onMouseEnter",function(c){r.setState({isHovered:!0}),r.props.onMouseEnter(c)}),p(v(r),"onMouseLeave",function(c){r.setState({isHovered:!1,isActive:!1}),r.props.onMouseLeave(c)}),p(v(r),"onMouseDown",function(c){r.setState({isActive:!0}),r.props.onMouseDown(c)}),p(v(r),"onMouseUp",function(c){r.setState({isActive:!1}),r.props.onMouseUp(c)}),p(v(r),"onFocus",function(c){r.setState({isFocused:!0}),r.props.onFocus(c),ae(c)&&r.setState({isFocusVisible:!0})}),p(v(r),"onBlur",function(c){r.setState({isFocused:!1}),r.props.onBlur(c),r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1})}),r}return Le(o,[{key:"componentDidMount",value:function(){var i=this.props,l=i.autoFocus,n=i.inputRef;l&&n.current&&n.current.focus()}},{key:"render",value:function(){var i=this.props,l=i.overrides,n=l===void 0?{}:l,c=i.onChange,a=i.labelPlacement,s=a===void 0?this.props.checkmarkType===L.toggle?"left":"right":a,$=i.inputRef,u=i.isIndeterminate,h=i.error,b=i.disabled,R=i.value,f=i.name,m=i.type,d=i.checked,F=i.children,O=i.required,Y=i.title,j=n.Root,V=n.Checkmark,W=n.Label,A=n.Input,N=n.Toggle,U=n.ToggleTrack,Z=T(j)||M,J=T(V)||_,Q=T(W)||I,ee=T(A)||H,te=T(N)||z,re=T(U)||D,oe={onChange:c,onFocus:this.onFocus,onBlur:this.onBlur},ie={onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},k={$isFocused:this.state.isFocused,$isFocusVisible:this.state.isFocusVisible,$isHovered:this.state.isHovered,$isActive:this.state.isActive,$error:h,$checked:d,$isIndeterminate:u,$required:O,$disabled:b,$value:R},X=F&&g.createElement(Q,y({$labelPlacement:s},k,w(W)),this.props.containsInteractiveElement?g.createElement("div",{onClick:function(ne){return ne.preventDefault()}},F):F);return g.createElement(Z,y({"data-baseweb":"checkbox",title:Y||null,$labelPlacement:s},k,ie,w(j)),(s==="top"||s==="left")&&X,this.props.checkmarkType===L.toggle?g.createElement(re,y({},k,w(U)),g.createElement(te,y({},k,w(N)))):g.createElement(J,y({},k,w(V))),g.createElement(ee,y({value:R,name:f,checked:d,required:O,"aria-label":this.props["aria-label"]||this.props.ariaLabel,"aria-checked":u?"mixed":d,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":h||null,"aria-required":O||null,disabled:b,type:m,ref:$,onClick:Ee},k,oe,w(A))),(s==="bottom"||s==="right")&&X)}}]),o}(g.Component);p(K,"defaultProps",{overrides:{},checked:!1,containsInteractiveElement:!1,disabled:!1,autoFocus:!1,isIndeterminate:!1,inputRef:g.createRef(),error:!1,type:"checkbox",checkmarkType:L.default,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Be({width:e,element:t,disabled:o,widgetMgr:r,fragmentId:i}){var R;const[l,n]=ye({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ie,updateWidgetMgrState:He,element:t,widgetMgr:r,fragmentId:i}),c=g.useCallback(f=>{n({value:f.target.checked,fromUi:!0})},[n]),a=le(),{colors:s,spacing:$,sizes:u}=a,h=ce(a),b=o?s.fadedText40:s.bodyText;return S(pe,{className:"row-widget stCheckbox","data-testid":"stCheckbox",width:e,children:S(K,{checked:l,disabled:o,onChange:c,"aria-label":t.label,checkmarkType:t.type===se.StyleType.TOGGLE?L.toggle:L.default,labelPlacement:$e.right,overrides:{Root:{style:({$isFocusVisible:f})=>({marginBottom:$.none,marginTop:$.none,backgroundColor:f?s.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:f})=>{let m=h?s.bgColor:s.bodyText;return o&&(m=h?s.gray70:s.gray90),{width:`calc(${u.checkbox} - ${a.spacing.twoXS})`,height:`calc(${u.checkbox} - ${a.spacing.twoXS})`,transform:f?`translateX(${u.checkbox})`:"",backgroundColor:m,boxShadow:""}}},ToggleTrack:{style:({$checked:f,$isHovered:m})=>{let d=s.fadedText40;return m&&!o&&(d=s.fadedText20),f&&!o&&(d=s.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:a.spacing.twoXS,paddingLeft:a.spacing.threeXS,paddingRight:a.spacing.threeXS,width:`calc(2 * ${u.checkbox})`,minWidth:`calc(2 * ${u.checkbox})`,height:u.checkbox,minHeight:u.checkbox,borderBottomLeftRadius:a.radii.full,borderTopLeftRadius:a.radii.full,borderBottomRightRadius:a.radii.full,borderTopRightRadius:a.radii.full,backgroundColor:d}}},Checkmark:{style:({$isFocusVisible:f,$checked:m})=>{const d=m&&!o?s.primary:s.fadedText40;return{outline:0,width:u.checkbox,height:u.checkbox,marginTop:a.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:f&&m?`0 0 0 0.2rem ${ue(s.primary,.5)}`:"",borderLeftWidth:u.borderWidth,borderRightWidth:u.borderWidth,borderTopWidth:u.borderWidth,borderBottomWidth:u.borderWidth,borderLeftColor:d,borderRightColor:d,borderTopColor:d,borderBottomColor:d}}},Label:{style:{lineHeight:a.lineHeights.small,paddingLeft:a.spacing.sm,position:"relative",color:b}}},children:de(ve,{visibility:fe((R=t.labelVisibility)==null?void 0:R.value),"data-testid":"stWidgetLabel",children:[S(ge,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&S(he,{color:b,children:S(be,{content:t.help,placement:me.TOP_RIGHT})})]})})})}function Me(e,t){return e.getBoolValue(t)}function _e(e){return e.default??null}function Ie(e){return e.value??null}function He(e,t,o,r){t.setBoolValue(e,o.value,{fromUi:o.fromUi},r)}const We=g.memo(Be);export{We as default};
@@ -1 +1 @@
1
- import{R as m,aG as B,b9 as i,j as e,ba as h,br as p,b8 as w,bb as D}from"./index.CvqaNor_.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function R(n,a,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(a),filename:""})}function y(n){const{disabled:a,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=m.useContext(B);let o=i.SECONDARY;t.type==="primary"?o=i.PRIMARY:t.type==="tertiary"&&(o=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),R(d,t.url,u).click()},b=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(h,{help:t.help,children:e(p,{kind:o,size:w.SMALL,disabled:a,onClick:f,fluidWidth:t.useContainerWidth?b:!1,children:e(D,{icon:t.icon,label:t.label})})})})}export{y as default};
1
+ import{R as m,aF as B,b8 as i,j as e,b9 as h,bq as p,b7 as w,ba as D}from"./index.7ACWibTY.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function R(n,a,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(a),filename:""})}function y(n){const{disabled:a,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=m.useContext(B);let o=i.SECONDARY;t.type==="primary"?o=i.PRIMARY:t.type==="tertiary"&&(o=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),R(d,t.url,u).click()},b=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(h,{help:t.help,children:e(p,{kind:o,size:w.SMALL,disabled:a,onClick:f,fluidWidth:t.useContainerWidth?b:!1,children:e(D,{icon:t.icon,label:t.label})})})})}export{y as default};
@@ -1 +1 @@
1
- import{r as i,E as L,_ as W,n as d,C as $,y as V,j as s,z as D,bq as K}from"./index.CvqaNor_.js";import{I as N}from"./InputInstructions.BCvAGBeC.js";import{i as _}from"./inputUtils.CQWz5UKz.js";import{T as j}from"./textarea.Bz6Z-kmO.js";import"./base-input.CQPY9_oN.js";var H=i.forwardRef(function(t,r){var c={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(L,W({iconAttrs:c,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});H.displayName="Send";const A=d("div",{target:"e1xgt8o30"})(({theme:t,width:r})=>({borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,width:`${r}px`})),M=d("div",{target:"e1xgt8o31"})(({theme:t})=>({backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.chatInput,display:"flex",alignItems:"center"})),F=d("button",{target:"e1xgt8o32"})(({theme:t,disabled:r,extended:c})=>{const u=$(t),[o,g]=u?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:c?"0":t.radii.chatInput,borderTopLeftRadius:c?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?o:g,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:u?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),G=d("div",{target:"e1xgt8o33"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),U=d("div",{target:"e1xgt8o34"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),O=6.5,R=1;function Z({width:t,element:r,widgetMgr:c,fragmentId:u}){const o=V(),[g,h]=i.useState(!1),[p,f]=i.useState(r.default),[b,y]=i.useState(0),a=i.useRef(null),x=i.useRef({minHeight:0,maxHeight:0}),E=()=>{let e=0;const{current:n}=a;if(n){const l=n.placeholder;n.placeholder="",n.style.height="auto",e=n.scrollHeight,n.placeholder=l,n.style.height=""}return e},I=()=>{a.current&&a.current.focus(),p&&(c.setStringTriggerValue(r,p,{fromUi:!0},u),h(!1),f(""),y(0))},B=e=>{const{metaKey:n,ctrlKey:l,shiftKey:z}=e;_(e)&&!z&&!l&&!n&&(e.preventDefault(),I())},w=e=>{const{value:n}=e.target,{maxChars:l}=r;l!==0&&n.length>l||(h(n!==""),f(n),y(E()))};i.useEffect(()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";f(e),h(e!=="")}},[r]),i.useEffect(()=>{if(a.current){const{offsetHeight:e}=a.current;x.current.minHeight=e,x.current.maxHeight=e*O}},[a]);const{disabled:C,placeholder:m,maxChars:T}=r,{minHeight:k,maxHeight:S}=x.current,v=b>0&&a.current?Math.abs(b-k)>R:!1;return s(A,{className:"stChatInput","data-testid":"stChatInput",width:t,children:D(M,{children:[s(j,{inputRef:a,value:p,placeholder:m,onChange:w,onKeyDown:B,"aria-label":m,disabled:C,rows:1,overrides:{Root:{style:{minHeight:o.sizes.minElementHeight,outline:"none",backgroundColor:o.colors.transparent,borderBottomLeftRadius:o.radii.chatInput,borderBottomRightRadius:o.radii.chatInput,borderTopLeftRadius:o.radii.chatInput,borderTopRightRadius:o.radii.chatInput,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:o.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:o.lineHeights.inputWidget,backgroundColor:o.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:v?`${b+R}px`:"auto",maxHeight:S?`${S}px`:"none",paddingLeft:o.spacing.lg,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,paddingRight:`calc(${o.iconSizes.xl} + 2 * ${o.spacing.sm} + ${o.spacing.sm})`}}}}),t>o.breakpoints.hideWidgetDetails&&s(U,{children:s(N,{dirty:g,value:p,maxLength:T,type:"chat",inForm:!1})}),s(G,{children:s(F,{onClick:I,disabled:!g||C,extended:v,"data-testid":"stChatInputSubmitButton",children:s(K,{content:H,size:"xl",color:"inherit"})})})]})})}export{Z as default};
1
+ import{r as i,E as L,_ as W,n as d,C as $,y as V,j as s,z as D,bp as K}from"./index.7ACWibTY.js";import{I as N}from"./InputInstructions.kmEglyPj.js";import{i as _}from"./inputUtils.CQWz5UKz.js";import{T as j}from"./textarea.BuehYUL9.js";import"./base-input.BUELT8YC.js";var H=i.forwardRef(function(t,r){var c={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(L,W({iconAttrs:c,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});H.displayName="Send";const A=d("div",{target:"e1xgt8o30"})(({theme:t,width:r})=>({borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,width:`${r}px`})),M=d("div",{target:"e1xgt8o31"})(({theme:t})=>({backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.chatInput,display:"flex",alignItems:"center"})),F=d("button",{target:"e1xgt8o32"})(({theme:t,disabled:r,extended:c})=>{const u=$(t),[o,g]=u?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:c?"0":t.radii.chatInput,borderTopLeftRadius:c?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?o:g,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:u?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),G=d("div",{target:"e1xgt8o33"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),U=d("div",{target:"e1xgt8o34"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),O=6.5,R=1;function Z({width:t,element:r,widgetMgr:c,fragmentId:u}){const o=V(),[g,h]=i.useState(!1),[p,f]=i.useState(r.default),[b,y]=i.useState(0),a=i.useRef(null),x=i.useRef({minHeight:0,maxHeight:0}),E=()=>{let e=0;const{current:n}=a;if(n){const l=n.placeholder;n.placeholder="",n.style.height="auto",e=n.scrollHeight,n.placeholder=l,n.style.height=""}return e},I=()=>{a.current&&a.current.focus(),p&&(c.setStringTriggerValue(r,p,{fromUi:!0},u),h(!1),f(""),y(0))},B=e=>{const{metaKey:n,ctrlKey:l,shiftKey:z}=e;_(e)&&!z&&!l&&!n&&(e.preventDefault(),I())},w=e=>{const{value:n}=e.target,{maxChars:l}=r;l!==0&&n.length>l||(h(n!==""),f(n),y(E()))};i.useEffect(()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";f(e),h(e!=="")}},[r]),i.useEffect(()=>{if(a.current){const{offsetHeight:e}=a.current;x.current.minHeight=e,x.current.maxHeight=e*O}},[a]);const{disabled:C,placeholder:m,maxChars:T}=r,{minHeight:k,maxHeight:S}=x.current,v=b>0&&a.current?Math.abs(b-k)>R:!1;return s(A,{className:"stChatInput","data-testid":"stChatInput",width:t,children:D(M,{children:[s(j,{inputRef:a,value:p,placeholder:m,onChange:w,onKeyDown:B,"aria-label":m,disabled:C,rows:1,overrides:{Root:{style:{minHeight:o.sizes.minElementHeight,outline:"none",backgroundColor:o.colors.transparent,borderBottomLeftRadius:o.radii.chatInput,borderBottomRightRadius:o.radii.chatInput,borderTopLeftRadius:o.radii.chatInput,borderTopRightRadius:o.radii.chatInput,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:o.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:o.lineHeights.inputWidget,backgroundColor:o.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:v?`${b+R}px`:"auto",maxHeight:S?`${S}px`:"none",paddingLeft:o.spacing.lg,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,paddingRight:`calc(${o.iconSizes.xl} + 2 * ${o.spacing.sm} + ${o.spacing.sm})`}}}}),t>o.breakpoints.hideWidgetDetails&&s(U,{children:s(N,{dirty:g,value:p,maxLength:T,type:"chat",inForm:!1})}),s(G,{children:s(F,{onClick:I,disabled:!g||C,extended:v,"data-testid":"stChatInputSubmitButton",children:s(K,{content:H,size:"xl",color:"inherit"})})})]})})}export{Z as default};
@@ -1,4 +1,4 @@
1
- var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aW as yu,_ as jM,j as ms,z as Ll,aX as Gy,F as aE,aY as Wy,aZ as TL,a_ as lE,a$ as EL,aG as SL,b0 as CL,b1 as PL,n as HM,C as GM,b2 as T1,b3 as cE,aD as IL,y as ML,b4 as uE}from"./index.CvqaNor_.js";import{_ as Gn,a as RL,C as BL}from"./toConsumableArray.uYLXBIlD.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./possibleConstructorReturn.BNprLGNF.js";import{a as OL,T as DL}from"./Toolbar.yTE_O6B7.js";import{u as WM,E as XM,w as FL}from"./withFullScreenWrapper.CbOOMX5j.js";import{u as LL}from"./useBasicWidgetState.BJFGEQDL.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.mT4-5rFn.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function qM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||qM()}function VL(t){return ku()?qM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function XL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const qL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+qL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function Xf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const qf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=Xf(),this._deltaTs=Xf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Xf()-this._startTs).toPrecision(10))}getDelta(){return Number((Xf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,qf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,qf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,qf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,qf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,qf.debug||qf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Xf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=Xf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?XL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xy{terminate(){}}const qy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=qy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),qy.set(t.url,e)),t.source&&(e=eR(t.source),qy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
1
+ var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aV as yu,_ as jM,j as ms,z as Ll,aW as Gy,F as aE,aX as Wy,aY as TL,aZ as lE,a_ as EL,aF as SL,a$ as CL,b0 as PL,n as HM,C as GM,b1 as T1,b2 as cE,aC as IL,y as ML,b3 as uE}from"./index.7ACWibTY.js";import{_ as Gn,a as RL,C as BL}from"./toConsumableArray.1TsnLTQZ.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./possibleConstructorReturn.C28aC5bE.js";import{a as OL,T as DL}from"./Toolbar.CsJK79V5.js";import{u as WM,E as XM,w as FL}from"./withFullScreenWrapper.DNSRZFsQ.js";import{u as LL}from"./useBasicWidgetState.S-yUfhr7.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.DZ1scmYc.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function qM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||qM()}function VL(t){return ku()?qM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function XL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const qL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+qL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function Xf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const qf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=Xf(),this._deltaTs=Xf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Xf()-this._startTs).toPrecision(10))}getDelta(){return Number((Xf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,qf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,qf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,qf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,qf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,qf.debug||qf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Xf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=Xf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?XL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xy{terminate(){}}const qy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=qy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),qy.set(t.url,e)),t.source&&(e=eR(t.source),qy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
2
2
  importScripts('${t}');
3
3
  } catch (error) {
4
4
  console.error(error);
@@ -1,2 +1,2 @@
1
- import{bx as Z,by as J,r as f,bz as Q,y as Y,bA as s,j as S,z as ee,bt as te,bB as re,bC as ne,bu as oe,bd as ie,bv as ae,br as ue,b9 as j,b8 as W,bb as le}from"./index.CvqaNor_.js";import{a as ce}from"./useBasicWidgetState.BJFGEQDL.js";import"./FormClearHelper.mT4-5rFn.js";var se={primary:"primary",secondary:"secondary",tertiary:"tertiary"},G={default:"default",pill:"pill",round:"round",circle:"circle",square:"square"},fe={mini:"mini",default:"default",compact:"compact",large:"large"},P=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=Z("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==G.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function D(e){"@babel/helpers - typeof";return D=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},D(e)}function M(){return M=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},M.apply(this,arguments)}function x(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 pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function de(e,t){return he(e)||me(e,t)||be(e,t)||ye()}function ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function be(e,t){if(e){if(typeof e=="string")return X(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 X(e,t)}}function X(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 me(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,p;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,p=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw p}}return n}}function he(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(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 Se(e,t,r){return t&&ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(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&&$(e,t)}function $(e,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(e,t)}function _e(e){var t=we();return function(){var n=k(e),o;if(t){var i=k(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ee(this,o)}}function Ee(e,t){if(t&&(D(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(){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 k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var F=function(e){Oe(r,e);var t=_e(r);function r(){var n;ge(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)),N(K(n),"childRefs",{}),n}return Se(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,p=a===void 0?{}:a,c=i.mode,C=c===void 0?P.checkbox:c,d=i.children,y=i.selected,m=i.disabled,l=i.onClick,E=i.kind,h=i.shape,w=i.size,A=J(p.Root,z),O=de(A,2),_=O[0],L=O[1],H=this.props["aria-label"]||this.props.ariaLabel,g=C===P.radio,V=f.Children.count(d);return f.createElement(Q.Consumer,null,function(q){return f.createElement(_,M({"aria-label":H||q.buttongroup.ariaLabel,"data-baseweb":"button-group",role:g?"radiogroup":"group",$shape:h,$length:d.length},L),f.Children.map(d,function(b,R){if(!f.isValidElement(b))return null;var B=b.props.isSelected?b.props.isSelected:Le(y,R);return g&&(o.childRefs[R]=f.createRef()),f.cloneElement(b,{disabled:m||b.props.disabled,isSelected:B,ref:g?o.childRefs[R]:void 0,tabIndex:!g||B||g&&(!y||y===-1)&&R===0?0:-1,onKeyDown:function(u){if(g){var v=Number(y)?Number(y):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var I=v-1<0?V-1:v-1;l&&l(u,I),o.childRefs[I].current&&o.childRefs[I].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var T=v+1>V-1?0:v+1;l&&l(u,T),o.childRefs[T].current&&o.childRefs[T].current.focus()}}},kind:E,onClick:function(u){m||(b.props.onClick&&b.props.onClick(u),l&&l(u,R))},shape:h,size:w,overrides:pe({BaseButton:{style:function(u){var v=u.$theme;return d.length===1?{}:h!==G.default?{marginLeft:v.sizing.scale100,marginRight:v.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":B,role:g?"radio":"checkbox"}}},b.props.overrides)})}))})}}]),r}(f.Component);N(F,"defaultProps",{disabled:!1,onClick:function(){},shape:G.default,size:fe.default,kind:se.secondary});function Re(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Ce(e,t,r){return e==s.ClickMode.MULTI_SELECT?Re(t,r??[]):r!=null&&r.includes(t)?[]:[t]}function Pe(e){return e.length===0?-1:e[0]}function ke(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Ae(e,t,r){const n=r===s.Style.PILLS?j.PILLS:r===s.Style.BORDERLESS?j.BORDERLESS_ICON:j.SEGMENTED_CONTROL,o=r===s.Style.BORDERLESS?W.XSMALL:W.MEDIUM,i=r===s.Style.BORDERLESS?"lg":"base";return{element:S(le,{icon:t,label:e,iconSize:i}),kind:n,size:o}}function Be(e,t,r,n){return r.indexOf(n)>-1?!0:t!==s.ClickMode.SINGLE_SELECT||e!==s.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Ie(e,t){return e&&(t=`${t}Active`),t}function Te(e,t){const r={flexWrap:"wrap",maxWidth:"fit-content"};switch(e){case s.Style.BORDERLESS:return{...r,columnGap:t.threeXS,rowGap:t.threeXS};case s.Style.PILLS:return{...r,columnGap:t.twoXS,rowGap:t.twoXS};case s.Style.SEGMENTED_CONTROL:return{...r,columnGap:t.none,rowGap:t.twoXS,"::after":{content:"''",flex:1e4}};default:return r}}function je(e,t,r,n,o,i){const a=Be(r,n,o,t);let p=e.content,c=e.contentIcon;return a&&(p=e.selectedContent?e.selectedContent:p,c=e.selectedContentIcon?e.selectedContentIcon:c),f.forwardRef(function(d,y){const{element:m,kind:l,size:E}=Ae(p??"",c??void 0,i),h=Ie(!!(a&&!e.selectedContent&&!e.selectedContentIcon),l);return S(ue,{...d,size:E,kind:h,children:m})})}function De(e,t){return e.getIntArrayValue(t)}function Me(e){return e.default??null}function $e(e){return e.value??null}function Ge(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o}=e,{clickMode:i,options:a,selectionVisualization:p,style:c,label:C,labelVisibility:d,help:y}=r,m=Y(),[l,E]=ce({getStateFromWidgetMgr:De,getDefaultStateFromProto:Me,getCurrStateFromProto:$e,updateWidgetMgrState:ke,element:r,widgetMgr:o,fragmentId:n}),h=(O,_)=>{const L=Ce(i,_,l);E({value:L,fromUi:!0})};let w;i===s.ClickMode.SINGLE_SELECT?w=P.radio:i===s.ClickMode.MULTI_SELECT&&(w=P.checkbox);const A=f.useMemo(()=>a.map((O,_)=>{const L=je(O,_,p,i,l,c);return S(L,{},`${O.content}-${_}`)}),[i,a,p,c,l]);return ee("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:[S(ae,{label:C,disabled:t,labelVisibility:te((d==null?void 0:d.value)??re.LabelVisibilityOptions.COLLAPSED),children:y&&S(ne,{children:S(oe,{content:y,placement:ie.TOP})})}),S(F,{disabled:t,mode:w,onClick:h,selected:i===s.ClickMode.MULTI_SELECT?l:Pe(l),overrides:{Root:{style:f.useCallback(()=>Te(c,m.spacing),[c,m.spacing])}},children:A})]})}const Ue=f.memo(Ge);export{Ue as default};
1
+ import{bw as Z,bx as J,r as f,by as Q,y as Y,bz as s,j as S,z as ee,bs as te,bA as re,bB as ne,bt as oe,bc as ie,bu as ae,bq as ue,b8 as j,b7 as W,ba as le}from"./index.7ACWibTY.js";import{a as ce}from"./useBasicWidgetState.S-yUfhr7.js";import"./FormClearHelper.DZ1scmYc.js";var se={primary:"primary",secondary:"secondary",tertiary:"tertiary"},G={default:"default",pill:"pill",round:"round",circle:"circle",square:"square"},fe={mini:"mini",default:"default",compact:"compact",large:"large"},C=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=Z("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==G.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function D(e){"@babel/helpers - typeof";return D=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},D(e)}function M(){return M=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},M.apply(this,arguments)}function x(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 pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function de(e,t){return he(e)||me(e,t)||be(e,t)||ye()}function ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function be(e,t){if(e){if(typeof e=="string")return X(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 X(e,t)}}function X(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 me(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,p;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,p=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw p}}return n}}function he(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(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 Se(e,t,r){return t&&ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(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&&$(e,t)}function $(e,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(e,t)}function _e(e){var t=we();return function(){var n=k(e),o;if(t){var i=k(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ee(this,o)}}function Ee(e,t){if(t&&(D(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(){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 k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var q=function(e){Oe(r,e);var t=_e(r);function r(){var n;ge(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)),N(K(n),"childRefs",{}),n}return Se(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,p=a===void 0?{}:a,c=i.mode,P=c===void 0?C.checkbox:c,d=i.children,y=i.selected,m=i.disabled,l=i.onClick,E=i.kind,h=i.shape,w=i.size,A=J(p.Root,z),O=de(A,2),_=O[0],L=O[1],F=this.props["aria-label"]||this.props.ariaLabel,g=P===C.radio,V=f.Children.count(d);return f.createElement(Q.Consumer,null,function(H){return f.createElement(_,M({"aria-label":F||H.buttongroup.ariaLabel,"data-baseweb":"button-group",role:g?"radiogroup":"group",$shape:h,$length:d.length},L),f.Children.map(d,function(b,R){if(!f.isValidElement(b))return null;var B=b.props.isSelected?b.props.isSelected:Le(y,R);return g&&(o.childRefs[R]=f.createRef()),f.cloneElement(b,{disabled:m||b.props.disabled,isSelected:B,ref:g?o.childRefs[R]:void 0,tabIndex:!g||B||g&&(!y||y===-1)&&R===0?0:-1,onKeyDown:function(u){if(g){var v=Number(y)?Number(y):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var I=v-1<0?V-1:v-1;l&&l(u,I),o.childRefs[I].current&&o.childRefs[I].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var T=v+1>V-1?0:v+1;l&&l(u,T),o.childRefs[T].current&&o.childRefs[T].current.focus()}}},kind:E,onClick:function(u){m||(b.props.onClick&&b.props.onClick(u),l&&l(u,R))},shape:h,size:w,overrides:pe({BaseButton:{style:function(u){var v=u.$theme;return d.length===1?{}:h!==G.default?{marginLeft:v.sizing.scale100,marginRight:v.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":B,role:g?"radio":"checkbox"}}},b.props.overrides)})}))})}}]),r}(f.Component);N(q,"defaultProps",{disabled:!1,onClick:function(){},shape:G.default,size:fe.default,kind:se.secondary});function Re(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Pe(e,t,r){return e==s.ClickMode.MULTI_SELECT?Re(t,r??[]):r!=null&&r.includes(t)?[]:[t]}function Ce(e){return e.length===0?-1:e[0]}function ke(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Ae(e,t,r){const n=r===s.Style.PILLS?j.PILLS:r===s.Style.BORDERLESS?j.BORDERLESS_ICON:j.SEGMENTED_CONTROL,o=r===s.Style.BORDERLESS?W.XSMALL:W.MEDIUM,i=r===s.Style.BORDERLESS?"lg":"base";return{element:S(le,{icon:t,label:e,iconSize:i}),kind:n,size:o}}function Be(e,t,r,n){return r.indexOf(n)>-1?!0:t!==s.ClickMode.SINGLE_SELECT||e!==s.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Ie(e,t){return e&&(t=`${t}Active`),t}function Te(e,t){const r={flexWrap:"wrap",maxWidth:"fit-content"};switch(e){case s.Style.BORDERLESS:return{...r,columnGap:t.threeXS,rowGap:t.threeXS};case s.Style.PILLS:return{...r,columnGap:t.twoXS,rowGap:t.twoXS};case s.Style.SEGMENTED_CONTROL:return{...r,columnGap:t.none,rowGap:t.twoXS,"::after":{content:"''",flex:1e4}};default:return r}}function je(e,t,r,n,o,i){const a=Be(r,n,o,t);let p=e.content,c=e.contentIcon;return a&&(p=e.selectedContent?e.selectedContent:p,c=e.selectedContentIcon?e.selectedContentIcon:c),f.forwardRef(function(d,y){const{element:m,kind:l,size:E}=Ae(p??"",c??void 0,i),h=Ie(!!(a&&!e.selectedContent&&!e.selectedContentIcon),l);return S(ue,{...d,size:E,kind:h,children:m})})}function De(e,t){return e.getIntArrayValue(t)}function Me(e){return e.default??null}function $e(e){return e.value??null}function Ge(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o}=e,{clickMode:i,options:a,selectionVisualization:p,style:c,label:P,labelVisibility:d,help:y}=r,m=Y(),[l,E]=ce({getStateFromWidgetMgr:De,getDefaultStateFromProto:Me,getCurrStateFromProto:$e,updateWidgetMgrState:ke,element:r,widgetMgr:o,fragmentId:n}),h=(O,_)=>{const L=Pe(i,_,l);E({value:L,fromUi:!0})};let w;i===s.ClickMode.SINGLE_SELECT?w=C.radio:i===s.ClickMode.MULTI_SELECT&&(w=C.checkbox);const A=f.useMemo(()=>a.map((O,_)=>{const L=je(O,_,p,i,l,c);return S(L,{},`${O.content}-${_}`)}),[i,a,p,c,l]);return ee("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:[S(ae,{label:P,disabled:t,labelVisibility:te((d==null?void 0:d.value)??re.LabelVisibilityOptions.COLLAPSED),children:y&&S(ne,{children:S(oe,{content:y,placement:ie.TOP})})}),S(q,{disabled:t,mode:w,onClick:h,selected:i===s.ClickMode.MULTI_SELECT?l:Ce(l),overrides:{Root:{style:f.useCallback(()=>Te(c,m.spacing),[c,m.spacing])}},children:A})]})}const Ue=f.memo(Ge);export{Ue as default};
@@ -1 +1 @@
1
- import{n as a,bo as S,i as x,R as p,aG as f,c2 as g,j as i,c3 as m,z as T,aF as $}from"./index.CvqaNor_.js";const h=a(S,{shouldForwardProp:x,target:"e1ira7tx0"})(({theme:e,usingCustomTheme:s})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,radius:e.radii.md,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:s?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0})),b=a("div",{target:"e1ira7tx1"})(({theme:e,width:s,cache:t})=>({width:s,...t?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),C=a("div",{target:"e1ira7tx2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),y=a("div",{target:"e1ira7tx3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),z=e=>{const s=Math.floor(e/3600),t=Math.floor(e%3600/60),n=e%60;if(s===0&&t===0)return`(${n.toFixed(1)} seconds)`;if(s===0){const l=`${t} minute${t===1?"":"s"}`,d=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${l}${d})`}const o=`${s} hour${s===1?"":"s"}`,r=t===0?"":`, ${t} minute${t===1?"":"s"}`,c=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${o}${r}${c})`};function v({width:e,element:s}){const{activeTheme:t}=p.useContext(f),n=!g(t),{cache:o,showTime:r}=s,[c,l]=p.useState(0);return p.useEffect(()=>{if(!r)return;const d=setInterval(()=>{l(u=>u+.1)},100);return()=>clearInterval(d)},[r]),i(b,{className:m({stSpinner:!0,stCacheSpinner:o}),"data-testid":"stSpinner",width:e,cache:o,children:T(y,{children:[i(h,{usingCustomTheme:n}),i($,{source:s.text,allowHTML:!1}),r&&i(C,{children:z(c)})]})})}export{v as default};
1
+ import{n as a,bn as S,i as x,R as p,aF as f,c1 as g,j as i,c2 as m,z as T,aE as $}from"./index.7ACWibTY.js";const h=a(S,{shouldForwardProp:x,target:"e1ira7tx0"})(({theme:e,usingCustomTheme:s})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,radius:e.radii.md,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:s?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0})),b=a("div",{target:"e1ira7tx1"})(({theme:e,width:s,cache:t})=>({width:s,...t?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),C=a("div",{target:"e1ira7tx2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),y=a("div",{target:"e1ira7tx3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),z=e=>{const s=Math.floor(e/3600),t=Math.floor(e%3600/60),n=e%60;if(s===0&&t===0)return`(${n.toFixed(1)} seconds)`;if(s===0){const l=`${t} minute${t===1?"":"s"}`,d=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${l}${d})`}const o=`${s} hour${s===1?"":"s"}`,r=t===0?"":`, ${t} minute${t===1?"":"s"}`,c=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${o}${r}${c})`};function v({width:e,element:s}){const{activeTheme:t}=p.useContext(f),n=!g(t),{cache:o,showTime:r}=s,[c,l]=p.useState(0);return p.useEffect(()=>{if(!r)return;const d=setInterval(()=>{l(u=>u+.1)},100);return()=>clearInterval(d)},[r]),i(b,{className:m({stSpinner:!0,stCacheSpinner:o}),"data-testid":"stSpinner",width:e,cache:o,children:T(y,{children:[i(h,{usingCustomTheme:n}),i($,{source:s.text,allowHTML:!1}),r&&i(C,{children:z(c)})]})})}export{v as default};
@@ -1 +1 @@
1
- import{n as t,M as d,j as c,b5 as l,b6 as g,J as e}from"./index.CvqaNor_.js";const f=t("iframe",{target:"e1q9bkxk0"})(({theme:o,disableScrolling:n})=>({colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:n?"hidden":void 0}));function F({element:o,width:n}){const i=o.hasWidth?o.width:n,r=s(o.src),a=d(r)?void 0:s(o.srcdoc);return c(f,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:r,srcDoc:a,width:i,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:g,title:"st.iframe"})}function s(o){return e(o)||o===""?void 0:o}export{F as default};
1
+ import{n as t,M as d,j as c,b4 as l,b5 as g,J as e}from"./index.7ACWibTY.js";const f=t("iframe",{target:"e1q9bkxk0"})(({theme:o,disableScrolling:n})=>({colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:n?"hidden":void 0}));function F({element:o,width:n}){const i=o.hasWidth?o.width:n,r=s(o.src),a=d(r)?void 0:s(o.srcdoc);return c(f,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:r,srcDoc:a,width:i,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:g,title:"st.iframe"})}function s(o){return e(o)||o===""?void 0:o}export{F as default};
@@ -1 +1 @@
1
- import{n as o,z as m,j as i,aF as S}from"./index.CvqaNor_.js";import{S as g,T as y}from"./Toolbar.yTE_O6B7.js";import{w as W,u as b,E as M}from"./withFullScreenWrapper.CbOOMX5j.js";const L=o("div",{target:"evl31sl0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg,maxWidth:"100%",width:"fit-content"})),O=o("div",{target:"evl31sl1"})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:t.radii.default}})),E=o("div",{target:"evl31sl2"})(({theme:t})=>({textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}));var p;(function(t){t[t.OriginalWidth=-1]="OriginalWidth",t[t.ColumnWidth=-2]="ColumnWidth",t[t.AutoWidth=-3]="AutoWidth",t[t.MinImageOrContainer=-4]="MinImageOrContainer",t[t.MaxImageOrContainer=-5]="MaxImageOrContainer"})(p||(p={}));function F({element:t,width:u,endpoints:f,disableFullscreenMode:x}){const{expanded:n,width:w,height:r,expand:C,collapse:h}=b(M),d=n?w:u;let l;const a=t.width;if([-1,-3,-4].includes(a))l=void 0;else if([-2,-5].includes(a))l=d;else if(a>0)l=a;else throw Error(`Invalid image width: ${a}`);const e={};return r&&n?(e.maxHeight=r,e.objectFit="contain"):(e.width=l,e.maxWidth="100%"),m(g,{width:d,height:r,useContainerWidth:n,topCentered:!0,children:[i(y,{target:g,isFullScreen:n,onExpand:C,onCollapse:h,disableFullscreenMode:x}),i(L,{className:"stImage","data-testid":"stImage",children:t.imgs.map((I,c)=>{const s=I;return m(O,{"data-testid":"stImageContainer",children:[i("img",{style:e,src:f.buildMediaURL(s.url),alt:c.toString()}),s.caption&&i(E,{"data-testid":"stImageCaption",style:e,children:i(S,{source:s.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]},c)})})]})}const R=W(F);export{R as default};
1
+ import{n as o,z as m,j as i,aE as S}from"./index.7ACWibTY.js";import{S as g,T as y}from"./Toolbar.CsJK79V5.js";import{w as W,u as b,E as M}from"./withFullScreenWrapper.DNSRZFsQ.js";const E=o("div",{target:"evl31sl0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg,maxWidth:"100%",width:"fit-content"})),L=o("div",{target:"evl31sl1"})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:t.radii.default}})),O=o("div",{target:"evl31sl2"})(({theme:t})=>({textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}));var p;(function(t){t[t.OriginalWidth=-1]="OriginalWidth",t[t.ColumnWidth=-2]="ColumnWidth",t[t.AutoWidth=-3]="AutoWidth",t[t.MinImageOrContainer=-4]="MinImageOrContainer",t[t.MaxImageOrContainer=-5]="MaxImageOrContainer"})(p||(p={}));function T({element:t,width:u,endpoints:f,disableFullscreenMode:x}){const{expanded:n,width:w,height:r,expand:C,collapse:h}=b(M),d=n?w:u;let l;const a=t.width;if([-1,-3,-4].includes(a))l=void 0;else if([-2,-5].includes(a))l=d;else if(a>0)l=a;else throw Error(`Invalid image width: ${a}`);const e={};return r&&n?(e.maxHeight=r,e.objectFit="contain"):(e.width=l,e.maxWidth="100%"),m(g,{width:d,height:r,useContainerWidth:n,topCentered:!0,children:[i(y,{target:g,isFullScreen:n,onExpand:C,onCollapse:h,disableFullscreenMode:x}),i(E,{className:"stImage","data-testid":"stImage",children:t.imgs.map((I,c)=>{const s=I;return m(L,{"data-testid":"stImageContainer",children:[i("img",{style:e,src:f.buildMediaURL(s.url),alt:c.toString()}),s.caption&&i(O,{"data-testid":"stImageCaption",style:e,children:i(S,{source:s.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]},c)})})]})}const R=W(T);export{R as default};