@stlite/desktop 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/bin/dump_artifacts.js +5 -4
  2. package/build/asset-manifest.json +43 -42
  3. package/build/electron/main.js +13 -0
  4. package/build/electron/preload.js +1 -0
  5. package/build/index.html +1 -1
  6. package/build/static/js/1318.57c335d2.chunk.js +1 -0
  7. package/build/static/js/{142.85e6074f.chunk.js → 142.2b0ffa81.chunk.js} +1 -1
  8. package/build/static/js/172.599dcb6e.chunk.js +5 -0
  9. package/build/static/js/2327.b8572a38.chunk.js +1 -0
  10. package/build/static/js/2775.c1ed54fa.chunk.js +5 -0
  11. package/build/static/js/291.aa03bc71.chunk.js +1 -0
  12. package/build/static/js/3580.e292972c.chunk.js +1 -0
  13. package/build/static/js/3603.c075eadf.chunk.js +2 -0
  14. package/build/static/js/3603.c075eadf.chunk.js.LICENSE.txt +135 -0
  15. package/build/static/js/3744.93bd4bad.chunk.js +2 -0
  16. package/build/static/js/4140.edb6c36a.chunk.js +1 -0
  17. package/build/static/js/4141.a101e33c.chunk.js +9 -0
  18. package/build/static/js/5093.304fcb1e.chunk.js +1 -0
  19. package/build/static/js/5099.c240313c.chunk.js +1 -0
  20. package/build/static/js/5177.3eb35171.chunk.js +2 -0
  21. package/build/static/js/5241.0326c97c.chunk.js +1 -0
  22. package/build/static/js/5440.c723be7c.chunk.js +1 -0
  23. package/build/static/js/5617.6141af30.chunk.js +1 -0
  24. package/build/static/js/{9735.0e70600f.chunk.js → 6557.fd2f35c8.chunk.js} +1 -1
  25. package/build/static/js/{6422.c2900a88.chunk.js → 6683.aab9fa01.chunk.js} +1 -1
  26. package/build/static/js/{7842.a98fbb15.chunk.js → 6756.2cb6963c.chunk.js} +1 -1
  27. package/build/static/js/{6242.5e6f91ac.chunk.js → 6862.886eab8e.chunk.js} +1 -1
  28. package/build/static/js/6913.094a45e2.chunk.js +17 -0
  29. package/build/static/js/6939.c09d92c1.chunk.js +1 -0
  30. package/build/static/js/{7073.5619981b.chunk.js → 7073.376b9d76.chunk.js} +1 -1
  31. package/build/static/js/787.30ab7f34.chunk.js +1 -0
  32. package/build/static/js/792.45efff32.chunk.js +1 -0
  33. package/build/static/js/8035.dc118cc9.chunk.js +1 -0
  34. package/build/static/js/{6097.56c4b02a.chunk.js → 8295.c3cd87de.chunk.js} +1 -1
  35. package/build/static/js/8418.aed275df.chunk.js +1 -0
  36. package/build/static/js/8486.e56533d6.chunk.js +1 -0
  37. package/build/static/js/865.5abdcdc2.chunk.js +1 -0
  38. package/build/static/js/9004.6a66722a.chunk.js +1 -0
  39. package/build/static/js/9042.a6fcbc74.chunk.js +5 -0
  40. package/build/static/js/9107.b49ea9ea.chunk.js +5 -0
  41. package/build/static/js/9130.8e10440e.chunk.js +1 -0
  42. package/build/static/js/9166.1a468fb9.chunk.js +2 -0
  43. package/build/static/js/{5678.729bced9.chunk.js → 9382.c417d448.chunk.js} +1 -1
  44. package/build/static/js/9615.82cf4bfb.chunk.js +1 -0
  45. package/build/static/js/{8355.b110abc9.chunk.js → 9915.fe11690a.chunk.js} +1 -1
  46. package/build/static/js/main.1313208f.js +28 -0
  47. package/package.json +5 -4
  48. package/build/static/js/1367.9dcea0bc.chunk.js +0 -9
  49. package/build/static/js/2116.fd3de825.chunk.js +0 -1
  50. package/build/static/js/2458.cfb63c88.chunk.js +0 -1
  51. package/build/static/js/2523.4761d79a.chunk.js +0 -5
  52. package/build/static/js/2632.de1769ff.chunk.js +0 -1
  53. package/build/static/js/277.d9ceff66.chunk.js +0 -1
  54. package/build/static/js/3376.d5aaecc4.chunk.js +0 -1
  55. package/build/static/js/3392.5ed3420d.chunk.js +0 -1
  56. package/build/static/js/3977.24eb5fb8.chunk.js +0 -1
  57. package/build/static/js/4210.945a5966.chunk.js +0 -1
  58. package/build/static/js/4514.7931bd64.chunk.js +0 -5
  59. package/build/static/js/464.7c22f33c.chunk.js +0 -1
  60. package/build/static/js/5070.1d0d565e.chunk.js +0 -1
  61. package/build/static/js/5608.b4074ab9.chunk.js +0 -1
  62. package/build/static/js/5752.d5d30939.chunk.js +0 -1
  63. package/build/static/js/5865.90a40692.chunk.js +0 -17
  64. package/build/static/js/6223.4bb0039e.chunk.js +0 -2
  65. package/build/static/js/6668.8cb69721.chunk.js +0 -2
  66. package/build/static/js/7496.0f941cac.chunk.js +0 -1
  67. package/build/static/js/761.ca3883de.chunk.js +0 -1
  68. package/build/static/js/7698.00f5ff0b.chunk.js +0 -1
  69. package/build/static/js/7858.e4a6aa6d.chunk.js +0 -5
  70. package/build/static/js/7937.4b1be66e.chunk.js +0 -1
  71. package/build/static/js/8461.85faefa1.chunk.js +0 -1
  72. package/build/static/js/8565.f27e3917.chunk.js +0 -1
  73. package/build/static/js/8910.e6dda87e.chunk.js +0 -2
  74. package/build/static/js/91.f23bbeac.chunk.js +0 -1
  75. package/build/static/js/9462.81f9c52a.chunk.js +0 -1
  76. package/build/static/js/9551.c45b17cf.chunk.js +0 -1
  77. package/build/static/js/main.e1e5cd43.js +0 -28
  78. /package/build/static/css/{3376.60b7ada4.chunk.css → 5099.60b7ada4.chunk.css} +0 -0
  79. /package/build/static/js/{6668.8cb69721.chunk.js.LICENSE.txt → 3744.93bd4bad.chunk.js.LICENSE.txt} +0 -0
  80. /package/build/static/js/{6223.4bb0039e.chunk.js.LICENSE.txt → 5177.3eb35171.chunk.js.LICENSE.txt} +0 -0
  81. /package/build/static/js/{8910.e6dda87e.chunk.js.LICENSE.txt → 9166.1a468fb9.chunk.js.LICENSE.txt} +0 -0
  82. /package/build/static/js/{main.e1e5cd43.js.LICENSE.txt → main.1313208f.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7496],{77390:(e,t,s)=>{s.d(t,{$:()=>c,Z:()=>h});var i=s(5057),r=s(31476),o=s(63),n=s(99362),a=s(16449),l=s(80099),d=s(96266);let c;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(c||(c={}));const h=function({value:e,width:t,size:s=c.SMALL,overrides:h}){const g=(0,r.u)(),u={xs:g.spacing.twoXS,sm:g.spacing.sm,md:g.spacing.lg,lg:g.spacing.xl,xl:g.spacing.twoXL},{activeTheme:p}=i.useContext(o.I),m=!(0,n.MJ)(p),f={BarContainer:{style:{marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none}},Bar:{style:({$theme:e})=>({width:t?t.toString():void 0,marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none,height:u[s],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})},BarProgress:{style:()=>({backgroundColor:m?g.colors.primary:g.colors.blue70,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})}};return(0,d.jsx)(a.Z,{value:e,overrides:(0,l.aO)(f,h)})}},77496:(e,t,s)=>{s.r(t),s.d(t,{default:()=>q});var i,r=s(30967),o=s(10458),n=s.n(o),a=s(65873),l=s.n(a),d=s(5057),c=s(32291),h=s(97292),g=s(54840),u=s(8429),p=s(86964),m=s(56846),f=s(52801),S=s(34422),w=s(41605),x=s(77390),R=s(45490),b=s(59990);function F(e,t){switch(e){case i.XSMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.sm}`,fontSize:t.fontSizes.sm};case i.SMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.md}`};case i.LARGE:return{padding:`${t.spacing.md} ${t.spacing.md}`};default:return{padding:`${t.spacing.xs} ${t.spacing.md}`}}}!function(e){e.XSMALL="xsmall",e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(i||(i={}));const C=(0,R.Z)("div",{target:"ejtjsn29"})((()=>({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"})),""),I=(0,R.Z)("div",{target:"ejtjsn28"})((({theme:e,width:t})=>({backgroundColor:e.colors.secondaryBg,borderRadius:`${e.radii.md} ${e.radii.md} 0 0`,width:"100%",height:9*t/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),""),j=(0,R.Z)("p",{target:"ejtjsn27"})((({theme:e})=>({marginTop:e.spacing.sm,textAlign:"center"})),""),v=(0,R.Z)("img",{target:"ejtjsn26"})((({theme:e,opacity:t})=>({borderRadius:`${e.radii.md} ${e.radii.md} 0 0`,objectFit:"contain",opacity:t})),""),E=(0,R.Z)("a",{target:"ejtjsn25"})((({theme:e})=>({color:e.colors.primary,display:"block",textDecoration:"none"})),""),P=(0,R.Z)("span",{target:"ejtjsn24"})((()=>({display:"flex",alignItems:"center"})),""),T=(0,R.Z)("div",{target:"ejtjsn23"})((({theme:e})=>({position:"absolute",top:e.spacing.lg,right:e.spacing.lg,zIndex:1,color:e.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),""),M=(0,R.Z)("div",{target:"ejtjsn21"})((()=>({height:"fit-content",width:"100%",position:"absolute",bottom:0})),""),y=(0,R.Z)("button",{target:"ejtjsn20"})((({theme:e})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:e.colors.lightenedBg05,border:`1px solid ${e.colors.fadedText10}`,borderRadius:`0 0 ${e.radii.md} ${e.radii.md}`,"&:hover":{borderColor:e.colors.primary,color:e.colors.primary},"&:active":{color:e.colors.white,borderColor:e.colors.primary,backgroundColor:e.colors.primary},"&:focus:not(:active)":{borderColor:e.colors.primary,color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:e.colors.fadedText40},fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,margin:0,lineHeight:e.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{boxShadow:`0 0 0 0.2rem ${(0,b.DZ)(e.colors.primary,.5)}`,outline:"none"},...F(i.MEDIUM,e)})),"");var L=s(96266);const U=function({disabled:e,onClick:t,children:s,progress:i}){return(0,L.jsxs)(y,{disabled:e||!1,onClick:t||(()=>{}),progress:i||null,"data-testid":"stCameraInputButton",children:[s,i&&(0,L.jsx)(M,{children:(0,L.jsx)(x.Z,{value:i,size:x.$.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarProgress:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarContainer:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}}}})})]})};var k=s(90693),$=s(92445),Z=s(3579);let D;!function(e){e.USER="user",e.ENVIRONMENT="environment"}(D||(D={}));const X=({switchFacingMode:e})=>(0,L.jsx)(T,{children:(0,L.jsx)(g.ZP,{content:"Switch camera",placement:g.ug.TOP_RIGHT,children:(0,L.jsx)($.ZP,{kind:$.hY.MINIMAL,onClick:e,children:(0,L.jsx)(h.ZP,{content:k.Z,size:"twoXL",color:Z.Z.white})})})});var O=s(85585),_=s(31476),A=s(11226),B=s(74947),N=s.n(B),z=s(92371);let G;!function(e){e.PENDING="pending",e.SUCCESS="success",e.ERROR="error"}(G||(G={}));const V=({width:e})=>(0,L.jsxs)(I,{width:e,children:[(0,L.jsx)(h.ZP,{size:"threeXL",color:Z.Z.gray60,content:O.n}),(0,L.jsxs)(j,{children:["This app would like to use your camera.",(0,L.jsx)(E,{href:z.U3,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),W=({handleCapture:e,width:t,disabled:s,clearPhotoInProgress:i,setClearPhotoInProgress:r,facingMode:o,setFacingMode:n})=>{const[a,l]=(0,d.useState)(G.PENDING),c=(0,d.useRef)(null),[h,g]=(0,d.useState)(t),u=(0,d.useCallback)((0,S.Ds)(1e3,g),[]);(0,d.useEffect)((()=>{u(t)}),[t]);const p=(0,_.u)();return(0,L.jsxs)(C,{width:h,children:[a===G.SUCCESS||s||i?A.tq&&(0,L.jsx)(X,{switchFacingMode:n}):(0,L.jsx)(V,{width:h}),(0,L.jsx)(I,{hidden:a!==G.SUCCESS&&!s&&!i,width:h,children:!s&&(0,L.jsx)(N(),{audio:!1,ref:c,screenshotFormat:"image/jpeg",screenshotQuality:1,width:h,height:9*h/16,style:{borderRadius:`${p.radii.md} ${p.radii.md} 0 0`},onUserMediaError:()=>{l(G.ERROR)},onUserMedia:()=>{l(G.SUCCESS),r(!1)},videoConstraints:{width:{ideal:h},facingMode:o}})}),(0,L.jsx)(U,{onClick:function(){if(null!==c.current){const t=c.current.getScreenshot();e(t)}},disabled:a!==G.SUCCESS||s||i,children:"Take Photo"})]})};class H extends d.PureComponent{constructor(e){super(e),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new m.Kz,this.getProgress=()=>{if(this.state.files.length>0&&"uploading"===this.state.files[this.state.files.length-1].status.type){return this.state.files[this.state.files.length-1].status.progress}},this.setClearPhotoInProgress=e=>{this.setState({clearPhotoInProgress:e})},this.setFacingMode=()=>{this.setState((e=>({facingMode:e.facingMode===D.USER?D.ENVIRONMENT:D.USER})))},this.handleCapture=e=>{if(null===e)return Promise.resolve();this.setState({imgSrc:e,shutter:!0,minShutterEffectPassed:!1});var t,s;return(t=e,s=`camera-input-${(new Date).toISOString().replace(/:/g,"_")}.jpg`,fetch(t).then((e=>e.arrayBuffer())).then((e=>new File([e],s,{type:"image/jpeg"})))).then((e=>this.uploadFile(e))).then((()=>{return e=150,new Promise((t=>setTimeout(t,e)));var e})).then((()=>{this.setState(((t,s)=>({imgSrc:e,shutter:t.shutter,minShutterEffectPassed:!0})))})).catch((e=>{(0,f.H)(e)}))},this.removeCapture=()=>{0!==this.state.files.length&&(this.state.files.forEach((e=>this.deleteFile(e.id))),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=e=>{const{element:t,widgetMgr:s}=this.props;if(e.disabled!==this.props.disabled&&this.props.disabled)return this.reset(),void s.setFileUploaderStateValue(t,new c.xO,{fromUi:!1});if("ready"!==this.status)return;const i=this.createWidgetValue();if(void 0===i)return;const r=s.getFileUploaderStateValue(t);l().isEqual(i,r)||s.setFileUploaderStateValue(t,i,{fromUi:!0})},this.onFormCleared=()=>{this.setState({files:[]},(()=>{const e=this.createWidgetValue();null!=e&&(this.setState({imgSrc:null}),this.props.widgetMgr.setFileUploaderStateValue(this.props.element,e,{fromUi:!0}))}))},this.deleteFile=e=>{const t=this.getFile(e);null!=t&&("uploading"===t.status.type&&t.status.cancelToken.cancel(),this.removeFile(e))},this.addFile=e=>{this.setState((t=>({files:[...t.files,e]})))},this.removeFile=e=>{this.setState((t=>({files:t.files.filter((t=>t.id!==e))})))},this.getFile=e=>this.state.files.find((t=>t.id===e)),this.updateFile=(e,t)=>{this.setState((s=>({files:s.files.map((s=>s.id===e?t:s))})))},this.onUploadComplete=(e,t)=>{this.setState((e=>({newestServerFileId:Math.max(e.newestServerFileId,t),shutter:!1})));const s=this.getFile(e);null!=s&&"uploading"===s.status.type&&this.updateFile(s.id,s.setStatus({type:"uploaded",serverFileId:t}))},this.onUploadProgress=(e,t)=>{const s=this.getFile(t);if(null==s||"uploading"!==s.status.type)return;const i=Math.round(100*e.loaded/e.total);s.status.progress!==i&&this.updateFile(t,s.setStatus({type:"uploading",cancelToken:s.status.cancelToken,progress:i}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=e=>{const t=n().CancelToken.source(),s=new w.R(e.name,e.size,this.nextLocalFileId(),{type:"uploading",cancelToken:t,progress:1});this.addFile(s),this.props.uploadClient.uploadFile(this.props.element,e,(e=>this.onUploadProgress(e,s.id)),t.token).then((e=>this.onUploadComplete(s.id,e))).catch((e=>{n().isCancel(e)||this.updateFile(s.id,s.setStatus({type:"error",errorMessage:e?e.toString():"Unknown error"}))}))},this.state=this.initialValue}get initialValue(){const e={files:[],newestServerFileId:0,imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:D.USER},{widgetMgr:t,element:s}=this.props,i=t.getFileUploaderStateValue(s);if(null==i)return e;const{maxFileId:r,uploadedFileInfo:o}=i;return null==r||0===r||null==o?e:{files:o.map((e=>{const t=e.name,s=e.size,i=e.id;return new w.R(t,s,this.nextLocalFileId(),{type:"uploaded",serverFileId:i})})),newestServerFileId:Number(r),imgSrc:0===o.length?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:D.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){return this.state.files.some((e=>"uploading"===e.status.type))?"updating":"ready"}createWidgetValue(){if(0===this.state.newestServerFileId)return;const e=this.state.files.filter((e=>"uploaded"===e.status.type)).map((e=>{const{name:t,size:s,status:i}=e;return new c.jM({id:i.serverFileId,name:t,size:s})}));return new c.xO({maxFileId:this.state.newestServerFileId,uploadedFileInfo:e})}render(){var e;const{element:t,widgetMgr:s,disabled:i,width:o}=this.props;return this.formClearHelper.manageFormClearListener(s,t.formId,this.onFormCleared),(0,L.jsxs)(C,{width:o,className:"row-widget","data-testid":"stCameraInput",children:[(0,L.jsx)(p.ON,{label:t.label,disabled:i,labelVisibility:(0,S.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,L.jsx)(p.dT,{children:(0,L.jsx)(u.ZP,{content:t.help,placement:g.ug.TOP_RIGHT})})}),this.state.imgSrc?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(I,{width:o,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&(0,L.jsx)(v,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:o,height:9*o/16})}),(0,L.jsx)(U,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||i,children:this.getProgress()?"Uploading...":(0,L.jsxs)(P,{children:[(0,L.jsx)(h.ZP,{content:r.X,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):(0,L.jsx)(W,{handleCapture:this.handleCapture,width:o,disabled:i,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode})]})}nextLocalFileId(){return this.localFileIdCounter++}}const q=H},41605:(e,t,s)=>{s.d(t,{R:()=>i});class i{setStatus(e){return new i(this.name,this.size,this.id,e)}constructor(e,t,s,i){this.name=void 0,this.size=void 0,this.status=void 0,this.id=void 0,this.name=e,this.size=t,this.id=s,this.status=i}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[761],{40761:(e,t,r)=>{r.r(t),r.d(t,{default:()=>se});var o=r(5057),n=r(31476),i=r(80099),a=r(53381);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=0,p=1,d=2;function f(e){return e.$isActive?d:e.$isHovered?p:u}function h(e){var t=e.$theme.colors,r=e.$disabled,o=e.$checked,n=e.$isFocusVisible,i=e.$error;if(r)return t.tickFillDisabled;if(!o)return n?t.borderSelected:i?t.tickBorderError:t.tickBorder;if(i)switch(f(e)){case u:return t.tickFillErrorSelected;case p:return t.tickFillErrorSelectedHover;case d:return t.tickFillErrorSelectedHoverActive}else switch(f(e)){case u:return t.tickFillSelected;case p:return t.tickFillSelectedHover;case d:return t.tickFillSelectedHoverActive}return null}function b(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(f(e)){case u:return t.tickFillError;case p:return t.tickFillErrorHover;case d:return t.tickFillErrorHoverActive}else switch(f(e)){case u:return t.tickFill;case p:return t.tickFillHover;case d:return t.tickFillActive}}function m(e){var t=e.$disabled,r=e.$theme.colors;return t?r.contentSecondary:r.contentPrimary}var y=(0,a.zo)("div",(function(e){var t=e.$disabled,r=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:"horizontal"===r?"row":"column",alignItems:"horizontal"===r?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}}));y.displayName="RadioGroupRoot",y.displayName="RadioGroupRoot";var v=(0,a.zo)("label",(function(e){var t,r=e.$disabled,o=e.$hasDescription,n=e.$labelPlacement,i=e.$theme,a=e.$align,s=i.sizing,l="horizontal"===a,u="rtl"===i.direction?"Left":"Right";return c(t={flexDirection:"top"===n||"bottom"===n?"column":"row",display:"flex",alignItems:"center",cursor:r?"not-allowed":"pointer",marginTop:s.scale200},"margin".concat(u),l?s.scale200:null),c(t,"marginBottom",o&&!l?null:s.scale200),t}));v.displayName="Root",v.displayName="Root";var g=(0,a.zo)("div",(function(e){var t=e.$theme,r=t.animation,o=t.sizing;return{backgroundColor:b(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?o.scale200:o.scale550,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve,width:e.$checked?o.scale200:o.scale550}}));g.displayName="RadioMarkInner",g.displayName="RadioMarkInner";var w=(0,a.zo)("div",(function(e){var t=e.$theme,r=t.animation,o=t.sizing;return{alignItems:"center",backgroundColor:h(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:o.scale700,justifyContent:"center",marginTop:o.scale0,marginRight:o.scale0,marginBottom:o.scale0,marginLeft:o.scale0,outline:"none",verticalAlign:"middle",width:o.scale700,flexShrink:0,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve}}));w.displayName="RadioMarkOuter",w.displayName="RadioMarkOuter";var O=(0,a.zo)("div",(function(e){var t=e.$theme.typography;return l(l({verticalAlign:"middle"},function(e){var t,r=e.$labelPlacement,o=void 0===r?"":r,n=e.$theme;switch(o){case"top":t="Bottom";break;case"bottom":t="Top";break;case"left":t="rtl"===n.direction?"Left":"Right";break;default:t="rtl"===n.direction?"Right":"Left"}var i=n.sizing.scale300;return c({},"padding".concat(t),i)}(e)),{},{color:m(e)},t.LabelMedium)}));O.displayName="Label",O.displayName="Label";var R=(0,a.zo)("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});R.displayName="Input",R.displayName="Input";var k=(0,a.zo)("div",(function(e){var t,r=e.$theme,o=e.$align,n="horizontal"===o,i="rtl"===r.direction?"Right":"Left",a="rtl"===r.direction?"Left":"Right";return l(l({},r.typography.ParagraphSmall),{},(c(t={color:r.colors.contentSecondary,cursor:"auto"},"margin".concat(i),"horizontal"===o?null:r.sizing.scale900),c(t,"margin".concat(a),n?r.sizing.scale200:null),c(t,"maxWidth","240px"),t))}));k.displayName="Description",k.displayName="Description";var j=r(94253);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},P.apply(this,arguments)}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(l){s=!0,n=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function M(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function E(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=I(e);if(t){var n=I(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}(this,r)}}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T=function(e){!function(e,t){if("function"!==typeof t&&null!==t)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&&x(e,t)}(s,e);var t,r,n,a=E(s);function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return L(C(e=a.call.apply(a,[this].concat(r))),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),L(C(e),"handleFocus",(function(t,r){(0,j.E)(t)&&e.setState({isFocusVisible:!0}),e.setState({focusedRadioIndex:r}),e.props.onFocus&&e.props.onFocus(t)})),L(C(e),"handleBlur",(function(t,r){!1!==e.state.isFocusVisible&&e.setState({isFocusVisible:!1}),e.setState({focusedRadioIndex:-1}),e.props.onBlur&&e.props.onBlur(t)})),e}return t=s,(r=[{key:"render",value:function(){var e=this,t=this.props.overrides,r=void 0===t?{}:t,n=$((0,i.jb)(r.RadioGroupRoot,y),2),a=n[0],s=n[1];return o.createElement(a,P({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},s),o.Children.map(this.props.children,(function(t,r){if(!o.isValidElement(t))return null;var n=e.props.value===t.props.value;return o.cloneElement(t,{align:e.props.align,autoFocus:e.props.autoFocus,checked:n,disabled:e.props.disabled||t.props.disabled,error:e.props.error,isFocused:e.state.focusedRadioIndex===r,isFocusVisible:e.state.isFocusVisible,tabIndex:0===r&&!e.props.value||n?"0":"-1",labelPlacement:e.props.labelPlacement,name:e.props.name,onBlur:function(t){return e.handleBlur(t,r)},onFocus:function(t){return e.handleFocus(t,r)},onChange:e.props.onChange,onMouseEnter:e.props.onMouseEnter,onMouseLeave:e.props.onMouseLeave})})))}}])&&M(t.prototype,r),n&&M(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);L(T,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});const B=T;var D="vertical",V="horizontal";function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},z.apply(this,arguments)}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(l){s=!0,n=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return H(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function N(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}function W(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=G(e);if(t){var n=G(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===A(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return q(e)}(this,r)}}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function K(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Z=function(e){return e.stopPropagation()},J=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(s,e);var t,r,n,a=W(s);function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return K(q(e=a.call.apply(a,[this].concat(r))),"state",{isActive:!1,isHovered:!1}),K(q(e),"onMouseEnter",(function(t){e.setState({isHovered:!0}),e.props.onMouseEnter&&e.props.onMouseEnter(t)})),K(q(e),"onMouseLeave",(function(t){e.setState({isHovered:!1}),e.props.onMouseLeave&&e.props.onMouseLeave(t)})),K(q(e),"onMouseDown",(function(t){e.setState({isActive:!0}),e.props.onMouseDown&&e.props.onMouseDown(t)})),K(q(e),"onMouseUp",(function(t){e.setState({isActive:!1}),e.props.onMouseUp&&e.props.onMouseUp(t)})),e}return t=s,(r=[{key:"componentDidMount",value:function(){var e;this.props.autoFocus&&null!==(e=this.props.inputRef)&&void 0!==e&&e.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var e,t=this.props.overrides,r=void 0===t?{}:t,n=_((0,i.jb)(r.Root,v),2),a=n[0],s=n[1],l=_((0,i.jb)(r.Label,O),2),c=l[0],u=l[1],p=_((0,i.jb)(r.Input,R),2),d=p[0],f=p[1],h=_((0,i.jb)(r.Description,k),2),b=h[0],m=h[1],y=_((0,i.jb)(r.RadioMarkInner,g),2),j=y[0],F=y[1],P=_((0,i.jb)(r.RadioMarkOuter,w),2),$=P[0],S=P[1],M={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},x=o.createElement(c,z({},M,u),this.props.containsInteractiveElement?o.createElement("div",{onClick:function(e){return e.preventDefault()}},this.props.children):this.props.children);return o.createElement(o.Fragment,null,o.createElement(a,z({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},M,s),("top"===(e=this.props.labelPlacement)||"left"===e)&&x,o.createElement($,z({},M,S),o.createElement(j,z({},M,F))),o.createElement(d,z({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:Z,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},M,f)),function(e){return"bottom"===e||"right"===e}(this.props.labelPlacement)&&x),!!this.props.description&&o.createElement(b,z({},M,m),this.props.description))}}])&&N(t.prototype,r),n&&N(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);K(J,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:o.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});const Q=J;var X=r(86964),Y=r(8429),ee=r(54840),te=r(96266);class re extends o.PureComponent{constructor(...e){super(...e),this.state={value:this.props.value},this.onChange=e=>{const t=parseInt(e.target.value,10);this.setState({value:t},(()=>this.props.onChange(t)))}}componentDidUpdate(e){e.value!==this.props.value&&this.props.value!==this.state.value&&this.setState(((e,t)=>({value:t.value})))}render(){const{theme:e,width:t,help:r,label:o,horizontal:n,labelVisibility:i}=this.props;let{disabled:a}=this.props;const{colors:s,radii:l}=e,c={width:t},u=[...this.props.options];return 0===u.length&&(u.push("No options to select."),a=!0),(0,te.jsxs)("div",{className:"row-widget stRadio",style:c,children:[(0,te.jsx)(X.ON,{label:o,disabled:a,labelVisibility:i,children:r&&(0,te.jsx)(X.Hp,{children:(0,te.jsx)(Y.ZP,{content:r,placement:ee.ug.TOP_RIGHT})})}),(0,te.jsx)(B,{onChange:this.onChange,value:this.state.value.toString(),disabled:a,align:n?V:D,"aria-label":o,children:u.map(((e,t)=>(0,te.jsx)(Q,{value:t.toString(),overrides:{Root:{style:({$isFocusVisible:e})=>({marginBottom:0,marginTop:0,marginRight:"1rem",paddingLeft:0,alignItems:"start",paddingRight:"2px",backgroundColor:e?s.darkenedBgMix25:"",borderTopLeftRadius:l.md,borderTopRightRadius:l.md,borderBottomLeftRadius:l.md,borderBottomRightRadius:l.md})},RadioMarkOuter:{style:({$checked:e})=>({width:"1rem",height:"1rem",marginTop:"0.35rem",marginRight:"0",backgroundColor:e&&!a?s.primary:s.fadedText40})},RadioMarkInner:{style:({$checked:e})=>({height:e?"6px":".75rem",width:e?"6px":".75rem"})},Label:{style:{color:a?s.fadedText40:s.bodyText,position:"relative",top:"1px"}}},children:e},t)))})]})}}const oe=(0,n.b)(re);var ne=r(56846),ie=r(34422);class ae extends o.PureComponent{constructor(...e){super(...e),this.formClearHelper=new ne.Kz,this.state={value:this.initialValue},this.commitWidgetValue=e=>{this.props.widgetMgr.setIntValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState(((e,t)=>({value:t.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.onChange=e=>{this.setState({value:e},(()=>this.commitWidgetValue({fromUi:!0})))}}get initialValue(){const e=this.props.widgetMgr.getIntValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){const{disabled:e,element:t,width:r,widgetMgr:o}=this.props,{horizontal:n,options:i,label:a,labelVisibility:s,help:l}=t;return this.formClearHelper.manageFormClearListener(o,t.formId,this.onFormCleared),(0,te.jsx)(oe,{label:a,onChange:this.onChange,options:i,width:r,disabled:e,horizontal:n,labelVisibility:(0,ie.iF)(null===s||void 0===s?void 0:s.value),value:this.state.value,help:l})}}const se=ae}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7698],{67698:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var o=s(5057),n=s(31476),i=s(99362),r=s(46540),l=s(63),a=s(45490),c=s(70765),g=s(69194);const d=(0,a.Z)(c.Q,{shouldForwardProp:g.Z,target:"e17lx80j1"})((({theme:e,$usingCustomTheme:t})=>({marginTop:e.spacing.none,marginBottom:e.spacing.none,marginRight:e.spacing.none,marginLeft:e.spacing.none,borderColor:e.colors.fadedText10,borderTopColor:t?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0})),""),h=(0,a.Z)("div",{target:"e17lx80j0"})((({theme:e})=>({display:"flex",gap:e.spacing.lg,alignItems:"center",width:"100%"})),"");var p=s(96266);const m=function({width:e,element:t}){const s=(0,n.u)(),{activeTheme:a}=o.useContext(l.I),c=!(0,i.MJ)(a),g={width:e};return(0,p.jsx)("div",{className:"stSpinner",style:g,children:(0,p.jsxs)(h,{children:[(0,p.jsx)(d,{$size:s.iconSizes.twoXL,$usingCustomTheme:c}),(0,p.jsx)(r.Z,{source:t.text,allowHTML:!1})]})})}}}]);
@@ -1,5 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7858],{6757:(e,t,i)=>{i.d(t,{Z:()=>d});i(5057);var s=i(34422),o=i(86964),r=i(45490);const n=i(21371).F4`
2
- 50% {
3
- color: rgba(0, 0, 0, 0);
4
- }
5
- `,a=(0,r.Z)("span",{target:"e1m4n6jn0"})((({includeDot:e,shouldBlink:t,theme:i})=>({...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:i.colors.gray,margin:"0 5px"}}:{},...t?{color:i.colors.red,animationName:`${n}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),"");var l=i(96266);const d=({dirty:e,value:t,maxLength:i,className:r,type:n="single"})=>{const d=[],h=(e,t=!1)=>{d.push((0,l.jsx)(a,{includeDot:d.length>0,shouldBlink:t,children:e},d.length))};return e&&("multiline"===n?(0,s.Ge)()?h("Press \u2318+Enter to apply"):h("Press Ctrl+Enter to apply"):h("Press Enter to apply")),i&&h(`${t.length}/${i}`,e&&t.length>=i),(0,l.jsx)(o.X7,{className:r,children:d})}},7858:(e,t,i)=>{i.r(t),i.d(t,{default:()=>D});var s=i(5057),o=i(52707),r=i(84332),n=i(59500),a=i(56846),l=i(52801),d=i(32291),h=i(8429),c=i(54840),u=i(97292),m=i(30124),p=i(6757),g=i(86964),b=i(34422),f=i(45490);const y=(0,f.Z)("div",{target:"e1jwn65y3"})((({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",borderWidth:"1px",borderStyle:"solid",borderColor:e.colors.widgetBorderColor||e.colors.widgetBackgroundColor||e.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:e.radii.md,overflow:"hidden","&.focused":{borderColor:e.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:e.spacing.none}}})),""),x=(0,f.Z)("div",{target:"e1jwn65y2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),v=(0,f.Z)("button",{target:"e1jwn65y1"})((({theme:e})=>({margin:e.spacing.none,border:"none",height:e.sizes.full,display:"flex",alignItems:"center",width:"32px",justifyContent:"center",color:e.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:e.colors.widgetBackgroundColor||e.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:e.colors.white,backgroundColor:e.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md},"&:disabled":{cursor:"not-allowed",color:e.colors.fadedText40}})),""),w=(0,f.Z)("div",{target:"e1jwn65y0"})((({theme:e})=>({position:"absolute",marginRight:e.spacing.twoXS,left:0,right:"64px"})),"");var V=i(96266);class C extends s.PureComponent{constructor(e){super(e),this.formClearHelper=new a.Kz,this.inputRef=s.createRef(),this.formatValue=e=>{const t=function(e){return null==e||""===e?void 0:e}(this.props.element.format);if(null==t)return e.toString();try{return(0,n.sprintf)(t,e)}catch(i){return(0,l.KE)(`Error in sprintf(${t}, ${e}): ${i}`),String(e)}},this.isIntData=()=>this.props.element.dataType===d.Y2.DataType.INT,this.getMin=()=>this.props.element.hasMin?this.props.element.min:-1/0,this.getMax=()=>this.props.element.hasMax?this.props.element.max:1/0,this.getStep=()=>{const{step:e}=this.props.element;return e||(this.isIntData()?1:.01)},this.commitWidgetValue=e=>{const{value:t}=this.state,{element:i,widgetMgr:s}=this.props,o=this.props.element,r=this.getMin(),n=this.getMax();if(r>t||t>n){const e=this.inputRef.current;e&&e.reportValidity()}else{const r=t||0===t?t:o.default;this.isIntData()?s.setIntValue(i,r,e):s.setDoubleValue(i,r,e),this.setState({dirty:!1,value:r,formattedValue:this.formatValue(r)})}},this.onFormCleared=()=>{this.setState(((e,t)=>({value:t.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0}),this.setState({isFocused:!1})},this.onFocus=()=>{this.setState({isFocused:!0})},this.onChange=e=>{const{value:t}=e.target;let i;i=this.isIntData()?parseInt(t,10):parseFloat(t),this.setState({dirty:!0,value:i,formattedValue:t})},this.onKeyDown=e=>{const{key:t}=e;switch(t){case"ArrowUp":e.preventDefault(),this.modifyValueUsingStep("increment")();break;case"ArrowDown":e.preventDefault(),this.modifyValueUsingStep("decrement")()}},this.onKeyPress=e=>{"Enter"===e.key&&this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.modifyValueUsingStep=e=>()=>{const{value:t}=this.state,i=this.getStep();switch(e){case"increment":this.canIncrement&&this.setState({dirty:!0,value:t+i},(()=>{this.commitWidgetValue({fromUi:!0})}));break;case"decrement":this.canDecrement&&this.setState({dirty:!0,value:t-i},(()=>{this.commitWidgetValue({fromUi:!0})}))}},this.state={dirty:!1,value:this.initialValue,formattedValue:this.formatValue(this.initialValue),isFocused:!1}}get initialValue(){const e=this.isIntData()?this.props.widgetMgr.getIntValue(this.props.element):this.props.widgetMgr.getDoubleValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e,formattedValue:this.formatValue(e)},(()=>{this.commitWidgetValue({fromUi:!1})}))}get canDecrement(){return this.state.value-this.getStep()>=this.getMin()}get canIncrement(){return this.state.value+this.getStep()<=this.getMax()}render(){var e;const{element:t,width:i,disabled:s,widgetMgr:n}=this.props,{formattedValue:a,dirty:l,isFocused:d}=this.state,f={width:i},C=!this.canDecrement||s,D=!this.canIncrement||s;return this.formClearHelper.manageFormClearListener(n,t.formId,this.onFormCleared),(0,V.jsxs)("div",{className:"stNumberInput",style:f,children:[(0,V.jsx)(g.ON,{label:t.label,disabled:s,labelVisibility:(0,b.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,V.jsx)(g.dT,{children:(0,V.jsx)(h.ZP,{content:t.help,placement:c.ug.TOP_RIGHT})})}),(0,V.jsxs)(y,{className:d?"focused":"",children:[(0,V.jsx)(m.Z,{type:"number",inputRef:this.inputRef,value:a,onBlur:this.onBlur,onFocus:this.onFocus,onChange:this.onChange,onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,disabled:s,"aria-label":t.label,overrides:{Input:{props:{step:this.getStep(),min:this.getMin(),max:this.getMax()},style:{lineHeight:"1.4",paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),(0,V.jsxs)(x,{children:[(0,V.jsx)(v,{className:"step-down",onClick:this.modifyValueUsingStep("decrement"),disabled:C,children:(0,V.jsx)(u.ZP,{content:o.W,size:"xs",color:this.canDecrement?"inherit":"disabled"})}),(0,V.jsx)(v,{className:"step-up",onClick:this.modifyValueUsingStep("increment"),disabled:D,children:(0,V.jsx)(u.ZP,{content:r.v,size:"xs",color:this.canIncrement?"inherit":"disabled"})})]})]}),(0,V.jsx)(w,{children:(0,V.jsx)(p.Z,{dirty:l,value:a,className:"input-instructions"})})]})}}const D=C}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7937],{47937:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});i(5057);var s=i(92445),l=i(46540),d=i(96266);const n=function(e){const{disabled:t,element:i,widgetMgr:n,width:r}=e,a={width:r},h="primary"===i.type?s.hY.PRIMARY:s.hY.SECONDARY;return(0,d.jsx)("div",{className:"row-widget stButton",style:a,children:(0,d.jsx)(s.uD,{help:i.help,children:(0,d.jsx)(s.ZP,{kind:h,size:s.$u.SMALL,disabled:t,fluidWidth:i.useContainerWidth||!1,onClick:()=>n.setTriggerValue(i,{fromUi:!0}),children:(0,d.jsx)(l.Z,{source:i.label,allowHTML:!1,isLabel:!0,isButton:!0})})})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[8461],{88461:(t,e,o)=>{o.r(e),o.d(e,{default:()=>F});var i=o(5057),n=o(31476),a=o(96223),s=o(96533),r=o(79220),l=o(52801),d=o(62658),c=o(47143),h=o(89163),g=o(65873),u=o(99362);function m(t,e){const o={font:e.genericFonts.bodyFont,background:e.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:e.colors.headingColor,titleFontStyle:"normal",fontWeight:e.fontWeights.bold,fontSize:e.fontSizes.smPx+2,orient:"top",offset:26},axis:{labelFontSize:e.fontSizes.twoSmPx,labelFontWeight:e.fontWeights.normal,labelColor:(0,u.Xy)(e),labelFontStyle:"normal",titleFontWeight:e.fontWeights.normal,titleFontSize:e.fontSizes.smPx,titleColor:(0,u.Xy)(e),titleFontStyle:"normal",ticks:!1,gridColor:(0,u.ny)(e),domain:!1,domainWidth:1,domainColor:(0,u.ny)(e),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:e.spacing.lgPx,labelPadding:e.spacing.lgPx,labelSeparation:e.spacing.twoXSPx,labelOverlap:!0},legend:{labelFontSize:e.fontSizes.smPx,labelFontWeight:e.fontWeights.normal,labelColor:(0,u.Xy)(e),titleFontSize:e.fontSizes.smPx,titleFontWeight:e.fontWeights.normal,titleFontStyle:"normal",titleColor:(0,u.Xy)(e),titlePadding:e.spacing.mdPx,labelPadding:e.spacing.lgPx,columnPadding:e.spacing.smPx,rowPadding:e.spacing.twoXSPx,padding:7,symbolStrokeWidth:4},range:{category:(0,u.iY)(e),diverging:(0,u.ru)(e),ramp:(0,u.Gy)(e),heatmap:(0,u.Gy)(e)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:350,continuousWidth:400},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,...(0,u.Iy)(e)?{color:"#0068C9"}:{color:"#83C9FF"}},bar:{binSpacing:e.spacing.twoXSPx,discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return t?(0,g.mergeWith)({},o,t,((t,e)=>(0,g.isArray)(e)?e:void 0)):o}const p=(0,o(45490).Z)("div",{target:"everg990"})((({theme:t})=>({"&.vega-embed":{"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&.has-actions":{paddingRight:0},".vega-actions":{zIndex:t.zIndices.popupMenu,backgroundColor:t.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`1px solid ${t.colors.fadedText10}`,a:{fontFamily:t.genericFonts.bodyFont,fontWeight:t.fontWeights.normal,fontSize:t.fontSizes.md,margin:0,padding:`${t.spacing.twoXS} ${t.spacing.twoXL}`,color:t.colors.bodyText},"a:hover":{backgroundColor:t.colors.secondaryBg,color:t.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},summary:{opacity:0,height:"auto",zIndex:t.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:t.radii.md,color:t.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms","&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:t.colors.bodyText,opacity:"1 !important",background:t.colors.darkenedBgMix25}}}})),"");var f=o(96266);const b={DATAFRAME_INDEX:"(index)"},w="source",y=new Set([h.GI.DatetimeIndex,h.GI.Float64Index,h.GI.Int64Index,h.GI.RangeIndex,h.GI.UInt64Index]);class v extends i.PureComponent{constructor(...t){super(...t),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=w,this.element=null,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{var t,e;const{element:o,theme:i}=this.props,n=JSON.parse(o.spec),{useContainerWidth:a}=o;if("streamlit"===o.vegaLiteTheme?n.config=m(n.config,i):"streamlit"===(null===(t=n.usermeta)||void 0===t||null===(e=t.embedOptions)||void 0===e?void 0:e.theme)?(n.config=m(n.config,i),n.usermeta.embedOptions.theme=void 0):n.config=function(t,e){const{colors:o,fontSizes:i,genericFonts:n}=e,a={labelFont:n.bodyFont,titleFont:n.bodyFont,labelFontSize:i.twoSmPx,titleFontSize:i.twoSmPx},s={background:o.bgColor,axis:{labelColor:o.bodyText,titleColor:o.bodyText,gridColor:(0,u.ny)(e),...a},legend:{labelColor:o.bodyText,titleColor:o.bodyText,...a},title:{color:o.bodyText,subtitleColor:o.bodyText,...a},header:{labelColor:o.bodyText},view:{continuousHeight:350,continuousWidth:400},mark:{tooltip:!0}};return t?(0,g.merge)({},s,t):s}(n.config,i),this.props.height?(n.width=this.props.width,n.height=this.props.height):a&&(n.width=this.props.width),n.padding||(n.padding={}),null==n.padding.bottom&&(n.padding.bottom=20),n.datasets)throw new Error("Datasets should not be passed as part of the spec");return n}}async componentDidMount(){try{await this.createView()}catch(t){const e=(0,c.b)(t);this.setState({error:e})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(t){const{element:e,theme:o}=t,{element:i,theme:n}=this.props,a=e.spec,{spec:s}=i;if(!this.vegaView||a!==s||o!==n||t.width!==this.props.width||t.height!==this.props.height||t.element.vegaLiteTheme!==this.props.element.vegaLiteTheme){(0,l.ji)("Vega spec changed.");try{await this.createView()}catch(u){const t=(0,c.b)(u);this.setState({error:t})}return}const r=e.data,{data:d}=i;(r||d)&&this.updateData(this.defaultDataName,r,d);const h=x(e)||{},g=x(i)||{};for(const[l,c]of Object.entries(g)){const t=l||this.defaultDataName,e=h[t];this.updateData(t,e,c)}for(const l of Object.keys(h))g.hasOwnProperty(l)||l===this.defaultDataName||this.updateData(l,null,null);this.vegaView.resize().runAsync()}updateData(t,e,o){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!o||0===o.data.numRows){return void(this.vegaView._runtime.data.hasOwnProperty(t)&&this.vegaView.remove(t,s.truthy))}if(!e||0===e.data.numRows)return void this.vegaView.insert(t,S(o));const{dataRows:i,dataColumns:n}=e.dimensions,{dataRows:a,dataColumns:r}=o.dimensions;if(function(t,e,o,i,n,a){if(o!==a)return!1;if(e>=n)return!1;if(0===e)return!1;const s=a-1,r=e-1;if(t.getDataValue(0,s)!==i.getDataValue(0,s)||t.getDataValue(r,s)!==i.getDataValue(r,s))return!1;return!0}(e,i,n,o,a,r))i<a&&this.vegaView.insert(t,S(o,i));else{const e=s.changeset().remove(s.truthy).insert(S(o));this.vegaView.change(t,e),(0,l.ji)(`Had to clear the ${t} dataset before inserting data through Vega view.`)}}async createView(){if((0,l.ji)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const t=this.props.element,e=this.generateSpec(),o={defaultStyle:!0,ast:!0,expr:r.N},{vgSpec:i,view:n,finalize:s}=await(0,a.ZP)(this.element,e,o);this.vegaView=n,this.vegaFinalizer=s;const d=function(t){const e=x(t);if(null==e)return null;const o={};for(const[i,n]of Object.entries(e))o[i]=S(n);return o}(t),c=d?Object.keys(d):[];if(1===c.length){const[t]=c;this.defaultDataName=t}else 0===c.length&&i.data&&(this.defaultDataName=w);const h=function(t){const e=t.data;if(!e||0===e.data.numRows)return null;return S(e)}(t);if(h&&n.insert(this.defaultDataName,h),d)for(const[a,r]of Object.entries(d))n.insert(a,r);await n.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,f.jsx)(p,{"data-testid":"stArrowVegaLiteChart",ref:t=>{this.element=t}})}}function x(t){var e;if(0===(null===(e=t.datasets)||void 0===e?void 0:e.length))return null;const o={};return t.datasets.forEach((t=>{if(!t)return;const e=t.hasName?t.name:null;o[e]=t.data})),o}function S(t,e=0){if(t.isEmpty())return[];const o=[],{dataRows:i,dataColumns:n}=t.dimensions,a=h.fu.getTypeName(t.types.index[0]),s=y.has(a);for(let r=e;r<i;r++){const e={};if(s){const o=t.getIndexValue(r,0);e[b.DATAFRAME_INDEX]="bigint"===typeof o?Number(o):o}for(let o=0;o<n;o++){const i=t.getDataValue(r,o);e[t.columns[0][o]]="bigint"===typeof i?Number(i):i}o.push(e)}return o}const F=(0,n.b)((0,d.Z)(v))}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[8565],{68565:(e,t,o)=>{o.r(t),o.d(t,{default:()=>H});var n=o(5057),r=o(53812),i=o(62658),l=o(42429);let d;!function(e){e.ASCENDING="ascending",e.DESCENDING="descending"}(d||(d={}));var s=o(45490);const a=(0,s.Z)("div",{target:"e10os9ge8"})((({width:e,theme:t})=>({width:e,border:`1px solid ${t.colors.fadedText05}`,boxSizing:"content-box","& .table-top-right":{overflow:"hidden !important",paddingRight:"6px"},"& .table-bottom-left":{overflow:"hidden !important",paddingBottom:"6px"},"& .table-bottom-right":{overflow:"overlay !important"},"& .table-bottom-right:focus-visible":{outline:"none"},"& .table-bottom-right:focus":{outline:"none"}})),""),c=(0,s.Z)("div",{target:"e10os9ge7"})((({theme:e})=>({padding:`${e.spacing.twoXS} ${e.spacing.xs}`,borderBottom:`1px solid ${e.colors.fadedText05}`,borderRight:`1px solid ${e.colors.fadedText05}`,fontSize:e.fontSizes.md,fontFamily:e.fonts.sansSerif,lineHeight:e.lineHeights.table,display:"flex",alignItems:"center",justifyContent:"flex-start"})),""),h=e=>({color:e.colors.fadedText60,borderBottom:`1px solid ${e.colors.fadedText05}`,borderRight:`1px solid ${e.colors.fadedText05}`,zIndex:1}),m=e=>({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:e.lineHeights.table}),u=(0,s.Z)(c,{target:"e10os9ge6"})((({theme:e})=>h(e)),""),g=(0,s.Z)(c,{target:"e10os9ge5"})((({theme:e})=>({userSelect:"none",...h(e),...m(e)})),""),f=(0,s.Z)(c,{target:"e10os9ge4"})((({theme:e})=>({userSelect:"none",...h(e),...m(e)})),""),w=(0,s.Z)(c,{target:"e10os9ge3"})((({theme:e})=>m(e)),""),x=(0,s.Z)("div",{target:"e10os9ge2"})((({verticalLocator:e,horizontalLocator:t,width:o,height:n})=>({position:"absolute",[e]:"0px",[t]:"0px",width:o,height:n})),""),p=(0,s.Z)("div",{target:"e10os9ge1"})((({theme:e})=>({fontFamily:e.fonts.monospace,color:e.colors.fadedText60,fontStyle:"italic",fontSize:e.fontSizes.md,textAlign:"center"})),""),b=(0,s.Z)("span",{target:"e10os9ge0"})((({theme:e})=>({color:e.colors.fadedText05,verticalAlign:"top"})),"");var C=o(52068),y=o(52801);const S=!("undefined"===typeof window||!window.document||!window.document.createElement);let v;function N(e){if((!v&&0!==v||e)&&S){const e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),v=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return v}var I=o(72849);const D=10,E=2*I.CH.smPx,R=25,G=200,k=400,A=(e,t,o,n)=>{const{headerRows:r,headerCols:i,dataRows:d,cols:s,rows:a}=(0,l.kG)(o),c=E*r,h=t-2-N(),m=function(e,t,o,n,r,i){const l=R,d=e>2?G:k,s=({index:e})=>{const o=e,r=8*10/10,d=14+D,s=100;let a=l;for(let l=0;l<Math.min(t,s);l++){let e=-1;e=l<n?l:t>s?Math.floor(Math.random()*t):l;const{contents:c}=i(o,e),h=(c?c.length:0)*r+d;h>a&&(a=h)}return a};let a=[];const c=Array.from(Array(e),((e,t)=>s({index:t}))),h=c.reduce(((e,t)=>e+t),0),m=r-h,u=e=>e.filter((e=>e>d));if(m<0)a=c.map((e=>e>d?d:e));else{const e=u(c),t=m/e.length;a=c.map(((o,n)=>n in e.keys()?o+t:o))}let g=a.reduce(((e,t)=>e+t),0);if(g>r*(2/3)&&g<r){const t=(r-g)/e;a=a.map((e=>e+t)),g=a.reduce(((e,t)=>e+t),0)}const f=Math.min(g,r),w=({index:e})=>a[e],x=a.slice(0,o).reduce(((e,t)=>e+t));return{elementWidth:f,columnWidth:w,headerWidth:x}}(s,a,i,r,h,n);let{elementWidth:u,columnWidth:g,headerWidth:f}=m;if(0===d&&u<60){u=60,f=60;let e=0;for(let t=0;t<s;t++)e+=g({index:t});e<60&&(g=()=>60/s)}const w=a*E,x=(e||300)-2;e=Math.min(w,x);return u+=w>x?N():0,{rowHeight:E,headerHeight:c,border:2,columnWidth:g,headerWidth:f,elementWidth:u,height:e}},T={corner:u,"col-header":g,"row-header":f,data:w};var W=o(31478),z=o(95421),Z=n.forwardRef((function(e,t){return n.createElement(z.D,(0,W.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M4 1L0 5l1.5 1.5L4 4l2.5 2.5L8 5 4 1z"}))}));Z.displayName="ChevronTop";var $=n.forwardRef((function(e,t){return n.createElement(z.D,(0,W.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M1.5 1L0 2.5l4 4 4-4L6.5 1 4 3.5 1.5 1z"}))}));$.displayName="ChevronBottom";var j=o(97292),B=o(96266);function L({CellType:e,columnIndex:t,contents:o,rowIndex:n,sortedByUser:r,style:i,columnSortDirection:l,headerClickedCallback:s}){let a,c,h,m=o;const u=l===d.DESCENDING;null!=s&&0===n&&(a=()=>s(t),c="button",h=0,m=null==l?`Sort by column "${o}"`:`Sorted by column "${o}" (${u?"descending":"ascending"})`);const g=0===n?function(e){switch(e){case d.ASCENDING:return(0,B.jsx)(b,{"data-testid":"sortIcon",children:(0,B.jsx)(j.ZP,{content:Z,size:"xs",margin:"0 0 0 twoXS"})});case d.DESCENDING:return(0,B.jsx)(b,{"data-testid":"sortIcon",children:(0,B.jsx)(j.ZP,{content:$,size:"xs",margin:"0 0 0 twoXS"})});default:return null}}(l):void 0;return(0,B.jsxs)(e,{style:i,onClick:a,role:c,tabIndex:h,title:m,"data-testid":e.displayName,"data-test-sort-direction":l,children:[o,r?g:""]})}const H=(0,i.Z)((function({element:e,height:t,width:o}){const i=n.useRef(null),[s,c]=(0,n.useState)(!1),[h,m]=(0,n.useState)(0),[u,g]=(0,n.useState)(d.ASCENDING),[,f]=(0,l.oo)(e.get("data")),{headerRows:w,headerCols:b,dataRows:S,cols:v,rows:N}=(0,l.kG)(e),I=e=>{let t=d.ASCENDING;h===e&&(t=u===d.ASCENDING?d.DESCENDING:d.ASCENDING),m(e),g(t),c(!0)},D=(t=>{const{headerCols:o,dataRows:n}=(0,l.kG)(e),r=u!==d.DESCENDING;if(h<o||h-o>=t){const e=new Array(n);for(let t=0;t<n;t+=1)e[t]=r?t:n-(t+1);return e}return(0,l.X_)(e,h-o,r)})(f),E=function({element:e,headerRows:t,sortedDataRowIndices:o}){return(n,r)=>{if(null!=o&&r>=t){const e=r-t;e>=0&&e<o.length?(r=o[e],r+=t):(0,y.KE)(`Bad sortedDataRowIndices (rowIndex=${r}, headerRows=${t}, sortedDataRowIndices.length=${o.length}`)}const{contents:i,styles:d,type:s}=(0,l.me)(e,n,r);return{Component:T[s],styles:d,contents:(0,C.H7)(i)}}}({element:e,headerRows:w,sortedDataRowIndices:D}),R=function(e){return({columnIndex:t,key:o,rowIndex:n,style:r})=>{const{Component:i,styles:l,contents:d}=e(t,n),a=0===n?I:void 0,c=t===h?u:void 0,m={...r,...l,borderBottom:n===S?"none":void 0,borderRight:t===v-b?"none":void 0};return(0,B.jsx)(L,{CellType:i,columnIndex:t,rowIndex:n,style:m,contents:d,sortedByUser:s,columnSortDirection:c,headerClickedCallback:a},o)}}(E),{rowHeight:G,headerHeight:k,border:W,height:z,elementWidth:Z,columnWidth:$,headerWidth:j}=A(t,o,e,E);return setTimeout((()=>{null!=i.current&&i.current.recomputeGridSize()}),0),(0,n.useEffect)((()=>{h-b>=f&&(m(0),g(d.ASCENDING),c(!1))}),[h,b,f]),(0,B.jsxs)(a,{width:Z,className:"stDataFrame",children:[(0,B.jsx)(r.yR,{cellRenderer:R,fixedColumnCount:b,fixedRowCount:w,columnWidth:$,columnCount:v,enableFixedColumnScroll:!1,enableFixedRowScroll:!1,height:z,rowHeight:G,rowCount:N,width:Z,classNameBottomLeftGrid:"table-bottom-left",classNameBottomRightGrid:"table-bottom-right",classNameTopRightGrid:"table-top-right",ref:i}),(0,B.jsx)(x,{verticalLocator:"top",horizontalLocator:"right",width:W,height:k}),(0,B.jsx)(x,{verticalLocator:"bottom",horizontalLocator:"left",width:j,height:W}),0===S?(0,B.jsx)(p,{children:"empty"}):null]})}))}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 8910.e6dda87e.chunk.js.LICENSE.txt */
2
- (globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[8910],{90693:(e,t,r)=>{"use strict";function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},i.apply(this,arguments)}r.d(t,{Z:()=>a});var n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,i({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))}));a.displayName="SwitchCamera"},85585:(e,t,r)=>{"use strict";r.d(t,{n:()=>a});var i=r(31478),n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))}));a.displayName="Video"},30967:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var i=r(31478),n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))}));a.displayName="X"},74947:function(e,t,r){var i;i=function(e){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(e,t,r){"use strict";r.r(t);var i=r("react"),n=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),o=function(){return o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)},a=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r};function s(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)}"undefined"!==typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise((function(r,i){t.call(navigator,e,r,i)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}));var c=function(e){function t(t){var r=e.call(this,t)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return n(t,e),t.prototype.componentDidMount=function(){var e=this.state,t=this.props;this.unmounted=!1,s()?(e.hasUserMedia||this.requestUserMedia(),t.children&&"function"!=typeof t.children&&console.warn("children must be a function")):t.onUserMediaError("getUserMedia not supported")},t.prototype.componentDidUpdate=function(e){var t=this.props;if(s()){var r=JSON.stringify(e.audioConstraints)!==JSON.stringify(t.audioConstraints),i=JSON.stringify(e.videoConstraints)!==JSON.stringify(t.videoConstraints),n=e.minScreenshotWidth!==t.minScreenshotWidth,o=e.minScreenshotHeight!==t.minScreenshotHeight;(i||n||o)&&(this.canvas=null,this.ctx=null),(r||i)&&(this.stopAndCleanup(),this.requestUserMedia())}else t.onUserMediaError("getUserMedia not supported")},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},t.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map((function(t){e.removeTrack(t),t.stop()})),e.getAudioTracks().map((function(t){e.removeTrack(t),t.stop()}))):e.stop())},t.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(t.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},t.prototype.getScreenshot=function(e){var t=this.state,r=this.props;if(!t.hasUserMedia)return null;var i=this.getCanvas(e);return i&&i.toDataURL(r.screenshotFormat,r.screenshotQuality)},t.prototype.getCanvas=function(e){var t=this.state,r=this.props;if(!this.video)return null;if(!t.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var i=this.video.videoWidth,n=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var o=i/n;n=(i=r.minScreenshotWidth||this.video.clientWidth)/o,r.minScreenshotHeight&&n<r.minScreenshotHeight&&(i=(n=r.minScreenshotHeight)*o)}this.canvas=document.createElement("canvas"),this.canvas.width=(null===e||void 0===e?void 0:e.width)||i,this.canvas.height=(null===e||void 0===e?void 0:e.height)||n,this.ctx=this.canvas.getContext("2d")}var a=this.ctx,s=this.canvas;return a&&s&&(r.mirrored&&(a.translate(s.width,0),a.scale(-1,1)),a.imageSmoothingEnabled=r.imageSmoothing,a.drawImage(this.video,0,0,(null===e||void 0===e?void 0:e.width)||s.width,(null===e||void 0===e?void 0:e.height)||s.height),r.mirrored&&(a.scale(-1,1),a.translate(-s.width,0))),s},t.prototype.requestUserMedia=function(){var e=this,r=this.props,i=function(i,n){var o={video:"undefined"===typeof n||n};r.audio&&(o.audio="undefined"===typeof i||i),e.requestUserMediaId++;var a=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(o).then((function(r){e.unmounted||a!==e.requestUserMediaId?t.stopMediaStream(r):e.handleUserMedia(null,r)})).catch((function(t){e.handleUserMedia(t)}))};if("mediaDevices"in navigator)i(r.audioConstraints,r.videoConstraints);else{var n=function(e){return{optional:[{sourceId:e}]}},o=function(e){var t=e.deviceId;return"string"===typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"===typeof t&&t.ideal?t.ideal:null};MediaStreamTrack.getSources((function(e){var t=null,a=null;e.forEach((function(e){"audio"===e.kind?t=e.id:"video"===e.kind&&(a=e.id)}));var s=o(r.audioConstraints);s&&(t=s);var c=o(r.videoConstraints);c&&(a=c),i(n(t),n(a))}))}},t.prototype.handleUserMedia=function(e,t){var r=this.props;if(e||!t)return this.setState({hasUserMedia:!1}),void r.onUserMediaError(e);this.stream=t;try{this.video&&(this.video.srcObject=t),this.setState({hasUserMedia:!0})}catch(i){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(t)})}r.onUserMedia(t)},t.prototype.render=function(){var e=this,t=this.state,r=this.props,n=r.audio,s=(r.forceScreenshotSourceSize,r.onUserMedia,r.onUserMediaError,r.screenshotFormat,r.screenshotQuality,r.minScreenshotWidth,r.minScreenshotHeight,r.audioConstraints,r.videoConstraints,r.imageSmoothing,r.mirrored),c=r.style,d=void 0===c?{}:c,u=r.children,l=a(r,["audio","forceScreenshotSourceSize","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),h=s?o(o({},d),{transform:(d.transform||"")+" scaleX(-1)"}):d,f={getScreenshot:this.getScreenshot.bind(this)};return i.createElement(i.Fragment,null,i.createElement("video",o({autoPlay:!0,src:t.src,muted:!n,playsInline:!0,ref:function(t){e.video=t},style:h},l)),u&&u(f))},t.defaultProps={audio:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},t}(i.Component);t.default=c},react:function(t,r){t.exports=e}}).default},e.exports=i(r(5057))}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[91],{20091:(t,e,l)=>{l.r(e),l.d(e,{default:()=>o});var s=l(4584),i=(l(5057),l(96266));function o({element:t,width:e}){const l=t.hasWidth?t.width:e;let o,r;t.scrolling?(o="auto",r={}):(o="no",r={overflow:"hidden"});const c=n(t.src),h=null!=c?void 0:n(t.srcdoc);return(0,i.jsx)("iframe",{allow:s.p,style:r,src:c,srcDoc:h,width:l,height:t.height,scrolling:o,sandbox:s.T,title:"st.iframe"})}function n(t){return null==t||""===t?void 0:t}}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9462],{69462:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l});var i=s(5057),u=s(35e3),r=s(96266);function l({element:e,width:t,endpoints:s}){const l=(0,i.useRef)(null);(0,i.useEffect)((()=>{l.current&&(l.current.currentTime=e.startTime)}),[e.startTime]);const n=(0,u.O0)(e.url),a=s.buildMediaURL(n);return(0,r.jsx)("audio",{id:"audio",ref:l,controls:!0,src:a,className:"stAudio",style:{width:t}})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9551],{29551:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var s=r(5057),a=r(32291),n=r(35e3),i=r(96266);const l=528;function d({element:e,width:t,endpoints:r}){const d=(0,s.useRef)(null),{type:o,url:c}=e,u=(0,n.O0)(c);(0,s.useEffect)((()=>{const t=d.current,r=()=>{t&&(t.currentTime=e.startTime)};return t&&t.addEventListener("loadedmetadata",r),()=>{t&&t.removeEventListener("loadedmetadata",r)}}),[e]);const h=t=>{const{startTime:r}=e;return r?`${t}?start=${r}`:t};if(o===a.nk.Type.YOUTUBE_IFRAME){const e=0!==t?.75*t:l;return(0,i.jsx)("iframe",{title:u,src:h(u),width:t,height:e,frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,i.jsx)("video",{ref:d,controls:!0,src:r.buildMediaURL(u),className:"stVideo",style:{width:t,height:0===t?l:void 0}})}}}]);